X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Improved Search Results Pagination (https://forum.x-cart.com/showthread.php?t=27364)

PhilJ 12-14-2006 08:59 AM

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 */


:)

NightFire 12-14-2006 09:06 AM

Re: Improved Search Results Pagination
 
Thank you very much. Really a great improvement in layout ;-)

herseyc 12-14-2006 10:59 AM

Re: Improved Search Results Pagination
 
Very nice - Thanks

Jon 12-14-2006 12:32 PM

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?

Metal-X-Man 12-15-2006 06:45 PM

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

Metal-X-Man 03-02-2008 04:23 PM

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

PhilJ 03-02-2008 04:49 PM

Re: Improved Search Results Pagination
 
I've updated the code, should fix the IE7 issue, although the colours are now blue.

Metal-X-Man 03-02-2008 05:14 PM

Re: Improved Search Results Pagination
 
Perfect! It looks better than the original!

Nice work Phil and thanks!

Metal-X

fotodog13 03-20-2008 02:47 PM

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

PhilJ 03-20-2008 02:53 PM

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.


All times are GMT -8. The time now is 10:14 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.