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

#   show\_block\_dimensions won't change with variants

##

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

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 4 months ago [\#203607](#203607) by [wjrutecki](/forum/user/37496-wjrutecki "View wjrutecki's Profile")  *[show\_block\_dimensions won't change with variants](/forum/26-product-category-display/877307-show-block-dimensions-wont-change-with-variants#203607 "-- url of the page with the problem -- :   rockstarvolumes.com/shop/volumes/product/1-tri-again-again  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : current -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : None  Hi, I'm looked very hard for the same question that I have, but I have not been able to find anything so far.  I updated the show&#95;block&#95;dimensions view to make &quot;Weight:&quot; bold and then the actual value normal.  On lines 25-33,  This works, but when a new variant is selected the text goes back to having a normal weight. Any idea why this is happening?")* was created by *[wjrutecki](/forum/user/37496-wjrutecki "View wjrutecki's Profile")*

-- url of the page with the problem -- : [ rockstarvolumes.com/shop/volumes/product/1-tri-again-again](http://rockstarvolumes.com/shop/volumes/product/1-tri-again-again)
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : current
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : None

Hi, I'm looked very hard for the same question that I have, but I have not been able to find anything so far.

I updated the show_block_dimensions view to make "Weight:" bold and then the actual value normal.

On lines 25-33, Code:

if ($this-&gt;config-&gt;get('weight_display', 0)) { if(isset($this-&gt;element-&gt;product_weight) &amp;&amp; bccomp($this-&gt;element-&gt;product_weight,0,3)){ ?&gt; &lt;span id="hikashop_product_weight_main" class="hikashop_product_weight_main"&gt; &lt;span style="font-weight:bold"&gt; &lt;?php echo JText::_('PRODUCT_WEIGHT').': '; ?&gt; &lt;/span&gt; &lt;?php echo rtrim(rtrim($this-&gt;element-&gt;product_weight,'0'),',.').' '.JText::_($this-&gt;element-&gt;product_weight_unit); ?&gt;&lt;/span&gt; &lt;?php } }

This works, but when a new variant is selected the text goes back to having a normal weight. Any idea why this is happening?

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

11 years 4 months ago [\#203609](#203609) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[show\_block\_dimensions won't change with variants](/forum/26-product-category-display/877307-show-block-dimensions-wont-change-with-variants#203609 "-- url of the page with the problem -- :   rockstarvolumes.com/shop/volumes/product/1-tri-again-again  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : current -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : None  Hi, I'm looked very hard for the same question that I have, but I have not been able to find anything so far.  I updated the show&#95;block&#95;dimensions view to make &quot;Weight:&quot; bold and then the actual value normal.  On lines 25-33,  This works, but when a new variant is selected the text goes back to having a normal weight. Any idea why this is happening?")*

Hi,

You need to also update the view "show" to display the content with the same kind of display for the variants.
Otherwise, the best will be to not put the content into the span with the id "hikashop_product_weight_main" because that span content is updated when you change the variant.

Regards,

---

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

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

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

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

Less More

- Posts: 2
- Thank you received: 0
-
-

11 years 4 months ago [\#203661](#203661) by [wjrutecki](/forum/user/37496-wjrutecki "View wjrutecki's Profile")  Replied by *[wjrutecki](/forum/user/37496-wjrutecki "View wjrutecki's Profile")* on topic *[show\_block\_dimensions won't change with variants](/forum/26-product-category-display/877307-show-block-dimensions-wont-change-with-variants#203661 "-- url of the page with the problem -- :   rockstarvolumes.com/shop/volumes/product/1-tri-again-again  -- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : current -- Browser(s) name and version -- : chrome -- Error-message(debug-mod must be tuned on) -- : None  Hi, I'm looked very hard for the same question that I have, but I have not been able to find anything so far.  I updated the show&#95;block&#95;dimensions view to make &quot;Weight:&quot; bold and then the actual value normal.  On lines 25-33,  This works, but when a new variant is selected the text goes back to having a normal weight. Any idea why this is happening?")*

Jerome you are awesome. I spent way too long looking for that. Updating the "show" view fixed it.

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

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

[](#top)
