You have put the postcode/Region checking at
because of these functions, the shipping methods are rendered at the
Note that, Magento 2 does not save the Shipping address till database 's quote ...
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 ...
You can reset your cart using the following code.
$quotefactory = $objectManager->get('Magento\Quote\Model\QuoteFactory');
$quote = $quotefactory->create()->load('your_quote_id');
NB: I used object manager as a reference. Do not use object manager in your code.
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
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
It seems like your track array field format is wrong. Please try this below :
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
You can try send a custom http code in your service class using ResponseInterface.
Here a little example:
Define your service interface like this:
* @return \Magento\Framework\App\ResponseInterface
public function foo();
Now on your service class ...
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
You will get customer token.