New answers tagged

0

Here is the code for get billing and shipping address. class SetCustomer { protected $_customerFactory; protected $_addressFactory; public function __construct(\Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Model\AddressFactory $addressFactory ) { $this->...


0

I recently faced the same issue. For anybody having issues importing the tablerates.csv file even after adding the region/state rows in directory_country_region and directory_country_regions_name tables. Be sure to confirm that you are using the same region code (not region name) in both the tablerates.csv file and in the directory_country_region . Magento ...


1

If i get this right then in the following function public function execute(OrderInterface $order): bool { $stocks = $this->stockRepository->getList()->getItems(); $orderItems = $order->getItems(); foreach ($orderItems as $orderItem) { $productType = $orderItem->getProduct()->getTypeId(); if (!$this->...


0

OK. Apparently this is a bug which occurs when the region field is empty. Found a workaround on Github here: https://github.com/magento/magento2/issues/7387#issuecomment-263586330 In vendor/magento/framework/DB/Adapter/Pdo/Mysql.php Search for the line in the error (in this case 3101) the text there should be as below case 'varchar': ...


0

Default magento 2 allow to set multi shipping address for each items in one order. Step 1: you need go to config to Allow Shipping to Multiple Addresses. Magento admin > Store -> configuration -> Sales -> multishipping setting -> Allow Shipping to Multiple Addresses -> YES. Step 2: add two items or more than 2 qty in order. Step 3: In mini cart click "...


0

Thanks @anjali-patil for giving a huge hint, I'll try to post here what he meant in more detail. In your your component js file there is most likely a define(['A', 'B', 'C'], (A, B, C) => ...) call which is an AMD way to require files your script depends on. Here you can add a dependency to 'Magento_Checkout/js/model/quote' (if not already). quote.js ...


0

You need to update store information. Go to Admin -> Stores -> General -> Store Information. After you update all details, you able to create shipping labels from magento.


Top 50 recent answers are included