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 11 years, 1 month 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 11 years, 1 month ago #526

  • admin
  • OFFLINE
  • Platinum Boarder
  • 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 11 years, 1 month 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 11 years, 1 month ago #528

  • admin
  • OFFLINE
  • Platinum Boarder
  • 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 11 years, 1 month ago #529

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