I create plugin in my custom module to override the method collectCarrierRates($carrierCode, $request), below code is not working.
What mistake here?
app/code/Vendor/Shippingtest/etc/frontend/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Shipping\Model\Shipping">
<plugin name="vendor-shippingtest-test"
type="Vendor\Shippingtest\Plugin\Test"
sortOrder="10"/>
</type>
</config>
app/code/Vendor/Shippingtest/Plugin/Test.php
<?php
namespace Vendor\Shippingtest\Plugin;
class Test
{
public function after(Magento\Shipping\Model\Shipping $subject, $result)
{
echo "Calling";
}
}
collectCarrierRatesmethod ? – Raphael at Digital Pianism Sep 05 '16 at 10:38collectCarrierRatesmethod. I try to update display error message in checkout/cart/ page. I already ask question previously. But no any answer get here http://magento.stackexchange.com/questions/134461/magento-2-1-update-display-error-message-in-checkout-cart-page – Payal Patel Sep 05 '16 at 10:46di.xmloutside the frontend folder – Raphael at Digital Pianism Sep 05 '16 at 10:47