- Posts: 72
- Thank you received: 0
link to auto add a product to basket
- daveturner101
-
Topic Author
- Offline
is it possible for a customer to click a specific product link in an email and be directed straight to our site checkout page with the product automatically added to the basket?
many thanks
Please Log in or Create an account to join the conversation.
Yes, that's possible. Simply copy/paste the HTML add to cart button of the product in your email and that will do exactly that:
www.hikashop.com/support/documentation/i...ct-form.html#toolbar
Please Log in or Create an account to join the conversation.
- daveturner101
-
Topic Author
- Offline
- Posts: 72
- Thank you received: 0
what if the product has an option attached to it? can the link url be edited to automatically add one of the available options to the product?
Please Log in or Create an account to join the conversation.
&hikashop_product_option[]=XXX
where XXX is the id of the variant/product of the option.
Please Log in or Create an account to join the conversation.
- daveturner101
-
Topic Author
- Offline
- Posts: 72
- Thank you received: 0
thanks a lot.
Please Log in or Create an account to join the conversation.
- daveturner101
-
Topic Author
- Offline
- Posts: 72
- Thank you received: 0
nicolas wrote: Yes, but that's more complex. You need to add an additional parameter for it in the URL like that:
&hikashop_product_option[]=XXX
where XXX is the id of the variant/product of the option.
hi again.
what if im not using an 'option' but rather a 'characteristic'?
the characteristic group has an id of '8' and the characteristic that i want to add has an 'id' of '6'
i've tried the following:
/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=155&hikashop_product_characteristic[8]=6
Please Log in or Create an account to join the conversation.
In that case, it's even easier. Simply set your variant in the "product_id" parameter of the URL instead of the id of the main product. There is no additional parameter to add.
Please Log in or Create an account to join the conversation.
- daveturner101
-
Topic Author
- Offline
- Posts: 72
- Thank you received: 0
nicolas wrote: Hi,
In that case, it's even easier. Simply set your variant in the "product_id" parameter of the URL instead of the id of the main product. There is no additional parameter to add.
i've tried that but i already have products with the id numbers 6 and 8 and it just adds those products to the basket rather than the product characteristic

/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=8
and
/index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&product_id=6
are already products in their own right
Please Log in or Create an account to join the conversation.
So that means that your variant is not 6 or 8 but something else. Click on the "manage variants" button of your product and you'll get the listing of variants of the product with the id of each variant on the right of the listing.
Please Log in or Create an account to join the conversation.
- daveturner101
-
Topic Author
- Offline
- Posts: 72
- Thank you received: 0
nicolas wrote: No. You can't have a variant with the same id as a product since they are stored in the same table each one with a unique id.
So that means that your variant is not 6 or 8 but something else. Click on the "manage variants" button of your product and you'll get the listing of variants of the product with the id of each variant on the right of the listing.
aahh i see. it works fine now. thanks
Please Log in or Create an account to join the conversation.