0

The price of product with different design is shown below. I have kept the product price as zero and mentioned the price of variants like this. But in the front end its showing Suede+ 655.

enter image description here

I want it to be "Suede= Rs 655" or only "suede". How to do it?

0

If you want to add '=' instead of '+' before price,then you have to change in Select.php.

Magento/vendor/magento/module-catalog/Block/Product/View/Options/Type/Select.php

You have to replace '+' to '=' using :-

$priceStr = str_replace("+", "=", $priceStr); 

Add $priceStr = str_replace("+", "=", $priceStr); after

 foreach ($_option->getValues() as $_value) {
    $count++;
    $priceStr = $this->_formatPrice(
    [
        'is_percent' => $_value->getPriceType() == 'percent',
        'pricing_value' => $_value->getPrice($_value->getPriceType() == 'percent'),
    ]
 );

$priceStr = str_replace("+", "=", $priceStr);

I hope this will work for you.:)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.