JenOcide Posted December 20, 2003 Share Posted December 20, 2003 Hi, I've just been followed the tutorials at http://wiki.oscommerce.com/docsCat but have come across a little problem. First of all I moved the shopping cart to the left-hand side based on http://wiki.oscommerce.com/docsCatBoxGenRemove Next I used the long method at http://wiki.oscommerce.com/docsCatBoxGenHeadImages to add header images to my info boxes. The problem I've come across is that the arrow_right.gif doesn't appear in the shopping cart infobox when both of these tutorials have been carried out. I've tried tweaking the code in boxes.php numerous times to get this problem to work properly. The closest I've got is displaying arrow_right.gif in the correct place, but the background image is repeated twice as the inclusion of the GIF image appears to split the header section into two cells. After searching the forums, there doesn't appear to be a thread answering this problem (apologise if there is). Has anybody else come across this problem? If not, any help on this would be appreciated. Many thanks Jennifer Link to comment Share on other sites More sharing options...
geenygreat Posted December 21, 2003 Share Posted December 21, 2003 What code are you using in boxes.php and /boxes/shoppingcart.php to display box heading for shopping cart box? Link to comment Share on other sites More sharing options...
JenOcide Posted December 21, 2003 Author Share Posted December 21, 2003 Hi geenygreat, The code I used is based on the tutorials I provided above. Although I've made attempts myself to get this working, I've since reverted back to the original code of the tutorials as below: boxes.php class infoBoxHeadingCart extends tableBox { function infoBoxHeadingCart($contents, $left_corner = true, $right_corner = true, $right_arrow = true) { $this->table_cellpadding = '0'; if ($left_corner == false) { $left_corner = tep_image(DIR_WS_IMAGES . ''); } else { $left_corner = tep_draw_separator(''); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeadingCart"', 'text' => $left_corner), array('params' => 'width="100%" height="14" class="infoBoxHeadingCart"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeadingCart" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } boxes/shopping_cart.php <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART); new infoBoxHeadingCart($info_box_contents, true, false, tep_href_link(FILENAME_SHOPPING_CART)); /* remaining code unchange below this line */ ?> The code now, as it is, just displays a background header image without the arrow_right gif that was present when the infobox was situated in the right column. I've tried adding the remaining code from infoBoxHeading such as: if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } ....but every time it affects the background image :( Link to comment Share on other sites More sharing options...
geenygreat Posted December 21, 2003 Share Posted December 21, 2003 You may try the following for cart box heading: class infoBoxHeadingCart extends tableBox { function infoBoxHeadingCart($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { $this->table_cellpadding = '0'; if ($left_corner == false) { $left_corner = tep_image(DIR_WS_IMAGES . ''); } else { $left_corner = tep_draw_separator(''); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeadingCart"', 'text' => $left_corner), array('params' => 'width="100%" height="14" align="right" class="infoBoxHeadingCart"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeadingCart" nowrap', 'text' => $right_arrow)); $this->tableBox($info_box_contents, true); } } Make a backup. Link to comment Share on other sites More sharing options...
JenOcide Posted December 22, 2003 Author Share Posted December 22, 2003 Thank you geenygreat, This is similar to what I've already tried, and unfortunately it creates the same problems. I've tried everything I can think of, but seem to be getting no where. Because of this I have re-designed the layout and gone for an alternative approach. Although not what I wanted, it does the job ;) I may come back to this when I have completed the other jobs I'm working on. Thank you once again for your help, though, it was much appreciated :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.