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

#   Showing characteristics name in cart with value

##

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

Less More

- Posts: 26
- Thank you received: 1
-
-

9 years 10 months ago [\#258736](#258736) by [jannick](/forum/user/33157-jannick "View jannick's Profile")  *[Showing characteristics name in cart with value](/forum/27-checkout/888135-showing-characteristics-name-in-cart-with-value#258736 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi,  I am trying to show the name of the characteristics along with the value of the characteristic. It's working good when i'm adding different products to the cart. But when i add to products wich are the same(only different custom field or variant) it's not working.  As you can see in the image, every second product from the same type has an empty array:  This is the code i'm using in the cart.php file:  Could you give me a code example how i can bind the name of the characteristics to the value the right way?  Thanks!")* was created by *[jannick](/forum/user/33157-jannick "View jannick's Profile")*

-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6

Hi,

I am trying to show the name of the characteristics along with the value of the characteristic. It's working good when i'm adding different products to the cart. But when i add to products wich are the same(only different custom field or variant) it's not working.

As you can see in the image, every second product from the same type has an empty array:
[ ![cart&#95;2017-01-03.JPG](/forum/attachment/35391) ](/forum/attachment/35391 "...2017-01-03.JPG")

This is the code i'm using in the cart.php file:
Code:

&lt;?php foreach ($row-&gt;characteristics as $key =&gt; $characteristic) : ?&gt; &lt;p&gt;&lt;?php echo '&lt;strong&gt;'. $this-&gt;full_cart-&gt;products[$i -1]-&gt;characteristics[$characteristic-&gt;characteristic_parent_id]-&gt;characteristic_value.'&lt;/strong&gt;' . ": ".$characteristic-&gt;characteristic_value ?&gt;&lt;/p&gt; &lt;?php endforeach; ?&gt;

Could you give me a code example how i can bind the name of the characteristics to the value the right way?

Thanks!

- [ ![cart&#95;2017-01-03.JPG](/forum/attachment/35391) ](/forum/attachment/35391 "...2017-01-03.JPG") [ ](/forum/attachment/35391?download=1 "...2017-01-03.JPG")

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

9 years 10 months ago -  9 years 10 months ago [\#258740](#258740) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Showing characteristics name in cart with value](/forum/27-checkout/888135-showing-characteristics-name-in-cart-with-value#258740 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi,  I am trying to show the name of the characteristics along with the value of the characteristic. It's working good when i'm adding different products to the cart. But when i add to products wich are the same(only different custom field or variant) it's not working.  As you can see in the image, every second product from the same type has an empty array:  This is the code i'm using in the cart.php file:  Could you give me a code example how i can bind the name of the characteristics to the value the right way?  Thanks!")*

Hi,

I'm not able to reproduce that problem.
If I add the code: Code:

echo '&lt;pre&gt;';var_dump($row-&gt;characteristics);echo '&lt;/pre&gt;';

after the code: Code:

if($group &amp;&amp; $row-&gt;cart_product_option_parent_id) continue;

in the file "cart" of the view "checkout", I do see the characteristics objects for all the rows of the same product.
I don't get NULL entries, AND I don't get the characteristics names:
[ pasteboard.co/hDcxh3unW.png](http://pasteboard.co/hDcxh3unW.png)
So I don't know what you did in your view, but there must be something wrong with the way you customized it.

- [ ![screencapture-localhost-joomla34-index-php-hikashop-menu-for-categories-listing-checkout-1483450659462.png](/forum/attachment/35392) ](/forum/attachment/35392 "...3450659462.png") [ ](/forum/attachment/35392?download=1 "...3450659462.png")

Last edit: 9 years 10 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

Less More

- Posts: 26
- Thank you received: 1
-
-

9 years 10 months ago [\#258862](#258862) by [jannick](/forum/user/33157-jannick "View jannick's Profile")  Replied by *[jannick](/forum/user/33157-jannick "View jannick's Profile")* on topic *[Showing characteristics name in cart with value](/forum/27-checkout/888135-showing-characteristics-name-in-cart-with-value#258862 "-- HikaShop version -- : 2.6.4 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.6  Hi,  I am trying to show the name of the characteristics along with the value of the characteristic. It's working good when i'm adding different products to the cart. But when i add to products wich are the same(only different custom field or variant) it's not working.  As you can see in the image, every second product from the same type has an empty array:  This is the code i'm using in the cart.php file:  Could you give me a code example how i can bind the name of the characteristics to the value the right way?  Thanks!")*

Hi,

Thanks for the reply.

I have tried to use a fresh view with this modification and it's stil not working. I also do see the characteristics objects and they are not NULL. I want to show the characteristics with their name. To do so i use this line of code:
$this-&gt;full_cart-&gt;products[$i -1]-&gt;characteristics[$characteristic-&gt;characteristic_parent_id]-&gt;characteristic_value

And this value is empty as explained in my previous message. I have used this post to create this:
[ www.hikashop.com/forum/4-how-to/53060-di...ame-in-checkout.html](https://www.hikashop.com/forum/4-how-to/53060-display-characteristics-name-in-checkout.html)

and modified the code a little to make it work.

The following user(s) said Thank You: [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")

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

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