SKU_Auto_Generator - Version 1.0.4

Version Notes

Automatically create SKUs for products that are manually added via admin or imported via CSV of XML files.

Download this release

Release Info

Developer Magento Core Team
Extension SKU_Auto_Generator
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/local/Neev/Skuautogenerate/Block/Adminhtml/Catalog/Product/Edit.php CHANGED
@@ -34,14 +34,19 @@
34
 
35
  class Neev_Skuautogenerate_Block_Adminhtml_Catalog_Product_Edit extends Mage_Adminhtml_Block_Catalog_Product_Edit
36
  {
37
-
 
 
 
 
 
38
 
39
 
40
  public function skuAuto($type)
41
  {
42
  $connection = Mage::getSingleton('core/resource')->getConnection('read');
43
  $table = Mage::getSingleton('core/resource')->getTableName('skuautogenerate');
44
- $skuauto = $connection->query("SELECT skuautogenerate_id,appendstring , min_length FROM {$table} WHERE status = 1 AND product_type='{$type}'");
45
  $skuautores=$skuauto->fetch();
46
  if(!$skuautores["skuautogenerate_id"]){
47
  $skuauto = $connection->query("SELECT * FROM {$table} WHERE product_type='unique'");
34
 
35
  class Neev_Skuautogenerate_Block_Adminhtml_Catalog_Product_Edit extends Mage_Adminhtml_Block_Catalog_Product_Edit
36
  {
37
+ public function __construct()
38
+ {
39
+ parent::__construct();
40
+ $this->setTemplate('skuautogenerate/catalog/product/edit.phtml');
41
+ $this->setId('product_edit');
42
+ }
43
 
44
 
45
  public function skuAuto($type)
46
  {
47
  $connection = Mage::getSingleton('core/resource')->getConnection('read');
48
  $table = Mage::getSingleton('core/resource')->getTableName('skuautogenerate');
49
+ $skuauto = $connection->query("SELECT * FROM {$table} WHERE status = 1 AND product_type='{$type}'");
50
  $skuautores=$skuauto->fetch();
51
  if(!$skuautores["skuautogenerate_id"]){
52
  $skuauto = $connection->query("SELECT * FROM {$table} WHERE product_type='unique'");
app/design/adminhtml/default/default/template/skuautogenerate/catalog/product/edit.phtml CHANGED
@@ -138,7 +138,6 @@ function setSettings(urlTemplate, setElement, typeElement) {
138
 
139
  <?php
140
  $getprevEntityId=$this->getprevEntityId();
141
- print_r($getprevEntityId);
142
  if($this->getRequest()->getParam('type') ):
143
  $skuautores= $this->skuAuto($this->getRequest()->getParam('type'));
144
  if($skuautores):
@@ -146,7 +145,6 @@ if($skuautores):
146
 
147
  <script type="text/javascript">
148
  if(document.getElementById('sku').value == ""){
149
- alert('hi');
150
  var skustring,finalskustring;
151
  var skustringtoprefix="<?php echo $skuautores["prefixstring"]; ?>";
152
  var minlen=<?php echo $skuautores["min_length"]; ?>;
138
 
139
  <?php
140
  $getprevEntityId=$this->getprevEntityId();
 
141
  if($this->getRequest()->getParam('type') ):
142
  $skuautores= $this->skuAuto($this->getRequest()->getParam('type'));
143
  if($skuautores):
145
 
146
  <script type="text/javascript">
147
  if(document.getElementById('sku').value == ""){
 
148
  var skustring,finalskustring;
149
  var skustringtoprefix="<?php echo $skuautores["prefixstring"]; ?>";
150
  var minlen=<?php echo $skuautores["min_length"]; ?>;
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SKU_Auto_Generator</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Automatically create SKUs for products that are manually added via admin or imported via CSV of XML files.</notes>
12
  <authors><author><name>saurab_chandra</name><user>auto-converted</user><email>magentoaccount@neevtech.com</email></author></authors>
13
  <date>2013-02-15</date>
14
- <time>13:19:28</time>
15
- <contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Neev"><dir name="Skuautogenerate"><dir name="Block"><file name="Skuautogenerate.php" hash="5c4fa69402f87f9ac3a0aa15ca790b58"/><dir name="Adminhtml"><file name="Skuautogenerate.php" hash="dd8e6d26cba313240428e8cc7f5a9fc3"/><dir name="Catalog"><dir name="Product"><file name="Edit.php" hash="f4b93a5482b5a5334a7fa6040b68a794"/></dir></dir><dir name="Skuautogenerate"><file name="Edit.php" hash="5630983d8c038d4772e996b5bbf5868c"/><file name="Grid.php" hash="927513b143d1ec99532fa5a71903f967"/><dir name="Edit"><file name="Form.php" hash="6d3cea1cb156ab627f78be0809ef69f1"/><file name="Tabs.php" hash="7e3677bb77a034f28742cbd8cebafac4"/><dir name="Tab"><file name="Form.php" hash="b395242561f3880f45fac6b534ba0457"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="14a0aa7d2586c277fbe896dc379f2bce"/><dir name="Adminhtml"><file name="SkuautogenerateController.php" hash="741da95b0774e7835958d4984f08c402"/></dir></dir><dir name="etc"><file name="config.xml" hash="fecc9aa2b9129bfb86a8a30ae23f8a7f"/></dir><dir name="Helper"><file name="Data.php" hash="4e9fb6d3fa6104bbf645815831615bf7"/></dir><dir name="Model"><file name="Skuautogenerate.php" hash="1b3d1452e9152f0225d0055205edb5f0"/><file name="Status.php" hash="044ca08797c2ac7643e14c65d1e7cbc6"/><dir name="Mysql4"><file name="Skuautogenerate.php" hash="b2fc3235c1dfc0c7592354597fff696e"/><dir name="Skuautogenerate"><file name="Collection.php" hash="cd83d79930f6141b72f4eb885d648522"/></dir></dir></dir><dir name="sql"><dir name="skuautogenerate_setup"><file name="mysql4-install-0.1.0.php" hash="255a1f9c7199d43b88a216f0b3db2514"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="skuautogenerate.xml" hash="daaef43e86f6b7da79c2d48cd5d1ca15"/></dir><dir name="template"><dir name="skuautogenerate"><dir name="catalog"><dir name="product"><file name="edit.phtml" hash="32db0b8eeef3921f004db969c2e18283"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Neev_Skuautogenerate.xml" hash="bcbd229d7ef67308e8b8802233d96da2"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>SKU_Auto_Generator</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
11
  <notes>Automatically create SKUs for products that are manually added via admin or imported via CSV of XML files.</notes>
12
  <authors><author><name>saurab_chandra</name><user>auto-converted</user><email>magentoaccount@neevtech.com</email></author></authors>
13
  <date>2013-02-15</date>
14
+ <time>13:50:12</time>
15
+ <contents><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Neev"><dir name="Skuautogenerate"><dir name="Block"><file name="Skuautogenerate.php" hash="5c4fa69402f87f9ac3a0aa15ca790b58"/><dir name="Adminhtml"><file name="Skuautogenerate.php" hash="dd8e6d26cba313240428e8cc7f5a9fc3"/><dir name="Catalog"><dir name="Product"><file name="Edit.php" hash="5c6a7925e102a34897cc3b62ca082c01"/></dir></dir><dir name="Skuautogenerate"><file name="Edit.php" hash="5630983d8c038d4772e996b5bbf5868c"/><file name="Grid.php" hash="927513b143d1ec99532fa5a71903f967"/><dir name="Edit"><file name="Form.php" hash="6d3cea1cb156ab627f78be0809ef69f1"/><file name="Tabs.php" hash="7e3677bb77a034f28742cbd8cebafac4"/><dir name="Tab"><file name="Form.php" hash="b395242561f3880f45fac6b534ba0457"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="14a0aa7d2586c277fbe896dc379f2bce"/><dir name="Adminhtml"><file name="SkuautogenerateController.php" hash="741da95b0774e7835958d4984f08c402"/></dir></dir><dir name="etc"><file name="config.xml" hash="fecc9aa2b9129bfb86a8a30ae23f8a7f"/></dir><dir name="Helper"><file name="Data.php" hash="4e9fb6d3fa6104bbf645815831615bf7"/></dir><dir name="Model"><file name="Skuautogenerate.php" hash="1b3d1452e9152f0225d0055205edb5f0"/><file name="Status.php" hash="044ca08797c2ac7643e14c65d1e7cbc6"/><dir name="Mysql4"><file name="Skuautogenerate.php" hash="b2fc3235c1dfc0c7592354597fff696e"/><dir name="Skuautogenerate"><file name="Collection.php" hash="cd83d79930f6141b72f4eb885d648522"/></dir></dir></dir><dir name="sql"><dir name="skuautogenerate_setup"><file name="mysql4-install-0.1.0.php" hash="255a1f9c7199d43b88a216f0b3db2514"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="skuautogenerate.xml" hash="daaef43e86f6b7da79c2d48cd5d1ca15"/></dir><dir name="template"><dir name="skuautogenerate"><dir name="catalog"><dir name="product"><file name="edit.phtml" hash="822d0a463eac092bcd29e2753f572e31"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Neev_Skuautogenerate.xml" hash="bcbd229d7ef67308e8b8802233d96da2"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>