Questions tagged «custom-shipping-method»

1
使选定的自定义送货方式在一页结帐时显示自定义输入文本区域
我成功添加了自定义送货方式,如下所示: app / etc / config.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd"> <default> <carriers> <lime> <active>1</active> <allowed_methods>delivery</allowed_methods> <methods>delivery</methods> <type>NAMESPACE</type> <sallowspecific>0</sallowspecific> <model>Namespace\Module\Model\Carrier</model> <name>Namespace_Module custom Shipping</name> <title>Namespace_Module custom Shipping</title> <handling_type>F</handling_type> </lime> </carriers> </default> </config> 应用程序/代码/命名空间/模块/模型/Carrier.php public function collectRates(RateRequest $request) { if (!$this->getConfigFlag('active')) { return false; } $result = $this->_rateResultFactory->create(); $method = $this->_rateMethodFactory->create(); $method->setCarrier('HILO'); …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.