Closed bobitza closed 2 years ago
Where do you see this code you copied here in the docs?
I don't know if you are familiary with Laravel's drivers/manager concept. Shipping and Gateways are using this concept.
You need to create a new driver class and implement the calculate
method. Then add the shipping class to the manager.
This is what the docs are saying: https://bazar.conedevelopment.com/docs/shipping#shipping-drivers
Ok and after that, what i call to apply to my cart that driver cost ?
OK i found:
First you call:
$shippingCart = Cart::getShipping();
Then $shippingCart->calculateCost(false);
and from that you obtain$shippingCart->getPrice()
to obtain cost of shipping
Description:
I don't understand how to use Shipping, i want to setup on local-pickup with price 20 RON How i register on cart that cost? I tried but not working, docs is very bad:
I want something simple Shipping:add(20);