Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

shopping cart + extra chance to sell items


Recommended Posts



I want to have a couple of images within the shopping cart that when a customer adds an item they also see these "do you also want" items at the bottom.


I have managed this first bit with 3 images that are fixed 2sec download time over dial up so very small on time. + point.




How would i go about creating the code for when the static image is clicked it adds the item straight to the cart (the page they are already in). I understand that the code will need to be linked to the item number in the database and then code to add it straight to the cart list.


I think alot of people will be interested in doing this "McDonald do you want large fries with that" sell so any help in coding i think could benefit many site sellers.


Many thanks to those with extensive coding knowledge.




Also if you can help, could you state where i need to put the code.

Link to comment
Share on other sites

try something such as below:

<?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=9999') .'">' . tep_image('my_image.jpg') . '</a>'; ?>

where 9999 is the products_id of the product and my_image.jpg is the image fo the product you want to automatically add


Anything more than that is custom coding and you'll have to pay someone to do it for you (I don't believe there's a contrib for it)

Link to comment
Share on other sites


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

  • Create New...