0

I created an "add to cart button" for a product at below location.

app/design/frontend/rwd/default/template/catalog/product/view.phtml

Now I want while clicking on the button, the product, should go into "cart". How can I do it? I am very new in Magento developer.So, please explain step by step, and also suggest me a better website and book for developement.

1

Use this code in

app/design/frontend/rwd/default/template/catalog/product/view.phtml.

<?php $cart_url = Mage::helper('checkout/cart')->getAddUrl($_product);?>
<a href="<?php echo $cart_url;?>" >Add to cart</a>
0

you should look into addtocart.phtml file in:

default/template/catalog/product/view/addtocart.phtml

This file has the Add to cart button.

0

i created "add to cart" button in below images /var/www/html/magento/app/design/frontend/rwd/default/template/catalog/product/list.phtml now i want while i clicking , product should add into "cart" how i can do please guide me step be step enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.