Kvh_Simpleseo - Version 0.3.0

Version Notes

Fix Price issue in meta data

Download this release

Release Info

Developer Hitesh Agrawal
Extension Kvh_Simpleseo
Version 0.3.0
Comparing to
See all releases


Code changes from version 0.2.0 to 0.3.0

app/code/local/Kvh/Simpleseo/Block/Catalog/Product/View.php CHANGED
@@ -45,18 +45,21 @@ class Kvh_Simpleseo_Block_Catalog_Product_View extends Mage_Catalog_Block_Produc
45
 
46
  if($p[0]=="product")
47
  {
48
- $attribute=substr($w,8);
49
  $attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode("catalog_product",$attribute);
 
 
50
 
51
- $attrtype=$attributeModel->getFrontendInput();
52
-
53
  switch($attrtype)
54
  {
55
  case "text":
56
  $data=$product->getData($attribute);
57
  break;
 
 
 
58
  case "select":
59
- $data=$product->getAttributeText($attribute);
60
  break;
61
 
62
  }
@@ -116,6 +119,7 @@ class Kvh_Simpleseo_Block_Catalog_Product_View extends Mage_Catalog_Block_Produc
116
  if (!$description) {
117
  $headBlock->setDescription($product_meta_description);
118
  }
 
119
 
120
 
121
  }
45
 
46
  if($p[0]=="product")
47
  {
48
+ $attribute=substr($w,8);
49
  $attributeModel = Mage::getModel('eav/entity_attribute')->loadByCode("catalog_product",$attribute);
50
+
51
+ $attrtype=$attributeModel->getFrontendInput();
52
 
 
 
53
  switch($attrtype)
54
  {
55
  case "text":
56
  $data=$product->getData($attribute);
57
  break;
58
+ case "price":
59
+ $data=$product->getData($attribute);
60
+ break;
61
  case "select":
62
+ $data=$product->getAttributeText($attribute);
63
  break;
64
 
65
  }
119
  if (!$description) {
120
  $headBlock->setDescription($product_meta_description);
121
  }
122
+
123
 
124
 
125
  }
app/code/local/Kvh/Simpleseo/Model/Observer.php CHANGED
@@ -66,4 +66,6 @@ class Kvh_Simpleseo_Model_Observer
66
 
67
 
68
 
 
 
69
  }
66
 
67
 
68
 
69
+
70
+
71
  }
app/code/local/Kvh/Simpleseo/Model/System/Config/Robot.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mirasvit
4
+ *
5
+ * This source file is subject to the Mirasvit Software License, which is available at http://mirasvit.com/license/.
6
+ * Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
7
+ * If you wish to customize this module for your needs
8
+ * Please refer to http://www.magentocommerce.com for more information.
9
+ *
10
+ * @category Mirasvit
11
+ * @package Advanced SEO Suite
12
+ * @version 1.0.3
13
+ * @revision 314
14
+ * @copyright Copyright (C) 2013 Mirasvit (http://mirasvit.com/)
15
+ */
16
+
17
+
18
+ class Mirasvit_Seo_Model_System_Config_Backend_Robot extends Mage_Core_Model_Config_Data
19
+ {
20
+ protected function _afterSave()
21
+ {
22
+ @file_put_contents($this->getFilename(), utf8_encode($this->getValue()));
23
+ }
24
+
25
+ protected function _afterLoad()
26
+ {
27
+ $text = '';
28
+ if (file_exists($this->getFilename())) {
29
+ $text = @file_get_contents($this->getFilename());
30
+ }
31
+ $this->setValue($text);
32
+ }
33
+
34
+ protected function getFilename() {
35
+ return Mage::getBaseDir().'/robots.txt';
36
+ }
37
+ }
app/code/local/Kvh/Simpleseo/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Kvh_Simpleseo>
5
- <version>0.2.0</version>
6
  </Kvh_Simpleseo>
7
  </modules>
8
 
@@ -71,12 +71,20 @@
71
  </kvh_simpleseo_page_edit_tab_content>
72
  </observers>
73
  </adminhtml_cms_page_edit_tab_meta_prepare_form>
 
74
 
75
 
76
 
77
 
 
78
  </events>
79
 
80
-
 
 
 
 
 
 
81
  </global>
82
  </config>
2
  <config>
3
  <modules>
4
  <Kvh_Simpleseo>
5
+ <version>0.3.0</version>
6
  </Kvh_Simpleseo>
7
  </modules>
8
 
71
  </kvh_simpleseo_page_edit_tab_content>
72
  </observers>
73
  </adminhtml_cms_page_edit_tab_meta_prepare_form>
74
+
75
 
76
 
77
 
78
 
79
+
80
  </events>
81
 
82
+ <rewrite>
83
+ <fancy_url>
84
+ <from><![CDATA[/simpleseo\/(.*)/]]></from>
85
+ <to><![CDATA[catalogsearch/result/index/?q=$1]]></to>
86
+ <complete>1</complete>
87
+ </fancy_url>
88
+ </rewrite>
89
  </global>
90
  </config>
app/code/local/Kvh/Simpleseo/etc/system.xml CHANGED
@@ -80,10 +80,9 @@
80
  <show_in_website>1</show_in_website>
81
  <show_in_store>1</show_in_store>
82
  </product_meta_description>
83
-
84
-
85
-
86
 
 
 
87
  </fields>
88
  </simpleseo>
89
  </groups>
80
  <show_in_website>1</show_in_website>
81
  <show_in_store>1</show_in_store>
82
  </product_meta_description>
 
 
 
83
 
84
+
85
+
86
  </fields>
87
  </simpleseo>
88
  </groups>
package.xml CHANGED
@@ -1,18 +1,40 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Kvh_Simpleseo</name>
4
- <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Set Meta Deta for Category Product and CMS Page</summary>
10
- <description>Set Meta Deta for Category Product and CMS Page</description>
11
- <notes>Add Field for Meta TItle for CMS Page</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <authors><author><name>Hitesh Agrawal</name><user>hiteshmca111</user><email>hiteshagrawal84@gmail.com</email></author></authors>
13
- <date>2014-05-03</date>
14
- <time>07:03:47</time>
15
- <contents><target name="magelocal"><dir name="Kvh"><dir name="Simpleseo"><dir name="Block"><dir name="Catalog"><dir name="Category"><file name="View.php" hash="323bfab0a57537cf31bb194249d742b0"/></dir><dir name="Product"><file name="View.php" hash="ed453215d56eb69d2d711ec90a00e714"/></dir></dir><dir name="Cms"><file name="Page.php" hash="fe3a5de0e4f077971f7b4f89b295e943"/></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Simpleseo"><file name="Collection.php" hash="5fbd40e6e9a88afd782347a366900844"/></dir><file name="Simpleseo.php" hash="f605ec62d70f16c372f22e64654c0ab6"/></dir><file name="Observer.php" hash="12cf363b801d3f040a6e72cc8d4eecbf"/><file name="Simpleseo.php" hash="cdd9f7ced30b06f8b82a83038bd3c883"/></dir><dir name="etc"><file name="config.xml" hash="fb31c1b447668ddff25d8e8c8f3fe1cc"/><file name="system.xml" hash="d211de5b39a2be97d9c9b34807df4de9"/></dir><dir name="sql"><dir name="simpleseo_setup"><file name="mysql4-install-0.2.0.php" hash="e6c4d3f985200a5f38b5f3465311d9cc"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Kvh_Simpleseo.xml" hash="6cb871dc56b9e5b4e0b13ef121723011"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Kvh_Simpleseo</name>
4
+ <version>0.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary> Set Dyanamic Meta Title , Meta Keyword, Meta Description for category and product and Meta Title for Cms Page </summary>
10
+ <description>SimpleSeo extension is use for set Dynamic Meta Data on Fly with a simple configuration&#xD;
11
+ &#xD;
12
+ You can set Meta Title , Meta Keyword and Meta Description dynamic&#xD;
13
+ &#xD;
14
+ Example: if your product name is XYZ Product and you want to set meta title like Buy XYZ Product from ABC Brand then you can set it by set configuration like Buy [product_name] from [product_manufacturer] Brand&#xD;
15
+ &#xD;
16
+ Instruction&#xD;
17
+ &#xD;
18
+ For Set Meta Data for Category and Product&#xD;
19
+ &#xD;
20
+ 1) Go to System &gt; Configuration&#xD;
21
+ &#xD;
22
+ 2) Select Catalog from left bar&#xD;
23
+ &#xD;
24
+ 3) Select Simple Seo Section&#xD;
25
+ &#xD;
26
+ 4) If you want to set the meta data formula then and want to use category attributes like name then you have to use like this [category_name] Where category_ is the prefix and name is the category attribute, you have to use prefix category_ for category attributes and prefix product_ for product attribute,&#xD;
27
+ &#xD;
28
+ Set Meta Title for CMS Page&#xD;
29
+ &#xD;
30
+ 1) Go to Cms &gt; Page &gt; Meta Data&#xD;
31
+ &#xD;
32
+ please check screenshot for more information</description>
33
+ <notes>Fix Price issue in meta data</notes>
34
  <authors><author><name>Hitesh Agrawal</name><user>hiteshmca111</user><email>hiteshagrawal84@gmail.com</email></author></authors>
35
+ <date>2014-06-06</date>
36
+ <time>04:13:00</time>
37
+ <contents><target name="magelocal"><dir name="Kvh"><dir name="Simpleseo"><dir name="Block"><dir name="Catalog"><dir name="Category"><file name="View.php" hash="323bfab0a57537cf31bb194249d742b0"/></dir><dir name="Product"><file name="View.php" hash="e88e6d447345d8fdb90b0a3b6493e4a4"/></dir></dir><dir name="Cms"><file name="Page.php" hash="fe3a5de0e4f077971f7b4f89b295e943"/></dir></dir><dir name="Model"><dir name="Mysql4"><dir name="Simpleseo"><file name="Collection.php" hash="5fbd40e6e9a88afd782347a366900844"/></dir><file name="Simpleseo.php" hash="f605ec62d70f16c372f22e64654c0ab6"/></dir><file name="Observer.php" hash="e43555c6324e205577018bc2cb2c78e2"/><file name="Simpleseo.php" hash="cdd9f7ced30b06f8b82a83038bd3c883"/><dir name="System"><dir name="Config"><file name="Robot.php" hash="e6805d2382790218abe97e7033d5d89a"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="2f534e56b09bfd5d650baeebcddcf972"/><file name="system.xml" hash="e6247817e2e369d904bbcc9b7ad93410"/></dir><dir name="sql"><dir name="simpleseo_setup"><file name="mysql4-install-0.2.0.php" hash="e6c4d3f985200a5f38b5f3465311d9cc"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Kvh_Simpleseo.xml" hash="6cb871dc56b9e5b4e0b13ef121723011"/></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>