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

#   Quantité article à 1 à la création

##

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

Less More

- Posts: 18
- Thank you received: 0
-
-

10 years 3 months ago [\#248172](#248172) by [berlou](/forum/user/12890-berlou "View berlou's Profile")  *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248172 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")* was created by *[berlou](/forum/user/12890-berlou "View berlou's Profile")*

-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6.23
-- Browser(s) name and version -- : Firefox

Bonjour,
Actuellement à l'insertion d'un nouvel article la quantité par défaut est "ILLIMITE" est il possible de modifier ce paramètre ? Idem pour les variantes ?
Merci

- [ ![Sans&#95;titre&#95;2.jpg](/forum/attachment/33127) ](/forum/attachment/33127 "Sans&#95;titre&#95;2.jpg") [ ](/forum/attachment/33127?download=1 "Sans&#95;titre&#95;2.jpg")

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

10 years 3 months ago [\#248197](#248197) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248197 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,

Pour les produits, vous pouvez éditer le fichier "form" de la vue "product" pour votre template backend via le menu Affichage&gt;Vues et ajouter ce code au début: Code:

&lt;?php if(empty($this-&gt;product-&gt;product_id)) $this-&gt;product-&gt;product_quantity = 1; ?&gt;

Pour les variantes, lorsque la quantité est illimitée, c'est la quantité du produit principal qui est utilisée sur le frontend automatiquement. Donc cela ne devrait pas être nécessaire.

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

10 years 3 months ago [\#248252](#248252) by [berlou](/forum/user/12890-berlou "View berlou's Profile")  Replied by *[berlou](/forum/user/12890-berlou "View berlou's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248252 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

C'est parfait, ca fonctionne.
Merci

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

10 years 3 months ago [\#248259](#248259) by [berlou](/forum/user/12890-berlou "View berlou's Profile")  Replied by *[berlou](/forum/user/12890-berlou "View berlou's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248259 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,
Je reviens sur cette question de quantité par défaut. je confirme que, à la création d'un produit la quantité est "1" grâce au bout de code à placer dans la vue.
Par contre à l'ajout d'une variante la quantité par défaut est toujours à "illimité". Existe t il un moyen de la passer également à "1" à la création de chaque variante ?
Merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODYwOTUtcXVhbnRpdGUtYXJ0aWNsZS1hLTEtYS1sYS1jcmVhdGlvbj90bXBsPW1hcmtkb3du) 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 3 months ago -  10 years 3 months ago [\#248273](#248273) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248273 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,

La solution est assez proche, et cette fois vous devez modifiez votre fichier "**variant**" de la vue "**product**" pour votre template backend via le menu **Affichage-&gt;Vues** et ajouter ce code au début: Code:

&lt;?php if($this-&gt;product-&gt;product_quantity == 'Unlimited') $this-&gt;product-&gt;product_quantity = 1; ?&gt;

Veuillez noter qu'avec cette manipulation, si un moment vous êtes amené à avoir une variant en '**Unlimited**', elle sera alors ramener **automatiquement** à '**1**', j'espère que cela vous convient ?

En attente de vos retour

cordialement.

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

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

10 years 3 months ago [\#248361](#248361) by [berlou](/forum/user/12890-berlou "View berlou's Profile")  Replied by *[berlou](/forum/user/12890-berlou "View berlou's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248361 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,
Merci de votre réactivité.
Personnellement le code fonctionne uniquement si je retire un "=" avant "Unilimited".
Avec les deux "=" c'est sans effet.
Cordialement

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

10 years 3 months ago [\#248362](#248362) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248362 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,

C'est que Philippe testait en Anglais. Donc pour vous, qui devait avoir l'interface en Français, il faut remplacer Unlimited par Illimité dans le code de Philippe.
Avec un égal, cela signifie que ça met 1 dans le champs peu importe la valeur déjà enregistrée, donc vous ne pourrez pas changer la quantité des variantes à autre chose que 1.

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

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

10 years 3 months ago [\#248410](#248410) by [berlou](/forum/user/12890-berlou "View berlou's Profile")  Replied by *[berlou](/forum/user/12890-berlou "View berlou's Profile")* on topic *[Quantité article à 1 à la création](/forum/26-product-category-display/886095-quantite-article-a-1-a-la-creation#248410 "-- Joomla version -- : 3.6.2 -- PHP version -- : 5.6.23 -- Browser(s) name and version -- : Firefox  Bonjour, Actuellement à l'insertion d'un nouvel article la quantité par défaut est &quot;ILLIMITE&quot; est il possible de modifier ce paramètre ? Idem pour les variantes ? Merci")*

Bonjour,
Tout est en ordre pour moi. Ca fonctionne.
Merci

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

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