Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Shipping Methods page in admin goes blank after installing #20

Open
VkyAtWork opened this issue Nov 30, 2017 · 1 comment
Open

Shipping Methods page in admin goes blank after installing #20

VkyAtWork opened this issue Nov 30, 2017 · 1 comment

Comments

@VkyAtWork
Copy link

VkyAtWork commented Nov 30, 2017

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());
    }
}
```
`
@Dhustone
Copy link

Dhustone commented May 5, 2018

Royal Mail only support php to v7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants