Jump to content

Import csv. Only update no Add new


gigig987

Recommended Posts

Hi,

I'm looking for a solution to update easily the price of the products.
Let's say in advance that the updates are made via the software of the physical store. Which has a much bigger db of products that updates on daily basis the retail price.(if 100 products are updated on the software, in the PS database i only need to update about 10) So out of these I need to compare the reference number in order to update only the one that i actually sell on the online store.

my ideas are just 2 and i don't really know how to realize them:
1)i export a csv from the software. I override AdminImportController in order to implement an option to add the product or not, like a checkbox in the import product options. (i tried and i receive errors on array_key_exists line 832) SO i'm doing something wrong.

 

2) i created a new module,

that (i dont know how) import a csv or populate a brand new table in the database.
then i managed to use a INNER JOIN to select only the common products. I now have an array.
From this array (i dont know how) i should be able to update the products price.

Do you guys see another solution? If not what do you suggest me to do?
Thank you very much

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...