I used to use Shopify and the permalink to fill a cart was something like: http://domainname.myshopify.com/cart/370374:1,377854:1,37067790:1

Is there a similar way to do this with Magento? So far I've tried:


But they don't appear to work.

1 Answer 1


in this https://domainname.com/checkout/cart/add?product=99750&qty=1 you are missing form_key parameter

It will look likes, https://domainname.com/checkout/cart/add?product=99750&qty=1&form_key=crtH4Ol3DYNeSFr5

form_key is dynamically generated key, you can get it as below and pass it to url

$form_key = Mage::getSingleton('core/session')->getFormKey();

Pass $form_key value while building url

$url = "https://domainname.com/checkout/cart/add?product=99750&qty=1&form_key=".$form_key;

Use above $url in your action call

  • Hi, thanks for your reply. Is there a way to find the form key without being logged into the site, as the site is not mine?
    – Confused
    Commented Jun 19, 2017 at 6: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.