Post by Petran » Wed Apr 11, 2012 2:38 pm

Hello,

Does anyone know the solution for sorting the prev-next products alphabetically?

I would like to know where and what to change in the code?

Regards,
Petran

http://www.pavana.nl


Newbie

Posts

Joined
Fri Jul 01, 2011 10:45 pm

Post by rfary » Sat Apr 28, 2012 5:15 am

hi

put jimmyphong code changes into a vqmod file to share. i added << and >> for the display into the code.

hope jimmyphong is okay with this.

works with 5.1.2.1

thanks.

Attachments

previous and next category.


Newbie

Posts

Joined
Sun Jul 03, 2011 7:39 am

Post by al24 » Thu May 31, 2012 8:11 am

I downloaded the xml, using 1.5.1.3, it worked fine until i entered SEO keyword for the products. The prev/next links still display but the products can no longer be found anymore when i click on the prev/next links. does anybody else have this problem?

My opencart 1.5.1.3 - Going Out Dresses


Newbie

Posts

Joined
Thu Feb 09, 2012 9:18 am

Post by pollewops » Tue Mar 05, 2013 4:07 am

I use 1.5.4 and catnextprev.xml works great

New member

Posts

Joined
Mon Feb 04, 2013 5:51 pm

Post by Dahls » Mon Apr 22, 2013 12:01 am

can anyone help me i like to use this on opencart v 1.5.5.1

Newbie

Posts

Joined
Wed Dec 05, 2012 4:36 am

Post by misspiggy » Sat Jun 01, 2013 1:22 am

I use opencart 1.5.5.1 and it seems to work.

Newbie

Posts

Joined
Fri Nov 18, 2011 7:37 pm

Post by nikolai4 » Thu Feb 13, 2014 10:21 pm

Thank you all for cool code

What I got from this code

Take this:

Code: Select all

         if(isset($results['next']) && isset($results['next_title'])){
            $this->data['link_next'] = "<a href=".$this->url->link('product/product',$category_link.'&product_id='.$results['next']).">".$results['next_title']."</a>";
         }else{
            $this->data['link_next'] = null;
         }
Replace with:

Code: Select all

         if(isset($results['next']) && isset($results['next_title'])){
            $this->data['link_next'] = $this->url->link('product/product',$category_link.'&product_id='.$results['next'])
         }else{
            $this->data['link_next'] = null;
         }
Same did with 'prev'. So it gives me opportunity to use img as links like that:

Code: Select all

<a href="<?php echo $link_next; ?>"><img src="next.gif" /></a>
Now maybe someone know how to make this code work on a circle?
Jump from last Item to first one. Because img is not disapear (and I dont need that) when I see first or last product.
Any idea?

Newbie

Posts

Joined
Thu Feb 13, 2014 10:07 pm

Post by Ramore » Wed Mar 19, 2014 4:00 pm

Hi, guys nice job! Products in my site are sorted alphabetically and I want the same for prev next buttons. I tried this : change ORDER BY p.product_id with ORDER BY p.sort_order but nothing happens. Any ideas?

Best regards!

Сватбени покани от Покани.com


Newbie

Posts

Joined
Wed Mar 19, 2014 3:34 pm
Location - Bulgaria
Who is online

Users browsing this forum: No registered users and 5 guests