User Guide of Magento 2 Hide Price for Guest Extension
Configurations
At the back end, go to FME EXTENSIONS > Configurations. Here You can find the following settings:
PRODUCT HIDE PRICE
- Hide Price: Enable or disable the hide price module.
- Hide from Groups: Restrict price visibility for specific customer groups.
- Hide Add to Cart: Enable or disable the "Add to Cart" button.
- Hide Product Category Price: Choose categories where the price will be hidden for guest users.
- Hide Product Category Add to Cart: Choose categories where the "Add to Cart" button will be hidden.
- Start Date Price: Set a specific start date to hide the price.
- End Date Price: Set an end date to display the price again.
- Start Date Cart: Set a specific start date to hide the "Add to Cart" button.
- End Date Cart: Set an end date to display the "Add to Cart" button again.
- Alternate Text for Add to Cart Button: Specify alternate text to display instead of the "Add to Cart" button.
- Hide Store Products Add to Cart: Restrict the "Add to Cart" option by store views.
Frontend
GraphQL APIs
-
Product Query
Query
{
products(search: "bag", pageSize: 2) {
items {
id
name
sku
fme_guest_hide_price_content {
hide_price
hide_add_to_cart
hide_price_text
hide_add_to_cart_text
hide_price_alert {
status
title
description
}
}
}
}
}
Response
{
"data": {
"products": {
"items": [
{
"id": 8,
"name": "Voyage Yoga Bag",
"sku": "24-WB01",
"fme_guest_hide_price": {
"minimum_price": {
"regular_price": {
"value": null,
"currency": null
},
"final_price": {
"value": null,
"currency": null
}
}
},
{
"id": 1,
"name": "Joust Duffle Bag",
"sku": "24-MB01",
"fme_guest_hide_price_content": {
"hide_price": true,
"hide_add_to_cart": false,
"hide_price_text": "Price text",
"hide_add_to_cart_text": "Cart text",
"hide_price_alert": {
"status": true,
"title": "Title here",
"description": "Description here !!"
}
}
}
]
}
}
}
-
Configurations For Alternate Text