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

#   Undefined property: stdClass::$price\_product\_id

##

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

Less More

- Posts: 509
- Thank you received: 36
-
-

14 years 1 week ago -  14 years 1 week ago [\#75698](#75698) by [lesyeux](/forum/user/1216-lesyeux "View lesyeux's Profile")  *[Undefined property: stdClass::$price\_product\_id](/forum/5-support-en-francais-french-support-/75631-undefined-property-stdclass-price-product-id#75698 "J'utilise un override de product/listing&#95;price.php pour ajouter des préfixe à mes prix (via des champs perso).  Mais lors d'un ajout au panier j'ai cette alerte : Notice: Undefined property: stdClass::$price&#95;product&#95;id in /templates/rt&#95;clarion/html/com&#95;hikashop/product/listing&#95;price.php on line 101  Code utilisé : if($this-&gt;params-&gt;get('price&#95;with&#95;tax')){ // insertion du préfixe du prix $class = hikashop&#95;get('class.product'); $variantData = $class-&gt;get($price-&gt;price&#95;product&#95;id); echo ''; echo $variantData-&gt;modele&#95;echelle; echo $variantData-&gt;prefixe&#95;prix&#95;lots&#95;3; echo ' '; echo $variantData-&gt;prefixe&#95;pays; echo ' : '; echo ''; // fin insertion du préfixe du prix  Je suis maintenant en Hikashop 2.0 et Joomla 2.5.8 sous PHP 5.3.14.")* was created by *[lesyeux](/forum/user/1216-lesyeux "View lesyeux's Profile")*

J'utilise un override de product/listing_price.php pour ajouter des préfixe à mes prix (via des champs perso).

Mais lors d'un ajout au panier j'ai cette alerte :
Notice: Undefined property: stdClass::$price_product_id in /templates/rt_clarion/html/com_hikashop/product/listing_price.php on line 101

Code utilisé :
if($this-&gt;params-&gt;get('price_with_tax')){
// insertion du préfixe du prix
$class = hikashop_get('class.product');
$variantData = $class-&gt;get($price-&gt;price_product_id);
echo '&lt;em class="prefix"&gt;';
echo $variantData-&gt;modele_echelle;
echo $variantData-&gt;prefixe_prix_lots_3;
echo ' ';
echo $variantData-&gt;prefixe_pays;
echo ' : ';
echo '&lt;/em&gt;';
// fin insertion du préfixe du prix

Je suis maintenant en Hikashop 2.0 et Joomla 2.5.8 sous PHP 5.3.14.

Last edit: 14 years 1 week ago by [lesyeux](/forum/user/1216-lesyeux "View lesyeux's Profile").

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

Less More

- Posts: 86582
- Thank you received: 14322
-
-

14 years 1 week ago [\#75699](#75699) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Undefined property: stdClass::$price\_product\_id](/forum/5-support-en-francais-french-support-/75631-undefined-property-stdclass-price-product-id#75699 "J'utilise un override de product/listing&#95;price.php pour ajouter des préfixe à mes prix (via des champs perso).  Mais lors d'un ajout au panier j'ai cette alerte : Notice: Undefined property: stdClass::$price&#95;product&#95;id in /templates/rt&#95;clarion/html/com&#95;hikashop/product/listing&#95;price.php on line 101  Code utilisé : if($this-&gt;params-&gt;get('price&#95;with&#95;tax')){ // insertion du préfixe du prix $class = hikashop&#95;get('class.product'); $variantData = $class-&gt;get($price-&gt;price&#95;product&#95;id); echo ''; echo $variantData-&gt;modele&#95;echelle; echo $variantData-&gt;prefixe&#95;prix&#95;lots&#95;3; echo ' '; echo $variantData-&gt;prefixe&#95;pays; echo ' : '; echo ''; // fin insertion du préfixe du prix  Je suis maintenant en Hikashop 2.0 et Joomla 2.5.8 sous PHP 5.3.14.")*

$price-&gt;price_product_id n'est pas tout le temps défini.

Vous deviez rajouter cela:
if(isset($price-&gt;price_product_id)){
//votre code
}

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

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

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

Less More

- Posts: 509
- Thank you received: 36
-
-

14 years 1 week ago [\#75704](#75704) by [lesyeux](/forum/user/1216-lesyeux "View lesyeux's Profile")  Replied by *[lesyeux](/forum/user/1216-lesyeux "View lesyeux's Profile")* on topic *[Undefined property: stdClass::$price\_product\_id](/forum/5-support-en-francais-french-support-/75631-undefined-property-stdclass-price-product-id#75704 "J'utilise un override de product/listing&#95;price.php pour ajouter des préfixe à mes prix (via des champs perso).  Mais lors d'un ajout au panier j'ai cette alerte : Notice: Undefined property: stdClass::$price&#95;product&#95;id in /templates/rt&#95;clarion/html/com&#95;hikashop/product/listing&#95;price.php on line 101  Code utilisé : if($this-&gt;params-&gt;get('price&#95;with&#95;tax')){ // insertion du préfixe du prix $class = hikashop&#95;get('class.product'); $variantData = $class-&gt;get($price-&gt;price&#95;product&#95;id); echo ''; echo $variantData-&gt;modele&#95;echelle; echo $variantData-&gt;prefixe&#95;prix&#95;lots&#95;3; echo ' '; echo $variantData-&gt;prefixe&#95;pays; echo ' : '; echo ''; // fin insertion du préfixe du prix  Je suis maintenant en Hikashop 2.0 et Joomla 2.5.8 sous PHP 5.3.14.")*

Super, problème réglé !

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

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