33 votes
Accepted

Remove Shipping steps in Onepage Checkout

Here is what I've done. I removed the shipping step and used a default shipping method that I know is always going to be available. Not sure if this is what you need but you can at least use it as a ...
user avatar
  • 196k
25 votes
Accepted

Magento 2 make product attribute available in QuoteItem

In order to make custom product attribute available in quote item, simply add the attribute in the file: Vendor/Module/etc/catalog_attributes.xml <?xml version="1.0"?> <config xmlns:xsi="...
user avatar
  • 4,632
22 votes

Magento 2 Add dropdown list to shipping method

Magento checkout does not support any kind of form for shipping method additional data. But it provides shippingAdditional block in the checkout which can be used for this. The following solution will ...
user avatar
  • 5,798
16 votes
Accepted

Magento 2 add custom extesion html file in shipping method block

I am not sure if you can achieve that. Table with carrier rates is rendered based on rest request to rest/en/V1/guest-carts/estimate-shipping-methods. You need to add extension attributes to ...
user avatar
  • 5,798
15 votes

Magento 2 How to get all active shipping methods?

Or you can use \Magento\Shipping\Model\Config\Source\Allmethods, it does just that!
user avatar
  • 161
15 votes
Accepted

Magento2: How to get shipping method in order using observer `sales_order_save_after`?

You can get the shipping method by $order->getShippingMethod(); or $order->getShippingAddress()->getShippingMethod();
user avatar
13 votes

Magento 2 additional data to shipping method

The top-rated answer doesn't work because he forgot to set the "description" value inside of the \Magento\Quote\Model\Quote\Address\Rate class. If we do not create a Plugin to set the Description ...
user avatar
11 votes
Accepted

What is the current UPS shipping gateway? (outage 2019-01-06)

You simply need to update the UPS Gateway URL to use "https" To change this setting, login to the backend of your Magento website and then go to : System > Configuration Click “Shipping Methods” ...
user avatar
10 votes

Magento 2 - enable cash on delivery only for specific shipment method

I use an plugin in a custom module to set the isAvailable() function for Magento\OfflinePayments\Model\Cashondelivery to false when shipping method flatrate_flatrate is selected. file: <magento-...
user avatar
  • 661
10 votes

Get Product Attribute value

$_product = $block->getProduct(); $myattribute = $_product->getResource()->getAttribute('Your_Attribute_Code')->getFrontend()->getValue($_product); echo $myattribute; if want to show ...
user avatar
9 votes

Magento 2: Hide other shipping methods when free shipping is available

Use the extension ShippingTweaks.
user avatar
  • 588
9 votes
Accepted

Magento 2 How to remove shipping method in checkout page

Follow below steps: Vendor: Vendor ModuleName: CheckoutStep 1) Override checkout_index_index.xml in your module and define your own component in shipping step app/code/Vendor/CheckoutStep/view/...
user avatar
  • 21.7k
8 votes
Accepted

Debugging: Sorry, no quotes are available for this order at this time

Unfortunately there's not much in the UI for debugging these types of issues. You could try enabling the Debug setting. That will log the API requests and responses to your var/logs/ directory, ...
user avatar
  • 1,215
8 votes

Magento 2 additional data to shipping method

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/...
user avatar
8 votes
Accepted

Magento 2 How to get all active shipping methods?

In addition to answer of keyur shah You can get all active shipping using below code: protected $scopeConfig; protected $shipconfig; public function __construct( \Magento\Framework\App\Config\...
user avatar
8 votes

CollectRates in custom carrier is not called when weight is over zero. Magento2

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 ...
user avatar
8 votes
Accepted

Add shipping method programmaticaly

Need to add following dependency in constructor: \Magento\Quote\Model\Quote\Address\Rate $shippingRate and then use the following code: $quote=$this->quote->create(); //Create object of ...
user avatar
8 votes
Accepted

magento 2: Hide shipping method in frontend

You can disable/hide Flatrate shipping method at frontend in magento 2 using plugin concept. please follow the below steps Create custom module Hello_World Create plugin and configure in di.xml file, ...
user avatar
7 votes

Magento : Use custom error message in shipping method

For the googlers landing on this page, here is the solution : To always display the carrier, Magento is looking for the showmethod attribute in your carrier configuration. You should add this code in ...
user avatar
  • 775
7 votes
Accepted

OnePage Checkout - Hide Payment method depending on Shipping Method

I got an answer to this same question on StackOverflow by user Elvarasan. His answer provided me with everything I needed to get this working. To hide some payment methods based on shipping method ...
user avatar
  • 619
7 votes

Remove Shipping steps in Onepage Checkout

Make your product as Virtual Product and it will automatically removed.
user avatar
7 votes

Remove Shipping steps in Onepage Checkout

I have a better solution than the one of @marius which doesn't need any rewrites. You still need to create an own module, there are tons of tutorials for that so I won't explain it here. You have to ...
user avatar
7 votes
Accepted

Magento 2 custom shpping method not showing on frontend

This worked out for me https://github.com/mageplaza/magento-2-shipping-method/issues/1 => Changing "enable" for "active" in: /app/code/Mageplaza/Simpleshipping/Model/Carrier/Shipping.php 53 /...
user avatar
  • 96
7 votes
Accepted

Magento 2 checkout - Update shipping methods after change of city, address line and telephone fields

After so much investigation I found one solution. I have tried for Offline shipping methods as described follows and its working fine for me: Namespace/Module/view/frontend/requirejs-config.js var ...
user avatar
6 votes

Retrive the Shipping method and shipping rates programmatically

Try this code $cart = Mage::getSingleton('checkout/cart'); $address = $cart->getQuote()->getShippingAddress(); $shipping = Mage::getModel('shipping/shipping'); $result=$shipping->...
user avatar
  • 191
6 votes

How to set default shipping method and country?

Override the CartController and add this code in the indexAction class Ajaxy_Core_Checkout_CartController extends Mage_Checkout_CartController { public function indexAction() { ...
user avatar
6 votes
Accepted

Magento 2: Hide other shipping methods when free shipping is available

I had the same problem. Remove "Free Shipping" configuration because you don't need it (you already have "Cart Price Rules"). When your customer qualifies for free shipping it happens based on "Flat ...
user avatar
6 votes

Magento 2: Hide other shipping methods when free shipping is available

Write a plugin to disable flat rate shipping method when free shipping is actually enabled based on cart sub total. <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...
user avatar
6 votes
Accepted

Magento 2 - Shipping fee using table rates always zero when adding more items in cart

As per magento default, table rates are working but also some cart rule is applying on shipping rates. For Example when you add one product add to cart, table rates are working but when you add ...
user avatar
6 votes
Accepted

Get Product Attribute value

foreach($products as $product) { $productName = $product->getName(); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager->create('Magento\...
user avatar
  • 9,513

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