Hot answers tagged

15

\Magento\Framework\Json\Helper\Data is deprecated since Magento 100.2.0 You could use \Magento\Framework\Serialize\Serializer\Json instead. Ie. public function __construct( \Magento\Framework\Serialize\Serializer\Json $json ) { $this->json = $json; } public function yourFunction() { $jsonDecode = $this->json->...


3

Replace your below files with these content Shipme/Block/Adminhtml/System/Config/Advanced.php <?php namespace Packt\Shipme\Block\Adminhtml\System\Config; class Advanced extends \Magento\Config\Block\System\Config\Form\Field { protected $_template = 'system/config/advance/check.phtml'; protected $_configPath = 'carriers/shipme/status'; //...


2

The object manager injects the Magento\Core\Model\Url implementation class wherever there is a request for the Magento\Core\Model\UrlInterface in the global scope. Multiple validation for different modules with filed. <argument name="mapping" xsi:type="array"> <item name="country" xsi:type="object">Magento\Payment\Model\...


2

When you check Magento\Payment\Model\Checks\SpecificationFactory of the construt public function __construct(\Magento\Payment\Model\Checks\CompositeFactory $compositeFactory, array $mapping) { $this->compositeFactory = $compositeFactory; $this->mapping = $mapping; } Second argument array $mapping in the array you will get all ...


1

Found how to achieve this: Use the following to convert the JSON into an array: \Magento\Framework\Webapi\Rest\Request\Deserializer\Json\Deserializer::deserialize('jsonString') Use the following to convert to an object (Path to class is the class that the object will be processed by) \Magento\Framework\Webapi\ServiceInputProcessor::process('\Path\To\...


1

Theoretically it is possible, but I think it involves a lot of code. You will have to keep in the table with the product-category associations an additional field for store_id. Then you need to change the admin panel to load the associations for your current store view only or with store id 0 in case you set associations at default level. Then you need to ...


Only top voted, non community-wiki answers of a minimum length are eligible