I've got a custom page, where I would like to add a link to automatically add to cart just 1 quantity of a product in my catalogue.
I've search the web, I've found this piece of code:
<script type="text/javascript">
ajaxCart.add(ID_PRODUCT , ID_ATTRIBUTE , AJOUTAPARTIRDELAFICHEPRODUIT , ELEMENT , QUANTITY , WISHLIST);
ajaxCart.refresh();
</script>
but, the thing is I don't know how to place it, and how to change the attribute.
So, can someone post an example of how it can be done?
I'm on PS 1.6
Thank you.