Random sort modification for zen cart incoming items

  • 2020-03-31 21:16:35
  • OfStack

The first step of zencart's new commodity random order modification method : first, new items can define their own time: store Settings - maximum - the definition of new items

The second step of zencart's new commodity random order modification method :
New products on the home page:
/ includes/modules/new_products. PHP

Increment the corresponding ORDER BY XXX in $new_products_query

Ex. : Select distinct p.p roducts_id, p.p roducts_image, p.p roducts_tax_class_id, pd. Products_name, p.p roducts_date_added, p.p roducts_price, p.p roducts_type, p. aster_categories_id fromzen_products p, Zen_products_description pd where p.roducts_id =pd.products_id and pd.language_id = '1' and p.roducts_status = 1order by pd.products_name

The third step of zencart's new commodity random order modification method :
Modify the new products in the border:
/ includes/modules/sideboxes whats_new. PHP
will
$random_whats_new_sidebox_product = zen_random_select ($random_whats_new_sidebox_product_query);
Instead of
$random_whats_new_sidebox_product = $db - > Execute ($random_whats_new_sidebox_product_query);

The fourth step of zencart's new commodity random order modification method :

Then add /includes/modules /new_products.php to:
$db - > ExecuteRandomMulti
Instead of
$db - > The Execute

MoveNextRandom ()
To change for
MoveNext ()


Related articles: