How to update special price by REST API magento 2?

You can add/update special prices by REST API in Magento with V1/products/<SKU> endpoint.

If you want to give offers/discounts to the products over a specific period of days, you can give it with the help of REST API.

Endpoint URL: <BASE_URL>/rest/V1/products/<SKU> (Example: https://magento245.test/rest/default/V1/products/my-sku) Continue reading “How to update special price by REST API magento 2?”

Magento Search: Could not validate a connection to elasticsearch. No alive nodes found in your cluster. Magento Setup Upgrade Error.

How to fix Magento Could not validate a connection to elastic search. No alive nodes found in your cluster Magento 2?

I have faced an error while working with Magento locally. I used Warden to run local Magento. I got an error while running the command from CLI,

bin/magento setup:upgrade

Error on the command line:

Could not validate a connection to Elasticsearch. No alive nodes found in your cluster.

Based on the error, I have checked my elastic search configuration in the app/etc/env.php file, I have managed the catalog search configuration from the env.php file, Continue reading “Magento Search: Could not validate a connection to elasticsearch. No alive nodes found in your cluster. Magento Setup Upgrade Error.”

Magento 2 – Get all the frontend_input select type product attribute list programmatically.

You can fetch the frontend_input type select product attribute list in Magento programmatically.

If you have any requirement to list down select field attribute list in Magento, you can fetch it easily with a given code snippet. Continue reading “Magento 2 – Get all the frontend_input select type product attribute list programmatically.”