Cart66 Lite :: WordPress Ecommerce
Zero(s) padding for price tags (8 posts)

  1. clojel
    Posted 2 years ago #

    Just upgraded to Cart66-lite, product price tags seemed to have taken a shorter form, eg $29.9 instead of $29.90 (assuming Decimals set to 2 at Cart66 Settings > Main).

    It can be traced to currencyMarkup function in models/Cart66Common.php:
    $postDecimal = isset($decimalBreak[1]) ? $decimalBreak[1] : '';

    Could it be revised slightly? Eg
    $postDecimal = str_pad(isset($decimalBreak[1]) ? $decimalBreak[1] : '', $decimal, '0');

    Appreciate the folks working behind the scene. Merry Christmas~

  2. mrkshrt
    Posted 2 years ago #

    I haven't dug in and confirmed the solution, but I am seeing a related problem when using shortcodes, zeroes are truncated off of the item price. so instead of $20.00 it would just show $20 for example.
    This seemed to have happened after updating to most current version.

  3. aman179
    Posted 2 years ago #

    I am facing the same problem. Any solution ?

  4. mrkshrt
    Posted 2 years ago #

    I'd say make the change suggested by clojel and wait for update from Cart66 Lite folks
    That is what I did

  5. aman179
    Posted 2 years ago #

    Thanks for your reply mrkshrt
    I did the same as suggested by clojel, but after changing
    $postDecimal = isset($decimalBreak[1]) ? $decimalBreak[1] : ''; to
    $postDecimal = str_pad(isset($decimalBreak[1]) ? $decimalBreak[1] : '', $decimal, '0');
    got this error
    Parse error: syntax error, unexpected T_VARIABLE in /public_html/*******.com/wp-content/plugins/cart66-lite/models/Cart66Common.php on line 1690

  6. aman179
    Posted 2 years ago #

    oh sorry,
    it was my mistake. problem solved. Thanks a lot. :)

  7. sneader
    Posted 2 years ago #

    BTW, thanks clojel for the great fix!

  8. Kerry Carron
    Posted 2 years ago #

    Great Fix THANKS! It was exactly what I needed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cart66 Lite :: WordPress Ecommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.