Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit 9fbce4a

Browse files
committed
Merge pull request #36 from ZiZuu-store/dev
Merge dev branch
2 parents 9272c54 + 07998a3 commit 9fbce4a

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# [PrestaShop module "ZiZuu SEO ToolKit"](https://github.com/ZiZuu-store/zzSEOtk)
22

33
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/30806e55-0fe6-4323-ade1-fba266db8b4e/mini.png)](https://insight.sensiolabs.com/projects/30806e55-0fe6-4323-ade1-fba266db8b4e)
4+
45
[![Join the chat at https://gitter.im/ZiZuu-store/zzSEOtk](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ZiZuu-store/zzSEOtk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
56

67
Handles a few basic SEO related improvements such as:
78
* "hreflang"
89
* "canonical"
910
* "noindex"
1011

11-
Being reported to work on **PS >= 1.6.0.9** .. but it should work on PS 1.6.x.x too
12+
Being reported to work on **PS >= 1.6.0.9** .. but it should work on PS 1.6.x.x too and *could work* on PS >= 1.5.0.1
1213

1314
For production use the **latest stable [release](https://github.com/ZiZuu-store/zzSEOtk/releases/)**
1415

zzseotk.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
return;
1818
}
1919

20-
class zzSeoTK extends Module
20+
class zzseotk extends Module
2121
{
2222
private $_controller;
2323

@@ -74,7 +74,7 @@ public function __construct()
7474
$this->tab = 'seo';
7575
$this->version = '1.1.5';
7676
$this->need_instance = 0;
77-
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
77+
$this->ps_versions_compliancy = array('min' => '1.5.0.1', 'max' => _PS_VERSION_);
7878
$this->bootstrap = true;
7979

8080
parent::__construct();
@@ -321,12 +321,15 @@ private function _getCanonicalLink($id_lang = null, $id_shop = null, $add_qs = t
321321
$canonical = $link->getCategoryLink($id, null, $id_lang, Tools::getValue('selected_filters', null), $id_shop);
322322
break;
323323
case 'cms':
324-
// getCMSLink($cms, $alias = null, $ssl = null, $id_lang = null, $id_shop = null, $relative_protocol = false)
325-
$canonical = $link->getCmsLink($id, null, null, $id_lang, $id_shop);
324+
if ($cat_id = (int)Tools::getValue('id_cms_category')) {
325+
// getCMSCategoryLink($cms_category, $alias = null, $id_lang = null, $id_shop = null, $relative_protocol = false)
326+
$canonical = $link->getCMSCategoryLink($cat_id, null, $id_lang, $id_shop);
327+
} else {
328+
// getCMSLink($cms, $alias = null, $ssl = null, $id_lang = null, $id_shop = null, $relative_protocol = false)
329+
$canonical = $link->getCmsLink($id, null, null, $id_lang, $id_shop);
330+
}
326331
break;
327332

328-
case 'cms-category':
329-
// getCMSCategoryLink ($cms_category, $alias = null, $id_lang = null, $id_shop = null, $relative_protocol = false)
330333
case 'supplier':
331334
// getSupplierLink ($supplier, $alias = null, $id_lang = null, $id_shop = null, $relative_protocol = false)
332335
case 'manufacturer':

0 commit comments

Comments
 (0)