chdwck Posted June 23, 2016 Share Posted June 23, 2016 (edited) I'm new to PrestaShop, so I need some help getting pointed in the right direction. We have a rather complicated pricing structure for products that is based on the following criteria: Customer Type Retail (standard customer, no special discounts) Bulk customer (gets products at a "bulk" price) Bulk Discounted ("BD" customers get products at a % off "bulk" price based on product categories) Sale Price Considerations Retail customers get whatever the sale price is (no real change) Bulk customers get the lower of either the sale price or their bulk price BD customers get 10% off the sale price if it is lower than their discounted bulk price, otherwise they get their discounted bulk price I was hoping to code this logic without using overrides, but from what I can tell, that's probably not possible. My thoughts on how to code this are as follows: Add a "bulk_price" field to the products table Hook the "displayAdminProductsExtra" to allow editing of the "bulk_price" field Use customer groups to flag customers for appropriate pricing "Bulk" group gets bulk price "BD 25% off XYZ Category" to apply % off bulk price (obviously would have to have a group for each % level per category...a little complicated, but I don't see any other way around it) Override "Product::getPriceStatic" method to do price calculations and set the price based on above criteria. (Differences in pricing based on attributes, combinations, etc. would also be calculated here.) My questions for the more experienced PrestaShop developers are: Am I over looking any hooks, methods, or other functionality that would let me do this without overriding? What problems might I run into down the road if I do use overrides? (Obviously, I'm not going to touch any core files, but I want to know if there are any unexpected consequences that others have run into with overrides.) Does my logic over look some other PrestaShop functionality that may cause unintended consequences? I appreciate any advice provided. Edited June 23, 2016 by chdwck (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now