SApetine - Multipurpose Food & Restaurant Shopify Sections Theme
0
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum

We are here to serve :)

Our support team is currently online to solve your issues.

Our support team is currently offline

Our support heroes might not be around this hour. Please expect some delays.

Our support is available from

Monday - Friday 8am - 5:30pm GMT+7

Your time: 00:00:00
Our time: 00:00:00

Welcome, Guest
  • Page:
  • 1

TOPIC: Showing old articles only

Showing old articles only 8 years ago #525

Hi,

I've set the paramater to display recently added items but it display the oldest first. Please advise.

Thanks!

Re: Showing old articles only 8 years ago #526

  • admin
  • OFFLINE
  • Administrator
  • Posts: 1081
  • Karma: 14
Dear kumodiva

Please open modules\mod_yt_k2ajax_tabs\assets\libs-ajax.php file, find this code:

if ($this->sort_order_field == 'random') {
                        $query .=  ' ORDER BY rand()';            
                    } else {
                        $query .=  ' ORDER BY ' . $this->sort_order_field . ' ' . $this->type_order;
                    }


and change to:

if ($this->sort_order_field == 'random') {
	$query .=  ' ORDER BY rand()';            
} else if ($this->sort_order_field == 'created') {
	$this->type_order = 'desc';        
	$query .=  ' ORDER BY ' . $this->sort_order_field . ' ' . $this->type_order;
} else {
	$query .=  ' ORDER BY ' . $this->sort_order_field . ' ' . $this->type_order;
}
Join our Clubs to download our extensions and templates

Re: Showing old articles only 8 years ago #527

The weird thing is, that block of code is no where to be found. Can you update the main files for me to re-install again?

Re: Showing old articles only 8 years ago #528

  • admin
  • OFFLINE
  • Administrator
  • Posts: 1081
  • Karma: 14
Please open modules\mod_yt_k2ajax_tabs\assets\tab_k2_vm.php file

I am sorry
Join our Clubs to download our extensions and templates

Re: Showing old articles only 8 years ago #529

Awesome! It works perfectly now Thanks!
  • Page:
  • 1
Time to create page: 0.35 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Suggested Posts

(/)
Result not found!

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes