Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest
  • Page:
  • 1

TOPIC: Showing old articles only

Showing old articles only 12 years, 9 months 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 12 years, 9 months ago #526

  • admin
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;
}

Re: Showing old articles only 12 years, 9 months 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 12 years, 9 months ago #528

  • admin
Please open modules\mod_yt_k2ajax_tabs\assets\tab_k2_vm.php file

I am sorry

Re: Showing old articles only 12 years, 9 months ago #529

Awesome! It works perfectly now Thanks!
  • Page:
  • 1
Time to create page: 0.22 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.

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
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes