How to update product images by REST Web API Magento 2?

You can upload product images by REST API Magento with the PUT action and the help of /V1/products/<sku>.

Action: PUT

URL: <BASE_URL>/rest/V1/products/<SKU>
(Example URL: https://magento.test/rest/V1/products/my-sku)

Header: Authorization: Bearer <ADMIN TOKEN> Continue reading “How to update product images by REST Web API Magento 2?”

Get All Sales/Cart rules associated with product by REST API Magento 2.

You can retrieve all the Sales rules that are related to the given product by Cart Price Rule Search REST API in Magneto.

Let’s say product SKU “A10001” is associated with two different cart price rules and you want to fetch a list of all the sales rules that are associated with the given SKU.

Magento native supports Cart Rule Search Rest API which will be helpful to fetch products associated with cart rules. Continue reading “Get All Sales/Cart rules associated with product by REST API Magento 2.”

Magento 2 Custom Grid spinner loading does’t stop and grid data doesn’t display.

Magento admin grid with custom module loader display infinite and doesn’t stop in the grid page also none of the error display in the console.

This is a common error in module development and it’s a silly mistake to resolve the issue.

Recently I have faced this type of error on the admin panel with my custom module, On the Module grid page, the spinner loads infinitely without any grid display on the listing page.

I have just checked my custom module and found out the way to resolution.

I have a naming issue with the di.xml file collection argument value and the dataProvider name in the listing UI component file. Both names are mismatched and that keeps the loading infinitely. Continue reading “Magento 2 Custom Grid spinner loading does’t stop and grid data doesn’t display.”