Issue #2417 fixed
This commit is contained in:
parent
66f29937e9
commit
002a977e22
|
|
@ -54,7 +54,7 @@ abstract class AbstractShipping
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDecription()
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->getConfigData('decription');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,4 +107,29 @@ class Shipping
|
|||
|
||||
return $rates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns active shipping methods
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getShippingMethods()
|
||||
{
|
||||
$methods = [];
|
||||
|
||||
foreach (Config::get('carriers') as $shippingMethod) {
|
||||
$object = new $shippingMethod['class'];
|
||||
|
||||
if (! $object->isAvailable())
|
||||
continue;
|
||||
|
||||
$methods[] = [
|
||||
'method' => $object->getCode(),
|
||||
'method_title' => $object->getTitle(),
|
||||
'description' => $object->getDescription()
|
||||
];
|
||||
}
|
||||
|
||||
return $methods;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue