0

I'm having this problem with browsers not displaying the old price next to the sale_price except in safari. Both the index page where all products are listed and the singel productpage are not showing. Even in the pagesource is the old price not listed. Safari is showing in both pages without a problem.

This is the code I'm using:

<div class="price-holder">
  <div class="price">
    {if on_sale}
      <span>{price}</span>
      <del>{regular_price}</del>
    {if:else}
      <span>{price}</span>
    {/if}
  </div>
</div>

I've also tried this code:

<div class="price">
  {if on_sale}
    {price} <del>{regular_price}</del>
  {if:else}
    {price}
  {/if}
</div>

Both without success! Is there someone else who had encountered this problem? All help would be great.

  • Are you using any Javascript to change how the prices are displayed? Are there any Javascript errors? If it works in other browsers then this is more likely to be a front-end problem. – foamcow Jan 12 '15 at 9:15
  • Yes I'm using javascript for displaying content. I've been searching for the answer in the EE and Expresso Store and forgot to look into my javascript. Thanks for the wake-up call :) – Nabil Amjad Jan 12 '15 at 22:48
  • Thnaks for the help. Found the problem in the javascript. Made a few changes in the script and voila! problem solved. – Nabil Amjad Jan 12 '15 at 23:21
  • It might be wise to ensure your prices show without the need for Javascript. For instance, if you are hiding them and revealing with JS, instead you should hide them with JS too. This means if JS doesn't work your prices still show. – foamcow Jan 13 '15 at 8:44
  • Yes I'm thinking about disabling all the javascript for displaying price and product. Thanks for your thoughts! – Nabil Amjad Jan 13 '15 at 23:04

Your Answer

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

Browse other questions tagged or ask your own question.