Jump to content

How to update only quantities via cron


neller
 Share

Recommended Posts

Hi all,

 

I have a problem, I am populating a pretty big store (90k products).

The quantities are to be controlled by another company.

A daily csv file will be supplied and uploaded to a location with their product references and quantity levels.

 

The product reference is used in Prestashop.

 

Here is an example of the data and how it is to be supplied;

Reference , empty cell, Stock
304301, ,Limited Stock
LDF500180, ,Good Stock
NRC6221, ,No Stock
BA 157L, ,Good Stock

 

There are three main things I need this to do.

1) Remove any spaces in the reference field

2) Replace 'Good Stock' with '20'

'Limited Stock' with '10'

'No Stock' with '0'

3) import 'Stock' into (psdatabase) where reference = reference

 

Does anyone know where I would start with this?

 

Regards,

Neller

Share this post


Link to post
Share on other sites

Start by creating the script that does what you want.

-read file

-search for product with that reference

-update quantity

Then set a cron job to do this on a regular basis.

If you can't do the script, better hire someone to do it...

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More