How to achieve these custom function/module
-
dear bagisto team,
i have some question about how to achieve some custom function/module :
- How to add price to payment method and include it on cart/order ?
- How to add payment confirmation on the bank transfer payment method ?
- 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..
- 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 -
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
-
hi @shaiv-webkul ,
i assume you try to answering the question 1 and 2..- 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..
- i mean the confirmation on the user page, like uploading the evidence of transfer.