Zen Cart Logo
Forums / Customization from the Admin / help, please! - split-page-results error division by zero

help, please! - split-page-results error division by zero

Locked

Views: 3,886

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
29 Oct 2006, 10:24 PM
#1
vibehappy avatar

vibehappy

New Zenner

Join Date:
Oct 2006
Location:
north carolina
Posts:
3
Plugin Contributions:
0

help, please! - split-page-results error division by zero

i have been working on my shopping cart today, i wanted to take away all links in my product listings, so that i can make a direct link from my website to a particular product and not allow customers to navigate products through zen.

it seems to have worked out well, except now when i try to edit my product, zen cart lists all my categories, but NOT the actual products. it's reading that i have 74 products, but not showing any of them. there is also this warning:

Warning: Division by zero in /home/inspirat/public_html/zen-cart-v1.3.0.2-full-fileset/admin/includes/classes/split_page_results.php on line 47

i'm not sure if it's related...

basically, i figure i changed something that made my product listing go away in my admin section, but i can't figure out what!!!

thanks for any (much needed) help!
ashe

29 Oct 2006, 10:33 PM
#2
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

vibehappy:

it seems to have worked out well, except ....:cry:

Famous last words......... too much.:lol:

29 Oct 2006, 11:00 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: help, please! - split-page-results error division by zero

Sounds like you set your "Maximum Value" for one of the entries in Admin->Configuration->Maximum Values to 0 and ended up with something you didn't expect.

30 Oct 2006, 1:24 AM
#4
vibehappy avatar

vibehappy

New Zenner

Join Date:
Oct 2006
Location:
north carolina
Posts:
3
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

hey, thanks! you were right, and somehow eventhough i spent hours looking at it trying to find the right one to change back, i didn't see it until you said that...lol. guess that's the way it works. thanks so much!!!

17 Jul 2007, 12:48 PM
#5
shaz avatar

shaz

New Zenner

Join Date:
Jun 2007
Posts:
11
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

I get a similar error - check max values nothing set to 0, any suggestions..
below is the warning/error

Warning: Variable passed to each() is not an array or object in /home/public_html/online/includes/classes/db/mysql/query_factory.php on line 114

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/public_html/online/includes/classes/db/mysql/query_factory.php:114) in /home/public_html/online/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/online/includes/classes/db/mysql/query_factory.php:114) in /home/public_html/online/includes/init_includes/init_templates.php on line 78

..
Warning: Division by zero in /home/public_html/online/includes/classes/split_page_results.php on line 76

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_DISPLAY_PRODUCTS_LISTING' at line 7
in:
[select p.products_quantity, p.products_id, p.products_type, p.manufacturers_id, p.products_price, p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price, p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status from zen_products_description pd, zen_products p left join zen_manufacturers m on p.manufacturers_id = m.manufacturers_id, zen_products_to_categories p2c left join zen_specials s on p2c.products_id = s.products_id where p.products_status = 1 and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '9' limit -0, MAX_DISPLAY_PRODUCTS_LISTING]

Thanks for your help

17 Jul 2007, 1:58 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: help, please! - split-page-results error division by zero

First, look to see if in Configuration ... Maximum Values ... you have an entry for:

Products Listing- Number Per Page
Maximum Number of Products to list per page on main page

Next, peek in the configuration table via phpMyAdmin and see if there is a configuration_key for:
MAX_DISPLAY_PRODUCTS_LISTING

It almost looks like you are missing this ... :unsure:

17 Jul 2007, 2:30 PM
#7
shaz avatar

shaz

New Zenner

Join Date:
Jun 2007
Posts:
11
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

Products Listing- Number Per Page
this is set to 10.
:frusty:

just going to check configuration table via phpMyAdmin :lamo:

17 Jul 2007, 5:36 PM
#8
shaz avatar

shaz

New Zenner

Join Date:
Jun 2007
Posts:
11
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

Checked via phpMyAdmin - MAX_DISPLAY_PRODUCTS_LISTING is there and set to 10

HELP!!

17 Jul 2007, 6:59 PM
#9
shaz avatar

shaz

New Zenner

Join Date:
Jun 2007
Posts:
11
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

I can sometime see the home page fine, its when i click on a product ..
http://firstlady-online.com/online/

Checked - No space or extra line at beginning or the end of a .php file
Truncated the db_cache too
Any clues!! ..please check
http://firstlady-online.com/online/

17 Jul 2007, 10:17 PM
#11
shaz avatar

shaz

New Zenner

Join Date:
Jun 2007
Posts:
11
Plugin Contributions:
0

Re: help, please! - split-page-results error division by zero

The good Doctor has done it again!!
DrByte thanks mate ..:hug: