SamirGeorge Posted December 3, 2020 Share Posted December 3, 2020 Hi Devs & Shop owners i need help with a small integration/Synchronization we have Prestashop 1.7.2 shop and Wordpress 5.5.3 woocommerce shop (under construction) we need 1 thing, when a product is ordered, the stock is being reduced from both shops, not only one but, no need to share the order details, same prices or images etc, the only synchronization needed for now is the stock level just to avoid keeping manual checks on the products i have searched for plugins, could find non, and almost all are too advanced for my use case and doin extra synchronization which is an overkill also thought about using Odoo, this will improve our level of managing orders too, but found it also overkill and too expensive while we just need small sync for 1 field as for prestashop we have the reference code, this should be the same SKU in Woocommerce version (this step should be done first of course and we are on it) so the way we need is when product ordered, the stock goes down in both databases, when it is canceled the order goes up again. maybe a way with a middle-man script is holding a 3rd database can be the answer, to allow us to edit the stocks when we have more to offer, so it is been synced in both shops? i have done many edits to prestashop, bt usually i was messing with registration buggy form trying to simplify it (thanks to God and your help it was done) and now stuck with this annoying lack of feature thanks in Advance for help 1 Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 And what do you expect for an answer? They are completely two different systems and different functions and different databases. You are here in the Prestashop forum, which is intended for the Prestashop system. Did you also ask on the Wordpress forum? In any case, there are two plugins, which means a higher price and it does not matter that you only want to synchronize the stock. Programming both plugins with an estimated price of 120 €! Link to comment Share on other sites More sharing options...
CedCommerce Team Posted December 3, 2020 Share Posted December 3, 2020 Hello, Hope you are doing well. We can help you with this, please discuss with us in detail. Thanks!!! 1 Link to comment Share on other sites More sharing options...
ClassyDevs Posted December 3, 2020 Share Posted December 3, 2020 Hello, SamirGeorge We are working in Both in WordPress and PrestaShop more than 6 years + from our experience. We suggest you create two different module and plusing. 1. You can search WooCommerce product status or stock from their api https://woocommerce.github.io/woocommerce-rest-api-docs/#list-all-products Then From Your PrestaShop module you can fetch the stock and then update the stock via your PrestaShop module. This solution is for If your main store in WooCommece. 2. If your main shop in PrestaShop then you need to call PrestaShop api to check the status and then Update in WooCommerce. We do not recommend any database level update because if you update via Rest api or api level , you have the full controll to update all the place where CMS upate their values. If you created custome script to access database , it may made two problem 1. Security issue arries from that script 2. When datababase password change your script will not work. You need to update your script. In the past we have done this kind of work to immport our WooCommerce product images and other to insert our PrestaShop site, because we have created same WooCommece theme in PrestaShop. This save our tons of times. Hope my solution help you to understand the things. You can easily created by your self or some one else. Thank you Regards Classy Devs Team 2 Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 @ClassyDevs That's a really great idea 🤣 Do you think it will update all products after placing an order via api? There are more of those problems. In WordPress, there are hooks right when completing the order, and in Prestashop as well. No passwords are needed when everything is communicating via POST methods protected by a hash key and encrypted. Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 WordPress: function mysite_woocommerce_payment_complete( $order_id ){ $order = wc_get_order( $order_id ); foreach ( $order->get_items() as $item ){ ...... } } PrestaShop: public function hookActionValidateOrder{ ... } Advise in a way ... I've already done it but I won't write anything or advice, it's easy, program it yourself is nonsense. When a person comes for advice, he has no experience and do you advise him to program it himself? Do you only want to advertise on your elementor? @ClassyDevs, why do you give such bad advice? Link to comment Share on other sites More sharing options...
ClassyDevs Posted December 3, 2020 Share Posted December 3, 2020 Hello,Guest Thank you for your message, it is not good to attack some one who try to help other. If your option is better than it is appreciable. I am wondering why you told some one direct "Programming both plugins with an estimated price of 120 €!" , when they ask for solution , why didn't you put code at the first and write function , when we give then a solution which seemed better in our end. The function you provide also need the person code them self or some one else to solve this. Do you think, the above code block can be used by any person who have no experience in coding. I give the solution which seemed in my mind best. Can you please told , how any one apply your code and which file they need to put to resolve the above solution N.B: Please do not try to attack any one, we do not come to here to attack any one, respect other, people will respect you. Thank you Link to comment Share on other sites More sharing options...
SamirGeorge Posted December 3, 2020 Author Share Posted December 3, 2020 Thanks for your answers, but why being in attack mode to others, sometimes i misunderstand the question or get a wrong answer. but as long as we are trying to help each other it is okay, as long as the community is willing to help. i don't understand also why you say that 8 hours ago, Guest said: And what do you expect for an answer? They are completely two different systems and different functions and different databases. You are here in the Prestashop forum, which is intended for the Prestashop system. Did you also ask on the Wordpress forum? In any case, there are two plugins, which means a higher price and it does not matter that you only want to synchronize the stock. Programming both plugins with an estimated price of 120 €! isn't the forum a place to ask for help? many people code solutions and post it for the community sometimes with full functionality sometimes with fremium way. i don't understand the way you make a joke of me for asking for help. Link to comment Share on other sites More sharing options...
ps8modules Posted December 3, 2020 Share Posted December 3, 2020 Yes, I also agree with Mr Tengler. The answer that it's simple is not true. Creating a plugin for WordPress is approx. hour of work, creating a module for Prestashop is approx. hour of work. Testing and integration of communication from Prestashop to WordPress and vice versa from Wordpres to Prestashop is approx. three hours of work. Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 When you go to a WordPress forum and write to give you a solution and a module for another system, do you think they will give you codes or a module for Prestashop? Realize that giving codes or modules for free is not a matter of course !! There is some work behind it all. Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 You are here in the forum for Prestashop !!! There is no forum for Wordpress !!! Are you going to ask for a competitive solution? Link to comment Share on other sites More sharing options...
SamirGeorge Posted December 3, 2020 Author Share Posted December 3, 2020 4 minutes ago, Guest said: You are here in the forum for Prestashop !!! There is no forum for Wordpress !!! Are you going to ask for a competitive solution? i have never asked for help and got such rude answer on any forum people are always willing to help, how free plugins exists? how is prestashop an opensource? you should change the way you think as even if someone where looking for urgent or big plugin and they are willing to pay, they will not pay for someone like you with such reaction 7 minutes ago, Guest said: When you go to a WordPress forum and write to give you a solution and a module for another system, do you think they will give you codes or a module for Prestashop? Realize that giving codes or modules for free is not a matter of course !! There is some work behind it all. really no comment, you are just pushing me to pay you and if i am able to pay i would clarify that, but i am not and asking for hints and already asked like 3 questions which will be the good solution doing real-time sync or middle man script or a erp system like odoo you completely skiped all my talk and just spoke about what concerns you, you are not willing to help with anything, so please stay out of my topic and search for people who wants your service somewhere else, and be polite to all the responders even if they give a wrong answer, at least they try to give help unlike you 1 Link to comment Share on other sites More sharing options...
Guest Posted December 3, 2020 Share Posted December 3, 2020 (edited) I wish you good luck. I like to look at someone else's answers on a topic. There will definitely be hundreds of answers and codes 🙂 https://stackoverflow.com/questions/52404190/get-order-items-data-values-in-woocommerce https://www.businessbloomer.com/woocommerce-easily-get-order-info-total-items-etc-from-order-object/ https://squelchdesign.com/web-design-newbury/woocommerce-detecting-order-complete-on-order-completion/ Bye Edited December 3, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted December 4, 2020 Share Posted December 4, 2020 People, people go easy. @SamirGeorge Please formulate and format question bit. From what I have read first thought was you need a module to sync, so paid work. You last post does clear that but to me it was not clear on first read. @Guest and @CedCommerce Team please try to refrain for offering services outside of Job offers. Especially you CedCommerce Team you do have few warnings about that already. You all can politely explain that what is needed is good amount of work and that it should be posted in Job offers. Like your last replay Guest, move on to other topic. And CedCommerce please understand, you may need work and you look every post as possible one. But forum is primarily place to help each other. And users, especially new ones comes in hope for some guideless. And if they are bombarded with PM and paid offers then will not come much to forum. And maybe skip chance to get some help and later to help someone else. Link to comment Share on other sites More sharing options...
SamirGeorge Posted December 4, 2020 Author Share Posted December 4, 2020 21 hours ago, Guest said: I wish you good luck. I like to look at someone else's answers on a topic. There will definitely be hundreds of answers and codes 🙂 https://stackoverflow.com/questions/52404190/get-order-items-data-values-in-woocommerce https://www.businessbloomer.com/woocommerce-easily-get-order-info-total-items-etc-from-order-object/ https://squelchdesign.com/web-design-newbury/woocommerce-detecting-order-complete-on-order-completion/ Bye thanks for sharing info, i have already studied the case more, i understand that it won't be good to have direct sync and it will be much better to have something in the middle that catches the order and have 1 db with desired info to sync in my case i will care only about SKU/Referrence and Stock (and any required fields to this) this script shall be custom or ready made solution current free option i have is http://www.myddleware.com/ to connect Prestashop to ERPNext and ERPNext has an official module for woocommerce which i already tested a lot of stuff i know but it is all free and adding a lot of functionality out of the box (like using ERP system for managing the work flow which is a big addition) so Prestashop > myddleware.com > ERPNext > Woocommerce still working on it and will keep you updated if i finish it soon thanks for sharing your thoughts, any tips on that matter will be appreciated a lot 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