i’m using simple products ,with custom attribute set that has a special optional attribute (call it price_category)
i want the getPrice() method of my product to return a fixed value depending on price_category attribute value.
i don’t want to define 80+ catalog price rules since it’s just a price mapping that i want to achieve and mapping may vary over time.
so , i want to be able to have that map loaded somehow in the system (surely via a specific table)
price_category A , price = 10â¬
price_category B , price = 8â¬
price_category C , price = 6.5â¬
price_category D , price = 13â¬
i would like to know the best (non intrusive if possible) way to achieve that:
- redefine a sub class of SimpleProduct that has its own PriceFactory seems ok for me
but in that case , how to redefine this using a custom module ? (i try to put all my specific modification in a custom module , this enable me to inherit from Mage classes instead of redefining/patching them)
If you’ve got hints on that (or even sample code,that would even be better)