Author Topic: how to set "random display product" at main page category block  (Read 3720 times)

Offline JIMMY

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
how to set "random display product" at main page category block
« 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.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: how to set "random display product" at main page category block
« Reply #1 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
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline JIMMY

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: how to set "random display product" at main page category block
« Reply #2 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

 

Powered by SMFPacks Social Login Mod