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

#   Trying to display an intro text that is different for each variant

##

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 4 months ago [\#272157](#272157) by [roojai](/forum/user/9880-roojai "View roojai's Profile")  *[Trying to display an intro text that is different for each variant](/forum/26-product-category-display/890767-trying-to-display-an-intro-text-that-is-different-for-each-variant#272157 "This should be quite easy I would have thought but I just cant seem to do this!  I could not get the default &quot;read more&quot; function to work , to divide the content into intro and main. IT just wont display even if I add the code element-&gt;extraData-&gt;topEnd)) { echo implode(&quot;&#92;r&#92;n&quot;, $this-&gt;element-&gt;extraData-&gt;topEnd); } ?&gt;  So instead I added a custom field called &quot;introduction&quot;. This is fine but when I displayed the field with  row-&gt;introduction; ?&gt;  And this works but the field does not change with the variants.  So I checked the &quot;normal&quot; custom field display and the field does change with the variants (using show&#95;block&#95;custom&#95;main.php). The problem here is that it has a title &quot;Specifications&quot; and then the fields are listed in a table, with the field title and then the value.  I only have one custom field so I thought its ok, I can do an over-ride of show&#95;block&#95;custom&#95;main.php and remove the title and the table markup.  This works, BUT for some reason when a variant is selected with options, the &quot;sepcifications&quot; title and the table come back. I cannot find where is coming from - I even modified the core file as well as my over-ride but I can't stop this.  This seems so hard to do such a simple thing. I hope there is an easy solution out there for me. I have checked hundreds of threads and read the documentation many times :(  Thanks.")* was created by *[roojai](/forum/user/9880-roojai "View roojai's Profile")*

This should be quite easy I would have thought but I just cant seem to do this!

I could not get the default "read more" function to work , to divide the content into intro and main. IT just wont display even if I add the code
&lt;?php if(!empty($this-&gt;element-&gt;extraData-&gt;topEnd)) { echo implode("\r\n", $this-&gt;element-&gt;extraData-&gt;topEnd); } ?&gt;

So instead I added a custom field called "introduction". This is fine but when I displayed the field with

&lt;?php echo $this-&gt;row-&gt;introduction; ?&gt;

And this works but the field does not change with the variants.

So I checked the "normal" custom field display and the field does change with the variants (using show_block_custom_main.php).
The problem here is that it has a title "Specifications" and then the fields are listed in a table, with the field title and then the value.

I only have one custom field so I thought its ok, I can do an over-ride of show_block_custom_main.php and remove the title and the table markup.

This works, BUT for some reason when a variant is selected with options, the "sepcifications" title and the table come back. I cannot find where is coming from - I even modified the core file as well as my over-ride but I can't stop this.

This seems so hard to do such a simple thing. I hope there is an easy solution out there for me. I have checked hundreds of threads and read the documentation many times ![:(](/media/kunena/emoticons/22.png ":(")

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTA3NjctdHJ5aW5nLXRvLWRpc3BsYXktYW4taW50cm8tdGV4dC10aGF0LWlzLWRpZmZlcmVudC1mb3ItZWFjaC12YXJpYW50P3RtcGw9bWFya2Rvd24=) 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: 4079
-
- [](http://obsi.dev)
-

9 years 4 months ago [\#272163](#272163) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Trying to display an intro text that is different for each variant](/forum/26-product-category-display/890767-trying-to-display-an-intro-text-that-is-different-for-each-variant#272163 "This should be quite easy I would have thought but I just cant seem to do this!  I could not get the default &quot;read more&quot; function to work , to divide the content into intro and main. IT just wont display even if I add the code element-&gt;extraData-&gt;topEnd)) { echo implode(&quot;&#92;r&#92;n&quot;, $this-&gt;element-&gt;extraData-&gt;topEnd); } ?&gt;  So instead I added a custom field called &quot;introduction&quot;. This is fine but when I displayed the field with  row-&gt;introduction; ?&gt;  And this works but the field does not change with the variants.  So I checked the &quot;normal&quot; custom field display and the field does change with the variants (using show&#95;block&#95;custom&#95;main.php). The problem here is that it has a title &quot;Specifications&quot; and then the fields are listed in a table, with the field title and then the value.  I only have one custom field so I thought its ok, I can do an over-ride of show&#95;block&#95;custom&#95;main.php and remove the title and the table markup.  This works, BUT for some reason when a variant is selected with options, the &quot;sepcifications&quot; title and the table come back. I cannot find where is coming from - I even modified the core file as well as my over-ride but I can't stop this.  This seems so hard to do such a simple thing. I hope there is an easy solution out there for me. I have checked hundreds of threads and read the documentation many times :(  Thanks.")*

Hello,

When you create a thread ; please provide basic details about your website such as the HikaShop version number you're using.
It gives a great help because we can know the features you can use.

Otherwise, if you take a look at the "product / show", you'll see that there is some HTML code for the variants and also some JS to change dynamically blocks content with variant data.
The content you placed in your product page (show_default or show_....) is static.

Regards,

---

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

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

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

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

Less More

- Posts: 29
- Thank you received: 1
-
-

9 years 4 months ago [\#272229](#272229) by [roojai](/forum/user/9880-roojai "View roojai's Profile")  Replied by *[roojai](/forum/user/9880-roojai "View roojai's Profile")* on topic *[Trying to display an intro text that is different for each variant](/forum/26-product-category-display/890767-trying-to-display-an-intro-text-that-is-different-for-each-variant#272229 "This should be quite easy I would have thought but I just cant seem to do this!  I could not get the default &quot;read more&quot; function to work , to divide the content into intro and main. IT just wont display even if I add the code element-&gt;extraData-&gt;topEnd)) { echo implode(&quot;&#92;r&#92;n&quot;, $this-&gt;element-&gt;extraData-&gt;topEnd); } ?&gt;  So instead I added a custom field called &quot;introduction&quot;. This is fine but when I displayed the field with  row-&gt;introduction; ?&gt;  And this works but the field does not change with the variants.  So I checked the &quot;normal&quot; custom field display and the field does change with the variants (using show&#95;block&#95;custom&#95;main.php). The problem here is that it has a title &quot;Specifications&quot; and then the fields are listed in a table, with the field title and then the value.  I only have one custom field so I thought its ok, I can do an over-ride of show&#95;block&#95;custom&#95;main.php and remove the title and the table markup.  This works, BUT for some reason when a variant is selected with options, the &quot;sepcifications&quot; title and the table come back. I cannot find where is coming from - I even modified the core file as well as my over-ride but I can't stop this.  This seems so hard to do such a simple thing. I hope there is an easy solution out there for me. I have checked hundreds of threads and read the documentation many times :(  Thanks.")*

Hi Jerome,

Sorry about that.

And thanks for pointing out the show.php file - that explains it for me ![:)](/media/kunena/emoticons/3.png ":)")

Cheers

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

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

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