Fixing The amount must be an integer Error in Bagisto

The amount must be an integer

Fixing The amount must be an integer Error in Bagisto

2. Modify the Cart Price Calculation

If the error occurs during checkout, modify the cart total calculations.

  • File: packages/Webkul/Checkout/src/Cart.php

  • Find the part where grand_total is assigned:

    php
    $cart->grand_total = round($cart->grand_total);
  • Change it to:

    php
    $cart->grand_total = (int) round($cart->grand_total);

Checking...

Ouch! There was a server error.
Retry »

Sending message...

Enquiry Form

Fill in the form below and we will be in touch soon

Spambot blocker question

4 + 5 =




Categories

Your Future Customers Are Searching Right Now

© obeysoft. All Rights Reserved.