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

#   Change characteristic popup if only one option

##

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 3 months ago [\#57616](#57616) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  *[Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57616 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")* was created by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")*

There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.

Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.

I see that the code is placed by view-&gt;product-&gt;show_block_charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

14 years 3 months ago [\#57618](#57618) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57618 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Hello,

I think that you'll probably have to edit the **show\_default** file of the **product** view.

Hope this will help you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 3 months ago -  14 years 3 months ago [\#57635](#57635) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57635 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Thanks for the reply Mohamed,

The view-&gt;product-&gt; show_default does not render the characteristic popup. That is definitely done by view-&gt;product-&gt;show_block_charasteristic.

But I do not know what the following calls: Code:

$this-&gt;characteristic-&gt;displayFE($this-&gt;element, $this-&gt;params)

I need to know where the value which is fetched is put together. I may be wrong, but I do not think they are in any of the view files.

Last edit: 14 years 3 months ago by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14280
-
-

14 years 3 months ago [\#57713](#57713) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57713 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

You could simply add that code at the beginning of that show_block_characteristic file:
&lt;?php if(empty($this-&gt;element-&gt;variants) &#124;&#124; count($this-&gt;element-&gt;variants)&lt;2) return true; ?&gt;

That will skip the display of the characteristics if there is only one variant.
The characteristic itself is done via that file in the file administrator/components/com_hikashop/types/characteristic.php which you can override as explained in the documentation:
[ www.hikashop.com/en/support/documentatio...tation.html#override](http://www.hikashop.com/en/support/documentation/62-hikashop-developer-documentation.html#override)
But for such a small modification, you should rather do what I said.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 3 months ago [\#57776](#57776) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57776 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Thanks Nicolas,

Do we already have a function I can use to check the number variants or the number of elements in the popup?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14280
-
-

14 years 3 months ago [\#57777](#57777) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57777 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

What do you mean by "in the popup" ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 3 months ago [\#57784](#57784) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57784 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Drop down menu ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14280
-
-

14 years 3 months ago [\#57846](#57846) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57846 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Mmm. I'm not sure I understand.
The code I gave in my message does just that:
&lt;?php if(empty($this-&gt;element-&gt;variants) &#124;&#124; count($this-&gt;element-&gt;variants)&lt;2) return true; ?&gt;

See the count($this-&gt;element-&gt;variants)&lt;2

It checks that count of variants is below 2 and if so, it returns (with the return true; code) so that it won't display the rest of the file.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

14 years 3 months ago -  14 years 3 months ago [\#57849](#57849) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57849 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

I'm sorry Nicoals. I did not read your post properly, I though because you said add "that" code at the beginning, you wrote the line of code which I should be adding my code before. But you actually had written the code for me to use.

Thank you very much. Working EXACTLY as I wanted it to. Sorry about the time wasting after that.

P.S. I'm not sure if you are aware, but for some reason the view file is called block_charasteristic. It can cause a little confusion when searching for a view with the term "characteristic".

Last edit: 14 years 3 months ago by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 86322
- Thank you received: 14280
-
-

14 years 3 months ago [\#57892](#57892) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Change characteristic popup if only one option](/forum/4-how-to/57616-change-characteristic-popup-if-only-one-option#57892 "There is a need to occasionally have a product with only one characteristic as a variant, e.g. we have a shirt only in Red. But we want it to be a product with a variant because in future we may add other colours.  Now with only one option in a characteristic, it looks on with a pop-up with only one choice. What I would like to do is to either not have the Characteristic appear as a pop-up on the product page, or for it to appear as a Text instead of a popup.  I see that the code is placed by view-&gt;product-&gt;show&#95;block&#95;charasteristic, but I can not see where it is put together. Can you please direct me to the correct file?  Thanks")*

Thank you for the feedback. We'll change the name of the file (you will have to do again your customization after updating).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU3NjE2LWNoYW5nZS1jaGFyYWN0ZXJpc3RpYy1wb3B1cC1pZi1vbmx5LW9uZS1vcHRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.080 seconds

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

[](#top)
