Jump to content

[solved] Where can I set "ORDER BY" in specials ?


Recommended Posts

you're talking about prices drop page? or about some external module? Im asking because you said "specials module" and this is a little unclear for me

 

waiting for you reply

 

regards

 

Sorry, yes I'm talking about the standard module "Blockspecials" about the drop prices

I have the 1.4.7 version of PS

Link to comment
Share on other sites

In specials page

 

now it's all clear. thanks.

 

By default there is a select box where you can specify the ORDER BY option

2E1YpeO.png

 

If you want to modify DEFAULT order by, you need to change public static function getPricesDrop function in the classes/Product.php.

 

 

this function looks like:

 

public static function getPricesDrop($id_lang, $page_number = 0, $nb_products = 10, $count = false,
 $order_by = null, $order_way = null, $beginning = false, $ending = false, Context $context = null)
{

 

$order_by = null,

$order_way = null

 

modify default values of this params, available default values:

 

position

price

id_product

date_add

date_upd

name

  • Like 1
Link to comment
Share on other sites

now it's all clear. thanks.

 

By default there is a select box where you can specify the ORDER BY option

2E1YpeO.png

 

If you want to modify DEFAULT order by, you need to change public static function getPricesDrop function in the classes/Product.php.

 

 

this function looks like:

 

public static function getPricesDrop($id_lang, $page_number = 0, $nb_products = 10, $count = false,
 $order_by = null, $order_way = null, $beginning = false, $ending = false, Context $context = null)
{

 

$order_by = null,

$order_way = null

 

modify default values of this params, available default values:

 

position

price

id_product

date_add

date_upd

name

 

OK, I'll find it, thanks very much

It's weird that without "order by" setting, by default PS order it by price, anyway ....

Thank you again

Link to comment
Share on other sites

×
×
  • Create New...