Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    3
    Plugin Contributions
    0

    Default [Done v1.3.8] Products_Price_Manager update bug Incorrect Integer

    Hi All,

    Maybe you can help - I'm running 1.3.7 on my test IIS XP server & I've noticed that in the admin panel the product price manager encounters an SQL error when trying to update to the database.

    Specifically the error being displayed is:

    1366 Incorrect integer value: '' for column 'products_discount_type' at row 1
    in:
    [update zen_products set products_price='5.0000', products_tax_class_id='0', products_date_available=null, products_last_modified=now(), products_status='1', products_quantity_order_min='1', products_quantity_order_units='1', products_quantity_order_max='0', product_is_free='0', product_is_call='0', products_quantity_mixed='1', products_priced_by_attribute='0', products_discount_type='', products_discount_type_from='', products_price_sorter='0', master_categories_id='2', products_mixed_discount_quantity='' where products_id='1']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


    From what i can see there no values being supplied for products_discount_type and product_discount_type_from which on the products table null is not allowed for these fields

    On my browser window there are no fields called products discount type or product discount type from.

    Is anybody else having this problem?

    Thanks

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

    Default Re: Products_Price_Manager update bug Incorrect Integer

    What version of MySQL are you using?

    What exact updates were you making when this occurred?

    Do you have any mods/customizations installed to your site?

    (FYI --- '' and null are not the same)
    .

    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
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Products_Price_Manager update bug Incorrect Integer

    Quote Originally Posted by lynx View Post
    On my browser window there are no fields called products discount type or product discount type from.
    These would be pulldown menus, only visible if you're adding quantity discounts.
    .

    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.

  4. #4
    Join Date
    Jul 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Products_Price_Manager update bug Incorrect Integer

    DrByte - I am running MySQL 5.0.41 community

    What exact updates were you making when this occurred?
    One and then None - it errors on both - First time I was trying to update the special price for the item - I went into edit mode then typed in the new special price & clicked update and got the error.

    So I then tried just going into prod price manager and go edit then go update without doing anything & I still get the error.

    Do you have any mods/customizations installed to your site?
    Yes

    I have setup overwrite files for english.php for Australian locale and dd/mm/yyyy date formating - instructions obtained from forum posts.

    Add customers from Admin mod

    Time Zone Offset 1.3.7 by Gilby mod

    Online Group Pricing mod merged into my existing 1.3.7 overwrite files to retain existing mods.

    (I'm fairly sure that I was having the problem before Online Group Pricing)

    Thanks for your help

    -Dave

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

    Default Re: Products_Price_Manager update bug Incorrect Integer

    /admin/products_price_manager.php
    around line 130, you have:
    Code:
                products_discount_type='" . zen_db_prepare_input($_POST['products_discount_type']) . "',
                products_discount_type_from='" . zen_db_prepare_input($_POST['products_discount_type_from']) . "',
    add (int) in two places, as shown:
    Code:
                products_discount_type='" . (int)zen_db_prepare_input($_POST['products_discount_type']) . "',
                products_discount_type_from='" . (int)zen_db_prepare_input($_POST['products_discount_type_from']) . "',
    .

    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.

  6. #6
    Join Date
    Jul 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Products_Price_Manager update bug Incorrect Integer

    DrByte - Thanks - I also had to make that mod to the products_mixed_discount_quantity a few lines down so it is as follows:

    Code:
    products_mixed_discount_quantity='" . (int)zen_db_prepare_input($_POST['products_mixed_discount_quantity']) . "'
    Problem solved! Thanks again!

    -Dave

 

 

Similar Threads

  1. Replies: 18
    Last Post: 30 Sep 2015, 07:27 AM
  2. Replies: 2
    Last Post: 22 Jun 2013, 03:48 AM
  3. Replies: 4
    Last Post: 18 Jul 2009, 04:46 PM
  4. Incorrect integer value
    By garybook in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 14 Sep 2007, 05:52 PM
  5. [DONE 1.3.5] Small Bug - Alt Text incorrect
    By madk in forum Bug Reports
    Replies: 2
    Last Post: 26 Jul 2006, 08:14 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