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

#   smart search ne pas indexer quantity = 0

##

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago -  2 years 3 months ago [\#354557](#354557) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354557 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

-- HikaShop version -- : 4.7.5

Bonjour

le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive
comment faire pour ne pas indexer les produits a quantité 0 ?

il y a sur le site 300 produits mais 3000 en archive

merci

Last edit: 2 years 3 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

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

3 years 3 months ago [\#354575](#354575) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354575 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

Bonjour,

Le plugin se base sur l'option "Display out of stock products" de la configuration pour fournir le "state" du produit au système de smart search de Joomla:
[ i.imgur.com/z2pTZE9.png](https://i.imgur.com/z2pTZE9.png)
Donc normalement, si cette option est désactivée, alors les produits n'apparaitront pas sur le frontend, et pas dans les résultats de recherche, mais si cette option est activée, alors ils apparaitront sur le frontend et dans les résultats de recherche.

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago -  3 years 3 months ago [\#354577](#354577) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354577 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

show_out_of_stock = 0 dans la table config
et pourtant ca ramène tous les quantity = 0, les produits sont publiés pour pouvoir afficher les archives sur le site mais pas chercher dans les archives

une autre raison possible ?

merci

Last edit: 3 years 3 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

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

3 years 3 months ago [\#354580](#354580) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354580 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

Ah, je sais.
La modification que je vous ai montré est dans le code de notre coté mais pas dans la 4.7.5. Il sera dans la prochaine version.
En attendant la prochaine version, vous pouvez juste changer la ligne: Code:

$query-&gt;select('a.product_published AS state, c.category_published AS cat_state');

en: Code:

$query-&gt;select('(CASE a.product_quantity WHEN 0 THEN 0 ELSE a.product_published END) AS state, c.category_published AS cat_state');

dans plugins/finder/hikashop/hikashop.php

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

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago -  3 years 3 months ago [\#354584](#354584) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354584 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

ligne 331
Code:

//$query-&gt;select('a.product_published AS state, c.category_published AS cat_state'); $query-&gt;select('(CASE a.product_quantity WHEN 0 THEN 0 ELSE a.product_published END) AS state, c.category_published AS cat_state');

ca ne marche pas, c'est pareil , ca me retourne des quantités 0 qui sont publiées

Last edit: 3 years 3 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

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

3 years 3 months ago [\#354587](#354587) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354587 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

Bonjour,

Avez-vous réindexé les produits dans le composant smart search après la modification ?
Car je ne vois pas d'autre raison qui ferait que cela ne fonctionne pas.

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago -  3 years 3 months ago [\#354590](#354590) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354590 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

j'ai purge l index et refait l index et il y a bien x.... sur 3464. en progression , il indexe tout
et bien sur dans les résultats de recherche il y a toujours des quantity = 0

Last edit: 3 years 3 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago [\#354619](#354619) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354619 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

ca doit pas être grand-chose

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

3 years 3 months ago [\#354739](#354739) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#354739 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

pas de solution a ce problèmes ?
les clients qui font une recherche doivent cliquer 10 fois avant de trouver un article dispo

merci

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

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

Less More

- Posts: 2705
- Thank you received: 74
-
-

2 years 3 months ago [\#362391](#362391) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#362391 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

je reviens la dessus car les produits avec quantité 0 n sont pas trouves sur le site donc ca marche mais ils sont quand meme dans option=com_finder&amp;view=index. la table du Finder inutilement car ca grossit énormément cette table deja énorme

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA2OTA4LXNtYXJ0LXNlYXJjaC1uZS1wYXMtaW5kZXhlci1xdWFudGl0eS0wP3RtcGw9bWFya2Rvd24=) 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 3 months ago [\#362393](#362393) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[smart search ne pas indexer quantity = 0](/forum/5-support-en-francais-french-support-/906908-smart-search-ne-pas-indexer-quantity-0#362393 "-- HikaShop version -- : 4.7.5  Bonjour  le smart search me retourne des produits indexes avec une quantité 0 , ils sont sur le site mais en archive comment faire pour ne pas indexer les produits a quantité 0 ?  il y a sur le site 300 produits mais 3000 en archive  merci")*

Bonjour,

Oui, c'est fait ainsi. Les produits sont indexés, et leur état est mis à jour en fonction de s'ils sont publiés ou non, et s'ils ont du stock, tout comme les articles Joomla sont indexés même s'ils ne sont pas publiés.
Normalement le système de smart search est optimisé dans Joomla pour fonctionner ainsi car lors d'une recherche il n'y a pas besoin de faire des recherches complexes sur les tables (contrairement au système de filtres dans HikaShop, qui lui est dynamique, sans indexation), et donc permet de gérer des tables bien plus grosses.

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

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

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