Customize the processing of the transmission of goods from woocommerceКастомизировать обработку передачи товаров woocommerce
HTTPS://itgalaxy.company/software/wordpress-woocommerce-1c-%d0%bf%d1%80%d0%b5%d0%b4%d0%bf%d1%80%d0%b8%d1%8f%d1%82%d0%b8%d0%b5%d0%bc%d0%b5%d0%bc%d0%b4%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%bc%d0%d0%bc%d0%d0bc%d0%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0bc%d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0
it creates such files for importhttps://easytrade.in.ua/wp-content/plugins/woocommerce-synchronization-1c/files/site1/temp/import.xmlhttps://easytrade.in.ua/wp-content/plugins/woocommerce-synchronization-1c/files/site1/temp/offers.xml
You need to make a script that will do the following:
Take the data in the Offers file and make changes:
If the stock with the id "FAlVGMKdhprrfFeIsbHlE3" has a presence of more than 0, and the stock "aH0hNf5Dh9PZFbtdyywzT0" has a presence of more than 0 (or = 0), then change on the goods nothing is needed.If the stock with the id "FAlVGMKdhprrfFeIsbHlE3" has a presence of 0, and the stock "aH0hNf5Dh9PZFbtdyywzT0" has a presence of more than 0, then the stock must be changed to 0 and the status to "accessible for pre-order".If the stock with the id "FAlVGMKdhprrfFeIsbHlE3" has a presence of 0, and the stock "aH0hNf5Dh9PZFbtdyywzT0" has a presence of 0, then the product must have the status "not available" (i.e. if the script has previously presented the status "disponible for pre-order", then it must be changed to "not available").The example
These goods must be “in availability” or
This product must change its availability by 0 and the status to "available for pre-order"
This goods must have the status of "not available" if the status of "accessible for pre-order" has been previously established.
The script that will run these scenarios must be launched automatically on the crown, as the product availability update is also updated automatically.
товари імпортуються на сайт через цей плагін обробки
https://itgalaxy.company/software/wordpress-woocommerce-1c-%d0%bf%d1%80%d0%b5%d0%b4%d0%bf%d1%80%d0%b8%d1%8f%d1%82%d0%b8%d0%b5-%d0%be%d0%b1%d0%bc%d0%b5%d0%bd-%d0%b4%d0%b0%d0%bd%d0%bd%d1%8b%d0%bc%d0%b8/woocommerce-1c%d0%bf%d1%80%d0%b5%d0%b4%d0%bf%d1%80%d0%b8%d1%8f%d1%82%d0%b8%d0%b5-%d0%be%d0%b1%d0%bc%d0%b5%d0%bd-%d0%b4%d0%b0%d0%bd%d0%bd%d1%8b%d0%bc%d0%b8-%d0%b8%d0%bd%d1%81/
він створює такі файли для імпорту
Потрібно зробити скрипт, який буде робити наступне:
брати дані в файлі офферс і вносити зміни:
якщо на складі з айді “FAlVGMKdhprrfFeIsbHlE3” наявність більше 0, і на складі “aH0hNf5Dh9PZFbtdyywzT0” наявність більше 0 (або = 0), то змінювати на товарі нічого не треба.
якщо на складі з айді “FAlVGMKdhprrfFeIsbHlE3” наявність 0, і на складі “aH0hNf5Dh9PZFbtdyywzT0” наявність більше 0, то в товарі треба змінити наявність на 0 і статус на “доступний для передзамовлення”.
якщо на складі з айді “FAlVGMKdhprrfFeIsbHlE3” наявність 0, і на складі “aH0hNf5Dh9PZFbtdyywzT0” наявність 0, то на товарі треба щоб був статус “немає в наявності” (тобто якщо раніше скрипт виставляв статус “доступний для передзамовлення”, то треба буде змінити на “немає в наявності”).
приклад
Ці товари мають бути “в наявності”
або
цей товар має змінити свою наявність на 0, та статус на “доступний для передзамовлення”
цей товар повинен мати статус “немає в наявності”, якщо раніше стояв статус “доступний для передзамовлення”
Скрипт, який буде запускати ці сценарії має запускатись автоматично по крону, так як оновлення наявності товарів також оновлюється автоматично.
Client's feedback on cooperation with Andrey Davydov
Customize the processing of the transmission of goods from woocommerceGreat work. He completed the task very quickly.
Freelancer's feedback on cooperation with Anatolii Levko
Customize the processing of the transmission of goods from woocommerceIt’s good, thank you for cooperation.