WordPress.org

Ready to get started?Download WordPress

Forums

Cart66 Lite - Product page not displaying 2 decimals (1 post)

  1. rotarjen
    Member
    Posted 1 year ago #

    Our product pages were displaying the price as $28.5 instead of $28.50. Settings all checked and selected to display two decimal points.

    This fix overrides the admin settings, but I always want to show 2 decimals in the price, so I don't care.

    Here's the fix:

    cart66-lite/views/cart-button.php
    Change line 6 - change
    from
    $priceString = $data['price'];
    to
    $priceString = number_format($data['price'], 2, '.', '');

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by rotarjen
  • This topic is not a support question
  • WordPress version: 3.5

Tags