Forums / Upgrading to 1.5.x / Warning: Division by zero in /includes/modules/theme307/featured_products.php

Warning: Division by zero in /includes/modules/theme307/featured_products.php

Started by serovectra on 30 Jan 2013, 3:30 AM · Views: 2,765

Results 1 to 12 of 12
30 Jan 2013, 3:30 AM
#1
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Warning: Division by zero in /includes/modules/theme307/featured_products.php

Upgraded from 1.3.9h to 1.50, Final upgrade does not show items in cart.

I installed the ZenCart update using Dreamweaver FTP, then ran zc_install. PHP Version: 5.2.17 (Zend: 2.2.0). Database: MySQL 5.5.29-log.

The issue started after I did the final update and went live. I tested it perfectly on a copy site, and database, via on how the upgrade instructions informed me.

I have a Theme named 307 as my template, which preformed perfectly on the test site, my log files do give me a:
[29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100
[29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100

I checked these lines, and have searched around for the error I am getting in site after selecting shopping cart, or adding to shopping cart, which is: TEXT_PRODUCT_NOT_FOUND. This error seems to be coming from code in includes/languages/english/document_general_info.php & product_free_shipping_info.php & product_info.php, as well as others that state: ```
define('TEXT_PRODUCT_NOT_FOUND', 'Sorry, the product was not found.');


I searched around on this forum and <http://stackoverflow.com> to figure out if it was a php issue on the template, but I could not figure it out. 

It eludes me, it worked perfectly, I even redid the installation upgrade on the database, and reinserted the updated files into the proper directories again. I would greatly appreciate any advice that would help me to figure this issue out.
30 Jan 2013, 4:16 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

serovectra:

I installed the ZenCart update using Dreamweaver FTPOy. DW is famous for skipping files when doing mass uploads via its so-called "FTP", and never telling you that it failed to upload half of your files.
I never trust DW for mass uploads. Maybe one file at a time, sure. But never entire directories or subdirectories.

serovectra:

I have a Theme named 307 as my template, which preformed perfectly on the test siteTM templates are very prone to problems especially since they hack apart a lot of the core code and seldom update any of them to correctly work with the latest version of Zen Cart let alone the latest version of PHP.
serovectra:

my log files do give me a:
[29-Jan-2013 11:23:58] PHP Warning: Division by zero in /home2/koonberr/public_html/zen_test/includes/modules/theme307/featured_products.php on line 100Sounds like a coding error in their customized file.
serovectra:

I checked these lines, and have searched around for the error I am getting in site after selecting shopping cart, or adding to shopping cart, which is: TEXT_PRODUCT_NOT_FOUND. This error seems to be coming from code in includes/languages/english/document_general_info.php & product_free_shipping_info.php & product_info.php, as well as others that state: ```
define('TEXT_PRODUCT_NOT_FOUND', 'Sorry, the product was not found.');

> **serovectra:**
>
> It eludes me, it worked perfectly, I even redid the installation upgrade on the database, and reinserted the updated files into the proper directories again. I would greatly appreciate any advice that would help me to figure this issue out.

What exactly is different between your test site and your live site? Obviously there are differences or it would be working fine in both instead of only working correctly on the test site.  You could be missing important files on the live site, you might have "extra" files on your live site which are interfering with normal operation, you might have different content in the live-site database compared to the content on your test-site database, the two servers might be using different PHP versions, and the list goes on.

<http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jan 2013, 4:24 AM
#3
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

Thank you for the quick response, I will go ahead and restart the test site from scratch. I will also use winmerge to see the difference in individual files between the test server, and the live server. I think you may be on key with the fault of DW's FTP, do you have any good recommendations for open source "FTP" programs? I know I could google it, but you seem to be someone who is much more in-tuned, considering you answer 85% of the problems on zen-cart, and apply the information for updates.

30 Jan 2013, 4:26 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

I find this list rather helpful: http://www.zen-cart.com/wiki/index.php/Useful_Tools

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Jan 2013, 12:33 AM
#5
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

I redid the entire site again, from scratch, using winSCP to upload the files. I also decided to use the default ZenCart Template, but I still receive the "TEXT_PRODUCT_NOT_FOUND" when I go to the check out, or I check my cart. I'm starting to think it's a database error. Any other ideas?

31 Jan 2013, 1:13 AM
#6
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

Sorry, this is the error I am getting now.

[30-Jan-2013 18:10:07] PHP Warning: Division by zero in /home2/koonberr/public_html/includes/functions/functions_general.php on line 1302
[30-Jan-2013 18:10:07] PHP Warning: Division by zero in /home2/koonberr/public_html/includes/functions/functions_general.php on line 1302

31 Jan 2013, 2:19 AM
#7
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

I solved this simply. I reverted back to 1.3.9H, and will keep this until my clients are ready to use a template that is for 1.5X +. Probably use Theme Forest, since I doubt they want to pay me to customize a free one from scratch to meet their requirements in design. Thanks for your help Dr., I will still be playing with this on my personal server, because I'm pretty sure I can get it to work eventually. I have another Zen site to update, and luckily I am using one of the well known free zen templates that are offered, hopefully this update will be smoother :frusty:.

31 Jan 2013, 3:21 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

serovectra:

I still receive the "TEXT_PRODUCT_NOT_FOUND" when I go to the check out, or I check my cart. I'm starting to think it's a database error. Any other ideas?If it's literally saying "TEXT_PRODUCT_NOT_FOUND" instead of the defined language string normally used for that, then you're missing language files or part of their content.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

31 Jan 2013, 5:52 AM
#9
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

DrByte:

If it's literally saying "TEXT_PRODUCT_NOT_FOUND" instead of the defined language string normally used for that, then you're missing language files or part of their content.

I'm starting to think that FTP is inconsistent in general, despite what program I am using, specially when I am dealing with uploads of masses of individual files. When I reverted to 1.3.9h, I was getting blank pages everywhere. So I decided to upload some files individually, and low and behold it starts to work. Geez talk about tedious, there is no way I can charge them for the time I spent on this, ah well, it's a good learning experience. Personally I think there should be a reliable FTP program out there, or maybe it's the hosting companies server... "Hostmonster" <- are they terrible?

31 Jan 2013, 6:06 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

serovectra:

Personally I think there should be a reliable FTP program out therehttp://www.zen-cart.com/wiki/index.php/Useful_Tools

serovectra:

or maybe it's the hosting companies server... "Hostmonster" <- are they terrible?They're generally good, and their support is usually strong too.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Feb 2013, 1:54 AM
#11
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

DrByte:

They're generally good, and their support is usually strong too.Nods in agreement..:yes: I have two clients I inherited last year who are both hosted with Host Monaster.. Knock on wood neither has had issues..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

1 Feb 2013, 6:12 PM
#12
serovectra avatar

serovectra

New Zenner

Join Date:
Nov 2009
Posts:
21
Plugin Contributions:
0

Re: Warning: Division by zero in /includes/modules/theme307/featured_products.php

Figured out what it was. My laptop was breaking data packets over the wireless.