Jump to content

Category tree not working in product.tpl


jordiob

Recommended Posts

Hi!

 

I have this problem with category tree branch, which is that everything on the menu is working in every page, but in product.tpl, causing all the menus not to collapse, but showing.

 

Take a look at category page:

http://bit.ly/nUhimk

 

And the product page:

http://bit.ly/qNqQPq

 

Is it because there's one more level on the URL structure?

domain.com/the-category/name-of-product.

 

How can I solve it?

 

thanks in advance :)

Link to comment
Share on other sites

It used to work, then I made some improvements to fasten the queries as I have more than 50 categories, but now it's just working in some product pages correctly, and not in other product pages (which I, sincerely, can understand).

 

Would be very grateful if anyone could help.

 

Thanks!

Link to comment
Share on other sites

There is a JavaScript error on your product page that is preventing the category block from working. The problem is on line 93 of /themes/farmaciaglobaldotcom/js/product.js:

 

refreshProductImages(0);

 

It seems the refreshProductImages function is missing. My product.js has the following in it:

 

// Change the current product images regarding the combination selected
function refreshProductImages(id_product_attribute)
{
   $('#thumbs_list_frame').scrollTo('li:eq(0)', 700, {axis:'x'});
   $('#thumbs_list li').hide();
   id_product_attribute = parseInt(id_product_attribute);

   if (typeof(combinationImages) != 'undefined' && typeof(combinationImages[id_product_attribute]) != 'undefined')
   {
       for (var i = 0; i < combinationImages[id_product_attribute].length; i++)
           $('#thumbnail_' + parseInt(combinationImages[id_product_attribute][i])).show();
   }
   if (i > 0)
       $('#thumbs_list_frame').width((parseInt(($('#thumbs_list_frame >li').width())* i) + 3) + 'px'); //  Bug IE6, needs 3 pixels more ?
   $('#thumbs_list').trigger('goto', 0);
   serialScrollFixLock('', '', '', '', 0);// SerialScroll Bug on goto 0 ?
}

Link to comment
Share on other sites

  • 2 months later...

i have the same problem too, and I think I have found the problem, it is on product.js,... it has a conflict on product.js... I removed the codes below on product.js and it works..



// Hide the customization submit button and display some message
$('p#customizedDatas input').click(function() {
$('p#customizedDatas input').hide();
$('p#customizedDatas').append('<img src="' + img_ps_dir + 'loader.gif" alt="" /> ' + uploading_in_progress);
});

//init the price in relation of the selected attributes
if (typeof productHasAttributes != 'undefined' && productHasAttributes)
findCombination(true);

sorry for my bad english

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...