Forum Documentation Showcase Pricing Learn more

Freezing customer order data


I want to be able to copy a list of line items from a CART to and ORDER but I don’t want the items in the order to ever change and the PRODUCTS that form the LINE ITEMS in the CART may change, for example, the price or the picture but I want the ORDER to hold those LINE ITEMS as static information that never changes. While it is possible to copy the items from one list to another list which I have tried, for example, LINE ITEMS > ORDER LINE ITEMS, the API is unreliable at best (unless there is a 2-second pause between operations).

I have been trying to solve this issue for days. I partially solved it but please check the video, I’d love a solution to this, it’s really holding up progress as the PRODUCT > LINE ITEM > CART > ORDER structure must be bulletproof to build an eCommerce platform on Bubble and so far I am not confident in proceeding.

Also here is a link to the demo app I set up:

I think you’ve already answered your own question, don’t you?

Have a watch here: I muse about the same point— that one should lock in the price of an item at buy-time.

But that’s no issue… JUST DO THAT.

1 Like

Hi @morgan

To keep track, instead of deleting your products, add a field deleted (yes/no) and show only deleted=no.

1 Like

I wouldn’t delete the products but I’m giving an example of what would happen if something happened to one of the products by accident I would lose the entire history of that products sales orders which is a very serious problem. Therefore I’m looking for a way to disconnect the order contents from the related fields and keep the all of the data of the product, line item, discounts nice and safe in an order regardless of what might happen to the others.

@morgan So each of your line items should store static data from the product, right?

Rather than duplicating the product, you should only have one record of each product: ie, One tomato, One orange.

What you will need are description, rate, quantity, and total fields on your line item. When you add a tomato to your cart, create a line item and set all those fields.

So in your cart is a line item that has Tomato as the description, 1 for the QTY, $2 for rate and total. And probably a link to the tomato product for reporting purposes.

But now it doesn’t matter if you delete the tomato product, the line item data remains as it’s own separate entity.

Hope that makes sense :slight_smile: