How To Add Downloadable Products By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Use the updateCartItems
mutation to update shopping cart items and removeItemFromCart
to remove a product from the shopping cart.
The following below steps need to follow to add Downloadable products by using GraphQL in Magento 2.x
Step [1] – Recommendation to use below Downloadable Product syntax
Here Using Postman
Syntax –
mutation {
addDownloadableProductsToCart(
input: AddDownloadableProductsToCartInput
) {
AddDownloadableProductsToCartOutput
}
}
Step [2] – Put below Request
mutation {
addDownloadableProductsToCart(
input: {
cart_id: "s6Wgi4j0H2ULX0YHfD3mhOMHuAL10qLL"
cart_items: {
data: {
sku: "Gaming-Software"
quantity: 1
}
downloadable_product_links: [
{
link_id: 7 # Episode 2
}
{
link_id: 8 # Episode 3
}
]
}
}
) {
cart {
items {
product {
id
sku
name
}
quantity
... on DownloadableCartItem {
links {
title
price
}
samples {
title
sample_url
}
}
}
}
}
}
Step [3] – Below output response
{
"data": {
"addDownloadableProductsToCart": {
"cart": {
"items": [
{
"product": {
"id": 2041,
"sku": "Gaming-Software",
"name": "Gaming-Software"
},
"quantity": 1,
"links": [
{
"title": "Gaming Software",
"price": 0
}
],
"samples": []
}
]
}
}
}
}
The following below steps need to create Customer Registration Details By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Step [1] – Recommendation to use below customer customer syntax
Here Using Postman
Syntax –
need to use createCustomer mutation to register the new customer account in the store.
Step [2] – Put below Request
mutation {
createCustomer(
input: {
firstname: "John"
lastname: "Doe"
email: "johndusa1021@gmail.com"
password: "admin123!!"
is_subscribed: true
}
) {
customer {
firstname
lastname
email
is_subscribed
}
}
}
Continue reading “How To Create Customer Registration By Using GraphQL in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to get Customer’s Wishlist Items By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Step [1] – Recommendation to use below Customer’s Wishlist Items syntax
Here Using Postman
Syntax –
wishlist: WishlistOutput
Step [2] – Put below Request
{
wishlist {
items_count
name
sharing_code
updated_at
items {
id
qty
description
added_at
product {
sku
name
}
}
}
}
Continue reading “How To Get Customer’s Wish List Items By Using GraphQL in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to Check Customers Online in Magento 2.x / Adobe Commerce 2.x
Step [1] – Go To Left Panel Customers > Customers > Now Online
Step [2] – Once Clicked on Customers redirects on Customers Now Online Page
Step [3] – Finally, you can check Total Number of Customers Online
The following below steps need to follow to get store Currency By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Step [1] – Recommendation to use below Currency syntax
Here Using Postman
Syntax –
{currency {Currency}
Step [2] – Put below Request
query {
currency {
base_currency_code
base_currency_symbol
default_display_currency_code
default_display_currency_symbol
available_currency_codes
exchange_rates {
currency_to
rate
}
}
}
Continue reading “How To Get Currency By Using GraphQL in Magento 2.x / Adobe Commerce 2.x”
Once Magento 2.x / Adobe Commerce Site / Store running, suddenly require to change any Product’s Price, Product’s Inventory, Product’s Attributes, Product’s Images etc. these changes immediate effected on store front once Index Management / Indexer set to be Update By Schedule
Go To Admin
Step [1] – Click on Left Side Menu System
Step [2] – System -> Tools -> Index Management
Continue reading “Why Need To Configure Indexer From Update By Schedule Instead of Update On Save in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to get logged-in Customer Details By Using GraphQL in Magento 2.x / Adobe Commerce 2.x
Step [1] – Recommendation to use below customer customer syntax
Here Using Postman
Syntax –
{customer: {Customer}}
Continue reading “How To Get Logged-in Customer Details By Using GraphQL in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to get Customer Token or generateCustomerToken mutation By using GraphQL in Magento 2.x / Adobe Commerce 2.x
Here Using PostMan
Step [1] – Recommendation to use below customer tokens in the header of your GraphQL call
Syntax –
mutation {
generateCustomerToken(
email: "Enter Customer Email"
password: "Enter Customer Password"
) {
token
}
}
Continue reading “How To Get Customer Token or generateCustomerToken mutation By Using GraphQL in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to overriding Shopping Cart default.phtml by using custom Plugin in Magento 2.x / Adobe Commerce 2.x
Here we are overriding below shopping cart default.phtml
vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml
Continue reading “How To Override Shopping Cart default.phtml by using custom Plugin in Magento 2.x / Adobe Commerce 2.x”
The following below steps need to follow to include products in CMS Pages in Magento 2.x / Adobe Commerce.
Step [1] – Go To Left Panel Marketing > SEO & Search > SiteMap
Continue reading “How To Create Sitemap XML File in Magento 2.x / Adobe Commerce 2.x”