0

Can somebody please help me figure out why my closing brackets <span style="color: #000;">)</span> surrounding the "price-including-tax" value in price.phtml are ignored/overwritten when I add custom options to my simple products?

It occurs with every product as long as it has custom options (Magento default and Mageworx Advanced Product Options alike)

Example of opening and closing brackets showing correctly on product page: here

And an example when they just magically disappear... here

Thanks in advance :)

--

edit

The code in price.phtml resposible for this is as follows:

<span class="price-including-tax"> <span class="label">(<?php echo $this->helper('tax')->__('Incl. Tax:') ?></span> <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"> <?php echo $_coreHelper->formatPrice($_finalPriceInclTax, false) ?><span style="color: #000;">)</span>

  • You want to add bracket only for the product which has custom option? – MeenakshiSundaram R Jul 14 '15 at 18:18
0

When you changed the text "Incl. Tax:" to "(Incl. BTW:" was it done through the language file or did you manually change the label for all occurrences of "price-including-tax" in price.phtml?

I bet if you edited the language file you just need to add the closing bracket to each type of display that has "price-including-tax". (Lines 82, 102, 115, 141, 158, 238, 279, 325, 354, 379, 455 in price.phtml).

  • I have looked up the locale/nl/NL folder and have not found anything with closing round brackets. I've updated the initial question to show the code used to show the closing round bracket in question. The code is the actual part which provides the brackets in the working example – entrapped89 Jul 14 '15 at 15:40
  • Looking at the code you added the closing bracket to only one occurrence of the including tax. Since you edited the language file to include the opening bracket, where you see 'Incl. Tax' gets replaced with '(Incl. BTW:'. Look through price.phtml, you need to add the closing bracket to 11 variations of the code you showed above. – PlacementEdge Jul 14 '15 at 18:54
0

Since I was sure I put the closing brackets after all the "price-including-tax" values I tried to change the a few times. Somehow all the closing brackets were nested INSIDE the <span class="price" etc..> line. Changing the placement of the closing brackets to just AFTER the closing of this line fixed the issue.

So I changed:

<span class="price-including-tax"> <span class="label">(something)</span> <span class="price" id="price-including-tax> <span style="color: inherit; font-size: inherit">)</span> </span> </span>

TO:

<span class="price-including-tax"> <span class="label">(something)</span> <span class="price" id="price-including-tax> </span> <span style="color: inherit; font-size: inherit">)</span> </span>

This resolved the issue. I have no idea why the closing bracket works fine without custom options and somehow can't show that same bracket when there are custom options but now my closing brackets finally show up all the time!

Thanks for the help :)

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.