Skip to content

Commit

Permalink
fix: ready to ps9 (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john authored Nov 28, 2024
1 parent 7bc604f commit 142b281
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
9 changes: 0 additions & 9 deletions e2e/src/fixtures/9/apiCategories/categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"description": "",
"link_rewrite": "root",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:21+0200",
Expand All @@ -28,7 +27,6 @@
"description": "",
"link_rewrite": "home",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:21+0200",
Expand All @@ -46,7 +44,6 @@
"description": "PHA+RGlzY292ZXIgb3VyIGZhdm9yaXRlcyBmYXNoaW9uYWJsZSBkaXNjb3ZlcmllcywgYSBzZWxlY3Rpb24gb2YgY29vbCBpdGVtcyB0byBpbnRlZ3JhdGUgaW4geW91ciB3YXJkcm9iZS4gQ29tcG9zZSBhIHVuaXF1ZSBzdHlsZSB3aXRoIHBlcnNvbmFsaXR5IHdoaWNoIG1hdGNoZXMgeW91ciBvd24uPC9wPg==",
"link_rewrite": "clothes",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -64,7 +61,6 @@
"description": "PHA+VC1zaGlydHMsIHN3ZWF0ZXJzLCBob29kaWVzIGFuZCBtZW4ncyBhY2Nlc3Nvcmllcy4gRnJvbSBiYXNpY3MgdG8gb3JpZ2luYWwgY3JlYXRpb25zLCBmb3IgZXZlcnkgc3R5bGUuIDwvcD4=",
"link_rewrite": "men",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -82,7 +78,6 @@
"description": "PHA+VC1zaGlydHMsIHN3ZWF0ZXJzLCBob29kaWVzIGFuZCB3b21lbidzIGFjY2Vzc29yaWVzLiBGcm9tIGJhc2ljcyB0byBvcmlnaW5hbCBjcmVhdGlvbnMsIGZvciBldmVyeSBzdHlsZS4gPC9wPg==",
"link_rewrite": "women",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -100,7 +95,6 @@
"description": "PHA+SXRlbXMgYW5kIGFjY2Vzc29yaWVzIGZvciB5b3VyIGRlc2ssIGtpdGNoZW4gb3IgbGl2aW5nIHJvb20uIE1ha2UgeW91ciBob3VzZSBhIGhvbWUgd2l0aCBvdXIgZXllLWNhdGNoaW5nIGRlc2lnbnMuIDwvcD4=",
"link_rewrite": "accessories",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -118,7 +112,6 @@
"description": "PHA+Tm90ZWJvb2tzLCBhZ2VuZGFzLCBvZmZpY2UgYWNjZXNzb3JpZXMgYW5kIG1vcmUuIEV2ZXJ5dGhpbmcgeW91IG5lZWQgdG8gY29tYmluZSB0aGUgcGxlYXNhbnQgYW5kIHRoZSB1c2VmdWwsIGVpdGhlciBhdCB3b3JrIG9yIGF0IGhvbWUuIDwvcD4=",
"link_rewrite": "stationery",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -136,7 +129,6 @@
"description": "PHA+RGV0YWlscyBtYXR0ZXIhIExpdmVuIHVwIHlvdXIgaW50ZXJpb3Igd2l0aCBvdXIgc2VsZWN0aW9uIG9mIGhvbWUgYWNjZXNzb3JpZXMuIDwvcD4=",
"link_rewrite": "home-accessories",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand All @@ -154,7 +146,6 @@
"description": "PHA+RnJhbWVkIHBvc3RlciBhbmQgdmVjdG9yIGltYWdlcywgYWxsIHlvdSBuZWVkIHRvIGdpdmUgcGVyc29uYWxpdHkgdG8geW91ciB3YWxscyBvciBicmluZyB5b3VyIGNyZWF0aXZlIHByb2plY3RzIHRvIGxpZmUuPC9wPg==",
"link_rewrite": "art",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"iso_code": "en",
"created_at": "2024-06-10T02:27:30+0200",
Expand Down
2 changes: 0 additions & 2 deletions e2e/src/fixtures/9/apiManufacturers/manufacturers.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"description": "<p>Studio Design offers a range of items from ready-to-wear collections to contemporary objects. The brand has been presenting new ideas and trends since its creation in 2012.</p>",
"short_description": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"id_shop": 1
}
Expand All @@ -30,7 +29,6 @@
"description": "<p>Since 2010, Graphic Corner offers a large choice of quality posters, available on paper and many other formats. </p>",
"short_description": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"id_shop": 1
}
Expand Down
2 changes: 0 additions & 2 deletions e2e/src/fixtures/9/apiSuppliers/suppliers.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"id_lang": 1,
"description": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"id_shop": 1
}
Expand All @@ -28,7 +27,6 @@
"id_lang": 1,
"description": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"id_shop": 1
}
Expand Down
7 changes: 6 additions & 1 deletion src/Repository/CategoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ public function getQueryForDebug($offset, $limit, $langIso)
private function addSelectParameters(\DbQuery $query)
{
$query->select('CONCAT(cs.id_category, "-", l.iso_code) as unique_category_id, cs.id_category');
$query->select('c.id_parent, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_keywords, cl.meta_description');
$query->select('c.id_parent, cl.name, cl.description, cl.link_rewrite, cl.meta_title, cl.meta_description');
$query->select('l.iso_code, c.date_add as created_at, c.date_upd as updated_at');

// REMOVED HERE: https://github.com/PrestaShop/PrestaShop/commit/f37a8f61017654bae160b528a1a2eaf49edbdac0
if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '9.0', '<')) {
$query->select('cl.meta_keywords');
}
}
}
7 changes: 6 additions & 1 deletion src/Repository/ManufacturerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public function getQueryForDebug($offset, $limit, $langIso)
private function addSelectParameters(\DbQuery $query)
{
$query->select('ma.id_manufacturer, ma.name, ma.date_add as created_at, ma.date_upd as updated_at, ma.active, mal.id_lang');
$query->select('mal.description, mal.short_description, mal.meta_title, mal.meta_keywords, mal.meta_description, mas.id_shop');
$query->select('mal.description, mal.short_description, mal.meta_title, mal.meta_description, mas.id_shop');

// REMOVED HERE: https://github.com/PrestaShop/PrestaShop/commit/f37a8f61017654bae160b528a1a2eaf49edbdac0
if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '9.0', '<')) {
$query->select('mal.meta_keywords');
}
}
}
7 changes: 6 additions & 1 deletion src/Repository/SupplierRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public function getQueryForDebug($offset, $limit, $langIso)
private function addSelectParameters(\DbQuery $query)
{
$query->select('su.id_supplier, su.name, su.date_add as created_at, su.date_upd as updated_at, su.active, sul.id_lang');
$query->select('sul.description, sul.meta_title, sul.meta_keywords, sul.meta_description, sus.id_shop');
$query->select('sul.description, sul.meta_title, sul.meta_description, sus.id_shop');

// REMOVED HERE: https://github.com/PrestaShop/PrestaShop/commit/f37a8f61017654bae160b528a1a2eaf49edbdac0
if (defined('_PS_VERSION_') && version_compare(_PS_VERSION_, '9.0', '<')) {
$query->select('sul.meta_keywords');
}
}
}

0 comments on commit 142b281

Please sign in to comment.