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

#   recuperer characteristic\_value et prix dans l'email

##

- **[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: 2697
- Thank you received: 74
-
-

12 years 1 month ago -  12 years 1 month ago [\#173584](#173584) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[recuperer characteristic\_value et prix dans l'email](/forum/5-support-en-francais-french-support-/871947-recuperer-characteristic-value-et-prix-dans-lemail#173584 "-- HikaShop version -- : 233 -- Joomla version -- : 334  impossible de recuperer cette characteristic&#95;value dans l'email  {LINEVAR:item.order&#95;product&#95;options&#91;0&#93;-&gt;characteristic&#95;value} {LINEVAR:item.characteristic&#95;value}  ou en l'ajoutant  rien n'y fait  comment puis je recuperer cette valeur ?  voici une commande de 2 produits  merci")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

-- HikaShop version -- : 233
-- Joomla version -- : 334

impossible de recuperer cette characteristic_value dans l'email

{LINEVAR:item.order_product_options[0]-&gt;characteristic_value}
{LINEVAR:item.characteristic_value}

ou en l'ajoutant Code:

$cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTITY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, ['CHARACTERISTIC_VALUE'] =&gt; $item-&gt;order_product_options[0]-&gt;characteristic_value; );

rien n'y fait

comment puis je recuperer cette valeur ?

voici une commande de 2 produits
Code:

a:2:{i:0;O:8:"stdClass":8:{s:25:"variant_characteristic_id";s:1:"1";s:18:"variant_product_id";s:2:"35";s:8:"ordering";s:1:"0";s:17:"characteristic_id";s:1:"1";s:24:"characteristic_parent_id";s:1:"3";s:20:"characteristic_value";s:3:"7 m";s:20:"characteristic_alias";s:0:"";s:23:"characteristic_ordering";s:1:"0";}s:10:"7m / 13.7m";s:3:"7 m";} a:2:{i:0;O:8:"stdClass":8:{s:25:"variant_characteristic_id";s:1:"2";s:18:"variant_product_id";s:3:"349";s:8:"ordering";s:1:"0";s:17:"characteristic_id";s:1:"2";s:24:"characteristic_parent_id";s:1:"3";s:20:"characteristic_value";s:6:"13.7 m";s:20:"characteristic_alias";s:0:"";s:23:"characteristic_ordering";s:1:"0";}s:10:"7m / 13.7m";s:6:"13.7 m";}

merci

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

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

12 years 1 month ago [\#173594](#173594) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[recuperer characteristic\_value et prix dans l'email](/forum/5-support-en-francais-french-support-/871947-recuperer-characteristic-value-et-prix-dans-lemail#173594 "-- HikaShop version -- : 233 -- Joomla version -- : 334  impossible de recuperer cette characteristic&#95;value dans l'email  {LINEVAR:item.order&#95;product&#95;options&#91;0&#93;-&gt;characteristic&#95;value} {LINEVAR:item.characteristic&#95;value}  ou en l'ajoutant  rien n'y fait  comment puis je recuperer cette valeur ?  voici une commande de 2 produits  merci")*

je l'obtiens que comme ça

Code:

$q = 'SELECT c.characteristic_value AS cv ,pr.price_value AS pv FROM #__hikashop_product p INNER JOIN #__hikashop_variant v ON(p.product_id = v.variant_product_id ) INNER JOIN #__hikashop_characteristic c ON(v.variant_characteristic_id = c.characteristic_id) INNER JOIN #__hikashop_price pr ON (pr.price_product_id = p.product_id) WHERE p.product_id = ' . $item-&gt;product_id .';'; $db-&gt;setQuery($q); $row = $db-&gt;loadRow(); $cartProduct = array( 'PRODUCT_CODE' =&gt; $item-&gt;order_product_code, 'PRODUCT_QUANTITY' =&gt; $item-&gt;order_product_quantity, 'PRODUCT_IMG' =&gt; '', 'item' =&gt; $item, 'product' =&gt; $product, 'CHARACTERISTIC_VALUE' =&gt; $row[0], 'ITEM_PRICE' =&gt; $row[1], );

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODcxOTQ3LXJlY3VwZXJlci1jaGFyYWN0ZXJpc3RpYy12YWx1ZS1ldC1wcml4LWRhbnMtbC1lbWFpbD90bXBsPW1hcmtkb3du) 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: 4077
-
- [](http://obsi.dev)
-

12 years 1 month ago -  12 years 1 month ago [\#173597](#173597) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[recuperer characteristic\_value et prix dans l'email](/forum/5-support-en-francais-french-support-/871947-recuperer-characteristic-value-et-prix-dans-lemail#173597 "-- HikaShop version -- : 233 -- Joomla version -- : 334  impossible de recuperer cette characteristic&#95;value dans l'email  {LINEVAR:item.order&#95;product&#95;options&#91;0&#93;-&gt;characteristic&#95;value} {LINEVAR:item.characteristic&#95;value}  ou en l'ajoutant  rien n'y fait  comment puis je recuperer cette valeur ?  voici une commande de 2 produits  merci")*

Bonjour,

Avez-vous regardé ce que contenait la variable $product ?
Parce que $item se limite au données de l'item, pas du produit (d'ou le fait qu'on ai ajouté $product pour pouvoir accéder aux données et champs personnalisés de type produit).

Si vous avez du texte dans order_product_options, vous ne pouvez pas l'utiliser en tant que tableau, il faut le unserialize avant.
Et le code PHP que vous avez posé contient des "[]" qui ne doivent pas être appréciés à mon avis.

Le système de tags dans les emails permet de faire pas mal de choses comme l'inspection d'objet mais il ne permet pas de faire d'inspection de tableau. Le "." est donc géré mais pas les crochets.

Cordialement,

---

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

Last edit: 12 years 1 month ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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