Jump to content

root Home category and Featured Products


finlanderid

Recommended Posts

After upgrading from PS 1.4.11.0 to 1.6.0.14, I have this question about the root Home category and FPH.

 

I do want the Featured Products on the Homepage to appear on the homepage of the website (Popular tab on default theme).

example: www.example.com/

(I do want Featured Products on the Homepage to appear here, when FPH is enabled and individual products are assigned to the root home category.)

 

I do not want the Featured Products on the Homepage to appear on the "root Home category" category page.

example: www.example.com/1-the-root-home-category

(I do not want Featured Products on the Homepage to appear here. Sub-categories do also appear here, and I want only the Sub-categories to appear here.)

 

I was able to achieve this behavior in 1.4.11.0, but in 1.6.0.14, the Featured Products on the Homepage appear in both places.

 

Is there an easy fix? There is no way to control this behavior in back-office UI, and adjustments in the DB categories table (id_parent, is_root_category, etc.) also were not successful.

 

Am I faced with hacking an IF statement into the tpl?

Edited by finlanderid (see edit history)
Link to comment
Share on other sites

OK, here is how this used to be handled by default, in older versions of PS (my old example is PS version 1.4.11.0).

 

On PS version 1.6.0.14 in CategoryController.php on ~ line 119 ..

 

change this:

$this->assignProductList();

to this:

if ($this->category->id != 1)
$this->assignProductList();

As a result, featured products will appear on the store homepage (Popular tab), but will not appear as a product list in the home "root" category (assuming your category->id for the home root is 1).

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...