• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

how to add another status or edit current status ?

Modules
4
8
1.1k
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.
  • O
    otheriz last edited by 31 Aug 2020, 12:51

    Dear Bagisto..how to add another status?

    like "pick and pack" or "item on prepared"?
    so customers don't have to wait until "shipping" to get the update..

    and how to change the current shipping status to "shipped" not "processing"?

    Thank you

    1 Reply Last reply Reply Quote 0
    • V
      Vaishali Agarwal last edited by 31 Aug 2020, 13:36

      @otheriz
      could you please confirm the term "status" whether it's an 'order status' or something other status??

      1 Reply Last reply Reply Quote 0
      • O
        otheriz last edited by 31 Aug 2020, 14:26

        Yes..it's the order status..

        This is how i use bagisto order module..
        current :
        Order - Invoice - shipping - done (PrePayment)
        or
        Order - shipping - invoice(auto paid) - done (Cash On Delivery)

        What i need :
        Order - Invoice - Preparing - shipping - done (PrePayment)
        or
        Order - Preparing - shipping - invoice(auto paid) - done (Cash On Delivery)

        1 Reply Last reply Reply Quote 0
        • devansh-webkul
          devansh-webkul last edited by 1 Sept 2020, 19:23

          Hi @otheriz,

          There is a method named as updateOrderStatus($order) in file packages/Webkul/Sales/src/Repositories/OrderRepository.php at line number 272 (according to my file).

          You need to adjust your status here and then you need to call this repository method.

          Or if you don't want to manipulate this method then you can create your own method in this repository. For e.g.,

          public function changeOrderStatus($order, $status)
          {    
              $order->status = $status;
              $order->save();
          }
          

          And after that call your method like this,

          $this->orderRepository->changeOrderStatus($order, 'preparing');
          

          You can try according to your need.

          R 1 Reply Last reply 30 May 2021, 04:33 Reply Quote 0
          • O
            otheriz last edited by 2 Sept 2020, 19:39

            hi @devansh-webkul ,
            I'm very thankful for the information

            this is safe, right?
            There's no other module that read base on order status?

            for example, [before add quantity to cart] (Read total quantity from)=>$order->where("status", "pending")...this is just a random example..is there anything similar to this ? or is it safe to put custom status here other than bagisto current status?

            and currently when shipped the status is changed to "processing" where can i change it to "shipped" will it have side effect if i change it ?

            Thank You Very much brother

            1 Reply Last reply Reply Quote 0
            • devansh-webkul
              devansh-webkul last edited by 3 Sept 2020, 04:54

              Hi @otheriz,

              Unless and until you are not manipulating the calculation in this method updateOrderStatus($order) in file packages/Webkul/Sales/src/Repositories/OrderRepository.php.

              In this method, 3 methods are calling which is depend on some calculations. Please go through it.

              1 Reply Last reply Reply Quote 1
              • 9 months later
              • R
                rustam @devansh-webkul last edited by 30 May 2021, 04:33

                @devansh-webkul
                Hi,
                How and where I can call mentioned method: $this->orderRepository->changeOrderStatus($order, 'preparing');

                1 Reply Last reply Reply Quote 0
                • devansh-webkul
                  devansh-webkul last edited by 31 May 2021, 04:29

                  Hi @rustam,

                  There is no such method, i have just given him a suggestion to create one.

                  1 Reply Last reply Reply Quote 0
                  7 out of 8
                  • First post
                    7/8
                    Last post