Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Aug 2009
    Posts
    60
    Plugin Contributions
    0

    Default Warning: Division by zero in attributes_controller.php

    I too am having trouble with making certain products "downloadable". I followed the attributes and download tutorial on the zencart site and then read some of the related posts here.

    When I go to the attributes controller and select "patterns", I see two products listed, both of which are eventually supposed to be downloadable. I click on one of the products and then "display" which then directs me to a page that says "preview attributes display for ID #201 Golden Tulip Cowl Pattern". Below that is a radio button that says "download: (o) pdf file", where (o) is the radiobutton.

    If I go back to the "attributes controller page", there is a legend, then two lines below that which say:

    "Warning: Division by zero in /home/vg002web00/80/04/2000480/web/estore2/admin/attributes_controller.php on line 1006

    Warning: Division by zero in /home/vg002web00/80/04/2000480/web/estore2/admin/attributes_controller.php on line 1007"


    Then at the bottom of the attributes page it has a thing that says "No Attributes Defined for Product ID#201 - Golden Tulip Cowl Pattern"

    How could that be true if the preview did show the correct radiobutton?

    When I login as a test user and try to purchase this pattern, I see a comment during checkout that says something about the pdf download which came about only after I added the radio button. However, I never get any message or thing that starts the download.

    I have no idea what to do next even after reading some of the tutorials and posts. Any idea what is going wrong?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: trouble with making certain products "downloadable"

    Quote Originally Posted by Snicklefritz View Post
    "Warning: Division by zero in /home/vg002web00/80/04/2000480/web/estore2/admin/attributes_controller.php on line 1006

    Warning: Division by zero in /home/vg002web00/80/04/2000480/web/estore2/admin/attributes_controller.php on line 1007"
    Those are a result of you having set the Maximum number of attributes displayed per page to 0.

    Admin->Configuration->Maximum Values->Products Attributes - Attributes Controller Display ... set this to something usable, like maybe 20 or 30
    .

    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.

  3. #3
    Join Date
    Aug 2009
    Posts
    60
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in attributes_controller.php

    ok. I went to the location you suggestion and saw that yeah, those things were zero so I changed them.

    Is there a way to set myself up as a test customer so I can see how this works without using an actual cc card? I forgot how to do this...

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in attributes_controller.php

    Quote Originally Posted by Snicklefritz View Post
    Is there a way to set myself up as a test customer so I can see how this works without using an actual cc card? I forgot how to do this...
    You could turn on the MoneyOrder module temporarily. Remember in this case you'll need to manually update the order's status from Pending to Processing before the downloads will be available to the customer.
    .

    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.

  5. #5
    Join Date
    Aug 2009
    Posts
    60
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in attributes_controller.php

    Quote Originally Posted by DrByte View Post
    You could turn on the MoneyOrder module temporarily. Remember in this case you'll need to manually update the order's status from Pending to Processing before the downloads will be available to the customer.

    Ok I turned on the money order module and placed an "order" for the troublesome product. The order is now listed as "processing", but I don't see anything anywhere about downloading it. When I looked at the order information under "my account", I see the pattern listed there "Golden Tulip Cowl Pattern", with the note "download pdf file" listed below it. Order status appears there as "processing" so I know I set that part correctly.

    When I added the item to my cart I did see the radiobutton. Where and how is the download supposed to appear? In the attribute section I remember uploading the pdf file to the download folder so the file is there, but not sure what to do next.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in attributes_controller.php

    The download link will show in your My Account area, when viewing the order details. You'll see the filename, and it will be clickable.
    If the download has expired, you will see a message about that instead of the filename and link.
    .

    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.

  7. #7
    Join Date
    Aug 2009
    Posts
    60
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in attributes_controller.php

    Quote Originally Posted by DrByte View Post
    The download link will show in your My Account area, when viewing the order details. You'll see the filename, and it will be clickable.
    If the download has expired, you will see a message about that instead of the filename and link.
    I checked "My Account" and saw the following:

    1 ea. Golden Tulip Cowl Pattern
    * Download - PDF file $3.00

    below that is a line for sales tax and total.

    The line that says "*download - PDF file" isn't clickable and the name of the actual pdf file doesn't appear anywhere, even though I did upload it on the attributes controller or whatever other page it was where zencart asks for that.

    I must have something set incorrectly somewhere or perhaps missed a step. Any thoughts on what else I should try to get this to work?

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in attributes_controller.php

    What are your settings in Admin->Configuration->Attribute Settings?
    Which ones have you changed from defaults, and why?
    .

    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.

  9. #9
    Join Date
    Aug 2009
    Posts
    60
    Plugin Contributions
    0

    Default Re: Warning: Division by zero in attributes_controller.php

    Quote Originally Posted by DrByte View Post
    What are your settings in Admin->Configuration->Attribute Settings?
    Which ones have you changed from defaults, and why?
    enable downloads: true
    download by redirect: true
    download by streaming: false
    download expiration: 2
    # downloads per product: 1
    update status value: 4
    status value >= lower value: 2
    status Value <= upper value: 4
    enable price factor: true
    Enable quantity discount: false
    enable attribute images: false
    enable text pricing by word or letter: true
    text pricing spaces are free: 1
    read only option type - ignore: 1

  10. #10
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Warning: Division by zero in attributes_controller.php

    When you click on the order in your Admin side, and click Edit, it shows you the downloadable files on the left side below the order details/pricing/etc. It includes the download count and expiry date. What are those showing?
    And then below that is the order-status-history area which records customer comments and admin comments, along with order status level. What's the history showing on this order?
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 PHP Warning: Division by zero header_php_review.php
    By cyberfolli in forum General Questions
    Replies: 5
    Last Post: 15 Oct 2015, 02:53 PM
  2. v151 PHP Warning: Division by zero in public_html/store/includes/classes/c
    By lilly06 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 2
    Last Post: 27 Sep 2013, 06:29 PM
  3. Replies: 11
    Last Post: 1 Feb 2013, 07:12 PM
  4. Warning: Division by zero in /includes/classes/shipping.php on line 94
    By keycraze in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 21 Sep 2008, 09:40 PM
  5. Replies: 3
    Last Post: 27 Jan 2007, 05:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg