Joke Collection Website - Blessing messages - I set the product classification page template and the product details page template in ECshop, and the product classification navigation of the website disappeared. How to solve this problem?

I set the product classification page template and the product details page template in ECshop, and the product classification navigation of the website disappeared. How to solve this problem?

Set commodity classification page template and commodity detail page template in ECshop. By default, the product classification navigation of the website is a subcategory under the current classification, not all classification trees.

The solution is to call the function in the page that needs to be displayed first. For example, if the menu needs to be displayed in goods.php, the default state cannot be called first. In this way, we can first add the following code to the goods.php file and choose the location ourselves, as long as it is not in the included functions and procedures.

The code is as follows:

$ smarty-& gt; assign(‘top categories’,get _ categories _ tree(‘0’); //Top-level classification tree

The default method is that 0 in get _ categories _ tree ('0') in product classification page and product details page corresponds to cat_id, so you can display all classification trees by changing it to 0 here.

In this way, we get the top-level classification tree, which smarty assigns to the topcategories variable for calling in the foreground.

similar

& lt! -{ foreach from = $ top categories item = cat }-& gt;

& ltdt class =“{ if $ fenlei _ id eq $ cat . id } angel 1 down { else } angel 1 {/if }“& gt; & lta href =“{ $ cat . URL }“& gt; { $ cat . name | escape:html } & lt; /a & gt; & lt/dt & gt;

This way calls the display.

You can also refer to an article on my website.

/php/0PT220 10.html

If you have any questions, you can call me Baidu, usually online at night.