How to Get/Create Customer Active Quote Id by V1/carts/mine REST API Magento 2?

Magento Create an empty cart for login customer by REST API, You need to first fetch the current customer active quote id by V1/carts/mine endpoint.

By using given endpoint, You will get the current customer quote id with a simple API and if the customer doesn’t have any active cart, it will create an empty cart with the use of API.

Action: POST

Header: Authorization: Bearer <CUSTOMER_TOKEN> 
You can check the link to Generate Customer Token by Rest API.

URL: https://magento.test/rest/V1/carts/mine

Payload: null

Response: Quote ID. (Example: 12 Here 12 is the quote id for the customer.)

The response of the API will be helpful to add items to the cart for the login customer with Rest API.

Magento warning require bootstrap.php: failed to open stream: No such file or directory in autoload_real.php

Magento Warning display while we access the website or try to run the composer install command.

Actual Warning Message:

Warning: require(/var/www/html/vendor/composer/../phpstan/phpstan/bootstrap.php): failed to open stream: 
No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 73.

Solutions: Continue reading “Magento warning require bootstrap.php: failed to open stream: No such file or directory in autoload_real.php”

How to change sort order of product attributes from product edit page in Magento 2?

As a Magento beginner, You thought about changing the position of product attributes displayed on the admin product edit page.

If you don’t know how to change the sort order on the product edit page, This tutorial is for you to fix the sort order rendering on the product edit page.

Let’s say the product has assigned Attribute set to Default. You need to confirm the product attribute set from the product page. Continue reading “How to change sort order of product attributes from product edit page in Magento 2?”