layout changing when I change characteristics....

  • Posts: 45
  • Thank you received: 0
11 years 9 months ago #89030

Hello!

Why is my product page layout changing when I choose different characteristics for the product?
Please see the example by changing product size (small, medium and large) form the pull-down menu:
smartshop-ks.com/jo/index.php/bukuri/product/2-belvia-bra

for example word "Copë" which disappears when changing product characteristics is added on the hikashop view - product - show_reversed
Also my custom field with content "Çmimi SmartClub 29,90 €" disappears when changing product characteristics.

What should I do? Hope to hear from you soon.

Thanks in advance!

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

  • Posts: 45
  • Thank you received: 0
11 years 9 months ago #89033

Summary:

Content that I've added to view - product - show_reversed.php and my custom field disappears when changing product characteristics. This is the similar case as mine but unfortunately it didn't help me:
www.hikashop.com/en/forum/2-general-talk...-characteristic.html

/Mirlinda

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 9 months ago #89210

Hi,

That's because you've added your customization in the file show_reversed which is used for the default display, but not in the file show of the view product which is where the variants data is displayed.

When you change a characteristic value with the dropdown, the system updates the data on the page to use the data of the variant instead of the default one.
That way, you can have different prices, images, etc for each variant of your product.
So you have two choices:
- You do your modifications in the show view file too
- You remove the data display from the show view file (if you don't need that the display data changes for each variant).

For example, if you remove the code

<div id="hikashop_product_price_<?php echo $variant_name;?>" style="display:none;">
				<?php
				if($this->params->get('show_price','-1')=='-1'){
					$config =& hikashop_config();
					$this->params->set('show_price',$config->get('show_price'));
				}
				if ($this->params->get('show_price')) {
					$this->setLayout('listing_price');
					echo $this->loadTemplate();
				}
?>
			</div>
the variants price data won't be in the page and the price area won't be updated and thus you won't have your price customization "disappearing".

The following user(s) said Thank You: mirlinda.kosova

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

Time to create page: 0.043 seconds
Powered by Kunena Forum