Bug 326733

Summary: collections: bundle pricing
Product: [Unmaintained] bodega Reporter: Aaron J. Seigo <aseigo>
Component: ServerAssignee: Aaron J. Seigo <aseigo>
Status: RESOLVED UNMAINTAINED    
Severity: wishlist CC: active, andrew.crouthamel, giorgos.tsiapaliokas
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 326736, 326737    

Description Aaron J. Seigo 2013-10-27 12:51:12 UTC
bundle prices for collections should be shown in collection listings.

2 types of custom pricing should be assigned: automatic summation, publisher bundle price, distributor bundle price.

publisher bundle price should only be available on collections of type "publisher_bundle". these prices can be anything the publisher wishes, but all assets in the collection must be owned by the same partner that owns the collection.

distributor bundle price should only be be available on collections of type "publisher_bundle" and all assets must appear in the same store and that store must be owned by the publisher. this probably implies that collections can optionally have a store associated with them.

a trigger should enforce this rule.

the final price of the collection would be:

(publisher_bundle && publisherPrice ? publisherPrice : sum(assets.basePrice)) * (distributor_bundle && distributor_markup ? distributor_markup : storeMarkup)

the prices *could* be cached per-store and updated whenever the collection, the assets or the store changes (some existing), but this may well be overkill. measuring with `explain analyze` on the production db dataset will tell if this added complexity is at all necessary.

Reproducible: Always
Comment 1 Andrew Crouthamel 2018-09-02 21:59:59 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years and I will be closing this bug.