User Guide of Magento 2 Call for Price Extension
At the backend, go to FME EXTENSIONS > Configurations. Here you can find the extension configurations.
General Configurations
-
Enable Module: Option to Enable/Disable the module. Choose ‘Yes’ to hide the price for the selected product categories and customer groups
-
Do Not Apply Rules to Product ID’s: Specify comma-separated product ID’s to show the price for. Rules created by the user in the ‘Manage Rules’ section are not applied to these product ID’s (Note: This setting has the maximum priority)
-
Do Not Apply Rules to Customer ID’s: Specify comma-separated customer ID’s to show the price for. Rules created by the user in the ‘Manage Rules’ section are not applied to these customer ID’s (Note: This setting has the maximum priority)
-
Email Sender For Admin Reply Email: Option to choose the sender for the admin reply email:
- General Contact
- Sales Representative
- Customer Support
- Custom Email 1
- Custom Email 2
-
Email Template For Admin Reply Email: Option to choose the template for the admin reply email:
- FME Hide Price Auto Reply (Default)
- New Pickup Order
- New Pickup Order For Guest
Call For Price Form Design
You have the following options to customize the Inquiry Form. However, you can also add more fields to customize it.
- Label: Option to enter the label for the inquiry form
- Type: Option to select the field type:
- Text Field
- Text Area
- Checkbox
- Order: Specify the display order of the field on the inquiry form
- Required: Select ‘Yes’ or ‘No’ to set the field as Mandatory or not
- Enable: Select ‘Yes’ or ‘No’ to Enable/Disable the field on the inquiry form
Admin Email Notifications
- Send Email To: Enter an email address on which the user sends quote requests. This will notify the admin that he receives a new quote request Or Leave it empty to disable the notifications.
- Email Sender: Option to select the email sender through which emails will be sent to admin when the user makes a new quote request.
- General Contact
- Sales Representative
- Customer Support
- Custom Email 1
- Custom Email 2
- Email Template: Option to select the email template which will be used for admin notifications.
- FME Hide Price Auto Reply (Default)
- New Pickup Order
- New Pickup Order For Guest
Auto Reply Email Options
- Enable: Select ‘Yes’ or ‘No’ to Enable/Disable this option. If you select ‘Yes’, confirmation email will be sent automatically to the user whenever he sends a quote request.
- Email Sender: Option to select the email sender through which auto emails will be sent to users when the user makes a new quote request.
- General Contact
- Sales Representative
- Customer Support
- Custom Email 1
- Custom Email 2
- Email Template: Option to select the email template which will be used for auto- reply of the customer emails.
- FME Hide Price Auto Reply (Default)
- New Pickup Order
- New Pickup Order For Guest
GOOGLE ReCAPTCHA
- Enable: Select ‘Yes’ or ‘No’ to Enable/Disable this option. If you select ‘Yes’, google reCAPTCHA is shown on ‘Get a Quote’ request form.
- reCAPTCHA Site Key: Enter your Google reCAPTCHA site key or generate a new one from https://www.google.com/recaptcha/admin
- reCAPTCHA Secret Key: Enter your Google reCAPTCHA secret key or generate a new one from https://www.google.com/recaptcha/admin
GDPR Consent
- Enabled: Select ‘Yes’ or ‘No’ to Enable/Disable this option. If you select ‘Yes’, then you have to provide the consent text.
- Consent Text: Enter your consent text
Developer Options
This extension has the following developer options. These options need to be changed if you are using a custom Magento theme.
- Add to Cart" Selector For Product View
- "Add to Cart" Selector For Category View
- "Add to Wish List" Selector
- "Add to Compare" Selector
- Category Item Selector
How To Manage The Call Back Rules?
At the back end, go to FME EXTENSIONS > Manage Rules. Here you will find a grid will all the previously created rules. Click on the Edit button or click on the Add Rule button to continue.
Rule Information > General Settings
- Title: Enter a title for the new rule
- Priority: Set priority of the rule e.g. 1,2,3 etc. One which has a low number has the highest priority and it will be applied first.
- Status: Option to Enable/Disable the rule
- Store View: Option to choose the store views on which the rule is applied.
- Customer Groups: Option to choose the customer groups on which the rule is applied (Note: Product price will be hidden for the selected customer groups only)
- Start Date: Select the start time period from which this rule will be enabled
- End Date: Select the end-time period from which this rule will be disabled
Rule Information > Hide Price Options
- Hide Price: Select ‘Yes’ or ‘No’ to Show/Hide the price
- Hide "Add to Cart": Select ‘Yes’ to Hide ‘Add to Cart’ or select ‘Replace with Custom Button’ to replace add to cart with a button e.g. ‘Sign up’ or ‘Get a Quote etc.
If you select ‘Replace with Custom Button’ here, the following three fields will display at your screen.
- Replace "Add to Cart" Title With: Enter a text which will be shown instead of the ‘Add to Cart’ button.
- CSS Styles For Replaced Link: Customize the CSS Styles for the replaced Link
- Replace "Add to Cart" Link With: Use text ‘FMEHidePricePopup’ for opening Ajax popup with a ‘Get a Quote’ form. Insert the page URL to redirect the customers to any page e.g. module/controller/action
- Hide "Add to Wishlist": Select ‘Yes’ or ‘No’ to Show/Hide the Wishlist link when the price is hidden
- Hide "Add to Compare": Select ‘Yes’ or ‘No’ to Show/Hide the Compare link when the price is hidden
Rule Information > Fronted Options
- Hide Price Text: Enter a text to show instead of the product price. This text will display on the frontend when the price is hidden e.g. ‘Call for Price’
- Custom CSS Styles For Hide Price Link: Customize the CSS styles for the Hide Price link
- Upload Image: Option to upload an image which will display on the frontend in place of the product price
- Link URL: Use text ‘FMEHidePricePopup’ for opening Ajax popup with a ‘Get a Quote’ form. Insert the page URL to redirect customers to any page you need.
Rules > Conditions
Apply the rule only if the following conditions are met (leave blank for all products).
How To Manage Get A Quote Requests?
At the back end, go to FME EXTENSIONS > Get a Quote Requests. Here you will find all the submissions in a grid, click on any pending one to continue.
Now here you can reply to the callbacks as per your requirement. The replies will be forwarded to their email in the selected template.
Frontend View – Replace ‘Price’ With Custom Button
Frontend View – Call for Price Button On Product Page
Frontend View – Contact for Price Popup
GraphQL APIs
1. Get Products
Description: To check whether the product is available for call for price
Query
{
products(filter: {sku: {eq: "24-MB01"}}) {
items {
id
name
sku
fme_call_for_price_content {
hide_price_status
hide_price_text
hide_price_url
hide_add_to_cart_status
hide_add_to_cart_title
hide_add_to_cart_image
hideprice_add_to_cart_link
hide_add_to_cart_link_css
wishlist_status
compare_status
}
}
}
}
Response
{
"data": {
"products": {
"items": [
{
"id": 1,
"name": "Joust Duffle Bag",
"sku": "24-MB01",
"fme_call_for_price_content": {
"hide_price_status": true,
"hide_price_text": "Helo G",
"hide_price_url": "FMEHidePricePopup",
"hide_add_to_cart_status": true,
"hide_add_to_cart_title": "hello g",
"hide_add_to_cart_image": "http://m247/media/fme/callforprice/images/1/3/1320906.png",
"hideprice_add_to_cart_link": "FMEHidePricePopup",
"hide_add_to_cart_link_css": null,
"wishlist_status": true,
"compare_status": true
}
}
]
}
}
}
2. Get Call for Price Form Fields
Query
query {
fme_call_for_price_form {
CallForPriceForm {
name
label
type_html
type
required
enable
}
gdpr_consent {
status
content
}
recaptcha {
status
}
}
}
Response
{
"data": {
"fme_call_for_price_form": {
"CallForPriceForm": [
{
"name": "additional__1740486239248_248",
"label": "Custom Field 1",
"type_html": "text",
"type": "1",
"required": true,
"enable": true
},
{
"name": "additional__1740486264953_953",
"label": "Custom Field 2",
"type_html": "textArea",
"type": "2",
"required": true,
"enable": true
},
{
"name": "additional__1740486270252_252",
"label": "Custom Field 3",
"type_html": "text",
"type": "1",
"required": true,
"enable": true
}
],
"gdpr_consent": {
"status": true,
"content": "I have read & accept the <a target=\"_blank\" href=\"/privacy-policy\">Privacy Policy</a>"
},
"recaptcha": {
"status": false
}
}
}
}
3. Submit Form
Mutation
mutation {
callForPriceFormSubmit(input: {
customer_name: "hassan shah",
customer_email: "hassan.zamir@unitedsol.net",
product_id: "3",
additional_fields: [
{name:"additional__1735561744249_249",value:"hek"},
{name:"additional__1735562564579_579",value:"hek"},
{name:"additional__1735562565482_482",value:"hek"},
{name:"checkbox__1735562566328_328",value:"0"}
]
}) {
message
}
}
Response
{
"data": {
"callForPriceFormSubmit": {
"message": "Thanks for contacting us. We'll respond to you as soon as possible."
}
}
}