How to modify the random sorting of New Zen cart Products

Source: Internet
Author: User
Tags zen cart

Step 1 of the method for modifying the random sorting of New zencart Products: First, you can define the time period for new products: Shop settings-maximum value-new product definitions

Step 2 of the method for modifying the random sorting of New zencart Products:
Modify the new product on the home page:
/Shortdes/modules/new_products.php

Add the corresponding order by XXX in $ new_products_query.

Example: Select distinct p. products_id, P. products_image, P. products_tax_class_id, PD. products_name, P. products_date_added, P. products_price, P. products_type, P. master_categories_id fromzen_products P, zen_products_description PD where p. products_id = PD. products_id and PD. required age_id = '1' and P. products_status = 1 order by PD. products_name

Step 3 of the method for modifying the random sorting of New zencart Products:
Modify the new product in the border:
/Shortdes/modules/sideboxes/whats_new.php
Set
$ Random_whats_new_sidebox_product = zen_random_select ($ random_whats_new_sidebox_product_query );
Change
$ Random_whats_new_sidebox_product = $ db-> execute ($ random_whats_new_sidebox_product_query );

Step 4 of the method for modifying the random sorting of New zencart Products:

Then, in the/shortdes/modules/new_products.php file:
$ Db-> executerandommulti
Change
$ Db-> Execute

Movenextrandom ()
Change
Movenext ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.