Designcomplex_Producturlkey - Version 1.0.1

Version Notes

fixed minor errors

Download this release

Release Info

Developer Thomas Klosinsky
Extension Designcomplex_Producturlkey
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Designcomplex/Producturlkey/Model/Observer.php CHANGED
@@ -18,23 +18,14 @@
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  */
20
 
21
- class Designcomplex_Producturlkey_Model_Observer {
22
  public function updateurl($observer){
23
  //Mage::log('URLKey log', null, 'urlkey.log');
24
  if($observer->getEvent()->getProduct()){
25
  $Product=$observer->getEvent()->getProduct();
26
  $Url='';
27
- /* Manufacturer added to urlkey */
28
- if(!is_null($Product->getData('manufacturer'))):
29
- $Url=$Url.$Product->getAttributeText('manufacturer').'-';
30
- endif;
31
- /* Name added to urlkey */
32
- if(!is_null($Product->getData('name'))):
33
- $Url=$Url.$Product->getData('name');
34
- endif;
35
- /* SKU added to urlkey */
36
- if(!is_null($Product->getData('sku'))):
37
- $Url=$Url.$Product->getData('sku').'-';
38
  endif;
39
  //Mage::log('URLKey log'.$Url, null, 'urlkey.log');
40
  $Product->setData('url_key',$Url);
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  */
20
 
21
+ class Designcomplex_Producturlkey_Model_Observer{
22
  public function updateurl($observer){
23
  //Mage::log('URLKey log', null, 'urlkey.log');
24
  if($observer->getEvent()->getProduct()){
25
  $Product=$observer->getEvent()->getProduct();
26
  $Url='';
27
+ if(!is_null($Product->getData('matchcode'))):
28
+ $Url=$Url.$Product->getData('matchcode');
 
 
 
 
 
 
 
 
 
29
  endif;
30
  //Mage::log('URLKey log'.$Url, null, 'urlkey.log');
31
  $Product->setData('url_key',$Url);
app/code/community/Designcomplex/Producturlkey/etc/config.xml CHANGED
@@ -28,7 +28,7 @@
28
  <global>
29
  <models>
30
  <Designcomplex_Producturlkey>
31
- <class>Designcomplex_Urlkey_Model</class>
32
  </Designcomplex_Producturlkey>
33
  </models>
34
  </global>
@@ -38,7 +38,7 @@
38
  <observers>
39
  <Designcomplex_Producturlkey>
40
  <type>singleton</type>
41
- <class>Designcomplex_Urlkey/observer</class>
42
  <method>updateurl</method>
43
  </Designcomplex_Producturlkey>
44
  </observers>
28
  <global>
29
  <models>
30
  <Designcomplex_Producturlkey>
31
+ <class>Designcomplex_Producturlkey_Model</class>
32
  </Designcomplex_Producturlkey>
33
  </models>
34
  </global>
38
  <observers>
39
  <Designcomplex_Producturlkey>
40
  <type>singleton</type>
41
+ <class>Designcomplex_Producturlkey/observer</class>
42
  <method>updateurl</method>
43
  </Designcomplex_Producturlkey>
44
  </observers>
package.xml CHANGED
@@ -1,38 +1,44 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Designcomplex_Producturlkey</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
- <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>autofill urlkey with attributes like manufacturer, name, sku, custom attributes, etc. on product save</summary>
10
- <description>&lt;p&gt;With this extension you can manage an autofill of the urlkey from all possible attributes&lt;/p&gt;&#xD;
11
  &#xD;
12
- &lt;p&gt;&amp;lt;strong&amp;gt;IMPORTANT!&amp;lt;strong&amp;gt;&lt;br /&gt;&#xD;
13
- This extension requires file modification for customization.&lt;/p&gt;&#xD;
14
  &#xD;
15
- &lt;p&gt;Standard setup is:&lt;br /&gt;&#xD;
16
- &amp;lt;strong&amp;gt;manufacturer-name-skugetData('manufacturer'))):&#xD;
17
- $Url=$Url.$Product-&amp;gt;getAttributeText('manufacturer').'-';&#xD;
18
- endif;&#xD;
19
- /* Name added to urlkey */&#xD;
20
- if(!is_null($Product-&amp;gt;getData('name'))):&#xD;
21
- $Url=$Url.$Product-&amp;gt;getData('name');&#xD;
22
- endif;&#xD;
23
- /* SKU added to urlkey */&#xD;
24
- if(!is_null($Product-&amp;gt;getData('sku'))):&#xD;
25
- $Url=$Url.$Product-&amp;gt;getData('sku').'-';&#xD;
26
- endif;&#xD;
27
  &#xD;
 
 
28
  &#xD;
29
- &lt;p /&gt;If there are any questions, please let me know&lt;/p&gt;&#xD;
30
- &lt;p&gt;If there are people out who could help with system.xml and AdminOptions for this extension, please also let me know and help the community to have a better user interface.&lt;/p&gt;</description>
31
- <notes>system.xml coders wanted!</notes>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <authors><author><name>Thomas Klosinsky</name><user>thomasklosinsky</user><email>thomas@designcomplex.de</email></author></authors>
33
- <date>2014-10-08</date>
34
- <time>05:47:32</time>
35
- <contents><target name="magecommunity"><dir name="Designcomplex"><dir name="Producturlkey"><dir name="Model"><file name="Observer.php" hash="6d0114330f4c559f1173acd2968647b6"/></dir><dir name="etc"><file name="config.xml" hash="24d20f75a57d2f2e1ed257df21638f8c"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Designcomplex_Producturlkey.xml" hash="24e50ca845668b2da93ff36e38e1644e"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
38
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Designcomplex_Producturlkey</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
+ <license>OSL 3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>autofill urlkey with attributes like manufacturer, name, sku, custom attributes, etc. on product save </summary>
10
+ <description>With this extension you can manage an autofill of the urlkey from all possible attributes&#xD;
11
  &#xD;
12
+ IMPORTANT!&#xD;
13
+ This extension requires file modification for customization.&#xD;
14
  &#xD;
15
+ Standard setup is:&#xD;
16
+ manufacturer-name-sku&#xD;
 
 
 
 
 
 
 
 
 
 
17
  &#xD;
18
+ To modify the setup you need to change the following lines in&#xD;
19
+ /app/code/community/Designcomplex/Model/Observer.php&#xD;
20
  &#xD;
21
+ /* Manufacturer added to urlkey */&#xD;
22
+ if(!is_null($Product-&gt;getData('manufacturer'))):&#xD;
23
+ $Url=$Url.$Product-&gt;getAttributeText('manufacturer').'-';&#xD;
24
+ endif;&#xD;
25
+ /* Name added to urlkey */&#xD;
26
+ if(!is_null($Product-&gt;getData('name'))):&#xD;
27
+ $Url=$Url.$Product-&gt;getData('name');&#xD;
28
+ endif;&#xD;
29
+ /* SKU added to urlkey */&#xD;
30
+ if(!is_null($Product-&gt;getData('sku'))):&#xD;
31
+ $Url=$Url.$Product-&gt;getData('sku').'-';&#xD;
32
+ endif;&#xD;
33
+ &#xD;
34
+ If there are any questions, please let me know&#xD;
35
+ &#xD;
36
+ If there are people out who could help with system.xml and AdminOptions for this extension, please also let me know and help the community to have a better user interface.</description>
37
+ <notes>fixed minor errors</notes>
38
  <authors><author><name>Thomas Klosinsky</name><user>thomasklosinsky</user><email>thomas@designcomplex.de</email></author></authors>
39
+ <date>2015-02-24</date>
40
+ <time>15:43:18</time>
41
+ <contents><target name="magecommunity"><dir name="Designcomplex"><dir name="Producturlkey"><dir name="Model"><file name="Observer.php" hash="7e5f9cdc82fe95de347abcee95b28ac3"/></dir><dir name="etc"><file name="config.xml" hash="ad9c14d4905701a3d610a8f750351d15"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Designcomplex_Producturlkey.xml" hash="24e50ca845668b2da93ff36e38e1644e"/></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
44
  </package>