We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    1) Create a Additional Price attribute from admin area and assign into attribute sets as per your requirement.

    Store->Configuration->Attributes: Product->Add New Attribute(Additional Price)

    Assign into:

    Store->Configuration->Attributes: Attribute Sets(Assign Under Groups->Product Details:additional_price)

    2) Then you have to override final price value with following custom module:

    app/code/Magemonkeys/SpecialPriceSave/view/frontend/templates/product/price/final_price.phtml

    <?php
    // @var MagemonkeysSpecialPriceSavePricingRenderChangePriceBox $block
    $priceChange = $block->getPriceChange();
    
    
    // @var MagentoFrameworkPricingPricePriceInterface $priceModel
    $priceModel = $block->getPriceType('regular_price');
    
    // @var MagentoFrameworkPricingPricePriceInterface $finalPriceModel
    
    $finalPriceModel = $block->getPriceType('final_price');
    $idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
    $schema = ($block->getZone() == 'item_view') ? true : false;
    $products = $block->getProduct();
    ?>
    
    <?php if ($block->hasSpecialPrice() || $block->getFormatedPrice($products->getRrpPrice())): ?>
        
        <span class="special-price">
            <?= /* @escapeNotVerified */ $block->renderAmount($finalPriceModel->getAmount(), [
                'display_label'     => __('On Sale'),
                'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
                'price_type'        => 'finalPrice',
                'include_container' => true,
                'schema' => $schema
            ]); ?>
        </span>
        <span class="next-price">
            <?php 
                $products = $block->getProduct();
                if($products->getRrpPrice()){ ?>
                    <span class="rrp-price">
                    <?php echo 'RRP'.$block->getFormatedPrice($products->getRrpPrice()); ?>
                    </span>
                    <span class="all-price-wrp">
                    <span class="change-price">
                        <span class="change-price-label"><?= __('save'); ?> </span>
                        <?php $_savePercent = 100 - round(((float)$products->getFinalPrice() / (float)$products->getPrice()) * 100);
                            echo '<b style="color:#ec0101">'.$_savePercent . '% </b>';
                        ?>
                    </span> 
                    <span class="old-price">
                    <?= /* @escapeNotVerified */ $block->renderAmount($priceModel->getAmount(), [
                        'display_label'     => __('WAS'),
                        'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
                        'price_type'        => 'oldPrice',
                        'include_container' => true,
                        'skip_adjustments'  => true
                    ]); ?>
                </span>
                </span>
    
                <?php }else{ ?>
                <span class="all-price-wrp">    
                    <span class="change-price">
                            <span class="change-price-label"><?= __('save'); ?> </span>
                                <?= $priceChange; ?>
                        </span>     
                    <span class="old-price">
                        <?= /* @escapeNotVerified */ $block->renderAmount($priceModel->getAmount(), [
                            'display_label'     => __('RRP'),
                            'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
                            'price_type'        => 'oldPrice',
                            'include_container' => true,
                            'skip_adjustments'  => true
                        ]); ?>
                    </span>
                </span>
            <?php  } ?>
        </span>    
    
    </span>
    
    <?php else: ?>
        <?= /* @escapeNotVerified */ $block->renderAmount($finalPriceModel->getAmount(), [
            'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
            'price_type'        => 'finalPrice',
            'include_container' => true,
            'schema' => $schema
        ]); ?>
        <span class="next-price">
            <span class="change-price">
                <span class="change-price-label"><?= __('save'); ?> </span>
                <?= $priceChange; ?>
            </span>
    
            <span class="old-price">
                <?= /* @escapeNotVerified */ $block->renderAmount($priceModel->getAmount(), [
                    'display_label'     => __('RRP'),
                    'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
                    'price_type'        => 'oldPrice',
                    'include_container' => true,
                    'skip_adjustments'  => true
                ]); ?>
            </span>
        </span>
        
    <?php endif; ?>
    
    <?php if ($block->showMinimalPrice()): ?>
        <?php if ($block->getUseLinkForAsLowAs()):?>
            <a href="<?= /* @escapeNotVerified */ $block->getSaleableItem()->getProductUrl(); ?>"
               class="minimal-price-link">
                <?= /* @escapeNotVerified */ $block->renderAmountMinimal(); ?>
            </a>
        <?php else:?>
            <span class="minimal-price-link">
                <?= /* @escapeNotVerified */ $block->renderAmountMinimal(); ?>
            </span>
        <?php endif; ?>
    <?php endif; ?>

     

    app/code/Magemonkeys/SpecialPriceSave/Pricing/Render/ChangePriceBox.php

    <?php
    namespace MagemonkeysSpecialPriceSavePricingRender;
    
    use MagentoCatalogPricingRenderFinalPriceBox;
    use MagentoCatalogPricingPrice;
    use MagentoCatalogModelProductPricingRendererSalableResolverInterface;
    use MagentoFrameworkViewElementTemplateContext;
    use MagentoFrameworkPricingSaleableInterface;
    use MagentoFrameworkPricingPricePriceInterface;
    use MagentoFrameworkPricingRenderRendererPool;
    use MagentoCatalogPricingPriceMinimalPriceCalculatorInterface;
    use MagentoFrameworkPricingPriceCurrencyInterface;
    use MagentoFrameworkPricingHelperData as Pricehelper;
    
    /**
     * Catalog category helper
     * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
     */
    class ChangePriceBox extends FinalPriceBox
    {
        protected $currency;
        protected $priceHelper;
    
        /**
         * @param Context $context
         * @param SaleableInterface $saleableItem
         * @param PriceInterface $price
         * @param RendererPool $rendererPool
         * @param array $data
         * @param SalableResolverInterface $salableResolver
         * @param MinimalPriceCalculatorInterface $minimalPriceCalculator
         * @param PriceCurrencyInterface $currency
         * @param Pricehelper $priceHelper
         */
        public function __construct(
            Context $context,
            SaleableInterface $saleableItem,
            PriceInterface $price,
            RendererPool $rendererPool,
            PriceCurrencyInterface $currency,
            array $data = [],
            SalableResolverInterface $salableResolver = null,
            MinimalPriceCalculatorInterface $minimalPriceCalculator = null,
            Pricehelper $priceHelper
        ) {
            parent::__construct($context,
                $saleableItem,
                $price,
                $rendererPool,
                $data,
                $salableResolver,
                $minimalPriceCalculator
            );
    
            $this->currency = $currency;
            $this->priceHelper = $priceHelper;
        }
        /**
         * Return difference in original price and final price
         * @return float
         */
        public function getPriceChange()
        {
            $regularPrice = $this->getPriceType(PriceRegularPrice::PRICE_CODE)->getValue();
            $finalPrice = $this->getPriceType(PriceFinalPrice::PRICE_CODE)->getValue();
            $changePrice = $regularPrice - $finalPrice;
    
            return  $this->currency->format($changePrice);
        }
        public function getProduct()
        {
            $product = $this->getSaleableItem();  
            return $product;
        }
        public function getFormatedPrice($price)
        {
            return $this->priceHelper->currency($price, true, false);
        }
        
    }

     

    3) Create a Catalog Rule for Discount Price with Percentage format:

    Marketing->Promotions->Catalog Price Rule

    See attached screenshot:
    https://tinyurl.com/244sf59t

    4) See this results, finally it shows on Category Page and Product Detail Page on frontend side with Saving Different Price:

    Category Page:

    Product Detail Page:

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote