Problem Adding # Back Into Inventory Data

I have two different data types: CART & PRODUCTS.

PRODUCTS holds the data on each product’s inventory amongst other things.
CART holds the data of whatever that user adds to it.

I have a SHOP page with a RG set to PRODUCTS. From there, I can effectively use “Make Changes to a Thing” to adjust the inventory of that product based on how many a user adds to their CART.

I have, on the CART page, a RG with a list of all the items that user added. There is a delete button per item and it deletes that product from their CART.
However, I am having trouble getting a “Make Changes to Thing” to add the inventory back into PRODUCTS.

I do “Search for” and find PRODUCTS and try to match the Unique ID but it does not work. Any ideas?

Here is what I am trying with my workflow amongst other things

In this case, and with the limited information available, it seems to be more of an issue with the approach to the problem. Considering the description, I would suggest that the error lies in directly affecting the inventory and the product once the user adds items to the cart.

There are disadvantages to using the product-cart approach. If the inventory is directly affected but the cart is abandoned, this will prevent other potential customers from adding these products, just to mention one.

Recommendation: Adopt a new approach for your database – create a new entity each time something is added to the cart that contains the product. This entity should have its own fields, such as quantity and Unit Cost. Additionally, you will only affect the inventory when the product is actually purchased.

Your issue will be resolved by not needing to modify the inventory since it’s only updated once the purchase is made, avoiding unnecessary modifications during the cart-filling process.

1 Like