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

#   Bug, Quantités retournent a illimité

##

- **[nibe](/forum/user/5252-nibe "View nibe's Profile")**
- [![nibe's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5252.jpg)](/forum/user/5252-nibe "View nibe's Profile") Topic Author
- [ Offline](/forum/user/5252-nibe)

Less More

- Posts: 40
- Thank you received: 0
-
- [](http://www.nibe.ca)
-

14 years 7 months ago -  14 years 7 months ago [\#48060](#48060) by [nibe](/forum/user/5252-nibe "View nibe's Profile")  *[Bug, Quantités retournent a illimité](/forum/5-support-en-francais-french-support-/48060-bug-quantites-retournent-a-illimite#48060 "J'ai un problème généré par une situation spéciale. Lorsqu'un produit devient expiré (quantité:0) et que le même produit est ajouté manuellement (en backend), la quantité change pour...")* was created by *[nibe](/forum/user/5252-nibe "View nibe's Profile")*

J'ai un problème généré par une situation spéciale. Lorsqu'un produit devient expiré (quantité:0) et que le même produit est ajouté manuellement (en backend), la quantité change pour illimité. La situation se produit également lorsqu'on convertit une commande d'annulée à créée (backend). Est-ce qu'il y a quelque chose à faire pour régler ce bug car les clients peuvent continuer d'acheter un produit qui n'est plus en stock?

Last edit: 14 years 7 months ago by [nibe](/forum/user/5252-nibe "View nibe's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDgwNjAtYnVnLXF1YW50aXRlcy1yZXRvdXJuZW50LWEtaWxsaW1pdGU/dG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

14 years 7 months ago [\#48108](#48108) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Bug, Quantités retournent a illimité](/forum/5-support-en-francais-french-support-/48060-bug-quantites-retournent-a-illimite#48108 "J'ai un problème généré par une situation spéciale. Lorsqu'un produit devient expiré (quantité:0) et que le même produit est ajouté manuellement (en backend), la quantité change pour...")*

Changez la ligne:
$query = 'UPDATE '.hikashop_table('product').' SET product_quantity = product_quantity - '.(int)$k.' WHERE product_id IN ('.implode(',',$update).') AND product_quantity &gt; -1';

en:
$query = 'UPDATE '.hikashop_table('product').' SET product_quantity = product_quantity - '.(int)$k.' WHERE product_id IN ('.implode(',',$update).') AND product_quantity &gt; 0';

dans le fichier administrator/components/com_hikashop/classes/order_product.php et cela devrait corriger le problème.

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

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