Bagisto Forum

    Bagisto

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

    Issue occurs when the buying is interrupted in the middle

    Bug Report
    2
    8
    507
    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.
    • W
      William Hatanaka last edited by William Hatanaka

      Hello, I am not fluent in English. I will try describe a bug that occurred with me.
      I am using the Bagisto DOCKER v1.1.2 (24th of March 2020)** - Release.

      When the customer is doing a purchase and click the button "Checkout" change the page to choose the shipping address, after choose it appear the shipping method. But in this point, if the customer decide to add some product in the cart and click again the button "Checkout" and choose the shipping address the shipping method is not showed again and the purchase operation stop in this point.
      I do this process again.
      I cleared the cart, deleted the customer and created a new one with a new address.
      I followed the process by checking what happens in the database.
      I check the following tables:

      1. addresses
      2. cart
      3. cart_items
        4.cart_shipping_rates

      After add the first product inside the cart the situation of those tables are:

      addresses
      1.png

      cart
      2.png

      cart_items
      3.png

      cart_shipping_rates
      4.png

      After the button "Checkout" was clicked and the shipping address was chosen :
      5.png

      The table addresses became looks like this:
      6.png

      The cart_shipping_rates table looks like this:
      7.png

      In this point, the customer leave this page and went to add another product to add in the cart:
      8.png

      The button "Checkout" was clicked and the page change to checkout page. The shipping address was choosen... But the shipping method does not appear...
      The customer is unable to proceed with the purchase process ...
      9.png

      And I will dump a log about this error:

      [2020-05-12 22:10:35] local.ERROR: Trying to get property 'id' of non-object {"exception":"[object] (ErrorException(code: 0): Trying to get property 'id' of non-object at /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php:85)
      [stacktrace]
      #0 /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php(85): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Trying to get p...', '/var/www/html/b...', 85, Array)
      #1 /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php(46): Webkul\\Shipping\\Shipping->saveAllShippingRates()
      #2 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Webkul\\Shipping\\Shipping->collectRates()
      #3 /var/www/html/bagisto/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php(121): Illuminate\\Support\\Facades\\Facade::__callStatic('collectRates', Array)
      #4 [internal function]: Webkul\\Shop\\Http\\Controllers\\OnepageController->saveAddress(Object(Webkul\\Checkout\\Http\\Requests\\CustomerAddressForm))
      #5 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)
      #6 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('saveAddress', Array)
      #7 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Webkul\\Shop\\Http\\Controllers\\OnepageController), 'saveAddress')
      #8 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
      #9 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
      #10 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
      #11 /var/www/html/bagisto/packages/Webkul/Shop/src/Http/Middleware/Currency.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #12 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Webkul\\Shop\\Http\\Middleware\\Currency->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #13 /var/www/html/bagisto/packages/Webkul/Shop/src/Http/Middleware/Theme.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #14 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Webkul\\Shop\\Http\\Middleware\\Theme->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #15 /var/www/html/bagisto/packages/Webkul/Shop/src/Http/Middleware/Locale.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #16 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Webkul\\Shop\\Http\\Middleware\\Locale->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #17 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #18 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #19 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #20 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #21 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #22 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\AuthenticateSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #23 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #24 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #25 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #26 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
      #27 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
      #28 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
      #29 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
      #30 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
      #31 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
      #32 /var/www/html/bagisto/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #33 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #34 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #35 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #36 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #37 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #38 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #39 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #40 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #41 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
      #42 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
      #43 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
      #44 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
      #45 /var/www/html/bagisto/public/index.php(74): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
      #46 {main}
      "}
      

      The table addresses looks like this:
      10.png

      If I open again the Checkout page appear 3 identical addresses
      On this page I chose one of the addresses to make the purchase and the delivery method appeared and everything indicates that I would be able to make the purchase. But I believe that something is not working well when the buying process is interrupted in the middle. Is there any way to fix this?
      I believe that this did not happen in the previous version of the Bagisto.
      Thank you for your attention and I'm sorry I stayed so long and I couldn't be less verbose to explain it.

      1 Reply Last reply Reply Quote 0
      • W
        William Hatanaka last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • W
          William Hatanaka last edited by

          Did I fail to express myself correctly in my explanation? Is the explanation very confusing? Sorry about that.
          Could you please give me feedback? I know that there are many messages for you to answer, but if there is something that I can facilitate understanding or that you can say in another way, please contact me so that I can help you find a solution.OK.
          Thank you

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

            @William-Hatanaka
            Thanks for the detailed description. it always help us to find the bug easily.
            Your query says about the addresses duplicacy as well as the shipping address issue when cart item change from the checkout page.

            Firstly please refer this query https://github.com/bagisto/bagisto/issues/2987
            As it will resolved the address issue.
            This query is fixed in master branch you can take pull from the master.

            Thanks.

            W 1 Reply Last reply Reply Quote 0
            • W
              William Hatanaka @Vaishali Agarwal last edited by

              @Vaishali-Agarwal
              Hello, I installed the latest version of Bagisto to check the problem. Unfortunately, the problem remains.
              I put a product in the cart, I confirmed the address on the checkout page, I left the checkout page, I went back to the checkout page again and confirmed the address again.
              The shipping method no longer appeared. At this moment the following error occurred:

              [2020-05-14 18:29:41] local.ERROR: Trying to get property 'id' of non-object {"exception":"[object] (ErrorException(code: 0): Trying to get property 'id' of non-object at /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php:85)
              [stacktrace]
              #0 /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php(85): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Trying to get p...', '/var/www/html/b...', 85, Array)
              #1 /var/www/html/bagisto/packages/Webkul/Shipping/src/Shipping.php(46): Webkul\\Shipping\\Shipping->saveAllShippingRates()
              #2 /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Webkul\\Shipping\\Shipping->collectRates()
              #3 /var/www/html/bagisto/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php(121): Illuminate\\Support\\Facades\\Facade::__callStatic('collectRates', Array)
              #4 [internal function]: Webkul\\Shop\\Http\\Controllers\\OnepageController->saveAddress(Object(Webkul\\Checkout\\Http\\Requests\\CustomerAddressForm))
              

              And if I leave the checkout page and return to that page again, 3 identical addresses will appear.
              What can I do?
              Thank you

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

                Hi @William-Hatanaka
                In the previous post i told you to take the pull from the master branch
                as in the bagisto latest version this issue is still exist.

                Thanks

                W 1 Reply Last reply Reply Quote 0
                • W
                  William Hatanaka @Vaishali Agarwal last edited by

                  @Vaishali-Agarwal
                  Hello! My fault!
                  Worked !
                  Thank you !

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

                    @William-Hatanaka
                    Great!!!! ☺

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