X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Let Customer choose number of products displayed on page (https://forum.x-cart.com/showthread.php?t=38695)

Holub 11-13-2008 12:23 AM

Re: Let Customer choose number of products displayed on page
 
There are such many changes was done with X-Cart after 4.0.12 that I even can't imagine. I have not this version so I even can't try to install mod. So please excuse me but I can't help you.

Jerrad 11-13-2008 02:10 AM

Re: Let Customer choose number of products displayed on page
 
Thanks for your reply, Holub.
It's a pity, because I really would like to use this mod.

Nobody with version 4.0.x who has got this mod working?

Thanks again!

xcel 12-10-2008 02:54 PM

Re: Let Customer choose number of products displayed on page
 
=D>

works great in 4.1.9

however, it made my

http://forum.x-cart.com/showthread.php?t=20040&highlight=slideshow(conveyor belt slideshow)

go away after implementing.

neither of the codes for this mod or the slideshow mod are in the same place.

any idea as to what may cause this?

xcel 01-15-2009 09:11 AM

Re: Let Customer choose number of products displayed on page
 
1 Attachment(s)
hey guys... how goes it.

i am having issues with this mod. when i choose any of the options for number of items per page, i receive the following error in the attachment.

any idea as to what would cause this? from what i remember, the mod worked fine from the initial install. but now i can't get anything to work besides the default 10 items per page.

i'd love to keep this mod active as i feel it's a great option to provide our customers.

thanks in advance.

EDIT: now it just got even stranger... the error only seems to be happening with 1 of our catagories. this catagory only has 66 items in it. our other catagory which has no issues thus far has 37.

Holub 01-16-2009 12:17 AM

Re: Let Customer choose number of products displayed on page
 
There is one place in X-Cart where this error can appeared - func.db.php

Code:

        foreach ($tbl as $t) {
                if (isset($sql_tbl[$t]))
                        $t = $sql_tbl[$t];

                if (!isset($storage[$t])) {
                        $storage[$t] = func_query_column("SHOW FIELDS FROM ".$t);
                        if (empty($storage[$t]))
                                func_header_location("error_message.php?access_denied&id=78");
                }


Seems like there are some kind of troubles with your database.

xcel 01-16-2009 12:42 PM

Re: Let Customer choose number of products displayed on page
 
Quote:

Originally Posted by Holub
Seems like there are some kind of troubles with your database.


no matter how many times i read that... it never sounds like a good thing. i guess i'll have to track down that php page and see what's going on. if all else fails, i guess i can simply remove the code for this mod.

thanks for the input holub.

clik 04-23-2009 07:29 AM

Re: Let Customer choose number of products displayed on page
 
Quote:

Originally Posted by Jon
I don't want to hijack this thread as it's a good mod... and not my mod... but I've had to assist several store owners who have had the misfortune of having their sites hacked due to varying exploits, so please excuse my paranoia and hesitation to rely on x-cart's data sanitizing :)

Here's the code I would use in change_ppp.php:

Code:

<?php
if ( !defined('XCART_SESSION_START') && ($_SERVER['REQUEST_METHOD'] != "POST")) { header("Location: home.php");}
require_once "auth.php";
x_session_register("products_per_page");
if ($_SERVER['REQUEST_METHOD'] == "POST") {
 if ($ppp) {
  $back = $_SERVER['HTTP_REFERER'];
  if (!$back)
  $back = "/home.php";
  if ($ppp == "all") {
  $ppp = 32767;
  } else {
  $products_per_page = (int)$ppp;
  }
  x_session_save("products_per_page");
  func_header_location($back);
 }
}
if ((int)$products_per_page > 0) {
 $config["Appearance"]["products_per_page"] = $products_per_page;
 $objects_per_page = $config["Appearance"]["products_per_page"];
}
$smarty -> assign("products_per_page",$config["Appearance"]["products_per_page"]);
?>



Thanks guys for this very handy mod :D/
It works in x-cart 4.2 as well but I have a little problem with <option value="all">. It wouldn't make it "selected". It keeps the previous selected value (5/10/20... etc).

Any idea where the problem could be?

I used the code above for the change_ppp.php file.

Thank you!

royng 07-03-2009 03:07 PM

Re: Let Customer choose number of products displayed on page
 
I am a newbie. And I am using 4.1.11. Where is the file "auth.php" located? I looked all over, I only see auth.tpl, is that the same? Second, where so I upload the file change_ppp.php? same location at auth.tpl?

And I can't found
{* $Id: products.tpl,v 1.72.2.3 2006/11/27 11:40:25 max Exp $ *}
{if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y' && $products_has_fclasses}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
{include file="modules/Feature_Comparison/products_check_js.tpl"}

{/if}
skin1/customer/main/products.tpl

Am i missing anything? or Am I looking at different verison?

I am not a programmer.
Please help, Thanks!

royng 07-07-2009 11:50 AM

Re: Let Customer choose number of products displayed on page
 
It's not working! Anyone have a better working code?

royng 07-09-2009 03:41 PM

Re: Let Customer choose number of products displayed on page
 
I have the same problem too, the "All" can not be select.

Maybe this is the way how is it go.

we just have to live with it!


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

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