Skip to main content

add multiple product to cart via url

More
9 years 3 months ago #273004 by kyratn
Hi,

1. Is it possible to add more then 1 product to cart via url? Tried to add &cid-XXX but what it does it adds last product but not all of them.

The url for 1 product looks like this: index.php?option=com_hikashop&ctrl=product&task=updatecart&quantity=1&checkout=1&cid-5098&Itemid=450

How it should be for more then 1 product?

2. www.hikashop.com/forum/discount-coupon/8...ith-coupon-code.html This topic talks about adding coupon via url. Is it possible now? How can this be done.

Thanks

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

More
9 years 3 months ago #273014 by Jerome
Hello,

The new cart system in HikaShop 3 allow to add several products with a single API call ; but there is no new "entry point" in a controller to provide that feature via an URL.
So you still need to use the legacy mode with " &item[20]=1&item[21]=1 " (where 20 and 21 are product id and 1 the quantity ).
And it will be the same for the coupon ; we work hard to improve the improve the core but we first need to keep a good working retro compatibility.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 3 months ago #273060 by kyratn
Hi,

Can you please clarify?

How the new link should look?

I am trying something like this but it does nothing: index.php?option=com_hikashop&ctrl=product&task=updatecart&checkout=1&Item[5098]=1&Item[5164]=1&Itemid=450


Does it work only if add to cart legacy is turned on? We do use new checkout and add to cart.

Thanks

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

More
9 years 3 months ago #273081 by nicolas
Hi,

The URL should be:
Code:
index.php?option=com_hikashop&ctrl=product&task=updatecart&checkout=1&data[5098]=1&data[5164]=1&Itemid=450

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

More
9 years 3 months ago #273122 by kyratn
Hi,

Are you sure it should work?

I have tried like this: www.mywebsite.com/index.php?option=com_h...cart&checkout=1&data [5098]=1&Itemid=450

Tried with 1 product but nothing happens. It just goes to home page and that's all.

What we trying to have is a link in acymailing email which we will send to users manually who have abandoned cart. So pressing on that link user should go directly to checkout with they products in cart. Later if it's worth it we think about integration which will do the job automatically as there is no such integration in hikashop as for now....

Thanks

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

More
9 years 3 months ago #273208 by nicolas
Hi,

Yes. I've just tested on my end with the URL
Code:
http://localhost/joomla36/index.php?option=com_hikashop&ctrl=product&task=updatecart&data[35]=1&add=1
where 35 is the id of my product and it works just fine.

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

More
9 years 3 months ago #273218 by kyratn
Hi,

It works. The &add=1 was missing....

Thank you

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

Time to create page: 0.168 seconds
Powered by Kunena Forum