Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Buy Now button with product attributes pre-selected


rafraf

Recommended Posts

Posted

Is there a way to create a Special Buy Now Button (It could be for a banner usage) in order to directly add a product to the cart with pre-selected attributes?

Posted

Solution: The following script will add to shopping cart product_id=96 with an attribute pre-selected. In order to test it ,change the values for product attributes and product id to an existing ones.

 

<form name="cart_add" action='<?

$link_carrito= "product_info.php?action=add_product&products_id=96";

echo tep_href_link($link_carrito,$osCsid);?>' method="POST">

 

<input type="hidden" name="id[36]" value="69">

<input type="hidden" name="products_id" value="96">

<a href="java script:document.cart_add.submit();" target="_self" >Add to cart</a>

</form>

Archived

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

×
×
  • Create New...