Checkout process-update shipping cost
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Checkout process-update shipping cost
Here you can see there is no Costdecorator which i have made(mentioned above).Do i have to add that decorator in configuration if that so how can i do thataimeos wrote: ↑09 Mar 2021, 18:00 Click on the "+" symbol right of the "Provider" field to add your decorator to the service:
https://aimeos.org/docs/latest/manual/s ... ors/#usage
Re: Checkout process-update shipping cost
You have used the wrong decorator namespace because in your code its for HTML client decorators, not for service decorators. The correct code would be:
Then, your class should be listed in the service panel of the admin backend.
Code: Select all
<?php
namespace \Aimeos\MShop\Service\Provider\Decorator;
class Costdecorator
extends \Aimeos\MShop\Service\Provider\Decorator\Base
implements \Aimeos\MShop\Service\Provider\Decorator\Iface
{
public function calcPrice(\Aimeos\MShop\Order\Item\Base\Iface $basket)
{ dd('ok');
// do something before
$price = $this->getProvider()->calcPrice($basket);
// do something after
return $price;
}
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star