Recent Topics

While adding cart to an item getting message "Error! A non-numeric value encountered."



  • While adding cart to an item getting message "Error! A non-numeric value encountered."

    Screenshot from 2020-06-01 15-45-57.png

    
    {
        "name": "bagisto/bagisto",
        "description": "Bagisto Laravel ECommerce",
        "keywords": [
            "framework",
            "laravel"
        ],
    
        "license": "MIT",
        "type": "project",
        "require": {
            "php": "^7.2.0",
            "ext-curl": "*",
            "ext-intl": "*",
            "ext-mbstring": "*",
            "ext-openssl": "*",
            "ext-pdo": "*",
            "ext-pdo_mysql": "*",
            "ext-tokenizer": "*",
            "astrotomic/laravel-translatable": "^11.0.0",
            "barryvdh/laravel-dompdf": "0.8.5",
            "doctrine/dbal": "2.9.2",
            "fideloper/proxy": "^4.0",
            "flynsarmy/db-blade-compiler": "^5.5",
            "guzzlehttp/guzzle": "~6.0",
            "intervention/image": "^2.4",
            "intervention/imagecache": "^2.3",
            "kalnoy/nestedset": "5.0.0",
            "konekt/concord": "^1.2",
            "laravel/framework": "^6.0",
            "laravel/helpers": "^1.1",
            "laravel/tinker": "^1.0",
            "maatwebsite/excel": "3.1.18",
            "nwidart/laravel-modules": "^3.2",
            "prettus/l5-repository": "^2.6",
            "tymon/jwt-auth": "^1.0.0",
            "barryvdh/laravel-debugbar": "^3.1",
            "fzaninotto/faker": "^1.4"
        },
    
        "require-dev": {
            "barryvdh/laravel-debugbar": "^3.1",
            "codeception/codeception": "4.1.1",
            "codeception/module-asserts": "^1.1",
            "codeception/module-filesystem": "^1.0",
            "codeception/module-laravel5": "^1.0",
            "codeception/module-webdriver": "^1.0",
            "filp/whoops": "^2.0",
            "fzaninotto/faker": "^1.4",
            "mockery/mockery": "^1.0",
            "nunomaduro/collision": "^2.0",
            "phpunit/phpunit": "^7.0"
        },
    
        "replace": {
            "bagisto/laravel-user": "v0.1.0",
            "bagisto/laravel-admin": "v0.1.0",
            "bagisto/laravel-ui": "v0.1.0",
            "bagisto/laravel-core": "v0.1.0",
            "bagisto/laravel-attribute": "v0.1.0",
            "bagisto/laravel-checkout": "v0.1.0",
            "bagisto/laravel-customer": "v0.1.0",
            "bagisto/laravel-inventory": "v0.1.0",
            "bagisto/laravel-category": "v0.1.0",
            "bagisto/laravel-product": "v0.1.0",
            "bagisto/laravel-shop": "v0.1.0",
            "bagisto/laravel-theme": "v0.1.0",
            "bagisto/laravel-shipping": "v0.1.0",
            "bagisto/laravel-payment": "v0.1.0",
            "bagisto/laravel-sales": "v0.1.0",
            "bagisto/laravel-tax": "v0.1.0",
            "bagisto/laravel-api": "v0.1.0",
            "bagisto/laravel-paypal": "v0.1.0",
            "bagisto/laravel-discount": "v0.1.0"
        },
    
        "autoload": {
          "classmap": [
            "database/seeds",
            "database/factories"
          ],
          "psr-4": {
            "App\\": "app/",
            "Webkul\\User\\": "packages/Webkul/User/src",
            "Webkul\\Admin\\": "packages/Webkul/Admin/src",
            "Webkul\\Ui\\": "packages/Webkul/Ui/src",
            "Webkul\\Category\\": "packages/Webkul/Category/src",
            "Webkul\\Checkout\\": "packages/Webkul/Checkout/src",
            "Webkul\\Attribute\\": "packages/Webkul/Attribute/src",
            "Webkul\\Shop\\": "packages/Webkul/Shop/src",
            "Webkul\\Core\\": "packages/Webkul/Core/src",
            "Webkul\\Customer\\": "packages/Webkul/Customer/src",
            "Webkul\\Inventory\\": "packages/Webkul/Inventory/src",
            "Webkul\\Product\\": "packages/Webkul/Product/src",
            "Webkul\\Theme\\": "packages/Webkul/Theme/src",
            "Webkul\\Shipping\\": "packages/Webkul/Shipping/src",
            "Webkul\\Payment\\": "packages/Webkul/Payment/src",
            "Webkul\\Paypal\\": "packages/Webkul/Paypal/src",
            "Webkul\\Sales\\": "packages/Webkul/Sales/src",
            "Webkul\\Tax\\": "packages/Webkul/Tax/src",
            "Webkul\\API\\": "packages/Webkul/API",
            "Webkul\\CatalogRule\\": "packages/Webkul/CatalogRule/src",
            "Webkul\\CartRule\\": "packages/Webkul/CartRule/src",
            "Webkul\\Rule\\": "packages/Webkul/Rule/src",
            "Webkul\\CMS\\": "packages/Webkul/CMS/src",
            "Webkul\\Velocity\\": "packages/Webkul/Velocity/src",
            "Webkul\\BookingProduct\\": "packages/Webkul/BookingProduct/src"
          }
        },
    
        "autoload-dev": {
            "psr-4": {
                "Tests\\": "tests/"
            }
        },
    
        "extra": {
            "laravel": {
                "dont-discover": [
                    "barryvdh/laravel-debugbar",
                    "laravel/dusk"
                ]
            }
        },
    
        "scripts": {
            "post-root-package-install": [
                "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
            ],
    
            "post-create-project-cmd": [
                "@php artisan key:generate",
                "Webkul\\Core\\Events\\ComposerEvents::postCreateProject"
            ],
    
            "post-autoload-dump": [
                "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
                "@php artisan package:discover"
            ],
            "test": [
                "set -e",
                "@php artisan migrate:fresh --env=testing",
                "vendor/bin/codecept run unit",
                "vendor/bin/codecept run functional",
                "vendor/bin/codecept run trigger"
            ]
        },
        "config": {
            "preferred-install": "stable",
            "sort-packages": true,
            "optimize-autoloader": true
        },
        "minimum-stability": "dev",
        "prefer-stable": true
      }
    


  • Hi @Rajeshwar
    Let me know the bagisto version in which you are getting this issue.

    Thanks.



  • I'm not sure whether it is related or not, here is my experience with issue.

    Empty Weight
    By default, bagisto set Weight as system-defined attribute with type Text.
    If you set is_required to False and put empty text in Weight, it will cause error when doing Add-To-Cart.

    You can test it by intentionally setting different product weigh to empty and try Add-To-Cart.

    For me, only one product is causing that issue and I fix it by setting Weight to 0.

    Easy fix, and 4 hours well spent (not really).


Log in to reply