[-- PrevNext --] Add Next & Prev links

Request and discuss enhancements to ShopSite

[-- PrevNext --] Add Next & Prev links

Postby bakerman » Mon Apr 25, 2016 6:04 am

[-- PrevNext --]

^ this code use to automatically add "Prev" and "Next" wrapped around the pages on the old Shopsite versions. Example: Prev 1 2 3 Next

Can this be added back to the most recent Shopsite. I am currently on Version: 12 sp2 r2.1
bakerman
 
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio

Re: [-- PrevNext --] Add Next & Prev links

Postby Jim » Mon Apr 25, 2016 9:07 am

The template tag has not been remove so it should still be functioning the same. Depending on the theme you are using there may be CSS that is changing the way it is formatted.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: [-- PrevNext --] Add Next & Prev links

Postby bakerman » Mon Apr 25, 2016 9:27 am

I contacted Lexiconn support and they couldnt figure it out either.

Use this page as an example: http://www.bakersgas.com/miller-arc-armor-welding-gloves.html

Code:
[-- IF PAGE.NumProducts LE 20 --][-- ELSE --][-- PrevNext NoCenter --][-- END_IF --]
[-- LOOP PRODUCTS NOANAME --][-- PRODUCT --][-- END_LOOP PRODUCTS --]
[-- IF PAGE.NumProducts LE 20 --][-- ELSE --][-- PrevNext NoCenter --][-- END_IF --]

Am I missing any code?
bakerman
 
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio

Re: [-- PrevNext --] Add Next & Prev links

Postby Jim » Tue Apr 26, 2016 3:31 pm

I did some experimenting with your code and it works fine. The problem is that the Prev and Next will only display after you have a certain number of pages. On your site there are only 2 pages with 20 products on one and fewer than that on the second page. If you make it so there are more pages the Prev Next will display.

To test this I modified the code to have 2 instead of 20. I then assigned 3 products to a page and set the number of products to put on a page to 2. When I published I got two pages and a 1 2 at the top of each page and no Prev Next. If I assigned 5 product to the page so there would be three pagination pages generated I then get 1 2 3 Next on the first page and Prev 1 2 3 Next on the second page and Prev 1 2 3 on the last page.

So it is only in the case where there are just 2 pages generated that the Pref/Next do not display.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: [-- PrevNext --] Add Next & Prev links

Postby bakerman » Wed Apr 27, 2016 7:21 am

Thank you for looking into this and explaining how it work.
bakerman
 
Posts: 68
Joined: Fri Feb 23, 2007 1:02 pm
Location: Ohio


Return to Enhancement Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron