Magento Setup upgrade error for smile elasticsuite database table not found error.

When you try to install the Magento smile elasticsuite extension to your system and on setup:upgrade command run time if you facing an error like Base Table or View not found error,

      • Base table or view not found: 1146 Table ‘magento.smile_elasticsuitecatalog_search_query_product_position’ doesn’t exist
      • BEGIN INSERT IGNORE INTO ‘catalogsearch_fulltext_cl’ (‘entity_id’) VALUES (NEW.’product_id’); END

Continue reading “Magento Setup upgrade error for smile elasticsuite database table not found error.”

How to Managing Guest Cart Billing address (V1/guest-carts/:cartId/billing-address) by REST API Magento 2?

You can manage the Guest cart billing address for the current quote of the guest customers in Magento 2 with the help of REST API.

You can use the given Rest URL to set and get the Billing address of the Guest cart.

/V1/guest-carts/:cartId/billing-address

If you want to assign a billing address to a specific cart, You can use the POST method to set the billing address on the current guest cart,

I hope you have available Guest cart token to use in our API request.

  • Request URL:  <URL>/V1/guest-carts/:cartId/billing-address

(Example: https://magento.test.com/rest/V1/guest-carts/tYqIEtiDdGx2Jw9MAyzR7FP9tx6ruD4b/billing-address)

  • Action: POST
  • Request Payload:
{
    "address": {
        "region": "",
        "country_id": "GB",
        "street": [
            "West road"
        ],
        "postcode": "W1S 1LA",
        "city": "London",
        "firstname": "Rakesh",
        "lastname": "Patel",
        "email": "rakesh@jesadiya.com",
        "telephone": "04422531111"
    }
}

Response: Quote Billing Address ID (101)

In the above Request URL, If you use the Action method as GET, you can fetch the available guest cart billing address.

Thank you.

How to get customer id from API header bearer token Magento 2?

You can fetch the customer ID from the Web API Header Authorization Token in Magento 2.

At the development time of a custom module, you are required to fetch the customer ID from the Bearer token passed in the Header.

You can just follow the given code snippet to fetch the customer ID from the current payload. Continue reading “How to get customer id from API header bearer token Magento 2?”