Hot answers tagged

2

You have put the postcode/Region checking at \Magento\Quote\Model\ShippingMethodManagement::estimateByExtendedAddress \Magento\Quote\Model\ShippingMethodManagement::estimateByAddressId because of these functions, the shipping methods are rendered at the checkout page. Note that, Magento 2 does not save the Shipping address till database 's quote ...


2

I think this is not a bug, it's how it should be. So you, as a customer, want to add stuff to the cart but set your own price on the item? Something does not add up. If this is allowed, what would stop every customer from adding to the cart products and setting the price to 1 cent? Or even zero? Anyway, if you really want this (I strongly advice ...


1

You can reset your cart using the following code. $quotefactory = $objectManager->get('Magento\Quote\Model\QuoteFactory'); $quote = $quotefactory->create()->load('your_quote_id'); $quote->setIsActive(true); $quote->save(); NB: I used object manager as a reference. Do not use object manager in your code.


1

I have same problem and i have solved it by Custom API first create Qoute and update item price by item id saperately. Add code in webapi.xml <?xml version="1.0"?> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd"> <route url="/V1/carts/...


1

It seems like your track array field format is wrong. Please try this below : { "entity":{ "order_id":70, "items":[ { "order_item_id":94, "qty":1 } ], "tracks":[ { "carrier_code":"UPS", "order_id":70, "title":"ground", "...


1

Actually they give an idea of adding general repository. It should be like because In your case, GIT_USER_ID: netz98 and GIT_REPO_ID: magento2-swagger-api-client-demo Add the following to composer.json { "repositories": [ { "type": "git", "url": "https://github.com/netz98/magento2-swagger-api-client-demo.git" } ], "require": { ...


1

You can try send a custom http code in your service class using ResponseInterface. Here a little example: Define your service interface like this: <?php namespace Test\Module\Api; interface TestApiInterface { /** * @api * * @return \Magento\Framework\App\ResponseInterface */ public function foo(); } Now on your service class ...


1

You can get OAuth Token by using below details: URL : https://magento.local/rest/V1/integration/customer/token Header : Content-Type : application/json Request Type : POST **Params**---> { "email":"test@test.com", "password":"test@123" } You will get customer token.


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