Affilistore Mod – CSS Pagination
I'm currently in the process of setting up a number of affiliate marketing sites using the excellent Affilistore Pro v2 product, which enables multiple product data feeds, from multiple merchants & stores to be displayed on a single product/price comparison site.
There's some work to be done on the product to make it fully mature. And I've got & done some mods to it and the theme myself to fit my purposes. I'll be drip-feeding these as I go.
This is a dropin replacement for the table based pagination, replacing it with a ul/li based css version. This can be seen at my first affilistore first site: iWatches. Heck, why not stop around and buy a watch!
1. styleTemplate
Replace the pagination.tpl template with:
2. StyleStylesheet
Add the CSS to the style.css file. There's some redundant css at the bottom, maybe for further use down the line. Change font/color etc to suit your theme
-
/**************/
-
/* Pagination */
-
/**************/
-
.paginate{
-
padding: 0px 0 20px 0;
-
margin: 10px auto 10px
-
}
-
.paginate ul {
-
margin: 0;
-
padding: 0;
-
text-align: center;
-
font-size: 1.063em;
-
line-height: 1.250em;
-
font-weight: normal;
-
}
-
-
.paginate li {
-
position: relative;
-
list-style-type: none;
-
float: left;
-
display: inline
-
}
-
-
.paginate ul li {
-
background-color: #F2F0E9;
-
color: #6A1208;
-
margin: 0
-
}
-
-
.paginate ul li.pgItems {
-
border-left: 1px solid #ABA46D;
-
border-top: 1px solid #ABA46D;
-
border-bottom: 1px solid #ABA46D;
-
padding: 2px 5px 2px 5px;
-
margin: 0
-
}
-
.paginate ul li.pgPages {
-
border-top: 1px solid #ABA46D;
-
border-right: 1px solid #ABA46D;
-
border-bottom: 1px solid #ABA46D;
-
padding: 2px 5px 2px 5px;
-
margin-right: 5px;
-
}
-
.paginate ul li.pgFirstPrev {
-
border: 1px solid #ABA46D;
-
margin-left: 5px;
-
padding: 2px 0;
-
}
-
.paginate ul li.pgId {
-
border: 1px solid #ABA46D;
-
margin-left: 5px;
-
padding: 2px 0;
-
}
-
.paginate ul li a, .paginate ul li a:visited {
-
color: #6A1208;
-
text-decoration: none;
-
padding: 2px 5px 2px 5px;
-
}
-
.paginate ul li a:hover {
-
color: #6A1208;
-
text-decoration: none;
-
background-color: #D4D1AE;
-
}
-
-
.paginate ul li.pgFirstPrev a, .paginate ul li.pgFirstPrev a:visited {}
-
.paginate a.pgFirstPrev:hover {}
-
.paginate ul li.pgId a, .paginate ul li.pgId a:visited {}
-
.paginate a.pgId:hover {}
-
.paginate a.currpage {}
-
.paginate a.disabled, .paginate a.disabled:hover {
-
background-color: white;
-
cursor: default;
-
font-weight: normal !important;
-
}
-
-
.paginate ul span.pgFloat {
-
float:right;
-
}
3. Includes/pagination.inc.php
Find all instances of $plusone. Add a
-
<li class="pgId">
to each one to wrap the anchor tag e.g to get...
-
$plusone .= '<li class="pgId"><a href="'.$currentPage.'?pageNum_product='.min($totalPages_product, $i).$queryString_product.'">'.$i.'</a></li>';
Now go to close to the bottom of the file and find:
-
if ($totalRows_product> $maxRows_product) {
Add the following below, and above the box_border lines
-
//wrap the links
-
$firstpage = '<li class="pgFirstPrev">'.$firstpage.'</li>';
-
$previouspage = '<li class="pgFirstPrev">'.$previouspage.'</li>';
-
$nextpage = '<li class="pgFirstPrev">'.$nextpage.'</li>';
-
$lastpage = '<li class="pgFirstPrev">'.$lastpage.'</li>';
Backup older versions while doing the changes!
I've done similar with the navCategories but that'll have to go into another mod post.





hi, can you tell me how you modified the listings in iwatch so that it is in grid view, thanks in advance.