-
Categories
-
Tags
add to cart attributes authorize.net awards category list Code code formatting CSS custom attributes debug debugging design featured sites Free Theme great web design articles HTML jQuery jQuery Tabs magento magento development magento product attributes News payment methods php Post_ Premium Wordpress Theme product grid product list programming recognition sessions upsell products Web Design Web Design Resources web development wordpress Wordpress Theme -
archives
Magento Upsell List Add To Cart
2010
Dec 14th
published in
By default, Magento’s upsell products do not display an add to cart button, they only allow you to click through to the product. In some instances, because the point of an upsell is to move the user away from the product they are looking at and to a better or more expensive product; we want them to navigate away from what they are currently viewing or even better, to add the upsell product to cart.
To add a Add To Cart button to the upsell products in Enterprise Edition
Locate the file: /app/design/frontend/enterprise/yourtheme/template/targetrule/catalog/product/list/upsell.phtml and add in this code:
// Add to Cart Button <button type="button" class="form-button add-to-cart" onclick="window.location='<?php echo $this->getAddToCartUrl($_item) ?>';"><span><?php echo $this->__('buy') ?></span></button>
To add a Add To Cart button to the upsell products in Community Edition
Locate the file: /app/design/frontend/enterprise/yourtheme/template/catalog/product/list/upsell.phtml and add in this code:
// Add to Cart Button <button type="button" class="form-button add-to-cart" onclick="window.location='<?php echo $this->getAddToCartUrl($_link) ?>';"><span><?php echo $this->__('buy') ?></span></button>
Feel free to add the button where ever you need inside this file.
This entry was posted in Magento, Web Development and tagged add to cart, magento, upsell products, web development. Bookmark the permalink.
comments
0