Adventos_CustomizableId - Version 1.0.1

Version Notes

Bugfix
OrderIds with more then 9 digits will be transformed

Download this release

Release Info

Developer Karsten Hoffmann
Extension Adventos_CustomizableId
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/local/Adventos/CustomizableId/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Adventos_CustomizableId>
5
- <version>1.0.0</version>
6
  </Adventos_CustomizableId>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Adventos_CustomizableId>
5
+ <version>1.0.1</version>
6
  </Adventos_CustomizableId>
7
  </modules>
8
  <global>
app/code/local/Mage/Sales/Model/Order.php CHANGED
@@ -2041,16 +2041,16 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
2041
  ->fetchNewIncrementId($this->getStoreId());
2042
  $this->setIncrementId($incrementId);
2043
  }
2044
-
2045
- if (Mage::getStoreConfig('adventos/customizableId/process') && strlen($this->getIncrementId()) == 9 ){
2046
- $custom_prefix = Mage::getStoreConfig('adventos/customizableId/order_prefix');
2047
- if (Mage::getStoreConfig('adventos/customizableId/process_country')){
2048
- $country = $this->getBillingAddress()->getCountry();
2049
- $this->setIncrementId(strtoupper($custom_prefix).strtoupper($country).$this->getIncrementId());
2050
- }else{
2051
- $this->setIncrementId(strtoupper($custom_prefix).$this->getIncrementId());
2052
- }
2053
  }
 
2054
 
2055
  /**
2056
  * Process items dependency for new order
2041
  ->fetchNewIncrementId($this->getStoreId());
2042
  $this->setIncrementId($incrementId);
2043
  }
2044
+
2045
+ if (Mage::getStoreConfig('adventos/customizableId/process') && ctype_digit($this->getIncrementId())){
2046
+ $custom_prefix = Mage::getStoreConfig('adventos/customizableId/order_prefix');
2047
+ if (Mage::getStoreConfig('adventos/customizableId/process_country')){
2048
+ $country = $this->getBillingAddress()->getCountry();
2049
+ $this->setIncrementId(strtoupper($custom_prefix).strtoupper($country).$this->getIncrementId());
2050
+ }else{
2051
+ $this->setIncrementId(strtoupper($custom_prefix).$this->getIncrementId());
 
2052
  }
2053
+ }
2054
 
2055
  /**
2056
  * Process items dependency for new order
package.xml CHANGED
@@ -1,18 +1,19 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Adventos_CustomizableId</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Add Prefix to OrderId</summary>
10
  <description>Add Custom Prefix with optinal Country Shortcut from Billing Address to OrderId.</description>
11
- <notes>Init Extention</notes>
 
12
  <authors><author><name>Karsten Hoffmann</name><user>adventos</user><email>karsten@adventos.de</email></author></authors>
13
- <date>2013-01-29</date>
14
- <time>12:26:11</time>
15
- <contents><target name="magelocal"><dir name="Adventos"><dir name="CustomizableId"><dir name="Helper"><file name="Data.php" hash="83f8320f8eb925bd98acc33c7776bf20"/></dir><dir name="etc"><file name="config.xml" hash="f29f8c002d9704e95c564cfe3826fb23"/><file name="system.xml" hash="a31a65e697f9e9d2bb7c10db054a5b11"/></dir></dir></dir><dir name="Mage"><dir name="Sales"><dir name="Model"><file name="Order.php" hash="2bb28909440da60bcd8f4e1e9444fe55"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adventos_CustomizableId.xml" hash="7f6a53a16a0bf2ae65a4512312a39954"/></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>Adventos_CustomizableId</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Add Prefix to OrderId</summary>
10
  <description>Add Custom Prefix with optinal Country Shortcut from Billing Address to OrderId.</description>
11
+ <notes>Bugfix&#xD;
12
+ OrderIds with more then 9 digits will be transformed</notes>
13
  <authors><author><name>Karsten Hoffmann</name><user>adventos</user><email>karsten@adventos.de</email></author></authors>
14
+ <date>2013-02-04</date>
15
+ <time>11:27:42</time>
16
+ <contents><target name="magelocal"><dir name="Adventos"><dir name="CustomizableId"><dir name="Helper"><file name="Data.php" hash="83f8320f8eb925bd98acc33c7776bf20"/></dir><dir name="etc"><file name="config.xml" hash="94c046b91817dbdb9551cd3312993400"/><file name="system.xml" hash="a31a65e697f9e9d2bb7c10db054a5b11"/></dir></dir></dir><dir name="Mage"><dir name="Sales"><dir name="Model"><file name="Order.php" hash="533ba4b0a47a166e41995bbc29211bfe"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adventos_CustomizableId.xml" hash="7f6a53a16a0bf2ae65a4512312a39954"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>