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

#   \[Résolu\] Affichage de l'unité

##

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

Less More

- Posts: 19
- Thank you received: 0
-
-

12 years 3 days ago -  11 years 11 months ago [\#176298](#176298) by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")  *[\[Résolu\] Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#176298 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")* was created by *[Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")*

-- HikaShop version -- : HikaShop [1409241754]
-- Joomla version -- : Joomla! 2.5.27
-- Browser(s) name and version -- : Google Chrome

Bonjour,

Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.

Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot "l'unité", mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...

Je précise que j'ai la version gratuite.

Je vous remercie de votre aide.

Last edit: 11 years 11 months ago by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODcyNDYyLXJlc29sdS1hZmZpY2hhZ2UtZGUtbHVuaXRlP3RtcGw9bWFya2Rvd24=) 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 2 days ago [\#176315](#176315) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#176315 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Bonjour,

Le plus simple va être d'utiliser un champ personnalisé dans la table "product" et pour chaque produit indiquer l'unité désirée.
Puis éditer la vue "product / show_default" et juste après le code: Code:

$this-&gt;row = &amp; $this-&gt;element; $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate();

Si le "column_name" de ce champ personnalisé est par exemple "unitprice" ajoutez le code: Code:

echo $this-&gt;element-&gt;unitprice;

Les champs personnalisés de type produit ne sont présent que dans les versions commerciales d'HikaShop.

Pour outre passer ces champs personnalisés, il faudra utiliser des conditions PHP vérifiant l'id du produit et selon l'id afficher telle ou telle unité.

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

11 years 11 months ago -  11 years 11 months ago [\#176897](#176897) by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")  Replied by *[Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#176897 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Je vous remercie pour ces informations et j'ai donc acheté la version "ESSENTIAL". Mais je suis débutant et je n'arrive pas à obtenir ce que je souhaite à savoir, à chaque produit, le prix suivi de l'unité personnalisée. Par exemple :
1€ / la botte
5€ / le kilo

- J'ai crée deux champs personnalisés (la botte) et (le kilo).
- J'ai rajouté le code juste en dessous du code de la vue "product/show_default" Code:

$this-&gt;row = &amp; $this-&gt;element; $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate();

- Je ne sais pas comment relier le champ personnalisable au produit ni comment le place près du prix.

Je vous remercie d'avance pour votre aide

Last edit: 11 years 11 months ago by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile").

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

11 years 11 months ago [\#176910](#176910) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#176910 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Merci de suivre les instructions de Xavier et cela fonctionnera.
Il indique dans son message qu'il faut créer un seul champs personnalisé et l'appeler "unitprice" et non la botte ou le kilo.
C'est lorsque vous éditerez votre produit que vous pourrez entrer dans ce champs personnalisé le texte la botte ou le kilo.

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

11 years 11 months ago -  11 years 11 months ago [\#177161](#177161) by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")  Replied by *[Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#177161 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Merci pour ces informations.

Donc, j'ai bien réussi a intégré l'unité voulu par produit (via le fichier listing-price en fait).
Mais ça me fais un doublon au niveau des "spécifications", voir l'image ci-dessous.
[ ![&#91;img](http://img4.hostingpics.net/pics/830032hikashop.jpg) ](http://img4.hostingpics.net/pics/830032hikashop.jpg "&#91;img")

J'aimerais savoir comment ne pas afficher les spécifications (je rajouterais un texte en description), mais garder l'affichage de l'unité de prix du produit.
De plus, ça affiche le champ personnalisé du produit, est-il possible d'afficher celle des variantes à la place quand il y en a ?

Merci d'avance et encore pour votre aide.

Last edit: 11 years 11 months ago by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile").

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

11 years 11 months ago -  11 years 11 months ago [\#177239](#177239) by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")  Replied by *[Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#177239 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Je viens de remplir chaque produit, il me reste juste un soucis :

L'unité du prix affiche toujours la 1ère caractéristique, et reste le même avec les autres caractéristique (malgré que j'ai changé le champ personnalisé).

Si vous pouviez m'aider, ça m'aiderais énormément, car il me reste que ça comme soucis.
Merci par avance

Last edit: 11 years 11 months ago by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile").

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

11 years 11 months ago -  11 years 11 months ago [\#177291](#177291) by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")  Replied by *[Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile")* on topic *[Affichage de l'unité](/forum/5-support-en-francais-french-support-/872462-resolu-affichage-de-lunite#177291 "-- HikaShop version -- : HikaShop &#91;1409241754&#93; -- Joomla version -- : Joomla! 2.5.27 -- Browser(s) name and version -- : Google Chrome  Bonjour,  Je suis nouveau sur le forum et après avoir parcouru les topics, je n'arrive pas à trouver une solution à mon (simple) problème.  Je m'explique : j'ai réussi à créer différents prix pour un produit, j'ai réussi à retirer suivant vos conseils le mot &quot;l'unité&quot;, mais je n'arrive pas à afficher derrière le prix le type de produit. En effet, j'ai des produits en vente à la botte, au kilo, etc...  Je précise que j'ai la version gratuite.  Je vous remercie de votre aide.")*

Voilà, j'ai réussi via la réponse de nicolas :
[ hikashop.com/forum/5-support-en-francais...te-des-produits.html](https://hikashop.com/forum/5-support-en-francais-french-support-/41223-personnalise-l-unite-des-produits.html)

Last edit: 11 years 11 months ago by [Arobreizh](/forum/user/34650-arobreizh "View Arobreizh's Profile").

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

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

[](#top)
