show_block_dimensions won't change with variants

  • Posts: 2
  • Thank you received: 0
10 years 3 months ago #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_block_dimensions view to make "Weight:" bold and then the actual value normal.

On lines 25-33,

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.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 3 months ago #203609

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: wjrutecki

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
10 years 3 months ago #203661

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.051 seconds
Powered by Kunena Forum