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

#   Ajout d'un produit gratuit dans le panier

##

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

Less More

- Posts: 23
- Thank you received: 0
-
-

10 years 5 months ago [\#241137](#241137) by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")  *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#241137 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")* was created by *[manubelin](/forum/user/36839-manubelin "View manubelin's Profile")*

Bonjour,
je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire
merci

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

10 years 5 months ago [\#241173](#241173) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#241173 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour,
Il n'y a pour l'instant aucune option permettant directement cela (possible pour les coupons mais pas pour les produits), la solution sera donc de directement développer un plugin basé sur le trigger "onAfterCartUpdate" afin d'ajouter le produit au panier si la somme nécessaire est atteinte.
[ www.hikashop.com/support/documentation/i...ml#onAfterCartUpdate](http://www.hikashop.com/support/documentation/integrated-documentation/24-hikashop/developer-area/62-hikashop-developer-documentation.html#onAfterCartUpdate)

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

10 years 5 months ago [\#241879](#241879) by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")  Replied by *[manubelin](/forum/user/36839-manubelin "View manubelin's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#241879 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

bonjour, est il possible dans ce cas d'afficher le nom du coupon (le code) à la place du montant dans le panier !
cette option serait intéressante !

merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84ODQ3MTktYWpvdXQtZHVuLXByb2R1aXQtZ3JhdHVpdC1kYW5zLWxlLXBhbmllcj90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 5 months ago [\#241884](#241884) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#241884 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour,

Oui, c'est possible.
Editez le fichier "cart" de la vue "checkout" via le menu Affichage&gt;Vues et changez le code: Code:

&lt;?php if(bccomp($taxes,0,5)==0 &#124;&#124; !$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;coupon-&gt;discount_value_without_tax*-1,@$this-&gt;coupon-&gt;discount_currency_id); }else{ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;coupon-&gt;discount_value*-1,@$this-&gt;coupon-&gt;discount_currency_id); } ?&gt;

par: Code:

&lt;?php echo $this-&gt;coupon-&gt;discount_code; ?&gt;

The following user(s) said Thank You: [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

10 years 5 months ago [\#241976](#241976) by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")  Replied by *[manubelin](/forum/user/36839-manubelin "View manubelin's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#241976 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Super, ça marche nickel

Merci Nicolas ![:)](/media/kunena/emoticons/3.png ":)")

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

10 years 5 months ago [\#242691](#242691) by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")  Replied by *[manubelin](/forum/user/36839-manubelin "View manubelin's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#242691 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour,

je reviens sur ce post qui fonctionne sur le principe,
sauf que en faisant des tests plus poussés, je viens de m'apercevoir de quelques soucis.

j'ai crée 2 coupons, le premier offre un produit à partir de 300 € d'achat et le deuxième à partir de 600 €.

dans le processus normal de commande ça fonctionne ! mais si je modifie mon panier depuis le processus de commande et que je repasse en dessous du seuil de 300€, le produit gratuit reste dans le panier !
et ensuite si je repasse au dessus de 300, il me met le coupon pour le seuil de 600€, alors que ma commande n'atteint pas ce seuil !

faut-il créer un autre coupon à zéro ou un truc comme ça ?

Merci

- [ ![Administration&#95;-&#95;Rductions.jpg](/forum/attachment/32002) ](/forum/attachment/32002 "...&#95;Rductions.jpg") [ ](/forum/attachment/32002?download=1 "...&#95;Rductions.jpg")

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

10 years 5 months ago -  10 years 5 months ago [\#242701](#242701) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#242701 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour,

Pouvez vous fournir un screenshot de la back end configuration de votre coupon ?
Je me demande si vous avez bien allumer l'option "**Auto load in cart**" if possible" sur "**Yes**" ?

En attendant votre retour.

Cordialement

Last edit: 10 years 5 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

10 years 5 months ago -  10 years 5 months ago [\#242733](#242733) by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile")  Replied by *[manubelin](/forum/user/36839-manubelin "View manubelin's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#242733 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour Philip,

il y a une capture dans le post précédent, oui le "Auto load in cart" if possible" est sur "Yes.

une fois la commande modifié depuis le panier, il se mélange les pinceaux !

Last edit: 10 years 5 months ago by [manubelin](/forum/user/36839-manubelin "View manubelin's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84ODQ3MTktYWpvdXQtZHVuLXByb2R1aXQtZ3JhdHVpdC1kYW5zLWxlLXBhbmllcj90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 5 months ago [\#242736](#242736) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Ajout d'un produit gratuit dans le panier](/forum/46-discount-coupon/884719-ajout-dun-produit-gratuit-dans-le-panier#242736 "Bonjour, je voudrai qu'a partir d'une certaine somme un produit gratuit s'ajoute au panier, est ce possible avec les coupons, j'ai pas compris comment faire merci")*

Bonjour,

Quand plusieurs coupons autochargés sont valides, le système prend automatiquement celui avec le plus gros "minimum de commande". Donc cela devrait fonctionner.
Pouvez fournir un lien vers un produit sur votre magasin et une captures des options des différents coupons auto chargés pour que nous puissions voir le soucis plus en détails ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ2LWRpc2NvdW50LWNvdXBvbi84ODQ3MTktYWpvdXQtZHVuLXByb2R1aXQtZ3JhdHVpdC1kYW5zLWxlLXBhbmllcj90bXBsPW1hcmtkb3du) 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.130 seconds

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