In Magento 1 how i can hide all the original prices from all my products and only special prices be visible?

31 views Asked by At

I am the owner of the shop but I don't have full access to the database.

I tried from Update Attributes but i couldn't do that. I tried from Design but neither i could from there. Thank you.

The law changed i we must have visible only the special prices and hide the original price.

1

There are 1 answers

0
Anže Voh On

Ok, so you are probably talking about EU law where when you have special price you have to display lowest price in last 30 days? If so you have module that are available and can help you fix this:

Lowest price in 30 days for Magento 2

Lowest price in 30 days for Magento 1.9 / Openamge

If you wand to just hide regular price for Magento 2, you can edit file in your template. app/design/frontend/Your_Theme/Your_Theme/Magento_Catalog/templates/product/price/final_price.phtml and edit file something like this:

<?php
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */

/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
$priceModel = $block->getPriceType('regular_price');

/** ex: \Magento\Catalog\Pricing\Price\FinalPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $finalPriceModel */
$finalPriceModel = $block->getPriceType('final_price');
$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
$schema = ($block->getZone() == 'item_view') ? true : false;
?>
<?php if ($block->hasSpecialPrice()) :?>
    <span class="special-price">
        <?= /* @noEscape */ $block->renderAmount($finalPriceModel->getAmount(), [
            'display_label'     => __('Price'),
            'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
            'price_type'        => 'finalPrice',
            'include_container' => true,
            'schema' => $schema
        ]); ?>
    </span>
<?php else :?>
    <?= /* @noEscape */ $block->renderAmount($finalPriceModel->getAmount(), [
        'display_label'     => __('Price').':',
        'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
        'price_type'        => 'finalPrice',
        'include_container' => true,
        'schema' => $schema
    ]); ?>
<?php endif; ?>

Original file location: public_html/vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml

or via css file

.old-price {
    display: none;
}