Reading list Switch to dark mode

    Guide for Magento 2 ChatGPT AI Extension

    Updated 20 March 2024

    Magento 2 ChatGPT Content Generator AI Extension enables store admins to integrate ChatGPT AI, Google Gemini Pro, and Ollama into their online stores. The admin can now create content for the website’s product pages automatically with its help.

    The store admin can also perform mass action to create content for bulk products. The content gets created for long and short descriptions according to the topic search for the product.

    The store admin can also generate the description using the page builder by clicking on fill the content with AI content Generator.

    Now if you want to generate an AI concise product review summary on the product pages you can check the Magento 2 AI Product Review Summary Extension.

    Also, you can add an AI-generated order success message after an order gets placed using the Magento 2 ChatGPT Checkout Message Generator extension.

    In the video below, check how the Magento 2 ChatGPT functionality works:

    Start your headless eCommerce
    now.
    Find out More
    1DCC3vHDAXc

    Check in the below video, how to create a description using Page Builder:

    jbjiSsAAT9E

    The video mentioned below shows an overview of how to create Precise content using the Prompt Template:

    mRQKuvIkbjA

    Features – Magento 2 ChatGPT AI Extension

    • The admin can generate a short description, description, and SEO content of the products.
    • The admin can generate a product description using the page builder with the Fill Description with AI Content Generator option.
    • The store admin can fill in the description based on the custom query by typing the query in the text area or page builder.
    • The admin can even add the description even if the page builder is disabled.
    • With the help of mass action, the admin can add short descriptions for multiple products at once.
    • The admin can generate descriptions for multiple products at once with the help of mass action.
    • The store admin can choose product attributes to fill the short description and description in mass action to be based on.
    • The admin can enable or disable the module status.
    • The module supports multilingual functionality.
    • The admin can add Ollama, Gemini Pro, and ChatGPT prompt templates and edit and delete them as required.
    • Create prompt templates for the product, category, and CMS descriptions.
    • The admin can add category descriptions and generate SEO content for categories via ChatGPT, Ollama, and Gemini Pro.
    • The admin can add SEO content and descriptions for CMS pages using mass action.
    • The admin can add CMS page descriptions using Ollama, Gemini Pro, and ChatGPT even if the page builder is disabled.
    • The admin can add CMS page descriptions using page builder by clicking the Fill Description with AI content generator button.
    • The extension now supports ChatGPT versions 3.5 and 4.0.

    Install an Extension from Webkul Store

    #1 Download Module

    Firstly, you need to log in to the Webkul Store, go to My Account>My Purchased Products section, verify, and then download and extract the contents of this zip folder on the system.

    #2 Upload Folder

    Once the module zip is extracted, follow path src>app and then copy the app folder into the Adobe Commerce Cloud root directory on the server as shown below:

    M2-installation-1

    #3 Run Commands

    After uploading the module folder, you need to run the following commands in the Magento 2 root directory:

    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    php bin/magento indexer:reindex
    php bin/magento cache:flush

    How to Get ChatGPT API Credentials?

    The user has to first create an OpenAI account and log in to the OpenAI dashboard as shown in the screenshot.

    openAI

    Now the user will have to click on the Personal in the top-right corner and a popup will appear. The user will click on the View API Keys option.

    Open-AI-1

    A page will open and a button Create New Secret Key will be visible as shown in the screenshot.

    Open-AI-3

    Once, the user clicks on this button a pop-up will display with the API key. The user can copy the key from here with the help of the copy button.

    Open-AI-2

    Note – If you want to translate your product reviews then you can use our Magento 2 AI Review translator extension for translation.

    How to Get API Credentials Google Gemini Pro AI Model?

    The user has to first create and log in to the Google Gemini Pro dashboard, then select the Get API key and continue, as shown in the screenshot.

    Google-Gemini-Pro-AI-Model-1-1

    Then click on Get API Key:

    Google-Gemini-Pro-AI-Model-2-1

    After that,, it will redirect to a new page, and you can click on create api key to get the api key.

    Google-Gemini-Pro-AI-Model-3-1

    Then create the API for the new project.

    Google-Gemini-Pro-AI-Model-4-1

    After that, a popup will appear, from which the new API key will be copied.

    Google-Gemini-Pro-AI-Model-5-1

    Admin Configuration – Magento 2 ChatGPT AI Extension

    Create Custom Prompt Templates for Content to be Generated – Custom prompt templates can be used to inform ChatGPT, Gemini Pro, and Ollama to generate particular required content as required.

    The admin can create prompt templates for the product, category, and CMS descriptions.

    To create the custom prompt templates, the admin will navigate to the side panel option and tap on the AI Content generator menu option. This brings up the list of already created templates if any. The admin can edit and delete the prompt templates as required.

    AI-content-generator

    Tapping the Add New Prompt Template button brings up the below section.

    Add-AI-prompt-template

    Here, the admin will –

    • Enter the custom template title.
    • Choose the category, sub-category, and template as required.
    • The rest of the sections will be automatically populated.

    Lastly, tap the Save Template button to save the template as required.

    Initial Configuration Settings

    The admin will navigate through Stores>Configuration>AI Content Generator to make a general configuration.

    Once you select Yes for the enable module in the AI model, you have to select Ollama or Gemini Pro, or ChatGPT as per your requirement.

    Screenshot-from-2024-02-16-14-07-55

    Here, the admin must make the configurations below to set the module settings.

    ChatGPT AI Model

    AI-content-generator2

    Enable Module- Enable the module status from here.

    AI Model – Select ChatGPT here.

    API Secret- Enter the API secret key from the Open AI account.

    ChatGPT Model: Now the admin can select the ChatGPT model from GPT 3.5 or GPT 4.

    ChatGPT AI Secret Key: Enter the secret key that you get while creating the account on OpenAI.

    Product Content Based on Selected Attributes- The admin will select the attribute from the dropdown that will generate the content based on the selected attribute during mass upload.

    Import SEO Content- Select Yes if you want to generate the SEO content.

    SEO Attribute- If the admin selects Yes for the generate SEO Content then this will display the option to select the attributes on which basis the SEO content will get imported.

    Here, the admin for the products, categories, and CMS pages can choose the SEO attributes that will get imported. This includes – Meta Title, Meta Keywords, and Meta Description.

    192.168.30.128_MAGENTO2-2.3_CommunityEdition_Default-addons_m2_ChatGPT_pub_admin_admin_system_config_index_key_10a3b1f255cb236e7cdd64cd7e54b96f24bb6a46d2e8589ce87ed12e115951a4_asd

    Enable Prompt Templates

    The admin can choose the created prompt templates that will be used for generating the respective content as per the created prompt templates.

    The admin can choose the custom prompt templates for the – Product description, category description, and CMS pages as per the requirement.

    Now, the admin will save all the configurations by clicking on the Save Config button.

    Also, if you want the same functionality for the Marketplace vendors where they can generate the content for their products then check the Magento 2 Multi Vendor ChatGPT Content Generator Extension.

    Ollama AI Model

    If the admin selects the Ollama AI model then they have to configure it accordingly.

    AI-content-generator1-1

    Enable Module- Enable the module status from here.

    AI Model – Select Ollama here.

    Ollama Endpoints – Enter the Ollama endpoint (Ex: http://localhost:11434).

    Ollama Model: Now the admin can select the Ollama model from various available Ollama models.

    Screenshot-from-2024-02-16-16-14-23

    Product Content Based on Selected Attributes- The admin will select the attribute from the dropdown that will generate the content based on the selected attribute during mass upload.

    Import SEO Content- Select Yes if you want to generate the SEO content.

    AI-content-generator3

    Enable Prompt Templates – Select Yes if want to create various templates.

    Google Gemini Pro AI Model

    If the admin selects the Gemini Pro AI model. All settings will be similar to Ollama and ChatGPT. The admin just needs to add the API secret key to configure the AI model.

    AI-content-generator-4

    Product – AI Content Import

    The admin can add a short description while creating the product through Catalog>Products>Add Product in the content section as shown in the image.

    AI-content-generator-5-1

    After filling in the required details the admin will have to enter the product name or the query. Now, the admin will click on the Fill description with AI Content Generator option. A short description will be added automatically.

    Likewise, the admin can add a long description for the product by clicking on the text area of the description section.

    Here, the store admin will click on Fill the description with the AI Content Generator button and the data will get imported.

    Ai-content-generator-1

    Note: The page builder option must be enabled to use this functionality from the general configurations.

    It is used to search a custom query otherwise, the product name would be taken as default to search the content.

    The admin can generate the SEO content using AI Content generator according to the selected attribute as shown in the screenshot.

    AI-content-generator-7

    Note: SEO content generated will work in the case of mass action only.

    Page Builder

    If the page builder option is enabled then the Edit with Page Builder button will be visible in the description section.

    ChatGPT9-Magento 2 ChatGPT AI Extension

    Once the admin clicks on the button the page shown below will display.

    Screenshot-2024-02-16T174454.714

    Furthermore, the admin will click on the AI option present in the left corner. Now, click on the HTML code option and drag the dynamic block or HTML code.

    When the admin hovers over the block, an icon to edit the code will appear and a page will display as per the image.

    AI-content-generator-6-1

    Here, write the product name or custom query and click on the Fill Description with AI generator button. The content will be filled out automatically in the text area.

    Moreover, the store admin can also mass-upload the content at the same time with the help of this extension. The admin has to navigate through Catalog>Products>Action>Generate AI Content for mass upload based on the product attribute.

    AI-content1

    When the admin selects generate AI content, a popup will display with a message as shown in the screenshot.

    AI-content2

    When the admin clicks on the Ok button it starts the execution of the mass upload process as shown in the image.

    ChatGPT5

    Mass upload takes place after the execution process is complete.

    Category – AI Description & SEO Content Import

    The admin can generate the AI content for the category description and SEO content sections. To do so, the admin will navigate through Catalog->Catgories. Here, for the respective category, the admin needs to choose the scope(store view) for which the content is to be imported.

    After that, select the category as required as shown below in the snapshot.

    AI-content

    Now, navigate to the descriptive section for the category and tap the edit with page builder button. Note, that even if the page builder is turned off you will still be able to generate the AI content for the description.

    AI-content-

    After that, tap the Fill description with Chat GPT button to fetch the content and add it according to the prompt template selected for the category description in the configuration settings.

    AI-Content-generator-2

    The AI content will be fetched and then the admin can save the same by saving the category.

    AI-content-generator12

    For the category SEO content import, the admin can tap the generate AI Content button under the respective section. After tapping the button the configured SEO contents will get imported.

    Ai-content-1

    CMS Page – Generate Page and SEO Content

    The admin will be able to generate the CMS pages page and SEO content via the AI tool. To do so, the admin will navigate through Content->Pages.

    AI-content3

    Here, for the pages, the admin can mass action to generate the AI content for the Page and SEO content for multiple pages at the same time. But at a time you can either generate the page content or the SEO content for the pages.

    After selecting an option, you can see a prompt.

    AI-content4

    Tap, Ok on the prompt to generate the SEO or the Page content and the profiler will run to generate the AI content as per the below screenshot.

    1-13

    Now, you can edit the page to check the page content and the SEO content.

    Page content:

    AI-content5

    SEO Content:

    AI-content7

    Multi-Lingual Support

    The admin can also enable multi-lingual support for the feature. To do so, navigate through Stores->Configuration->General->Locale Options.

    Here, first, choose the scope that is your store for which you want to enable the locale. Then under Locale options choose the respective locale in which you want the description to be added. Lastly, tap the Save Config button.

    AIcontentgenerator2

    Now, navigate to the product edit page and tap the “Fill Description with ChatGPT” button. The description gets added in the respective locale as shown below in the snapshot.

    AIcontent

    After that, you can also navigate to the Page Builder section to generate the respective locale description content by tapping the respective button.

    AIcontentgenerator

    After saving the product, the short and long descriptions in the respective locale is visible on the product page as per the snapshot below.

    AIgenerator

    Support

    That is all about the Magento 2 ChatGPT AI Extension. If you have any queries regarding the plugin, please contact us at Webkul Support System.

    You can also check our complete Magento 2 extensions.

    Moreover, If you are looking to create a custom e-commerce website, it is a great idea to hire Magento developers who can help you build a powerful and scalable online store.

    Current Product Version - 4.0.9

    Supported Framework Version - 2.4.6

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content