thn_ Posted March 14 Share Posted March 14 I'm setting up B2B platform for our shop on PS 1.7, it's basically multistore, but with different prices and discounts for client groups. I've managed to show % of group discount, price without price discount, and amount of discount in product details by adding code: {if $product.customer_group_discount > 0} <p>Your discount <strong>{$product.customer_group_discount*100}%</strong><br> Price before discount: <strong>{( $product.price_amount/(1-$product.customer_group_discount) )|round:2} $</strong><br> Discount amount: <strong>{( $product.price_amount/(1-$product.customer_group_discount)*$product.customer_group_discount )|round:2} $</strong></p> {/if} But I can't figure it out how to do the same on product list/categories, it seems that $product.customer_group_discount doesn't work there. Is there any way to make it work? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted March 14 Share Posted March 14 You can use: Group::getReductionByIdGroup($customer.id_default_group) Link to comment Share on other sites More sharing options...
thn_ Posted March 15 Author Share Posted March 15 18 hours ago, Prestashop Addict said: You can use: Group::getReductionByIdGroup($customer.id_default_group) I've tried this, but in result I'm getting 0. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted March 15 Share Posted March 15 il y a 12 minutes, thn_ a dit : I've tried this, but in result I'm getting 0. This only works if user affected to group is connected. Link to comment Share on other sites More sharing options...
thn_ Posted March 19 Author Share Posted March 19 On 3/15/2024 at 1:11 PM, Prestashop Addict said: This only works if user affected to group is connected. to be specific - it only works when discount is set for all products, not only for certain categories 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