Magento 1.8 add to url via url query

Would like to add a product via an url like (as described in this Mage article):

<?
echo "
<form action='/checkout/cart/add/product/" . $id . "/form_key/'>
<input type='submit' value='In Cart' />
</form>";
?>

This doesn’t work in Magento 1.8 unfortunately, because of the new form_key system. You can provide an hidden form_key field. Unfortunately this didn’t work in my case. Best way is to omit the form_key security for add to cart querystrings. This can be solved with this rewrite plugin:

https://github.com/deivisonarthur/Inovarti_FixAddToCartMage18/

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *