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

#   Affichage stock produit

##

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

Less More

- Posts: 9
- Thank you received: 1
-
-

2 years 11 months ago [\#357485](#357485) by [SNAP-GT](/forum/user/57387-snap-gt "View SNAP-GT's Profile")  *[Affichage stock produit](/forum/26-product-category-display/907441-affichage-stock-produit#357485 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2.12 -- Browser(s) name and version -- : 120.0.1  Bonjour,  Pour l'affichage des produits en stock, j'aimerais ne pas afficher la quantité mais :  &#42; une pastille de couleur : 0: rouge, 1: orange, &gt;1 vert  &#42; un texte différent: 0: rupture de stock 1: dernière pièce &gt;1: en stock  Est-ce possible de faire cela? Doit-on modifier le PHP? Au cas où cela influerait, je travaille avec des articles avec et sans variantes  Merci d'avance pour votre aide.  Stephan")* was created by *[SNAP-GT](/forum/user/57387-snap-gt "View SNAP-GT's Profile")*

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.1
-- PHP version -- : 8.2.12
-- Browser(s) name and version -- : 120.0.1

Bonjour,

Pour l'affichage des produits en stock, j'aimerais ne pas afficher la quantité mais :

- une pastille de couleur : 0: rouge, 1: orange, &gt;1 vert
- un texte différent: 0: rupture de stock 1: dernière pièce &gt;1: en stock

Est-ce possible de faire cela? Doit-on modifier le PHP? Au cas où cela influerait, je travaille avec des articles avec et sans variantes

Merci d'avance pour votre aide.

Stephan

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDc0NDEtYWZmaWNoYWdlLXN0b2NrLXByb2R1aXQ/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: 86587
- Thank you received: 14325
-
-

2 years 11 months ago -  2 years 11 months ago [\#357494](#357494) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Affichage stock produit](/forum/26-product-category-display/907441-affichage-stock-produit#357494 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2.12 -- Browser(s) name and version -- : 120.0.1  Bonjour,  Pour l'affichage des produits en stock, j'aimerais ne pas afficher la quantité mais :  &#42; une pastille de couleur : 0: rouge, 1: orange, &gt;1 vert  &#42; un texte différent: 0: rupture de stock 1: dernière pièce &gt;1: en stock  Est-ce possible de faire cela? Doit-on modifier le PHP? Au cas où cela influerait, je travaille avec des articles avec et sans variantes  Merci d'avance pour votre aide.  Stephan")*

Bonjour,

C'est possible avec des overrides de traduction.
Vous avez les trois clés de traduction NO_STOCK (stock à 0) X_ITEM_IN_STOCK (stock à 1) et X_ITEMS_IN_STOCK (stock supérieur à 1) que vous pouvez modifier.
Par exemple, au lieu de : Code:

NO_STOCK="Pas de stock"

Vous pourriez avoir: Code:

NO_STOCK="&lt;img src='https://mywebsite.com/myredicon.jpg' /&gt; rupture de stock"

Voici la documentation sur les overrides de traduction:
[ www.hikashop.com/download/languages.html#modify](https://www.hikashop.com/download/languages.html#modify)

Last edit: 2 years 11 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [SNAP-GT](/forum/user/57387-snap-gt "View SNAP-GT's Profile")

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

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

Less More

- Posts: 9
- Thank you received: 1
-
-

2 years 11 months ago [\#357504](#357504) by [SNAP-GT](/forum/user/57387-snap-gt "View SNAP-GT's Profile")  Replied by *[SNAP-GT](/forum/user/57387-snap-gt "View SNAP-GT's Profile")* on topic *[Affichage stock produit](/forum/26-product-category-display/907441-affichage-stock-produit#357504 "-- HikaShop version -- : 5.0.2 -- Joomla version -- : 5.0.1 -- PHP version -- : 8.2.12 -- Browser(s) name and version -- : 120.0.1  Bonjour,  Pour l'affichage des produits en stock, j'aimerais ne pas afficher la quantité mais :  &#42; une pastille de couleur : 0: rouge, 1: orange, &gt;1 vert  &#42; un texte différent: 0: rupture de stock 1: dernière pièce &gt;1: en stock  Est-ce possible de faire cela? Doit-on modifier le PHP? Au cas où cela influerait, je travaille avec des articles avec et sans variantes  Merci d'avance pour votre aide.  Stephan")*

Merci Nicolas. J'ai changé d'avis en partant de votre idée. J''ai gardé du texte mais en changeant la couleur de celui-ci

[ ![Capturedcran2023-12-13145134.jpg](/forum/attachment/58411) ](/forum/attachment/58411 "...2-13145134.jpg")

[ ![Capturedcran2023-12-13145216.jpg](/forum/attachment/58409) ](/forum/attachment/58409 "...2-13145216.jpg")

[ ![Capturedcran2023-12-13145157.jpg](/forum/attachment/58410) ](/forum/attachment/58410 "...2-13145157.jpg")

Est-ce que cette syntaxe ne risque pas de me créer des problèmes sur d'autres explorateurs ou sur tablette/téléphone ?
[ ![Capturedcran2023-12-13145528.jpg](/forum/attachment/58412) ](/forum/attachment/58412 "...2-13145528.jpg")

Merci pour votre retour.

Stephan

- [ ![Capturedcran2023-12-13145216.jpg](/forum/attachment/58409) ](/forum/attachment/58409 "...2-13145216.jpg") [ ](/forum/attachment/58409?download=1 "...2-13145216.jpg")
- [ ![Capturedcran2023-12-13145157.jpg](/forum/attachment/58410) ](/forum/attachment/58410 "...2-13145157.jpg") [ ](/forum/attachment/58410?download=1 "...2-13145157.jpg")
- [ ![Capturedcran2023-12-13145134.jpg](/forum/attachment/58411) ](/forum/attachment/58411 "...2-13145134.jpg") [ ](/forum/attachment/58411?download=1 "...2-13145134.jpg")
- [ ![Capturedcran2023-12-13145528.jpg](/forum/attachment/58412) ](/forum/attachment/58412 "...2-13145528.jpg") [ ](/forum/attachment/58412?download=1 "...2-13145528.jpg")

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

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

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