- 3
Hi,
Wish to add a new custom button on simple/grouped product template that should work like 'Add to Cart' button. Current 'Add to Cart' button opens small Ajax Cart window with new product added to it. However, I cannot get this Ajax Cart feature to work on new button.
I have added below html just below Add to Cart code in template file(\Presentation\Nop.Web\Themes\Native\Views\Product\ProductTemplate.Simple.cshtml):
<input type="button" id="add-to-cart-button-custom" class="button-1 add-to-cart-button" value="Add Custom Product To Cart" onclick="AjaxCart.addproducttocart_details('/addproducttocart/details/11193/1', '#product-details-form');; return false;" />
Can someone please help?
Wish to add a new custom button on simple/grouped product template that should work like 'Add to Cart' button. Current 'Add to Cart' button opens small Ajax Cart window with new product added to it. However, I cannot get this Ajax Cart feature to work on new button.
I have added below html just below Add to Cart code in template file(\Presentation\Nop.Web\Themes\Native\Views\Product\ProductTemplate.Simple.cshtml):
<input type="button" id="add-to-cart-button-custom" class="button-1 add-to-cart-button" value="Add Custom Product To Cart" onclick="AjaxCart.addproducttocart_details('/addproducttocart/details/11193/1', '#product-details-form');; return false;" />
Can someone please help?