How to fetch custom category attribute value in GraphQL Magento 2?

You can fetch Custom User-defined category attribute value in the category GraphQL easily.

Let’s say, You have created a category attribute called, category_seo

You can get the category attribute value in Magento GraphQL in the given way,

Run categories Query, Continue reading “How to fetch custom category attribute value in GraphQL Magento 2?”

GraphQL Route query to fetch 301 redirect URL data in Magento 2.

GraphQL Route Query is used to fetch URL-related data for entity-type products, categories, or CMS pages. This query will be helpful while you are using PWA stuff to render proper pages based on the older 301 redirect URL.

If you have modified any URL for 301 permanent redirects and your e-commerce app running on PWA, while a user comes to your site and tries to hit the older URL, it will be going to 404 pages because the older URL has been permanently redirected to a new URL.

urlResolver() query is deprecated so try to avoid that query and use the latest route() Query for future proof your system. Continue reading “GraphQL Route query to fetch 301 redirect URL data in Magento 2.”

How to generate auto invoice by payment_action for custom payment methods in magento 2?

You can Generate an auto invoice after the order is placed successfully in Magento with the simple configuration.

You can use <payment_action> configuration in the config.xml file to set auto invoice for your custom payment method.

You can check programmatically Convert Order to Invoice Programmatically in Magento 2.

Using payment_action, You don’t need to generate manual action to create an invoice for the order.

You have to just create a config.xml file under your module etc directory. Continue reading “How to generate auto invoice by payment_action for custom payment methods in magento 2?”