Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

linking to shopping cart


Recommended Posts

Hello, I am new to oscommerce so any help is appreciated. I have a website, www.blanketsandbags.com, that I have created using the sts template system. If you go to my site and click on blankets you will get to my blankets page. I want the user to be able to order a blanket from that page by clicking on the ADD TO CART button underneath the picture. I do not want to go to a separate products info page where the can add to the cart, I want them to add to the cart right there on the blankets page. I don't know the hyperlink code for the ADD TO CART button. my cPath for my blankets category is 21 and my products_id for the first blanket on that page is 111. What would the hyperlink code look like for the button???? <a href="???"><img src="addtocart.gif"> </a> I have been searching for an answer and a couple people have indicated it can be done, but I haven't been able to figure out how. HELP!!!

Link to comment
Share on other sites

your link should look something like

<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a>


you are not passing the product id so it will not add.


greetz john

Link to comment
Share on other sites


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

  • Create New...