Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Do I add 'Add to Cart' button manually


marketedsites

Recommended Posts

Posted

I am manually adding an 'add to cart' button on my page for a certain product. I can't figure out how to make it work. This is what I have so far, but no worky. The product I'd like to add is product_id 31

 

echo tep_draw_hidden_field('products_id', product_id=31, tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

Posted

I also tried

 

echo tep_draw_hidden_field('products_id', $shopping_cart['products_id=31']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

 

 

Obviously, I don't know PHP, but I'm trying. Any help would be greatly appreciated!

Posted

Hi,

 

You can probably just hard code it like ..

 

<a href="index.php?action=buy_now&products_id=31">Click to Buy</a>

Posted
Hi,

 

You can probably just hard code it like ..

 

<a href="index.php?action=buy_now&products_id=31">Click to Buy</a>

 

Thanks L!mit, that definitely did the job!

Archived

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

×
×
  • Create New...