Jump to content

[solved] Change ordering in ps_newproducts


Recommended Posts

Hi,
I'm trying to change the ordering mode in ps_newproducts. I don't understand how prestashop orders the products in this module.
The store has been set to order products by add date, but the module still using another way to order the new products. (cache cleared too)

I tryed to modify the ps_newproducts.php file 
at this point it make the query to obtain the products to display, and I've added the order_by and the order_way parameters as :

        if (Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) {
            $newProducts = Product::getNewProducts(
                (int)$this->context->language->id,
                0,
                (int)Configuration::get('NEW_PRODUCTS_NBR'),
                false,
                "date_add",
                "DESC"                
            );
        }

but nothing change. (cache deleted and /var/cache//cass_index.php deleted.

 

Thanks for help.

 

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

  • nick_developer changed the title to [solved] Change ordering in ps_newproducts

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