Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How to remove extra zero from price

    General Discussion
    5
    8
    529
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      prashanttanwar last edited by

      Untitled.png

      how to remove extra zero

      200.00 -> 200

      1 Reply Last reply Reply Quote 0
      • P
        prateek-webkul last edited by

        Hey,

        You need to override the card file of shop package for default theme and can use trim method to remove extra zeroes after (.) operator

        Thanks

        P 1 Reply Last reply Reply Quote 0
        • P
          prashanttanwar @prateek-webkul last edited by

          @prateek-webkul

          Can you tell me where can I find these file

          Thanks!!!!

          1 Reply Last reply Reply Quote 0
          • P
            prateek-webkul last edited by

            @prashanttanwar,

            Go to packages/Webkul/Core/src/Core.php and edit the method formatPrice() for removing the extra zeroes from price.

            bala 1 Reply Last reply Reply Quote 0
            • bala
              bala @prateek-webkul last edited by

              coere.php ->formatPrice()

              $formater->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 0);

              A 1 Reply Last reply Reply Quote 0
              • V
                Vaishali Agarwal last edited by

                @bala
                Is this solution works for you?

                1 Reply Last reply Reply Quote 0
                • A
                  Ahmed Reda @bala last edited by

                  @bala yes it works on local host perfectly but on live server isnt working

                  bala 1 Reply Last reply Reply Quote 0
                  • bala
                    bala @Ahmed Reda last edited by

                    @Ahmed-Reda yes ,its working for me .

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post