Product characteristic conflict with tabs?

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #52150

Hello,

In my product detail page, I have tabs at the bottom of the page.
However when user selects one of the product characteristic, the jquery for the tabs stopped working.

May I know if there is anything I can do?
Thanks!

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #52223

You can edit the file "show" of the view "product" via the menu Display->Views and remove that code:

<div id="hikashop_product_description_<?php echo $variant_name;?>" style="display:none;">
				<?php echo JHTML::_('content.prepare',preg_replace('#<hr *id="system-readmore" */>#i','',$variant->product_description));?>
			</div>

The following user(s) said Thank You: lovelyweapon

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #52967

Hi Nicolas,

Actually I'm having issue with this part of code for the characteristic :-
Hope you can advise how I should modify the code. Thanks!

function hikashopUpdateVariantData(selection){
if(selection){
var names = [\'id\',\'name\',\'code\',\'image\',\'price\',\'quantity\',\'description\',\'weight\',\'url\',\'width\',\'length\',\'height\',\'contact\',\'custom_info\',\'files\'];

var len = names.length;
for (var i = 0; i < len; i++){
var el = document.getElementById(\'hikashop_product_\'+names+\'_main\');
var el2 = document.getElementById(\'hikashop_product_\'+names+selection);


if(el && el2) el.innerHTML=el2.innerHTML; // this part makes the page css runs from its style and jquery not working. If I disable this line, then it will be fine but the characteristic options will no longer work.
}
if(typeof this.window[\'hikashopRefreshOptionPrice\'] == \'function\') hikashopRefreshOptionPrice();
}
return true;
}

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53076

The modification I proposed will solve that problem.

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53079

Hi Nicolas,

Thanks for your reply. I did, but the CSS still ran out when selecting one of the characteristic item.
Do you have an email that I can send you the login to the site to check? Thanks alot!

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53080

Just to let you know I cleared my browser cache as well and tested :)

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53215

You probably did your modification for the wrong template.
Make sure that you do it for the template you're using on your front end.

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53221

Hi Nicolas, yes I confirmed it was the right template.

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53226

Please give a link to the page.
You can use our contact form:
www.hikashop.com/en/contact-us.html

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53343

Hi Nicolas,

Thank you very much! I have dropped you an email with the login name and password. Thanks! :)

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53408

You're not using tabs in the description of the product like normally but in a custom field. That's why that didn't change anything.
Edit the file "show" of the view "product" and change the line:
<div id="hikashop_product_custom_info_<?php echo $variant_name;?>" style="display:none;">

to:
<div id="hikashop_product_info_<?php echo $variant_name;?>" style="display:none;">

and that should fix the problem.

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53553

Hi Nicolas, thanks for your help. I have tried but the issue is still there. :(

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53623

I've done it for you by changing the name of the id in the show_block_custom_main file.

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53625

Hi Nicolas, thanks for making the changes! I will take a look and see how to make the changes. I went into the site, not sure if you notice the CSS that ran out. The arrow for increase and minus the quantity.
Actually there are other CSS that ran out but I used "display:none" for those. However I can't use it for the plus minus quantity part.

Many thanks again for your help. Really appreciate it.

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
12 years 5 months ago #53633

You should try to add that CSS to avoid that:
.hikashop_product_quantity_field_change_plus {display:block;}

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

  • Posts: 27
  • Thank you received: 0
12 years 5 months ago #53736

Hi Nicolas, many thanks! Didn't know the display:block will be able to solve the issue.
Thanks a lot for your great help. :)

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

Time to create page: 0.081 seconds
Powered by Kunena Forum