How to override cron job group in Magento 2?

You can see your existing cron Group name from your module crontab.xml file.

Override the Module Cron Job group from default to custom group easily. Also, you can change the cron schedule time.

If you want to override any existing Crom Job that contains a default Group, You can change it to your custom group by creating a simple module. Continue reading “How to override cron job group in Magento 2?”

How to get custom image type attribute value from product magento 2?

We can able to fetch the Custom Image Type product attribute value from the Product object by just fetching the product object.

Let’s say you have created a custom image_type product attribute called, brand_logo and you want to fetch the value saved for a product by product object. You can refer to the below logic to fetch the image value.

You can fetch the value of the image attribute by calling the below line,

I hope you have fetched the Product Object by the ProductRepositoryInterface, You can check the logic, Fetch Product Object By SKU

$product->getData('brand_logo');

Using the above stuff, You will get the file path of the image in the response.

How to get Product Stock Item by REST API V1/stockItems/:SKU Magento 2?

You can fetch product stock-related data like Qty, status, manage stock by REST API V1/stockItems/:SKU

URL: <BASE_URL>/rest/V1/stockItems/:SKU (https://magento246.test/rest/V1/stockItems/MySku)

Header: Authorization:Bearer <ADMIN_TOKEN> Continue reading “How to get Product Stock Item by REST API V1/stockItems/:SKU Magento 2?”