This is my first question here, if I missed something please guide me on that.
I'm creating a shipping app for my private client, who want to have shipping rates appears on the checkout based on their hidden/special business logic.
Let me give you a simple example.
They can create different shipping groups ( group can have different shipping rates ).
--> COD option ($2.0)
--> Overnight option ($10.0)
--> 2 Day delivery option. ( third party api like Fedex will calculate rate )
--> Weekend Delivery Option ( $10 )
--> Daytime delivery option ( $5 )
--> Random Pick Date ( third party api like Fedex will calculate rate )
So suppose client have created 2 groups and added different rates on those groups, then client have to select the conditions for those groups. Like
Group A will appear when the productType attribute in the cart match the type of (X).
Group B will appear when the productType in the cart match the type of (Y).
Group A,B both will appear when the productType (x,y) both are in the cart.
So customer can add the conditions based on any product attribute that the shopify provide.
How I can design the database for this?
I have tried to create different database design, but at the end when I try to get the groups based on the products in cart, that always failed, ( I mean I'm stuck on that and can't finalized the logic )