This repository was archived by the owner on Jan 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Shipping Methods page in admin goes blank after installing #20
Copy link
Copy link
Open
Description
I installed this module but after installing my shipping method(Store->Configuration->Sales->Shipping Methods) page showing the blank page. If I disable this module page shows all shipping method setting as it should.
Using Magento ver. 2.2.1
and if I check system.log there is an error like this
[2017-11-30 07:23:47] main.CRITICAL: Class Meanbee\MagentoRoyalmail\Model\Config\Source\Methods does not exist [] []
File Methods.php is here on this path Meanbee/Royalmail/Model/Config/Source/Methods.php
And it contains
<?php
namespace Meanbee\MagentoRoyalmail\Model\Config\Source;
use \Magento\Framework\Option\ArrayInterface;
use Meanbee\MagentoRoyalmail\Model\Carrier;
/**
* Class Methods Backend system config field renderer
*/
class Methods implements ArrayInterface
{
/**
* @var Carrier $carrier
*/
protected $carrier;
public function __construct(Carrier $carrier)
{
$this->carrier = $carrier;
}
/**
* Sets the option array for the small and medium
* parcel option in admin section of the extension
*
* @return array
*/
public function toOptionArray()
{
$methods = $this->carrier->getMethods();
$options = [];
foreach ($methods as $value => $label) {
$options[] = ['value' => $value, 'label' => $label];
}
return $options;
}
/**
* Get options in "key-value" format
*
* @return array
*/
public function toArray()
{
return array_map(function ($array) {
return [$array['value'] => $array['label']];
}, $this->toOptionArray());
}
}
```
`
Metadata
Metadata
Assignees
Labels
No labels