Added the AbstractDeliveryModule class, and the isValidDelivery method.
This commit is contained in:
@@ -28,11 +28,24 @@ use Thelia\Model\Country;
|
||||
interface DeliveryModuleInterface extends BaseModuleInterface
|
||||
{
|
||||
/**
|
||||
* calculate and return delivery price
|
||||
* This method is called by the Delivery loop, to check if the current module has to be displayed to the customer.
|
||||
* Override it to implements your delivery rules/
|
||||
*
|
||||
* @param Country $country
|
||||
* If you return true, the delivery method will de displayed to the customer
|
||||
* If you return false, the delivery method will not be displayed
|
||||
*
|
||||
* @return mixed
|
||||
* @param Country $country the country to deliver to.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isValidDelivery(Country $country);
|
||||
|
||||
/**
|
||||
* Calculate and return delivery price in the shop's default currency
|
||||
*
|
||||
* @param Country $country the country to deliver to.
|
||||
*
|
||||
* @return float the delivery price
|
||||
*/
|
||||
public function getPostage(Country $country);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user