Hi Rainer,
What is the logic of this add-on to sort the featured products? And which part of the code should I change to sort featured products by featured_id?
Many thanks, Eddy
Featured Products
Sort Featured Products - Featured Products
Re: Sort Featured Products
Hi Eddy,
Sort order is random. If you wish to change it to featured_id edit the query for example in the index module:
includes\modules\content\index\cm_i_featured_products.php line 68:
change to:
or
Sort order is random. If you wish to change it to featured_id edit the query for example in the index module:
includes\modules\content\index\cm_i_featured_products.php line 68:
Code: Select all
ORDER BY rand() DESC
Code: Select all
ORDER BY featured_id DESC
Code: Select all
ORDER BY featured_id ASC
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact:
Re: Sort Featured Products
Thank you very much! What about the file featured_products.php in the root? It shows all featured products on an independent page, but I could not figure out how products are sorted there, either.
Cheers, Eddy
Cheers, Eddy
-
- VIP Member
- Posts: 85
- Joined: Fri Nov 06, 2020 10:36 am
- Contact:
Re: Sort Featured Products
In the sql of the page there is no order by statement. It should show then by products_id order.
If you wish to change something, add the order by statement at the end of the sql in:
featured.php around line 41:
If you wish to change something, add the order by statement at the end of the sql in:
featured.php around line 41:
Code: Select all
AND pd.language_id = %s
ORDER BY featured_id DESC
EOSQL
, (int)$_SESSION['languages_id']);
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
- PhoenixCart Developer
- Posts: 1184
- Joined: Sat Dec 21, 2019 8:08 am
- : Buy Me A Beverage
- Contact:
Re: Sort Featured Products
Thanks again Rainer!
-
- VIP Member
- Posts: 85
- Joined: Fri Nov 06, 2020 10:36 am
- Contact: