From 36d0e2d5664d3f69b34172b86ed9d04d3da7c7d0 Mon Sep 17 00:00:00 2001 From: ClicShopping Date: Mon, 20 Mar 2023 12:10:02 -0400 Subject: [PATCH] chagpt impovment --- CHANGELOG.md | 1 + .../Pages/Home/templates/edit.php | 27 +- .../ClicShoppingAdmin/ManufacturerAdmin.php | 2 +- .../Pages/Home/templates/edit.php | 25 +- .../Pages/Home/templates/edit.php | 48 +-- .../Pages/Home/templates/edit.php | 35 +- .../Config/CH/Params/model.php | 5 +- .../Categories/SeoChatGpt.php | 197 ++++++----- .../Manufacturers/SeoChatGpt.php | 107 ++++-- .../PageManager/SeoChatGpt.php | 171 +++++++--- .../ClicShoppingAdmin/Products/SeoChatGpt.php | 311 ++++++++++++++++++ .../ClicShoppingAdmin/Products/SeoTitle.php | 198 ----------- .../ClicShoppingAdmin/SEO/SeoChatGpt.php | 4 +- .../Configuration/ChatGpt/clicshopping.json | 2 +- .../{seo_title.txt => seo_chat_gpt.txt} | 5 +- .../{seo_title.txt => seo_chat_gpt.txt} | 5 +- .../{seo_title.txt => seo_chat_gpt.txt} | 5 +- .../{seo_title.txt => seo_chat_gpt.txt} | 5 +- .../SEO/{seo_title.txt => seo_chat_gpt.txt} | 4 +- .../{seo_title.txt => seo_chat_gpt.txt} | 3 +- .../{seo_title.txt => seo_chat_gpt.txt} | 3 +- .../{seo_title.txt => seo_chat_gpt.txt} | 3 +- .../{seo_title.txt => seo_chat_gpt.txt} | 3 +- .../SEO/{seo_title.txt => seo_chat_gpt.txt} | 2 +- .../External/vendor/composer/installed.php | 4 +- .../Footer/FooterOutputBootstrapCopyText.php | 8 +- .../Footer/FooterOutputChatGptClipBoard.php | 98 +++--- .../Footer/FooterOutputGpt.php | 45 +-- 28 files changed, 809 insertions(+), 517 deletions(-) create mode 100755 includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Products/SeoChatGpt.php delete mode 100755 includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Products/SeoTitle.php rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/{seo_title.txt => seo_chat_gpt.txt} (60%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/{seo_title.txt => seo_chat_gpt.txt} (61%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/{seo_title.txt => seo_chat_gpt.txt} (61%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/{seo_title.txt => seo_chat_gpt.txt} (61%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/{seo_title.txt => seo_chat_gpt.txt} (78%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/{seo_title.txt => seo_chat_gpt.txt} (67%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/{seo_title.txt => seo_chat_gpt.txt} (67%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/{seo_title.txt => seo_chat_gpt.txt} (67%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/{seo_title.txt => seo_chat_gpt.txt} (67%) rename includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/{seo_title.txt => seo_chat_gpt.txt} (84%) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4d73da4b..8f24347e9 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ 3.417 Improve Chatgpt +Fix manufacturer bug -------------------- 3.416 diff --git a/includes/ClicShopping/Apps/Catalog/Categories/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php b/includes/ClicShopping/Apps/Catalog/Categories/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php index d0c981a6b..3d8cf6e89 100755 --- a/includes/ClicShopping/Apps/Catalog/Categories/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php +++ b/includes/ClicShopping/Apps/Catalog/Categories/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php @@ -233,6 +233,7 @@ class="col-5 col-form-label">getDef('text_e

@@ -264,36 +265,36 @@ class="col-1 col-form-label">getDef('text_c

-
+
-
+
-
- categories_id, $languages[$i]['id']), 'maxlength="70" size="77" id="categories_head_title_tag_' . $i . '"', false); ?> +
+ categories_id, $languages[$i]['id']), 'maxlength="70" size="77" id="categories_head_title_tag_' . $languages_id . '"', false); ?>
-
+
-
- -
- categories_id, $languages[$i]['id']), '110', '5', 'id="categories_head_desc_tag_' . $i . '"'); ?> +
+ +
+ categories_id, $languages[$i]['id']), '110', '5', 'id="categories_head_desc_tag_' . $languages_id . '"'); ?>
-
+
-
+
-
- categories_id, $languages[$i]['id']), 'maxlength="70" size="77" id="categories_head_keywords_tag_' . $i . '"', false); ?> +
+ categories_id, $languages[$i]['id']), 'maxlength="70" size="77" id="categories_head_keywords_tag_' . $languages_id . '"', false); ?>
diff --git a/includes/ClicShopping/Apps/Catalog/Manufacturers/Classes/ClicShoppingAdmin/ManufacturerAdmin.php b/includes/ClicShopping/Apps/Catalog/Manufacturers/Classes/ClicShoppingAdmin/ManufacturerAdmin.php index d727b3b6c..f4a768cbb 100755 --- a/includes/ClicShopping/Apps/Catalog/Manufacturers/Classes/ClicShoppingAdmin/ManufacturerAdmin.php +++ b/includes/ClicShopping/Apps/Catalog/Manufacturers/Classes/ClicShoppingAdmin/ManufacturerAdmin.php @@ -62,7 +62,7 @@ public static function getManufacturerNameById(int $id) :string * @param int|null $id * @return mixed */ - public static function getManufacturerName(?int $id = null):array|string + public static function getManufacturerName(?int $id = null) :array|string { $CLICSHOPPING_Db = Registry::get('Db'); diff --git a/includes/ClicShopping/Apps/Catalog/Manufacturers/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php b/includes/ClicShopping/Apps/Catalog/Manufacturers/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php index 2e78676c6..ea8a43b38 100755 --- a/includes/ClicShopping/Apps/Catalog/Manufacturers/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php +++ b/includes/ClicShopping/Apps/Catalog/Manufacturers/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php @@ -272,6 +272,7 @@ class="float-start">getDef('title_manufa echo $CLICSHOPPING_Wysiwyg::getWysiwyg(); for ($i = 0, $n = \count($languages); $i < $n; $i++) { + $languages_id = $languages[$i]['id']; ?>

@@ -290,36 +291,36 @@ class="float-start">getDef('title_manufa
-
+
-
+
-
- valueInt('manufacturers_id') ?? null, $languages[$i]['id']), 'maxlength="70" size="77" id="manufacturer_seo_title_' . $i . '"', false); ?> +
+ valueInt('manufacturers_id') ?? null, $languages_id), 'maxlength="70" size="77" id="manufacturer_seo_title_' . $languages_id . '"', false); ?>
-
+
-
+
-
- valueInt('manufacturers_id') ?? null, $languages[$i]['id']), '110', '5', 'id="manufacturer_seo_description_' . $i . '"'); ?> +
+ valueInt('manufacturers_id') ?? null, $languages_id), '110', '5', 'id="manufacturer_seo_description_' . $languages_id . '"'); ?>
-
+
-
+
-
- valueInt('manufacturers_id') ?? null, $languages[$i]['id']), 'maxlength="70" size="77" id="manufacturer_seo_keyword_' . $i . '"', false); ?> +
+ valueInt('manufacturers_id') ?? null, $languages_id), 'maxlength="70" size="77" id="manufacturer_seo_keyword_' . $languages_id . '"', false); ?>
diff --git a/includes/ClicShopping/Apps/Catalog/Products/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php b/includes/ClicShopping/Apps/Catalog/Products/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php index 0a6719b18..0ad5bc914 100755 --- a/includes/ClicShopping/Apps/Catalog/Products/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php +++ b/includes/ClicShopping/Apps/Catalog/Products/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php @@ -902,6 +902,7 @@ class="col-5 col-form-label">getDef('text_pro

@@ -919,18 +920,18 @@ class="col-5 col-form-label">getDef('text_pro
getProductsDescription($pInfo->products_id, $languages[$i]['id'])), 'id="' . $ckeditor_id . '"'); + echo $CLICSHOPPING_Wysiwyg::textAreaCkeditor($name, 'soft', '750', '300', (isset($products_description[$languages_id]) ? str_replace('& ', '& ', trim($products_description[$languages_id])) : $CLICSHOPPING_ProductsAdmin->getProductsDescription($pInfo->products_id, $languages_id)), 'id="' . $ckeditor_id . '"'); ?>
-
+
-
+
-
- getProductsDescriptionSummary($pInfo->products_id, $languages[$i]['id'])), '120', '5', 'id="SummaryDescription_' . $i . '"'); ?> +
+ getProductsDescriptionSummary($pInfo->products_id, $languages_id)), '120', '5', 'id="SummaryDescription_' . $languages_id . '"'); ?>
@@ -1230,6 +1231,7 @@ class="col-sm-12">getDef('text_products_delet

@@ -1251,55 +1253,55 @@ class="col-sm-12">getDef('text_products_delet
- products_id, $languages[$i]['id']), 'maxlength="70" size="77" id="seo_url_title_' . $i . '"', false); ?> + products_id, $languages_id), 'maxlength="70" size="77" id="seo_url_title_' . $i . '"', false); ?>

-
+
-
+
-
- products_id, $languages[$i]['id']), 'maxlength="70" size="77" id="products_head_title_tag_' . $i . '"', false); ?> +
+ products_id, $languages_id), 'maxlength="70" size="77" id="products_head_title_tag_' . $languages_id . '"', false); ?>
-
+
-
+
-
- products_id, $languages[$i]['id']), '110', '5', 'id="products_head_desc_tag_' . $i . '"'); ?> +
+ products_id, $languages_id), '110', '5', 'id="products_head_desc_tag_' . $languages_id . '"'); ?>
-
+
-
+
-
- products_id, $languages[$i]['id']), 'maxlength="70" size="77" id="products_head_keywords_tag_' . $i . '"', false); ?> +
+ products_id, $languages_id), 'maxlength="70" size="77" id="products_head_keywords_tag_' . $languages_id . '"', false); ?>
-
+
-
+
-
- products_id, $languages[$i]['id']), 'maxlength="70" size="77" id="products_head_tag_' . $i . '"', false); ?> +
+ products_id, $languages_id), 'maxlength="70" size="77" id="products_head_tag_' . $languages_id . '"', false); ?>
diff --git a/includes/ClicShopping/Apps/Communication/PageManager/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php b/includes/ClicShopping/Apps/Communication/PageManager/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php index 3e37d83b4..cb846c922 100755 --- a/includes/ClicShopping/Apps/Communication/PageManager/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php +++ b/includes/ClicShopping/Apps/Communication/PageManager/Sites/ClicShoppingAdmin/Pages/Home/templates/edit.php @@ -653,10 +653,12 @@ class="mainTitle">getDef('text_pages_infor
getDef('text_pages_infor ?>
-
+ +
-
+
-
- +
+
-
+
-
+
-
- +
+
-
+
-
+
-
- +
+
diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/ClicShoppingAdmin/Config/CH/Params/model.php b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/ClicShoppingAdmin/Config/CH/Params/model.php index 4006ed03d..7fa55d4af 100755 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/ClicShoppingAdmin/Config/CH/Params/model.php +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/ClicShoppingAdmin/Config/CH/Params/model.php @@ -28,7 +28,10 @@ public function getInputField() { $array = [ ['id' => 'text-davinci-003', - 'text' =>'Davinci' + 'text' =>'gpt-3 Davinci 003' + ], + ['id' => 'gpt-4', + 'text' =>'gpt-4' ], ]; diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Categories/SeoChatGpt.php b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Categories/SeoChatGpt.php index 26426b3b5..4d5463b10 100755 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Categories/SeoChatGpt.php +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Categories/SeoChatGpt.php @@ -39,7 +39,7 @@ public function display() return false; } - $this->app->loadDefinitions('Module/Hooks/ClicShoppingAdmin/Categories/seo_title'); + $this->app->loadDefinitions('Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt'); if (isset($_GET['cID'])) { $id = HTML::sanitize($_GET['cID']); @@ -50,10 +50,12 @@ public function display() $question = $this->app->getDef('text_seo_page_title_question'); $questionKeywords = $this->app->getDef('text_seo_page_keywords_question'); $questionDescription = $this->app->getDef('text_seo_page_description_question'); + $translate_language = $this->app->getDef('text_seo_page_translate_language'); $categories_name = $CLICSHOPPING_CategoriesAdmin->getCategoryName($id, $CLICSHOPPING_Language->getId()); $url = Chat::getAjaxUrl(false); + $urlMultilanguage = Chat::getAjaxSeoMultilanguageUrl(); $content = ''; + +$output = << + + + + + + + + + + + + + + + + + + + + + + + +EOD; + return $output; + } + } diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Products/SeoTitle.php b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Products/SeoTitle.php deleted file mode 100755 index 9cee6f143..000000000 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/Products/SeoTitle.php +++ /dev/null @@ -1,198 +0,0 @@ -app = Registry::get('ChatGpt'); - } - - public function display() - { - $CLICSHOPPING_ProductsAdmin = Registry::get('ProductsAdmin'); - - if (!\defined('CLICSHOPPING_APP_CHATGPT_CH_STATUS') || CLICSHOPPING_APP_CHATGPT_CH_STATUS == 'False') { - return false; - } - - $this->app->loadDefinitions('Module/Hooks/ClicShoppingAdmin/Products/seo_title'); - - if (isset($_GET['pID'])) { - $id = HTML::sanitize($_GET['pID']); - } else { - return false; - } - - $question = $this->app->getDef('text_seo_page_title_question'); - $questionTag = $this->app->getDef('text_seo_page_tag_question'); - $questionKeywords = $this->app->getDef('text_seo_page_keywords_question'); - $questionDescription = $this->app->getDef('text_seo_page_description_question'); - - $product_name = $CLICSHOPPING_ProductsAdmin->getProductsName($id); - - $url = CLICSHOPPING::getConfig('http_server', 'ClicShoppingAdmin') . CLICSHOPPING::getConfig('http_path', 'ClicShoppingAdmin') . 'ajax/chatGptSEO.php'; - - $content = ''; - -$output = << - - - - - - - - - - - - - - - - - - - -EOD; - return $output; - } - } diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/SEO/SeoChatGpt.php b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/SEO/SeoChatGpt.php index 8f648b17a..fb34100f3 100755 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/SEO/SeoChatGpt.php +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/Module/Hooks/ClicShoppingAdmin/SEO/SeoChatGpt.php @@ -33,13 +33,11 @@ public function __construct() public function display() { - $CLICSHOPPING_Language = Registry::get('Language'); - if (!\defined('CLICSHOPPING_APP_CHATGPT_CH_STATUS') || CLICSHOPPING_APP_CHATGPT_CH_STATUS == 'False') { return false; } - $this->app->loadDefinitions('Module/Hooks/ClicShoppingAdmin/SEO/seo_title'); + $this->app->loadDefinitions('Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt'); if(empty(STORE_NAME)) { return false; diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/clicshopping.json b/includes/ClicShopping/Apps/Configuration/ChatGpt/clicshopping.json index a7ea2a36c..763d81c7f 100755 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/clicshopping.json +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/clicshopping.json @@ -16,7 +16,7 @@ "modules": { "Hooks": { "ClicShoppingAdmin/Products": { - "PageTab": "Module\\Hooks\\ClicShoppingAdmin\\Products\\SeoTitle" + "PageTab": "Module\\Hooks\\ClicShoppingAdmin\\Products\\SeoChatGpt" }, "ClicShoppingAdmin/Categories": { "CategoriesContentTab3": "Module\\Hooks\\ClicShoppingAdmin\\Categories\\SeoChatGpt" diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt similarity index 60% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt index 5bd2c02f1..39d67b5fa 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt @@ -1,5 +1,6 @@ text_seo_page_title = SEO Page Title -text_seo_page_title_question = Give me a SEO Title in less 50 caracters about this category : +text_seo_page_title_question = Give me a SEO Title in less 50 characters about this category : text_seo_page_tag_question = Give me in less 70 words 5 tag separated by a comma about this category : text_seo_page_keywords_question = Give me 7 keywords tag separated by a comma about this category : -text_seo_page_description_question = Give me in less 50 words a very short description about this category : \ No newline at end of file +text_seo_page_description_question = Give me in less 50 words a very short description about this category : +text_seo_page_translate_language = Can you translate in \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt similarity index 61% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt index ba07570ba..efe73b9aa 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt @@ -1,5 +1,6 @@ text_seo_page_title = SEO Page Title -text_seo_page_title_question = Give me a SEO Title in less 50 caracters about this brand : +text_seo_page_title_question = Give me a SEO Title in less 50 characters about this brand : text_seo_page_tag_question = Give me in less 70 words 5 tag separated by a comma about this brand : text_seo_page_keywords_question = Give me 7 keywords tag separated by a comma about this brand : -text_seo_page_description_question = Give me in less 50 words a very short description about this brand : \ No newline at end of file +text_seo_page_description_question = Give me in less 50 words a very short description about this brand : +text_seo_page_translate_language = Can you translate in \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt similarity index 61% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt index b1e39860c..f42a37535 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt @@ -1,5 +1,6 @@ text_seo_page_title = SEO Page Title -text_seo_page_title_question = Give me a SEO Title in less 50 caracters about this page : +text_seo_page_title_question = Give me a SEO Title in less 50 characters about this page : text_seo_page_tag_question = Give me in less 70 words 5 tag separated by a comma about this page : text_seo_page_keywords_question = Give me 7 keywords tag separated by a comma about this page : -text_seo_page_description_question = Give me in less 50 words a very short description about this page : \ No newline at end of file +text_seo_page_description_question = Give me in less 50 words a very short description about this page : +text_seo_page_translate_language = Can you translate in \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt similarity index 61% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt index fc69bc8ef..339403f94 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt @@ -1,5 +1,6 @@ text_seo_page_title = SEO Page Title -text_seo_page_title_question = Give me a SEO Title in less 50 caracters about this product : +text_seo_page_title_question = Give me a SEO Title in less 50 characters about this product : text_seo_page_tag_question = Give me in less 70 words 5 tag separated by a comma about this product : text_seo_page_keywords_question = Give me 7 keywords tag separated by a comma about this product : -text_seo_page_description_question = Give me in less 50 words a very short description about this product : \ No newline at end of file +text_seo_page_description_question = Give me in less 50 words a very short description about this product : +text_seo_page_translate_language = Can you translate in \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt similarity index 78% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt index 565c3311d..bda5baf41 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/english/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt @@ -1,5 +1,5 @@ text_seo_page_title = SEO Page Title -text_seo_page_title_question = Give me a SEO Title in less 50 caracters about : +text_seo_page_title_question = Give me a SEO Title in less 50 characters about : text_seo_page_tag_question = Give me in less 70 words 5 tag separated by a comma about : text_seo_page_keywords_question = Give me 7 keywords tag separated by a comma about : text_seo_page_description_question = Give me in less 50 words a very short description about : @@ -10,4 +10,4 @@ text_tag_featured = featured products text_tag_products_new = new products text_tag_review = review products -text_seo_page_translate_language = Can you translate in : \ No newline at end of file +text_seo_page_translate_language = Can you translate in \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt similarity index 67% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt index e8f4403d3..88dbc2aea 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Categories/seo_chat_gpt.txt @@ -2,4 +2,5 @@ text_seo_page_title = SEO Page de Titre text_seo_page_title_question = Donne moi en moins de 50 mots le SEO Titre concernant cette catégorie : text_seo_page_tag_question = Donne moi en moins de 70 mots, 5 tag sèparès par une virgule concernant cette catégorie : text_seo_page_keywords_question = Donne moi 7 mots clefs sèparès par une virgule concernant cette catégorie : -text_seo_page_description_question = Done moi en moins de 50 mots une description trés courte concernant cette catégorie : \ No newline at end of file +text_seo_page_description_question = Donne moi en moins de 50 mots une description trés courte concernant cette catégorie : +text_seo_page_translate_language = Peux tu traduire en \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt similarity index 67% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt index b2a207925..eb1e31962 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Manufacturer/seo_chat_gpt.txt @@ -2,4 +2,5 @@ text_seo_page_title = SEO Page de Titre text_seo_page_title_question = Donne moi en moins de 50 mots le SEO Titre concernant cette marque : text_seo_page_tag_question = Donne moi en moins de 70 mots, 5 tag sèparès par une virgule concernant cette marque : text_seo_page_keywords_question = Donne moi 7 mots clefs sèparès par une virgule concernant cette marque : -text_seo_page_description_question = Done moi en moins de 50 mots une description trés courte concernant cette marque : \ No newline at end of file +text_seo_page_description_question = Donne moi en moins de 50 mots une description trés courte concernant cette marque : +text_seo_page_translate_language = Peux tu traduire en \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt similarity index 67% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt index 3d6d99bcb..573ad543a 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/PageManager/seo_chat_gpt.txt @@ -2,4 +2,5 @@ text_seo_page_title = SEO Page de Titre text_seo_page_title_question = Donne moi en moins de 50 mots le SEO Titre concernant cette page : text_seo_page_tag_question = Donne moi en moins de 70 mots, 5 tag sèparès par une virgule concernant cette page : text_seo_page_keywords_question = Donne moi 7 mots clefs sèparès par une virgule concernant cette page : -text_seo_page_description_question = Done moi en moins de 50 mots une description trés courte concernant cette page : \ No newline at end of file +text_seo_page_description_question = Donne moi en moins de 50 mots une description trés courte concernant cette page : +text_seo_page_translate_language = Peux tu traduire en \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt similarity index 67% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt index abdeefa8a..054624825 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/Products/seo_chat_gpt.txt @@ -2,4 +2,5 @@ text_seo_page_title = SEO Page de Titre text_seo_page_title_question = Donne moi en moins de 50 mots le SEO Titre concernant ce produit : text_seo_page_tag_question = Donne moi en moins de 70 mots, 5 tag sèparès par une virgule concernant ce produit : text_seo_page_keywords_question = Donne moi 7 mots clefs sèparès par une virgule concernant ce produit : -text_seo_page_description_question = Done moi en moins de 50 mots une description trés courte concernant ce produit : \ No newline at end of file +text_seo_page_description_question = Donne moi en moins de 50 mots une description trés courte concernant ce produit : +text_seo_page_translate_language = Peux tu traduire en \ No newline at end of file diff --git a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt similarity index 84% rename from includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt rename to includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt index 3751950e2..44b3d488b 100644 --- a/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_title.txt +++ b/includes/ClicShopping/Apps/Configuration/ChatGpt/languages/french/Module/Hooks/ClicShoppingAdmin/SEO/seo_chat_gpt.txt @@ -2,7 +2,7 @@ text_seo_page_title = SEO Page de Titre text_seo_page_title_question = Donne moi en moins de 50 mots le SEO Titre concernant : text_seo_page_tag_question = Donne moi en moins de 70 mots, 5 tag sèparès par une virgule concernant : text_seo_page_keywords_question = Donne moi 7 mots clefs sèparès par une virgule concernant : -text_seo_page_description_question = Done moi en moins de 50 mots une description trés courte concernant : +text_seo_page_description_question = Donne moi en moins de 50 mots une description trés courte concernant : text_tag_specials = produits promotionnels text_tag_favorite = produits coup de coeur diff --git a/includes/ClicShopping/External/vendor/composer/installed.php b/includes/ClicShopping/External/vendor/composer/installed.php index cbe681045..78d3ccd18 100644 --- a/includes/ClicShopping/External/vendor/composer/installed.php +++ b/includes/ClicShopping/External/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'adb4604bf8ef31a460322501e01e351217331c34', + 'reference' => '23635ae901c254feb5f3bc81aa19c0f6f4a12441', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'adb4604bf8ef31a460322501e01e351217331c34', + 'reference' => '23635ae901c254feb5f3bc81aa19c0f6f4a12441', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../../', 'aliases' => array(), diff --git a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputBootstrapCopyText.php b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputBootstrapCopyText.php index 6f6f7a2e1..470ee21a3 100644 --- a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputBootstrapCopyText.php +++ b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputBootstrapCopyText.php @@ -28,9 +28,11 @@ public function display(): string|bool $output = ''; if (isset($_SESSION['admin'])) { - $output .= '' . "\n"; - $output .= '' . "\n"; - $output .= '' . "\n"; + if (!\defined('CLICSHOPPING_APP_CHATGPT_CH_STATUS') || CLICSHOPPING_APP_CHATGPT_CH_STATUS == 'True') { + $output .= '' . "\n"; + $output .= '' . "\n"; + $output .= '' . "\n"; + } } else { return false; } diff --git a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputChatGptClipBoard.php b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputChatGptClipBoard.php index 9cb3b1a42..c7cea245d 100644 --- a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputChatGptClipBoard.php +++ b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputChatGptClipBoard.php @@ -19,61 +19,65 @@ class FooterOutputChatGptClipBoard */ public function display(): string { - $output = '' . "\n"; + $output = ''; if (isset($_SESSION['admin'])) { - $url = CLICSHOPPING::getConfig('http_server', 'ClicShoppingAdmin') . CLICSHOPPING::getConfig('http_path', 'ClicShoppingAdmin') . 'ajax/chatGpt.php'; + $output = '' . "\n"; - $output .= ''; + $output .= ''; - $output .= '' . "\n"; + $output .= '' . "\n"; + } } return $output; diff --git a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputGpt.php b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputGpt.php index 777e67d45..8bc4a8f1d 100644 --- a/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputGpt.php +++ b/includes/Module/Hooks/ClicShoppingAdmin/Footer/FooterOutputGpt.php @@ -19,26 +19,33 @@ class FooterOutputGpt */ public function display(): string { - $url = Chat::getAjaxUrl(true); + $output = ''; - $output = '' . "\n"; - $output .= ''; - $output .= '' . "\n"; + if (isset($_SESSION['admin'])) { + if (!\defined('CLICSHOPPING_APP_CHATGPT_CH_STATUS') || CLICSHOPPING_APP_CHATGPT_CH_STATUS == 'True') { + + $url = Chat::getAjaxUrl(true); + + $output .= '' . "\n"; + $output .= ''; + $output .= '' . "\n"; + } + } return $output; }