Skip to content

Commit f37a8f6

Browse files
committed
Initial commit
1 parent e6a288d commit f37a8f6

File tree

193 files changed

+38
-1690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+38
-1690
lines changed

admin-dev/themes/new-theme/js/pages/cms-page/index.ts

-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,6 @@ $(() => {
6363
const shopChoiceTree = new window.prestashop.component.ChoiceTree('#cms_page_category_shop_association');
6464
shopChoiceTree.enableAutoCheckChildren();
6565

66-
new window.prestashop.component.TaggableField({
67-
tokenFieldSelector: 'input[name^="cms_page_category[meta_keywords]"]',
68-
options: {
69-
createTokensOnBlur: true,
70-
},
71-
});
72-
7366
const cmsGrid = new window.prestashop.component.Grid('cms_page');
7467
cmsGrid.addExtension(new window.prestashop.component.GridExtensions.ReloadListExtension());
7568
cmsGrid.addExtension(new window.prestashop.component.GridExtensions.ExportToSqlManagerExtension());

classes/AddressFormat.php

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ class AddressFormatCore extends ObjectModel
8989
'short_description',
9090
'link_rewrite',
9191
'meta_title',
92-
'meta_keywords',
9392
'display_tax_label',
9493
'need_zip_code',
9594
'contains_states',

classes/CMS.php

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class CMSCore extends ObjectModel
3535
public $head_seo_title;
3636
public $meta_title;
3737
public $meta_description;
38-
public $meta_keywords;
3938
public $content;
4039
public $link_rewrite;
4140
public $id_cms_category;
@@ -59,7 +58,6 @@ class CMSCore extends ObjectModel
5958

6059
/* Lang fields */
6160
'meta_description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 512],
62-
'meta_keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
6361
'meta_title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255],
6462
'head_seo_title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
6563
'link_rewrite' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'required' => true, 'size' => 128],

classes/CMSCategory.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ class CMSCategoryCore extends ObjectModel
5454
/** @var string|array<int, string> Meta title */
5555
public $meta_title;
5656

57-
/** @var string|array<int, string> Meta keywords */
58-
public $meta_keywords;
59-
6057
/** @var string|array<int, string> Meta description */
6158
public $meta_description;
6259

@@ -90,7 +87,6 @@ class CMSCategoryCore extends ObjectModel
9087
'description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 4194303],
9188
'meta_title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
9289
'meta_description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 512],
93-
'meta_keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
9490
],
9591
];
9692

@@ -381,7 +377,7 @@ public static function getSimpleCategories($id_lang)
381377
public function getSubCategories(int $id_lang, bool $active = true)
382378
{
383379
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
384-
SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description
380+
SELECT c.*, cl.id_lang, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_description
385381
FROM `' . _DB_PREFIX_ . 'cms_category` c
386382
LEFT JOIN `' . _DB_PREFIX_ . 'cms_category_lang` cl ON (c.`id_cms_category` = cl.`id_cms_category` AND `id_lang` = ' . (int) $id_lang . ')
387383
WHERE `id_parent` = ' . (int) $this->id . '

classes/Category.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ class CategoryCore extends ObjectModel
7474
/** @var mixed string or array of Meta title */
7575
public $meta_title;
7676

77-
/** @var mixed string or array of Meta keywords */
78-
public $meta_keywords;
79-
8077
/** @var mixed string or array of Meta description */
8178
public $meta_description;
8279

@@ -149,7 +146,6 @@ class CategoryCore extends ObjectModel
149146
'additional_description' => ['type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml'],
150147
'meta_title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => SeoSettings::MAX_TITLE_LENGTH],
151148
'meta_description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => SeoSettings::MAX_DESCRIPTION_LENGTH],
152-
'meta_keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => SeoSettings::MAX_KEYWORDS_LENGTH],
153149
],
154150
];
155151

@@ -918,7 +914,7 @@ public function getSubCategories($idLang, $active = true)
918914
}
919915

920916
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
921-
SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`additional_description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_keywords`, cl.`meta_description`
917+
SELECT c.*, cl.`id_lang`, cl.`name`, cl.`description`, cl.`additional_description`, cl.`link_rewrite`, cl.`meta_title`, cl.`meta_description`
922918
FROM `' . _DB_PREFIX_ . 'category` c
923919
' . Shop::addSqlAssociation('category', 'c') . '
924920
LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = ' . (int) $idLang . ' ' . Shop::addSqlRestrictionOnLang('cl') . ')
@@ -1026,7 +1022,7 @@ public function getProducts(
10261022

10271023
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) AS quantity' . (Combination::isFeatureActive() ? ', IFNULL(product_attribute_shop.id_product_attribute, 0) AS id_product_attribute,
10281024
product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity' : '') . ', pl.`description`, pl.`description_short`, pl.`available_now`,
1029-
pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image,
1025+
pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_title`, pl.`name`, image_shop.`id_image` id_image,
10301026
il.`legend` as legend, m.`name` AS manufacturer_name, cl.`name` AS category_default,
10311027
DATEDIFF(product_shop.`date_add`, DATE_SUB("' . date('Y-m-d') . ' 00:00:00",
10321028
INTERVAL ' . (int) $nbDaysNewProduct . ' DAY)) > 0 AS new, product_shop.price AS orderprice

classes/Dispatcher.php

-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ class DispatcherCore
6666
'keywords' => [
6767
'id' => ['regexp' => '[0-9]+', 'param' => 'id_category'],
6868
'rewrite' => ['regexp' => self::REWRITE_PATTERN],
69-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
7069
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
7170
],
7271
],
@@ -76,7 +75,6 @@ class DispatcherCore
7675
'keywords' => [
7776
'id' => ['regexp' => '[0-9]+', 'param' => 'id_supplier'],
7877
'rewrite' => ['regexp' => self::REWRITE_PATTERN],
79-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
8078
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
8179
],
8280
],
@@ -86,7 +84,6 @@ class DispatcherCore
8684
'keywords' => [
8785
'id' => ['regexp' => '[0-9]+', 'param' => 'id_manufacturer'],
8886
'rewrite' => ['regexp' => self::REWRITE_PATTERN],
89-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
9087
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
9188
],
9289
],
@@ -96,7 +93,6 @@ class DispatcherCore
9693
'keywords' => [
9794
'id' => ['regexp' => '[0-9]+', 'param' => 'id_cms'],
9895
'rewrite' => ['regexp' => self::REWRITE_PATTERN],
99-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
10096
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
10197
],
10298
],
@@ -106,7 +102,6 @@ class DispatcherCore
106102
'keywords' => [
107103
'id' => ['regexp' => '[0-9]+', 'param' => 'id_cms_category'],
108104
'rewrite' => ['regexp' => self::REWRITE_PATTERN],
109-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
110105
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
111106
],
112107
],
@@ -132,7 +127,6 @@ class DispatcherCore
132127
'category' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
133128
'categories' => ['regexp' => '[/_a-zA-Z0-9-\pL]*'],
134129
'reference' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
135-
'meta_keywords' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
136130
'meta_title' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
137131
'manufacturer' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],
138132
'supplier' => ['regexp' => '[_a-zA-Z0-9-\pL]*'],

classes/Link.php

+3-23
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,6 @@ public function getProductLink(
188188
$product = $this->getProductObject($product, $idLang, $idShop);
189189
}
190190
$params['ean13'] = (!$ean13) ? $product->ean13 : $ean13;
191-
if ($dispatcher->hasKeyword('product_rule', $idLang, 'meta_keywords', $idShop)) {
192-
$product = $this->getProductObject($product, $idLang, $idShop);
193-
$params['meta_keywords'] = Tools::str2url($product->getFieldByLang('meta_keywords'));
194-
}
195191
if ($dispatcher->hasKeyword('product_rule', $idLang, 'meta_title', $idShop)) {
196192
$product = $this->getProductObject($product, $idLang, $idShop);
197193
$params['meta_title'] = Tools::str2url($product->getFieldByLang('meta_title'));
@@ -457,10 +453,6 @@ public function getCategoryLink(
457453
$category = $this->getCategoryObject($category, $idLang);
458454
}
459455
$params['rewrite'] = (!$alias) ? $category->link_rewrite : $alias;
460-
if ($dispatcher->hasKeyword($rule, $idLang, 'meta_keywords', $idShop)) {
461-
$category = $this->getCategoryObject($category, $idLang);
462-
$params['meta_keywords'] = Tools::str2url($category->getFieldByLang('meta_keywords'));
463-
}
464456
if ($dispatcher->hasKeyword($rule, $idLang, 'meta_title', $idShop)) {
465457
$category = $this->getCategoryObject($category, $idLang);
466458
$params['meta_title'] = Tools::str2url($category->getFieldByLang('meta_title'));
@@ -495,17 +487,14 @@ public function getCMSCategoryLink(
495487

496488
$dispatcher = Dispatcher::getInstance();
497489
if (!is_object($cmsCategory)) {
498-
if ($alias !== null && !$dispatcher->hasKeyword('cms_category_rule', $idLang, 'meta_keywords', $idShop) && !$dispatcher->hasKeyword('cms_category_rule', $idLang, 'meta_title', $idShop)) {
490+
if ($alias !== null && !$dispatcher->hasKeyword('cms_category_rule', $idLang, 'meta_title', $idShop)) {
499491
return $url . $dispatcher->createUrl('cms_category_rule', $idLang, ['id' => (int) $cmsCategory, 'rewrite' => (string) $alias], $this->allow, '', $idShop);
500492
}
501493
$cmsCategory = new CMSCategory($cmsCategory, $idLang);
502494
}
503495
if (is_array($cmsCategory->link_rewrite) && isset($cmsCategory->link_rewrite[(int) $idLang])) {
504496
$cmsCategory->link_rewrite = $cmsCategory->link_rewrite[(int) $idLang];
505497
}
506-
if (is_array($cmsCategory->meta_keywords) && isset($cmsCategory->meta_keywords[(int) $idLang])) {
507-
$cmsCategory->meta_keywords = $cmsCategory->meta_keywords[(int) $idLang];
508-
}
509498
if (is_array($cmsCategory->meta_title) && isset($cmsCategory->meta_title[(int) $idLang])) {
510499
$cmsCategory->meta_title = $cmsCategory->meta_title[(int) $idLang];
511500
}
@@ -514,7 +503,6 @@ public function getCMSCategoryLink(
514503
$params = [];
515504
$params['id'] = $cmsCategory->id;
516505
$params['rewrite'] = (!$alias) ? $cmsCategory->link_rewrite : $alias;
517-
$params['meta_keywords'] = Tools::str2url($cmsCategory->meta_keywords);
518506
$params['meta_title'] = Tools::str2url($cmsCategory->meta_title);
519507

520508
return $url . $dispatcher->createUrl('cms_category_rule', $idLang, $params, $this->allow, '', $idShop);
@@ -548,7 +536,7 @@ public function getCMSLink(
548536

549537
$dispatcher = Dispatcher::getInstance();
550538
if (!is_object($cms)) {
551-
if ($alias !== null && !$dispatcher->hasKeyword('cms_rule', $idLang, 'meta_keywords', $idShop) && !$dispatcher->hasKeyword('cms_rule', $idLang, 'meta_title', $idShop)) {
539+
if ($alias !== null && !$dispatcher->hasKeyword('cms_rule', $idLang, 'meta_title', $idShop)) {
552540
return $url . $dispatcher->createUrl('cms_rule', $idLang, ['id' => (int) $cms, 'rewrite' => (string) $alias], $this->allow, '', $idShop);
553541
}
554542
$cms = new CMS($cms, $idLang);
@@ -559,11 +547,6 @@ public function getCMSLink(
559547
$params['id'] = $cms->id;
560548
$params['rewrite'] = (!$alias) ? (is_array($cms->link_rewrite) ? $cms->link_rewrite[(int) $idLang] : $cms->link_rewrite) : $alias;
561549

562-
$params['meta_keywords'] = '';
563-
if (isset($cms->meta_keywords) && !empty($cms->meta_keywords)) {
564-
$params['meta_keywords'] = is_array($cms->meta_keywords) ? Tools::str2url($cms->meta_keywords[(int) $idLang]) : Tools::str2url($cms->meta_keywords);
565-
}
566-
567550
$params['meta_title'] = '';
568551
if (isset($cms->meta_title) && !empty($cms->meta_title)) {
569552
$params['meta_title'] = is_array($cms->meta_title) ? Tools::str2url($cms->meta_title[(int) $idLang]) : Tools::str2url($cms->meta_title);
@@ -599,7 +582,6 @@ public function getSupplierLink(
599582
$dispatcher = Dispatcher::getInstance();
600583
if (!is_object($supplier)) {
601584
if ($alias !== null
602-
&& !$dispatcher->hasKeyword('supplier_rule', $idLang, 'meta_keywords', $idShop)
603585
&& !$dispatcher->hasKeyword('supplier_rule', $idLang, 'meta_title', $idShop)
604586
) {
605587
return $url . $dispatcher->createUrl(
@@ -618,7 +600,6 @@ public function getSupplierLink(
618600
$params = [];
619601
$params['id'] = $supplier->id;
620602
$params['rewrite'] = (!$alias) ? $supplier->link_rewrite : $alias;
621-
$params['meta_keywords'] = Tools::str2url($supplier->meta_keywords);
622603
$params['meta_title'] = Tools::str2url($supplier->meta_title);
623604

624605
return $url . $dispatcher->createUrl('supplier_rule', $idLang, $params, $this->allow, '', $idShop);
@@ -650,7 +631,7 @@ public function getManufacturerLink(
650631

651632
$dispatcher = Dispatcher::getInstance();
652633
if (!is_object($manufacturer)) {
653-
if ($alias !== null && !$dispatcher->hasKeyword('manufacturer_rule', $idLang, 'meta_keywords', $idShop) && !$dispatcher->hasKeyword('manufacturer_rule', $idLang, 'meta_title', $idShop)) {
634+
if ($alias !== null && !$dispatcher->hasKeyword('manufacturer_rule', $idLang, 'meta_title', $idShop)) {
654635
return $url . $dispatcher->createUrl('manufacturer_rule', $idLang, ['id' => (int) $manufacturer, 'rewrite' => (string) $alias], $this->allow, '', $idShop);
655636
}
656637
$manufacturer = new Manufacturer($manufacturer, $idLang);
@@ -660,7 +641,6 @@ public function getManufacturerLink(
660641
$params = [];
661642
$params['id'] = $manufacturer->id;
662643
$params['rewrite'] = (!$alias) ? $manufacturer->link_rewrite : $alias;
663-
$params['meta_keywords'] = Tools::str2url($manufacturer->meta_keywords);
664644
$params['meta_title'] = Tools::str2url($manufacturer->meta_title);
665645

666646
return $url . $dispatcher->createUrl('manufacturer_rule', $idLang, $params, $this->allow, '', $idShop);

classes/Manufacturer.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ class ManufacturerCore extends ObjectModel
5555
/** @var string|array<int, string> Meta title */
5656
public $meta_title;
5757

58-
/** @var string|array<int, string> Meta keywords */
59-
public $meta_keywords;
60-
6158
/** @var string|array<int, string> Meta description */
6259
public $meta_description;
6360

@@ -82,7 +79,6 @@ class ManufacturerCore extends ObjectModel
8279
'short_description' => ['type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 4194303],
8380
'meta_title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
8481
'meta_description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 512],
85-
'meta_keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
8682
],
8783
];
8884

@@ -447,7 +443,7 @@ public static function getProducts(
447443

448444
$sql = 'SELECT p.*, product_shop.*, stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity'
449445
. (Combination::isFeatureActive() ? ', product_attribute_shop.minimal_quantity AS product_attribute_minimal_quantity, IFNULL(product_attribute_shop.`id_product_attribute`,0) id_product_attribute' : '') . '
450-
, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`,
446+
, pl.`description`, pl.`description_short`, pl.`link_rewrite`, pl.`meta_description`,
451447
pl.`meta_title`, pl.`name`, pl.`available_now`, pl.`available_later`, image_shop.`id_image` id_image, il.`legend`, m.`name` AS manufacturer_name,
452448
DATEDIFF(
453449
product_shop.`date_add`,

classes/Meta.php

-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class MetaCore extends ObjectModel
3535
public $configurable = 1;
3636
public $title;
3737
public $description;
38-
public $keywords;
3938
public $url_rewrite;
4039

4140
/**
@@ -53,7 +52,6 @@ class MetaCore extends ObjectModel
5352
/* Lang fields */
5453
'title' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 128],
5554
'description' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
56-
'keywords' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'size' => 255],
5755
'url_rewrite' => ['type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isLinkRewrite', 'size' => 255],
5856
],
5957
];
@@ -329,7 +327,6 @@ public static function getHomeMetas($idLang, $pageName)
329327
$metas = Meta::getMetaByPage($pageName, $idLang);
330328
$ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');
331329
$ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : '';
332-
$ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] : '';
333330
$ret = Meta::completeMetaTags($ret, $ret['meta_title']);
334331

335332
return $ret;

0 commit comments

Comments
 (0)