Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

zeppo

Members
  • Content count

    4
  • Joined

  • Last visited

1 Follower

About zeppo

  • Birthday 08/01/1984

Profile Information

  • Real Name
    zeppo
  • Gender
    Male
  • Location
    Up north!
  1. The problem lies in amDB::getOne() and the call to tep_db_result($res,0,0), changing the call to include the field 'next' fixes the problem, tep_db_result($res,0,'next'). Only amDB::getNextAutoValue() makes calls to getOne so this is OK for a quick fix, but maybe there is a more elegant solution?
  2. After upgrading to osC 2.3.3.2 and applying the changes to amDB.class.php above, AttributeManager throws an error when adding options and values. 1062 - Duplicate entry '1-2' for key 'PRIMARY' insert into products_options (products_options_id, language_id, products_options_name, products_options_track_stock) values ('1', '2', 'Vikt', '0') [TEP STOP] 1062 - Duplicate entry '1-2' for key 'PRIMARY' insert into products_options_values (products_options_values_id, language_id, products_options_values_name) values ('1', '2', 'Blå245') [TEP STOP] I.e. it seems that AttributeManager has a problem fetching the next auto increment value from the products_options and product_options_values tables. To fetch the new id's the functions in attributeManager.class.php call the amDB::getNextAutoValue() function in amDB.class.php, and id 0 is returned the $id is set to 1 resulting in the error above (if this entry already exists in the database). Doing any changes in admin/includes/database.php is a bad idea so we'll have to work out what to change in amDB.class.php I guess...
×