WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. clojel
    Member
    Posted 1 year ago #

    Just upgraded to Cart66-lite 1.5.1.2, 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~
    http://wordpress.org/extend/plugins/cart66-lite/

  2. mrkshrt
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    I am facing the same problem. Any solution ?

  4. mrkshrt
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  7. sneader
    Member
    Posted 1 year ago #

    BTW, thanks clojel for the great fix!

  8. Kerry Carron
    Member
    Posted 1 year ago #

    Great Fix THANKS! It was exactly what I needed.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.