Zen Cart Logo
Forums / Basic Configuration / option value manager inserting double records

option value manager inserting double records

Views: 1,034

Results 1 to 3 of 3
18 Oct 2013, 10:25 PM
#1
jeffiec avatar

jeffiec

New Zenner

Join Date:
Jun 2009
Posts:
86
Plugin Contributions:
0

option value manager inserting double records

Not sure if im in the right category, but having an issue, not sure whats doing it, when i apply a new option value, it errors, with a duplicate record error.
I replaced the mysecretadmin/option_value_manager.php as well as the other 2, option names,attributes controller, applyed the fix, and still haveing the issue, not sure if its another mod but it is inside this for statement:

 for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
     if ((int)$languages[$i]['id'] > 0 && !in_array((int)$languages[$i]['id'], $ary)) {
//      $db->Execute("INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES ((int)PRODUCTS_OPTIONS_VALUES_TEXT_ID, " . (int)$languages[$i]['id'] . ", 'TEXT')");
      $db->Execute("INSERT INTO " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) VALUES (" . (int)PRODUCTS_OPTIONS_VALUES_TEXT_ID . ", " . (int)$languages[$i]['id'] . ", 'TEXT')");
    }
  }

i know there are a few languages involved, but would that cause this?
any help appreciated.
ZC 1.5.1
(too many mods to list)
btw, is there a "prefered max mods" lol
Jeff

19 Oct 2013, 4:26 PM
#2
jeffiec avatar

jeffiec

New Zenner

Join Date:
Jun 2009
Posts:
86
Plugin Contributions:
0

Re: option value manager inserting double records

Very interesting observation, the above routine, is supposed to insert the next available record, for some reason, it jumping a couple of hundred numbers?
bad table? i cant figure out why that's doing that, the option names are ok, it only increments by 1, but the option names increments by more than 200 O.O!
Any help appreciated.
Jeff