Iweb_Dropshipper - Version 1.0.2

Version Notes

This Module is used to assign item to dropshipper.When order get Placed then admin can send Dropshipper mail from admin or can send mail automatically by selecting option from admin To Notify Dropshipper That Your item has been Placed with Shiping Info.

Download this release

Release Info

Developer sujit
Extension Iweb_Dropshipper
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/local/Iweb/Dropshipper/Model/Observer.php CHANGED
@@ -19,19 +19,21 @@ class Iweb_Dropshipper_Model_Observer extends Mage_Adminhtml_Block_Widget_Grid_C
19
  $order = $observer->getEvent()->getOrder();
20
  if($order)
21
  {
22
- $items = $order->getAllItems();
23
  foreach($items as $val)
24
  {
25
  $id = $val->getProductId();
26
  $_product = Mage::getModel('catalog/product')->load($id);
 
27
  $dropshipper = Mage::getModel('iweb_dropshipper/product')->getDropshipper($_product);
28
- if($_product ->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE && $dropshipper)
29
  {
30
- $data['dshipper_id'] = $dropshipper->getDshipperId();
31
  $data['item_id'] = $val->getId();
32
  $model = Mage::getModel('iweb_dropshipper/order');
33
  $model->setData($data);
34
  $model->save();
 
35
  }
36
  }
37
  }
@@ -58,6 +60,7 @@ class Iweb_Dropshipper_Model_Observer extends Mage_Adminhtml_Block_Widget_Grid_C
58
  }
59
  }
60
  }
 
61
  }
62
 
63
  public function sendMail(Varien_Event_Observer $observer)
19
  $order = $observer->getEvent()->getOrder();
20
  if($order)
21
  {
22
+ $items = $order->getAllVisibleItems();
23
  foreach($items as $val)
24
  {
25
  $id = $val->getProductId();
26
  $_product = Mage::getModel('catalog/product')->load($id);
27
+
28
  $dropshipper = Mage::getModel('iweb_dropshipper/product')->getDropshipper($_product);
29
+ if($_product ->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_SIMPLE && $dropshipper->getId())
30
  {
31
+ $data['dshipper_id'] = $dropshipper->getDshipperId();
32
  $data['item_id'] = $val->getId();
33
  $model = Mage::getModel('iweb_dropshipper/order');
34
  $model->setData($data);
35
  $model->save();
36
+
37
  }
38
  }
39
  }
60
  }
61
  }
62
  }
63
+ return $this;
64
  }
65
 
66
  public function sendMail(Varien_Event_Observer $observer)
app/code/local/Iweb/Dropshipper/Model/Product.php CHANGED
@@ -64,7 +64,9 @@ class Iweb_Dropshipper_Model_Product extends Mage_Core_Model_Abstract
64
  }
65
 
66
  public function getDropshipper($product){
67
- $dropShipperData = Mage::getModel('iweb_dropshipper/product')->load($product->getId(), 'product_id');
 
 
68
  return $dropShipperData;
69
  }
70
 
64
  }
65
 
66
  public function getDropshipper($product){
67
+ $dropShipperData = Mage::getModel('iweb_dropshipper/product')->getCollection()
68
+ ->addFieldToFilter('product_id',$product->getId())
69
+ ->getFirstItem();
70
  return $dropShipperData;
71
  }
72
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Iweb_Dropshipper</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -11,9 +11,9 @@
11
  <description>This Module is used to assign item to dropshipper.When order get Placed then admin can send Dropshipper mail from admin or can send mail automatically by selecting option from admin To Notify Dropshipper That Your item has been Placed with Shiping Info.</description>
12
  <notes>This Module is used to assign item to dropshipper.When order get Placed then admin can send Dropshipper mail from admin or can send mail automatically by selecting option from admin To Notify Dropshipper That Your item has been Placed with Shiping Info.</notes>
13
  <authors><author><name>sujit</name><user>suju</user><email>suju.eathen@gmail.com</email></author></authors>
14
- <date>2013-02-13</date>
15
- <time>05:27:47</time>
16
- <contents><target name="magelocal"><dir name="Iweb"><dir name="Dropshipper"><dir name="Block"><dir name="Adminhtml"><dir name="Dropshipper"><dir name="Edit"><file name="Form.php" hash="d5333bb2a2896e68ffc4f4cacd180872"/><dir name="Tab"><dir name="Ajax"><file name="Serializer.php" hash="bdfba8d7ad8458b81b982d159919146e"/></dir><file name="Form.php" hash="59c8949525251707ca7b47d2dc4b55c6"/><file name="Product.php" hash="2c45adfeb68cb57ec493e5264d0e78e6"/></dir><file name="Tabs.php" hash="d0adb69b2e2dd702d42afc57a3d3bdaa"/></dir><file name="Edit.php" hash="8733ea1b1a17f1143654339c92270cc4"/><file name="Grid.php" hash="2f3563fe6b996ed4f619fdd88435366c"/></dir><file name="Dropshipper.php" hash="d636b813af7e6908af23ff04f190c018"/><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Dropshipper.php" hash="14b0fe511aca4493b027d33b683a396f"/></dir></dir></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Input.php" hash="a4911063350ff29c147ec2428c239345"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2be35e7b90c61aa3f05cf7adf6d962f7"/></dir><dir name="Model"><file name="Dropshipper.php" hash="1ce8c732f21ceb47b4983e508e7237f8"/><file name="Observer.php" hash="8ef925128f089de8f8b222adc9a72098"/><file name="Order.php" hash="cd0efb5e1ec2027c6ddce51e60fc28b6"/><file name="Product.php" hash="eaa7148bc2cddfa1c4ac2233c58ed750"/><dir name="Resource"><dir name="Dropshipper"><file name="Collection.php" hash="f0bb7c5b943c98aeee9f646986cf3d69"/></dir><file name="Dropshipper.php" hash="1af40dcf4a00b1cdc14d2c68749e56c0"/><dir name="Order"><file name="Collection.php" hash="c9cb7843803e4cb0afee9d84b4bab3c5"/></dir><file name="Order.php" hash="606ef1913c3175d9a37c394f2e71ebcd"/><dir name="Product"><file name="Collection.php" hash="624a31554a2524d89755dac35ccfc893"/></dir><file name="Product.php" hash="849e9e96c2aef1dea2d1db87a60a187f"/></dir><file name="Status.php" hash="18190728774bb2a8393b6c182c5e8eba"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Order"><file name="Status.php" hash="a0d85b2608aabdc2fc7905ed495a90c5"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="DropshipperController.php" hash="d60f2f595bf8d841b5e574a51afd6d26"/><file name="OrderController.php" hash="d73ee8b8d1708290a92de4af0181695f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b14023d52b784736530a120e2563fcb8"/><file name="config.xml" hash="3c12ca1c8d01291da73c0629602e8739"/><file name="system.xml" hash="83b3a5a5c28cf87135090b68d3525abf"/></dir><dir name="sql"><dir name="iweb_dropshipper_setup"><file name="mysql4-install-0.0.1.php" hash="e2d96f5418f09c585a29b78ce55aad4a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iweb-dropshipper.xml" hash="b13f7eee642b333512d73f8a2c84ad0c"/></dir><dir name="template"><dir name="dropshipper"><dir name="order"><dir name="view"><file name="products.phtml" hash="25d8ed0fcf512392631314319716519f"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="iweb-dropshipper.xml" hash="95d7163435c2feb6c7f97ad4e960131c"/></dir><dir name="template"><dir name="dropshipper"><dir name="email"><dir name="items"><file name="default.phtml" hash="49202c1db999a69f7fc8355e4e472ed6"/></dir><file name="items.phtml" hash="34493bbe93b09320d4ec5d5862699ed0"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="app"><dir name="locale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="sales"><file name="dropshipper.html" hash="41b6dad744c8262b7e7b41c62442e4f5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Iweb_Dropshipper.xml" hash="e3101a7068e78578ebc14b27cee5ced2"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Iweb_Dropshipper</name><channel>community</channel><min>1.5</min><max>1.7</max></package></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Iweb_Dropshipper</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
11
  <description>This Module is used to assign item to dropshipper.When order get Placed then admin can send Dropshipper mail from admin or can send mail automatically by selecting option from admin To Notify Dropshipper That Your item has been Placed with Shiping Info.</description>
12
  <notes>This Module is used to assign item to dropshipper.When order get Placed then admin can send Dropshipper mail from admin or can send mail automatically by selecting option from admin To Notify Dropshipper That Your item has been Placed with Shiping Info.</notes>
13
  <authors><author><name>sujit</name><user>suju</user><email>suju.eathen@gmail.com</email></author></authors>
14
+ <date>2013-02-21</date>
15
+ <time>05:01:38</time>
16
+ <contents><target name="magelocal"><dir name="Iweb"><dir name="Dropshipper"><dir name="Block"><dir name="Adminhtml"><dir name="Dropshipper"><dir name="Edit"><file name="Form.php" hash="d5333bb2a2896e68ffc4f4cacd180872"/><dir name="Tab"><dir name="Ajax"><file name="Serializer.php" hash="bdfba8d7ad8458b81b982d159919146e"/></dir><file name="Form.php" hash="59c8949525251707ca7b47d2dc4b55c6"/><file name="Product.php" hash="2c45adfeb68cb57ec493e5264d0e78e6"/></dir><file name="Tabs.php" hash="d0adb69b2e2dd702d42afc57a3d3bdaa"/></dir><file name="Edit.php" hash="8733ea1b1a17f1143654339c92270cc4"/><file name="Grid.php" hash="2f3563fe6b996ed4f619fdd88435366c"/></dir><file name="Dropshipper.php" hash="d636b813af7e6908af23ff04f190c018"/><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Dropshipper.php" hash="14b0fe511aca4493b027d33b683a396f"/></dir></dir></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Input.php" hash="a4911063350ff29c147ec2428c239345"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="2be35e7b90c61aa3f05cf7adf6d962f7"/></dir><dir name="Model"><file name="Dropshipper.php" hash="1ce8c732f21ceb47b4983e508e7237f8"/><file name="Observer.php" hash="4796fa37b2d20e5494313572a699ffa0"/><file name="Order.php" hash="cd0efb5e1ec2027c6ddce51e60fc28b6"/><file name="Product.php" hash="b38dbe6de7ba342df04d93ed4b652a59"/><dir name="Resource"><dir name="Dropshipper"><file name="Collection.php" hash="f0bb7c5b943c98aeee9f646986cf3d69"/></dir><file name="Dropshipper.php" hash="1af40dcf4a00b1cdc14d2c68749e56c0"/><dir name="Order"><file name="Collection.php" hash="c9cb7843803e4cb0afee9d84b4bab3c5"/></dir><file name="Order.php" hash="606ef1913c3175d9a37c394f2e71ebcd"/><dir name="Product"><file name="Collection.php" hash="624a31554a2524d89755dac35ccfc893"/></dir><file name="Product.php" hash="849e9e96c2aef1dea2d1db87a60a187f"/></dir><file name="Status.php" hash="18190728774bb2a8393b6c182c5e8eba"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Order"><file name="Status.php" hash="a0d85b2608aabdc2fc7905ed495a90c5"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="DropshipperController.php" hash="d60f2f595bf8d841b5e574a51afd6d26"/><file name="OrderController.php" hash="d73ee8b8d1708290a92de4af0181695f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b14023d52b784736530a120e2563fcb8"/><file name="config.xml" hash="3c12ca1c8d01291da73c0629602e8739"/><file name="system.xml" hash="83b3a5a5c28cf87135090b68d3525abf"/></dir><dir name="sql"><dir name="iweb_dropshipper_setup"><file name="mysql4-install-0.0.1.php" hash="e2d96f5418f09c585a29b78ce55aad4a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="iweb-dropshipper.xml" hash="b13f7eee642b333512d73f8a2c84ad0c"/></dir><dir name="template"><dir name="dropshipper"><dir name="order"><dir name="view"><file name="products.phtml" hash="25d8ed0fcf512392631314319716519f"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="iweb-dropshipper.xml" hash="95d7163435c2feb6c7f97ad4e960131c"/></dir><dir name="template"><dir name="dropshipper"><dir name="email"><dir name="items"><file name="default.phtml" hash="49202c1db999a69f7fc8355e4e472ed6"/></dir><file name="items.phtml" hash="34493bbe93b09320d4ec5d5862699ed0"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="app"><dir name="locale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="sales"><file name="dropshipper.html" hash="41b6dad744c8262b7e7b41c62442e4f5"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Iweb_Dropshipper.xml" hash="e3101a7068e78578ebc14b27cee5ced2"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Iweb_Dropshipper</name><channel>community</channel><min>1.5</min><max>1.7</max></package></required></dependencies>
19
  </package>