- Posts: 2
- Thank you received: 0
show_block_dimensions won't change with variants
11 years 4 months ago #203607
by wjrutecki
show_block_dimensions won't change with variants was created by wjrutecki
-- 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_block_dimensions view to make "Weight:" 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?
-- 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->config->get('weight_display', 0)) {
if(isset($this->element->product_weight) && bccomp($this->element->product_weight,0,3)){ ?>
<span id="hikashop_product_weight_main" class="hikashop_product_weight_main"> <span style="font-weight:bold">
<?php echo JText::_('PRODUCT_WEIGHT').': '; ?>
</span>
<?php echo rtrim(rtrim($this->element->product_weight,'0'),',.').' '.JText::_($this->element->product_weight_unit); ?></span>
<?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 or Create an account to join the conversation.
11 years 4 months ago #203609
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic show_block_dimensions won't change with variants
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,
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 & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: wjrutecki
Please Log in or Create an account to join the conversation.
11 years 4 months ago #203661
by wjrutecki
Replied by wjrutecki on topic show_block_dimensions won't change with variants
Jerome you are awesome. I spent way too long looking for that. Updating the "show" view fixed it.
Please Log in or Create an account to join the conversation.
Time to create page: 0.161 seconds