matthiask / plata

Plata - the lean and mean Django-based Shop
https://plata-django-shop.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
197 stars 63 forks source link

Adding new discount types #73

Closed divs1210 closed 7 years ago

divs1210 commented 9 years ago

Hey! How can I add more types of discounts to my app without incurring downtime? (because i'll have to add code to CONFIG_OPTIONS in plata.discount.models)

matthiask commented 7 years ago

You should probably do it this way (appending to Discount.CONFIG_OPTIONS):

https://github.com/matthiask/plata-options-product/blob/master/options_product/discount.py

The calls to explicit_products and only_categories should be placed in a models file; maybe AppConfig also works.