behaviour when changing variant

  • Posts: 42
  • Thank you received: 0
12 years 9 months ago #39356

Hello, I have created some characteristics for a product on my website. My problem is that after I change the variant on the frontend, the product image resolution changes, the "contact us for more information" button disappears ("contact" is enabled for all products) and the Tabber that I inserted below the product is not responding..
What am I doing wrong here?
Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #39506

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

  • Posts: 42
  • Thank you received: 0
12 years 9 months ago #39658

Unfortunately I only managed to solve the tabber issue.
For the other issues I`ve tried all options one by one and all together but nothing changed.
Maybe you could have a look at my link?
www.body-aces.com/index.php/tattoo-needl...uct/31-round-liner-2

Thanks in advance

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #39676

A simple way to fix both issues for you will be to edit the file "show" of the view "product" via the menu Display->views and remove the code related to the display of the images

if (!empty ($variant->images)) {
?>
			<div id="hikashop_product_image_<?php echo $variant_name;?>" style="display:none;">
				<div id="hikashop_main_image_div_<?php echo $variant_name;?>" class="hikashop_main_image_div">
				<?php

				$image = reset($variant->images);
				$height = $this->config->get('product_image_y',$this->config->get('thumbnail_y'));
				$width = $this->config->get('product_image_x',$this->config->get('thumbnail_x'));
				if (!$this->config->get('thumbnail')) {
					echo '<img src="' . $this->image->uploadFolder_url . $image->file_path . '" alt="' . $image->file_name . '" id="hikashop_main_image_' . $variant_name . '" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle" />';
				} else {
					$style = '';
					if (count($variant->images) > 1) {
						if (!empty ($height)) {
							$style = ' style="height:' . ($height +5) . 'px;"';
						}
					}
?>
						<div class="hikashop_product_main_image_thumb" id="hikashop_main_image_thumb_div_<?php echo $variant_name;?>" <?php echo $style;?>>
						<?php echo $this->image->display($image->file_path,true,$image->file_name,'id="hikashop_main_image_'.$variant_name.'" style="margin-top:10px;margin-bottom:10px;display:inline-block;vertical-align:middle"','id="hikashop_main_image_'.$variant_name.'_link"', $width,  $height); ?>
						</div>
					<?php

				}
				if (count($variant->images) > 1) {
?>
					</div><div id="hikashop_small_image_div_<?php echo $variant_name;?>" class="hikashop_small_image_div"><?php

					foreach ($variant->images as $image) {
						echo $this->image->display($image->file_path, 'hikashop_main_image_' . $variant_name, $image->file_name, 'class="hikashop_child_image"','', $width,  $height);
					}
				}
?>
				</div>
			</div>
			<?php  }
and the contact button
<div id="hikashop_product_contact_<?php echo $variant_name;?>" style="display:none;">
			<?php

				if (hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty ($this->element->product_contact)))) {
					echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', @ $this->params, hikashop_completeLink('product&task=contact&cid=' . $variant->product_id), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $variant->product_id) . '\';return false;');
				}
?>
			</div>

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

  • Posts: 42
  • Thank you received: 0
12 years 9 months ago #39811

Thank you Nicolas!! Are there any consequences after deleting this that I may come accross in the future?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #39986

No. When you edit a view of hikashop via this interface, the view modification is saved as an override, so you don't loose it when you update hikashop.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum