From d9bb990042117f8449f9877f8cee621fcd801e6f Mon Sep 17 00:00:00 2001
From: Froxlor Customer
Date: Mon, 13 Aug 2018 09:32:42 +0200
Subject: [PATCH 01/15] add customer_account sites to changeRobots function and
setTitle function, for better Title and Robots SEO
---
.../Creare/CreareSeoCore/Model/Observer.php | 83 ++++++++++---------
1 file changed, 44 insertions(+), 39 deletions(-)
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Observer.php b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
index a61bda5..4174c5b 100644
--- a/app/code/community/Creare/CreareSeoCore/Model/Observer.php
+++ b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
@@ -23,12 +23,11 @@ public function changeRobots($observer)
$page = $action->getFullActionName();
$layout = $observer->getEvent()->getLayout();
- switch ($page)
- {
+ switch ($page) {
case "catalog_category_view" :
if ($this->helper->getConfig("noindexparams")
- && parse_url($action->getRequest()->getRequestUri(), PHP_URL_QUERY)) {
+ && parse_url($action->getRequest()->getRequestUri(), PHP_URL_QUERY)) {
$this->setRobots($layout);
}
@@ -54,6 +53,8 @@ public function changeRobots($observer)
case "customer_account_login" :
case "customer_account_create" :
+ case "customer_account_forgotpassword" :
+ case "customer_account_changeforgotten" :
if ($this->helper->getConfig("noindexparamsaccount")) {
$this->setRobots($layout);
}
@@ -116,31 +117,32 @@ public function discontinuedCheck($observer)
/* The function to remove the meta keywords tag */
- public function applyTag($observer) {
+ public function applyTag($observer)
+ {
if ($this->helper->getConfig('metakw')) {
$body = $observer->getResponse()->getBody();
if (strpos(strtolower($body), 'meta name="keywords"') !== false) {
$body = preg_replace('{(]*?>\n)}i', '', $body);
-
+
}
if (strpos(strtolower($body), 'meta name="description" content=""') !== false) {
$body = preg_replace('{(]*?>\n)}i', '', $body);
}
-
+
$observer->getResponse()->setBody($body);
}
}
/* Replaces category name with heading on category pages */
- public function seoHeading($observer) {
-
+ public function seoHeading($observer)
+ {
+
$category = $observer->getEvent()->getCategory();
$category->setOriginalName($category->getName());
if ($this->helper->getConfig("category_h1")
- && $category->getData('creareseo_heading'))
- {
+ && $category->getData('creareseo_heading')) {
$category->setName($category->getCreareseoHeading());
}
}
@@ -197,9 +199,9 @@ public function forceProductCanonical(Varien_Event_Observer $observer)
return;
}
// Maintain querystring if one is set (to maintain tracking URLs such as gclid)
- $product = $observer->getEvent()->getProduct();
- $query = Mage::app()->getRequest()->getQuery();
- $url = $product->getUrlModel()
+ $product = $observer->getEvent()->getProduct();
+ $query = Mage::app()->getRequest()->getQuery();
+ $url = $product->getUrlModel()
->getUrl($product, array('_ignore_category' => true, '_query' => $query));
$escapedUrl = Mage::helper('core/url')->escapeUrl($url);
if (Mage::helper('core/url')->getCurrentUrl() != $escapedUrl) {
@@ -210,7 +212,7 @@ public function forceProductCanonical(Varien_Event_Observer $observer)
}
/* Adds the page title and meta description to the contact page's */
-
+
public function contactsMetaData(Varien_Event_Observer $observer)
{
$route = $observer->getEvent()->getAction()->getRequest()->getRouteName();
@@ -237,7 +239,7 @@ public function forceHomepageTitle($observer)
$actionName = $observer->getEvent()->getAction()->getFullActionName();
if ($actionName !== "cms_index_index"
- || !$this->helper->getConfig('forcehptitle')) {
+ || !$this->helper->getConfig('forcehptitle')) {
return false;
}
@@ -254,13 +256,17 @@ public function forceHomepageTitle($observer)
}
/* On relevant pages, will override the page title with the fallback if one isn't set in the editor */
-
+
public function setTitle($observer)
{
$actionName = $observer->getEvent()->getAction()->getFullActionName();
if ($actionName === "cms_index_index"
- || $actionName === "contacts_index_index") {
+ || $actionName === "contacts_index_index"
+ || $actionName === "customer_account_login"
+ || $actionName === "customer_account_create"
+ || $actionName === "customer_account_forgotpassword"
+ || $actionName === "customer_account_changeforgotten") {
return false;
}
@@ -275,7 +281,7 @@ public function setTitle($observer)
}
/* On relevant pages, will override the meta desc with the fallback if one isn't set in the editor */
-
+
public function setDescription($observer)
{
$actionName = $observer->getEvent()->getAction()->getFullActionName();
@@ -287,38 +293,38 @@ public function setDescription($observer)
$layout = $observer->getEvent()->getLayout();
$description = $this->getDescription();
- if($description) {
+ if ($description) {
if ($head = $layout->getBlock('head')) {
$head->setDescription($description);
}
}
}
-
- public function getDefaultTitle()
+
+ public function getDefaultTitle()
{
return Mage::getStoreConfig('design/head/default_title');
}
-
+
public function getTitle()
{
$pagetype = $this->metaHelper()->getPageType();
-
+
if ($pagetype !== false) {
-
+
if ($pagetype->_code != "cms") {
if (!$pagetype->_model->getMetaTitle()) {
$this->_data['title'] = $this->setConfigTitle($pagetype->_code);
} else {
$this->_data['title'] = $pagetype->_model->getMetaTitle();
}
- } else if($pagetype !== false && $pagetype->_code == "cms"){
+ } else if ($pagetype !== false && $pagetype->_code == "cms") {
$this->_data['title'] = $pagetype->_model->getTitle();
}
if (empty($this->_data['title'])) {
// check if it's a category or product and default to name.
- if($pagetype->_code == "category" || $pagetype->_code == "product"){
+ if ($pagetype->_code == "category" || $pagetype->_code == "product") {
$this->_data['title'] = $pagetype->_model->getName();
} else {
$this->_data['title'] = $this->getDefaultTitle();
@@ -327,29 +333,29 @@ public function getTitle()
} else {
$this->_data['title'] = $this->getDefaultTitle();
}
-
+
return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));
}
-
+
public function setConfigTitle($pagetype)
{
- if ($this->metaHelper()->config($pagetype.'_title_enabled')) {
+ if ($this->metaHelper()->config($pagetype . '_title_enabled')) {
return $this->metaHelper()->getDefaultTitle($pagetype);
}
}
-
+
public function setConfigMetaDescription($pagetype)
{
- if ($this->metaHelper()->config($pagetype.'_metadesc_enabled')) {
+ if ($this->metaHelper()->config($pagetype . '_metadesc_enabled')) {
return $this->metaHelper()->getDefaultMetaDescription($pagetype);
}
}
-
-
+
+
public function getDescription()
{
$pagetype = $this->metaHelper()->getPageType();
-
+
if ($pagetype !== false) {
if (!$pagetype->_model->getMetaDescription()) {
$this->_data['description'] = $this->setConfigMetaDescription($pagetype->_code);
@@ -357,18 +363,18 @@ public function getDescription()
$this->_data['description'] = $pagetype->_model->getMetaDescription();
}
}
-
+
if (empty($this->_data['description'])) {
$this->_data['description'] = "";
}
return $this->_data['description'];
}
-
+
public function metaHelper()
{
return Mage::helper('creareseocore/meta');
}
-
+
public function setMandatoryAltTag($observer)
{
if ($this->helper->getConfig('mandatory_alt')) {
@@ -382,8 +388,7 @@ public function setUA($observer)
{
$magentoVersion = Mage::getVersion();
- if (Mage::getStoreConfig('creareseocore/googleanalytics/type') && version_compare($magentoVersion, '1.9.1', '<'))
- {
+ if (Mage::getStoreConfig('creareseocore/googleanalytics/type') && version_compare($magentoVersion, '1.9.1', '<')) {
$layout = $observer->getEvent()->getLayout();
$layout->getUpdate()->addUpdate('');
$layout->generateXml();
From 21f5318def3e7db93e11ecb0a6831f13812660ef Mon Sep 17 00:00:00 2001
From: Froxlor Customer
Date: Mon, 13 Aug 2018 09:37:21 +0200
Subject: [PATCH 02/15] change composer.json for own upload
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 90c1fd9..b88d9ae 100644
--- a/composer.json
+++ b/composer.json
@@ -1,5 +1,5 @@
{
- "name": "creare/creare-seo",
+ "name": "sickdaflip/creare-seo",
"type": "magento-module",
"homepage": "http://www.magentocommerce.com/magento-connect/creare-seo.html",
"description": "This extension provides fixes and features to Magento that will help improve its overall SEO performance.",
From 0558ba9acf84bc7b8ea53235c36e6edbb6f5aa0a Mon Sep 17 00:00:00 2001
From: Froxlor Customer
Date: Mon, 13 Aug 2018 09:46:52 +0200
Subject: [PATCH 03/15] add catalogsearch_result_index to changeRobots function
and setTitle function, for better Title and Robots SEO
---
app/code/community/Creare/CreareSeoCore/Model/Observer.php | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Observer.php b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
index 4174c5b..cdb184c 100644
--- a/app/code/community/Creare/CreareSeoCore/Model/Observer.php
+++ b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
@@ -25,12 +25,10 @@ public function changeRobots($observer)
switch ($page) {
case "catalog_category_view" :
-
if ($this->helper->getConfig("noindexparams")
&& parse_url($action->getRequest()->getRequestUri(), PHP_URL_QUERY)) {
$this->setRobots($layout);
}
-
break;
case "catalogsearch_result_index" :
@@ -266,7 +264,8 @@ public function setTitle($observer)
|| $actionName === "customer_account_login"
|| $actionName === "customer_account_create"
|| $actionName === "customer_account_forgotpassword"
- || $actionName === "customer_account_changeforgotten") {
+ || $actionName === "customer_account_changeforgotten"
+ || $actionName === "catalogsearch_result_index") {
return false;
}
From 04e74877dae2cc3b3b30e98a128c47910e82c488 Mon Sep 17 00:00:00 2001
From: Froxlor Customer
Date: Fri, 24 Aug 2018 08:22:55 +0200
Subject: [PATCH 04/15] category attributes rel=next/prev as system-config
yes/no to avoidance of overlap with other modules
---
.../Creare/CreareSeoCore/etc/config.xml | 1 +
.../Creare/CreareSeoCore/etc/system.xml | 9 ++++
.../creareseo/category/pagination.phtml | 46 +++++++++----------
3 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/app/code/community/Creare/CreareSeoCore/etc/config.xml b/app/code/community/Creare/CreareSeoCore/etc/config.xml
index de04f75..a1484a8 100644
--- a/app/code/community/Creare/CreareSeoCore/etc/config.xml
+++ b/app/code/community/Creare/CreareSeoCore/etc/config.xml
@@ -245,6 +245,7 @@
011
+ 011http://
diff --git a/app/code/community/Creare/CreareSeoCore/etc/system.xml b/app/code/community/Creare/CreareSeoCore/etc/system.xml
index 9ee61b3..9addf09 100644
--- a/app/code/community/Creare/CreareSeoCore/etc/system.xml
+++ b/app/code/community/Creare/CreareSeoCore/etc/system.xml
@@ -128,6 +128,15 @@
11
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 55
+ 1
+ 1
+ 1
+ select
diff --git a/app/design/frontend/base/default/template/creareseo/category/pagination.phtml b/app/design/frontend/base/default/template/creareseo/category/pagination.phtml
index add4881..5f44a73 100644
--- a/app/design/frontend/base/default/template/creareseo/category/pagination.phtml
+++ b/app/design/frontend/base/default/template/creareseo/category/pagination.phtml
@@ -1,34 +1,34 @@
getProductCollection()->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)));
- $tool = $this->getLayout()->createBlock('page/html_pager')->setLimit($this->getLayout()->createBlock('catalog/product_list_toolbar')->getLimit())->setCollection($prodCol);
- $linkPrev = false;
- $linkNext = false;
- if ($tool->getCollection()->getSelectCountSql()) {
- if ($tool->getLastPageNum() > 1) {
- if (!$tool->isFirstPage()) {
- $linkPrev = true;
- if ($tool->getCurrentPage() == 2) {
- $url = explode('?', $tool->getPreviousPageUrl());
- $prevUrl = @$url[0];
+$config = Mage::getStoreConfig('creareseocore/defaultseo/forcerel');
+if($config) {
+ $category = Mage::registry('current_category');
+ if ($category) {
+ $prodCol = $category->getProductCollection()->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)));
+ $tool = $this->getLayout()->createBlock('page/html_pager')->setLimit($this->getLayout()->createBlock('catalog/product_list_toolbar')->getLimit())->setCollection($prodCol);
+ $linkPrev = false;
+ $linkNext = false;
+ if ($tool->getCollection()->getSelectCountSql()) {
+ if ($tool->getLastPageNum() > 1) {
+ if (!$tool->isFirstPage()) {
+ $linkPrev = true;
+ if ($tool->getCurrentPage() == 2) {
+ $url = explode('?', $tool->getPreviousPageUrl());
+ $prevUrl = @$url[0];
+ } else {
+ $prevUrl = $tool->getPreviousPageUrl();
+ }
}
- else {
- $prevUrl = $tool->getPreviousPageUrl();
+ if (!$tool->isLastPage()) {
+ $linkNext = true;
+ $nextUrl = $tool->getNextPageUrl();
}
}
- if (!$tool->isLastPage()) {
- $linkNext = true;
- $nextUrl = $tool->getNextPageUrl();
- }
}
+ if ($linkPrev) echo '';
+ if ($linkNext) echo '';
}
- if ($linkPrev) echo '';
- if ($linkNext) echo '';
}
?>
From 59602a59cdd5dc17ac16f467ccb15cfb68638e91 Mon Sep 17 00:00:00 2001
From: Froxlor Customer
Date: Mon, 1 Oct 2018 14:13:23 +0200
Subject: [PATCH 05/15] change sitemap
---
LICENSE | 339 ++++++
README.md | 92 ++
.../CreareSeoCore/Block/Adminhtml/Check.php | 11 +
.../Adminhtml/System/Config/Fieldset/Info.php | 27 +
.../Block/Googleanalytics/Ua.php | 98 ++
.../Block/Page/Html/Head/Cmscanonical.php | 59 ++
.../CreareSeoCore/Block/Schema/Product.php | 63 ++
.../CreareSeoCore/Block/Schema/Social.php | 21 +
.../Creare/CreareSeoCore/Helper/Data.php | 204 ++++
.../Creare/CreareSeoCore/Helper/Meta.php | 138 +++
.../Creare/CreareSeoCore/Model/Cleanup.php | 180 ++++
.../Creare/CreareSeoCore/Model/Observer.php | 397 +++++++
.../CreareSeoCore/Model/Sitemap/Image.php | 79 ++
.../CreareSeoCore/Model/Sitemap/Sitemap.php | 104 ++
.../Model/Source/AnalyticsType.php | 11 +
.../CreareSeoCore/Model/Source/Protocols.php | 11 +
.../Adminhtml/CreareseoController.php | 16 +
.../Creare/CreareSeoCore/etc/adminhtml.xml | 90 ++
.../Creare/CreareSeoCore/etc/config.xml | 306 ++++++
.../Creare/CreareSeoCore/etc/system.xml | 991 ++++++++++++++++++
.../creareseo_setup/mysql4-install-1.0.0.php | 20 +
.../mysql4-upgrade-1.0.0-1.0.1.php | 58 +
.../Creare/CreareSeoSitemap/Block/Sitemap.php | 199 ++++
.../Creare/CreareSeoSitemap/Helper/Data.php | 11 +
.../controllers/IndexController.php | 12 +
.../Creare/CreareSeoSitemap/etc/adminhtml.xml | 24 +
.../Creare/CreareSeoSitemap/etc/config.xml | 51 +
.../Creare/CreareSeoSitemap/etc/system.xml | 106 ++
.../default/layout/creareseo_admin.xml | 25 +
.../catalog/product/helper/gallery.phtml | 100 ++
.../default/template/creareseo/check.phtml | 413 ++++++++
.../system/config/fieldset/info.phtml | 16 +
.../base/default/layout/creareseo.xml | 97 ++
.../base/default/layout/creareseo_sitemap.xml | 11 +
.../template/creareseo/business/schema.phtml | 16 +
.../creareseo/category/pagination.phtml | 34 +
.../creareseo/google/contentgrouping.phtml | 2 +
.../creareseo/google/googletagmanager.phtml | 11 +
.../creareseo/google/sitelinkssearch.phtml | 13 +
.../template/creareseo/google/ua.phtml | 20 +
.../template/creareseo/logo/schema.phtml | 9 +
.../creareseo/page/html/breadcrumbs.phtml | 44 +
.../page/html/head/cmscanonical.phtml | 5 +
.../template/creareseo/product/schema.phtml | 93 ++
.../template/creareseo/sitemap/sitemap.phtml | 30 +
.../template/creareseo/social/schema.phtml | 14 +
.../template/creareseo/social/social.phtml | 31 +
app/etc/modules/Creare_CreareSeoCore.xml | 8 +
app/etc/modules/Creare_CreareSeoSitemap.xml | 12 +
app/locale/en_US/Creare_CreareSeoCore.csv | 77 ++
app/locale/pt_BR/Creare_CreareSeoCore.csv | 77 ++
composer.json | 16 +
creareseo-checklist.png | Bin 0 -> 371987 bytes
js/creareseo/creareseo_admin.js | 36 +
modman | 11 +
.../default/creareseo/creareseo-admin.css | 1 +
56 files changed, 4940 insertions(+)
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Adminhtml/Check.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Adminhtml/System/Config/Fieldset/Info.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Googleanalytics/Ua.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Page/Html/Head/Cmscanonical.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Schema/Product.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Block/Schema/Social.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Helper/Data.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Helper/Meta.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Cleanup.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Observer.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Sitemap/Image.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Sitemap/Sitemap.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Source/AnalyticsType.php
create mode 100644 app/code/community/Creare/CreareSeoCore/Model/Source/Protocols.php
create mode 100644 app/code/community/Creare/CreareSeoCore/controllers/Adminhtml/CreareseoController.php
create mode 100644 app/code/community/Creare/CreareSeoCore/etc/adminhtml.xml
create mode 100644 app/code/community/Creare/CreareSeoCore/etc/config.xml
create mode 100644 app/code/community/Creare/CreareSeoCore/etc/system.xml
create mode 100644 app/code/community/Creare/CreareSeoCore/sql/creareseo_setup/mysql4-install-1.0.0.php
create mode 100644 app/code/community/Creare/CreareSeoCore/sql/creareseo_setup/mysql4-upgrade-1.0.0-1.0.1.php
create mode 100644 app/code/community/Creare/CreareSeoSitemap/Block/Sitemap.php
create mode 100644 app/code/community/Creare/CreareSeoSitemap/Helper/Data.php
create mode 100644 app/code/community/Creare/CreareSeoSitemap/controllers/IndexController.php
create mode 100644 app/code/community/Creare/CreareSeoSitemap/etc/adminhtml.xml
create mode 100644 app/code/community/Creare/CreareSeoSitemap/etc/config.xml
create mode 100644 app/code/community/Creare/CreareSeoSitemap/etc/system.xml
create mode 100644 app/design/adminhtml/default/default/layout/creareseo_admin.xml
create mode 100644 app/design/adminhtml/default/default/template/creareseo/catalog/product/helper/gallery.phtml
create mode 100644 app/design/adminhtml/default/default/template/creareseo/check.phtml
create mode 100644 app/design/adminhtml/default/default/template/creareseo/system/config/fieldset/info.phtml
create mode 100644 app/design/frontend/base/default/layout/creareseo.xml
create mode 100644 app/design/frontend/base/default/layout/creareseo_sitemap.xml
create mode 100644 app/design/frontend/base/default/template/creareseo/business/schema.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/category/pagination.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/google/contentgrouping.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/google/googletagmanager.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/google/sitelinkssearch.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/google/ua.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/logo/schema.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/page/html/breadcrumbs.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/page/html/head/cmscanonical.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/product/schema.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/sitemap/sitemap.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/social/schema.phtml
create mode 100644 app/design/frontend/base/default/template/creareseo/social/social.phtml
create mode 100644 app/etc/modules/Creare_CreareSeoCore.xml
create mode 100644 app/etc/modules/Creare_CreareSeoSitemap.xml
create mode 100644 app/locale/en_US/Creare_CreareSeoCore.csv
create mode 100644 app/locale/pt_BR/Creare_CreareSeoCore.csv
create mode 100644 composer.json
create mode 100644 creareseo-checklist.png
create mode 100644 js/creareseo/creareseo_admin.js
create mode 100644 modman
create mode 100644 skin/adminhtml/default/default/creareseo/creareseo-admin.css
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..22fbe5d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {description}
+ Copyright (C) {year} {fullname}
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ {signature of Ty Coon}, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..928b6a0
--- /dev/null
+++ b/README.md
@@ -0,0 +1,92 @@
+## Latest Version
+
+1.5 - https://adammoss.co.uk/magentofox/magento-creareseo-1-5/
+
+## About CreareSEO for Magento
+
+This is a free Magento extension has a range of features that helps Magento become more compliant with the latest search engine standards. The ultimate aim is for your store to rank better in Google by making small adjustments to your store's configuration.
+
+**This extension is no longer available on Magento Connect.**
+
+### Compatibility
+
+Magento Community Edition 1.4 to 1.9
+Tested successfully in most versions of Enterprise Edition
+
+### Installation
+
+1. Unpack the extension ZIP file in your Magento root directory
+2. Clear the Magento cache: **System > Cache Management**
+3. Log out the Magento admin and log back in to clear the ACL list
+4. Recompile if you are using the Magento Compiler
+
+### Usage
+
+Our official [supporting blog post](http://www.creare.co.uk/creare-seo-magento-extension) contains a video and further instructions on how to use verion 1 of the extension. However, since the video was recorded we have made many improvements and added many new features.
+
+Most settings can be configured in **System > CreareSEO > General Settings**
+
+The CreareSEO Checklist page can be accessed via **System > CreareSEO > CreareSEO Checklist**.
+
+This page will check and make recommendations on various configuration settings within Magento and CreareSEO that should or shouldn't be enabled in order to maximise SEO performance.
+
+![CreareSEO Checklist](https://github.com/adampmoss/CreareSEO/blob/master/creareseo-checklist.png)
+
+### Features
+
+Below is a list of the current features available within the extension. Our team of SEO experts are always up-to-date with the latest search engine standards and requirements, so this list will continue to grow over time.
+
+|Feature|Version|
+|---|---|
+|CreareSEO Checklist Page|1.0|
+|HTML Sitemap|1.0|
+|Remove meta keywords tags|1.0|
+|Remove empty meta description tags|1.0|
+|NOINDEX,FOLLOW on category filters and pagination|1.0|
+|Custom category headings|1.0|
+|Disabled product redirects|1.0|
+|Breadcrumbs structured data|1.0|
+|Hide 'duplicate product' button _(deprecated)_|1.0|
+|Twitter cards on product pages|1.0|
+|OpenGraph data on product pages|1.0|
+|.htaccess editor via configuration|1.0|
+|robots.txt editor via configuration (multisite compatible)|1.0|
+|Canonical product redirects|1.0|
+|Custom contact page title and meta description|1.0|
+|Default product page title and meta description templates|1.0|
+|Default category page title and meta description templates|1.0|
+|Default CMS meta description templates|1.0|
+|Next/Prev meta elements on category pages for pagination|1.1|
+|Force page title for homepage|1.1|
+|NOINDEX robots tag added to media gallery pages|1.1|
+|NOINDEX robots tag added to search results pages|1.1|
+|Universal Analytics support for older Magento versions|1.2|
+|SiteLinks Search added to homepage|1.2|
+|Mandatory product image label validation|1.2|
+|Product structured data|1.3|
+|Social structured data|1.3|
+|Product/Category/CMS support for Google Content Grouping|1.3|
+|Google Tag Manager support|1.3|
+|Canonical meta tags for CMS pages|1.4|
+|Logo structured data|1.4|
+|Organization structured data|1.4|
+
+### Support
+
+Go [here](http://creareseo.custservhq.com/articles/frequently-asked-questions) to see a list of issues that we have come across and we have found a solution to. If you have any other issues with this extension, please [open an issue](https://github.com/adampmoss/CreareSEO/issues) on GitHub.
+
+### Disable the Module
+
+To disable the module open **app/etc/modules/Creare_CreareSeoCore.xml** and **app/etc/modules/Creare_CreareSeoSitemap.xml** and in both files change this:
+
+ true
+to this:
+
+ false
+
+After doing this, clear the cache and reindex your data.
+
+### Developers
+
+- Adam Moss ([@adampmoss](https://twitter.com/adampmoss))
+- Robert Kent ([@kent_robert](https://twitter.com/kent_robert)) (previous)
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/Check.php b/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/Check.php
new file mode 100644
index 0000000..71ef847
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/Check.php
@@ -0,0 +1,11 @@
+setTemplate('dashboard/index.phtml');
+
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/System/Config/Fieldset/Info.php b/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/System/Config/Fieldset/Info.php
new file mode 100644
index 0000000..40029bf
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Adminhtml/System/Config/Fieldset/Info.php
@@ -0,0 +1,27 @@
+toHtml();
+ }
+
+ protected function getModuleVersion() {
+ return (string) Mage::getConfig()->getNode('modules/Creare_CreareSeoCore/version');
+ }
+
+ protected function getCreareHelpDesk() {
+ return (string) "http://creareseo.custservhq.com/";
+ }
+
+ protected function getCreareBlogPost() {
+ return (string) "https://www.creare.co.uk/creare-seo-magento-extension";
+ }
+
+ protected function getGitHubPage() {
+ return (string) "https://github.com/Creare/CreareSEO";
+ }
+ }
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Googleanalytics/Ua.php b/app/code/community/Creare/CreareSeoCore/Block/Googleanalytics/Ua.php
new file mode 100644
index 0000000..b6881b3
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Googleanalytics/Ua.php
@@ -0,0 +1,98 @@
+isGoogleAnalyticsAvailable()) {
+ return '';
+ }
+ else {
+
+ $accountId = Mage::getStoreConfig(Mage_GoogleAnalytics_Helper_Data::XML_PATH_ACCOUNT);
+
+ $html = "\r\n
+
+\r\n";
+
+ return $html;
+
+ }
+ }
+
+ protected function getOrderIds()
+ {
+ return array(Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastOrderId());
+ }
+
+ /* Universal Analytics script for ecommerce orders */
+
+ protected function _getOrdersTrackingCode()
+ {
+ $orderIds = $this->getOrderIds();
+ if (empty($orderIds) || !is_array($orderIds)) {
+ return;
+ }
+ $collection = Mage::getResourceModel('sales/order_collection')
+ ->addFieldToFilter('entity_id', array('in' => $orderIds))
+ ;
+ $result = array();
+
+ $result[] = "ga('require', 'ecommerce');";
+
+ foreach ($collection as $order) {
+ if ($order->getIsVirtual()) {
+ $address = $order->getBillingAddress();
+ } else {
+ $address = $order->getShippingAddress();
+ }
+ $result[] = "ga('ecommerce:addTransaction', {
+ 'id': '".$order->getIncrementId()."',
+ 'affiliation': '".$this->jsQuoteEscape(Mage::app()->getStore()->getFrontendName())."',
+ 'revenue': '".$order->getBaseGrandTotal()."',
+ 'shipping': '".$order->getBaseShippingAmount()."',
+ 'tax': '".$order->getBaseTaxAmount()."'
+ });";
+ foreach ($order->getAllVisibleItems() as $item) {
+
+ $result[] = "ga('ecommerce:addItem', {
+ 'id': '".$order->getIncrementId()."',
+ 'name': '".$this->jsQuoteEscape($item->getName())."',
+ 'sku': '".$this->jsQuoteEscape($item->getSku())."',
+ 'price': '".$item->getBasePrice()."',
+ 'quantity': '".$item->getQtyOrdered()."'
+ });";
+ }
+ $result[] = "ga('ecommerce:send');";
+ }
+ return implode("\n", $result);
+ }
+
+ public function enableDemographics()
+ {
+ return Mage::getStoreConfig('creareseocore/googleanalytics/enable_demographics');
+ }
+
+ public function getAdditionalTrackingCode()
+ {
+ return Mage::getStoreConfig('creareseocore/googleanalytics/additional_tracking_code');
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Page/Html/Head/Cmscanonical.php b/app/code/community/Creare/CreareSeoCore/Block/Page/Html/Head/Cmscanonical.php
new file mode 100644
index 0000000..c3aa815
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Page/Html/Head/Cmscanonical.php
@@ -0,0 +1,59 @@
+getIdentifier();
+ $isHomePage = Mage::app()->getFrontController()->getAction()->getFullActionName() == 'cms_index_index';
+ if($isHomePage){
+ $canonicalUrl = Mage::getBaseUrl();
+ } else {
+ $canonicalUrl = Mage::getBaseUrl().$cmsPagePath;
+ }
+ $protocol = $this->creareseoHelper()->getConfig('cms_canonical_protocol');
+
+ $canonicalUrl = str_replace(
+ array("http://", "https://"),
+ $protocol,
+ $canonicalUrl
+ );
+
+ if (Mage::helper('core')->isModuleEnabled('Wyomind_Cmstree') && ! $isHomePage) {
+ $canonicalUrl .= Mage::helper('cmstree')->getUrlSuffix();
+ }
+
+ $addSlash = $this->creareseoHelper()->getConfig('cms_canonical_slashes');
+
+ if ($addSlash) {
+ $canonicalUrl .= substr($canonicalUrl, -1) !== '/'
+ ? "/"
+ : "";
+ } else {
+ $canonicalUrl = substr($canonicalUrl, -1) == '/'
+ ? substr($canonicalUrl, 0, -1)
+ : $canonicalUrl;
+ }
+
+ $result = new Varien_Object();
+ $result->setData('canonical', $canonicalUrl);
+ Mage::dispatchEvent('creareseocore_canonical', array(
+ 'result' => $result,
+ 'cms_page_identifier' => $cmsPagePath,
+ 'protocol' => $protocol,
+ 'add_slash' => $addSlash,
+ 'is_homepage' => $isHomePage
+ ));
+ $canonicalUrl = $result->getData('canonical');
+
+ return $canonicalUrl;
+ }
+
+ /**
+ * @return Creare_CreareSeoSitemap_Helper_Data
+ */
+ public function creareseoHelper()
+ {
+ return Mage::helper("creareseocore");
+ }
+}
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Schema/Product.php b/app/code/community/Creare/CreareSeoCore/Block/Schema/Product.php
new file mode 100644
index 0000000..98e4cd0
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Schema/Product.php
@@ -0,0 +1,63 @@
+getStore()->getCurrentCurrencyCode();
+ }
+
+ public function getCurrencySymbol()
+ {
+ return Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();
+ }
+
+ public function getProductReviews()
+ {
+ if (!Mage::helper('core')->isModuleEnabled('Mage_Review')) {
+ return array(); //keep PHP 5.3 compatibility
+ }
+
+ return $this->_productReviews = Mage::getModel('review/review')->getCollection()
+ ->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED)
+ ->addEntityFilter('product', $this->getProduct()->getId())
+ ->addStoreFilter(Mage::app()->getStore()->getId())
+ ->setDateOrder();
+ }
+
+ public function getReviewsCount()
+ {
+ return count($this->getProductReviews());
+ }
+
+ public function getAverageRating($reviewId)
+ {
+ $ratings = Mage::getModel('rating/rating_option_vote')
+ ->getResourceCollection()
+ ->setReviewFilter($reviewId)
+ ->setStoreFilter(Mage::app()->getStore()->getId())
+ ->load();
+
+ $total_rating = 0;
+ $rating_count = count($ratings);
+
+ if ($rating_count) {
+ foreach ($ratings as $rating) {
+ $total_rating += $rating->getValue();
+ }
+
+ $average_rating = round($total_rating / $rating_count, 1);
+
+ return $average_rating;
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Block/Schema/Social.php b/app/code/community/Creare/CreareSeoCore/Block/Schema/Social.php
new file mode 100644
index 0000000..26e8c41
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Block/Schema/Social.php
@@ -0,0 +1,21 @@
+_socialProfiles = explode("\n", Mage::getStoreConfig('creareseocore/social_schema/social_profiles'));
+ }
+
+ public function isEnabled()
+ {
+ return Mage::getStoreConfig('creareseocore/social_schema/enabled');
+ }
+
+ public function socialProfileCount()
+ {
+ return count($this->_socialProfiles);
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Helper/Data.php b/app/code/community/Creare/CreareSeoCore/Helper/Data.php
new file mode 100644
index 0000000..8d87ced
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Helper/Data.php
@@ -0,0 +1,204 @@
+getAttributeText('creareseo_discontinued');
+
+ // check to see if we want to redirect to a product / category / homepage
+ if($type === '301 Redirect to Category'){
+ $cats = $product->getCategoryIds();
+ if (is_array($cats) && count($cats) > 1) {
+ $cat = Mage::getModel('catalog/category')->load( $cats[0] );
+ return Mage::getUrl($cat->getUrlPath());
+ } else {
+ $cat = Mage::getModel('catalog/category')->load( $cats );
+ return Mage::getUrl($cat->getUrlPath());
+ }
+ }
+
+ if($type === '301 Redirect to Homepage'){
+ return Mage::getBaseUrl();
+ }
+
+ if($type === '301 Redirect to Product SKU'){
+
+ $sku = $product->getCreareseoDiscontinuedProduct();
+ if($sku){
+ $productUrl = Mage::getModel('catalog/product')->getCollection()
+ ->addAttributeToSelect('sku')
+ ->addFieldToFilter('sku',$sku)
+ ->getFirstItem()
+ ->getProductUrl();
+
+ if ($productUrl)
+ {
+ return $productUrl;
+ }
+
+ }
+ }
+
+ return false;
+
+ }
+
+ public function getDiscontinuedCategoryUrl($category){
+ if($category->getLevel() == 2){
+ if(!$category->getIsActive()){
+ return Mage::getBaseUrl();
+ } else {
+ return Mage::getBaseUrl().$category->getUrlPath();
+ }
+ } else if ($category->getParentId()) {
+ $parentCategory = Mage::getModel('catalog/category')->load($category->getParentId());
+ return $this->getDiscontinuedCategoryUrl($parentCategory);
+ }
+
+ }
+
+ public function getConfigPath()
+ {
+ return Mage::app()->getRequest()->getControllerName().'_'.Mage::app()->getRequest()->getParam('section');
+ }
+
+
+ /*
+ * On controller_action_predispatch called by saveConfigOnConfigLoad()
+ */
+
+ public function saveFileContentToConfig($file, $field)
+ {
+ $adminsession = Mage::getSingleton('adminhtml/session');
+ $io = new Varien_Io_File();
+ $io->open(array('path' => Mage::getBaseDir()));
+
+ if ($io->fileExists($file))
+ {
+ try
+ {
+ $contents = $io->read($file);
+ Mage::getModel('core/config')->saveConfig('creare'.$field.'/files/'.$field, $contents);
+
+ } catch(Mage_Core_Exception $e)
+ {
+ $adminsession->addError($e->getMessage());
+ }
+ } else {
+ $adminsession->addError($file." does not exist. Please create this file on your domain root to use this feature.");
+ }
+
+ $io->streamClose();
+ }
+
+ /*
+ * On admin_system_config_changed_section_ called by writeToFileOnConfigSave()
+ */
+
+ public function writeFile($file, $post, $field, $robots_location = '')
+ {
+ $adminsession = Mage::getSingleton('adminhtml/session');
+ $io = new Varien_Io_File();
+ $io->open(array('path' => Mage::getBaseDir().DS.$robots_location));
+
+ if ($io->fileExists($file))
+ {
+ if ($io->isWriteable($file))
+ {
+ try
+ {
+ $io->streamOpen($file);
+ $io->streamWrite($post);
+
+ } catch(Mage_Core_Exception $e)
+ {
+ $adminsession->addError($e->getMessage());
+ }
+ } else {
+
+ $adminsession->addError($file." is not writable. Change permissions to 644 to use this feature.");
+
+ }
+ } else {
+
+ $adminsession->addError($file." does not exist. The file was not saved.");
+ }
+
+ $io->streamClose();
+ }
+
+ public function isWriteable($file)
+ {
+ $io = new Varien_Io_File();
+ $io->open(array('path' => Mage::getBaseDir()));
+ return $io->isWriteable($file);
+ }
+
+ public function exists($file)
+ {
+ $io = new Varien_Io_File();
+ $io->open(array('path' => Mage::getBaseDir()));
+ return $io->fileExists($file);
+ }
+
+ public function robotstxt()
+ {
+ return 'robots.txt';
+ }
+
+ public function htaccess()
+ {
+ return '.htaccess';
+ }
+
+ public function checkDefaultStoreNames()
+ {
+ $stores = Mage::getModel('core/store')->getCollection();
+ foreach($stores as $store){
+ if($store->getName() == "Default Store View"){
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public function checkDefaultStoreGroupNames()
+ {
+ $storegroups = Mage::getModel('core/store_group')->getCollection();
+ foreach($storegroups as $storegroup){
+ if($storegroup->getName() == "Main Store"){
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public function checkDefaultWebsiteNames()
+ {
+ $websites = Mage::getModel('core/website')->getCollection();
+ foreach($websites as $website){
+ if($website->getName() == "Main Website"){
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public function getProductStartingprice($product)
+ {
+ if($product->getTypeId() === 'bundle')
+ {
+ return Mage::getModel('bundle/product_price')->getTotalPrices($product,'min',1);
+ }
+
+ return $product->getFinalPrice();
+ }
+
+}
diff --git a/app/code/community/Creare/CreareSeoCore/Helper/Meta.php b/app/code/community/Creare/CreareSeoCore/Helper/Meta.php
new file mode 100644
index 0000000..5ae780e
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Helper/Meta.php
@@ -0,0 +1,138 @@
+config($pagetype.'_title');
+ return $this->shortcode($title);
+ }
+
+ public function getDefaultMetaDescription($pagetype)
+ {
+ $metadesc = $this->config($pagetype.'_metadesc');
+ return $this->shortcode($metadesc);
+ }
+
+ public function getPageType()
+ {
+ $registry = new Varien_Object;
+
+ if (Mage::registry('current_product'))
+ {
+ $registry->_code = 'product';
+ $registry->_model = Mage::registry('current_product');
+
+ return $registry;
+
+ } elseif (Mage::registry('current_category'))
+ {
+ $registry->_code = 'category';
+ $registry->_model = Mage::registry('current_category');
+
+ return $registry;
+
+ } elseif (Mage::app()->getFrontController()->getRequest()->getRouteName() === 'cms')
+ {
+ $registry->_code = 'cms';
+ $registry->_model = Mage::getSingleton('cms/page');
+
+ return $registry;
+
+ } else {
+ return false;
+
+ }
+ }
+
+ public function config($path)
+ {
+ return Mage::getStoreConfig('creareseocore/metadata/'.$path);
+ }
+
+ public function shortcode($string)
+ {
+ $pagetype = $this->getPageType();
+
+ preg_match_all("/\[(.*?)\]/", $string, $matches);
+
+ for($i = 0; $i < count($matches[1]); $i++)
+ {
+ $tag = $matches[1][$i];
+
+ if ($tag === "store")
+ {
+ $string = str_replace($matches[0][$i], Mage::app()->getStore()->getName(), $string);
+ } else {
+
+ switch ($pagetype->_code)
+ {
+ case 'product' :
+ $attribute = $this->productAttribute($pagetype->_model, $tag);
+ break;
+
+ case 'category' :
+ $attribute = $this->attribute($pagetype->_model, $tag);
+ break;
+
+ case 'cms' :
+ $attribute = $this->attribute($pagetype->_model, $tag);
+ break;
+
+ }
+ $string = str_replace($matches[0][$i], $attribute, $string);
+ }
+ }
+
+ return $string;
+ }
+
+ public function productAttribute($product, $attribute)
+ {
+ $data = '';
+ if ($attribute == "categories" || $attribute == "first_category") {
+ $catIds = $product->getCategoryIds();
+
+ if (empty($catIds)) {
+ return $data;
+ }
+
+ $categories = Mage::getResourceModel('catalog/category_collection')
+ ->addAttributeToSelect('name')
+ ->addAttributeToFilter('entity_id', $catIds)
+ ->addIsActiveFilter();
+
+ if ($categories->count() < 1) {
+ return $data;
+ }
+
+ if ($attribute == "categories") {
+ $categoryNames = array();
+
+ foreach ($categories as $category) {
+ $categoryNames[] = $category->getName();
+ }
+
+ $data = implode(", ", $categoryNames);
+ }
+
+ if ($attribute == "first_category") {
+ $data = $categories->getFirstItem()->getName();
+ }
+ } else if ($product->getData($attribute)) {
+ $data = $product->getResource()
+ ->getAttribute($attribute)
+ ->getFrontend()
+ ->getValue($product);
+ }
+
+ return $data;
+ }
+
+ public function attribute($model, $attribute)
+ {
+ if ($model->getData($attribute))
+ {
+ return $model->getData($attribute);
+ }
+ }
+}
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Cleanup.php b/app/code/community/Creare/CreareSeoCore/Model/Cleanup.php
new file mode 100644
index 0000000..55750dc
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Cleanup.php
@@ -0,0 +1,180 @@
+cleanVar();
+ $this->cleanCache();
+ }
+
+ if(Mage::getStoreConfig('creareseocore/cleanup/logdb')){
+ $this->cleanDb();
+ }
+
+ if(Mage::getStoreConfig('creareseocore/cleanup/enablecache')){
+ $this->enableCache();
+ }
+
+ if(count($this->errors) > 0){
+ $this->sendEmail();
+ } else {
+ Mage::getConfig()->saveConfig('creareseocore/cleanup/success', date('Y-m-d, H:i:s'));
+ Mage::getConfig()->reinit();
+ Mage::app()->reinitStores();
+ }
+
+ }
+
+ protected function enableCache()
+ {
+ $model = Mage::getModel('core/cache');
+ $options = $model->canUse('');
+
+ foreach($options as $option=>$value) {
+ if ($options[$option] != 1)
+ {
+ $options[$option] = 1;
+ }
+ }
+
+ $model->saveOptions($options);
+ }
+
+ protected function cleanDb()
+ {
+ $tables = array(
+ 'dataflow_batch_export',
+ 'dataflow_batch_import',
+ /*'log_customer', removed this table as it clears the useful 'Last logged in' customer data */
+ 'log_quote',
+ 'log_summary',
+ 'log_summary_type',
+ 'log_url',
+ 'log_url_info',
+ 'log_visitor',
+ 'log_visitor_info',
+ 'log_visitor_online',
+ 'report_event'
+ );
+
+ $db = Mage::getSingleton('core/resource')->getConnection('read');
+ $prefix = Mage::getConfig()->getTablePrefix();
+ foreach($tables as $table){
+ $db->query('TRUNCATE '.$prefix.$table);
+ }
+
+ }
+
+ protected function cleanCache()
+ {
+ $dir = Mage::getBaseDir()."/var/cache/";
+ if(is_dir($dir)){
+ $this->removeContents($dir);
+ }
+ }
+
+ protected function cleanVar()
+ {
+ $dir = Mage::getBaseDir().'/var/session/';
+ $this->removeSessionContents($dir);
+ }
+
+ protected function removeContents($dir)
+ {
+
+ if(!opendir($dir)){
+ $this->errors[] = "Cannot open $dir";
+ }
+ $mydir = opendir($dir);
+ while(false !== ($file = readdir($mydir))) :
+
+ if($file != "." && $file != ".."){
+ chmod($dir.$file, 0777);
+ if(is_dir($dir.$file)) {
+ chdir('.');
+ $this->removeContents($dir.$file."/");
+
+ if(!rmdir($dir.$file)){
+ $this->errors[] = "Could not delete folder $dir$file";
+ }
+ } else {
+ chmod($dir.$file, 0777);
+ if(!unlink($dir.$file)){
+ $this->errors[] = "Could not delete file $dir$file";
+ }
+ }
+ }
+
+ endwhile;
+ closedir($mydir);
+ }
+
+ protected function removeSessionContents($dir)
+ {
+ if(!opendir($dir)){
+ $this->errors[] = "Cannot open $dir";
+ }
+ $mydir = opendir($dir);
+ while(false !== ($file = readdir($mydir))) :
+
+ if($file != "." && $file != ".."){
+ chmod($dir.$file, 0777);
+ if(is_dir($dir.$file)) {
+ chdir('.');
+ $this->removeContents($dir.$file."/");
+
+ if(!rmdir($dir.$file)){
+ $this->errors[] = "Could not delete folder $dir$file";
+ }
+ } else {
+ chmod($dir.$file, 0777);
+
+ // check to make sure that session file is over a week old
+
+ $time = filemtime($dir.$file);
+
+ if($time < (time() - (7 * 24 * 60 * 60))){
+ if(!unlink($dir.$file)){
+ $this->errors[] = "Could not delete file $dir$file";
+ }
+ }
+ }
+ }
+
+ endwhile;
+ closedir($mydir);
+ }
+
+ public function sendEmail()
+ {
+ if($email = Mage::getStoreConfig('creareseocore/cleanup/problems')):
+
+ $content = "";
+
+ foreach($this->errors as $error){
+ $content .= $error."\n";
+ }
+
+ if ($content !== "")
+ {
+ $mail = Mage::getModel('core/email');
+ $mail->setToEmail($email);
+ $mail->setBody($content);
+ $mail->setSubject('Problems with Cleanup');
+ $mail->setType('text');
+
+ try {
+ $mail->send();
+ } catch (Exception $e) {
+ Mage::logException($e);
+ }
+ }
+ endif;
+ }
+
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Observer.php b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
new file mode 100644
index 0000000..cdb184c
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Observer.php
@@ -0,0 +1,397 @@
+helper = Mage::helper("creareseocore");
+ parent::_construct();
+ }
+
+
+ private function setRobots($layout)
+ {
+ return $layout->getUpdate()->addUpdate('NOINDEX,FOLLOW');
+ }
+
+
+ public function changeRobots($observer)
+ {
+ $action = $observer->getEvent()->getAction();
+ $page = $action->getFullActionName();
+ $layout = $observer->getEvent()->getLayout();
+
+ switch ($page) {
+ case "catalog_category_view" :
+ if ($this->helper->getConfig("noindexparams")
+ && parse_url($action->getRequest()->getRequestUri(), PHP_URL_QUERY)) {
+ $this->setRobots($layout);
+ }
+ break;
+
+ case "catalogsearch_result_index" :
+ if ($this->helper->getConfig("noindexparamssearch")) {
+ $this->setRobots($layout);
+ }
+ break;
+
+ case "catalog_product_gallery" :
+ if ($this->helper->getConfig("noindexparamsgallery")) {
+ $this->setRobots($layout);
+ }
+ break;
+
+ case "checkout_cart_index" :
+ if ($this->helper->getConfig("noindexparamscart")) {
+ $this->setRobots($layout);
+ }
+ break;
+
+ case "customer_account_login" :
+ case "customer_account_create" :
+ case "customer_account_forgotpassword" :
+ case "customer_account_changeforgotten" :
+ if ($this->helper->getConfig("noindexparamsaccount")) {
+ $this->setRobots($layout);
+ }
+ break;
+ }
+
+ if ($this->helper->getConfig("noindexparamsparameterpages")
+ && parse_url($action->getRequest()->getRequestUri(), PHP_URL_QUERY)) {
+ $this->setRobots($layout);
+ }
+
+ return $this;
+ }
+
+ private function redirect301($url, $name)
+ {
+ Mage::getSingleton('core/session')
+ ->addNotice($this->helper->__('%s has been discontinued', $name));
+ Mage::app()->getFrontController()->getResponse()->setRedirect($url, 301);
+ Mage::app()->getResponse()->sendResponse();
+ exit;
+ }
+
+ public function discontinuedCheck($observer)
+ {
+ $request = $observer->getEvent()->getAction()->getRequest();
+
+ if ($request->getControllerModule() !== "Mage_Catalog") {
+ return false;
+ }
+
+ if ($request->getControllerName() === "product") {
+
+ $product = Mage::getResourceModel('catalog/product_collection')
+ ->addAttributeToSelect('creareseo_discontinued')
+ ->addAttributeToSelect('creareseo_discontinued_product')
+ ->addAttributeToSelect('name')
+ ->addIdFilter($request->getParam('id'))
+ ->setPageSize(1)
+ ->getFirstItem();
+
+ if ($discontinuedUrl = $this->helper->getDiscontinuedProductUrl($product)) {
+ $this->redirect301($discontinuedUrl, $product->getName());
+ }
+ }
+
+ if ($request->getControllerName() === "category") {
+
+ $category = Mage::getResourceModel('catalog/category_collection')
+ ->addIdFilter($request->getParam('id'))
+ ->addAttributeToSelect('name')
+ ->setPageSize(1)
+ ->getFirstItem();
+
+ if ($discontinuedUrl = $this->helper->getDiscontinuedCategoryUrl($category)) {
+ $this->redirect301($discontinuedUrl, $category->getName());
+ }
+ }
+ }
+
+ /* The function to remove the meta keywords tag */
+
+ public function applyTag($observer)
+ {
+ if ($this->helper->getConfig('metakw')) {
+ $body = $observer->getResponse()->getBody();
+ if (strpos(strtolower($body), 'meta name="keywords"') !== false) {
+ $body = preg_replace('{(]*?>\n)}i', '', $body);
+
+ }
+ if (strpos(strtolower($body), 'meta name="description" content=""') !== false) {
+ $body = preg_replace('{(]*?>\n)}i', '', $body);
+ }
+
+ $observer->getResponse()->setBody($body);
+ }
+ }
+
+ /* Replaces category name with heading on category pages */
+
+ public function seoHeading($observer)
+ {
+
+ $category = $observer->getEvent()->getCategory();
+ $category->setOriginalName($category->getName());
+
+ if ($this->helper->getConfig("category_h1")
+ && $category->getData('creareseo_heading')) {
+ $category->setName($category->getCreareseoHeading());
+ }
+ }
+
+ /*
+ * On admin_system_config_changed_section_{crearerobots/crearehtaccess}
+ * Takes the file, post data and the configuration field and
+ * writes the post data to the file.
+ */
+
+ public function writeToFileOnConfigSave(Varien_Event_Observer $observer)
+ {
+ $post = Mage::app()->getRequest()->getPost();
+ $robots_location = $post['groups']['files']['fields']['robots_location']['value'];
+ $robots_post = $post['groups']['files']['fields']['robots']['value'];
+ $htaccess_post = $post['groups']['files']['fields']['htaccess']['value'];
+
+ if ($robots_post) {
+ $this->helper->writeFile($this->helper->robotstxt(), $robots_post, 'robots', $robots_location);
+ }
+
+ if ($htaccess_post) {
+ $this->helper->writeFile($this->helper->htaccess(), $htaccess_post, 'htaccess');
+ }
+ }
+
+ /*
+ * On controller_action_predispatch
+ * Takes the file and the configuration field and saves the
+ * current file data to the database before the field is loaded
+ */
+
+ public function saveConfigOnConfigLoad(Varien_Event_Observer $observer)
+ {
+ $path = $this->helper->getConfigPath();
+
+ if ($path == 'system_config_crearehtaccess') {
+ $this->helper->saveFileContentToConfig($this->helper->htaccess(), 'htaccess');
+ }
+ if ($path == 'system_config_crearerobots') {
+ $this->helper->saveFileContentToConfig($this->helper->robotstxt(), 'robots');
+ }
+ }
+
+
+ /* Checks if the page loaded is the canonical version, if not redirects to that version */
+
+ public function forceProductCanonical(Varien_Event_Observer $observer)
+ {
+ if (Mage::getStoreConfig('catalog/seo/product_canonical_tag') && $this->helper->getConfig('forcecanonical')) {
+ // check for normal catalog/product/view controller here
+ if (!stristr("catalog", Mage::app()->getRequest()->getModuleName())
+ && Mage::app()->getRequest()->getControllerName() != "product") {
+ return;
+ }
+ // Maintain querystring if one is set (to maintain tracking URLs such as gclid)
+ $product = $observer->getEvent()->getProduct();
+ $query = Mage::app()->getRequest()->getQuery();
+ $url = $product->getUrlModel()
+ ->getUrl($product, array('_ignore_category' => true, '_query' => $query));
+ $escapedUrl = Mage::helper('core/url')->escapeUrl($url);
+ if (Mage::helper('core/url')->getCurrentUrl() != $escapedUrl) {
+ Mage::app()->getFrontController()->getResponse()->setRedirect($url, 301);
+ Mage::app()->getResponse()->sendResponse();
+ }
+ }
+ }
+
+ /* Adds the page title and meta description to the contact page's */
+
+ public function contactsMetaData(Varien_Event_Observer $observer)
+ {
+ $route = $observer->getEvent()->getAction()->getRequest()->getRouteName();
+ $headBlock = $observer->getEvent()->getLayout()->getBlock('head');
+
+ if ($route !== "contacts" || !is_object($headBlock)) {
+ return false;
+ }
+
+ if ($title = $this->metaHelper()->config('contacts_title')) {
+ $headBlock->setTitle($title);
+ }
+
+ if ($metaDesc = $this->metaHelper()->config('contacts_metadesc')) {
+ $headBlock->setDescription($metaDesc);
+ }
+
+ }
+
+ /* If set, replaces the homepage title with the definitive one set in the config */
+
+ public function forceHomepageTitle($observer)
+ {
+ $actionName = $observer->getEvent()->getAction()->getFullActionName();
+
+ if ($actionName !== "cms_index_index"
+ || !$this->helper->getConfig('forcehptitle')) {
+ return false;
+ }
+
+ $layout = $observer->getEvent()->getLayout();
+ $homepage = Mage::getStoreConfig('web/default/cms_home_page');
+ $title = Mage::getModel('cms/page')->load($homepage, 'identifier')->getTitle();
+
+ if ($title) {
+ if ($head = $layout->getBlock('head')) {
+ $head->setData('title', $title);
+ }
+ }
+
+ }
+
+ /* On relevant pages, will override the page title with the fallback if one isn't set in the editor */
+
+ public function setTitle($observer)
+ {
+ $actionName = $observer->getEvent()->getAction()->getFullActionName();
+
+ if ($actionName === "cms_index_index"
+ || $actionName === "contacts_index_index"
+ || $actionName === "customer_account_login"
+ || $actionName === "customer_account_create"
+ || $actionName === "customer_account_forgotpassword"
+ || $actionName === "customer_account_changeforgotten"
+ || $actionName === "catalogsearch_result_index") {
+ return false;
+ }
+
+ $layout = $observer->getEvent()->getLayout();
+ $title = $this->getTitle();
+
+ if ($title) {
+ if ($head = $layout->getBlock('head')) {
+ $head->setTitle($title);
+ }
+ }
+ }
+
+ /* On relevant pages, will override the meta desc with the fallback if one isn't set in the editor */
+
+ public function setDescription($observer)
+ {
+ $actionName = $observer->getEvent()->getAction()->getFullActionName();
+
+ if ($actionName === "contacts_index_index") {
+ return false;
+ }
+
+ $layout = $observer->getEvent()->getLayout();
+ $description = $this->getDescription();
+
+ if ($description) {
+ if ($head = $layout->getBlock('head')) {
+ $head->setDescription($description);
+ }
+ }
+ }
+
+ public function getDefaultTitle()
+ {
+ return Mage::getStoreConfig('design/head/default_title');
+ }
+
+ public function getTitle()
+ {
+ $pagetype = $this->metaHelper()->getPageType();
+
+ if ($pagetype !== false) {
+
+ if ($pagetype->_code != "cms") {
+ if (!$pagetype->_model->getMetaTitle()) {
+ $this->_data['title'] = $this->setConfigTitle($pagetype->_code);
+ } else {
+ $this->_data['title'] = $pagetype->_model->getMetaTitle();
+ }
+ } else if ($pagetype !== false && $pagetype->_code == "cms") {
+ $this->_data['title'] = $pagetype->_model->getTitle();
+ }
+
+ if (empty($this->_data['title'])) {
+
+ // check if it's a category or product and default to name.
+ if ($pagetype->_code == "category" || $pagetype->_code == "product") {
+ $this->_data['title'] = $pagetype->_model->getName();
+ } else {
+ $this->_data['title'] = $this->getDefaultTitle();
+ }
+ }
+ } else {
+ $this->_data['title'] = $this->getDefaultTitle();
+ }
+
+ return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));
+ }
+
+ public function setConfigTitle($pagetype)
+ {
+ if ($this->metaHelper()->config($pagetype . '_title_enabled')) {
+ return $this->metaHelper()->getDefaultTitle($pagetype);
+ }
+ }
+
+ public function setConfigMetaDescription($pagetype)
+ {
+ if ($this->metaHelper()->config($pagetype . '_metadesc_enabled')) {
+ return $this->metaHelper()->getDefaultMetaDescription($pagetype);
+ }
+ }
+
+
+ public function getDescription()
+ {
+ $pagetype = $this->metaHelper()->getPageType();
+
+ if ($pagetype !== false) {
+ if (!$pagetype->_model->getMetaDescription()) {
+ $this->_data['description'] = $this->setConfigMetaDescription($pagetype->_code);
+ } else {
+ $this->_data['description'] = $pagetype->_model->getMetaDescription();
+ }
+ }
+
+ if (empty($this->_data['description'])) {
+ $this->_data['description'] = "";
+ }
+ return $this->_data['description'];
+ }
+
+ public function metaHelper()
+ {
+ return Mage::helper('creareseocore/meta');
+ }
+
+ public function setMandatoryAltTag($observer)
+ {
+ if ($this->helper->getConfig('mandatory_alt')) {
+ $observer->getBlock()->setTemplate('creareseo/catalog/product/helper/gallery.phtml');
+ }
+ }
+
+ /* Sets Google Analytics to use UA when the version is less that 1.9.1 and it is set in the config */
+
+ public function setUA($observer)
+ {
+ $magentoVersion = Mage::getVersion();
+
+ if (Mage::getStoreConfig('creareseocore/googleanalytics/type') && version_compare($magentoVersion, '1.9.1', '<')) {
+ $layout = $observer->getEvent()->getLayout();
+ $layout->getUpdate()->addUpdate('');
+ $layout->generateXml();
+ }
+ }
+
+}
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Image.php b/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Image.php
new file mode 100644
index 0000000..40337c3
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Image.php
@@ -0,0 +1,79 @@
+getStores();
+ foreach ($stores as $store) {
+ $storeId = $store->getId();
+
+ //to get the right product url we have to set the store
+ $appEmulation = Mage::getSingleton('core/app_emulation');
+ $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
+ if ( ! Mage::getStoreConfigFlag('creareseocore/imagesitemap/enabled', $storeId)) {
+ continue;
+ }
+
+ $filePath = Mage::getBaseDir('media') . DS . Mage::getStoreConfig('creareseocore/imagesitemap/path',
+ $storeId);
+
+ // do not override already generated sitemaps
+ if (in_array($filePath, $alreadyUsedFilePaths)) {
+ continue;
+ }
+
+ $fileName = basename($filePath);
+ $folderPath = dirname($filePath);
+
+ $io = new Varien_Io_File();
+ $io->setAllowCreateFolders(true);
+ $io->open(array('path' => $folderPath));
+
+ if ($io->fileExists($fileName) && ! $io->isWriteable($fileName)) {
+ continue;
+ }
+
+ $io->streamOpen($fileName);
+ $io->streamWrite('' . "\n");
+ $io->streamWrite('' . "\n");
+ $productCollection = Mage::getModel('catalog/product')->getCollection()->setStore($storeId)
+ ->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
+ Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($productCollection);
+
+ foreach ($productCollection as $product) {
+ $mediaGallery = $product->getResource()->getAttribute('media_gallery');
+ $backend = $mediaGallery->getBackend();
+ $backend->afterLoad($product);
+ $images = $product->getMediaGalleryImages();
+ $productUrl = $product->getProductUrl();
+
+ if ($images->getSize()) {
+ $xml = '' . htmlspecialchars($productUrl) . '';
+ foreach ($images as $image) {
+ if ( ! $image->getLabel()) {
+ $imageTitle = htmlspecialchars(Mage::getResourceModel('catalog/product')
+ ->getAttributeRawValue($product->getId(), 'name', $storeId));
+ } else {
+ $imageTitle = htmlspecialchars($image->getLabel());
+ }
+ $xml .= '';
+ $xml .= '' . $image->getUrl() . '';
+ $xml .= '' . $imageTitle . '';
+ $xml .= '';
+ }
+ $xml .= '' . "\n";
+ $io->streamWrite($xml);
+ }
+ }
+ $io->streamWrite('');
+ $io->streamClose();
+
+ $alreadyUsedFilePaths[] = $filePath;
+ $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
+ }
+ }
+}
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Sitemap.php b/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Sitemap.php
new file mode 100644
index 0000000..08fefa5
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Sitemap/Sitemap.php
@@ -0,0 +1,104 @@
+setAllowCreateFolders(true);
+ $io->open(array('path' => $this->getPath()));
+
+ if ($io->fileExists($this->getSitemapFilename()) && !$io->isWriteable($this->getSitemapFilename())) {
+ Mage::throwException(Mage::helper('sitemap')->__('File "%s" cannot be saved. Please, make sure the directory "%s" is writeable by web server.', $this->getSitemapFilename(), $this->getPath()));
+ }
+
+ $io->streamOpen($this->getSitemapFilename());
+
+ $io->streamWrite('' . "\n");
+ $io->streamWrite('');
+
+ $storeId = $this->getStoreId();
+ $date = Mage::getSingleton('core/date')->gmtDate('Y-m-d');
+ $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
+
+ /**
+ * Generate categories sitemap
+ */
+ $changefreq = (string)Mage::getStoreConfig('sitemap/category/changefreq', $storeId);
+ $priority = (string)Mage::getStoreConfig('sitemap/category/priority', $storeId);
+ $collection = Mage::getResourceModel('sitemap/catalog_category')->getCollection($storeId);
+ $categories = new Varien_Object();
+ $categories->setItems($collection);
+ Mage::dispatchEvent('sitemap_categories_generating_before', array(
+ 'collection' => $categories
+ ));
+ foreach ($categories->getItems() as $item) {
+ $xml = sprintf(
+ '%s%s%s%.1f',
+ htmlspecialchars($baseUrl . $item->getUrl()),
+ $date,
+ $changefreq,
+ $priority
+ );
+ $io->streamWrite($xml);
+ }
+ unset($collection);
+
+ /**
+ * Generate products sitemap
+ */
+ $changefreq = (string)Mage::getStoreConfig('sitemap/product/changefreq', $storeId);
+ $priority = (string)Mage::getStoreConfig('sitemap/product/priority', $storeId);
+ $collection = Mage::getResourceModel('sitemap/catalog_product')->getCollection($storeId);
+ $products = new Varien_Object();
+ $products->setItems($collection);
+ Mage::dispatchEvent('sitemap_products_generating_before', array(
+ 'collection' => $products
+ ));
+ foreach ($products->getItems() as $item) {
+ $xml = sprintf(
+ '%s%s%s%.1f',
+ htmlspecialchars($baseUrl . $item->getUrl()),
+ $date,
+ $changefreq,
+ $priority
+ );
+ $io->streamWrite($xml);
+ }
+ unset($collection);
+
+ /**
+ * Generate cms pages sitemap
+ */
+ $changefreq = (string)Mage::getStoreConfig('sitemap/page/changefreq', $storeId);
+ $priority = (string)Mage::getStoreConfig('sitemap/page/priority', $storeId);
+ $collection = Mage::getResourceModel('sitemap/cms_page')->getCollection($storeId);
+ foreach ($collection as $item) {
+
+ /* Remove homepage path, leaving just the base URL */
+ $url = (Mage::getStoreConfig('web/default/cms_home_page') == $item->getUrl()
+ ? $baseUrl : $baseUrl . $item->getUrl());
+
+ $xml = sprintf(
+ '%s%s%s%.1f',
+ htmlspecialchars($url),
+ $date,
+ $changefreq,
+ $priority
+ );
+ $io->streamWrite($xml);
+ }
+ unset($collection);
+
+ $io->streamWrite('');
+ $io->streamClose();
+
+ $this->setSitemapTime(Mage::getSingleton('core/date')->gmtDate('Y-m-d H:i:s'));
+ $this->save();
+
+ return $this;
+ }
+
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Source/AnalyticsType.php b/app/code/community/Creare/CreareSeoCore/Model/Source/AnalyticsType.php
new file mode 100644
index 0000000..6e73f2b
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Source/AnalyticsType.php
@@ -0,0 +1,11 @@
+ 0, 'label' => Mage::helper('creareseocore')->__('Standard Google Analytics (default)')),
+ array('value' => 1, 'label' => Mage::helper('creareseocore')->__('Universal Analytics'))
+ );
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/Model/Source/Protocols.php b/app/code/community/Creare/CreareSeoCore/Model/Source/Protocols.php
new file mode 100644
index 0000000..f0ef802
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/Model/Source/Protocols.php
@@ -0,0 +1,11 @@
+ 'http://', 'label' => Mage::helper('creareseocore')->__('http://')),
+ array('value' => 'https://', 'label' => Mage::helper('creareseocore')->__('https:// (secure)'))
+ );
+ }
+}
\ No newline at end of file
diff --git a/app/code/community/Creare/CreareSeoCore/controllers/Adminhtml/CreareseoController.php b/app/code/community/Creare/CreareSeoCore/controllers/Adminhtml/CreareseoController.php
new file mode 100644
index 0000000..9127176
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/controllers/Adminhtml/CreareseoController.php
@@ -0,0 +1,16 @@
+isAllowed('system/creareseo/defaultseo');
+ }
+
+ public function checkAction()
+ {
+ $this->loadLayout();
+ $this->renderLayout();
+ }
+}
diff --git a/app/code/community/Creare/CreareSeoCore/etc/adminhtml.xml b/app/code/community/Creare/CreareSeoCore/etc/adminhtml.xml
new file mode 100644
index 0000000..791e3d5
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/etc/adminhtml.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+ Allow Everything
+
+
+
+
+
+
+ CreareSEO
+
+
+ CreareSEO - Default SEO Check
+
+
+ HTML Sitemap Settings
+
+
+ General Settings
+
+
+ .htaccess Editor
+
+
+ robots.txt Editor
+
+
+
+
+
+
+ CreareSEO Core
+
+
+ robots.txt
+
+
+ .htaccess
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/community/Creare/CreareSeoCore/etc/config.xml b/app/code/community/Creare/CreareSeoCore/etc/config.xml
new file mode 100644
index 0000000..a1484a8
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/etc/config.xml
@@ -0,0 +1,306 @@
+
+
+
+
+ 1.5
+
+
+
+
+
+
+ creareseo_admin.xml
+
+
+
+
+
+
+
+ Creare_CreareSeoCore.csv
+
+
+
+
+
+
+
+
+
+ creareseo.xml
+
+
+
+
+
+
+
+
+
+ Creare_CreareSeoCore_Adminhtml
+
+
+
+
+
+
+
+
+
+ name
+
+
+
+
+
+
+
+
+ Creare_CreareSeoCore_Model
+ cleanup_mysql4
+
+
+
+ Creare_CreareSeoCore_Model_Sitemap_Sitemap
+
+
+
+
+
+ Creare_CreareSeoCore_Helper
+
+
+
+
+ Creare_CreareSeoCore_Block
+
+
+
+
+
+ Creare_CreareSeoCore
+
+
+
+
+
+
+
+
+
+
+
+ 0 1 * * *
+
+
+ creareseocore/cleanup::doCleanup
+
+
+
+
+ 42 2 * * *
+
+
+ creareseocore/sitemap_image::create
+
+
+
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ changeRobots
+
+
+ singleton
+ creareseocore/observer
+ setUA
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ discontinuedCheck
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ applyTag
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ forceProductCanonical
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ seoHeading
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ contactsMetaData
+
+
+ singleton
+ creareseocore/observer
+ setTitle
+
+
+ singleton
+ creareseocore/observer
+ setDescription
+
+
+ singleton
+ creareseocore/observer
+ forceHomepageTitle
+
+
+
+
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ writeToFileOnConfigSave
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ writeToFileOnConfigSave
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ saveConfigOnConfigLoad
+
+
+
+
+
+
+
+ singleton
+ creareseocore/observer
+ setMandatoryAltTag
+
+
+
+
+
+
+
+
+ 1
+ 1
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 0
+ 1
+ 1
+ http://
+ 1
+
+
+ 0
+ 0
+
+
+ 1
+ 1
+ 0
+ 1
+
+
+ 0
+
+
+ 0
+ [name] - [store]
+ 0
+ [name], [store]
+ 0
+ [original_name] - [store]
+ 0
+ [original_name] [store]
+ 0
+ [title] - [store]
+
+
+ 1
+
+
+ 1
+
+
+ 0
+
+
+ 0
+
+
+ 1
+
+
+ 0
+
+
+ 1
+
+
+ 0
+ sitemaps/images/sitemap.xml
+
+
+
+
diff --git a/app/code/community/Creare/CreareSeoCore/etc/system.xml b/app/code/community/Creare/CreareSeoCore/etc/system.xml
new file mode 100644
index 0000000..d95c542
--- /dev/null
+++ b/app/code/community/Creare/CreareSeoCore/etc/system.xml
@@ -0,0 +1,991 @@
+
+
+
+
+ 100
+
+
+
+
+
+ crearegroup
+ 1000
+ 1
+ 1
+ 1
+
+
+ creareseocore/adminhtml_system_config_fieldset_info
+ 0
+ 1
+ 1
+ 1
+
+
+
+ text
+ 10
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 30
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 40
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 50
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 55
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 60
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 70
+ 1
+ 1
+ 1
+
+
+
+ select
+ creareseocore/source_protocols
+ 80
+ 1
+ 1
+ 1
+
+ 1
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 90
+ 1
+ 1
+ 1
+
+ 1
+
+
+
+
+
+
+
+ text
+ 20
+ 1
+ 1
+ 1
+
+ This performance cleanup script will automatically remove any files / database entries that are not required by your ecommerce store but which build up over time and cause your website to lose performance.
+
Recommended settings are to enable 'Clean Log entries in DB' and 'Auto enable cache' (to enable Magento cache if accidentally left disabled).
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 20
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 30
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 40
+ 1
+ 1
+ 1
+
+
+
+ text
+ 50
+ 1
+ 1
+ 1
+
+
+
+ text
+ 1
+ 100
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 20
+ 1
+ 1
+ 1
+
+ Enable or disable twitter product cards and open graph schema. Location will be taken from Shipping Settings > Origin.
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ text
+ 10
+ 1
+ 1
+ 1
+
+
+
+ text
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 80
+ 1
+ 1
+ 1
+
+ Enabling the 'Default Page Titles and Meta Descriptions’ feature will dynamically create unique Page Titles and Meta Descriptions for your Category and Product pages. If you subsequently define Page Titles or Meta Descriptions
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 1
+ 1
+ 1
+ 1
+
+
+
+ text
+ 2
+ 1
+ 1
+ 1
+ 1
+ [name] = Product Name
+ [store] = Store Name
+ [attribute_code] = Attribute Value
+ [first_category] = First Category Found
+ [categories] = Outputs all categories comma-separated
+ For example: [name] - [store].
+ ]]>
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 3
+ 1
+ 1
+ 1
+
+
+
+ textarea
+ 4
+ 1
+ 1
+ 1
+ 1
+ [name] = Product Name
+ [store] = Store Name
+ [attribute_code] = Attribute Value
+ [first_category] = First Category Found
+ [categories] = Outputs all categories comma-separated
+ For example: Buy [name] online from our [store]. See our other [brand] products.
+ ]]>
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 5
+ 1
+ 1
+ 1
+
+
+
+ text
+ 6
+ 1
+ 1
+ 1
+ 1
+ [name] = Category Name
+ [original_name] = Original Category Name (if category heading rewrites is enabled)
+ [store] = Store Name
+ For example: [name] - [store].
+ ]]>
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 7
+ 1
+ 1
+ 1
+
+
+
+ textarea
+ 8
+ 1
+ 1
+ 1
+ 1
+ [name] = Category Name
+ [original_name] = Original Category Name (if category heading rewrites is enabled)
+ [store] = Store Name
+ For example: Browse our [name] products at [store].
+ ]]>
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 9
+ 1
+ 1
+ 1
+
+
+
+ textarea
+ 10
+ 1
+ 1
+ 1
+ 1
+ [title] = CMS Page Name
+ [store] = Store Name
+ For example: [title] - [store].
+ ]]>
+
+
+
+ text
+ 12
+ 1
+ 1
+ 1
+
+
+
+ textarea
+ 14
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 90
+ 1
+ 1
+ 1
+
+ * Ensure that you have entered your Account Number in the Google API tab. This functionality will only work on Magento version earlier than 1.9.1.
+ ]]>
+
+
+
+
+ select
+ 1
+ 1
+ 1
+ 1
+ Creare_CreareSeoCore_Model_Source_AnalyticsType
+
+
+
+ select
+ 2
+ 1
+ 1
+ 1
+ adminhtml/system_config_source_yesno
+ 1
+
+
+
+ textarea
+ 3
+ 1
+ 1
+ 1
+ 1
+ More information about Universal Analytics]]>
+
+
+
+
+
+ text
+ 100
+ 1
+ 1
+ 1
+
+ Add your business details below to include Organization Schema on your website.
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ text
+ 50
+ 1
+ 1
+ 1
+ required-entry
+ 1
+
+
+
+ text
+ 60
+ 1
+ 1
+ 1
+ required-entry
+ 1
+
+
+
+ text
+ 70
+ 1
+ 1
+ 1
+ required-entry
+ 1
+
+
+
+ text
+ 80
+ 1
+ 1
+ 1
+ required-entry
+ 1
+
+
+
+
+
+ text
+ 110
+ 1
+ 1
+ 1
+
+ Enable product schema to include structured data on your website. For more information see here: http://schema.org/Product
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 120
+ 1
+ 1
+ 1
+
+ Enable social schema to include structured data on your website. For more information see here: https://developers.google.com/structured-data/customize/social-profiles
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ textarea
+ 20
+ 1
+ 1
+ 1
+ 1
+ Add the full URLs to your social profiles (e.g. http://twitter.com/magentofox) - ONE per line!
+
+
+
+
+
+ text
+ 123
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 125
+ 1
+ 1
+ 1
+
+ If you enable breadcrumb schema, your theme's breadcrumbs file will be replaced by this file: app/design/frontend/base/default/template/creareseo/page/html/breadcrumbs.phtml. This means you may notice style changes when this is enabled if you have altered the code in your theme's breadcrumbs file.
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 130
+ 1
+ 1
+ 1
+
+ Find out more about Google Tag Manager here: https://support.google.com/tagmanager/answer/6102821?hl=en
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ text
+ 20
+ 1
+ 1
+ 1
+
+
+
+
+
+
+ text
+ 130
+ 1
+ 1
+ 1
+
+ Google content grouping allows you to group certain types of content found on your site so that you can use this information in Google Analytics. For example you could find out how many of your total visits where to product pages, category pages or CMS pages. For more information visit this link: https://support.google.com/analytics/answer/2853423?hl=en
+
Within this extension we have allowed you to add tracking code for products, categories and CMS pages. To set up your tracking codes go to your Analytics dashboard and go to Admin > Content Grouping > + New Content Grouping. Give it a name (such as 'Product Page'), and then from the options choose 'Enable Tracking Code', then copy and past the Universal tracking code into the Product field below.
+ ]]>
+
+
+
+
+ text
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+ text
+ 20
+ 1
+ 1
+ 1
+
+
+
+
+ text
+ 30
+ 1
+ 1
+ 1
+
+
+
+
+
+
+ text
+ 140
+ 1
+ 1
+ 1
+
+ If you enable Sitelink Search you will provide Google with structured data about the search form on your website. For more information go here: https://developers.google.com/structured-data/slsb-overview
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 150
+ 1
+ 1
+ 1
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+
+
+ text
+ 150
+ 1
+ 1
+ 1
+
+ If you enable Image Sitemap you will provide Google with structured data about your images and increase the chance to be listed in Google image search.
+ ]]>
+
+
+
+
+ select
+ adminhtml/system_config_source_yesno
+ 10
+ 1
+ 1
+ 1
+
+
+
+ text
+ 20
+ 1
+ 1
+ 1
+
+ 1
+
+ Where the image sitemap should be stored. The path is relative to the media folder. Please make sure that the folder exists and is writeable.
+
+
+
+
+
+
+
+ crearegroup
+ 2000
+ 1
+
+
+
+ text
+ 10
+ 1
+ IMPORTANT!
To write to your .htaccess, you must set permissions to at least 664.
+Overwriting your .htaccess can cause problems with your website, so only alter if you know what you're doing.
__('This page contains a simple checklist for our recommended configuration of Magento to maximise SEO performance. This extension checks default scope configuration values only, values specific to a website or store view cannot be checked.') ?>
+
+
+
__('CreareSEO Settings') ?>
+
+
__('This section checks the additional settings made available by CreareSEO that can be configured for better SEO performance.') ?>
+ __('Your %s file exists and is writable.', $_helper->robotstxt()) ?>
+
+
+
+ __('Your %s file needs to be writable to be editable through the configuration. Set permissions to 664 to use this feature.', $_helper->robotstxt()) ?>
+
+
+
+
__('Unable to find %s file', $_helper->robotstxt()) ?>
+
+ __('Your %s file exists and is writable.', $_helper->htaccess()) ?>
+
+
+
+ __('Your %s file needs to be writable to be editable through the configuration. Set permissions to 664 to use this feature.', $_helper->htaccess()) ?>
+
+
+
+
__('Unable to find %s file', $_helper->htaccess()) ?>
+
__('Your logo alt text name has been customized.') ?>
+
+
+
+
+ load($noRoutePage, 'identifier'); ?>
+ getId()) : ?>
+ getContent(), "Whoops, our bad...") ||
+ strpos($cmsPage->getContent(), "The page you requested was not found, and we have a fine guess why.") ||
+ strpos($cmsPage->getContent(), "If you typed the URL directly, please make sure the spelling is correct.") ||
+ strpos($cmsPage->getContent(), "If you clicked on a link to get here, the link is outdated.") ||
+ strpos($cmsPage->getContent(), "Have no fear, help is near! There are many ways you can get back on track with") ||
+ strpos($cmsPage->getContent(), "Use the search bar at the top of the page to search for your products.") ||
+ strpos($cmsPage->getContent(), "Follow these links to get you back on track")
+
+ ) : ?>
+
\ No newline at end of file
diff --git a/app/design/frontend/base/default/template/creareseo/social/schema.phtml b/app/design/frontend/base/default/template/creareseo/social/schema.phtml
new file mode 100644
index 0000000..31d2136
--- /dev/null
+++ b/app/design/frontend/base/default/template/creareseo/social/schema.phtml
@@ -0,0 +1,14 @@
+_socialProfiles) && $this->isEnabled()) : ?>
+
+
+
+
\ No newline at end of file
diff --git a/app/design/frontend/base/default/template/creareseo/social/social.phtml b/app/design/frontend/base/default/template/creareseo/social/social.phtml
new file mode 100644
index 0000000..a5531e9
--- /dev/null
+++ b/app/design/frontend/base/default/template/creareseo/social/social.phtml
@@ -0,0 +1,31 @@
+helper('catalog/output');
+$_product = $this->getProduct();
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/etc/modules/Creare_CreareSeoCore.xml b/app/etc/modules/Creare_CreareSeoCore.xml
new file mode 100644
index 0000000..fc158c3
--- /dev/null
+++ b/app/etc/modules/Creare_CreareSeoCore.xml
@@ -0,0 +1,8 @@
+
+
+
+ true
+ community
+
+
+
\ No newline at end of file
diff --git a/app/etc/modules/Creare_CreareSeoSitemap.xml b/app/etc/modules/Creare_CreareSeoSitemap.xml
new file mode 100644
index 0000000..1109c10
--- /dev/null
+++ b/app/etc/modules/Creare_CreareSeoSitemap.xml
@@ -0,0 +1,12 @@
+
+
+
+ true
+ community
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/locale/en_US/Creare_CreareSeoCore.csv b/app/locale/en_US/Creare_CreareSeoCore.csv
new file mode 100644
index 0000000..8e766b9
--- /dev/null
+++ b/app/locale/en_US/Creare_CreareSeoCore.csv
@@ -0,0 +1,77 @@
+"General Settings","General Settings"
+"SEO Settings","SEO Settings"
+"Disable Meta Keywords Tag and Empty Meta Description Tags?","Disable Meta Keywords Tag and Empty Meta Description Tags?"
+"Make ""alt"" tags mandatory on product gallery images?","Make ""alt"" tags mandatory on product gallery images?"
+"Apply NOINDEX to filtered category pages","Apply NOINDEX to filtered category pages"
+"Apply NOINDEX to Search Results","Apply NOINDEX to Search Results"
+"Apply NOINDEX to Pop-up Gallery","Apply NOINDEX to Pop-up Gallery"
+"Apply NOINDEX to Cart Page","Apply NOINDEX to Cart Page"
+"Apply NOINDEX to Account Pages","Apply NOINDEX to Account Pages"
+"Disable Duplicate Button in Product Edit?","Disable Duplicate Button in Product Edit?"
+"Enable Unique Category Heading field","Enable Unique Category Heading field"
+"Enable Canonical Product Redirecting","Enable Canonical Product Redirecting"
+"Force Homepage Title (disregard prefix/suffix)","Force Homepage Title (disregard prefix/suffix)"
+"Enable CMS Canonical Meta Tags","Enable CMS Canonical Meta Tags"
+"Use standard or secure URLs in CMS canonical tags?","Use standard or secure URLs in CMS canonical tags?"
+"Add slashes to end of canonical CMS URL?","Add slashes to end of canonical CMS URL?"
+"Performance Cleanup","Performance Cleanup"
+"Enabled","Enabled"
+"Clean Log entries in DB?","Clean Log entries in DB?"
+"Clean Cache & Session Folder?","Clean Cache & Session Folder?"
+"Auto enable cache?","Auto enable cache?"
+"Email any problems to?","Email any problems to?"
+"Last Successful Run:","Last Successful Run:"
+"Twitter Cards and Open Graph","Twitter Cards and Open Graph"
+"Enable Twitter Cards and OG Tags?","Enable Twitter Cards and OG Tags?"
+"Twitter Site @","Twitter Site @"
+"Twitter Creator @","Twitter Creator @"
+"Default Page Titles and Meta Descriptions","Default Page Titles and Meta Descriptions"
+"Enable Default Product Title?","Enable Default Product Title?"
+"Default Product Title","Default Product Title"
+"Enable Default Product Meta Description?","Enable Default Product Meta Description?"
+"Default Product Meta Description","Default Product Meta Description"
+"Enable Default Category Title?","Enable Default Category Title?"
+"Default Category Title","Default Category Title"
+"Enable Default Category Meta Description?","Enable Default Category Meta Description?"
+"Default Category Meta Description","Default Category Meta Description"
+"Default Contacts Title","Default Contacts Title"
+"Default Contacts Meta Description","Default Contacts Meta Description"
+"Google Analytics","Google Analytics"
+"Google Analytics Type","Google Analytics Type"
+"Enable Demographics and Interest Reports","Enable Demographics and Interest Reports"
+"Additional Tracking Code","Additional Tracking Code"
+"Organization Schema","Organization Schema"
+"Enable Organization Schema?","Enable Organization Schema?"
+"Street Address","Street Address"
+"Address Locality","Address Locality"
+"Region","Region"
+"Postal Code","Postal Code"
+"Product Schema","Product Schema"
+"Enable Product Schema?","Enable Product Schema?"
+"Social Schema","Social Schema"
+"Enable Social Schema?","Enable Social Schema?"
+"Social Profiles","Social Profiles"
+"Logo Schema","Logo Schema"
+"Enable Logo Schema?","Enable Logo Schema?"
+"Breadcrumbs Schema","Breadcrumbs Schema"
+"Enable Breadcrumb Schema?","Enable Breadcrumb Schema?"
+"Google Tag Manager","Google Tag Manager"
+"Enable Google Tag Manager?","Enable Google Tag Manager?"
+"GTM ID","GTM ID"
+"Google Content Grouping (for Analytics)","Google Content Grouping (for Analytics)"
+"Product Tracking Code","Product Tracking Code"
+"Category Tracking Code","Category Tracking Code"
+"CMS Page Tracking Code","CMS Page Tracking Code"
+"Sitelink Search","Sitelink Search"
+"Enable Sitelink Search?","Enable Sitelink Search?"
+"robots.txt","robots.txt"
+"robots.txt Editor","robots.txt Editor"
+"Location of robots.txt","Location of robots.txt"
+"Fax Number","Fax Number"
+"Company Number","Company Number"
+"Twitter","Twitter"
+"Facebook","Facebook"
+"Google Plus","Google Plus"
+"YouTube","YouTube"
+"LinkedIn","LinkedIn"
+"Instagram","Instagram"
diff --git a/app/locale/pt_BR/Creare_CreareSeoCore.csv b/app/locale/pt_BR/Creare_CreareSeoCore.csv
new file mode 100644
index 0000000..378263a
--- /dev/null
+++ b/app/locale/pt_BR/Creare_CreareSeoCore.csv
@@ -0,0 +1,77 @@
+"General Settings","Configurações Gerais"
+"SEO Settings","Configurações de SEO"
+"Disable Meta Keywords Tag and Empty Meta Description Tags?","Desativar a tag de Palavras-Chaves e deixar a tag de Descrição vazia?"
+"Make ""alt"" tags mandatory on product gallery images?","Fazer o atributo ""alt"" obrigatório nas imagens da galeria de produtos?"
+"Apply NOINDEX to filtered category pages","Aplicar NOINDEX para as páginas das categorias filtradas"
+"Apply NOINDEX to Search Results","Aplicar NOINDEX para os resultados da busca"
+"Apply NOINDEX to Pop-up Gallery","Aplicar NOINDEX para o Pop-up da galeria"
+"Apply NOINDEX to Cart Page","Aplicar NOINDEX para a página do carrinho"
+"Apply NOINDEX to Account Pages","Aplicar NOINDEX para as páginas de conta do usuário"
+"Disable Duplicate Button in Product Edit?","Desativar o botão de duplicar na edição do produto?"
+"Enable Unique Category Heading field","Ativar campo de cabeçalho único da categoria"
+"Enable Canonical Product Redirecting","Ativar redirecionamento canônico do produto"
+"Force Homepage Title (disregard prefix/suffix)","Forçar o tÃtulo da página inicial (ignorando prefixo/sufixo)"
+"Enable CMS Canonical Meta Tags","Ativar meta tags canônicas no CMS"
+"Use standard or secure URLs in CMS canonical tags?","Usar URLs padrão ou seguras nas tags canônicas no CMS?"
+"Add slashes to end of canonical CMS URL?","Adicionar uma barra no final das tags canônicas no CMS?"
+"Performance Cleanup","Limpeza de Desempenho"
+"Enabled","Ativado"
+"Clean Log entries in DB?","Limpar entradas de log no Banco de Dados?"
+"Clean Cache & Session Folder?","Limpar os diretório de cache & seção?"
+"Auto enable cache?","Ativar cache automaticamente?"
+"Email any problems to?","Enviar qualquer erro para?"
+"Last Successful Run:","Última execução bem-sucedida:"
+"Twitter Cards and Open Graph","Twitter Cards e Open Graph"
+"Enable Twitter Cards and OG Tags?","Ativar Twitter Cards e OG Tags?"
+"Twitter Site @","Usuário do site no Twitter"
+"Twitter Creator @","Usuário do criador no Twitter"
+"Default Page Titles and Meta Descriptions","TÃtulos, Descrições e Meta Tags das Páginas"
+"Enable Default Product Title?","Ativar o tÃtulo padrão do produto?"
+"Default Product Title","TÃtulo padrão do produto"
+"Enable Default Product Meta Description?","Ativar a descrição padrão do produto?"
+"Default Product Meta Description","Descrição padrão do produto"
+"Enable Default Category Title?","Ativar o tÃtulo padrão da categoria?"
+"Default Category Title","TÃtulo padrão da categoria"
+"Enable Default Category Meta Description?","Ativar a descrição padrão da categoria?"
+"Default Category Meta Description","Descrição padrão da categoria"
+"Default Contacts Title","TÃtulo padrão dos contatos"
+"Default Contacts Meta Description","Descrição padrão dos contatos"
+"Google Analytics","Google Analytics"
+"Google Analytics Type","Tipo do Google Analytics"
+"Enable Demographics and Interest Reports","Ativar relatórios de interesse e demográficos"
+"Additional Tracking Code","Código de rastreio adicional"
+"Organization Schema","Schema da Organização"
+"Enable Organization Schema?","Ativar o Schema para a organização?"
+"Street Address","Logradouro"
+"Address Locality","Localidade"
+"Region","Região"
+"Postal Code","Código Postal"
+"Product Schema","Schema do Produto"
+"Enable Product Schema?","Ativar o Schema para o produto?"
+"Social Schema","Schema Social"
+"Enable Social Schema?","Ativar o Schema para as redes sociais?"
+"Social Profiles","Perfis nas redes sociais"
+"Logo Schema","Schema da Marca"
+"Enable Logo Schema?","Ativar o Schema para a marca?"
+"Breadcrumbs Schema","Schema dos Breadcrumbs"
+"Enable Breadcrumb Schema?","Ativar o Schema para os breadcrumbs?"
+"Google Tag Manager","Gerenciamento da Tag do Google"
+"Enable Google Tag Manager?","Ativar o gerenciamento da tag do Google?"
+"GTM ID","GTM ID"
+"Google Content Grouping (for Analytics)","Google Content Grouping (para Analytics)"
+"Product Tracking Code","Código de rastreio do produto"
+"Category Tracking Code","Código de rastreio da categoria"
+"CMS Page Tracking Code","Código de rastreio das páginas do CMS"
+"Sitelink Search","Busca do Sitelink"
+"Enable Sitelink Search?","Ativar busca do sitelink?"
+"robots.txt","robots.txt"
+"robots.txt Editor","Editor do robots.txt"
+"Location of robots.txt","Localização do robots.txt"
+"Fax Number","Número do Fax"
+"Company Number","Número da Companhia"
+"Twitter","Twitter"
+"Facebook","Facebook"
+"Google Plus","Google+"
+"YouTube","YouTube"
+"LinkedIn","LinkedIn"
+"Instagram","Instagram"
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..b88d9ae
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,16 @@
+{
+ "name": "sickdaflip/creare-seo",
+ "type": "magento-module",
+ "homepage": "http://www.magentocommerce.com/magento-connect/creare-seo.html",
+ "description": "This extension provides fixes and features to Magento that will help improve its overall SEO performance.",
+ "require": {
+ "magento-hackathon/magento-composer-installer": "*"
+ },
+ "authors": [
+ {
+ "name": "Adam Moss",
+ "homepage": "https://adammoss.co.uk",
+ "role": "Web Developer"
+ }
+ ]
+}
diff --git a/creareseo-checklist.png b/creareseo-checklist.png
new file mode 100644
index 0000000000000000000000000000000000000000..d9f3360d6b99b480f577639247c36a8a791f828d
GIT binary patch
literal 371987
zcm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