Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

how to make the shopping cart infobox stay put


Recommended Posts

Hey guys, I've spent the past couple days searching through these forums trying to figure out how to get my osCommerce site up and running. I'm amazed at how much help i've found and at all the amazing people that help out people like me with their problems. So far i've been able to find answers to all of my questions, but there is now something i can't seem to find any talk about.


For my site i want the shopping cart to be displayed in the left bar, but i want it to stay in the same physical location on the screen at all times. That is to say, when the customer scrolls down the page to look at more products, the shopping cart is always visible in the same place.


I'm completely new at using php and only have a basic knowledge of html, so if this is a dumb question i apologize. But i can't seem to figure out how i should go about getting this to work. Any ideas would be greatly appreciated, and if by some chance there is already a contribution for this that i overlooked i would love a link to it. Thanks! :D



Link to comment
Share on other sites

I'm not sure I understand, but...


Make backups of the affected files., then....


in catalog/includes/column_right.php you'll find this line near the top


require(DIR_WS_BOXES . 'shopping_cart.php');


put two forward slashes in front of that line.


//require(DIR_WS_BOXES . 'shopping_cart.php');


That will eliminate the shopping cart box on the right.


Then go to catalog/includes/column_left.php


you'll find these lines near the top of the file


if ((USE_CACHE == 'true') && empty($SID)) {
echo tep_cache_categories_box();
 } else {
include(DIR_WS_BOXES . 'categories.php');

underneath that, add the shopping cart, like so


require(DIR_WS_BOXES . 'shopping_cart.php');


Then the shopping cart will be under the categories box on the left. It shouldn't move around.


The cart box will have a funny looking round corner, though. You can change that in catalog/includes/boxes/shopping_cart.php


on line 20, you'll see


new infoBoxHeading($info_box_contents, false, true, tep_href_link(FILENAME_SHOPPING_CART));


change that to


new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SHOPPING_CART));


Then your cart box will have square corners (if you want..if not don't do that part ;)


Maybe I missed your point...if so just let me know.

Link to comment
Share on other sites

Maybe I missed your point...if so just let me know.


Thanks for your quick reply, but i think maybe i didnt explain myself very well. I kinda figured out how to move the shopping cart into the left column, but what i want is for it to be in the same position on the monitor even when scrolling down the page. This is so that the customer can always see their shopping cart in the same exact place without having to look all over for it. So if when the user first goes onto the page it is exactly half way down the screen on the left, they scroll down and the shopping cart still remains exactly half way down the screen. I had seen this done on other sites in a similar way where a little message box or something like that would follow you all over the page no matter how far you scroll (though in many cases that can be annoying) and i thought this would be a useful application of that ability. Hope this makes it a little clearer. And again, thanks for the help!



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...