Quote:
Originally Posted by Christopher728
Does anybody know how, or know of a mod, to modify the product listing page to give the customer a choice between the normal "list" view and the multi column thumbnail view? Ideally I would like to set up buttons/icons which customers can click on to switch views, but a drop down/select box could work too.
If anyone's unclear about what I mean circuitcity.com has their product listing pages setup this way and really like it, so take a look at that.
Thanks in advance
|
Try to do this (but first make backup file
auth.php):
1. Insert into the file "
auth.php" after next lines:
PHP Code:
x_session_register("logout_user");
x_session_register("session_failed_transaction");
x_session_register("add_to_cart_time");
x_session_register("always_allow_shop");
x_session_register("search_data");
next code:
PHP Code:
x_session_register("product_per_row");
if (($product_per_row>=0)&&($product_per_row<4)&&($product_per_row!="")) {
$config["Appearance"]["products_per_row"] = intval($product_per_row);
}
2. Create new file "
change.php" in x-cart root folder with next code:
PHP Code:
<?php
require "./auth.php";
x_session_register("product_per_row");
$id = intval($_GET["per_row"]);
if (($id>=0)&&($id<4)) $product_per_row = $id;
x_session_save();
$referrer = $_SERVER['HTTP_REFERER'];
func_header_location($referrer);
?>
3. Add in some tpl (head, customer/home or ...) links for a choice between the normal "list" view and the multi column thumbnail view
(or change it on select box or images or what you needs):
PHP Code:
<a href="change.php?per_row=0">0 per/row</a>
<a href="change.php?per_row=1">1 per/row</a>
<a href="change.php?per_row=2">2 per/row</a>
<a href="change.php?per_row=3">3 per/row</a>
That all
