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

#   Caractéristique désactivé s'affiche quand même

##

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

Less More

- Posts: 75
- Thank you received: 2
-
-

12 years 2 weeks ago [\#177636](#177636) by [AlainR](/forum/user/34800-alainr "View AlainR's Profile")  *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#177636 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")* was created by *[AlainR](/forum/user/34800-alainr "View AlainR's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.27
-- Browser(s) name and version -- : Firefox 33

Bonjour.

Je découvre votre produit et notamment les caractéristiques.
J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?

Comme vu ici ([ www.hikashop.com/forum/5-support-en-fran...-visible.html#135009](https://www.hikashop.com/forum/5-support-en-francais-french-support-/863938-variante-depubliee-reste-visible.html#135009)), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.

Merci d'avance pour votre réponse.
Cordialement.

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

12 years 2 weeks ago [\#177653](#177653) 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 *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#177653 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

Bonjour,

> Donc la solution est :
> \- soit de passer à non l'affichage des produits en rupture de stock
> \- soit d'attribuer des droits d'accès administrateur aux variantes dépubliées que l'on souhaite cacher

La solution sera donc de de modifier les droits d'accès (Uniquement disponible via la version business d'Hikashop) de vos variantes.

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

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

Less More

- Posts: 75
- Thank you received: 2
-
-

12 years 1 week ago [\#177827](#177827) by [AlainR](/forum/user/34800-alainr "View AlainR's Profile")  Replied by *[AlainR](/forum/user/34800-alainr "View AlainR's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#177827 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

Bonjour.

N'est-il pas plutôt possible de distinguer :
1. la dés-activation d'une variante
2. d'un stock à 0 ?

Pouvez-vous me dire dans quel fichier se gère cet affichage en front-end ?
ainsi, je pourrais jouer sur la condition, non pas de l'affichage du stock à 0, mais de l'affcihage ou non selon que la variante est activée ou non.

D'avance merci pour la réponse.
Cordialement.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODcyNzAyLWNhcmFjdGVyaXN0aXF1ZS1kZXNhY3RpdmUtcy1hZmZpY2hlLXF1YW5kLW1lbWU/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: 86556
- Thank you received: 14305
-
-

12 years 1 week ago [\#177835](#177835) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#177835 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

Bonjour,

Pour le système une variante avec un stock à 0 et une variante dépubliée est la même chose.
Elle sera affichée ou non en fonction de l'option "afficher les produits en rupture de stock" de la configuration HikaShop.

Donc la solution proposée sur l'autre sujet et par Mohamed est une possibilité dans votre cas. Sinon, il faut taper dans le code du fichier administrator/components/com_hikashop/types/characteristic.php je pense, mais là c'est à vous de voir de votre coté...

The following user(s) said Thank You: [AlainR](/forum/user/34800-alainr "View AlainR's Profile")

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

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

Less More

- Posts: 75
- Thank you received: 2
-
-

12 years 1 week ago -  12 years 1 week ago [\#178401](#178401) by [AlainR](/forum/user/34800-alainr "View AlainR's Profile")  Replied by *[AlainR](/forum/user/34800-alainr "View AlainR's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#178401 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

> nicolas wrote: il faut taper dans le code du fichier administrator/components/com\_hikashop/types/characteristic.php

Bonjour.

Je reviens poster une solution qui fonctionne chez moi :
j'ai commenté (**//**) les lignes 179 et 202, ce qui donne : Code:

foreach($characteristic-&gt;values as $k =&gt; $value){ // if(!$config-&gt;get('show_out_of_stock',1)){ $hasQuantity = false; foreach($element-&gt;variants as $variant){ foreach($variant-&gt;characteristics as $variantCharacteristic){ if($variantCharacteristic-&gt;characteristic_id==$value-&gt;characteristic_id){ if($variant-&gt;product_quantity != 0){ $hasQuantity = true; }elseif( $element-&gt;product_id==$variant-&gt;product_id &amp;&amp; !$switch_done){ $id = 'hikashop_product_characteristic_'.$characteristic-&gt;characteristic_id; $js = " window.hikashop.ready( function() {hikashopUpdateVariant(document.getElementById('".$id."'));});"; if (!HIKASHOP_PHP5) { $doc =&amp; JFactory::getDocument(); }else{ $doc = JFactory::getDocument(); } $doc-&gt;addScriptDeclaration("\n&lt;!--\n".$js."\n//--&gt;\n"); $switch_done = true; } } } } if(!$hasQuantity) continue; // } $values[$k]=$value-&gt;characteristic_value;

Alors, c'est vrai que l'option de ne pas afficher les produits dont le stock est à 0 ne fonctionne plus, mais comme c'est option est activé chez moi, ça ne me pose pas problème.

Si quelqu'un a l'une ou l'autre remarque là-dessus, je suis preneur.
Cordialement.

Last edit: 12 years 1 week ago by [AlainR](/forum/user/34800-alainr "View AlainR's Profile").

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

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

Less More

- Posts: 75
- Thank you received: 2
-
-

12 years 1 week ago -  12 years 1 week ago [\#178402](#178402) by [AlainR](/forum/user/34800-alainr "View AlainR's Profile")  Replied by *[AlainR](/forum/user/34800-alainr "View AlainR's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#178402 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

> AlainR wrote: Alors, c'est vrai que l'option de ne pas afficher les produits dont le stock est à 0 ne fonctionne plus

Oups! si, ça fonctionne... je n'avais pas testé avant. Alors disons que je n'ai pas encore vu d'incidence depuis que j'ai mis cela en place.

En tous cas : merci pour l'aide!! c'est extra.

Last edit: 12 years 1 week ago by [AlainR](/forum/user/34800-alainr "View AlainR's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

12 years 1 week ago [\#178405](#178405) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#178405 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

Bonjour,

Merci pour votre contribution.
J'ai créé un ticket dans notre système de gestion de projet afin de faire des tests plus approfondis et de voir s'il pourrait y avoir une inclusion dans HikaShop (si effectivement il n'y a pas d'incidence).

Cordialement,

---

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

The following user(s) said Thank You: [AlainR](/forum/user/34800-alainr "View AlainR's Profile")

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

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

Less More

- Posts: 75
- Thank you received: 2
-
-

12 years 1 week ago -  12 years 1 week ago [\#178493](#178493) by [AlainR](/forum/user/34800-alainr "View AlainR's Profile")  Replied by *[AlainR](/forum/user/34800-alainr "View AlainR's Profile")* on topic *[Caractéristique désactivé s'affiche quand même](/forum/5-support-en-francais-french-support-/872702-caracteristique-desactive-saffiche-quand-meme#178493 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.27 -- Browser(s) name and version -- : Firefox 33  Bonjour.  Je découvre votre produit et notamment les caractéristiques. J'ai désactivé 1 des caractéristiques d'un produit, mais celle-ci s'affiche quand même. Comment palier à cela ?  Comme vu ici (  www.hikashop.com/forum/5-support-en-fran...-visible.html#135009 ), je souhaite laisser visible les ruptures de stock, mais juste retirer temporairement cette option.  Merci d'avance pour votre réponse. Cordialement.")*

Bonjour et merci de la prise en compte.

La modification apportée fonctionne pour les (vues) "Méthode de sélection des caractéristiques" :

- radio
- liste déroulante
- tableau

mais pas pour la vue **Liste** (que je choisis dans la Configuration -&gt; Principale -&gt; Produits -&gt; Méthode de sélection des caractéristiques)

Cordialement.

Last edit: 12 years 1 week ago by [AlainR](/forum/user/34800-alainr "View AlainR's Profile").

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

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