Create a module to sync from [login to view URL] to prestashop
$10-30 USD
Bezahlt bei Lieferung
I need a module to import and maintain syncronized our account in [url removed, login to view] and our prestashop online shop.
We need an script able to sync categories and products, and then a cron to update the stock and prices.
Should be written in php+mysql
Several wholesalers have CSV that we need to import to our prestashop database.
The idea is to create a table for each wholesaler:
- wholesale name
- url of csv
- index to table of categories link (later)
- tax related to (tax in prestashop)
- benefit to add to each product (a %)
- shipping method (in prestashop)
- manufacturer related in prestashop
Then the categories table should link the categories in our shop with the categories on the wholesaler csv (to leave each product on its category)
- wholesaler
- category in our shop
- category in wholesaler csv
The idea is to mantain our database updated with the csv (one update each x minutes, by cron). If a product is on the csv but not in database, delete it. If it is not, list it. If it is, update the prices and stock.
Due to the questions I received, I explain here the project by using other words.
We need:
1) A database with two tables (suppliers and categories)
2) One PHP script for import from several CSV / XML / XLS files.
3) A text log file for reference
I explain each one
THE DATABASE
In mysql. I provide the cpanel login (to create the database) and a login to a test prestashop (later will be copied to the production site)
Table 1: suppliers:
--------------------------
name -> name of supplier
tax -> tax applied to the supplier products
URL -> of the CSV/XML/XLS file to import
carrier -> to be assigned to each product of same supplier
benefit -> % to add to the prize each product of each supplier by default (each categories have one benefit that will prevail)
text_to_add -> to add to the description of each product
language -> of the description of the producs: will be en-english, es-spanish and ru-russian
Table 2: Categories
----------------------------
supplier -> to link each producto with his supplier (index)
category_local -> the name of the category on the local shop
category_csv -> the name of the category on the csv (supplier given name)
benefit -> % to add to the prize of each product (if absent, must to be used the benefit in supplier table)
tex_to_add -> a text to add to the description of each product in same category (first the product description, then the product text_to_add, and last this text_to_add)
THE PHP SCRIPT
The PHP script is for import from several CSV / XML / XLS files. Each supplier has one different, so the script will grow by adding more and more. The first version will include one supplier and we will pay $50 (first milestone). The other suppliers will be added later at $20 by each new supplier/file.
Steps:
1).- Delete the import.log file if more than 5 Mb (to avoid to increase).
2).- Process each supplier by downloading to a local directory the remote csv file (first see if the files are the same. If yes, do not process it): a CASE sentence for each supplier, to do easy future modifications and supplier additions. For each one:
3).- Process the CSV file for the categories
a) extract the categories/subcategories from the CSV file
b) if the category is not in the database, add it and write this error in log file (to update later by hand the related category in local shop)
c) If a category is in database but it is not in the CSV file anymore, delete it from database with the related products (write an error to log file)
4).- Process the CSV for the products that have categories in local database (both local category and csv category) update the products database.
a) if the product exist in local database (shop) update it (all fields that change)
b) if the producto does not exist in local database (shop) add it
c) if the product exists in local database but not in the CSV, delete it.
5).- Translate the product database:
a) from english to spanish (if absent) and from english to russian (if absent)
b) from spanish to english (if absent) and from spanish to russian (if absent)
Notes for #4:
Each field in prestashop product database will be linked with a field in CSV, plus adding the: carrier name and tax.
To the extended description the fields text_to_add in suppliers and text_to_add in categories must be added.
Price must be increased with the benefit in categories for each product. If absent, by using the benefit by defaul in supplier
LOG FILE
-----------------
Formart: date, hour, supplier - text error or information
Example:
30/02/2015 15:59 DRESSLINK - The text error or information
I add 4 csv/xls files for refference.
Projekt-ID: #6916692
Über das Projekt
3 Freelancer bieten im Durchschnitt $83 für diesen Job
Dear Sir. We claim to get it done perfectly for you EXACTLY in the way you want it - Kindly give we a chance and we will prove myself - Ready to prove our words, let's get it done right away and I mean RIGHT AWAY !! Mehr