AbanteCart Community

eCommerce construction => How-to questions => Topic started by: JIMMY on December 28, 2017, 02:35:59 AM

Title: how to set "random display product" at main page category block
Post by: JIMMY on December 28, 2017, 02:35:59 AM
hi sir/madam.
i running eCommerce website. i notice that the "category special" always displayed the same products at the main page. how to set it to random display product? mean every time i refresh my page. tat category special will automatic display different products.

thanks guy.
Title: Re: how to set "random display product" at main page category block
Post by: abantecart on January 03, 2018, 10:53:51 PM
Are you showing specials block?  You will need to code random section into promotions class for the database select.

See this method:
https://github.com/abantecart/abantecart-src/blob/a9df918cee40cc7f32e68ee136a683dc30632f5c/public_html/core/engine/promotion.php#L337
Title: Re: how to set "random display product" at main page category block
Post by: JIMMY on January 04, 2018, 08:52:49 AM
May i know where to put the coding? I need to create a new "promotion.tpl" and put into ../storefront/view/default/template/pages/product? Thanks