- Posts: 42
- Thank you received: 0
behaviour when changing variant
14 years 7 months ago #39356
by ALEXIAC
behaviour when changing variant was created by ALEXIAC
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
What am I doing wrong here?
Thanks
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39506
by nicolas
Replied by nicolas on topic Re: behaviour when changing variant
Hi,
For the image with variants, you might have that issue:
www.hikashop.com/forum/4-how-to/32036-th...n.html?lang=en#38414
For the contact button, you should look at these two threads:
www.hikashop.com/forum/3-bug-report/3784...t.html?lang=en#38103
www.hikashop.com/en/forum/3-bug-report/3...isappears.html#38245
For tabber you have that problem:
www.hikashop.com/forum/3-bug-report/1286...d.html?lang=en#12886
For the image with variants, you might have that issue:
www.hikashop.com/forum/4-how-to/32036-th...n.html?lang=en#38414
For the contact button, you should look at these two threads:
www.hikashop.com/forum/3-bug-report/3784...t.html?lang=en#38103
www.hikashop.com/en/forum/3-bug-report/3...isappears.html#38245
For tabber you have that problem:
www.hikashop.com/forum/3-bug-report/1286...d.html?lang=en#12886
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39658
by ALEXIAC
Replied by ALEXIAC on topic Re: behaviour when changing variant
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
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.
14 years 7 months ago #39676
by nicolas
Replied by nicolas on topic Re: behaviour when changing variant
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
and the contact button
Code:
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 }
Code:
<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.
14 years 7 months ago #39811
by ALEXIAC
Replied by ALEXIAC on topic Re: behaviour when changing variant
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.
14 years 7 months ago #39986
by nicolas
Replied by nicolas on topic Re: behaviour when changing variant
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.207 seconds