Skip to main content

link to auto add a product to basket

12 years 10 months ago - 12 years 10 months ago #138934 by daveturner101
hi,

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
Last edit: 12 years 10 months ago by daveturner101. Reason: opened again

Please Log in or Create an account to join the conversation.

12 years 10 months ago #138944 by nicolas
Hi,

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
The following user(s) said Thank You: daveturner101

Please Log in or Create an account to join the conversation.

12 years 10 months ago - 12 years 10 months ago #138956 by daveturner101
brilliant. thanks.

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?
Last edit: 12 years 10 months ago by daveturner101.

Please Log in or Create an account to join the conversation.

12 years 10 months ago #138959 by nicolas
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.
The following user(s) said Thank You: daveturner101

Please Log in or Create an account to join the conversation.

12 years 10 months ago #138964 by daveturner101
that's great, easy enough.

thanks a lot.

Please Log in or Create an account to join the conversation.

12 years 10 months ago #139668 by daveturner101

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.

12 years 10 months ago #139683 by nicolas
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.
The following user(s) said Thank You: daveturner101

Please Log in or Create an account to join the conversation.

12 years 10 months ago #139705 by daveturner101

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.

12 years 10 months ago #139723 by nicolas
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.
The following user(s) said Thank You: daveturner101

Please Log in or Create an account to join the conversation.

12 years 10 months ago #139739 by daveturner101

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.

Time to create page: 0.080 seconds
Powered by Kunena Forum