0

Adding a Product to the Cart via Querystring using SKU

I tried above code at localhost but its not working in magento 1.9 as well magento 1.7

can anyone help me to resolve this issue in magento 1.9

I tried everything that you mentioned in post but could not success.

copied all three files and add one file for modules in app/etc/modules/Csr_Chekout.xml to for active extension but its not working

1 Answer 1

0

Magento 1.9 has a concept of formkey to cart url.

domain/checkout/cart/add?sku=ABC&form_key=Mage::getSingleton('core/session')->getFormKey() 

This functionality has been add from magento 1.8.WithOut form key you can not cart any product.

1
  • Thank you for this! been looking for this solution on and off for a while as the link in OP I used to always see and could never get working. Quick question, any way to take the autodirect to cart page and possibly leave it as staying on the same page after adding to cart?? Thanks in any case!
    – ne0nlight
    Commented Jan 18, 2017 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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