Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Tweaking how the amount is displayed.

by

Tips and Tricks HQ Support Portal › Forums › Simple PayPal Shopping Cart › Simple Shopping Cart Tweaks › Tweaking how the amount is displayed.

Tagged: Japanese decimal, Simple Shopping Cart

  • This topic has 4 replies, 3 voices, and was last updated 7 years, 6 months ago by Trane Francks.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 13, 2010 at 5:39 am #1676
    amin007
    Participant

    If you want to tweak how the total amount is displayed in the simple shopping cart then open the “wp_shopping_cart.php” file and look for the following function:

    function print_payment_currency($price, $symbol, $decimal)
    {
    return $symbol.number_format($price, 2, $decimal, ',');
    }

    This is the function that displayed the amount to two decimal places. Tweak it to however you want to display your price amount.

    September 21, 2015 at 9:16 am #23353
    Trane Francks
    Spectator

    Hi.

    It seems like this would be a candidate for a variable in the settings page with the currency, e.g.:

    Currency Code JPY

    Currency Symbol ¥

    Decimal Places 0

    Having to edit the PHP file every time the software gets updated will get old (and be prone to error).

    In any case, would you please be so kind as to let me know where this resides in the full paid version? I’ve tried editing wp_eStore1.php with:

    $num_of_decimals = 0; //$wp_eStore_config->getValue('eStore_price_num_decimals');
    if (!is_numeric($num_of_decimals)) {
    $num_of_decimals = "0";

    As well as editing eStore_configs.php:

    $wp_eStore_config->addValue('eStore_price_num_decimals', 0);

    That doesn’t seem to have done the trick for me. :)

    Cheers!

    September 21, 2015 at 10:19 am #23354
    Trane Francks
    Spectator

    Solved it, I think.

    In wp_eStore1.php, I changed line 1041 of function format_eStore_price_amount:

    $num_of_decimals = 0; //intval($num_of_decimals);

    I hope that helps somebody.

    Cheers.

    September 21, 2015 at 11:12 pm #23355
    admin
    Keymaster

    You can choose your price display formatting settings from the advanced settings of the eStore plugin. Not need to modify any code.

    Go to the following settings area:

    WP eStore Settings -> Advanced Settings -> Price Display Settings

    September 22, 2015 at 1:37 am #23356
    Trane Francks
    Spectator

    You know, I JUST found that about 30 seconds ago. May I please have a napkin to wipe the egg off my face? *giggle*

    Thank you for your patience. :)

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ