0

I displayed offer price in individual page, if product have special price

<!-- If Product have Spl Price -->
        <?php 
        $regular_prc = round($_product->getPrice());
        $fnl_prc = round($_product->getFinalPrice());
         $curr_symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
        if($fnl_prc < $regular_prc):?>
            <span class="has_spl_prc_incart"><?php echo "OFFER PRICE " ."$curr_symbol " ."$fnl_prc" ; ?></span>


        <?php endif; ?>

         <!-- If Product have Spl Price -->

it's working fine but i added custom option to that product. Let us assume Drop down custom option

Test+100 Test1+200

if i select custom option offer value should not change how i fix it

  • after selecting offer value what you want to do? – Mujahidh Oct 28 '15 at 8:04
  • if i change custom option that time offer price also changed based on custom option – Magento 2 Oct 28 '15 at 8:05
  • custom option in product detail page right?You want to add or deduct the price and show that price right? or you just want to change the display amount only? – Mujahidh Oct 28 '15 at 8:08
  • check this link dev.fitfurn.com/living/cane-single-chair-with-cushion.html. I need to update OFFER Price(Red Txt above cart) also while changing custom option – Magento 2 Oct 28 '15 at 8:35
0

You have the onchange function called opConfig.reloadPrice()

In that function change the text of has_spl_prc_incart class.Or add an id to that span and update the innerhtml value like this

<span class="has_spl_prc_incart" id="has_spl_prc_incart">OFFER PRICE ₹  15500</span>

document.getElementById("has_spl_prc_incart").innerHTML="new Value";
                        or
document.getElementById("has_spl_prc_incart").textContent="new Value";

Simply you can change like how the value change in the offerprice UP.

Update You can search this link to find where you want to edit or alter the jquery function.

  • In which file i have to use that onchange event – Magento 2 Oct 29 '15 at 17:07
  • check the update – Mujahidh Nov 1 '15 at 6:00

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.