Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    14
    Plugin Contributions
    0

    Default [duplicate report] Duplicate option values in admin

    I'm using ZC 1.3.8(a) ITA. I create an option and when I create value, I see in admin panel two identical entry with some id. For example:

    Create Option Name: COLORE (ita) COLOR (eng)

    Create Option Value (for COLOR): ROSSO (ita) RED (eng)

    I Obtain in admin panel:
    ID OPTION NAME OPTION VALUE
    3 COLOR ROSSO
    3 COLOR ROSSO

    Table: products_options
    products_options_id language_id products_options_name
    3 2 Colore
    3 1 Color

    Table products_options_values
    products_options_values_id language_id products_options_values_name
    0 1 TEXT 0
    0 2 TEXT 0
    2 2 rosso 0
    2 1 red 0

    Table: products_options_values_to_products_options
    products_options_values_to_products_options_id products_options_id products_options_values_id
    6 3 2
    7 1 3

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Duplicate option values in admin

    The id is the same ... the language content changes ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Feb 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: Duplicate option values in admin

    Quote Originally Posted by Ajeh View Post
    The id is the same ... the language content changes ...
    Off course! But there are duplicate values and it isn't correct. In admin panel I see two time value option, identically not only for id. Look: the language is two time italian.

    ID OPTION NAME OPTION VALUE
    3 COLOR ROSSO
    3 COLOR ROSSO

    I think that there aren't errors in DB. I think that is a query problem.


    http://www.zen-cart.com/forum/showthread.php?t=89246

  4. #4
    Join Date
    Feb 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: [NOT A BUG] Duplicate option values in admin

    isn't a bug?

    shure it's a query problem. The query on line 646 from admin/options_values_manager.php generates duplicate rows. here the solution.

    change by adding extra clause as shown:

    $values = "select pov.products_options_values_id, pov.products_options_values_name, pov2po.products_options_id, pov.products_options_values_sort_order from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov left join " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on pov.products_options_values_id = pov2po.products_options_values_id left join " . TABLE_PRODUCTS_OPTIONS . " po on pov2po.products_options_id = po.products_options_id where pov.language_id = '" . (int)$_SESSION['languages_id'] . "' and po.language_id = pov.language_id and pov2po.products_options_values_id !='" . PRODUCTS_OPTIONS_VALUES_TEXT_ID . "' order by po.products_options_name, LPAD(pov.products_options_values_sort_order,11,'0' ), pov.products_options_values_name";

 

 

Similar Threads

  1. v151 Option Values Manager in admin: duplicate entries for each item...why?
    By davemehta in forum General Questions
    Replies: 5
    Last Post: 15 Aug 2013, 11:30 PM
  2. Duplicate option values in admin
    By petek in forum Setting Up Categories, Products, Attributes
    Replies: 17
    Last Post: 23 Mar 2008, 08:30 PM
  3. [duplicate report] Option Value Manager
    By jtjohnston in forum Bug Reports
    Replies: 3
    Last Post: 21 Mar 2008, 07:51 PM
  4. Replies: 3
    Last Post: 1 Aug 2007, 04:39 AM
  5. [duplicate] Option Values Manager
    By draftdesign in forum Bug Reports
    Replies: 2
    Last Post: 2 Jul 2007, 07:17 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR