Skip to content

shipping-methods

Auto Added by WPeMatico

Override `extension_attributes.xml` in extending custom module (which targets ShippingInformationInterface/ShippingInformationExtension)

The question is specifically about ./Magento/Checkout/Api/Data/ShippingInformationExtension.php and adding extra columns via extension_attributes.xml. Modules: Source module: Vendor_Module Overriding/extending module: Vendor2_Module2 (extending JS / templates etc / Plugins) from Source module. Issue I need to use a custom extension_attributes.xml inside Vendor2_Module2. Information… Read More »Override `extension_attributes.xml` in extending custom module (which targets ShippingInformationInterface/ShippingInformationExtension)

Shipping Methods Jquery Code

I’m doing some customization on Magento 2.4.4 checkout and i need help to understand how to inject some javascript into “table-checkout-shipping-method” I tried do innsert following code in following path /app/code/Magento/Checkout/view/frontend/templates/onepage.phtml <script type=”text/javascript”> require([‘jquery’],function($){ jQuery(function($) { console.log(‘test’); $(‘.step-title’).hide(); }); });… Read More »Shipping Methods Jquery Code

How not to use Object Manager?

i don’t want to use object manager how do i change my code? in the past i use method cart $cart but he deprecated <?php namespace CustomShippingMethodModelCarrier; use MagentoQuoteModelQuoteAddressRateRequest; use MagentoShippingModelCarrierAbstractCarrier; use MagentoShippingModelCarrierCarrierInterface; use MagentoFrameworkAppConfigScopeConfigInterface; use MagentoQuoteModelQuoteAddressRateResultErrorFactory; use PsrLogLoggerInterface; use… Read More »How not to use Object Manager?

I created a simple shipping method, I want to set the country rate manually? Example US x2

i try to use $request->getDestRegionCode() but it dosent work <?php class Custom extends AbstractCarrier implements CarrierInterface { protected $_code = ‘custom’; protected $rateResultFactory; protected $rateMethodFactory; public function __construct( ScopeConfigInterface $scopeConfig, ErrorFactory $rateErrorFactory, LoggerInterface $logger, ResultFactory $rateResultFactory, MethodFactory $rateMethodFactory, array $data… Read More »I created a simple shipping method, I want to set the country rate manually? Example US x2

How to create Shipping Cost Calculator by select country in magento 2?

i created a shipping method, for example, the cost of delivery is $15, but if you deliver to the USA, then multiply the amount by 2 Model/Carrier/Custom.php <?php namespace CustomShippingMethodModelCarrier; use MagentoQuoteModelQuoteAddressRateRequest; use MagentoShippingModelRateResult; use MagentoShippingModelCarrierAbstractCarrier; use MagentoShippingModelCarrierCarrierInterface; use MagentoFrameworkAppConfigScopeConfigInterface;… Read More »How to create Shipping Cost Calculator by select country in magento 2?