Jump to content

[SOLVED] Categories Disappear On Product Page


Recommended Posts

Hi Andy,

I took a look and compared your product page to your home page, and noticed a slight difference. On the product page, please find this code snippet

<ul class="tree dhtml" style="display: none; ">

 

And replace

style="display: none; "

with

style="display: block; "

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

I have searched through all the css files but can't find the above code.

 

I did try to change the template to the original 'PrestaShop' theme, but then all products with the category disappear. At the top of the category it does say 'There are 15 products', but none are visible. The only good thing about switching themes is that the Categories do show up.

 

I have run out of places to look for the code:

 

<ul class="tree dhtml" style="display: none; ">

 

Help!

Link to comment
Share on other sites

I have been trying to work out what might have caused this, and there is only one thing that's changed.

 

I have some products with attributes and the price increases for some of these products. I wanted to have 'from' before the price in the product list. I was unable to work out how to get this done, so Mark (handlestudio) kindly made the change to the product-list tpl file. When uploaded it worked fine, and I didn't notice any issue with the category block at the time.

 

I have now tried uploading the old product-list tpl file and the category block is visible when viewing a product. I must say thanks to Mark for suggesting I back up before uploading the file.

 

I can't see why this slight change would cause the problem.

 

The line:

{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />{/if}

 

has been changed to:

 

{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}{if $product.id_product_attribute}{l s='from'}{/if}{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{/if}</span><br />{/if}

 

I have kept the original tpl file so the categories still show okay, but the 'from' is now missing.

 

To me, it doesn't make any sense as to why the change above would cause the problem

Link to comment
Share on other sites

  • 9 months later...
  • 3 weeks later...

So...

When I open Firebug in Firefox, it says : resizeAddressesBox() is not defined.

 

So, I find out, that this function is in in yourtheme/js/tools.js.

Copy it from original theme to your theme

 

OR

 

just comment

$(document).ready(function()
{
if (typeof(formatedAddressFieldsValuesList) != 'undefined')
 updateAddressesDisplay(true);
//resizeAddressesBox();  <---- this line
});

in yourtheme/js/order-address.js

now its working!!!

 

 

Problem is only javascript, if you turn off ajax in module blockcategories, it will be working too...

Edited by haunter (see edit history)
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...