• Welcome to KonaKart Community Forum. Please login or sign up.
 

import problem

Started by mtoon, May 05, 2008, 05:33:30 pm

Previous topic - Next topic

mtoon

Just started seeing an odd problem...  the importer is now duplicating rows.  We do not have a product id in the import, but we do have a SKU.  What would be causing this?  The entire product master is being duplicated each time.

Thank you

ryan

The logic is as follows:


  • If you have an id, this is guaranteed to be unique so it searches for a product with the same id and if it finds it, it does an edit.

  • If you don't have an id, it searches for an SKU and edits the product if it finds only one with a matching SKU. If it finds more than one, it throws an exception.

  • If it can't find a matching SKU or matching id it does an insert.




mtoon

We have a SKU, no ID and it's still failing...  Here's the first row from the import (and the header).  What's so odd is that it used to work fine and now it's duplicating...  How is the ID/SKU lookup being performed?  Could that be failing for some reason and then the whole line is considered new?  Thanks!

v_products_id   v_products_sku   v_products_model   v_products_image   v_products_image2   v_products_image3   v_products_image4   v_products_name_1   v_products_description_1   v_products_comparison_1   v_products_url_1   v_products_price   v_products_weight   v_date_avail   v_date_added   v_products_quantity   v_manufacturers_name   v_categories_name_1   v_categories_name_2   v_categories_name_3   v_categories_name_4   v_categories_name_5   v_categories_name_6   v_categories_name_7   v_tax_class_id   v_status   v_invisible   v_type   v_content_type   v_file_path   v_products_custom_1   v_products_custom_2   v_products_custom_3   v_products_custom_4   v_products_custom_5   EOREOR
   DVM10001   AVGRN   AD1001.jpg            Advantage Green for Dogs, 1-10 lbs, 4 pk    Advantage is the fastest flea control. Advantage is proven to stop fleas from biting in three to five minutes, providing fast relief and protection. Fleas start dying within one hour of application and 98-100% of all existing fleas on pets are killed within 12 hours. Advantage is water-proven. Advantage kills fleas even after a shampooing, swimming or exposure to rain or sunlight. Advantage also continues to protect against further flea re-infestations for up to four weeks. Early prevention is key to keeping pets from infestation. Starting a regular flea control regimen before the beginning of flea season allows cats and dogs to be healthy and happy all year. A year-round regimen also may lower the risk of a dog or cat being affected by such flea-related problems as flea allergy dermatitis (FAD). Advantage kills fleas before they have a chance to lay eggs, thus breaking the flea life cycle. Because it kills flea larvae within 20 minutes of contact, pet owners don't need to use an insect growth regulator (IGR). And, Advantage inhibits larval development in the pet's surroundings by greater than 99.          58.00               Bayer   Flea & Tick   Advantage   Advantage Canine                  active               AVGRN   ADVANTAGE <10# K9 4 PK      120         EOREOR

ryan

Yes the SKU lookup could be failing if it doesn't match precisely. i.e. If there is an extra space character somewhere.

mtoon

I don't think that's it..  I can start with an empty database, run the import.  Then run the exact same command line as soon as it's done and it duplicates the entries.  It's the same exact input file.  Any other ways it might be failing?

ryan

Well, if it used to work and now doesn't work, I'd try and figure out what has changed.

mtoon

Thanks for the help.  I'm trying to figure out what would cause the problem.  All I'm asking for is WHAT in the import process would cause the SAME file to not update rows, but duplicate them.  There is a SKU field in the import and it's being imported into the database correctly.  Can you provide a little insight (in terms of pseudo-code or something similar) as to how the import works... especially in the area of looking up an existing product.


sashwill

I had this happen to me if I was supplied a v_products_id  that didn't exist.  Even though the sku was there it would generate a new product with a new id.  When I removed the v_products_id from the import this problem went away.