Jump to content

How to redirect home feature's content from a category?


Recommended Posts

Hello everyone,

Is it possible to redirect home feature's content from certain category? I was tried to change the id_category from 1 to 3 at homefeatured.php, but the whole column gone to be blank after that. Please advice and help, thanks a lot.

Link to comment
Share on other sites

Hi PrestaShopic,

Thank you for your advice. I change the code from:

$category = new Category(1);
$nb = intval(Configuration::get('HOME_FEATURED_NBR'));
$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10));

to:

$category = new Category(3);
$nb = intval(Configuration::get('HOME_FEATURED_NBR'));
$products = $category->getProducts(intval($params['cookie']->id_lang), 1, ($nb ? $nb : 10));

The result is whole column gone to be blank.

If I change the id to 30(category exist, but no product added), it showed the message: No featured products. But column is active.

Please advice and help, thank you very much.

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