nicko107 Posted August 29, 2006 Share Posted August 29, 2006 Hello This contribution: Individual boxes for products in central modules - cajas individuales para productos de modulos centrales http://www.oscommerce.com/community/contributions,4491 change the modules: New Products in month ... - module in front page and in categories with subcategories Also purchased products - module with recomended products in detail info of product Products of Specials products page to display the products in individual modules with graphics rounded borders, and show a short description of each product, add two links: "more info +" and a icon to add product to shopping cart: result for the New products in month...: in a few hours I have made a modification in demo: http://www.oscommerce-demo.com/short_description/ for can see this modification in action. The contribution includes instructions in english and spanish for installation new files to upload and a folder with all files modifieds to new shops without modifications in files two pack of different graphics for borders, can customize the graphics and are include the files in PSD format to customize its, graphics of New and Special text in PSD format This contribution is based in Graphical borders v2 and Short description in products Create a tables to display the products in individual boxes. Resolve the problem of different height of boxes with define of height of graphics right, can customize the height. Quote Link to comment Share on other sites More sharing options...
nicko107 Posted August 30, 2006 Author Share Posted August 30, 2006 (edited) Hello The contribution have to edit some code fo the Also Purchased products instructions part: The code to replace are in file: catalog/includes/modules/also_purchased_products.php have an error in instructions in: <td class="smallText">'. strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $new_products["products_id"]). '">' . DESCR_READ_MORE . '</a>&</td> it cause that the link "more info +" in module: "Also purchased products" no work properly Solve it doing this: FIND that line: <td class="smallText">'. strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $new_products["products_id"]). '">' . DESCR_READ_MORE . '</a>&</td> and REPLACE by: <td class="smallText">'. strip_tags($description['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $orders["products_id"]). '">' . DESCR_READ_MORE . '</a>&</td> Edited August 30, 2006 by nicko107 Quote Link to comment Share on other sites More sharing options...
nicko107 Posted September 5, 2006 Author Share Posted September 5, 2006 (edited) Hello Uploaded a new version, and a version to modules of Featured Products and Special on Default contributions: Individual boxes v1.1 COMPLETE PACKCAGE Include bug fixes, and new features: + Image Text NEW / SPECIAL are now link to new products page / special offer page, respectively + Include graphics borders of demo01 NEW SHOPS: in folder catalog_for_new_shop_only there are all files modified by this contributions for new show without modifications in files. UPDATE: Include instructions to update to the first version to this version 1.1. Instructions to apply v1.1 to Featured Products and Special on Default modules Instructions to apply this modification to display the products of Featured Products and / or Special_on_Default modules in individual boxes, with graphics rounded borders and short description, include links more info +, add to cart icon and links FEATURED / SPECIAL to featured products page / special offers page respectively. Install firts Individual Boxes v1.1 and if your have any of this two contribution them can apply this for them. DEMO of individual boxes v1.1 and modules Featured Products and Special_on_Default with this modification can see in: http://www.oscommerce-demo.com/demo01/ Download at: http://www.oscommerce.com/community/contributions,4491 Edited September 5, 2006 by nicko107 Quote Link to comment Share on other sites More sharing options...
Briljander Posted October 6, 2006 Share Posted October 6, 2006 Is it possible to do a modification of this contribution so it randomly or chooses 8 (or as many as defined in adminconfiguration) products from specials, new products, and featured products? And still have the right topic of every box that says if its new, special or featured. Look at this store (it's in swedish and doesn't use oscommerce but i really like the way of how the boxes shows and just wanted to show what i ment) http://www.dustinhome.se/dacsaportal/syste...aspx?PageID=472 Quote Link to comment Share on other sites More sharing options...
nicko107 Posted October 6, 2006 Author Share Posted October 6, 2006 Hi for new products module see this contribution: Random New Products http://www.oscommerce.com/community/contributions,1849 Quote Link to comment Share on other sites More sharing options...
Briljander Posted October 6, 2006 Share Posted October 6, 2006 Oki, not what im searchin for. I would like to have random selected products from specials, new products and featured products or bestseller. I have scanned through all contributions without any luck and my phpskills arent enough to create one myself. But I do have some coding skills in other languages so I have managed to modify your script pretty much the way I like it. Quote Link to comment Share on other sites More sharing options...
nicko107 Posted October 11, 2006 Author Share Posted October 11, 2006 Hi This contribution only change the borders of modules, the new products module show products and specials products but I dont know is there a contribution to display products with combine normal products, specials products and featured products The tags "Featured" that appear in featured products individual boxes are added in the file of this module, the module that you said will be a contribution that assigned the mark featured for a product or something similar Quote Link to comment Share on other sites More sharing options...
baalwww Posted November 2, 2006 Share Posted November 2, 2006 Hi. I like this contribution, but the results don't look like your example. I get this what is wrong with the box sides? Quote Link to comment Share on other sites More sharing options...
baalwww Posted November 4, 2006 Share Posted November 4, 2006 Well, in the absence of any advice about this, would someone who uses this contrib be willing to cut and paste the HTML from the appropriate part of their main section so I can compare, or point me to their page where these boxes look correct and I'll check the HTML there? Quote Link to comment Share on other sites More sharing options...
baalwww Posted November 7, 2006 Share Posted November 7, 2006 OK, I compared my HTML to a site with good-looking boxes, and here is what I found. Nothing. However, I did fix the problem, but I really want to know why I'm having it, in case it's symptomatic of something else. The <td> tags that contain the left.gif and right.gif of the boxes, I had to change them to be <td width="10"> (they had no width prior), and it looked fine. Turns out the weird look above is because the left and right were repeating themselves because the cell was wider than the image. Why? Quote Link to comment Share on other sites More sharing options...
godino1 Posted November 7, 2006 Share Posted November 7, 2006 has anyone added this mod to star products? http://www.oscommerce.com/community/contri...h,star+products Is so i would be grateful for a copy of the module so i can use it. Quote Link to comment Share on other sites More sharing options...
godino1 Posted November 7, 2006 Share Posted November 7, 2006 also trying to add it to the cross_sell module got as far as adding all the borders etc but would like to limit the quantity of words in description at present uploads the whole description to module. Here is my file $Id: cross_sell_products.php, v1 2002/09/11 osCommerce, Open Source E-Commerce Solutions <http://www.oscommerce.com> Copyright © 2002 osCommerce Released under the GNU General Public License */ if ($HTTP_GET_VARS['products_id']) { $cross_sell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, pd.products_description, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_CROSS_SELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and xp.cross_sell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by pd.products_name asc limit " . MAX_DISPLAY_ALSO_PURCHASED); $num_products_cross_sell = tep_db_num_rows($cross_sell_query); if ($num_products_cross_sell >= 1) { ?> <!-- cross_sell_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => TEXT_CROSS_SELL_PRODUCTS); new noborderBox($info_box_contents); //new infoBoxHeading($info_box_contents, false, false); $row = 0; $col = 0; $info_box_contents = array(); while ($cross_sell = tep_db_fetch_array($cross_sell_query)) { $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" cellspacing="0" width="33%" valign="top"', 'text' => '<table width="100%" border="0" cellspacing="0" bgcolor="#ffffff" cellpadding="0"> <tr> <td align="right" valign="bottom" bordercolor="0"><img src="images/infobox_grey/upper_left.gif" alt="1" width="12" height="33" /></td> <td colspan="2" background="images/infobox_grey/top.gif"><center><FONT SIZE=2><b><a class=productTitle href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $cross_sell['products_id']) . '">' . substr($cross_sell['products_name'], 0, 50) . '</a></b></font></center></td> <td align="left" valign="bottom"><img src="images/infobox_grey/upper_right.gif" alt="2" width="14" height="33" /></td> </tr> <tr> <td background="images/infobox_grey/left.gif"> </td> <td align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $cross_sell["products_id"]) . '">' . tep_image(DIR_WS_IMAGES . $cross_sell['products_image'], $cross_sell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br> </td> <td align="center" class="smallText">'. strip_tags($cross_sell['products_description']) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $cross_sell["products_id"]). '">' . DESCR_READ_MORE . '</a><br><br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $cross_sell['products_id']) . '">' . tep_image_button('cart_buy.gif', IMAGE_BUTTON_MORE_INFO) . '</a> <strong>' . $currencies->display_price($cross_sell['products_price'], tep_get_tax_rate($cross_sell['products_tax_class_id'])).'</strong></td> <td background="images/infobox_grey/right.gif" class="smallText"><img src="images/infobox_grey/right.gif" width="14" height="149" /></td> </tr> <tr> <td align="right" valign="top"><img src="images/infobox_grey/lower_left.gif" alt="5" width="12" height="12" /></td> <td colspan="2" background="images/infobox_grey/bot.gif"><img src="images/infobox_grey/bot.gif" alt="5" width="2" height="12" /></td> <td align="left" valign="top" class="smallText"><img src="images/infobox_grey/lower_right.gif" alt="2" width="14" height="12" /></td> </tr> </table>'); $col ++; if ($col > 1) { $col = 0; $row ++; } } new noborderbox($info_box_contents); ?> <!-- cross_sell_products_eof //--> <?php } } ?> Quote Link to comment Share on other sites More sharing options...
nicko107 Posted November 17, 2006 Author Share Posted November 17, 2006 has anyone added this mod to star products? http://www.oscommerce.com/community/contri...h,star+products Is so i would be grateful for a copy of the module so i can use it. Hi see this post: http://www.oscommerce.com/forums/index.php?sho...6740&st=40# the post of 6 october there is explain in detailed how to applied individual boxes to the Star product module Quote Link to comment Share on other sites More sharing options...
nicko107 Posted November 17, 2006 Author Share Posted November 17, 2006 Hi. I like this contribution, but the results don't look like your example. I get this what is wrong with the box sides? Hi I have to upload a new version the next week I creating a new instructions to Featured Products and Specials on Default contributions too I correct this in this version Quote Link to comment Share on other sites More sharing options...
nicko107 Posted November 21, 2006 Author Share Posted November 21, 2006 Hi. I like this contribution, but the results don't look like your example. I get this what is wrong with the box sides? Hi In new version I going to add the next: 1. FIND this line (appear in two locations in file): <td background="images/infobox/left.gif"> </td> REPLACE (in two locations): <td background="images/infobox/left.gif" width="12"> </td> That is for the double left borders 2. FIND (appear in two locations): <td background="images/infobox/right.gif" class="smallText"><img src="images/infobox/right.gif" width="14" height="149" /></td> REPLACE in two locations by this: <td background="images/infobox/right.gif" width="12" class="smallText"><img src="images/infobox/right.gif" width="14" height="149" /></td> that is for the double right border Quote Link to comment Share on other sites More sharing options...
nicko107 Posted November 22, 2006 Author Share Posted November 22, 2006 Hi I upload a new version of Graphical borders Graphical Borders v2.1 http://www.oscommerce.com/community/contributions,1702 - include fixed in width of left side graphics of borders, left side dont have the same of right. I prefer fixed it now for have a easy creation of new graphics borders and for this could be have any effect in Individual boxes contributions in future. - the graphics are optimize to have small size in kbs - Graphics of borders of columns boxes now is different of graphics of main modules, boxes and modules have different look see this post for more information: http://www.oscommerce.com/forums/index.php?sho...;p=975542 Im working now in a new version for Individual boxes with the modifications introduce in Graphical borders v2.1 and with some fixes (fix to dont display double left and right borders, ...) And I?m study combine contribution Product Listing in Columns (http://www.oscommerce.com/community/contributions,112) with individual boxes for display individual boxes in products listing too Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 7, 2006 Share Posted December 7, 2006 (edited) I have just installed individual boxes version 1.1 by Nicko posted on 4 sept 06 I have made the mods above to remove the double borders but I still have a problem with double borders on the right side of my boxes. Also I dont appear to get the short description in the boxes either, I dont have graphical borders installed is this something I need to do for the borders to work properly ? How do I get the rounded corners at the bottom of star product? Would it be possibel to to do this with optional related products also? Would some kind soul who is good with Paint Shop \ photo change the border colours to blend in with the rest of my site please? The ones I am using are from the demo01 folder. You can see my current results on my test site Regards Shaun Edited December 7, 2006 by Get-Wireless 2 Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 7, 2006 Share Posted December 7, 2006 I have just installed individual boxes version 1.1 by Nicko posted on 4 sept 06I have made the mods above to remove the double borders but I still have a problem with double borders on the right side of my boxes. Also I dont appear to get the short description in the boxes either, FIXED Was to do with having javascript at top of product description, Now moved this further down I dont have graphical borders installed is this something I need to do for the borders to work properly ? Seems to be working ok with out them :D How do I get the rounded corners at the bottom of star product? Still Needed Would it be possibel to to do this with optional related products also? Still Needed Would some kind soul who is good with Paint Shop \ photo change the border colours to blend in with the rest of my site please? The ones I am using are from the demo01 folder. DONE You can see my current results on my test site Regards Shaun Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 7, 2006 Share Posted December 7, 2006 I have tried method 2 in the new_products.php file, I still have a problem with the double border on the right of the box, the left side is fine, Also the first box is fine IE the top left box or if I had it set to display only one new product it would be fine. Can any one offer any help on this please? Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2006 Share Posted December 8, 2006 Hi Get-Wireless 2, I have sent you a PM. Maybe you can help me because your shop has working borders (Individual boxes v1.1). Hope so! For others: see my problem @ MyShop I can't get all boxes to get the same border. I executed these instructions: * 11.1. OPEN File and FIND: * <!-- body_text //--> * * ADD AFTER: * <?php echo mws_header (''); ?> * * 2. FIND: * <!-- body_text_eof //--> * * ADD BEFORE: * <?php echo mws_footer (''); ?> But it does not seem to work for me! Maybe someone can post working php files? Those should be, if I'm correct: catalog/stylesheet.css catalog/includes/classes/boxes.php catalog/includes/languages/english.php (or other language) catalog/includes/modules/new_products.php catalog/includes/modules/also_purchased_products.php catalog/specials.php Quote Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2006 Share Posted December 8, 2006 This is my new_products.php: <?php /* $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php echo mws_header (''); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <?php $titulo = sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B')); echo mws_header_main($titulo); ?> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); // new contentBoxHeading($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); $col ++; if ($col > 2) { $col = 0; $row ++; } } new noborderBox($info_box_contents); ?> </td> <?php echo mws_footer(''); ?> </tr> </table> <!-- new_products_eof //--> This is the result: A little screwed up now! Quote Link to comment Share on other sites More sharing options...
Guest Posted December 8, 2006 Share Posted December 8, 2006 And here is my catalog\includes\classes\boxes.php: <?php/* $Id: boxes.php,v 1.31 2003/02/11 00:04:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License*/ class tableBox { var $table_border = '0'; var $table_width = '100%'; var $table_cellspacing = '0'; var $table_cellpadding = '2'; var $table_parameters = ''; var $table_row_parameters = ''; var $table_data_parameters = ''; // class constructor function tableBox($contents, $direct_output = false) { $tableBox_string = '<table border="' . $this->table_border . '" width="' . $this->table_width . '" cellspacing="' . $this->table_cellspacing . '" cellpadding="' . $this->table_cellpadding . '"'; if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters; $tableBox_string .= '>' . "\n"; for ($i=0, $n=sizeof($contents); $i<$n; $i++) { if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n"; $tableBox_string .= ' <tr'; if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters; if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params']; $tableBox_string .= '>' . "\n"; if (is_array($contents[$i][0])) { for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) { if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) { $tableBox_string .= ' <td'; if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . $contents[$i][$x]['align'] . '"'; if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) { $tableBox_string .= ' ' . $contents[$i][$x]['params']; } elseif (tep_not_null($this->table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } $tableBox_string .= '>'; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form']; $tableBox_string .= $contents[$i][$x]['text']; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>'; $tableBox_string .= '</td>' . "\n"; } } } else { $tableBox_string .= ' <td'; if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . $contents[$i]['align'] . '"'; if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) { $tableBox_string .= ' ' . $contents[$i]['params']; } elseif (tep_not_null($this->table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n"; } $tableBox_string .= ' </tr>' . "\n"; if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n"; } $tableBox_string .= '</table>' . "\n"; if ($direct_output == true) echo $tableBox_string; return $tableBox_string; } } //Default infoBox Class class infoBox extends tableBox {// Graphical Borders function infoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->mws_infoBoxContents($contents)); $this->tableBox($info_box_contents, true); } function mws_infoboxcontents($contents) { global $mws_headerText, $mws_headerLink; $this->table_cellpadding = '0'; $this->align = 'center'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''), 'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''), 'params' => 'class="boxText"', 'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : ''))); } $output = ' <table cellspacing="0" cellpadding="0" border="0"> <tr> <td>' . tep_image(DIR_WS_IMAGES . 'infobox/upper_left.gif','') . '</td> <td class="mws_boxTop" width="100%">' . $mws_headerText; if ($mws_headerLink != false) { $output .= ' <a href="' . $mws_headerLink . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } $output .= '</td> <td>' . tep_image(DIR_WS_IMAGES . 'infobox/upper_right.gif','') . '</td> </tr> <tr> <td class="mws_boxLeft"></td> <td class="mws_boxCenter">' . $this->tableBox($info_box_contents) . '</td> <td class="mws_boxRight"></td> </tr> <tr> <td>' . tep_image(DIR_WS_IMAGES . 'infobox/lower_left.gif','') . '</td> <td class="mws_boxBottom"></td> <td>' . tep_image(DIR_WS_IMAGES . 'infobox/lower_right.gif','') . '</td> </tr> </table>'; return $output; }// Graphical Borders - end modification function infoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="infoBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="TextBox"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } // Graphical Borders class infoBoxHeading extends tableBox { function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $mws_headerText, $mws_headerLink; $mws_headerText = $contents[0]['text']; $mws_headerLink = $right_arrow; } }// Graphical Borders - end modification //Default contenBox Class class contentBox extends tableBox { function contentBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->contentBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="contentBox"'; $this->tableBox($info_box_contents, true); } function contentBoxContents($contents) { $this->table_cellpadding = '4'; $this->table_parameters = 'class="contentBoxContents"'; return $this->tableBox($contents); } } class contentBoxHeading extends tableBox { function contentBoxHeading($contents) { $this->table_width = '100%'; $this->table_cellpadding = '0'; $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="contentBoxHeading"', 'text' => tep_image(DIR_WS_IMAGES . 'contentBox/corner_left.gif')), array('params' => 'height="14" class="contentBoxHeading" width="100%"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="contentBoxHeading"', 'text' => tep_image(DIR_WS_IMAGES . 'contentBox/corner_right_left.gif'))); $this->tableBox($info_box_contents, true); } } class errorBox extends tableBox { function errorBox($contents) { $this->table_data_parameters = 'class="errorBox"'; $this->tableBox($contents, true); } } class productListingBox extends tableBox { function productListingBox($contents) { $this->table_parameters = 'class="productListing"'; $this->tableBox($contents, true); } } //New BestSellersBox Class class BestSellersBox extends tableBox { function BestSellersBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->BestSellersBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="BestSellersBox"'; $this->tableBox($info_box_contents, true); } function BestSellersBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="BestSellersBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="BestSellersBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class BestSellersBoxHeading extends tableBox { function BestSellersBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'BestSellersBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'BestSellersBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'BestSellersBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'BestSellersBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="BestSellersBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="BestSellersBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="BestSellersBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New CategoriesBox Class class CategoriesBox extends tableBox { function CategoriesBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->CategoriesBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="CategoriesBox"'; $this->tableBox($info_box_contents, true); } function CategoriesBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="CategoriesBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="CategoriesBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class CategoriesBoxHeading extends tableBox { function CategoriesBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'CategoriesBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'CategoriesBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="CategoriesBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="CategoriesBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="CategoriesBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New CurrenciesBox Class class CurrenciesBox extends tableBox { function CurrenciesBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->CurrenciesBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="CurrenciesBox"'; $this->tableBox($info_box_contents, true); } function CurrenciesBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="CurrenciesBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="CurrenciesBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class CurrenciesBoxHeading extends tableBox { function CurrenciesBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'CurrenciesBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'CurrenciesBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'CurrenciesBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'CurrenciesBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="CurrenciesBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="CurrenciesBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="CurrenciesBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New InformationBox Class class InformationBox extends tableBox { function InformationBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->InformationBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="InformationBox"'; $this->tableBox($info_box_contents, true); } function InformationBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="InformationBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="InformationBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class InformationBoxHeading extends tableBox { function InformationBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'InformationBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'InformationBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'InformationBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'InformationBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="InformationBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="InformationBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="InformationBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New LanguagesBox Class class LanguagesBox extends tableBox { function LanguagesBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->LanguagesBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="LanguagesBox"'; $this->tableBox($info_box_contents, true); } function LanguagesBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="LanguagesBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="LanguagesBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class LanguagesBoxHeading extends tableBox { function LanguagesBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'LanguagesBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'LanguagesBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'LanguagesBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'LanguagesBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="LanguagesBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="LanguagesBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="LanguagesBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New ManufacturerInfoBox Class class ManufacturerInfoBox extends tableBox { function ManufacturerInfoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->ManufacturerInfoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="ManufacturerInfoBox"'; $this->tableBox($info_box_contents, true); } function ManufacturerInfoBoxContents($contents) { $this->table_cellpadding = '3'; $this->table_parameters = 'class="ManufacturerInfoBoxContents"'; $info_box_contents = array(); $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); for ($i=0, $n=sizeof($contents); $i<$n; $i++) { $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="ManufacturerInfoBoxContents"', 'text' => $contents[$i]['text'])); } $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); return $this->tableBox($info_box_contents); } } class ManufacturerInfoBoxHeading extends tableBox { function ManufacturerInfoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'ManufacturerInfoBox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'ManufacturerInfoBox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'ManufacturerInfoBox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'ManufacturerInfoBox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="ManufacturerInfoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="ManufacturerInfoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="ManufacturerInfoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } //New ManufacturersBox Class class ManufacturersBox extends tableBox { function ManufacturersBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->ManufacturersBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="ManufacturersBox"'; $this->tableBox($info_box_contents, true); } function ManufacturersBoxContents($contents) { $this->table_cellpad Quote Link to comment Share on other sites More sharing options...
Get-Wireless 2 Posted December 9, 2006 Share Posted December 9, 2006 Yeah baby got my boxes looking nice now, Problem I had with the right side was still doubled, I resized the right to <td background="images/infobox/right.gif" width="14" class="smallText"><img src="images/infobox/right.gif" width="14" height="149" /></td> My screen is a 15" widescreen and set to resolution is set to 1280 x 800 and I am using FF2 and IE 7 beta 2 browsers I need to test it on a few diff screens and resolutions before I go live with it. I would be greatful if some of you would look at www.get-wireless.co.uk And see how the boxes look at and let me know what size screen you are using what resolution your display is set to and which browser you are looking it :D Thanks in advance Quote Contributions installed so far Discount Coupon Codes Ultimate SEO Urls Star Product Product Description Header template Modern design Search box Add to favorites Discount Plus All Manufacturers Loginbox Best Lightbox V2 Optional Related Products Plus Many more Link to comment Share on other sites More sharing options...
nicko107 Posted December 10, 2006 Author Share Posted December 10, 2006 Hi I upload the new version: Individual boxes 1.2 http://www.oscommerce.com/community/contributions,4491 NEW FEATURES AND FIXES: -------------------------------- - Code Simplified and some fixes. - Fixes for left and right borders that in some cases appear double. - Fix for Also Products Purchase module. - Add option to modified in the stylesheet.css file the background colors of individual boxes, and the background of left side can have a different color of background f right side of individual boxes. - The individual boxes have different graphics borders if its combine with Graphical Borders Contribution, graphics borders of boxes of columns with Graphical Borders Contribution and the graphical borders for Individual Boxes now are different to have more veariety in the design of the catalog. - the left graphics borders now have the same with that the right graphics borders (14 pixels), and others fixes are in the code that display the individual boxes. - Include instructions to update version 1.1 to 1.2 There are two new packs one the complete pack: Individual boxes 1.2 and second: "Customization instructions to version 1.2 - Instrucciones de personalizacion" this second pack include instructions to customize the individual boxes, numbers of charapters of short description and product name, background colors, change graphic borders and NEW or SPECIAL tags,.... and several packs of graphics borders wit different designs, and include the graphics borders in PSD file In a few days I upload others packs (addons to 1.2) for applied individual boxes to Featured Products and Special on default modules, and Im study how to applied to product_listing.php with the contribution "Product Listing in Columns". Quote Link to comment Share on other sites More sharing options...
nicko107 Posted December 10, 2006 Author Share Posted December 10, 2006 (edited) Yeah baby got my boxes looking nice now, Problem I had with the right side was still doubled, I resized the right to <td background="images/infobox/right.gif" width="14" class="smallText"><img src="images/infobox/right.gif" width="14" height="149" /></td> My screen is a 15" widescreen and set to resolution is set to 1280 x 800 and I am using FF2 and IE 7 beta 2 browsers I need to test it on a few diff screens and resolutions before I go live with it. I would be greatful if some of you would look at www.get-wireless.co.uk And see how the boxes look at and let me know what size screen you are using what resolution your display is set to and which browser you are looking it :D Thanks in advance Hi replace that code by this: <td background="images/infobox_module/right.gif" class="smallText" width="14"><img src="images/infobox_module/right.gif" width="14" height="149" /></td> (only need to define width to 14 pixels) In 1024 x 768 I dont see now double borders, I cant try bigger resolutions but I dont know if you can resolve this. And for the other questions: "I still have a problem with double borders on the right side of my boxes." - See the new version 1.2 that I upload today, you can find in it instructions to update the version 1.1 to the new 1.2 that have fixes this problems and others. Is easy to do, only need change this files: catalog/stylesheet.css catalog/specials.php catalog/includes/modules/new_products.php catalog/includes/modules/also_purchased_products.php "Would it be possibel to to do this with optional related products also? Still Needed" - I dont installed thats contribution yet but the next days I going to install to see how applied the individual boxes to it "Would some kind soul who is good with Paint Shop \ photo change the border colours to blend in with the rest of my site please? The ones I am using are from the demo01 folder." - with hue and saturation utility of a desing application you could change the colors, this options can colorise the colors of graphics "I dont have graphical borders installed is this something I need to do for the borders to work properly ? Seems to be working ok with out them" - dont needed, each contribution have his instructions. Only if you want the graphics borders to boxes of columns you need install Graphical Borders contribution, but in that case dont reapet some steps that are the same in both contributions, this steps are indicate in the instructions "How do I get the rounded corners at the bottom of star product? Still Needed" - I see you store, I suppose you the new version of Graphical borders and the addons to applied to Star product Good shop, with the new versions of Individual boxes 1.2 and Graphical borders 2.1 now you can used different graphics borders to products modules and boxes of columns. In a few days I upload instructions to apply individual boxes to Featured Products module and the product_listing.php Sorry for no repply before in the forum, Im building the new versions, i hope the new version fixed thats and display better the instructions Edited December 10, 2006 by nicko107 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.