gasworks Posted November 27, 2013 Share Posted November 27, 2013 Hey guys/gals, I'll try and explain what I'm trying to do: if a user's cart contains a set minimum number of products, my client would like to apply product specific discounts to that cart's total. To be clear, the cart may contain any combination of different products but once the quantity clears a certain threshold, each product's discounted price should then apply, rather than the regular retail price. I'm comfortable with displaying the unit price based on a "specific price" rule, however I'm less so in calculating the cart price if it involves hacking PS backend calculations given the unforeseen consequences that may result. Ideally I'd prefer a solution via the interface or a plug-in module (I've looked, unsuccessfully), failing that class overrides if all else fails. Thanks in advance Link to comment Share on other sites More sharing options...
gasworks Posted November 28, 2013 Author Share Posted November 28, 2013 anyone got any ideas on this? Link to comment Share on other sites More sharing options...
gasworks Posted November 29, 2013 Author Share Posted November 29, 2013 Solved this issue by amending /classes/Product.php: $cart_quantity = self::$_cart_quantity[$cache_name]; to: $cart_quantity = $context->cart->nbProducts() >= 6 ? 6 : self::$_cart_quantity[$cache_name]; 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