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

#   Vente au mètre

##

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

13 years 3 months ago [\#112715](#112715) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#112715 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")* was created by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")*

Bonjour,

J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit "à l'unité" par "le mètre"?

Cordialement

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 3 months ago [\#112964](#112964) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#112964 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Qu'est ce que vous entendez par paramétrer? Si votre produit se vend au mètre et que c'est indiqué tel quel je ne pense pas qu'il faille configurer quoi que ce soit.
Pour ce qui est du mètre justement il suffit de changer la traduction, allez dans votre fichier de langue, cherchez "à l'unité" et remplacez cette traduction par "le mètre".

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

13 years 3 months ago [\#112987](#112987) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#112987 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Merci pour votre réponse mais mon produit à un prix à l'unité et si je change dans le fichier de langue à l'unité par au mètre tous mes produits vont être changés.

Cordialement

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

13 years 3 months ago -  13 years 3 months ago [\#112999](#112999) 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 *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#112999 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Si vous voulez afficher "le mèttre" uniquement pour un seul de vos produits il vous faudra :

1. Ajouter sur votre fichier de traduction la ligne : Code:

PER_METER=" le mètre"

2. Rechercher l'ID de votre produit via la liste de des produits "*Hikashop-&gt;Produits*"

3. Editer le fichier "listing_price" de la vue "produit" de votre template de front-end via "*Hikashop-&gt;Affichage-&gt;Vues*" et modifier ces lignes : Code:

if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity); }else{ echo JText::_('PER_UNIT'); } }

par : Code:

if(!empty($price-&gt;price_product_id) &amp;&amp; ($price-&gt;price_product_id == VOTRE_ID_DE_PRODUIT)){ echo JText::_('PER_METER'); } else{ if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity); }else{ echo JText::_('PER_UNIT'); } } }

Tout en remplaçant "VOTRE_ID_DE_PRODUIT" par l'ID de votre produit.

Last edit: 13 years 3 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

13 years 3 months ago [\#113131](#113131) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#113131 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour

Merci pour tout!!! Cela fonctionne!

Et si j'ai d'autres articles, j'ajoute l'ID de cet article séparé par ; à la suite?

Cordialement

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

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 3 months ago [\#113135](#113135) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#113135 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Il faudra remplacer la première ligne par:
Code:

if(!empty($price-&gt;price_product_id) &amp;&amp; ($price-&gt;price_product_id == VOTRE_ID_DE_PRODUIT &#124;&#124; $price-&gt;price_product_id == VOTRE_SECOND_ID_DE_PRODUIT)){

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

13 years 3 months ago [\#113136](#113136) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#113136 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Top!!!

Merci encore.

Cordialement

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago [\#132225](#132225) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132225 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Cela ne fonctionne plus avec la version 2.2.2....

Une idée?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQ3NzgtdmVudGUtYXUtbWV0cmU/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: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#132303](#132303) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132303 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Avez vous fait la modification en utilisant un override de vue ?
Si vous avez modifié le fichier directement, la mise à jour remplace tous les fichiers "core" d'HikaShop, les modifications faites qui ne sont pas des overrides (de vue, de css, de mail) sont restaurées avec la version du package.

Cordialement,

---

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

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago -  12 years 11 months ago [\#132346](#132346) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132346 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Je m'en doutais un peu que la mise à jour remettait les fichiers de base mais c'est que le fichier "listing_price" a changé et cette expression n'est plus la même, et si je remplace avec les modification ci dessus cela me donne une page blanche.
Code:

if (isset ($ prix&gt; price_min_quantity) &amp;&amp; empty ($ this-&gt; cart_product_price) &amp;&amp; $ this-&gt; params-&gt; get ('per_unit', 1)) { if ($ prix&gt; price_min_quantity&gt; 1) { echo JText :: sprintf ('PER_UNIT_AT_LEAST_X_BOUGHT', $ prix&gt; price_min_quantity); } Else { echo JText :: _ ('PER_UNIT'); } }

Maintenant nous avons ceci: Code:

if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo '&lt;span class="hikashop_product_price_per_unit_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;'; }else{ echo '&lt;span class="hikashop_product_price_per_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;

Last edit: 12 years 11 months ago by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 11 months ago [\#132388](#132388) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132388 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Merci d'utiliser le code: Code:

if(!empty($price-&gt;price_product_id) &amp;&amp; ($price-&gt;price_product_id == VOTRE_ID_DE_PRODUIT &#124;&#124; $price-&gt;price_product_id == VOTRE_SECOND_ID_DE_PRODUIT)){ echo '&lt;span class="hikashop_product_price_per_meter"&gt;'.JText::_('PER_METER').'&lt;/span&gt;'; } else{ if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){ if($price-&gt;price_min_quantity&gt;1){ echo '&lt;span class="hikashop_product_price_per_unit_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;'; }else{ echo '&lt;span class="hikashop_product_price_per_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;'; } } }

En remplaçant bien "VOTRE_ID_DE_PRODUIT" et "VOTRE_SECOND_ID_DE_PRODUIT" par les ids souhaités ![;)](/media/kunena/emoticons/11.png ";)")
Cela doit fonctionner.

Si vous avez une page blanche c'est probablement parcequ'il manque un guillement, ou un point-virgule, ou une accolade...

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago -  12 years 11 months ago [\#132397](#132397) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132397 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,
C'est pareil (pas page blanche mais la vue d'un article ne pleine page)
Ce que je dois remplacer se trouve à la ligne 159 du fichier "listing_price.php" se trouvant dans /components/com_hikashop/views/product/tmpl
seulement le fichier a changé depuis les anciennes versions :

if(isset($price-&gt;price_min_quantity) &amp;&amp; empty($this-&gt;cart_product_price) &amp;&amp; $this-&gt;params-&gt;get('per_unit',1)){
if($price-&gt;price_min_quantity&gt;1){
echo '&lt;span class="hikashop\_product\_price\_per\_unit\_x"&gt;'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price-&gt;price_min_quantity).'&lt;/span&gt;';
}else{
echo '&lt;span class="hikashop\_product\_price\_per\_unit"&gt;'.JText::_('PER_UNIT').'&lt;/span&gt;';
}
}

il me semble que ce qui est en rouge est différent et je pense que cela bloque la mise en place.

Last edit: 12 years 11 months ago by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQ3NzgtdmVudGUtYXUtbWV0cmU/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86287
- Thank you received: 14264
-
-

12 years 11 months ago [\#132406](#132406) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132406 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

Non ce code en rouge n'a rien à voir. Il n'est pas nécessaire au bon fonctionnement de l'affichage. Il est utile uniquement pour pouvoir définir du CSS sur l'affichage du texte.

Comme a expliqué Xavier, si vous avez une page blanche c'est probablement parcequ'il manque un guillement, ou un point-virgule, ou une accolade. Le plus simple dans ce cas est d'activer l'option "error reporting" de la configuration joomla et d'affiche la page blanche à nouveau et cela affichera un message d'erreur vous expliquant à quelle ligne de quel fichier est l'erreur et de quelle nature est l'erreur.

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago -  12 years 11 months ago [\#132418](#132418) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132418 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,

voici le message:

Parse error: syntax error, T_STRING inattendu, s'attendant T_VARIABLE ou '$' dans sur la ligne 159

Cordialement
*This attachment is hidden for guests.
Please log in or register to see it.*

Last edit: 12 years 11 months ago by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQ3NzgtdmVudGUtYXUtbWV0cmU/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86287
- Thank you received: 14264
-
-

12 years 11 months ago [\#132422](#132422) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132422 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Il faut bien copier le code que nous donnons. Faites attention.
Sur cette ligne, vous avez: Code:

if (empty ($ prix&gt; price_product_id) &amp;&amp; ($ prix&gt; price_product_id == 980 &#124; &#124; $ prix&gt; price_product_id == 1090)) {

alors que nous vous avons dit de mettre: Code:

if(!empty($price-&gt;price_product_id) &amp;&amp; ($price-&gt;price_product_id == 980 &#124;&#124; $price-&gt;price_product_id == 1090)){

C'est pour cela que ça ne fonctionne pas et vous avez des erreurs sut toutes les lignes que vous avez modifiées, pas que celle là.

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago [\#132428](#132428) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132428 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

J'ai fait un copier / coller du code de Xavier....

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQ3NzgtdmVudGUtYXUtbWV0cmU/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86287
- Thank you received: 14264
-
-

12 years 11 months ago [\#132430](#132430) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132430 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Ca c'est la première ligne du code de Xavier [ www.hikashop.com/forum/5-support-en-fran...au-metre.html#132388](http://www.hikashop.com/forum/5-support-en-francais-french-support-/84778-vente-au-metre.html#132388) :
if(!empty($price-&gt;price_product_id) &amp;&amp; ($price-&gt;price_product_id == VOTRE_ID_DE_PRODUIT &#124;&#124; $price-&gt;price_product_id == VOTRE_SECOND_ID_DE_PRODUIT)){

Ca c'est la meme ligne dans le fichier que vous avez fourni dans votre précédent message [ www.hikashop.com/media/kunena/attachments/23503/hde15ada.txt](http://www.hikashop.com/media/kunena/attachments/23503/hde15ada.txt) :
if (empty ($ prix&gt; price_product_id) &amp;&amp; ($ prix&gt; price_product_id == 980 &#124; &#124; $ prix&gt; price_product_id == 1090)) {

Il manque des caractères et il y a des caractères en trop un peu partout. Donc je ne sais pas ce que vous avez copier/coller mais ce n'est pas le code de Xavier.

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

- **[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")**
- [![sudkarting's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23503.png)](/forum/user/23503-sudkarting "View sudkarting's Profile") Topic Author
- [ Away](/forum/user/23503-sudkarting)

Less More

- Posts: 410
- Thank you received: 16
-
-

12 years 11 months ago [\#132562](#132562) by [sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")  Replied by *[sudkarting](/forum/user/23503-sudkarting "View sudkarting's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132562 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour à Xavier et Nicolas,

Pour la petite histoire, tout fonctionne à nouveau.
J'ai trouvé l'erreur du copier/coller (Merci Google Chrome!!).

Si je traduis le forum avec Google Chrome il me supprime des caractères, d'ou les erreurs....mais si j'utilise le sélecteur de langue du site Hikashop, les caractères sont présents.

L'essentiel c'est que cela fonctionne à nouveau.

Une autre question, comment éviter de modifier ce fichier à chaque mise à jour?

Cordialement

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODQ3NzgtdmVudGUtYXUtbWV0cmU/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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86287
- Thank you received: 14264
-
-

12 years 11 months ago [\#132644](#132644) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#132644 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Pour cela, il suffit de faire la modification via l'interface que nous proposons pour l'édition des vues, comme Mohamed vous l'a indiqué dans un précédent message:
[ www.hikashop.com/forum/5-support-en-fran...au-metre.html#112999](http://www.hikashop.com/forum/5-support-en-francais-french-support-/84778-vente-au-metre.html#112999)

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

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

Less More

- Posts: 108
- Thank you received: 1
-
-

12 years 7 months ago [\#147915](#147915) by [nozz](/forum/user/29353-nozz "View nozz's Profile")  Replied by *[nozz](/forum/user/29353-nozz "View nozz's Profile")* on topic *[Vente au mètre](/forum/5-support-en-francais-french-support-/84778-vente-au-metre#147915 "Bonjour,  J'ai un seul article qui se vend au mètre, comment le paramétrer et remplacer dans la vue produit &quot;à l'unité&quot; par &quot;le mètre&quot;?  Cordialement")*

Bonjour,
Je ré-ouvre ce post car je souhaite proposer la vente de tissu au mètre mais la découpe se fait tous les 10 cm.
J'ai donc 2 problèmes à résoudre:
Je voudrais adapter votre code nom pas à ID d'un produit mais a l'ID de toute une catégorie (catégorie tissu) car je propose 46 références différentes.
La seconde difficulté consite à autoriser les décimales dans le panier uniquement pour cette catégorie de façon à pouvoir acheter 1,6 mètres par exemple. Cela m'éviterait de proposer le prix de vente par "unité" de 10cm.
MERCI pour votre aide

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

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

[](#top)
