Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    8
    Plugin Contributions
    0

    Default Error when creating attributes..

    I've entered attributes before for this client's cart without any issue at all. We're trying to create some new ones with aroducts price increasing based on what attributes chosen. Pretty straight forward really. But when I get to the attribute manager and try and add them to the product I get this error...

    "1136 Column count doesn't match value count at row 1
    in:
    [insert into products_attributes values (0, '93', '3', '47', '0', '+', '0', '1', '0', '+', '0', '0', '1', '', '1', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0')]
    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."

    I found one thread on this in the archives but it wasn't really answered in a way that made sense to me - AFAIK no changes were made to the database in the last week or so. Prior to that I did make a database change by adding the unWishlist extension.

    Any thoughts, suggestions, answers or ramblings would be very much welcome. I'm stumped.

  2. #2
    Join Date
    Jan 2004
    Posts
    8
    Plugin Contributions
    0

    Default Re: Error when creating attributes..

    anyone? anyone? Bueller?

    I've noticed that I can't add attributes to anything else either, including something that had attributes already without seeing the same error. This causes me to believe that the table's got an issue but I'm not quite sure how I'd fix it...

    I do have a backup from before I added the unwishlist - can I restore just one table? Should I? Do you think it was the unwishlist that caused the issues?

  3. #3
    Join Date
    Sep 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: Error when creating attributes..

    I am having the same problem, on a fresh install of zencart. Help, anyone? I am clueless when it comes to sql.

  4. #4
    Join Date
    Jan 2004
    Posts
    8
    Plugin Contributions
    0

    Default Re: Error when creating attributes..

    Can you take a look at your Product_attributes table and tell me how many rows there are and what the last row is? The table I'm having issues with seems to have more rows than any other ZenCart install I've seen...

  5. #5
    Join Date
    Jan 2004
    Posts
    8
    Plugin Contributions
    0

    Default Re: Error when creating attributes..

    Ok - after comparing the product_attributes table to countless others, I determined that there was definitely extra stuff in there. I backed it up, deleted the extra columns, and it seems to have fixed the problem and hasn't broken anything. Now I'm just not sure how they got there in the first place.

  6. #6
    Join Date
    Sep 2006
    Posts
    35
    Plugin Contributions
    0

    Default Re: Error when creating attributes..

    Ok, I fixed the problem. As was mentioned elsewhere on this forum, the wholesale pricing module adds two things to the attributes table, but somehow neglects to pass that on to other parts of the script. To fix the problem, I had to modify 2 files.

    In /admin/attributes_controller.php i found:

    $db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . "
    and replaced with:

    $db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
    per DrByte's instructions. That fixed the "count doesn't match value" error, but I still had an error showing on the actual product page, instead of the attributes dropdown list i was expecting. To fix that error,

    in admin/includes/functions/general.php, I changed the following lines:

    after line 1914 ish:
    Code:
    '" . $products_copy_from->fields['options_values_price'] . "',
    add:
    Code:
    '" . $products_copy_from->fields['options_values_price_w'] . "',
    after line 1943 ish:
    Code:
    options_values_price='" . $products_copy_from->fields['options_values_price'] . "',
    add:
    Code:
    options_values_price_w='" . $products_copy_from->fields['options_values_price_w'] . "',

    and many thanks to Boylan for that fix. Now I am able to add attributes and have them display properly. Hope this helps someone else along the way.

    riiver

 

 

Similar Threads

  1. Error when creating an account.
    By Graphicman in forum General Questions
    Replies: 4
    Last Post: 23 Aug 2010, 10:33 AM
  2. Error when creating new account
    By sinsor in forum Managing Customers and Orders
    Replies: 1
    Last Post: 17 Nov 2009, 10:14 PM
  3. Default Attributes for Category or Add Attributes when Creating Products
    By vegascoug in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 17 Sep 2009, 12:03 AM
  4. 1054 Unknown column error when creating option name in attributes.
    By jcun45 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Mar 2008, 07:15 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