Guest Posted November 10, 2008 Share Posted November 10, 2008 Hi, 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. BUT 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 More sharing options...
Guest Posted November 11, 2008 Share Posted November 11, 2008 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 More sharing options...
Enzio_Ferrari Posted November 11, 2008 Share Posted November 11, 2008 Still learning about OsC myself, but I think there's something about "Customers who bought x also bought y" hidden somewhere in the coding. When all else fails ... RTFI ... then ... GIVE UP! Link to comment Share on other sites More sharing options...
Guest Posted November 11, 2008 Share Posted November 11, 2008 Thanks tom i will give that a go. :) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.