Seeking Expert Help for ERP-WordPress Integration Issue

Bala911

Registered Member
Joined
Oct 2, 2015
Messages
96
Reaction score
7
Hello Blackhat World Community,

I hope you're all doing well. I'm reaching out to this community to seek assistance from someone experienced in ERP-WordPress integration, specifically regarding an issue we're facing with product synchronization.

Here's the situation:

We've built an E-Commerce Store using WordPress as the CMS and WooCommerce for e-commerce functionalities. Our product inventory comes directly from our client's web server, which in turn retrieves data from their ERP system. The ERP system sends three crucial pieces of information to the web server:

  1. SKU Code: To verify product availability and make necessary updates on the WordPress website,
  2. Product Quantity: To reflect changes in product quantity between the ERP system and the WordPress site,
  3. Product Price: To mirror price changes between the ERP system and the WordPress site,
We've set up this data synchronization through webhooks, and it works seamlessly for most cases. However, here's where we're facing an issue:

We want to ensure that when a product in their ERP system reaches a quantity of 0 or less, it should not be displayed on the WordPress website at all. Currently, when inventory is updated from the WordPress website to 0, it correctly displays as "Out of Stock." However, when the ERP system updates a product to 0, the WordPress site continues to fetch this data but does not display "Out of Stock." Instead, it shows a quantity of 0, which confuses users and prevents them from adding the product to their cart.

We've already explored WordPress settings that allow us to "Hide" or "Display" out-of-stock items. While this works for products reaching 0 through the WordPress backend, it's not working for products fetched from the ERP system.

Our primary goal is to automatically mark any product with a quantity of 0 or lower in the ERP system as "Out of Stock" on the WordPress website. This way, we can effectively utilize existing WordPress settings to control the display of out-of-stock products.

If you have expertise in ERP-WordPress integration and have encountered a similar challenge or have insights on how to tackle this issue, your guidance would be greatly appreciated. We're open to suggestions, code tweaks, or any advice that can help us resolve this problem.

Note: I'm also attaching the codes that we've written in the function.php field to accomplish the above tasks, which have failed, for your reference.

Thank you in advance for your valuable input. Your assistance would mean a lot!

Cheers! :)
 

Attachments

What if you write a custom function that triggers whenever the ERP system updates a product? This function could explicitly set the 'Out of Stock' status for products with a quantity of 0 or less.

I never used WordPress / ERP integration, so the above is just a suggestion.
 
What if you write a custom function that triggers whenever the ERP system updates a product? This function could explicitly set the 'Out of Stock' status for products with a quantity of 0 or less.

I never used WordPress / ERP integration, so the above is just a suggestion.
In Odoo, you can create a function that checks product quantity whenever it updates and sets it as ‘Out of Stock’ if the quantity is zero or less.
 
The whole project went to bust and the client never paid for hours and hours of development fee, it was hosted and worked upon on their server, so I couldn't demand my payment either. Lesson learned, that I need to start working with people on phases, and not agree to any strange additional scope of work like this which may contradict the initial scope of the choice of the platform build itself. Thank you for your responses guys, means a lot BHW family!
 
Back
Top