Magento 2 Call for Price

Magento 2 Call for Price allows store owners to hide product prices and "Add to Cart" button to replace with "Call for price" button to encourage users to contact for product prices.

 

Table of Content

  1. Extension Installation Guide
  2. Msg91 Registration
  3. Twilio Registration
  4. Create Twilio WhatsApp Templates
  5. Textlocal Registration
  6. Configuration
  7. Admin Email Settings
  8. Auto Reply Email Settings
  9. Admin SMS Notification Settings
  10. Auto Reply SMS Settings
  11. Privacy Checkbox Settings
  12. Google reCAPTCHA Settings
  13. SMS API Settings
  14. Product Specific Call for Price
  15. Call for Price in Frontend
  16. Call for Price Inquiries
  17. Call for Price Email Notifications
  18. Call for Price SMS Notifications
  19. Call for Price WhatsApp Notifications

 

  1. Extension Installation
  • For Magento Marketplace Customers

    Find the extension’s Composer name and version in its composer.json file.

    • Login to your SSH and run:
      • composer require twilio/sdk
      • composer require meetanshi/magento2-call-for-price
         
    • Enter your authentication keys. Your public key is your username; your private key is your password.
    • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
    • To verify that the extension is installed properly, run the command:
      • php bin/magento module:status Meetanshi_Callforprice
    • By default, the extension is probably disabled. Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_Callforprice --clear-static-content
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
      • php bin/magento cache:flush
    • For Meetanshi Customers
      • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
      • Login to your SSH and run below commands step by step:
        • composer require twilio/sdk
        • php bin/magento setup:upgrade
        • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
        • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
        • php bin/magento cache:flush

     

    Note: Don’t forget to install Twilio library even if you are not using Twilio SMS gateway for our extension.

     

    1. Msg91 Registration
      The extension allows configuration of the Msg91 SMS gateway to send call for price SMS notifications. If you choose to use Msg91 SMS gateway integration, follow the steps below to get sender ID and API key.
       


     

    •  
      • You will get and code or a magic link in the Email to verify the Email address.


     

    •  
      • You will be asked to enter the mobile number for verification.



     

    •  
      • Enter the OTP to verify the mobile number and you will be registered successfully. Login with the credentials.



     

    •  
      • Under the settings, you can find the Sender ID which you need to copy and paste in the Magento 2 Call for Price extension configuration.



     

    •  
      • Now move to API, where you can find the API key for the Magento configuration.



     

    • You can find the Message type under the Send SMS tab. Select the SMS type in Msg91 configuration in Magento as per your requirement.



     

    1. Twilio Registration
      If you are going to use Twilio as an SMS gateway to send call for price SMS notifications, you need to register with the Twilio to get Account SID, Auth Token and Twilio Phone Number.

     

    •  
      • First of all, Sign Up for the Twilio account. Add the details and click to get started.

    ​​​​​​​

     

    •  
      • After the Email verification, enter your mobile number and click to “Verify”.

    ​​​​​​​


     

    •  
      • Once you click “Verify”, you will get an OTP on the added mobile number. Enter the OTP and verify the mobile number. Now move to Settings à General where you can see API details both for live and testing. Copy the Account SID and Auth Token to use them in Magento backend configuration for Twilio account.

    ​​​​​​​
     

    •  
      • Now, click three dots from the left sidebar, go to Programmable SMS and click Build under the Learn and Build option. From here, you can get Twilio phone number to use for sending the SMSs. Click on the “Get a number” button.

    ​​​​​​​

     

    •  
      • You will get a number to choose. Click “Choose This Number”.

    ​​​​​​​

     

    •  
      • Once you click the button, you will get a Twilio phone number. Copy this number and set it in the Magento backend configuration for Twilio account. 

    ​​​​​​​

     

    1. Twilio WhatsApp Message Templates
      If you are going to use Twilio WhatsApp to send call for price WhatsApp notifications, you need to configure the same Twilio settings to get API details for Twilio WhatsApp. Once you are done, login to your Twilio account, go to https://www.twilio.com/console/sms/whatsapp/senders/, and click on “Submit a WhatsApp Sender”.

     

    Clicking the button will ask you to create your first Business Profile. Complete the form and submit your WhatsApp Business Profile request along with message templates.

    Note: All Display Names must show consistency with the Business Name on the Facebook Business Manager provided. See Display Name rules.

    Twilio will use this information to provision your Business Profile in the next 5-10 business days.

    Once your WhatsApp Sender is approved and enabled, you can see your WhatsApp number with the approved status.

    Under the “WhatsApp Templates” option, click “Submit a message template”.

     

    Make use of variables to add the message text same as Magento backend. Follow this guide to write the message template in a proper format.

     

    1. Textlocal Registration
      The extension allows configuration of the Textlocal SMS gateway to send Call for Price SMS notifications. If you choose to use Textlocal SMS gateway integration, follow the steps below to get the sender ID and API key.

     

    ​​​​​​​

     

    • After the registration, you will get a verification link in your registered Email ID, clicking the link will land you to add additional information page. Here, add the account details and submit to activate your Textlocal account.

     

    • Navigate to Settings > API Keys and create new key to use. Copy the created API Key and paste it in Magento 2 extension configuration.

     

    • Now move to Settings > All Settings and click on “Sender Names” to get your sender name.

     

    • You can copy your Textlocal sender name from here and paste it in Magento 2 extension configuration.

     

    • Textlocal requires to create message template to send OTP verification message. Go to Send > Templates & Drafts and click to create and request new SMS template.

     

    • You have to create new message template for both the admin and users call for price SMS notifications. Enter title, select category and sender name. Set message text same as SMS text in extension configuration. You have to create new SMS template in Textlocal for both the admin and user call for price notifications in Magento 2. For example, create a message template for call for price users SMS auto reply in Textlocal having exactly the same SMS text as in Magento 2 configuration.

     

    • For the dynamic values in text message input, click “Insert Restricted Template Items”. Click “Insert an Input Box” and it will open a popup to create new placeholder for the dynamic value. Add placeholder text name and set maximum length for the dynamic value. Insert it into the SMS text and while sending call for price SMS notification, this placeholder will match the variable in Magento 2 SMS text and replace it with the real value.

    ​​​​​​​

     

    • Once message templates have been created and submitted for both the call for price SMS notification, it will take approximately a week to be approved by the Textlocal. You can send call for price SMS notifications only after the message templates are approved by the Textlocal.

     

    1. Configuration
      For configuring the extension, log in to Magento 2, move to Stores > Configuration > Meetanshi > Call for Price where you can find various settings to enable the extension.
    • Call for Price: Enable or disable Call for Price extension from here.
    • Notification Type: Select one of the notification types.
      • Email: Sends email notifications to admin and customers.
      • SMS: Sends SMS/WhatsApp notifications to admin and customers.
    • Call for Price Scope: Select the scope for which you want to enable the extension.
      • Global: Enables Call for Price on all the products of the store.
      • Category Specific: Enables Call for Price for the selected categories.
      • Product Specific: Enables Call for Price for the selected products.
    • Select Categories:  Select the categories in the case of category specific scope is selected.
    • Enable Call for Price As: Select one from the button or label to show as the call for price in the frontend.
      • Button: Shows call for price button on click of which call for price form is opened to submit inquiry.
      • Label: Shows a text label in place of add to cart button.
    • Button Text: Enter the call for price button text if you have set to show call for price as button.
    • Label Text: Enter the call for price label text if you have set to show call for price as label.
    • Label Text Color: Set the label text color in which you want to show label in the frontend.
    • Enable Call for Price for Selected Group: Select YES to enable call for price for specific customer groups.
    • Select Customer Groups: Select the customer groups to enable call for price for.
    • Call for Price Form Title: Add custom title for the call for price form.

    ​​​​​​​

     

    1. Admin Email Settings
      The extension facilitates to send call for price email notifications both to the admin and the customers. If you have set “Notification Type” as “Email”, configure the following settings for the admin to receive Email notifications when a new call for price inquiry is submitted.
    • Admin Email ID: Enter admin Email ID to receive new contact inquiry email notifications.
    • Email Sender: Select Email sender.
    • Email Template: Select Email template.

    ​​​​​​​

     

    1. Auto Reply Email Settings
      Apart from the admin, you can send auto reply email notifications to users after they submit call for inquiries. If you have set “Notification Type” as “Email”, configure the following settings to send auto reply email notification after their inquiry form submission.
    • Auto Reply Email to Customer: Enable it to send auto reply email to customers.
    • Email Sender: Select email sender.
    • Email Template: Select Email template.

    ​​​​​​​

     

    1. Admin SMS Notification Settings
      The extension facilitates to send call for price SMS notifications both to the admin and the customers. If you have set “Notification Type” as “SMS”, configure the following settings for the admin to receive SMS notifications when a new call for price inquiry is submitted.
    • Message Format: Enter the SMS text format to send the SMS notification to the admin on new call for price inquiry submission.
    • Admin Mobile Number: Enter the admin mobile number on which to send new call for price inquiry submission SMS notification.

    ​​​​​​​

     

    1. Auto Reply SMS Settings
      Apart from the admin, you can send auto reply SMS notifications to users after they submit call for inquiries. If you have set “Notification Type” as “SMS”, configure the following settings to send auto reply SMS notification after their inquiry form submission.
    • Auto Reply SMS to Customer: Enable it to send auto reply SMS notification to customers.
    • Message Format: Enter the SMS text format to send the SMS notification to the users on new call for price inquiry submission

    ​​​​​​​

     

    1. Privacy Checkbox Settings
      Enable the privacy checkbox in the call for price form to comply with EU’s GDPR. Configure the below settings for the same.
    • Privacy Checkbox: Enable privacy checkbox to show it in the call for price form.
    • Privacy Notice Text: Enter privacy policy text.
    • Privacy Policy Redirection Page: Select page to redirect users on click of privacy text.

    ​​​​​​​
     

     

    1. Google reCAPTCHA Settings
      Call for price extension facilitates to enable the Google reCAPTCHA v3 in the popup form to avoid spammy call for price inquiries. Configure the following settings to enable it.
    • Google reCAPTCHA: Enable this field to enable the Google reCAPTCHA in the call for price form.
    • Site Key: Enter the site key obtained while the registration for Google reCAPTCHA v3.
    • Secret Key: Enter the secret key obtained while the registration for Google reCAPTCHA v3.

    ​​​​​​​
     

    1. SMS API Settings
      If you have set “Notification Type” as “SMS”, you need to configure SMS gateway API to send SMS notification to the admin and users for the call for price inquiries.
    • API Provider: Select a preferred SMS gateway API provider to send SMS notifications.
    • Sender ID: Enter sender ID provided by the SMS gateway while registration.
    • Message Type: Select the message type you are going to send for the call for price SMS notification.
    • API URL: Enter API URL provided by the SMS gateway while registration.
    • Authorization Key: Enter API key provided by the SMS gateway while registration.

    ​​​​​​​

     

    For Other SMS API:
    If you are going to use custom SMS API other than Msg91, Twilio or Textlocal, you have to add your CURL URL as below:

     

    Format: https://yoursmsapi.com/sms/submitsms.jsp?user=yourusername&senderid=yoursenderid&key=yoursmskey&mobile={mobile}&message={msg}
    Sample CURL URL:
    https://foxxsms.com/sms/submitsms.jsp?user=METANSHI&senderid=FOXGLV&accusage=6&key=587e05afbcXX&mobile={mobile}&message={msg}

     

    1.  Product Specific Call for Price
      The extension functionality can be enabled for specific products too. If you have selected Call for Price Scope as product specific, to enable it, go to Catalog à Products à Select a Product and edit. From the Call For Price tab, enable the call for price option. If you have set to show call for price as button, add the custom button text and if you have set to show call for price as label, add label text for call for price. Save the configuration to set the product specific call for price option. You can follow the same process for all the products you require.

    ​​​​​​​
     

    1. Call for Price in Frontend
      Once the settings are configured, the call for price button is enabled in the store frontend as shown here.
    • Call for Price enabled on Category Page
      The extension allows the users to contact for price directly from the category page. You can see call for price button enabled on the category page if the button type is selected from the configuration. Users can click the button to open the call for price inquiry form and submit it.

    ​​​​​​​

     

    • Call for Price enabled on Product Page
      If you have set call for price as label, the call for price label is shown both on the category and product page. Users can see the call for price label with the custom text. Else if you have set the call for price as button, users can click the button to open the call for price inquiry form and submit it.

    ​​​​​​​

     

    • Call for Price Form
      For the call for price button type, users can click on the button from the category or the product page. On click, the call for price inquiry form with custom title is opened. The users are required to enter the personal details with the quote inquiry message, agree with the privacy policy, and submit their inquiry. If the admin has enabled Google reCAPTCHA v3, the badge is shown on the page. Google reCAPTCHA restricts spam inquiries submissions.

    ​​​​​​​

     

    1. Call for Price Inquiries
      Users, when request for quote using the call for price inquiry form from the frontend, all the inquiry details are stored in a separate grid named “Call for Price Inquiries”. The admin can view and manage the inquiries from here. The admin can select multiple inquiries and use “Delete” mask action to delete them. Also, he can export the call for price inquiries in CSV or XML format.

     

    1.  Call for Price Email Notifications
    • Contact Inquiry Email to Admin
      If you have set “Notification Type” as “Email”, whenever the users submit inquiry using the call for price form, the admin is notified via Email for the new contact inquiry submission.

    ​​​​​​​
     

    • Auto Reply Email to users
      If you have set “Notification Type” as “Email”, an acknowledgement email is sent to users after successful submission of their call for price inquiry.

     

    1. Call for Price SMS Notifications
    • Contact Inquiry SMS Notification to Admin
      If you have set “Notification Type” as “SMS”, whenever the users submit inquiry using the call for price form, the admin is notified via SMS for the new contact inquiry submission.

    ​​​​​​​

     

    • Auto Reply SMS Notification to Users
      If you have set “Notification Type” as “SMS”, an acknowledgement SMS is sent to users after successful submission of their call for price inquiry.

     

    1. Call for Price WhatsApp Notifications
    • Contact Inquiry WhatsApp Notification to Admin
      If you want to send call for price notifications using “WhatsApp”, whenever the users submit inquiry using the call for price form, the admin is notified via WhatsApp message for the new contact inquiry submission.

     

    • Auto Reply WhatsApp Notification to Users
      If you have set to send call for price notifications using “WhatsApp”, an acknowledgement WhatsApp notification is sent to the users after successful submission of their call for price inquiry.

    ​​​​​​​