On the form in the product page ( found in /template/catalog/product/view.phtml
) there is action="<?php echo $this->getSubmitUrl($_product) ?>"
, which creates a url to add a product to the cart with the specified quantity.
However, when trying to use this to add products to the cart from the category page, the function does not return anything. What is the Mage path to use the function? For example, Mage::getModel('catalog/product')->load($relatedProductId);
. What is the correct way to call getSubmitUrl()
from outside the product page?
read this post, it could be helpfull
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.