Arkentron Posted September 14, 2020 Share Posted September 14, 2020 Hi, First of all I am sorry if the topic is in a wrong place, please move it to the correct section if needed. I am working with a provider that has more than 10.000 products in stock. However, my idea is to include just one specific catagory form it, that means, only arround 3.000 products. The CSV file form the provider is beeing updated daily so I am importing a new CSV file with products also daily. The problem is that in the CSV they are including all 10.000 products and when I am importing it, the existing 3.000 IDs are being updated but other 7.000 new products are being created. I would like to know how can I import the CSV and filter only by the products that are already in my catalogue and skip the ones that are not there. Basically I would like to select 3.000 products and update only those 3.000 daily. I know there might be modules and other stuffs to do this, but my idea is to do it without any extra costs. Thank you inadvance Link to comment Share on other sites More sharing options...
Gaca Posted April 9, 2021 Share Posted April 9, 2021 Hello, I have a client for whom I work in the same way and indeed it is not obvious that there are solutions with modules that suit it, but to help you better I need more details. because indeed the cron will update my products after you just suggest updating the old ones not to create a new one. cordially Link to comment Share on other sites More sharing options...
Kogkalidis Posted July 14, 2021 Share Posted July 14, 2021 You should put the unique field (id) given by the file as reference (in ps_product table). Then get the product by the reference. if (Validate::isLoadedObject($product)){ // Here your script } This way if the product does not exist already in your DB the above control will return false Regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now