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

#   Add characteristics column to cart

##

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 4 months ago -  11 years 4 months ago [\#208073](#208073) by [disc](/forum/user/35571-disc "View disc's Profile")  *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#208073 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")* was created by *[disc](/forum/user/35571-disc "View disc's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : IE, FF, Safari

Hi all,

in my setup I´m using different characteristics, but only one for each product.
I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using.
So the option needs to be turned off.
However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.

Any idea how this can be done?

Thanks.

- [ ![cart.jpg](/forum/attachment/25474) ](/forum/attachment/25474 "cart.jpg") [ ](/forum/attachment/25474?download=1 "cart.jpg")

Last edit: 11 years 4 months ago by [disc](/forum/user/35571-disc "View disc's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 4 months ago [\#208082](#208082) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#208082 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

The characteristics value of each variant are stored in $row-&gt;characteristics when yo'u're in the "cart" file of the "checkout" view.
You'll have to loop on that array to extract the characteristic_value attribute of each characteristic object.

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago [\#209345](#209345) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209345 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Sorry, Nicolas, there´s nothing like that ($row-&gt;characteristics) in the cart.php.

I added that code to the table head to display the title of the column:
&lt;th id="hikashop_cart_product_size_title" class="hikashop_cart_product_size_title hikashop_cart_title"&gt;
&lt;?php echo JText::_('CART_PRODUCT_UNIT_SIZE'); ?&gt;
&lt;/th&gt;

That´s simple.

I also added that code to the table body:
&lt;td data-title="&lt;?php echo JText::_('CART_PRODUCT_CHARACTERISTICS'); ?&gt;" class="hikashop_cart_product_characteristics"&gt;
&lt;?php
$user = hikashop_loadUser(true);
echo $user-&gt;custom_field;
?&gt;
&lt;/td&gt;

I also understand that I need to loop this using 'foreach' but I´m really no php expert and I don´t think that I´m willing to become one ![B)](/media/kunena/emoticons/9.png "B)")
Could you point me to some code that I can copy in here or modify?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 3 months ago [\#209355](#209355) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209355 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Try that:
&lt;?php foreach($row-&gt;characteristics as $c){ echo $c-&gt;characteristic_name; } ?&gt;

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago [\#209516](#209516) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209516 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Mmhhh, doesn´t work.
I assume I need to change the parameter 'characteristic_name' by some individual name of the characteristic?
I also tried that with the alias of the characteristic name, but that doesn´t work either. Anyway that wouldn´t solve it as I´m using different characteristics - but as I mentioned only one per product.

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

11 years 3 months ago [\#209538](#209538) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209538 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

> Mmhhh, doesn´t work.

Can you please provide more details ?
Do you have some PHP warning (assuming that you are displaying the PHP warning ; otherwise you have to check your PHP log) ?
Which view are you editing ? (Because nicolas was talking about the checkout/cart but I'm not sure you're working on the same)

Regards,

---

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

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago [\#209621](#209621) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209621 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi Jerome,

I am also talking about the cart view (see screenshot in the first post).
I going to attach the modified cart.php. The only things I´ve changed so far are modifications on the fieldset and adding the new column "unit size". For the header this is simple, but I do have my problems to display the values in each row.
I have no php warning - usually i´m not working with php that deep. The site itselfs works, but simply the values of the new column on the cart are not displayed.

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

11 years 3 months ago [\#209632](#209632) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209632 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

Your screenshot in the first post show a cart ; but like I wrote, there are several views which display the cart, like Product/Cart , Checkout/Cart and Cart/Showcart
So if you do not provide the context, the simple image does not help much.
Because it could be the cart in the checkout or a cart module...

So, please understand that there is no one "cart view".
Also, please do not edit the core files directly and use view overrides ; I see that you talk about the "cart.php" file, which could mean that you're editing directly the core files instead of using overrides.

Now Nicolas made a little mistake, he used "characteristic_name" when it is "characteristic_value". Code:

&lt;?php if(!empty($row-&gt;characteristics)) { foreach($row-&gt;characteristics as $c) { echo $c-&gt;characteristic_value; } } ?&gt;

But ; if you take a look at the PHP log ; if you had activate the "error reporting" in your Joomla configuration in order to see directly the PHP warning message in your page ; you would see a message telling you that "characteristic_value" property does not exist for the object.
And such kind of information is useful when you are developing or performing customization. It allows you to know when you have a little mistake, instead of thinking that you have blank content or "it does not work", you have the reason why.

Regards,

---

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

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

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago [\#209789](#209789) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209789 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

**Solved!**
It was just the wrong parameter. "characteristic_value" of course was right.
I suppose displaying the characteristics on the cart will be requested by many users. So maybe you think about to add this to the cart by default?!

Yes you are right: I´m editing the core files which is much easier than using the override view. But that doesn´t matter as long as I have backups of these files, so in case of an update the changes are not lost.

Thanks again.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 3 months ago [\#209797](#209797) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#209797 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

We won't add that by default since, as you said in the beginning, the characteristic value is already added at the end of the product name by default. Adding columns for that would make it display twice on the module.

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago -  11 years 3 months ago [\#210812](#210812) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#210812 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

> nicolas wrote: We won't add that by default since, as you said in the beginning, the characteristic value is already added at the end of the product name by default.

That´s up to you, but to be honest I´ve never seen a web shop that adds a characteristic to the product name. I mean this really looks confusing. I personally think that it´s much clearer to have that in a separate column.

Anyway I´ve got the same issue with the order confirmation mail.
Also in this mail I would like to add the column with characteristics. The design and the head of the table is again no problem, but the value of the characteristic in the table body does not work.

I identified that the related code is in the preload version of the mail. So I would need something similar as this code for the product name as well for the characteristics, right?

$cartProduct('PRODUCT_NAME') = $t;

$t = '';
$statusDownload = explode(',',$config-&gt;get('order_status_for_download','confirmed,shipped'));
if(!empty($item-&gt;files) &amp;&amp; in_array($data-&gt;order-&gt;order_status,$statusDownload)){
$t .= '&lt;p&gt;';
foreach($item-&gt;files as $file){
$fileName = empty($file-&gt;file_name) ? $file-&gt;file_path : $file-&gt;file_name;
$file_pos = empty($file-&gt;file_pos) ? '' : ('&amp;file_pos=' . $file-&gt;file_pos);
if(empty($customer-&gt;user_cms_id))
$file_pos .= '&amp;email=' . $customer-&gt;user_email;
$t .= '&lt;a href="'.hikashop_frontendLink('index.php?option=com_hikashop&amp;ctrl=order&amp;task=download&amp;file_id='.$file-&gt;file_id.'&amp;order_id='.$data-&gt;order_id.$file_pos.$url_itemid).'"&gt;'.$fileName.'&lt;/a&gt;&lt;br/&gt;';
}
$t .= '&lt;/p&gt;';
}

---

$cartProduct('PRODUCT_CHARACTERISTICS) = $t;

$t = '';
if(!empty($row-&gt;characteristics)) {
$t .= '&lt;p&gt;';
foreach($row-&gt;characteristics as $c) {
echo $c-&gt;characteristic_value; }
}

---

Edit: I replaced the squared brackets, otherwise the code will not be displayed.

Last edit: 11 years 3 months ago by [disc](/forum/user/35571-disc "View disc's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 3 months ago [\#210822](#210822) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#210822 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

Characteristics are not stored with the product data in the order and are not loaded with the order when the order is loaded.
What you have is the information in $row-&gt;order_product_options that you can unserialize in order to get the information of the characteristics values of the product in the order.

Note: if you want to add code with brackets in the forum you can use the [ code ] and [ / code ] tags around your code (without the spaces).

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago -  11 years 3 months ago [\#210855](#210855) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#210855 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi Nicolas,

I can comprehend rudimentarily what you say but I have clue how the related code needs to look like.
I did the same on the cart. Therefor you provided that code:
&lt;?php
if(!empty($row-&gt;characteristics)) {
foreach($row-&gt;characteristics as $c) {
echo $c-&gt;characteristic_value; } }
?&gt;

which worked fine. But i really don´t know how to modify that for the mail (no PHP expert! ![;)](/media/kunena/emoticons/24.png ";)") )

When you say that characteristics are not stored in the order, does that mean when turning off the function "adding characteristics value to the products name" that the characteristic will not be stored anywhere?
So in the result you are not able to see what kind of product the customer has purchased?
I mean this would be a show stopper using Hikashop for that kind of products when you don´t like to add the characteristic to the product name!

Last edit: 11 years 3 months ago by [disc](/forum/user/35571-disc "View disc's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 3 months ago -  11 years 3 months ago [\#210889](#210889) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#210889 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

1. It should be something like that: Code:

if(!empty($row-&gt;order_product_options)){ $characteristics = unserialize($row-&gt;order_product_options); foreach($characteristics as $c){ echo $c-&gt;characteristic_value; } }

2. It will always be stored in order_product_options
If you don't want to add the characteristic value to the product_name, you can always add some CSS to hide the characteristic value added to the product name and add your own display with order_product_options. That's why it's there.

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

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

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

Less More

- Posts: 43
- Thank you received: 3
-
-

11 years 3 months ago [\#211037](#211037) by [disc](/forum/user/35571-disc "View disc's Profile")  Replied by *[disc](/forum/user/35571-disc "View disc's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#211037 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

> 1\. It should be something like that:
>
> Code:
>
> if(!empty($row-&gt;order_product_options)){ $characteristics = unserialize($row-&gt;order_product_options); foreach($characteristics as $c){ echo $c-&gt;characteristic_value; } }

Could be something like that, but doesn´t work ![;-)](/media/kunena/emoticons/24.png ";-)")

> 2\. It will always be stored in order\_product\_options
> If you don't want to add the characteristic value to the product\_name, you can always add some CSS to hide the characteristic value added to the product name and add your own display with order\_product\_options. That's why it's there.

Does that mean that I have to turn on the option "add characteristic to product name" to make sure that the characteristic will be stored in the order and then use CSS (e. g. something like "position: absolute; left: -9999px; top: -9999px;" to make the characteristic "invisible" if I don´t want to display them at the end of the products' name?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3ODA5NC1hZGQtY2hhcmFjdGVyaXN0aWNzLWNvbHVtbi10by1jYXJ0P3RtcGw9bWFya2Rvd24=) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

11 years 3 months ago [\#211064](#211064) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add characteristics column to cart](/forum/27-checkout/878094-add-characteristics-column-to-cart#211064 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : IE, FF, Safari  Hi all,  in my setup I´m using different characteristics, but only one for each product. I don´t like to append the characteristics to the product´s name. This also causes an error in the sj minicart module I´m using. So the option needs to be turned off. However, I would like to display the characteristics on the cart. I already added a new column but have my issues with the related php code that needs to be inserted.  Any idea how this can be done?  Thanks.")*

Hi,

1. I don't see why that wouldn't work except of course if you don't have the product object in the variable $row. Now I don't know the full code you're using so I can't say much more.
But why not simply do a var_dump of the variable where you have your product data in your code and look at the data yourself ? You'll see where the information you want is and that way you'll know how to get it.

2. No. It means that it doesn't matter to you since you're displaying it differently anyway. You can turn off the option, or turn it on and hide it with CSS, it doesn't matter since you'll display it differently yourself based on order_product_options.

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

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