cancel
Showing results for 
Search instead for 
Did you mean: 

Discount Pricing for Configurable Product

Discount Pricing for Configurable Product

I manage a small e-commerce website and have limited expertise, especially when it comes to configurable products!

 

We would like to add a discount to the frontend like this:

price discount.png

but when wanting to change the price of the configurable product, we find that the price box is greyed out with no advanced pricing options below that. So we've changed the virtual products and their pricing which has indeed changed the price on the frontend. The only problem is there is no before and after price as shown above, but just a price. Only when you've selected a new colour option/swatch on the frontend products page, will it then show a discount. So no customer will know a discount has been applied until they've clicked an option.

 

I've tried editing configurations where I have the option to apply single price to all SKUs, the only problem is, different colours have different prices. So we can't really choose this option to solve the problem. 

 

Is there any way of getting a before and after price for the main configurable product for customers to see before they choose their colour option?

 

I'm not the best at explaining, please let me know if I have to explain further.

 

Many thanks in advance. Richard 

 

 

5 REPLIES 5

Re: Discount Pricing for Configurable Product

Bump. Hi again, just checking in to see if someone could help.

 

Thanks!

Re: Discount Pricing for Configurable Product

Richard

 

You need to set the pricing on each simple product that is associated with the configurable product.

 

Hope this helps.

Re: Discount Pricing for Configurable Product

Thanks for the reply, it's appreciated. Sorry, maybe I should have been clearer. We did that by changing the virtual/simple product prices but that's what seems to be the problem. After changing the prices on the simple products the problem explained above stays.

Re: Discount Pricing for Configurable Product

Did you find a solution for this ?

Re: Discount Pricing for Configurable Product

Modify file:

 

./app/code/Magento/ConfigurableProduct/view/base/templates/product/price/final_price.phtml

 

 

<!-- ?php if (!$block->isProductList() && $block->hasSpecialPrice()) : ? -->
<?php if ($block->hasSpecialPrice()) : ?>
    <span class="old-price">
        <?= /* @noEscape */ $block->renderAmount($priceModel->getAmount(), [
            'display_label'     => __('Regular Price'),
            'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
            'price_type'        => 'oldPrice',
            'include_container' => true,
            'skip_adjustments'  => true
        ]); ?>
    </span>
<?php endif; ?>