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

#   Characteristics Limit?

##

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11369](#11369) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  *[Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11369 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")* was created by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")*

Hi,

I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?

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

15 years 7 months ago [\#11371](#11371) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11371 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi,

You shouldn't use characteristics for that. the characteristic system creates one variant per combination of values of the characteristics. If you have 4 characteristics with 34 values each, that's 34*34*34*34 variants. Way too much to be processed by a normal server.
Instead, you should use custom fields on the table 'item' (business version). The limitation is that it will be displaying for all the products in your store which might not be what you're looking for. In that case, you can always change a bit the code of the show file of the view product to display them only for the products where you need them.

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11373](#11373) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11373 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Yeah makes sense it is rather a lot of options, not php savvy though so what code would I need if the item page was called 'Multi-pack'

thanks

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

15 years 7 months ago [\#11375](#11375) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11375 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

In that file you have the line:
if(!empty($this-&gt;itemFields)){

Suppose that your product has the code "multi_pack", you can change it to:
if($this-&gt;element-&gt;product_code=="multi_pack" &amp;&amp; !empty($this-&gt;itemFields)){

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11377](#11377) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11377 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi, works a treat except that the field 'label' shows on every item in checkout, I can leave the label blank but ':' still shows, can I prevent this?

thanks

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

15 years 7 months ago [\#11378](#11378) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11378 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

In the file cart of the view checkout, you can check the line:
if(hikashop::level(2) &amp;&amp; !empty($this-&gt;extraFields)){

to:
if($row-&gt;product_code=="multi_pack" &amp;&amp; hikashop::level(2) &amp;&amp; !empty($this-&gt;extraFields)){

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11403](#11403) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11403 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi again,

It works ok what you have given me so far but I now have label showing in the order email and in the 'orders' (tried to use the same/similar code but will not work for the orders) + the invoices

can you assist again please...sorry

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

15 years 7 months ago [\#11415](#11415) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11415 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

In the email you have the line:
if(!empty($itemFields)){
that you can replace by:
if($item-&gt;product_code=="multi_pack" &amp;&amp; !empty($this-&gt;itemFields)){

In the invoice, the items custom fields are not displayed.

In the order page details on the front end and on the back end (file show and form of the view order), you have the code:
if(hikashop::level(2) &amp;&amp; !empty($this-&gt;fields)){
that you can replace by:
if($product-&gt;product_code=="multi_pack" &amp;&amp; hikashop::level(2) &amp;&amp; !empty($this-&gt;fields)){

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11425](#11425) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11425 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi Nicolas,

When I change the code it also takes out the custom fields that are required to show?

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

15 years 7 months ago [\#11427](#11427) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11427 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Yes. You should not have required custom fields on the table item if you hide them because the system will refuse the operation on pages where you hide them

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11430](#11430) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11430 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi sorry I do not mean as a required field but required to show.
The first screen dump shows what I want to show ringed in blue this is with the code

if(hikashop::level(2) &amp;&amp; !empty($this-&gt;fields)){

the next screen dump is what happens when I change the code to
if($product-&gt;product_code=="multi_pack" &amp;&amp; hikashop::level(2) &amp;&amp; !empty($this-&gt;fields)){ I get no itmes that I am after.  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/goodbad.jpg) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/goodbad.jpg "&#91;img")

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

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11431](#11431) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11431 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

No items  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/bad.jpg) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/bad.jpg "&#91;img")

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

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

15 years 7 months ago [\#11432](#11432) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11432 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

So you want to display the custom field value only if there is a value in it ?

In that case you need to add the line below in the foreach displaying all the custom fields:
if(empty($product-&gt;$namekey)) continue;
after the line:
$namekey = $field-&gt;field_namekey;
for example in the file form of the view order.

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11437](#11437) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11437 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Hi, yes that's correct, sorted the files etc. but cannot solve the email, their does not appear to be any custom fields in the email?

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

15 years 7 months ago [\#11439](#11439) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11439 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

In the order creation email sent to the user, you have the code:
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field-&gt;field_namekey;
echo '&lt;p&gt;'.$fieldsClass-&gt;getFieldName($field).': '.$fieldsClass-&gt;show($field,$item-&gt;$namekey).'&lt;/p&gt;';
}
}
which handles the custom item fields display.

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11447](#11447) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11447 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

This is the code? this does not put the custom field value in the email, I have just inserted the line like you said and it will not work with or without?

&lt;p&gt;&lt;?php echo $item-&gt;order_product_name; ?&gt;&lt;/p&gt;
&lt;?php
if(!empty($itemFields)){
foreach($itemFields as $field){
$namekey = $field-&gt;field_namekey;
if(empty($product-&gt;$namekey)) continue;
echo '&lt;p&gt;'.$fieldsClass-&gt;getFieldName($field).': '.$fieldsClass-&gt;show($field,$item-&gt;$namekey).'&lt;/p&gt;';

}
} ?&gt;

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

15 years 7 months ago [\#11449](#11449) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11449 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

That code is ALREADY in the email. So you should already see the custom fields.
Maybe you're using an old version of the email (the version number should be at the top of the email) ?

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11451](#11451) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11451 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

Using 1.4.7 the code is there yes, I have added this if(empty($product-&gt;$namekey)) continue; like you said.

So you want to display the custom field value only if there is a value in it ?

In that case you need to add the line below in the foreach displaying all the custom fields:
if(empty($product-&gt;$namekey)) continue;
after the line:
$namekey = $field-&gt;field_namekey;
for example in the file form of the view order.

Inserting this will not show the custom field data?

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

15 years 7 months ago [\#11454](#11454) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11454 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

My code was an example...
As you can see, the product information comes from the variable $item in the email where that variable is called $product in other places.
So instead of using
if(empty($product-&gt;$namekey)) continue;
you should use:
if(empty($item-&gt;$namekey)) continue;

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

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

Less More

- Posts: 609
- Thank you received: 13
-

15 years 7 months ago [\#11456](#11456) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[Re: Characteristics Limit?](/forum/4-how-to/11369-characteristics-limit#11456 "Hi,  I am trying to achive a product page that allows the buyer to select 4 colours from a choice of 34 colours, the way I have been trying is using 4 characteristic, i.e. colour 1, colour 2 etc. but this will not work with 4 options, it does work with just 2 options though? when options 3 &amp; 4 are in the fields in the characteristics for those options are blank?")*

got it.. thank you for your patience.

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

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

[](#top)
