To make the Add to Cart button perform multiple actions can be an interesting feature for the Opencart store.
The Add to Cart button is an important aspect of any online store and therefore adding more functionalities to it can benefit the store owner.
Opencart Replace Add to Cart Button module facilitates the admin to add multiple actions to an Add to Cart button such as Text, Email, Link, Phone etc.
The admin will have to define a Type and then choose an Action which will get the functionalities of the Type which the admin defines.
Most of all, the additional functionalities of the Add to Cart button will simplify things for the customers.
Just by clicking on the add to cart button, the customers can perform various functions without having to run from pillar to post on visiting an online store.
- The admin can define a Type such as Text, Link, Email, Phone.
- The admin chooses the action such as link, text, email phone for the type defined.
- If Text type and action are chosen, then the text of the Add to Cart button changes.
- Under link type and action, the admin provides a link on which the customer is redirected.
- Through Email type and action, the mail is sent to the admin as well as the customer.
- Under Phone type and action, the contact details like email and phone number are visible to the customer.
- The admin can also choose a different Action with a Type in the admin panel.
First, extract the downloaded zip file. After that, open the correct Opencart Version Folder. According to Opencart Version installed in your system. Then, upload admin and catalog to the Opencart root directory.
The user can navigate through Extensions > Modifications. Now click the Refresh button as visible in below screenshot.
After that, go to System > Users > Usergroups. And then edit ‘Administrator’. Click Select All for both Access Permission and Modify Permission and Save it.
Now navigate to Extensions > Modules. Find Webkul Replace Add to Cart from the list. Click the Install button as visible in the screenshot below.
The admin can manage the Add to Cart Button functionalities under Extension > Extensions > Modules > Webkul Replace Add to Cart.
The admin can click on the edit button for the Webkul Replace Add to Cart.On clicking the edit button, the user can view the Status field, Store field, Type Field and the Action Field.
The admin will have to choose any of the Type tabs as per the requirement.
If the admin chooses ‘None’ against the action button, then no action is performed on tapping the add to cart button.
Choosing a Type with an Action
Let us understand how a Type works when a specific Action is chosen in the backend.
When admin chooses Type as “Text” and Action as ‘Text’-:
In the backend, the admin will choose ‘Text’ against the “Type” tab and against the “Action” tab the admin will choose ‘Text’ as shown in the image below.
Thereafter, the customer will log in to the frontend and choose a product from the product page.
The label of the add to cart button changes to DEMO PRODUCT as defined by the admin in the backend, Type as ‘Text’ and Action as ‘Text’ while configuring the module.
When admin chooses Type as “Link” and Action as ‘Link’-:
The admin will have to choose ‘Link’ against the “Type” tab and ‘Link’ against the action button as well as shown in the image below.
Against the “Type” tab on choosing ‘Link’ the admin will have to add the route link, for instance, of a category or a product or a page.
It redirects the customer directly to the category or product or page on clicking the add to cart button.
On clicking the Demo Product button for MacBook Air, it redirects the user to the link which the admin adds in the backend.
The admin adds the link of the Category- ‘Camera’ in the backend on which the customer redirects on clicking the Demo Product button as shown in the image.
When admin chooses Type as “Email” and Action as ‘Email’-:
On choosing the “Type” as ‘Email’ two options for Email will be visible – Admin and Custom as shown in the image below.
If the Admin option is chosen from the given list, the mail is sent to admin.
On choosing the “Email” tab, if the admin chooses the Email type as ‘Custom’, the custom email id is to be given against the ‘Email to’ tab on which the mail will be sent.
In the product page, the customer will choose a product and click on Demo Product button as shown in the image below.
On clicking the Demo Product button, a pop up will appear where the customer will have to fill in the Subject, Mail From details, and add questions under Ask tab.
When admin chooses Type as “Phone” and Action as “Phone”-:
As the admin chooses ‘Phone’ against the “Type” tab, another tab to enter the Phone will be visible where the admin enters the phone number details as shown in the image below.
In the frontend the customer will choose a product and click on the Demo Product button.
On clicking the Demo Product button, a pop up will appear displaying the contact details like email and phone number which the admin has set in the backend.
The admin can also choose any type against the “Type” tab and any action option against the “Action” tab.
For instance, let’s consider the following scenario:
When admin chooses Type as “Text” and Action as “Link”-:
The customer will have to choose a product from the product page and click on the Demo Product button.
As the admin has chosen ‘Link’ against the “Action” button, on clicking the Demo Product, it redirects the customer to a category, or a page or a link which the admin adds in the admin panel.
That’s all for Opencart Replace Add to Cart Button module. For any query or doubt, please add a ticket at https://webkul.uvdesk.com/.
Current Product Version - 22.214.171.124
Supported Framework Version - 2.3.x.x