1. Pre-requisites

Magento 2.3.x or 2.4.x.

2. Installation

To install the module, follow the steps below.

  • Download the module/extension and unzip it.
  • Access your web server directories and upload the content of the folder into
    app/code/Pits/ChatGpt/ directory.
  • Run the following commands to complete the installation.
    • Enable the module - php bin/magento module:enable.
    • Update of the database - php bin/magento setup:upgrade.
    • Generate and pre-compile classes - php bin/magento setup:di:compile.
    • Deploy static files - php bin/magento setup:static-content:deploy

3. ChatGPT

If you ever get stuck writing product descriptions or are overwhelmed by writing descriptions for too many products, our module can help you write product descriptions instantly with the click of a button. And it is not just random content, it is the kind that can convert e-window shoppers into repeat customers.

ChatGpt is a Magento 2 extension developed by PIT solutions which is used to generate content from magento backend product form with the help of chatGPT chatbot by open AI.

4.Features

  • The content will generate when admin user clicks on Generate Content with ChatGPT button.
  • Easily connect OpenAI GPT 3 with Magento 2 using the API key.
  • In the backend product add/edit form, to generate content in description/short-description attributes, prompt to ChatGPT is generated based on product’s name by default.
  • Option to automatically set any product attribute values in the content generation prompt.
  • Prompt for the ChatGPT will be automatically generated based on the attribute labels and values in the store scope.
  • The admin can add a short description of the product with the Generate Content with ChatGPT option.
  • The admin can add a product description using the page builder with Generate Content with ChatGPT option.
  • The admin can add the product description and short description even if the page builder is disabled.
  • Admin can add content for CMS Pages and Blocks with Generate Content with ChatGPT Option.
  • Admin can add content for category with Generate content with ChatGPT Option.
  • By default, content generation based on title or category name in CMS and Categories.

5. Configuration

Stores -> Configuration -> Pit Configuration -> Chat Gpt

Enable: Enable/Disable extension,

Title: You can give prompt instructions to ChatGPT using the TITLE field.

ChatGPT API Key: The key used to connect open AI.

Product Attribute: By default, content generation is based on this. If you add multiple attributes, you must keep one space between them. e.g.: {{name}} {{color}}

Attribute label and value is displaying based store view language

Note: If you don’t follow correct format, you will never get auto input from product form

6.How to get Product Attribute code {{attribute_code}}

You can get product attribute code from Backend.

Stores -> Attributes - > Product

Copy the attribute code you want and paste it to the product attribute field in the chatGpt configuration. Please use placeholder format {{attribute_code}} eg: {{name}}{{color}}

You can add product attribute store wise

7. Work Flow

Catalog -> Product -> Add Product/Edit Product

Open content tab in the product form

Click on Generate Content with ChatGPT button to generate content

The popup will display when clicking on the Generate Content with ChatGPT button and content will generate automatically based on your product name by default. You can change this from backend configuration to show any attribute value when the popup is loaded.

If you wish to change the prompt, you can change the prompt text and generate with “Generate” button in the pop-up

The prompt will be generated automatically based on store language. The attribute labels and values given based on the store will be taken when store scope is switched in the backend.

If you are using the description/short-description attribute as “Page Builder” input type, click on “Edit with Page builder button”

Click on the Generate Content with ChatGPT button shown in the above screenshot

The popup will display when clicking on the Generate Content with ChatGPT button.

Here, auto generated prompt is based on your selected product attributes in the configuration. If you wish to change the prompt you can change it and regenerate AI content by, click on Generate button.

If you are using description/short-description attribute as” Text area" input type, the option to generate AI content button will be as in the below image

Finally, you can set AI content to product description by clicking on Apply button in the popup

8. Content-> Elements->Pages

Navigate to backend Content-> Elements->Pages section.

Select a CMS Page and got to Content, select ‘Edit with Page Builder’ and add/edit the HTML code in the editor

If you are disabling page builder from STORES->Configuration->Content Management->Advanced Content Tools, the button to generate AI content will be as in the below image.

9. Content-> Elements-> Blocks

Navigate to backend Content-> Elements-> Blocks section.

Select a CMS Page and got to Content, select ‘Edit with Page Builder’ and add/edit the HTML code in the editor.

If you are disabling page builder from STORES->Configuration->Content Management->Advanced Content Tools, the button to generate AI content will be as in the below image.

10. Catalog-> Catagories

Navigate to backend Catalog-> Catagories section.

Then click on the Edit with Page Builder in the content tab shows as in the above screen shot.

Click on Apply button in the above screen shot to set AI content.

If you are disabling page builder from STORES->Configuration->Content Management->Advanced Content Tools, the button to generate AI content will be as in the below image.

  • If we are making Stores->Configuration->General->Content Management->WYSIWYG Options-> Enable WYSIWYG Editor to ‘ Disabled Completely ’ , the ‘Generate Content with ChatGPT’ button will not be there for CMS Pages, Blocks and Categories.
  • The frontend style will depend on the layout selected.

11.API Key Generation

The user must first create an OpenAI account and login OpenAI dashoboard https://platform.openai.com/signup

Then user need to click on Personal in the top-right corner and popup will appear and click on View API Keys option.

Click on Create New Secret Key will be visible as shown in the below screen shot

You can copy the API key from here with the help of copy button.

Paste the API key in the corresponding field.

12.Technical Requirements / Compatible with:

Magento Community 2.4.x, 2.3.x

13.Supported Languages

Backend texts have German, French, Spanish and Italian translations. ChatGPT is a multilingual chatbot that supports multiple languages. Currently, it supports more than 50 languages, including English, German, Spanish, French, Italian, Dutch, Portuguese, Russian, Chinese, Japanese, Korean, and many more. All languages supported by ChatGPT GPT 3 model will be supported by this extension as well. Make sure the input is in the required language and you will get the output in the specified language.

14.Change Log / Release Notes

Version 1.0.2 March 06, 2024

  • ChatGPT model changed to “gpt-3.5-turbo-instruct".
  • Compatible with Open Source (CE): 2.4.6-p4.

Version 1.0.1 April 19, 2023

  • Compatible with Open Source (CE): 2.4.6.
  • Generate Content with ChatGPT option is now available in backend product description/short description, CMS pages, blocks and Categories.

Version: 1.0.0: Jan 23, 2023

  • Initial release.

15. Support

If you have questions use our contact form in webshopextension.com