[Skip to main content](#vessel-content)

#   Add multiple products in one click

##

- **[K-lol](/forum/user/35313-k-lol "View K-lol's Profile")**
- [![K-lol's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35313-k-lol "View K-lol's Profile") Topic Author
- [ Offline](/forum/user/35313-k-lol)

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 10 months ago [\#182684](#182684) by [K-lol](/forum/user/35313-k-lol "View K-lol's Profile")  *[Add multiple products in one click](/forum/31-development/873523-add-multiple-products-in-one-click#182684 "Hi,  I do not know if I'm in the right place ..  Is it possible to add multiple products with a single click?  Here is my code.  It works only with the last link  I also tested with this code that works on prestashop  Thank you for your answer")* was created by *[K-lol](/forum/user/35313-k-lol "View K-lol's Profile")*

Hi,

I do not know if I'm in the right place ..

Is it possible to add multiple products with a single click?

Here is my code.
Code:

&lt;a class="hikashop_html_add_to_cart_link" href="http://www.proeco.ch/ProEco/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=&lt;?php if (($nombre_douche &lt;= $nombre_robinet) OR ($nombre_douche &lt;= $nombre_robinet_cuisine)){ $nombre_pack = $nombre_douche; echo $nombre_douche; }else{ $nombre_pack = '0'; echo '0'; } ?&gt;&amp;checkout=1&amp;product_id=46,http://www.proeco.ch/ProEco/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=&lt;?php $cal_naxos = ($nombre_douche - $nombre_pack); if ($cal_naxos &lt;= '0'){ $cal_naxos_val = '0'; echo '0'; }else{ $cal_naxos_val = $cal_naxos; echo $cal_naxos;} ?&gt;&amp;checkout=1&amp;product_id=19,http://www.proeco.ch/ProEco/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=&lt;?php $cal_air45 = ($nombre_robinet - $nombre_pack); if ($cal_air45 &lt;= '0'){ $cal_air45_val= '0'; echo '0'; }else{ $cal_air45_val = $cal_air45; echo $cal_air45; } ?&gt;&amp;checkout=1&amp;product_id=10,http://www.proeco.ch/ProEco/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=&lt;?php $cal_air60 = ($nombre_robinet_cuisine - $nombre_pack); if ($cal_air60 &lt;= '0'){ $cal_air60_val = '0'; echo '0'; }else{ $cal_air60_val = $cal_air60; echo $cal_air60;}?&gt;&amp;checkout=1&amp;product_id=11" class="btn btn-primary btn-lg"&gt;Commander&lt;/a&gt;

It works only with the last link

I also tested with this code that works on prestashop
Code:

...&amp;quantity=1,3,2,5&amp;product_id=11,13,15,16

Thank you for your answer

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3MzUyMy1hZGQtbXVsdGlwbGUtcHJvZHVjdHMtaW4tb25lLWNsaWNrP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 10 months ago [\#182693](#182693) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add multiple products in one click](/forum/31-development/873523-add-multiple-products-in-one-click#182693 "Hi,  I do not know if I'm in the right place ..  Is it possible to add multiple products with a single click?  Here is my code.  It works only with the last link  I also tested with this code that works on prestashop  Thank you for your answer")*

Hi,

You need to do like this: Code:

&lt;a class="hikashop_html_add_to_cart_link" href="http://www.proeco.ch/ProEco/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;data[XXX][cart_product_quantity]=YYY&amp;data[AAA][cart_product_quantity]=BBB&amp;checkout=1" class="btn btn-primary btn-lg"&gt;Commander&lt;/a&gt;

where XXX is the id of a product and YYY its corresponding quantity. Same for AAA and BBB and you can repeat these parameters for other products.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg3MzUyMy1hZGQtbXVsdGlwbGUtcHJvZHVjdHMtaW4tb25lLWNsaWNrP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.117 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
