Well, I figured out a ghetto way to do this, and it works fine for me.
Explanation below
In my zencart installation, when I press the word "Price" to sort the items, it just adds the following code to the current URL
My installation is in rows, as apposed to column, with my prices being the the 3rd row, so I'm assuming you would change sort="the # of your price row" then a for ascending and d for descending.
Then I edited my template's tpl_modules_product_listing.php file as follows
I add the following code to near the top, just under PHP copyright/ author info.
Code:
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
Then I added the following code right after <div id="productsListingTopNumber" class="navSplitPagesResult back">
Code:
Sort by Price:
<a href="<?php echo curPageURL();?>&page=1&sort=3a">Low to High</a> |
<a href="<?php echo curPageURL();?>&page=1&sort=3d">High to Low</a><br /><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?>
By playing around with the above code, I'm sure you could make a drop down, and just disable the alpha filter to remove the filter by: option.
Anywho, I attached an image of the final results
And now I'm going to go clean up some cat vomit off my carpet! HURRAY!
Bookmarks