Bagisto Forum

    Bagisto

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

    How to achieve these custom function/module

    Knowledge Base
    2
    3
    259
    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

      dear bagisto team,

      i have some question about how to achieve some custom function/module :

      1. How to add price to payment method and include it on cart/order ?
      2. How to add payment confirmation on the bank transfer payment method ?
      3. Is there a function for the user shipment confirmation.? i mean the "complete" status based on user confirmation after receiving the goods or certain days after we click "ship" on order on the backend process..
      4. on the filter by.., let's say by (attribute option)brand..how to only show available brand..ex. i click drink category, then the filter inside only shows the brand that available in the drink category(in product_attribute_values)

      if not too much, i only need the slightest idea/best practice to achieve those.
      Thank You

      1 Reply Last reply Reply Quote 0
      • S
        shaiv-webkul last edited by

        you can get total price by using Cart::getCart()->base_grand_total and place this code in amount attribute of your payment gateway API.

        You will get payment confirmation response from your payment gateway after that you can use below code to create invoice.

        $order = $this->orderRepository->create(Cart::prepareDataForOrder());

            $this->order = $this->orderRepository->findOneWhere([
                'cart_id' => Cart::getCart()->id
            ]);
        
            $this->orderRepository->update(['status' => 'processing'], $this->order->id);
        
                    if ($this->order->canInvoice()) {
                $this->invoiceRepository->create($this->prepareInvoiceData());
            }
        
            Cart::deActivateCart();
        

        You have to click on ship from the backend process.

        for more information regarding payment gateway integration visit - https://devdocs.bagisto.com/create_payment_method.html

        1 Reply Last reply Reply Quote 0
        • O
          otheriz last edited by

          hi @shaiv-webkul ,
          i assume you try to answering the question 1 and 2..

          1. by price i mean..additional price for payment(service fee like shipment price)..then show this additional price in the invoice/cart/order..not pulling the total price..
          2. i mean the confirmation on the user page, like uploading the evidence of transfer.
          1 Reply Last reply Reply Quote 0
          • First post
            Last post