8

I have got the solution, this is because we need to define processAdditionalValidation method inside the carrier class and for checking the result you can return true in this function. public function processAdditionalValidation(\Magento\Framework\DataObject $request) { return true; } Please note processAdditionalValidation is different than ...


5

I am able to resolve this error like below. Added id for each tr that is, each shipping rates. <tr class="row" data-bind="attr: { 'id': 'shippingval_' + method.method_code} ,click: $parent.selectShippingMethod" > Then using css, hidden the ...


4

Without all the code related to the carrier such as the XML, it's hard to give you a definite answer. But if your carrier is disappearing when the weight is over 0, then I would suspect you have not set the max_package_weight property in the XML. Or set it to an invalid value like a negative. If you have tried Neeraj Garg's solution and it worked for you, ...


4

You can add below JS code in your checkout page for your requirement. <script> require([ 'jquery' ], function ($) { $(document).ready(function () { $("body").on("click", "#checkout-shipping-method-load .col-method .radio", function(){ $("#checkout-shipping-method-load .col-method .radio").removeClass(...


3

Please override your file vendor/magento/module-checkout/view/frontend/web/js/view/summary/shipping.js to /app/design/frontend/Vendor/ThemeName/Magento_Checkout/web/js/view/summary/shipping.js Change Below Function Your Theme getShippingMethodTitle: function () { var shippingMethod, shippingMethodTitle = ''; if (!this....


3

You can reset the shipping method as : Go to vendor\magento\module-checkout\view\frontend\web\template\shipping-address\shipping-method-list.phtml and replace the line 10 code from <input type="radio" class="radio" ifnot="method.error_message" ko-checked="element.isSelected" ko-value="method....


3

You need to allow Backorders Stores -> Configuration -> Catalog -> Inventory Under Product Stock Options Backorders -> Allow Qty Below 0 The Product will now need to be set to "In stock" for it to show add to cart buttons


2

You need to do this by adding description as an extension attribute as below: /etc/extension_attributes.xml should be like this: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd"> <extension_attributes for="Magento\...


2

Please run below command php bin/magento cron:run php bin/magento indexer:reindex


2

app/code/companyname/vendorname/view/frontend/web/template/delivery-date-block.js Add following method isVisible: function () { var enabled = parseInt(window.checkoutConfig.shipping.delivery_date.enabled); return enabled; } Whole class looks like: define([ 'jquery', 'ko', 'uiComponent' ], function ($, ko, Component) { 'use strict';...


2

You need to overwrite the adminhtml templates. First add the admin theme in the stores -> admin section of your modules config.xml <stores> <admin> <design> <theme> <template>yourcustomname</template> </theme> </design> </admin> </stores&...


2

Better to contact UPS and ask for the specific weight restrictions within your region. As for the default Maximum Package Weight it will always be 150 for lbs as to UPS limitation. You can also specify from the Allowed methods the Ground Commercial method which is applicable to Destination Type of Commercial. UPS Packages Request Type has two ...


2

I've added the modification logic to the original code. Please check: Copy the following file to your theme: vendor/magento/module-checkout/view/frontend/web/js/model/checkout-data-resolver.js applyBillingAddress: function () { var shippingAddress; if (quote.billingAddress()) { selectBillingAddress(quote.billingAddress()); ...


2

Adding custom attribute fields to magento is a painful experience in both magento 1 and magento 2. It's something I've had to do a few times but no client wants the same fields in the same place. If you go extension route this handles field visibility and saving. Plus providing you haven't changed much in admin values will come through there too. https://...


2

I think you have to enter the zip code then after shipping method will display


2

please use below code it working fine in my store https://meetanshi.d.pr/GAWATQ ini_set('display_errors', 1); ini_set('display_startup_errors', 1); ini_set('memory_limit', '5G'); error_reporting(E_ALL); use Magento\Framework\App\Bootstrap; require 'app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->...


2

Let suppose you know which method is available (using it's code). You need a one plugin: app/code/Vendor/Module/etc/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"> <!-- Plugins --> <type name="Magento\...


1

I finally figured out the issue. The code to check the shipping method to show is in the template file vendor/magento/module-checkout/view/frontend/web/template/shipping.html ... <div class="checkout-shipping-method"> <div class="step-title" data-bind="i18n: 'Shipping Methods'" data-role="title"></div> <!-- ko ...


1

You could follow this guide from Mageplaza to create your own shipping method: https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/


1

In case anyone else get into the same issue. I was getting shipping address from quote and the session, which was returning me default address. Today i checked the function again private function getShippingMethods(Quote $quote, $address) and the answer was in its 2nd parameter. $address->getRegionId() contains the selected state id.


1

public function getStoreWeightUnit($storeId) { $weightUnit =$this->scopeConfig->getValue( 'general/locale/weight_unit', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId); $unit = ($weightUnit == 'grams') ? 'GRAMS' : (($weightUnit == 'kbs') ? 'KILOGRAM' : 'LBS'); return $unit; }


1

Before configuring, read about shipping dry ice with FedEx. Default Magento 2 application does not support FedEx dry shipping. Instead, for FedEx shipping with Magento, you can use StorePep. You just need to mark the product as Dry ice within StorePep. Using this information StorePep will automatically show Dry ice rates and also print a FedEx shipping ...


1

Try following way: app/code/SR/MagentoCommunity/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_Checkout/js/model/checkout-data-resolver': { 'SR_MagentoCommunity/js/mixin/checkout-data-resolver-mixin': true } } } }; app/code/SR/MagentoCommunity/view/frontend/...


1

Solution worked for me: <?php namespace Vendor\Model\Plugin\Model\Quote\Address\RateResult; class MethodPlugin { public function afterSetPrice($subject) { $new_price = "2.00"; $subject->setData("price", $new_price); return $subject; } }


1

You can use next plugin for your purpose: <type name="Magento\Shipping\Model\Rate\Result"> <plugin name="your_plugin_name_update_rate_result" type="Vendor\Module\Plugin\ShippingRateResultAppend" sortOrder="10" disabled="false" /> </type> code will be like this one, but with own validation: /** * ...


1

You can do it using <item name="componentDisabled" xsi:type="boolean">true</item> app/code/Vendor/Checkout/view/frontend/layout/checkout_cart_index.xml Create reference blok <referenceBlock name="checkout.cart.totals"> and use componentDisabled to disable component. <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="...


1

Just make sure you are making an API request call with POST method. And it should be: rest/V1/guest-carts/:cartId/shipping-information


1

As per the error provided by you, you can see that the measurement units used by you are lbs. For India, you will not get the rates with these. You need to switch to kgs. You can switch this weight unit from admin. Logged in to your Magento admin panel -> go to store -> configuration -> general section -> locale options -> over there you ...


1

Change your system.xml by following code snippet: <?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> <system> <tab id="vendor_id" translate="label" sortOrder="10"> <label>Vendor_Name</...


1

Open vendor/magento/module-offline-shipping/Model/Carrier/Tablerate.php /** * Get rate. * * @param \Magento\Quote\Model\Quote\Address\RateRequest $request * @return array|bool */ public function getRate(\Magento\Quote\Model\Quote\Address\RateRequest $request) { return $this->_tablerateFactory->create()->getRate($request); } vendor/magento/module-...


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