Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Improved Search Results Pagination

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 12-14-2006, 08:59 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Improved Search Results Pagination

Better looking search result pages pagination, easy to customise, v4.0.x and v4.1.x

http://www.xcartmods.co.uk/images/nav.jpg

1) Replace...

skin1/customer/main/navigation.tpl

with...

Code:
{* Better looking navigation.tpl - www.xcartmods.co.uk *} {assign var="navigation_script" value=$navigation_script|amp} {if $total_pages gt 2} <div class="navigation"> <ul> {if $current_super_page gt 1} <li><a href="{$navigation_script}&page={math equation="page-1" page=$start_page}" title="{$lng.lbl_prev_group_pages}">&laquo;&laquo;</a></li> {/if} {section name=page loop=$total_pages start=$start_page} {if %page.first%} {if $navigation_page gt 1} <li><a href="{$navigation_script}&page={math equation="page-1" page=$navigation_page}" title="{$lng.lbl_prev_page}">&laquo;</a></li> {/if} {/if} {if %page.index% eq $navigation_page} <li title="{$lng.lbl_page} {%page.index%}"><a href="#" class="currentpage">{%page.index%}</a></li> {else} <li><a href="{$navigation_script}&page={%page.index%}" title="{$lng.lbl_page} {%page.index%}">{%page.index%}</a></li> {/if} {if %page.last%} {math equation="pages-1" pages=$total_pages assign="total_pages_minus"} {if $navigation_page lt $total_super_pages*$config.Appearance.max_nav_pages} <li><a href="{$navigation_script}&page={math equation="page+1" page=$navigation_page}" title="{$lng.lbl_next_page}">&raquo;</a></li> {/if} {/if} {/section} {if $current_super_page lt $total_super_pages} <li><a href="{$navigation_script}&page={math equation="page+1" page=$total_pages_minus}" title="{$lng.lbl_next_group_pages}">&raquo;&raquo;</a></li> {/if} </ul> </div> {/if}

2) In...

skin1/skin1.css

and

skin1/skin1_admin.css

add...

Code:
/* Better looking navigation START - www.xcartmods.co.uk */ .navigation{ padding: 5px; } .navigation ul { margin: 0; padding: 0; text-align: center; font-size: 1.0em; } .navigation li { list-style-type: none; display: inline; padding-bottom: 1px; } .navigation a, .navigation a:visited { padding: 4px 4px 4px 4px; border: 1px solid #9aafe5; text-decoration: none; color: #2e6ab1; font-weight: bold; } .navigation a:hover, .navigation a:active { border: 1px solid #2b66a5; color: #000; background-color: #E2E9F1; font-weight: bold; text-decoration: none; } .navigation a.currentpage { background-color: #2e6ab1; color: #FFF !important; border-color: #2b66a5; font-weight: bold; cursor: pointer; font-weight: bold; text-decoration: none; } .navigation a.currentpage:hover, .navigation a.currentpage:active { background-color: #2e6ab1; border-color: #9aafe5; } /* Better looking navigation END - www.xcartmods.co.uk */

__________________
xcartmods.co.uk
Reply With Quote

The following 3 users thank PhilJ for this useful post:
donavichi (10-25-2009), JWait (02-04-2009), spyderwoman (05-23-2009)
  #2  
Old 12-14-2006, 09:06 AM
  NightFire's Avatar 
NightFire NightFire is offline
 

X-Adept
  
Join Date: Jul 2004
Location: The Netherlands
Posts: 561
 

Default Re: Improved Search Results Pagination

Thank you very much. Really a great improvement in layout
__________________
Best regards,
Niki Buitenrust Hettema

X-Cart Gold 4.1.8 (Live & Loaded)
Royal Bhaktapur: Handmade products from Nepal - Pashmina's, scarfs, shawls, stola's and more...
Reply With Quote
  #3  
Old 12-14-2006, 10:59 AM
 
herseyc herseyc is offline
 

Member
  
Join Date: Jun 2006
Location: Suffolk, VA
Posts: 28
 

Default Re: Improved Search Results Pagination

Very nice - Thanks
__________________
Hersey
http://www.chopperstickers.com/
X-Cart 4.1.3
Linux
Reply With Quote
  #4  
Old 12-14-2006, 12:32 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default Re: Improved Search Results Pagination

But I like the unintuitive pagination buttons you can barely see to read, plus the pagination has page images, get it, pages for pagination?
Reply With Quote
  #5  
Old 12-15-2006, 06:45 PM
 
Metal-X-Man Metal-X-Man is offline
 

eXpert
  
Join Date: Mar 2003
Location: Columbus, Ohio
Posts: 204
 

Default Re: Improved Search Results Pagination

PhilJ,

Once again, your mods are much appreciated! I didn't even realize I couldn't stand those standard x-cart nav links!

Metal-X-Man
__________________
X-Cart Gold
ver. 4.1.3

http://www.musicianslibrary.com
Reply With Quote
  #6  
Old 03-02-2008, 04:23 PM
 
Metal-X-Man Metal-X-Man is offline
 

eXpert
  
Join Date: Mar 2003
Location: Columbus, Ohio
Posts: 204
 

Default Re: Improved Search Results Pagination

Have you noticed that the wonderfully painful IE7 stretches out the active nav box on this great mod?

Anybody have a fix for this? If I fix it, I'll post something too.

Metal-X
__________________
X-Cart Gold
ver. 4.1.3

http://www.musicianslibrary.com
Reply With Quote
  #7  
Old 03-02-2008, 04:49 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Improved Search Results Pagination

I've updated the code, should fix the IE7 issue, although the colours are now blue.
__________________
xcartmods.co.uk
Reply With Quote
  #8  
Old 03-02-2008, 05:14 PM
 
Metal-X-Man Metal-X-Man is offline
 

eXpert
  
Join Date: Mar 2003
Location: Columbus, Ohio
Posts: 204
 

Default Re: Improved Search Results Pagination

Perfect! It looks better than the original!

Nice work Phil and thanks!

Metal-X
__________________
X-Cart Gold
ver. 4.1.3

http://www.musicianslibrary.com
Reply With Quote
  #9  
Old 03-20-2008, 02:47 PM
 
fotodog13 fotodog13 is offline
 

Senior Member
  
Join Date: Sep 2007
Posts: 126
 

Default Re: Improved Search Results Pagination

Hey Phil,
I would love to use this but I am getting an error message


Error: Smarty error: [in customer/main/navigation.tpl line 1]: syntax error: unrecognized tag: \rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf470 {\fonttbl\f0\fswiss\fcharset77 Helvetica; (Smarty_Compiler.class.php, line 436)

Do I need to do anything other than replace the navigation.tpl and add the skin1.css code- ( stupid question do I have to remove things in the skin1.css aswell?

Thanks for the help

Scott V
4.18
Apache
__________________
scott v
x cart version 4.1.8 (Unix)
Reply With Quote
  #10  
Old 03-20-2008, 02:53 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Improved Search Results Pagination

Save the code as plain text, then upload it. Looks like you've used some kind of word processor there.
__________________
xcartmods.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:01 PM.

   

 
X-Cart forums © 2001-2020