Jump to content

anothernut

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by anothernut

  1. Sorry I am not quite sure what you mean, would you please give me an example. Thanks AN
  2. Ok sorry I hope I have got it all here lol function ImportProductOptionsValue($id) { global $db; //Insert product options values $sql = "SELECT language_id, products_options_values_name FROM puck_products_options_values WHERE products_options_values_id = $id"; if (!$puck_result = $db->sql_query($sql)) { $this->report('[sql failure] ' . $sql . '\r\n' . $db->sql_error($puck_result)); return; } elseif (DEBUG) { $this->report('[sql ok] ' . $sql); } if ($row = $db->sql_fetchrow($puck_result)) { $products_options_values_name = $row['products_options_values_name']; $lang = $row['language_id']; $products_options_values_id = $row['products_options_values_id']; $sql = "SELECT language_id, products_options_values_id, products_options_values_name FROM products_options_values where products_options_values_name LIKE '$products_options_values_name'"; if (!$live_result = $db->sql_query($sql)) { $this->report('[sql failure] ' . $sql . '\r\n' . $db->sql_error($live_result)); return; } elseif (DEBUG) { //$this->report('[sql ok] ' . $sql); } if ($row = $db->sql_fetchrow($live_result)) { return $row['products_options_values_id']; } else { $sql = "INSERT INTO products_options_values(language_id, products_options_values_id, products_options_values_name) VALUES ('$lang', '$products_options_values_id', '$products_options_values_name')"; if (!$live_result = $db->sql_query($sql)) { $this->report('<b><u>[sql failure] ' . $sql . '\r\n' . $db->sql_error($live_result) . '</u></b>'); return false; } elseif (DEBUG) { $this->report('[sql ok] ' . $sql); } if (!$products_options_values_id = $db->sql_nextid()) { $this->report("[sql failure] No products options values id returned for $sql, although the query was successful."); return false; } return $products_options_values_id; } } } function ImportProductOption($id) { //Insert product options global $db; $sql = "SELECT language_id, products_options_name FROM puck_products_options WHERE products_options_id = $id"; if (!$puck_result = $db->sql_query($sql)) { $this->report('[sql failure] ' . $sql . '\r\n' . $db->sql_error($puck_result)); return; } elseif (DEBUG) { $this->report('[sql ok] ' . $sql); } if ($row = $db->sql_fetchrow($puck_result)) { $products_options_name = $row['products_options_name']; $lang = $row['language_id']; $sql = "SELECT language_id, products_options_id FROM products_options WHERE products_options_name LIKE '$products_options_name'"; if (!$live_result = $db->sql_query($sql)) { $this->report('[sql failure] ' . $sql . '\r\n' . $db->sql_error($live_result)); return; } elseif (DEBUG) { $this->report('[sql ok] ' . $sql); } if ($row = $db->sql_fetchrow($live_result)) { return $row['products_options_id']; } else { $sql = "INSERT INTO products_options(language_id, products_options_name) VALUES ('$lang', '$products_options_name')"; if (!$live_result = $db->sql_query($sql)) { $this->report('[sql failure] ' . $sql . '\r\n' . $db->sql_error($live_result)); return false; } elseif (DEBUG) { $this->report('[sql ok] ' . $sql); } if (!$products_options_id = $db->sql_nextid()) { $this->report("[sql failure] No products options id returned for $sql, although the query was successful."); return false; } return $products_options_id; } } } Thanks AN
  3. Hi Guys, I have been working on a script to pull in xml product data into an ecommerce store and all works great except that I am having issues with updating the products attributes. These are the errors that I receive when running the script:
  4. Hi Guys, Another noobie to the forum. I have been perusing for a week or so and there is some great advice and info on the forum. Really loving it. Regards AN
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.