Minubo_Interface - Version 1.0.3

Version Notes

Performance-Enhancements Order, Order-Items, Customers; Code-Review

Download this release

Release Info

Developer sven rothe
Extension Minubo_Interface
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

Files changed (32) hide show
  1. app/code/community/Minubo/Interface/Block/Adminhtml/Authhash.php +4 -3
  2. app/code/community/Minubo/Interface/Block/Adminhtml/System/Config/Form/Button.php +12 -10
  3. app/code/community/Minubo/Interface/Helper/Data.php +3 -3
  4. app/code/community/Minubo/Interface/Model/Export/Abstractcsv.php +4 -26
  5. app/code/community/Minubo/Interface/Model/Export/Csv.php +27 -503
  6. app/code/community/Minubo/Interface/Model/Export/Status.php +8 -8
  7. app/code/community/Minubo/Interface/Model/Mysql4/Categories.php +47 -46
  8. app/code/community/Minubo/Interface/Model/Mysql4/Categories2.php +25 -25
  9. app/code/community/Minubo/Interface/Model/Mysql4/Categories3.php +25 -25
  10. app/code/community/Minubo/Interface/Model/Mysql4/Creditmemoitems.php +47 -47
  11. app/code/community/Minubo/Interface/Model/Mysql4/Creditmemos.php +47 -47
  12. app/code/community/Minubo/Interface/Model/Mysql4/Customeraddresses.php +1 -1
  13. app/code/community/Minubo/Interface/Model/Mysql4/Customers.php +1 -1
  14. app/code/community/Minubo/Interface/Model/Mysql4/Invoiceitems.php +46 -46
  15. app/code/community/Minubo/Interface/Model/Mysql4/Invoices.php +47 -47
  16. app/code/community/Minubo/Interface/Model/Mysql4/Orderaddresses.php +46 -29
  17. app/code/community/Minubo/Interface/Model/Mysql4/Orderitems.php +66 -0
  18. app/code/community/Minubo/Interface/Model/Mysql4/Orders.php +109 -0
  19. app/code/community/Minubo/Interface/Model/Mysql4/Productattributes.php +8 -8
  20. app/code/community/Minubo/Interface/Model/Mysql4/Productcategories.php +46 -46
  21. app/code/community/Minubo/Interface/Model/Mysql4/Products.php +49 -48
  22. app/code/community/Minubo/Interface/Model/Mysql4/Products2.php +48 -34
  23. app/code/community/Minubo/Interface/Model/Mysql4/Products3.php +48 -34
  24. app/code/community/Minubo/Interface/Model/Mysql4/Regions.php +44 -44
  25. app/code/community/Minubo/Interface/Model/Options/Options.php +11 -11
  26. app/code/community/Minubo/Interface/Model/Options/Version.php +9 -9
  27. app/code/community/Minubo/Interface/Model/Read/Collections.php +13 -88
  28. app/code/community/Minubo/Interface/Model/Read/Common.php +16 -5
  29. app/code/community/Minubo/Interface/Model/Tables.php +6 -6
  30. app/code/community/Minubo/Interface/controllers/ExportController.php +33 -145
  31. app/code/community/Minubo/Interface/etc/config.xml +16 -1
  32. package.xml +5 -5
app/code/community/Minubo/Interface/Block/Adminhtml/Authhash.php CHANGED
@@ -16,12 +16,13 @@ class Minubo_Interface_Block_Adminhtml_Authhash extends Mage_Adminhtml_Block_Sys
16
  *
17
  * @param Varien_Data_Form_Element_Abstract $element
18
  * @return string
19
- */
20
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
21
  {
22
  return $this->_toHtml();
23
  }
24
-
 
25
  /**
26
  * Return ajax url for button
27
  *
@@ -47,7 +48,7 @@ class Minubo_Interface_Block_Adminhtml_Authhash extends Mage_Adminhtml_Block_Sys
47
  )
48
  );
49
 
50
- return $button->toHtml();
51
  }
52
 
53
 
16
  *
17
  * @param Varien_Data_Form_Element_Abstract $element
18
  * @return string
19
+
20
  protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
21
  {
22
  return $this->_toHtml();
23
  }
24
+ */
25
+
26
  /**
27
  * Return ajax url for button
28
  *
48
  )
49
  );
50
 
51
+ return $button->_toHtml();
52
  }
53
 
54
 
app/code/community/Minubo/Interface/Block/Adminhtml/System/Config/Form/Button.php CHANGED
@@ -20,17 +20,19 @@ class Minubo_Interface_Block_Adminhtml_System_Config_Form_Button extends Mage_Ad
20
  {
21
  // $html = $this->_toHtml();
22
 
23
- $this->setElement($element);
24
- $url = $this->getUrl('minuboface/export/newHash');
25
-
26
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
27
- ->setType('button')
28
- ->setClass('scalable')
29
- ->setLabel('Generate')
30
- ->setOnClick("javscript:function rs(l, c) { l = l || 30; c = c || '0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789'; var r = ''; for (var i = 0; i < l; i++) { var p = Math.floor(Math.random() * c.length); r += c.substring(p,p+1); } return r; } document.getElementById('minubo_interface_settings_hash').value=rs()")
31
- ->toHtml();
 
 
 
32
 
33
-
34
  return $html;
35
  }
36
 
20
  {
21
  // $html = $this->_toHtml();
22
 
23
+ $this->setElement($element);
24
+
25
+ // replaced by javascript-function
26
+ // $url = $this->getUrl('minuboface/export/newHash');
27
+
28
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
29
+ ->setType('button')
30
+ ->setClass('scalable')
31
+ ->setLabel('Generate')
32
+ ->setOnClick("javscript:function rs(l, c) { l = l || 30; c = c || '0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789'; var r = ''; for (var i = 0; i < l; i++) { var p = Math.floor(Math.random() * c.length); r += c.substring(p,p+1); } return r; } document.getElementById('minubo_interface_settings_hash').value=rs()")
33
+ ->toHtml();
34
+
35
 
 
36
  return $html;
37
  }
38
 
app/code/community/Minubo/Interface/Helper/Data.php CHANGED
@@ -1,4 +1,4 @@
1
- <?php
2
- class Minubo_Interface_Helper_Data extends Mage_Core_Helper_Abstract
3
- {
4
  }
1
+ <?php
2
+ class Minubo_Interface_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
  }
app/code/community/Minubo/Interface/Model/Export/Abstractcsv.php CHANGED
@@ -24,16 +24,8 @@
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  * @author Sven Rothe <srothe@minubo.com>
26
  * */
27
- abstract class Minubo_Interface_Model_Export_Abstractcsv extends Mage_Core_Model_Abstract
28
  {
29
- /**
30
- * Definition of abstract method to export orders to a file in a specific format in var/export.
31
- *
32
- * @param $orders List of orders of type Mage_Sales_Model_Order or order ids to export.
33
- * @return String The name of the written file in var/export
34
- */
35
- abstract public function exportOrders($orders);
36
-
37
  /**
38
  * Returns the name of the website, store and store view the order was placed in.
39
  *
@@ -96,6 +88,7 @@ abstract class Minubo_Interface_Model_Export_Abstractcsv extends Mage_Core_Model
96
  * @param Mage_Sales_Model_Order $order The order to return info from
97
  * @return int The total quantity of ordered items
98
  */
 
99
  protected function getTotalQtyItemsOrdered($order) {
100
  $qty = 0;
101
  $orderedItems = $order->getItemsCollection();
@@ -107,6 +100,7 @@ abstract class Minubo_Interface_Model_Export_Abstractcsv extends Mage_Core_Model
107
  }
108
  return $qty;
109
  }
 
110
 
111
  /**
112
  * Returns the sku of the given item dependant on the product type.
@@ -190,23 +184,7 @@ abstract class Minubo_Interface_Model_Export_Abstractcsv extends Mage_Core_Model
190
  protected function formatPrice($price, $formatter)
191
  {
192
  return number_format($price,2,'.','');
193
-
194
- /*
195
- $price = $formatter->formatPriceTxt($price);
196
- $price = str_replace('�', '', $price);
197
- $price = str_replace('€', '�', $price); // W�hrungssymbol �
198
- return $price;
199
- */
200
- }
201
-
202
- protected function getStreet($address) {
203
- if ($address->getStreet2() != '') {
204
- return $address->getStreet1() .' ' .$address->getStreet2();
205
- }
206
- else {
207
- return $address->getStreet1();
208
- }
209
  }
210
 
211
- }
212
  ?>
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  * @author Sven Rothe <srothe@minubo.com>
26
  * */
27
+ abstract class Minubo_Interface_Model_Export_Abstractcsv extends Mage_Core_Model_Abstract
28
  {
 
 
 
 
 
 
 
 
29
  /**
30
  * Returns the name of the website, store and store view the order was placed in.
31
  *
88
  * @param Mage_Sales_Model_Order $order The order to return info from
89
  * @return int The total quantity of ordered items
90
  */
91
+ /*
92
  protected function getTotalQtyItemsOrdered($order) {
93
  $qty = 0;
94
  $orderedItems = $order->getItemsCollection();
100
  }
101
  return $qty;
102
  }
103
+ */
104
 
105
  /**
106
  * Returns the sku of the given item dependant on the product type.
184
  protected function formatPrice($price, $formatter)
185
  {
186
  return number_format($price,2,'.','');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
 
189
+ }
190
  ?>
app/code/community/Minubo/Interface/Model/Export/Csv.php CHANGED
@@ -31,38 +31,13 @@ class Minubo_Interface_Model_Export_Csv extends Minubo_Interface_Model_Export_Ab
31
  const ENCLOSURE = '"';
32
  const DELIMITER = ';';
33
 
34
- /**
35
- * Concrete implementation of abstract method to export given orders to csv file in var/export.
36
- *
37
- * @param $orders List of orders of type Mage_Sales_Model_Order or order ids to export.
38
- * @return String The name of the written csv file in var/export
39
- */
40
- public function exportOrders($orders)
41
- {
42
- exportOrder($orders,'order','orders','');
43
- }
44
-
45
- public function exportOrder($rows, $filename, $type, $pdata = '')
46
- {
47
- $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
48
- $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');
49
-
50
- $this->writeHeadRow($fp, $type, $pdata);
51
- foreach ($rows as $row) {
52
- $this->writeOrder($row, $fp, $type, $pdata);
53
- }
54
-
55
- fclose($fp);
56
-
57
- return $fileName;
58
- }
59
-
60
  public function exportCountries($rows, $filename, $type, $pdata = '')
61
  {
62
  $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
63
  $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');
64
 
65
- $this->writeHeadRow($fp, $type, $pdata);
 
66
  foreach ($rows as $row) {
67
  $this->writeCountry($row, $fp, $type);
68
  }
@@ -72,21 +47,6 @@ class Minubo_Interface_Model_Export_Csv extends Minubo_Interface_Model_Export_Ab
72
  return $fileName;
73
  }
74
 
75
- public function exportCollection($rows, $filename, $type, $pdata = '')
76
- {
77
- $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
78
- $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');
79
-
80
- $this->writeHeadRow($fp, $type, $pdata);
81
- foreach ($rows as $row) {
82
- $this->writeCollection($row, $fp, $type);
83
- }
84
-
85
- fclose($fp);
86
-
87
- return $fileName;
88
- }
89
-
90
  public function exportTable($rows, $filename, $type, $colTitles = Array(), $skipCols = Array(), $renameCols = Array())
91
  {
92
  $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
@@ -110,480 +70,44 @@ class Minubo_Interface_Model_Export_Csv extends Minubo_Interface_Model_Export_Ab
110
  * Writes the head row with the column names in the csv file.
111
  *
112
  * @param $fp The file handle of the csv file
113
- */
 
 
 
 
 
114
  protected function writeHeadRow($fp, $group, $pdata='', $cols=array(), $skipCols=array(), $renameCols=array())
115
  {
116
- fputcsv($fp, $this->getHeadRowValues($group, $pdata, $cols, $skipCols, $renameCols), self::DELIMITER, self::ENCLOSURE);
117
- }
118
-
119
- /**
120
- * Returns the head column names.
121
- *
122
- * @return Array The array containing all column names
123
- */
124
- protected function getHeadRowValues($group, $pdata='', $cols=array(), $skipCols=array(), $renameCols=array())
125
- {
126
- $r = array();
127
- switch($group){
128
- case 'orders':
129
- $r = array(
130
- 'Order_ID',
131
- 'Order_Number',
132
- 'Order_Date',
133
- 'Order_Changed',
134
- 'Customer_Number',
135
- 'Credit_Card_Type',
136
- 'Shipping_Zip',
137
- 'Shipping_City',
138
- 'Shipping_Country',
139
- 'Customer_HashCode',
140
- 'parentKey', 'isActive', 'status', 'comment',
141
- 'shippingAddressIncrementId', 'shippingAddressParentId',
142
- 'shippingAddressRegionId','storeId','billingAddressId','shippingAddressId','quoteId',
143
- 'isVirtual','customerGroupId','customerIsGuest','shippingAddressAddressId',
144
- 'shippingAddressCreatedAt','shippingAddressUpdatedAt','taxAmount','shippingAmount','discountAmount',
145
- 'subtotal','grandTotal','totalPaid','totalRefunded','totalQtyOrdered','totalCanceled','totalInvoiced',
146
- 'baseTaxAmount','baseShippingAmount','baseDiscountAmount','baseGrandTotal','baseSubtotal',
147
- 'baseTotalPaid','baseTotalRefunded','baseTotalQtyOrdered','baseTotalCanceled','baseTotalInvoiced',
148
- 'storeToBaseRate','storeToOrderRate','baseToGlobalRate','baseToOrderRate','isActive','storeName',
149
- 'status','state','appliedRuleIds','globalCurrencyCode','baseCurrencyCode','storeCurrencyCode',
150
- 'orderCurrencyCode','shippingMethod','shippingDescription','giftMessageId','shippingAddressIsActive',
151
- 'shippingAddressAddressType','shippingAddressRegion','paymentMethod'
152
- );
153
- break;
154
- case 'orderCustomers':
155
- if(!$pdata) {
156
- $r = array(
157
- 'Order_ID',
158
- 'Order_Number',
159
- 'Order_Date',
160
- 'Order_Changed',
161
- 'Customer_Number',
162
- 'Customer_Group',
163
- 'Customer_Group_Name',
164
- 'Customer_Gender',
165
- 'Shipping_Zip',
166
- 'Shipping_City',
167
- 'Shipping_State',
168
- 'Shipping_State_Name',
169
- 'Shipping_Country',
170
- 'Shipping_Country_Name',
171
- 'Shipping_Gender',
172
- 'Billing_Zip',
173
- 'Billing_City',
174
- 'Billing_State',
175
- 'Billing_State_Name',
176
- 'Billing_Country',
177
- 'Billing_Country_Name',
178
- 'Billing_Gender',
179
- 'Customer_HashCode'
180
- );
181
- } else {
182
- $r = array(
183
- 'Order_ID',
184
- 'Order_Number',
185
- 'Order_Date',
186
- 'Order_Changed',
187
- 'Customer_Number',
188
- 'Customer_Group',
189
- 'Customer_Group_Name',
190
- 'Customer_Gender',
191
- 'Customer_Name',
192
- 'Customer_Email',
193
- 'Shipping_Name',
194
- 'Shipping_Company',
195
- 'Shipping_Street',
196
- 'Shipping_Zip',
197
- 'Shipping_City',
198
- 'Shipping_State',
199
- 'Shipping_State_Name',
200
- 'Shipping_Country',
201
- 'Shipping_Country_Name',
202
- 'Shipping_Phone_Number',
203
- 'Shipping_Gender',
204
- 'Billing_Name',
205
- 'Billing_Company',
206
- 'Billing_Street',
207
- 'Billing_Zip',
208
- 'Billing_City',
209
- 'Billing_State',
210
- 'Billing_State_Name',
211
- 'Billing_Country',
212
- 'Billing_Country_Name',
213
- 'Billing_Phone_Number',
214
- 'Billing_Gender',
215
- 'Customer_HashCode'
216
- );
217
- }
218
- break;
219
- case 'orderItems':
220
- $r = array(
221
- 'Order_ID',
222
- 'Order_Number',
223
- 'Order_Date',
224
- 'Order_Changed',
225
- 'Order_Item_Increment',
226
- 'Item_ID',
227
- 'Item_SKU',
228
- 'Item_Name',
229
- 'Item_Status',
230
- 'Item_Options',
231
- 'Item_Original_Price',
232
- 'Item_Price',
233
- 'Item_Qty_Ordered',
234
- 'Item_Qty_Invoiced',
235
- 'Item_Qty_Shipped',
236
- 'Item_Qty_Canceled',
237
- 'Item_Qty_Refunded',
238
- 'Item_Tax',
239
- 'Item_Discount',
240
- 'Item_Total',
241
- 'Item_Cost',
242
- 'productKey', 'quoteItemId', 'isVirtual', 'freeShipping', 'isQtyDecimal', 'noDiscount', 'createdAt',
243
- 'updatedAt', 'qtyCanceled', 'qtyInvoiced', 'qtyOrdered', 'qtyRefunded', 'qtyShipped', 'cost', 'price',
244
- 'basePrice', 'originalPrice', 'baseOriginalPrice', 'taxPercent', 'taxAmount', 'baseTaxAmount', 'taxInvoiced',
245
- 'baseTaxInvoiced', 'discountPercent', 'discountAmount', 'baseDiscountAmount', 'discountInvoiced',
246
- 'baseDiscountInvoiced', 'amountRefunded', 'baseAmountRefunded', 'rowTotal', 'baseRowTotal', 'rowInvoiced',
247
- 'baseRowInvoiced', 'baseTaxBeforeDiscount', 'taxBeforeDiscount', 'productType', 'productOptions', 'sku',
248
- 'appliedRuleIds', 'giftMessageId'
249
- );
250
- break;
251
- case 'countries':
252
- $r = array (
253
- 'Country_Id',
254
- 'Country_Name',
255
- 'ISO2_Code',
256
- 'ISO3_Code'
257
- );
258
- break;
259
- default:
260
- if($cols) {
261
- foreach ($cols as $col => $val) if(!in_array($col, $skipCols)) { if(array_key_exists($col, $renameCols)) $r[] = $renameCols[$col]; else $r[] = $col; }
262
- }
263
- }
264
- return $r;
265
  }
266
 
267
- protected function writeCollection($entries, $fp, $group, $skipCols=array())
268
  {
269
- $data = array();
270
- foreach ($entries as $col => $value) {
271
- if(count($skipCols)>0) {
272
- if(!in_array($col, $skipCols)) $data[$col] = str_replace(chr(13).chr(10),' ',str_replace('"',"'",$value));
273
- } else {
274
- $data[$col] = str_replace(chr(13).chr(10),' ',str_replace('"',"'",$value));
275
- }
276
- }
277
- fputcsv($fp, $data, self::DELIMITER, self::ENCLOSURE);
278
  }
279
 
280
  protected function writeCountry($country, $fp, $group)
281
  {
282
  $common = array(
283
- $country->getCountryId(),
284
- $country->getName(),
285
- $country->getIso2Code(),
286
- $country->getIso3Code());
287
  fputcsv($fp, $common, self::DELIMITER, self::ENCLOSURE);
288
  }
289
 
290
-
291
- /**
292
- * Writes the row(s) for the given order in the csv file.
293
- * A row is added to the csv file for each ordered item.
294
- *
295
- * @param Mage_Sales_Model_Order $order The order to write csv of
296
- * @param $fp The file handle of the csv file
297
- */
298
- protected function writeOrder($order, $fp, $group, $pdata='')
299
- {
300
- $common = $this->getCommonOrderValues($order, $group, $pdata);
301
-
302
- switch($group){
303
- case 'orders':
304
- fputcsv($fp, $common, self::DELIMITER, self::ENCLOSURE);
305
- break;
306
- case 'orderCustomers':
307
- fputcsv($fp, $common, self::DELIMITER, self::ENCLOSURE);
308
- break;
309
- case 'orderItems':
310
- $orderItems = $order->getItemsCollection();
311
- $itemInc = 0;
312
- foreach ($orderItems as $item)
313
- {
314
- if (!$item->isDummy()) {
315
- $record = array_merge($common, $this->getOrderItemValues($item, $order, ++$itemInc));
316
- fputcsv($fp, $record, self::DELIMITER, self::ENCLOSURE);
317
- }
318
- }
319
- break;
320
- case 'orderItems2':
321
- $orderItems = $order->getAllVisibleItems();
322
- $itemInc = 0;
323
- foreach ($orderItems as $item)
324
- {
325
- if (!$item->isDummy()) {
326
- $record = array_merge($common, $this->getOrderItemValues($item, $order, ++$itemInc));
327
- fputcsv($fp, $record, self::DELIMITER, self::ENCLOSURE);
328
- }
329
- }
330
- break;
331
- case 'products2':
332
- $products = $order->getItemsCollection();
333
- $itemInc = 0;
334
- foreach ($products as $product)
335
- {
336
- if (!$product->isDummy()) {
337
- $record = array_merge($this->getOrderItemValues($product, $order));
338
- fputcsv($fp, $record, self::DELIMITER, self::ENCLOSURE);
339
- }
340
- }
341
- break;
342
- }
343
- }
344
-
345
- /**
346
- * Returns the values which are identical for each row of the given order. These are
347
- * all the values which are not item specific: order data, shipping address, billing
348
- * address and order totals.
349
- * Magento-DateFormat (DE): $order->getCreatedAt(), 'medium', true)
350
- *
351
- * @param Mage_Sales_Model_Order $order The order to get values from
352
- * @return Array The array containing the non item specific values
353
- */
354
- protected function getCommonOrderValues($order, $group, $pdata='')
355
- {
356
- switch($group) {
357
- case 'orders':
358
- $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null;
359
- $billingAddress = $order->getBillingAddress();
360
- return array(
361
- $order->getId(),
362
- $order->getRealOrderId(),
363
- $order->getCreatedAt(),
364
- $order->getUpdatedAt(),
365
- $order->getCustomerId(),
366
- $this->getCcType($order),
367
- $shippingAddress ? $shippingAddress->getData("postcode") : $billingAddress->getData("postcode"),
368
- $shippingAddress ? $shippingAddress->getData("city") : $billingAddress->getData("city"),
369
- $shippingAddress ? $shippingAddress->getCountry() : $billingAddress->getCountry(),
370
- md5($order->getCustomerEmail()),
371
- $order->getParentId(),
372
- $order->getIsActive(),
373
- $order->getStatus(),
374
- $order->getComment(),
375
- $order->getShippingAddressIncrementId(),
376
- $order->getShippingAddressParentId(),
377
- $order->getShippingAddressRegionId(),
378
- $order->getStoreId(),
379
- $order->getBillingAddressId(),
380
- $order->getShippingAddressAddressId(),
381
- $order->getQuoteId(),
382
- $order->getIsVirtual(),
383
- $order->getCustomerGroupId(),
384
- $order->getCustomerIsGuest(),
385
- $order->getShippingAddressAddressId(),
386
- $order->getShippingAddressCreatedAt(),
387
- $order->getShippingAddressUpdatedAt(),
388
- $this->formatPrice($order->getTaxAmount(), $order),
389
- $this->formatPrice($order->getShippingAmount(), $order),
390
- $this->formatPrice($order->getDiscountAmount(), $order),
391
- $this->formatPrice($order->getSubtotal(), $order),
392
- $this->formatPrice($order->getGrandTotal(), $order),
393
- $this->formatPrice($order->getTotalPaid(), $order),
394
- $this->formatPrice($order->getTotalRefunded(), $order),
395
- $this->formatPrice($order->getTotalQtyOrdered(), $order),
396
- $this->formatPrice($order->getTotalCanceled(), $order),
397
- $this->formatPrice($order->getTotalInvoiced(), $order),
398
- $this->formatPrice($order->getBaseTaxAmount(), $order),
399
- $this->formatPrice($order->getBaseShippingAmount(), $order),
400
- $this->formatPrice($order->getBaseDiscountAmount(), $order),
401
- $this->formatPrice($order->getBaseGrandTotal(), $order),
402
- $this->formatPrice($order->getBaseSubtotal(), $order),
403
- $this->formatPrice($order->getBaseTotalPaid(), $order),
404
- $this->formatPrice($order->getBaseTotalRefunded(), $order),
405
- $this->formatPrice($order->getBaseTotalQtyOrdered(), $order),
406
- $this->formatPrice($order->getBaseTotalCanceled(), $order),
407
- $this->formatPrice($order->getBaseTotalInvoiced(), $order),
408
- $this->formatPrice($order->getStoreToBaseRate(), $order),
409
- $this->formatPrice($order->getStoreToOrderRate(), $order),
410
- $this->formatPrice($order->getBaseToGlobalRate(), $order),
411
- $this->formatPrice($order->getBaseToOrderRate(), $order),
412
- $order->getIsActive(),
413
- $order->getStoreName(),
414
- $order->getStatus(),
415
- $order->getState(),
416
- $order->getAppliedRuleIds(),
417
- $order->getGlobalCurrencyCode(),
418
- $order->getBaseCurrencyCode(),
419
- $order->getStoreCurrencyCode(),
420
- $order->getOrderCurrencyCode(),
421
- $order->getShippingMethod(),
422
- $order->getShippingDescription(),
423
- $order->getGiftMessageId(),
424
- $order->getShippingAddressIsActive(),
425
- $order->getShippingAddressAddressType(),
426
- $order->getShippingAddressRegion(),
427
- $order->getPaymentMethod());
428
- break;
429
- case 'orderCustomers':
430
- $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null;
431
- $billingAddress = $order->getBillingAddress();
432
- $group = Mage::getModel('customer/group')->load($order->getCustomerGroupId());
433
- if(!$pdata) {
434
- return array(
435
- $order->getId(),
436
- $order->getRealOrderId(),
437
- $order->getCreatedAt(),
438
- $order->getUpdatedAt(),
439
- $order->getCustomerId(),
440
- $order->getCustomerGroupId(),
441
- $group->getCode(),
442
- $order->getCustomerGender(),
443
- $shippingAddress ? $shippingAddress->getData("postcode") : '',
444
- $shippingAddress ? $shippingAddress->getData("city") : '',
445
- $shippingAddress ? $shippingAddress->getRegionCode() : '',
446
- $shippingAddress ? $shippingAddress->getRegion() : '',
447
- $shippingAddress ? $shippingAddress->getCountry() : '',
448
- $shippingAddress ? $shippingAddress->getCountryModel()->getName() : '',
449
- $shippingAddress ? $shippingAddress->getData("gender") : '',
450
- $billingAddress->getData("postcode"),
451
- $billingAddress->getData("city"),
452
- $billingAddress->getRegionCode(),
453
- $billingAddress->getRegion(),
454
- $billingAddress->getCountry(),
455
- $billingAddress->getCountryModel()->getName(),
456
- $billingAddress->getData("gender"),
457
- md5($order->getCustomerEmail()));
458
- } else {
459
- return array(
460
- $order->getId(),
461
- $order->getRealOrderId(),
462
- $order->getCreatedAt(),
463
- $order->getUpdatedAt(),
464
- $order->getCustomerId(),
465
- $order->getCustomerGroupId(),
466
- $group->getCode(),
467
- $order->getCustomerGender(),
468
- $order->getCustomerName(),
469
- $order->getCustomerEmail(),
470
- $shippingAddress ? $shippingAddress->getName() : '',
471
- $shippingAddress ? $shippingAddress->getData("company") : '',
472
- $shippingAddress ? $this->getStreet($shippingAddress) : '',
473
- $shippingAddress ? $shippingAddress->getData("postcode") : '',
474
- $shippingAddress ? $shippingAddress->getData("city") : '',
475
- $shippingAddress ? $shippingAddress->getRegionCode() : '',
476
- $shippingAddress ? $shippingAddress->getRegion() : '',
477
- $shippingAddress ? $shippingAddress->getCountry() : '',
478
- $shippingAddress ? $shippingAddress->getCountryModel()->getName() : '',
479
- $shippingAddress ? $shippingAddress->getData("telephone") : '',
480
- $shippingAddress ? $shippingAddress->getData("gender") : '',
481
- $billingAddress->getName(),
482
- $billingAddress->getData("company"),
483
- $this->getStreet($billingAddress),
484
- $billingAddress->getData("postcode"),
485
- $billingAddress->getData("city"),
486
- $billingAddress->getRegionCode(),
487
- $billingAddress->getRegion(),
488
- $billingAddress->getCountry(),
489
- $billingAddress->getCountryModel()->getName(),
490
- $billingAddress->getData("telephone"),
491
- $billingAddress->getData("gender"),
492
- md5($order->getCustomerEmail()));
493
- }
494
- break;
495
- }
496
- return array(
497
- $order->getId(),
498
- $order->getRealOrderId(),
499
- $order->getCreatedAt(),
500
- $order->getUpdatedAt());
501
- }
502
-
503
- /**
504
- * Returns the item specific values.
505
- *
506
- * @param Mage_Sales_Model_Order_Item $item The item to get values from
507
- * @param Mage_Sales_Model_Order $order The order the item belongs to
508
- * @return Array The array containing the item specific values
509
- */
510
- protected function getOrderItemValues($item, $order, $itemInc=1)
511
- {
512
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $this->getItemSku($item));
513
- if (!is_object($product)) $product = Mage::getModel('catalog/product')->loadByAttribute('sku', trim($this->getItemSku($item)));
514
- // $item->getProductId() liefert die Id des Basisartikels bei Variationen
515
- return array(
516
- $item->getId(),
517
- (is_object($product) ? $product->getId() : '-1'),
518
- $this->getItemSku($item),
519
- $item->getName(),
520
- $item->getStatus(),
521
- $this->getItemOptions($item),
522
- $this->formatPrice($item->getOriginalPrice(), $order),
523
- $this->formatPrice($item->getData('price'), $order),
524
- (float)$item->getQtyOrdered(),
525
- (float)$item->getQtyInvoiced(),
526
- (float)$item->getQtyShipped(),
527
- (float)$item->getQtyCanceled(),
528
- (float)$item->getQtyRefunded(),
529
- $this->formatPrice($item->getTaxAmount(), $order),
530
- $this->formatPrice($item->getDiscountAmount(), $order),
531
- $this->formatPrice($this->getItemTotal($item), $order),
532
- $this->formatPrice($item->getBaseCost(), $order),
533
- $item->getProductId(),
534
- $item->getQuoteItemId(),
535
- $item->getIsVirtual(),
536
- $item->getFreeShipping(),
537
- $item->getIsQtyDecimal(),
538
- $item->getNoDiscount(),
539
- $item->getCreatedAt(),
540
- $item->getUpdatedAt(),
541
- $item->getQtyCanceled(),
542
- $item->getQtyInvoiced(),
543
- $item->getQtyOrdered(),
544
- $item->getQtyRefunded(),
545
- $item->getQtyShipped(),
546
- $item->getCost(),
547
- $item->getPrice(),
548
- $item->getBasePrice(),
549
- $item->getOriginalPrice(),
550
- $item->getBaseOriginalPrice(),
551
- $item->getTaxPercent(),
552
- $item->getTaxAmount(),
553
- $item->getBaseTaxAmount(),
554
- $item->getTaxInvoiced(),
555
- $item->getBaseTaxInvoiced(),
556
- $item->getDiscountPercent(),
557
- $item->getDiscountAmount(),
558
- $item->getBaseDiscountAmount(),
559
- $item->getDiscountInvoiced(),
560
- $item->getBaseDiscountInvoiced(),
561
- $item->getAmountRefunded(),
562
- $item->getBaseAmountRefunded(),
563
- $item->getRowTotal(),
564
- $item->getBaseRowTotal(),
565
- $item->getRowInvoiced(),
566
- $item->getBaseRowInvoiced(),
567
- $item->getBaseTaxBeforeDiscount(),
568
- $item->getTaxBeforeDiscount(),
569
- $item->getProductType(),
570
- serialize($item->getProductOptions()),
571
- $item->getSku(),
572
- $item->getAppliedRuleIds(),
573
- $item->getGiftMessageId()
574
- );
575
- }
576
-
577
- protected function getCategoryValues($category)
578
- {
579
-
580
- return array(
581
- $category['entity_id'],
582
- $category['parent_id'],
583
- $category['position'],
584
- $category['name']
585
- );
586
- }
587
  }
588
 
589
  ?>
31
  const ENCLOSURE = '"';
32
  const DELIMITER = ';';
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  public function exportCountries($rows, $filename, $type, $pdata = '')
35
  {
36
  $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
37
  $fp = fopen(Mage::getBaseDir('export').'/'.$fileName, 'w');
38
 
39
+ $colTitles = array_flip(array('country_id','country_name','country_iso2','country_Iso3'));
40
+ $this->writeHeadRow($fp, $type, $pdata, $colTitles);
41
  foreach ($rows as $row) {
42
  $this->writeCountry($row, $fp, $type);
43
  }
47
  return $fileName;
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  public function exportTable($rows, $filename, $type, $colTitles = Array(), $skipCols = Array(), $renameCols = Array())
51
  {
52
  $fileName = $filename.'_export_'.date("Ymd_His").'.csv';
70
  * Writes the head row with the column names in the csv file.
71
  *
72
  * @param $fp The file handle of the csv file
73
+ * @param $group
74
+ * @param $pdata
75
+ * @param $cols
76
+ * @param $skipCols
77
+ * @param $renameCols
78
+ */
79
  protected function writeHeadRow($fp, $group, $pdata='', $cols=array(), $skipCols=array(), $renameCols=array())
80
  {
81
+ $r = array();
82
+ if($cols) {
83
+ foreach ($cols as $col => $val) if(!in_array($col, $skipCols)) { if(array_key_exists($col, $renameCols)) $r[] = $renameCols[$col]; else $r[] = $col; }
84
+ }
85
+ fputcsv($fp, $r, self::DELIMITER, self::ENCLOSURE);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
+ protected function writeCollection($entries, $fp, $group, $skipCols=array())
89
  {
90
+ $data = array();
91
+ foreach ($entries as $col => $value) {
92
+ if(count($skipCols)>0) {
93
+ if(!in_array($col, $skipCols)) $data[$col] = str_replace(chr(13).chr(10),' ',str_replace('"',"'",$value));
94
+ } else {
95
+ $data[$col] = str_replace(chr(13).chr(10),' ',str_replace('"',"'",$value));
96
+ }
97
+ }
98
+ fputcsv($fp, $data, self::DELIMITER, self::ENCLOSURE);
99
  }
100
 
101
  protected function writeCountry($country, $fp, $group)
102
  {
103
  $common = array(
104
+ $country->getCountryId(),
105
+ $country->getName(),
106
+ $country->getIso2Code(),
107
+ $country->getIso3Code());
108
  fputcsv($fp, $common, self::DELIMITER, self::ENCLOSURE);
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
112
 
113
  ?>
app/code/community/Minubo/Interface/Model/Export/Status.php CHANGED
@@ -1,9 +1,9 @@
1
- <?php
2
- class Minubo_Interface_Model_Export_Status extends Mage_Core_Model_Abstract
3
- {
4
- const STATUS_DUPLICATE = -2;
5
- const STATUS_UPDATED = 1;
6
- const STATUS_FAILED = -1;
7
- const STATUS_CREATED = 2;
8
-
9
  }
1
+ <?php
2
+ class Minubo_Interface_Model_Export_Status extends Mage_Core_Model_Abstract
3
+ {
4
+ const STATUS_DUPLICATE = -2;
5
+ const STATUS_UPDATED = 1;
6
+ const STATUS_FAILED = -1;
7
+ const STATUS_CREATED = 2;
8
+
9
  }
app/code/community/Minubo/Interface/Model/Mysql4/Categories.php CHANGED
@@ -1,47 +1,48 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Categories extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/categories', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('entity_id','parent_id','position','name','level','image','url_key','url_path');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)
31
- ->order('created_at');
32
- return $this->_getReadAdapter()->fetchAll($select);
33
- }
34
-
35
- public function loadLimited($limit, $offset){
36
- $table = $this->getMainTable();
37
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
- $select = $this->_getReadAdapter()->select()->from($table)
39
- ->reset('columns')
40
- ->columns($this->getColumns())
41
- ->where($where)
42
- ->limit($limit, $offset)
43
- ->order('created_at');
44
- return $this->_getReadAdapter()->fetchAll($select);
45
- }
46
- }
 
47
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Categories extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/categories', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','parent_id','position','name','level','image','url_key','url_path');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()
17
+ ->from($table)
18
+ ->reset('columns')
19
+ ->columns($this->getColumns())
20
+ ->where($where);
21
+ $id = $this->_getReadAdapter()->fetchOne($select);
22
+ return $id;
23
+ }
24
+
25
+ public function loadAll(){
26
+ $table = $this->getMainTable();
27
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
28
+ $select = $this->_getReadAdapter()->select()->from($table)
29
+ ->reset('columns')
30
+ ->columns($this->getColumns())
31
+ ->where($where)
32
+ ->order('created_at');
33
+ return $this->_getReadAdapter()->fetchAll($select);
34
+ }
35
+
36
+ public function loadLimited($limit, $offset){
37
+ $table = $this->getMainTable();
38
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
39
+ $select = $this->_getReadAdapter()->select()->from($table)
40
+ ->reset('columns')
41
+ ->columns($this->getColumns())
42
+ ->where($where)
43
+ ->limit($limit, $offset)
44
+ ->order('created_at');
45
+ return $this->_getReadAdapter()->fetchAll($select);
46
+ }
47
+ }
48
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Categories2.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Categories extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/categories2', 'entity_id');
7
- }
8
-
9
- public function loadByField($field,$value){
10
- $table = $this->getMainTable();
11
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
- $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where);
13
- $id = $this->_getReadAdapter()->fetchOne($sql);
14
- return $id;
15
- }
16
-
17
- public function loadAll(){
18
- $table = $this->getMainTable();
19
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 1);
20
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','parent_id','name'))->where($where)->limit(10,5)->order('created_at');
21
- $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where)->order('created_at');
22
- return $this->_getReadAdapter()->fetchAll($select);
23
- }
24
-
25
- }
26
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Categories2 extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/categories2', 'entity_id');
7
+ }
8
+
9
+ public function loadByField($field,$value){
10
+ $table = $this->getMainTable();
11
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
+ $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where);
13
+ $id = $this->_getReadAdapter()->fetchOne($select);
14
+ return $id;
15
+ }
16
+
17
+ public function loadAll(){
18
+ $table = $this->getMainTable();
19
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 1);
20
+ // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','parent_id','name'))->where($where)->limit(10,5)->order('created_at');
21
+ $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where)->order('created_at');
22
+ return $this->_getReadAdapter()->fetchAll($select);
23
+ }
24
+
25
+ }
26
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Categories3.php CHANGED
@@ -1,26 +1,26 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Categories extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/categories3', 'entity_id');
7
- }
8
-
9
- public function loadByField($field,$value){
10
- $table = $this->getMainTable();
11
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
- $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where);
13
- $id = $this->_getReadAdapter()->fetchOne($sql);
14
- return $id;
15
- }
16
-
17
- public function loadAll(){
18
- $table = $this->getMainTable();
19
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 1);
20
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','parent_id','name'))->where($where)->limit(10,5)->order('created_at');
21
- $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where)->order('created_at');
22
- return $this->_getReadAdapter()->fetchAll($select);
23
- }
24
-
25
- }
26
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Categories3 extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/categories3', 'entity_id');
7
+ }
8
+
9
+ public function loadByField($field,$value){
10
+ $table = $this->getMainTable();
11
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
+ $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where);
13
+ $id = $this->_getReadAdapter()->fetchOne($select);
14
+ return $id;
15
+ }
16
+
17
+ public function loadAll(){
18
+ $table = $this->getMainTable();
19
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 1);
20
+ // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','parent_id','name'))->where($where)->limit(10,5)->order('created_at');
21
+ $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','parent_id','position','name','image','url_key','url_path'))->where($where)->order('created_at');
22
+ return $this->_getReadAdapter()->fetchAll($select);
23
+ }
24
+
25
+ }
26
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Creditmemoitems.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Creditmemoitems extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/creditmemoitems', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('entity_id','parent_id','weee_tax_applied_row_amount','base_price','base_weee_tax_row_disposition','tax_amount','base_weee_tax_applied_amount','weee_tax_row_disposition','base_row_total','discount_amount','row_total','weee_tax_applied_amount','base_discount_amount','base_weee_tax_disposition','price_incl_tax','base_tax_amount','weee_tax_disposition','base_price_incl_tax','qty','base_cost','base_weee_tax_applied_row_amnt','price','base_row_total_incl_tax','row_total_incl_tax','product_id','order_item_id','additional_data','description','weee_tax_applied','sku','name','hidden_tax_amount','base_hidden_tax_amount');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)
31
- ->order('entity_id');
32
- return $this->_getReadAdapter()->fetchAll($select);
33
- }
34
-
35
- public function loadLimited($limit, $offset){
36
- $table = $this->getMainTable();
37
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
- $select = $this->_getReadAdapter()->select()->from($table)
39
- ->reset('columns')
40
- ->columns($this->getColumns())
41
- ->where($where)
42
- ->limit($limit, $offset)
43
- ->order('entity_id');
44
- return $this->_getReadAdapter()->fetchAll($select);
45
- }
46
-
47
- }
48
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Creditmemoitems extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/creditmemoitems', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','parent_id','weee_tax_applied_row_amount','base_price','base_weee_tax_row_disposition','tax_amount','base_weee_tax_applied_amount','weee_tax_row_disposition','base_row_total','discount_amount','row_total','weee_tax_applied_amount','base_discount_amount','base_weee_tax_disposition','price_incl_tax','base_tax_amount','weee_tax_disposition','base_price_incl_tax','qty','base_cost','base_weee_tax_applied_row_amnt','price','base_row_total_incl_tax','row_total_incl_tax','product_id','order_item_id','additional_data','description','weee_tax_applied','sku','name','hidden_tax_amount','base_hidden_tax_amount');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)
17
+ ->reset('columns')
18
+ ->columns($this->getColumns())
19
+ ->where($where);
20
+ $id = $this->_getReadAdapter()->fetchOne($select);
21
+ return $id;
22
+ }
23
+
24
+ public function loadAll(){
25
+ $table = $this->getMainTable();
26
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
+ $select = $this->_getReadAdapter()->select()->from($table)
28
+ ->reset('columns')
29
+ ->columns($this->getColumns())
30
+ ->where($where)
31
+ ->order('entity_id');
32
+ return $this->_getReadAdapter()->fetchAll($select);
33
+ }
34
+
35
+ public function loadLimited($limit, $offset){
36
+ $table = $this->getMainTable();
37
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
+ $select = $this->_getReadAdapter()->select()->from($table)
39
+ ->reset('columns')
40
+ ->columns($this->getColumns())
41
+ ->where($where)
42
+ ->limit($limit, $offset)
43
+ ->order('entity_id');
44
+ return $this->_getReadAdapter()->fetchAll($select);
45
+ }
46
+
47
+ }
48
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Creditmemos.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Creditmemos extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/creditmemos', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('entity_id','store_id','adjustment_positive','base_shipping_tax_amount','store_to_order_rate','base_discount_amount','base_to_order_rate','grand_total','base_adjustment_negative','base_subtotal_incl_tax','shipping_amount','subtotal_incl_tax','adjustment_negative','base_shipping_amount','store_to_base_rate','base_to_global_rate','base_adjustment','base_subtotal','discount_amount','subtotal','adjustment','base_grand_total','base_adjustment_positive','base_tax_amount','shipping_tax_amount','tax_amount','order_id','email_sent','creditmemo_status','state','shipping_address_id','billing_address_id','invoice_id','cybersource_token','store_currency_code','order_currency_code','base_currency_code','global_currency_code','transaction_id','increment_id','created_at','updated_at','hidden_tax_amount','base_hidden_tax_amount','shipping_hidden_tax_amount','base_shipping_hidden_tax_amnt','shipping_incl_tax','base_shipping_incl_tax');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)
31
- ->order('entity_id');
32
- return $this->_getReadAdapter()->fetchAll($select);
33
- }
34
-
35
- public function loadLimited($limit, $offset){
36
- $table = $this->getMainTable();
37
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
- $select = $this->_getReadAdapter()->select()->from($table)
39
- ->reset('columns')
40
- ->columns($this->getColumns())
41
- ->where($where)
42
- ->limit($limit, $offset)
43
- ->order('entity_id');
44
- return $this->_getReadAdapter()->fetchAll($select);
45
- }
46
-
47
- }
48
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Creditmemos extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/creditmemos', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','store_id','adjustment_positive','base_shipping_tax_amount','store_to_order_rate','base_discount_amount','base_to_order_rate','grand_total','base_adjustment_negative','base_subtotal_incl_tax','shipping_amount','subtotal_incl_tax','adjustment_negative','base_shipping_amount','store_to_base_rate','base_to_global_rate','base_adjustment','base_subtotal','discount_amount','subtotal','adjustment','base_grand_total','base_adjustment_positive','base_tax_amount','shipping_tax_amount','tax_amount','order_id','email_sent','creditmemo_status','state','shipping_address_id','billing_address_id','invoice_id','cybersource_token','store_currency_code','order_currency_code','base_currency_code','global_currency_code','transaction_id','increment_id','created_at','updated_at','hidden_tax_amount','base_hidden_tax_amount','shipping_hidden_tax_amount','base_shipping_hidden_tax_amnt','shipping_incl_tax','base_shipping_incl_tax');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)
17
+ ->reset('columns')
18
+ ->columns($this->getColumns())
19
+ ->where($where);
20
+ $id = $this->_getReadAdapter()->fetchOne($select);
21
+ return $id;
22
+ }
23
+
24
+ public function loadAll(){
25
+ $table = $this->getMainTable();
26
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
+ $select = $this->_getReadAdapter()->select()->from($table)
28
+ ->reset('columns')
29
+ ->columns($this->getColumns())
30
+ ->where($where)
31
+ ->order('entity_id');
32
+ return $this->_getReadAdapter()->fetchAll($select);
33
+ }
34
+
35
+ public function loadLimited($limit, $offset){
36
+ $table = $this->getMainTable();
37
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
+ $select = $this->_getReadAdapter()->select()->from($table)
39
+ ->reset('columns')
40
+ ->columns($this->getColumns())
41
+ ->where($where)
42
+ ->limit($limit, $offset)
43
+ ->order('entity_id');
44
+ return $this->_getReadAdapter()->fetchAll($select);
45
+ }
46
+
47
+ }
48
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Customeraddresses.php CHANGED
@@ -29,7 +29,7 @@ class Minubo_Interface_Model_Mysql4_Customeraddresses extends Mage_Core_Model_My
29
  ->reset('columns')
30
  ->columns($this->getColumns())
31
  ->where($where);
32
- $id = $this->_getReadAdapter()->fetchOne($sql);
33
  return $id;
34
  }
35
 
29
  ->reset('columns')
30
  ->columns($this->getColumns())
31
  ->where($where);
32
+ $id = $this->_getReadAdapter()->fetchOne($select);
33
  return $id;
34
  }
35
 
app/code/community/Minubo/Interface/Model/Mysql4/Customers.php CHANGED
@@ -20,7 +20,7 @@ class Minubo_Interface_Model_Mysql4_Customers extends Mage_Core_Model_Mysql4_Abs
20
  ->reset('columns')
21
  ->columns($this->getColumns())
22
  ->where($where);
23
- $id = $this->_getReadAdapter()->fetchOne($sql);
24
  return $id;
25
  }
26
 
20
  ->reset('columns')
21
  ->columns($this->getColumns())
22
  ->where($where);
23
+ $id = $this->_getReadAdapter()->fetchOne($select);
24
  return $id;
25
  }
26
 
app/code/community/Minubo/Interface/Model/Mysql4/Invoiceitems.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Invoiceitems extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/invoiceitems', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('entity_id','parent_id','base_price','base_weee_tax_row_disposition','weee_tax_applied_row_amount','base_weee_tax_applied_amount','tax_amount','base_row_total','discount_amount','row_total','weee_tax_row_disposition','base_discount_amount','base_weee_tax_disposition','price_incl_tax','weee_tax_applied_amount','base_tax_amount','base_price_incl_tax','qty','weee_tax_disposition','base_cost','base_weee_tax_applied_row_amnt','price','base_row_total_incl_tax','row_total_incl_tax','product_id','order_item_id','additional_data','description','weee_tax_applied','sku','name','hidden_tax_amount','base_hidden_tax_amount');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)->order('entity_id');
31
- return $this->_getReadAdapter()->fetchAll($select);
32
- }
33
-
34
- public function loadLimited($limit, $offset){
35
- $table = $this->getMainTable();
36
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
37
- $select = $this->_getReadAdapter()->select()->from($table)
38
- ->reset('columns')
39
- ->columns($this->getColumns())
40
- ->where($where)
41
- ->limit($limit, $offset)
42
- ->order('entity_id');
43
- return $this->_getReadAdapter()->fetchAll($select);
44
- }
45
-
46
- }
47
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Invoiceitems extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/invoiceitems', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','parent_id','base_price','base_weee_tax_row_disposition','weee_tax_applied_row_amount','base_weee_tax_applied_amount','tax_amount','base_row_total','discount_amount','row_total','weee_tax_row_disposition','base_discount_amount','base_weee_tax_disposition','price_incl_tax','weee_tax_applied_amount','base_tax_amount','base_price_incl_tax','qty','weee_tax_disposition','base_cost','base_weee_tax_applied_row_amnt','price','base_row_total_incl_tax','row_total_incl_tax','product_id','order_item_id','additional_data','description','weee_tax_applied','sku','name','hidden_tax_amount','base_hidden_tax_amount');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)
17
+ ->reset('columns')
18
+ ->columns($this->getColumns())
19
+ ->where($where);
20
+ $id = $this->_getReadAdapter()->fetchOne($select);
21
+ return $id;
22
+ }
23
+
24
+ public function loadAll(){
25
+ $table = $this->getMainTable();
26
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
+ $select = $this->_getReadAdapter()->select()->from($table)
28
+ ->reset('columns')
29
+ ->columns($this->getColumns())
30
+ ->where($where)->order('entity_id');
31
+ return $this->_getReadAdapter()->fetchAll($select);
32
+ }
33
+
34
+ public function loadLimited($limit, $offset){
35
+ $table = $this->getMainTable();
36
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
37
+ $select = $this->_getReadAdapter()->select()->from($table)
38
+ ->reset('columns')
39
+ ->columns($this->getColumns())
40
+ ->where($where)
41
+ ->limit($limit, $offset)
42
+ ->order('entity_id');
43
+ return $this->_getReadAdapter()->fetchAll($select);
44
+ }
45
+
46
+ }
47
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Invoices.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Invoices extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/invoices', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('entity_id','store_id','base_grand_total','shipping_tax_amount','tax_amount','base_tax_amount','store_to_order_rate','base_shipping_tax_amount','base_discount_amount','base_to_order_rate','grand_total','shipping_amount','subtotal_incl_tax','base_subtotal_incl_tax','store_to_base_rate','base_shipping_amount','total_qty','base_to_global_rate','subtotal','base_subtotal','discount_amount','billing_address_id','is_used_for_refund','order_id','email_sent','can_void_flag','state','shipping_address_id','cybersource_token','store_currency_code','transaction_id','order_currency_code','base_currency_code','global_currency_code','increment_id','created_at','updated_at','hidden_tax_amount','base_hidden_tax_amount','shipping_hidden_tax_amount','base_shipping_hidden_tax_amnt','shipping_incl_tax','base_shipping_incl_tax');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)
31
- ->order('entity_id');
32
- return $this->_getReadAdapter()->fetchAll($select);
33
- }
34
-
35
- public function loadLimited($limit, $offset){
36
- $table = $this->getMainTable();
37
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
- $select = $this->_getReadAdapter()->select()->from($table)
39
- ->reset('columns')
40
- ->columns($this->getColumns())
41
- ->where($where)
42
- ->limit($limit, $offset)
43
- ->order('entity_id');
44
- return $this->_getReadAdapter()->fetchAll($select);
45
- }
46
-
47
- }
48
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Invoices extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/invoices', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','store_id','base_grand_total','shipping_tax_amount','tax_amount','base_tax_amount','store_to_order_rate','base_shipping_tax_amount','base_discount_amount','base_to_order_rate','grand_total','shipping_amount','subtotal_incl_tax','base_subtotal_incl_tax','store_to_base_rate','base_shipping_amount','total_qty','base_to_global_rate','subtotal','base_subtotal','discount_amount','billing_address_id','is_used_for_refund','order_id','email_sent','can_void_flag','state','shipping_address_id','cybersource_token','store_currency_code','transaction_id','order_currency_code','base_currency_code','global_currency_code','increment_id','created_at','updated_at','hidden_tax_amount','base_hidden_tax_amount','shipping_hidden_tax_amount','base_shipping_hidden_tax_amnt','shipping_incl_tax','base_shipping_incl_tax');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)
17
+ ->reset('columns')
18
+ ->columns($this->getColumns())
19
+ ->where($where);
20
+ $id = $this->_getReadAdapter()->fetchOne($select);
21
+ return $id;
22
+ }
23
+
24
+ public function loadAll(){
25
+ $table = $this->getMainTable();
26
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
27
+ $select = $this->_getReadAdapter()->select()->from($table)
28
+ ->reset('columns')
29
+ ->columns($this->getColumns())
30
+ ->where($where)
31
+ ->order('entity_id');
32
+ return $this->_getReadAdapter()->fetchAll($select);
33
+ }
34
+
35
+ public function loadLimited($limit, $offset){
36
+ $table = $this->getMainTable();
37
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
38
+ $select = $this->_getReadAdapter()->select()->from($table)
39
+ ->reset('columns')
40
+ ->columns($this->getColumns())
41
+ ->where($where)
42
+ ->limit($limit, $offset)
43
+ ->order('entity_id');
44
+ return $this->_getReadAdapter()->fetchAll($select);
45
+ }
46
+
47
+ }
48
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Orderaddresses.php CHANGED
@@ -7,50 +7,67 @@ class Minubo_Interface_Model_Mysql4_Orderaddresses extends Mage_Core_Model_Mysql
7
  }
8
 
9
  protected function getColumns() {
10
- return array('oa.entity_id','oa.customer_address_id','oa.region_id','oa.region','oa.postcode','oa.city','oa.country_id','oa.address_type','MD5(oa.email) AS Customer_HashCode','o.store_id');
 
 
 
 
 
11
  }
12
 
13
  public function loadByField($field,$value){
14
  $table = $this->getMainTable();
15
- $table5 = $this->getTable('sales_flat_order');
16
- $cond5 = $this->_getReadAdapter()->quoteInto('oa.parent_id = o.entity_id','');
 
 
17
  $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
18
- $select = $this->_getReadAdapter()->select()->from(array('oa'=>$table))
19
- ->join(array('o'=>$table5), $cond5)
20
- ->reset('columns')
21
- ->columns($this->getColumns())
22
- ->where($where);
23
- $id = $this->_getReadAdapter()->fetchOne($sql);
 
 
24
  return $id;
25
  }
26
 
27
  public function loadAll(){
28
  $table = $this->getMainTable();
29
- $table5 = $this->getTable('sales_flat_order');
30
- $cond5 = $this->_getReadAdapter()->quoteInto('oa.parent_id = o.entity_id','');
 
 
31
  $where = $this->_getReadAdapter()->quoteInto("oa.entity_id > ?", 0);
32
- $select = $this->_getReadAdapter()->select()->from(array('oa'=>$table))
33
- ->join(array('o'=>$table5), $cond5)
34
- ->reset('columns')
35
- ->columns($this->getColumns())
36
- ->where($where)
37
- ->order('MD5(oa.email), entity_id desc');
38
- return $this->_getReadAdapter()->fetchAll($select);
 
 
39
  }
40
 
41
  public function loadLimited($limit, $offset){
42
  $table = $this->getMainTable();
43
- $table5 = $this->getTable('sales_flat_order');
44
- $cond5 = $this->_getReadAdapter()->quoteInto('oa.parent_id = o.entity_id','');
45
- $where = $this->_getReadAdapter()->quoteInto("oa.entity_id > ?", 0);
46
- $select = $this->_getReadAdapter()->select()->from(array('oa'=>$table))
47
- ->join(array('o'=>$table5), $cond5)
48
- ->reset('columns')
49
- ->columns($this->getColumns())
50
- ->where($where)
51
- ->limit($limit, $offset)
52
- ->order('MD5(oa.email), entity_id desc');
53
- return $this->_getReadAdapter()->fetchAll($select);
 
 
 
 
54
  }
55
 
56
  }
7
  }
8
 
9
  protected function getColumns() {
10
+ return array('oab.entity_id as customerId','o.created_at','oab.customer_address_id as incrementKey','o.store_id',
11
+ 'o.store_id as websiteKey','o.store_name','o.customer_group_id','o.customer_dob','oab.prefix',"ifnull(oab.customer_address_id,concat('g_',oab.entity_id)) as customerNumber",
12
+ 'oab.entity_id as billingCustomerAddressKey','oab.entity_id as billingIncrementKey','oab.city','oab.country_id','oab.postcode',
13
+ 'oab.region','oab.region_id','oab.address_type',
14
+ 'oas.entity_id as shippingIncrementKey','oas.city as shippingCity','oas.country_id as shippingCountry','oas.postcode as shippingPostcode',
15
+ 'oas.region as shippingRegion','oas.region_id as shippingRegionId','oas.address_type as shippingAddressType','md5(o.customer_email) as Customer_HashCode');
16
  }
17
 
18
  public function loadByField($field,$value){
19
  $table = $this->getMainTable();
20
+ $table2 = $this->getTable('sales_flat_order');
21
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.billing_address_id = oab.entity_id','');
22
+ $table3 = $this->getTable('sales_flat_order_address');
23
+ $cond3 = $this->_getReadAdapter()->quoteInto("o.shipping_address_id = oas.entity_id ",'');
24
  $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
25
+ $select = $this->_getReadAdapter()->select()
26
+ ->from(array('oab'=>$table))
27
+ ->join(array('o'=>$table2), $cond2)
28
+ ->join(array('oas'=>$table3), $cond3)
29
+ ->reset('columns')
30
+ ->columns($this->getColumns())
31
+ ->where($where);
32
+ $id = $this->_getReadAdapter()->fetchOne($select);
33
  return $id;
34
  }
35
 
36
  public function loadAll(){
37
  $table = $this->getMainTable();
38
+ $table2 = $this->getTable('sales_flat_order');
39
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.billing_address_id = oab.entity_id','');
40
+ $table3 = $this->getTable('sales_flat_order_address');
41
+ $cond3 = $this->_getReadAdapter()->quoteInto("o.shipping_address_id = oas.entity_id ",'');
42
  $where = $this->_getReadAdapter()->quoteInto("oa.entity_id > ?", 0);
43
+ $select = $this->_getReadAdapter()->select()
44
+ ->from(array('oab'=>$table))
45
+ ->join(array('o'=>$table2), $cond2)
46
+ ->join(array('oas'=>$table3), $cond3)
47
+ ->reset('columns')
48
+ ->columns($this->getColumns())
49
+ ->where($where)
50
+ ->order('o.entity_id');
51
+ return $this->_getReadAdapter()->fetchAll($select);
52
  }
53
 
54
  public function loadLimited($limit, $offset){
55
  $table = $this->getMainTable();
56
+ $table2 = $this->getTable('sales_flat_order');
57
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.billing_address_id = oab.entity_id','');
58
+ $table3 = $this->getTable('sales_flat_order_address');
59
+ $cond3 = $this->_getReadAdapter()->quoteInto("o.shipping_address_id = oas.entity_id ",'');
60
+ $where = $this->_getReadAdapter()->quoteInto("oas.entity_id > ?", 0);
61
+ $select = $this->_getReadAdapter()->select()
62
+ ->from(array('oab'=>$table))
63
+ ->join(array('o'=>$table2), $cond2)
64
+ ->join(array('oas'=>$table3), $cond3)
65
+ ->reset('columns')
66
+ ->columns($this->getColumns())
67
+ ->where($where)
68
+ ->limit($limit, $offset)
69
+ ->order('o.entity_id');
70
+ return $this->_getReadAdapter()->fetchAll($select);
71
  }
72
 
73
  }
app/code/community/Minubo/Interface/Model/Mysql4/Orderitems.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Orderitems extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/orderitems', 'item_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('o.order_id as orderKey','o.item_id as orderLineKey','oi.product_id as productKey',
11
+ 'o.quote_Item_Id','o.is_Virtual','o.free_Shipping',
12
+ 'o.is_Qty_Decimal','o.no_Discount','o.created_At','o.updated_At','o.qty_Canceled','o.qty_Invoiced','o.qty_Ordered',
13
+ 'o.qty_Refunded','o.qty_Shipped','o.base_cost as cost','o.price','o.base_Price','o.original_Price','o.base_Original_Price',
14
+ 'o.tax_Percent','o.tax_Amount','o.base_Tax_Amount','o.tax_Invoiced','o.base_Tax_Invoiced','o.discount_Percent',
15
+ 'o.discount_Amount','o.base_Discount_Amount','o.discount_Invoiced','o.base_Discount_Invoiced','o.amount_Refunded',
16
+ 'o.base_Amount_Refunded','o.row_Total','o.base_Row_Total','o.row_Invoiced','o.base_Row_Invoiced','o.base_Tax_Before_Discount',
17
+ 'o.tax_Before_Discount','o.product_Type','o.product_Options','o.sku','o.applied_Rule_Ids','o.gift_Message_Id');
18
+ }
19
+
20
+ public function loadByField($field,$value){
21
+ $table = $this->getMainTable();
22
+ $table2 = $this->getTable('sales_flat_order_item');
23
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.item_id = IFNULL(oi.parent_item_id,oi.item_id)','');
24
+ $where = $this->_getReadAdapter()->quoteInto("$field = ? AND oi.product_type = 'simple'", $value);
25
+ $select = $this->_getReadAdapter()->select()->from(array('o'=>$table))
26
+ ->join(array('oi'=>$table2), $cond2)
27
+ ->reset('columns')
28
+ ->columns($this->getColumns())
29
+ ->where($where);
30
+ $id = $this->_getReadAdapter()->fetchOne($select);
31
+ return $id;
32
+ }
33
+
34
+ public function loadAll(){
35
+ $table = $this->getMainTable();
36
+ $table2 = $this->getTable('sales_flat_order_item');
37
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.item_id = IFNULL(oi.parent_item_id,oi.item_id)','');
38
+ $where = $this->_getReadAdapter()->quoteInto("oi.product_type='simple'", '');
39
+ $select = $this->_getReadAdapter()->select()
40
+ ->from(array('o'=>$table))
41
+ ->join(array('oi'=>$table2), $cond2)
42
+ ->reset('columns')
43
+ ->columns($this->getColumns())
44
+ ->where($where)
45
+ ->order('o.item_id');
46
+ return $this->_getReadAdapter()->fetchAll($select);
47
+ }
48
+
49
+ public function loadLimited($limit, $offset){
50
+ $table = $this->getMainTable();
51
+ $table2 = $this->getTable('sales_flat_order_item');
52
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.item_id = IFNULL(oi.parent_item_id,oi.item_id)','');
53
+ $where = $this->_getReadAdapter()->quoteInto("oi.product_type='simple'", '');
54
+ $select = $this->_getReadAdapter()->select()
55
+ ->from(array('o'=>$table))
56
+ ->join(array('oi'=>$table2), $cond2)
57
+ ->reset('columns')
58
+ ->columns($this->getColumns())
59
+ ->where($where)
60
+ ->limit($limit, $offset)
61
+ ->order('o.item_id');
62
+ return $this->_getReadAdapter()->fetchAll($select);
63
+ }
64
+
65
+ }
66
+ ?>
app/code/community/Minubo/Interface/Model/Mysql4/Orders.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Orders extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/orders', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('o.entity_id as orderKey','increment_id as orderNumber','created_At','updated_At',"ifnull(oab.customer_address_id,concat('g_',oab.entity_id)) as customerKey",
11
+ // 'o.customer_id as customerKey','o.coupon_code as Credit_Card_Type',
12
+ 'oas.postcode as shippingAddressPostcode','oas.city as shippingAddressCity','oas.country_id as shippingAddressCountryId',
13
+ // 'o.coupon_code as parentKey','o.coupon_code as isActive','o.status','o.coupon_code as comment',
14
+ 'oas.entity_id as shippingAddressIncrementId','oas.parent_id as shippingAddressParentId',
15
+ 'oas.region_id as shippingAddressRegionId','store_Id','billing_Address_Id','shipping_Address_Id','quote_Id','is_Virtual','customer_Group_Id','customer_Is_Guest',
16
+ 'shipping_address_id as shippingAddressAddressId',
17
+ 'o.created_at as shippingAddressCreatedAt','o.updated_at as shippingAddressUpdatedAt','tax_Amount','shipping_Amount','discount_Amount','subtotal','grand_Total','total_Paid',
18
+ 'total_Refunded','total_Qty_Ordered','total_Canceled','total_Invoiced',
19
+ 'base_Tax_Amount','base_Shipping_Amount','base_Discount_Amount','base_Grand_Total','base_Subtotal','base_Total_Paid','base_Total_Refunded',
20
+ 'base_Total_Qty_Ordered','base_Total_Canceled','base_Total_Invoiced',
21
+ 'store_To_Base_Rate','store_To_Order_Rate','base_To_Global_Rate','base_To_Order_Rate', /* is_active */ 'store_Name','status','state','applied_Rule_Ids',
22
+ 'global_Currency_Code','base_Currency_Code','store_Currency_Code',
23
+ 'order_Currency_Code','shipping_Method','shipping_Description','oas.gift_Message_Id', /* shippingAddressIsActive */ 'oas.address_type as shippingAddressAddressType',
24
+ 'oas.region as shippingAddressRegion','op.method as paymentMethod','oab.customer_address_id','md5(o.customer_email) as Customer_HashCode');
25
+ }
26
+
27
+ /*
28
+ SELECT o.entity_id as orderKey, increment_id as orderNumber, created_At, updated_At, o.customer_id as customerKey,
29
+ oas.postcode as shippingAddressPostcode, oas.city as shippingAddressCity, oas.country_id as shippingAddressCountryId,
30
+ oas.entity_id as shippingAddressIncrementId, oas.parent_id as shippingAddressParentId,
31
+ oas.region_id as shippingAddressRegionId, store_Id,
32
+ billing_Address_Id, shipping_Address_Id, quote_Id, is_Virtual, customer_Group_Id, customer_Is_Guest,
33
+ shipping_address_id as shippingAddressAddressId,
34
+ o.created_at as shippingAddressCreatedAt, o.updated_at as shippingAddressUpdatedAt,
35
+ tax_Amount, shipping_Amount, discount_Amount, subtotal, grand_Total, total_Paid,
36
+ total_Refunded, total_Qty_Ordered, total_Canceled, total_Invoiced,
37
+ base_Tax_Amount, base_Shipping_Amount, base_Discount_Amount, base_Grand_Total, base_Subtotal, base_Total_Paid, base_Total_Refunded,
38
+ base_Total_Qty_Ordered, base_Total_Canceled, base_Total_Invoiced,
39
+ store_To_Base_Rate, store_To_Order_Rate, base_To_Global_Rate, base_To_Order_Rate, store_Name, status, state, applied_Rule_Ids,
40
+ global_Currency_Code, base_Currency_Code, store_Currency_Code,
41
+ order_Currency_Code, shipping_Method, shipping_Description, oas.gift_Message_Id
42
+ FROM `sales_flat_order` o
43
+ inner join sales_flat_order_address oas on o.shipping_address_id = oas.entity_id
44
+ */
45
+
46
+ public function loadByField($field,$value){
47
+ $table = $this->getMainTable();
48
+ $table2 = $this->getTable('sales_flat_order_address');
49
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.shipping_address_id = oas.entity_id ','');
50
+ $table3 = $this->getTable('sales_flat_order_payment');
51
+ $cond3 = $this->_getReadAdapter()->quoteInto('o.entity_id = op.parent_id ','');
52
+ $table4 = $this->getTable('sales_flat_order_address');
53
+ $cond4 = $this->_getReadAdapter()->quoteInto("o.billing_address_id = oab.entity_id ",'');
54
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
55
+ $select = $this->_getReadAdapter()->select()->from(array('o'=>$table))
56
+ ->join(array('oas'=>$table2), $cond2)
57
+ ->join(array('op'=>$table3), $cond3)
58
+ ->join(array('oab'=>$table4), $cond4)
59
+ ->reset('columns')
60
+ ->columns($this->getColumns())
61
+ ->where($where);
62
+ $id = $this->_getReadAdapter()->fetchOne($select);
63
+ return $id;
64
+ }
65
+
66
+ public function loadAll(){
67
+ $table = $this->getMainTable();
68
+ $table2 = $this->getTable('sales_flat_order_address');
69
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.shipping_address_id = oas.entity_id ','');
70
+ $table3 = $this->getTable('sales_flat_order_payment');
71
+ $cond3 = $this->_getReadAdapter()->quoteInto('o.entity_id = op.parent_id ','');
72
+ $table4 = $this->getTable('sales_flat_order_address');
73
+ $cond4 = $this->_getReadAdapter()->quoteInto("o.billing_address_id = oab.entity_id ",'');
74
+ $where = $this->_getReadAdapter()->quoteInto("o.entity_id > ?", 0);
75
+ $select = $this->_getReadAdapter()->select()->from(array('o'=>$table))
76
+ ->join(array('oas'=>$table2), $cond2)
77
+ ->join(array('op'=>$table3), $cond3)
78
+ ->join(array('oab'=>$table4), $cond4)
79
+ ->reset('columns')
80
+ ->columns($this->getColumns())
81
+ ->where($where)
82
+ ->order('o.entity_id');
83
+ return $this->_getReadAdapter()->fetchAll($select);
84
+ }
85
+
86
+ public function loadLimited($limit, $offset){
87
+ $table = $this->getMainTable();
88
+ $table2 = $this->getTable('sales_flat_order_address');
89
+ $cond2 = $this->_getReadAdapter()->quoteInto('o.shipping_address_id = oas.entity_id ','');
90
+ $table3 = $this->getTable('sales_flat_order_payment');
91
+ $cond3 = $this->_getReadAdapter()->quoteInto('o.entity_id = op.parent_id ','');
92
+ $table4 = $this->getTable('sales_flat_order_address');
93
+ $cond4 = $this->_getReadAdapter()->quoteInto("o.billing_address_id = oab.entity_id ",'');
94
+ $where = $this->_getReadAdapter()->quoteInto("o.entity_id > ?", 0);
95
+ $select = $this->_getReadAdapter()->select()
96
+ ->from(array('o'=>$table))
97
+ ->join(array('oas'=>$table2), $cond2)
98
+ ->join(array('op'=>$table3), $cond3)
99
+ ->join(array('oab'=>$table4), $cond4)
100
+ ->reset('columns')
101
+ ->columns($this->getColumns())
102
+ ->where($where)
103
+ ->limit($limit, $offset)
104
+ ->order('o.entity_id');
105
+ return $this->_getReadAdapter()->fetchAll($select);
106
+ }
107
+
108
+ }
109
+ ?>
app/code/community/Minubo/Interface/Model/Mysql4/Productattributes.php CHANGED
@@ -18,15 +18,15 @@ class Minubo_Interface_Model_Mysql4_Productattributes extends Mage_Core_Model_My
18
  $cond3 = $this->_getReadAdapter()->quoteInto('eav.attribute_id = var.attribute_id AND ','').$this->_getReadAdapter()->quoteInto('e.entity_id = var.entity_id', '');
19
  $table4 = $this->getTable('eav_attribute_set');
20
  $cond4 = $this->_getReadAdapter()->quoteInto('e.attribute_set_id = eas.attribute_set_id AND ','').$this->_getReadAdapter()->quoteInto('e.entity_id = var.entity_id', '');
21
- $where = $this->_getReadAdapter()->quoteInto("$field = ? AND eav.attribute_code in ('name','color')", 0);
22
  $select = $this->_getReadAdapter()->select()->from(array('e'=>$table))
23
- ->join(array('eav'=>$table2), $cond2)
24
- ->join(array('var'=>$table3), $cond3)
25
- ->join(array('eas'=>$table4), $cond4)
26
- ->reset('columns')
27
- ->columns($this->getColumns())
28
- ->where($where);
29
- $id = $this->_getReadAdapter()->fetchOne($sql);
30
  return $id;
31
  }
32
 
18
  $cond3 = $this->_getReadAdapter()->quoteInto('eav.attribute_id = var.attribute_id AND ','').$this->_getReadAdapter()->quoteInto('e.entity_id = var.entity_id', '');
19
  $table4 = $this->getTable('eav_attribute_set');
20
  $cond4 = $this->_getReadAdapter()->quoteInto('e.attribute_set_id = eas.attribute_set_id AND ','').$this->_getReadAdapter()->quoteInto('e.entity_id = var.entity_id', '');
21
+ $where = $this->_getReadAdapter()->quoteInto("$field = ? AND eav.attribute_code in ('name','color')", $value);
22
  $select = $this->_getReadAdapter()->select()->from(array('e'=>$table))
23
+ ->join(array('eav'=>$table2), $cond2)
24
+ ->join(array('var'=>$table3), $cond3)
25
+ ->join(array('eas'=>$table4), $cond4)
26
+ ->reset('columns')
27
+ ->columns($this->getColumns())
28
+ ->where($where);
29
+ $id = $this->_getReadAdapter()->fetchOne($select);
30
  return $id;
31
  }
32
 
app/code/community/Minubo/Interface/Model/Mysql4/Productcategories.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Productcategories extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/productcategories', 'entity_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('category_id','product_id','position','store_id','visibility');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)
17
- ->reset('columns')
18
- ->columns($this->getColumns())
19
- ->where($where);
20
- $id = $this->_getReadAdapter()->fetchOne($sql);
21
- return $id;
22
- }
23
-
24
- public function loadAll(){
25
- $table = $this->getMainTable();
26
- $where = $this->_getReadAdapter()->quoteInto("category_id > ?", 0);
27
- $select = $this->_getReadAdapter()->select()->from($table)
28
- ->reset('columns')
29
- ->columns($this->getColumns())
30
- ->where($where)
31
- ->order('category_id');
32
- return $this->_getReadAdapter()->fetchAll($select);
33
- }
34
-
35
- public function loadLimited($limit, $offset){
36
- $table = $this->getMainTable();
37
- $where = $this->_getReadAdapter()->quoteInto("category_id > ?", 0);
38
- $select = $this->_getReadAdapter()->select()->from($table)
39
- ->reset('columns')
40
- ->columns($this->getColumns())
41
- ->where($where)
42
- ->limit($limit, $offset)
43
- ->order('category_id');
44
- return $this->_getReadAdapter()->fetchAll($select);
45
- }
46
- }
47
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Productcategories extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/productcategories', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('product_id','category_id','position','store_id','visibility');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)
17
+ ->reset('columns')
18
+ ->columns($this->getColumns())
19
+ ->where($where);
20
+ $id = $this->_getReadAdapter()->fetchOne($select);
21
+ return $id;
22
+ }
23
+
24
+ public function loadAll(){
25
+ $table = $this->getMainTable();
26
+ $where = $this->_getReadAdapter()->quoteInto("category_id > ?", 0);
27
+ $select = $this->_getReadAdapter()->select()->from($table)
28
+ ->reset('columns')
29
+ ->columns($this->getColumns())
30
+ ->where($where)
31
+ ->order('category_id');
32
+ return $this->_getReadAdapter()->fetchAll($select);
33
+ }
34
+
35
+ public function loadLimited($limit, $offset){
36
+ $table = $this->getMainTable();
37
+ $where = $this->_getReadAdapter()->quoteInto("category_id > ?", 0);
38
+ $select = $this->_getReadAdapter()->select()->from($table)
39
+ ->reset('columns')
40
+ ->columns($this->getColumns())
41
+ ->where($where)
42
+ ->limit($limit, $offset)
43
+ ->order('category_id');
44
+ return $this->_getReadAdapter()->fetchAll($select);
45
+ }
46
+ }
47
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Products.php CHANGED
@@ -1,49 +1,50 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Products extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
-
5
- public function _construct()
6
- {
7
- $this->_init('minubo_interface/products', 'entity_id');
8
- }
9
-
10
- protected function getColumns() {
11
- return array('entity_id','attribute_set_id','type_id','color','name','short_description','sku','price','special_price','special_from_date','special_to_date','cost','weight','small_image','thumbnail','news_from_date','news_to_date','tax_class_id','url_key','url_path','is_recurring','recurring_profile','visibility','required_options','has_options','image_label','small_image_label','thumbnail_label','created_at','updated_at','enable_googlecheckout','price_type','sku_type','weight_type','price_view','shipment_type','links_purchased_separately','links_title','manufacturer','manufacturer_value','links_exist','custom_design_from','custom_design_to','custom_layout_update','gallery','gift_message_available','image','media_gallery','meta_description','meta_keyword','meta_title','minimal_price','msrp','msrp_display_actual_price_type','msrp_enabled','old_id');
12
- }
13
-
14
- public function loadByField($field,$value){
15
- $table = $this->getMainTable();
16
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
17
- $select = $this->_getReadAdapter()->select()->from($table)
18
- ->reset('columns')
19
- ->columns($this->getColumns())
20
- ->where($where);
21
- $id = $this->_getReadAdapter()->fetchOne($sql);
22
- return $id;
23
- }
24
-
25
- public function loadAll(){
26
- $table = $this->getMainTable();
27
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
28
- $select = $this->_getReadAdapter()->select()->from($table)
29
- ->reset('columns')
30
- ->columns($this->getColumns())
31
- ->where($where)
32
- ->order('entity_id');
33
- return $this->_getReadAdapter()->fetchAll($select);
34
- }
35
-
36
- public function loadLimited($limit, $offset){
37
- $table = $this->getMainTable();
38
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
39
- $select = $this->_getReadAdapter()->select()->from($table)
40
- ->reset('columns')
41
- ->columns($this->getColumns())
42
- ->where($where)
43
- ->limit($limit, $offset)
44
- ->order('entity_id');
45
- return $this->_getReadAdapter()->fetchAll($select);
46
- }
47
-
48
- }
 
49
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Products extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+
5
+ public function _construct()
6
+ {
7
+ $this->_init('minubo_interface/products', 'entity_id');
8
+ }
9
+
10
+ protected function getColumns() {
11
+ return array('entity_id','attribute_set_id','type_id','color','name','short_description','sku','price','special_price','special_from_date','special_to_date','cost','weight','small_image','thumbnail','news_from_date','news_to_date','tax_class_id','url_key','url_path','is_recurring','recurring_profile','visibility','required_options','has_options','image_label','small_image_label','thumbnail_label','created_at','updated_at','enable_googlecheckout','price_type','sku_type','weight_type','price_view','shipment_type','links_purchased_separately','links_title','manufacturer','manufacturer_value','links_exist','custom_design_from','custom_design_to','custom_layout_update','gallery','gift_message_available','image','media_gallery','meta_description','meta_keyword','meta_title','minimal_price','msrp','msrp_display_actual_price_type','msrp_enabled','old_id');
12
+ }
13
+
14
+ public function loadByField($field,$value){
15
+ $table = $this->getMainTable();
16
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
17
+ $select = $this->_getReadAdapter()->select()
18
+ ->from($table)
19
+ ->reset('columns')
20
+ ->columns($this->getColumns())
21
+ ->where($where);
22
+ $id = $this->_getReadAdapter()->fetchOne($select);
23
+ return $id;
24
+ }
25
+
26
+ public function loadAll(){
27
+ $table = $this->getMainTable();
28
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
29
+ $select = $this->_getReadAdapter()->select()->from($table)
30
+ ->reset('columns')
31
+ ->columns($this->getColumns())
32
+ ->where($where)
33
+ ->order('entity_id');
34
+ return $this->_getReadAdapter()->fetchAll($select);
35
+ }
36
+
37
+ public function loadLimited($limit, $offset){
38
+ $table = $this->getMainTable();
39
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
40
+ $select = $this->_getReadAdapter()->select()->from($table)
41
+ ->reset('columns')
42
+ ->columns($this->getColumns())
43
+ ->where($where)
44
+ ->limit($limit, $offset)
45
+ ->order('entity_id');
46
+ return $this->_getReadAdapter()->fetchAll($select);
47
+ }
48
+
49
+ }
50
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Products2.php CHANGED
@@ -1,35 +1,49 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Products extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/products2', 'entity_id');
7
- }
8
-
9
- public function loadByField($field,$value){
10
- $table = $this->getMainTable();
11
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
- // $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where);
13
- $select = $this->_getReadAdapter()->select()->from($table)->where($where);
14
- $id = $this->_getReadAdapter()->fetchOne($sql);
15
- return $id;
16
- }
17
-
18
- public function loadAll(){
19
- $table = $this->getMainTable();
20
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
21
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where)->limit(10,5)->order('created_at');
22
- $select = $this->_getReadAdapter()->select()->from($table)->where($where)->order('entity_id');
23
- return $this->_getReadAdapter()->fetchAll($select);
24
- }
25
-
26
- public function loadFiltered($lastChangeDate, $lastOrderID, $maxOrderID, $limit){
27
- $table = $this->getMainTable();
28
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
29
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where)->limit(10,5)->order('created_at');
30
- $select = $this->_getReadAdapter()->select()->from($table)->where($where)->order('entity_id');
31
- return $this->_getReadAdapter()->fetchAll($select);
32
- }
33
-
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Products2 extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/products2', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','attribute_set_id','type_id','color','name','short_description','sku','price','special_price','special_from_date','special_to_date','cost','weight','small_image','thumbnail','news_from_date','news_to_date','tax_class_id','url_key','url_path','is_recurring','recurring_profile','visibility','required_options','has_options','image_label','small_image_label','thumbnail_label','created_at','updated_at','enable_googlecheckout','price_type','sku_type','weight_type','price_view','shipment_type','links_purchased_separately','links_title','manufacturer','manufacturer_value','links_exist','custom_design_from','custom_design_to','custom_layout_update','gallery','gift_message_available','image','media_gallery','meta_description','meta_keyword','meta_title','minimal_price','msrp','msrp_display_actual_price_type','msrp_enabled','old_id');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()
17
+ ->from($table)
18
+ ->reset('columns')
19
+ ->columns($this->getColumns())
20
+ ->where($where);
21
+ $id = $this->_getReadAdapter()->fetchOne($select);
22
+ return $id;
23
+ }
24
+
25
+ public function loadAll(){
26
+ $table = $this->getMainTable();
27
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
28
+ $select = $this->_getReadAdapter()->select()->from($table)
29
+ ->reset('columns')
30
+ ->columns($this->getColumns())
31
+ ->where($where)
32
+ ->order('entity_id');
33
+ return $this->_getReadAdapter()->fetchAll($select);
34
+ }
35
+
36
+ public function loadLimited($limit, $offset){
37
+ $table = $this->getMainTable();
38
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
39
+ $select = $this->_getReadAdapter()->select()->from($table)
40
+ ->reset('columns')
41
+ ->columns($this->getColumns())
42
+ ->where($where)
43
+ ->limit($limit, $offset)
44
+ ->order('entity_id');
45
+ return $this->_getReadAdapter()->fetchAll($select);
46
+ }
47
+
48
+ }
49
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Products3.php CHANGED
@@ -1,35 +1,49 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Products extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/products3', 'entity_id');
7
- }
8
-
9
- public function loadByField($field,$value){
10
- $table = $this->getMainTable();
11
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
12
- // $select = $this->_getReadAdapter()->select()->from($table,array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where);
13
- $select = $this->_getReadAdapter()->select()->from($table)->where($where);
14
- $id = $this->_getReadAdapter()->fetchOne($sql);
15
- return $id;
16
- }
17
-
18
- public function loadAll(){
19
- $table = $this->getMainTable();
20
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
21
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where)->limit(10,5)->order('created_at');
22
- $select = $this->_getReadAdapter()->select()->from($table)->where($where)->order('entity_id');
23
- return $this->_getReadAdapter()->fetchAll($select);
24
- }
25
-
26
- public function loadFiltered($lastChangeDate, $lastOrderID, $maxOrderID, $limit){
27
- $table = $this->getMainTable();
28
- $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
29
- // $select = $this->_getReadAdapter()->select()->from($table)->columns(array('entity_id','name','sku','sku_type','computer_manufacturers','computer_manufacturers_value','country_orgin','color','color_value','price','tax_class_id','cost','msrp','msrp_display_actual_price_type','msrp_enabled','shoe_size','shoe_size_value'))->where($where)->limit(10,5)->order('created_at');
30
- $select = $this->_getReadAdapter()->select()->from($table)->where($where)->order('entity_id');
31
- return $this->_getReadAdapter()->fetchAll($select);
32
- }
33
-
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Products3 extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/products3', 'entity_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('entity_id','attribute_set_id','type_id','color','name','short_description','sku','price','special_price','special_from_date','special_to_date','cost','weight','small_image','thumbnail','news_from_date','news_to_date','tax_class_id','url_key','url_path','is_recurring','recurring_profile','visibility','required_options','has_options','image_label','small_image_label','thumbnail_label','created_at','updated_at','enable_googlecheckout','price_type','sku_type','weight_type','price_view','shipment_type','links_purchased_separately','links_title','manufacturer','manufacturer_value','links_exist','custom_design_from','custom_design_to','custom_layout_update','gallery','gift_message_available','image','media_gallery','meta_description','meta_keyword','meta_title','minimal_price','msrp','msrp_display_actual_price_type','msrp_enabled','old_id');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()
17
+ ->from($table)
18
+ ->reset('columns')
19
+ ->columns($this->getColumns())
20
+ ->where($where);
21
+ $id = $this->_getReadAdapter()->fetchOne($select);
22
+ return $id;
23
+ }
24
+
25
+ public function loadAll(){
26
+ $table = $this->getMainTable();
27
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
28
+ $select = $this->_getReadAdapter()->select()->from($table)
29
+ ->reset('columns')
30
+ ->columns($this->getColumns())
31
+ ->where($where)
32
+ ->order('entity_id');
33
+ return $this->_getReadAdapter()->fetchAll($select);
34
+ }
35
+
36
+ public function loadLimited($limit, $offset){
37
+ $table = $this->getMainTable();
38
+ $where = $this->_getReadAdapter()->quoteInto("entity_id > ?", 0);
39
+ $select = $this->_getReadAdapter()->select()->from($table)
40
+ ->reset('columns')
41
+ ->columns($this->getColumns())
42
+ ->where($where)
43
+ ->limit($limit, $offset)
44
+ ->order('entity_id');
45
+ return $this->_getReadAdapter()->fetchAll($select);
46
+ }
47
+
48
+ }
49
  ?>
app/code/community/Minubo/Interface/Model/Mysql4/Regions.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- class Minubo_Interface_Model_Mysql4_Regions extends Mage_Core_Model_Mysql4_Abstract
3
- {
4
- public function _construct()
5
- {
6
- $this->_init('minubo_interface/regions', 'region_id');
7
- }
8
-
9
- protected function getColumns() {
10
- return array('region_id','country_id','code','default_name');
11
- }
12
-
13
- public function loadByField($field,$value){
14
- $table = $this->getMainTable();
15
- $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
- $select = $this->_getReadAdapter()->select()->from($table)->where($where);
17
- $id = $this->_getReadAdapter()->fetchOne($sql);
18
- return $id;
19
- }
20
-
21
- public function loadAll(){
22
- $table = $this->getMainTable();
23
- $where = $this->_getReadAdapter()->quoteInto("region_id > ?", 0);
24
- $select = $this->_getReadAdapter()->select()->from($table)
25
- ->reset('columns')
26
- ->columns($this->getColumns())
27
- ->where($where)
28
- ->order('region_id');
29
- return $this->_getReadAdapter()->fetchAll($select);
30
- }
31
-
32
- public function loadLimited($limit, $offset){
33
- $table = $this->getMainTable();
34
- $where = $this->_getReadAdapter()->quoteInto("region_id > ?", 0);
35
- $select = $this->_getReadAdapter()->select()->from($table)
36
- ->reset('columns')
37
- ->columns($this->getColumns())
38
- ->where($where)
39
- ->limit($limit, $offset)
40
- ->order('region_id');
41
- return $this->_getReadAdapter()->fetchAll($select);
42
- }
43
-
44
- }
45
  ?>
1
+ <?php
2
+ class Minubo_Interface_Model_Mysql4_Regions extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('minubo_interface/regions', 'region_id');
7
+ }
8
+
9
+ protected function getColumns() {
10
+ return array('region_id','country_id','code','default_name');
11
+ }
12
+
13
+ public function loadByField($field,$value){
14
+ $table = $this->getMainTable();
15
+ $where = $this->_getReadAdapter()->quoteInto("$field = ?", $value);
16
+ $select = $this->_getReadAdapter()->select()->from($table)->where($where);
17
+ $id = $this->_getReadAdapter()->fetchOne($select);
18
+ return $id;
19
+ }
20
+
21
+ public function loadAll(){
22
+ $table = $this->getMainTable();
23
+ $where = $this->_getReadAdapter()->quoteInto("region_id > ?", 0);
24
+ $select = $this->_getReadAdapter()->select()->from($table)
25
+ ->reset('columns')
26
+ ->columns($this->getColumns())
27
+ ->where($where)
28
+ ->order('region_id');
29
+ return $this->_getReadAdapter()->fetchAll($select);
30
+ }
31
+
32
+ public function loadLimited($limit, $offset){
33
+ $table = $this->getMainTable();
34
+ $where = $this->_getReadAdapter()->quoteInto("region_id > ?", 0);
35
+ $select = $this->_getReadAdapter()->select()->from($table)
36
+ ->reset('columns')
37
+ ->columns($this->getColumns())
38
+ ->where($where)
39
+ ->limit($limit, $offset)
40
+ ->order('region_id');
41
+ return $this->_getReadAdapter()->fetchAll($select);
42
+ }
43
+
44
+ }
45
  ?>
app/code/community/Minubo/Interface/Model/Options/Options.php CHANGED
@@ -1,12 +1,12 @@
1
- <?php
2
- class Minubo_Interface_Model_Options_Options
3
- {
4
-
5
- public function toOptionArray()
6
- {
7
- return array(
8
- array('value' => 'Standard', 'label'=>Mage::helper('adminhtml')->__('Standard'))
9
- );
10
- }
11
-
12
  }
1
+ <?php
2
+ class Minubo_Interface_Model_Options_Options
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'Standard', 'label'=>Mage::helper('adminhtml')->__('Standard'))
9
+ );
10
+ }
11
+
12
  }
app/code/community/Minubo/Interface/Model/Options/Version.php CHANGED
@@ -1,10 +1,10 @@
1
- <?php
2
- class Minubo_Interface_Model_Options_Options
3
- {
4
-
5
- public function toOptionArray()
6
- {
7
- return (string) Mage::getConfig()->getNode()->modules->Minubo_Interface->version;
8
- }
9
-
10
  }
1
+ <?php
2
+ class Minubo_Interface_Model_Options_Version
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ return (string) Mage::getConfig()->getNode()->modules->Minubo_Interface->version;
8
+ }
9
+
10
  }
app/code/community/Minubo/Interface/Model/Read/Collections.php CHANGED
@@ -22,7 +22,7 @@
22
  * @package Minubo_Interface
23
  * @copyright Copyright (c) 2013 Minubo (http://www.minubo.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- * @author Sven Rothe <srothe@minubo.com>
26
  * */
27
 
28
  class Minubo_Interface_Model_Read_Collections extends Minubo_Interface_Model_Read_Common
@@ -31,69 +31,22 @@ class Minubo_Interface_Model_Read_Collections extends Minubo_Interface_Model_Rea
31
  /**
32
  * Concrete implementation of abstract method to export given orders to csv file in var/export.
33
  *
34
- * @param $orders List of orders of type Mage_Sales_Model_Order or order ids to export.
 
 
 
 
 
 
 
 
 
 
35
  * @return String The name of the written csv file in var/export
36
  */
37
  public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $type='', $sort='')
38
  {
39
- return $this->readOrders($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $type, $sort);
40
- }
41
-
42
- public function readOrders($lastExportDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $type='', $sort='')
43
- {
44
- // Bestellungen laden
45
- if($debug) echo '# ORDER getCollection: '.$limit.'/'.$offset.'/'.$type.'/'.$sort.'/'.$lastExportDate.'<br>';
46
-
47
- $orders = Mage::getModel('sales/order')->getCollection();
48
-
49
- if($lastExportDate) $orders->addFieldToFilter('updated_at',Array('gt'=>$lastExportDate));
50
- if($maxChangeDate ) $orders->addFieldToFilter('updated_at',Array('lteq'=>$maxChangeDate));
51
- if($lastOrderID ) $orders->addFieldToFilter('increment_id',Array('gt'=>$lastOrderID));
52
- if($maxOrderID ) $orders->addFieldToFilter('increment_id',Array('lteq'=>$mxOrderID));
53
- if($sort ) $orders->addAttributeToSort(substr($sort,0,strpos($sort,' ')), substr($sort,strpos($sort,' ')+1));
54
-
55
- $orders->setPage(($offset/$limit)+1, $limit);
56
-
57
- if($debug) echo '# Recordcount: '.count($orders).'/'.$orders->getSize().'<br>';
58
-
59
- if($debug) echo '# Paramter: '.$lastExportDate.'/'.$maxChangeDate.'/'.$lastOrderID.'/'.$maxOrderID.'/'.$limit.'/'.$offset.'<br>';
60
- $i=0;
61
- $firstChangeDate='';
62
- $lastChangeDate='';
63
- $distinctKeys=array();
64
- foreach($orders as $key=>$order) {
65
- //product
66
- if($debug>=2) echo '# Next order: '.$lastExportDate.'/'.$maxChangeDate.'/'.$firstChangeDate.'/'.$lastChangeDate.'/'.$order->getUpdatedAt().'<br>';
67
-
68
- if(($offset==0) && (!$firstChangeDate || ($order->getUpdatedAt()<$firstChangeDate))) {
69
- if($debug>=2) echo '# New FirstChangeDate: '.$order->getUpdatedAt().' -> '.$firstChangeDate.'<br>';
70
- $firstChangeDate=$order->getUpdatedAt();
71
- }
72
- if(!$maxChangeDate && (!$lastChangeDate || ($order->getUpdatedAt()>$lastChangeDate))) {
73
- if($debug>=2) echo '# New LastChangeDate: '.$order->getUpdatedAt().' -> '.$lastChangeDate.'<br>';
74
- $lastChangeDate=$order->getUpdatedAt();
75
- }
76
-
77
- if($type=='orderCustomers') {
78
- $distinctKey=md5($order->getCustomerEmail());
79
- if(in_array($distinctKey,$distinctKeys)) {
80
- $orders->removeItemByKey($key);
81
- if ($debug>=2) echo '# Deleted by DUPLICATE CUSTOMER EMAIL: '.$distinctKey.' '.$order->getIncrementId().' '.$order->getUpdatedAt(),'<br>';
82
- } else {
83
- $distinctKeys[] = $distinctKey;
84
- }
85
- }
86
-
87
- }
88
- if($debug) echo '# New Values (firstChangeDate/lastChangeDate): '.$firstChangeDate.'/'.$lastChangeDate.'<br>';
89
-
90
- if(!$maxChangeDate) {
91
- $config = new Mage_Core_Model_Config();
92
- $config->saveConfig('minubo_interface/settings/firstchangedate', $firstChangeDate, 'default', 0);
93
- $config->saveConfig('minubo_interface/settings/lastchangedate', $lastChangeDate, 'default', 0);
94
- }
95
-
96
- return $orders;
97
  }
98
 
99
  public function readCountries($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
@@ -102,34 +55,6 @@ class Minubo_Interface_Model_Read_Collections extends Minubo_Interface_Model_Rea
102
  return $countries;
103
  }
104
 
105
- public function readCustomers($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
106
- {
107
- $customers = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
108
- return $customers;
109
- }
110
-
111
- public function readProducts($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
112
- {
113
- // $products = Mage::getModel('catalog/product')->getResourceCollection()->toOptionArray(true);
114
- $products = Mage::getResourceModel('catalog/product_collection');
115
-
116
- $i=0;
117
- $firstChangeDate='';
118
- $lastChangeDate='';
119
- foreach($products as $key=>$product){
120
- if($i<=$offset) {
121
- $products->removeItemByKey($key);
122
- if($debug>=2) echo '# Deleted by OFFSET: '.$key.' '.$products->getIncrementId().' '.$products->getUpdatedAt(),'<br>';
123
- }
124
- if($i>($offset+$limit)) {
125
- $products->removeItemByKey($key);
126
- if($debug>=2) echo '# Deleted by LIMIT: '.$key.' '.$products->getIncrementId().' '.$products->getUpdatedAt(),'<br>';
127
- }
128
- }
129
-
130
- return $products;
131
- }
132
-
133
  }
134
 
135
  ?>
22
  * @package Minubo_Interface
23
  * @copyright Copyright (c) 2013 Minubo (http://www.minubo.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ * @author Sven Rothe <sven@minubo.com>
26
  * */
27
 
28
  class Minubo_Interface_Model_Read_Collections extends Minubo_Interface_Model_Read_Common
31
  /**
32
  * Concrete implementation of abstract method to export given orders to csv file in var/export.
33
  *
34
+ * @param $lastChangeDate
35
+ * @param $maxChangeDate
36
+ * @param $lastOrderID
37
+ * @param $maxOrderID
38
+ * @param $limit
39
+ * @param $offset
40
+ * @param $debug
41
+ * @param $pdata
42
+ * @param $store_id
43
+ * @param $type
44
+ * @param $sort
45
  * @return String The name of the written csv file in var/export
46
  */
47
  public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $type='', $sort='')
48
  {
49
+ return $this->readCountries($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
  public function readCountries($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
55
  return $countries;
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
 
60
  ?>
app/code/community/Minubo/Interface/Model/Read/Common.php CHANGED
@@ -22,7 +22,7 @@
22
  * @package Minubo_Interface
23
  * @copyright Copyright (c) 2013 Minubo (http://www.minubo.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- * @author Sven Rothe <srothe@minubo.com>
26
  * */
27
  abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstract
28
 
@@ -30,7 +30,15 @@ abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstra
30
  /**
31
  * Definition of abstract method to export orders to a file in a specific format in var/export.
32
  *
33
- * @param $orders List of orders of type Mage_Sales_Model_Order or order ids to export.
 
 
 
 
 
 
 
 
34
  * @return String The name of the written file in var/export
35
  */
36
  abstract public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
@@ -97,6 +105,7 @@ abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstra
97
  * @param Mage_Sales_Model_Order $order The order to return info from
98
  * @return int The total quantity of ordered items
99
  */
 
100
  protected function getTotalQtyItemsOrdered($order) {
101
  $qty = 0;
102
  $orderedItems = $order->getItemsCollection();
@@ -108,6 +117,7 @@ abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstra
108
  }
109
  return $qty;
110
  }
 
111
 
112
  /**
113
  * Returns the sku of the given item dependant on the product type.
@@ -191,11 +201,12 @@ abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstra
191
  protected function formatPrice($price, $formatter)
192
  {
193
  $price = $formatter->formatPriceTxt($price);
194
- $price = str_replace('�', '', $price);
195
- $price = str_replace('€', '�', $price);
196
  return $price;
197
  }
198
 
 
199
  protected function getStreet($address) {
200
  if ($address->getStreet2() != '') {
201
  return $address->getStreet1() .' ' .$address->getStreet2();
@@ -204,7 +215,7 @@ abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstra
204
  return $address->getStreet1();
205
  }
206
  }
207
-
208
  }
209
 
210
  ?>
22
  * @package Minubo_Interface
23
  * @copyright Copyright (c) 2013 Minubo (http://www.minubo.com)
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ * @author Sven Rothe <sven@minubo.com>
26
  * */
27
  abstract class Minubo_Interface_Model_Read_Common extends Mage_Core_Model_Abstract
28
 
30
  /**
31
  * Definition of abstract method to export orders to a file in a specific format in var/export.
32
  *
33
+ * @param $lastChangeDate
34
+ * @param $maxChangeDate
35
+ * @param $lastOrderID
36
+ * @param $maxOrderID
37
+ * @param $limit
38
+ * @param $offset
39
+ * @param $debug
40
+ * @param $pdata
41
+ * @param $store_id
42
  * @return String The name of the written file in var/export
43
  */
44
  abstract public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
105
  * @param Mage_Sales_Model_Order $order The order to return info from
106
  * @return int The total quantity of ordered items
107
  */
108
+ /*
109
  protected function getTotalQtyItemsOrdered($order) {
110
  $qty = 0;
111
  $orderedItems = $order->getItemsCollection();
117
  }
118
  return $qty;
119
  }
120
+ */
121
 
122
  /**
123
  * Returns the sku of the given item dependant on the product type.
201
  protected function formatPrice($price, $formatter)
202
  {
203
  $price = $formatter->formatPriceTxt($price);
204
+ $price = str_replace('�', '', $price);
205
+ $price = str_replace('€', '�', $price);
206
  return $price;
207
  }
208
 
209
+ /*
210
  protected function getStreet($address) {
211
  if ($address->getStreet2() != '') {
212
  return $address->getStreet1() .' ' .$address->getStreet2();
215
  return $address->getStreet1();
216
  }
217
  }
218
+ */
219
  }
220
 
221
  ?>
app/code/community/Minubo/Interface/Model/Tables.php CHANGED
@@ -29,23 +29,23 @@ class Minubo_Interface_Model_Tables extends Minubo_Interface_Model_Read_Common
29
  {
30
  protected function _construct()
31
  {
32
- parent::_construct();
33
  }
34
 
35
- public function init($ent)
36
- {
37
- $this->_init('minubo_interface/'.$ent);
38
  }
39
 
40
  public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
41
  {
42
- $data = $this->getResource()->loadFiltered($lastChangeDate, $lastOrderID, $maxOrderID, $limit);
43
  return $data;
44
  }
45
 
46
  public function readAll()
47
  {
48
- $data = $this->getResource()->loadAll();
49
  return $data;
50
  }
51
 
29
  {
30
  protected function _construct()
31
  {
32
+ parent::_construct();
33
  }
34
 
35
+ public function init($ent)
36
+ {
37
+ $this->_init('minubo_interface/'.$ent);
38
  }
39
 
40
  public function read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id)
41
  {
42
+ $data = $this->getResource()->loadFiltered($lastChangeDate, $lastOrderID, $maxOrderID, $limit);
43
  return $data;
44
  }
45
 
46
  public function readAll()
47
  {
48
+ $data = $this->getResource()->loadAll();
49
  return $data;
50
  }
51
 
app/code/community/Minubo/Interface/controllers/ExportController.php CHANGED
@@ -41,7 +41,7 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
41
  echo (string) Mage::getConfig()->getNode()->modules->Minubo_Interface->version;
42
  }
43
 
44
- public function counterAction($qtd = 30)
45
  {
46
  $this->getParam($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $download);
47
 
@@ -73,8 +73,15 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
73
  $productcategories = $model->readAll();
74
  echo '# ProductCategories: '.count($productcategories).'<br>';
75
 
76
- $orders = Mage::getModel('minubo_interface/read_collections')->read($lastChangeDate, '', $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
 
 
 
77
  echo '# Orders: '.count($orders).'<br>';
 
 
 
 
78
 
79
  $model = Mage::getModel('minubo_interface/tables');
80
  $model->init('creditmemos');
@@ -155,83 +162,6 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
155
 
156
  }
157
 
158
- /*
159
- * load and export of data of type ORDER
160
- */
161
-
162
- public function ordersAction ()
163
- {
164
- $this->handleOrder('order','orders');
165
- }
166
-
167
- public function orderCustomersAction ()
168
- {
169
- $this->handleOrder('ordercust','orderCustomers');
170
- }
171
-
172
- public function orderItemsAction ()
173
- {
174
- $this->handleOrder('orderitem','orderItems');
175
- }
176
-
177
- public function handleOrder ($filename, $type)
178
- {
179
- $start = $this->getStartlog();
180
- $this->getParam($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $download);
181
- // $maxChangeDate = (string) Mage::getStoreConfig('minubo_interface/settings/lastchangedate',Mage::app()->getStore());
182
-
183
- switch(Mage::getStoreConfig('minubo_interface/settings/output_type')){
184
- case 'Standard':
185
- $orders = Mage::getModel('minubo_interface/read_collections')->read($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID,
186
- $limit, $offset, $debug, $pdata, $store_id, $type,
187
- ($type=='orderCustomers'?'entity_id desc':''));
188
- $file = Mage::getModel('minubo_interface/export_csv')->exportOrder($orders, $filename, $type, $pdata);
189
- if (!$download) {
190
- echo file_get_contents(Mage::getBaseDir('export').'/'.$file);
191
- } else {
192
- $this->_prepareDownloadResponse($file, file_get_contents(Mage::getBaseDir('export').'/'.$file));
193
- }
194
- break;
195
- }
196
- $config = new Mage_Core_Model_Config();
197
- $config->saveConfig('minubo_interface/settings/lastexportenddate', date('Y.m.d H:i:s'), 'default', 0);
198
- $config = null;
199
-
200
- $orders = null;
201
- $file = null;
202
- if($debug) echo $this->getEndlog($start);
203
- }
204
-
205
- /*
206
- * load and export of data of type PRODUCT - csv/exportProduct not implemented yet
207
- */
208
- /*
209
- public function productscollAction ()
210
- {
211
- $start = $this->getStartlog();
212
- $this->getParam($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $download);
213
- $maxChangeDate = (string) Mage::getStoreConfig('minubo_interface/settings/lastchangedate',Mage::app()->getStore());
214
-
215
- switch(Mage::getStoreConfig('minubo_interface/settings/output_type')){
216
- case 'Standard':
217
- $products = Mage::getModel('minubo_interface/read_collections')->readProducts($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
218
- $file = Mage::getModel('minubo_interface/export_csv')->exportProduct($products, 'productcoll', 'products', '');
219
- if (!$download) {
220
- echo file_get_contents(Mage::getBaseDir('export').'/'.$file);
221
- } else {
222
- $this->_prepareDownloadResponse($file, file_get_contents(Mage::getBaseDir('export').'/'.$file));
223
- }break;
224
- }
225
- $config = new Mage_Core_Model_Config();
226
- $config->saveConfig('minubo_interface/settings/lastexportenddate', date('Y.m.d H:i:s'), 'default', 0);
227
- $config = null;
228
-
229
- $products = null;
230
- $file = null;
231
- if($debug) echo $this->getEndlog($start);
232
- }
233
- */
234
-
235
  public function countriesAction ()
236
  {
237
  $start = $this->getStartlog();
@@ -261,69 +191,57 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
261
  $file = null;
262
  }
263
 
264
- public function handleCollection (&$rows, $filename, $type, $pdata, $start, $download)
265
- {
266
- switch(Mage::getStoreConfig('minubo_interface/settings/output_type')){
267
- case 'Standard':
268
- $file = Mage::getModel('minubo_interface/export_csv')->exportCollection($rows, $filename, $type, $pdata);
269
- if (!$download) {
270
- echo file_get_contents(Mage::getBaseDir('export').'/'.$file);
271
- } else {
272
- $this->_prepareDownloadResponse($file, file_get_contents(Mage::getBaseDir('export').'/'.$file));
273
- }
274
- break;
275
- }
276
- $config = new Mage_Core_Model_Config();
277
- $config->saveConfig('minubo_interface/settings/lastexportenddate', date('Y.m.d H:i:s'), 'default', 0);
278
- $config = null;
279
-
280
- $rows = null;
281
- $file = null;
282
- }
283
-
284
  /*
285
  * load and export of data of type TABLE
286
  * Read data directly from tables defined in config.xml and Model/Mysql4
287
  */
288
 
289
- public function customersAction ()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  {
291
  $renameCols = array('entity_id' => 'customer_id');
292
  $this->handleTable ('customers', 'customer', 'customers', Array(), Array(), $renameCols);
293
- /*
294
- $customers = Mage::getModel('minubo_interface/read_collections')->readCustomers($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
295
- $file = Mage::getModel('minubo_interface/export_csv')->exportCustomer($customers, 'customer', 'customers', '');
296
- */
297
  }
298
 
299
  public function customerAddressesAction ()
300
  {
301
- $this->handleTable ('customeraddresses', 'customeraddr', 'customerAddresses', Array(), Array(), Array());
302
- }
303
-
304
- public function orderAddressesAction ()
305
- {
306
- $this->handleTable ('orderaddresses', 'orderaddr', 'orderAddresses', Array(), Array(), Array());
307
  }
308
 
309
  public function productsAction ()
310
  {
311
  $skipCols = array('description', 'in_depth', 'activation_information');
312
- $this->handleTable ('products', 'product', 'products', Array(), $skipCols, Array());
313
  }
314
 
315
  public function categoriesAction ()
316
  {
317
  $renameCols = array('entity_id' => 'category_id');
318
  $colTitles = array('Category_Id','Parent_Id','Position','Category_Name','level','image','url_key','url_path');
319
- $this->handleTable ('categories', 'category', 'categories', $colTitles, Array(), $renameCols);
320
  }
321
 
322
  public function productcategoriesAction ()
323
  {
324
  $skipCols = array('is_parent');
325
  $colTitles = array('category_id','product_id','position','store_id','visibility');
326
- $this->handleTable ('productcategories', 'productcategory', 'productcategories', $colTitles, $skipCols, Array());
327
  }
328
 
329
  public function productattributesAction ()
@@ -336,13 +254,13 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
336
  'is_required' => 'attributeRequired',
337
  'value' => 'optionLabel',
338
  'value_id' => 'optionValue');
339
- $this->handleTable ('productattributes', 'productattribute', 'productattributes', Array(), Array(), $renameCols);
340
  }
341
 
342
  public function regionsAction ()
343
  {
344
  $colTitles = array('Region_Id','Country_Id','Region_Code','Region_Name');
345
- $this->handleTable ('regions', 'region', 'regions', $colTitles, Array(), Array());
346
  }
347
 
348
  public function creditmemosAction ()
@@ -398,35 +316,5 @@ class Minubo_Interface_ExportController extends Mage_Core_Controller_Front_Actio
398
  if($debug) echo $this->getEndlog($start);
399
  }
400
 
401
- /*
402
- public function getHashAction($qtd = 30)
403
- {
404
- $chars = '0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789';
405
- $anz = strlen($chars);
406
- $anz--;
407
- $hash=NULL;
408
- for($x=1;$x<=$qtd;$x++){
409
- $c = rand(0,$anz);
410
- $hash .= substr($chars,$c,1);
411
- }
412
- Mage::getConfig()->setNode('minubo_interface/settings/hash', $hash);
413
- echo $hash;
414
- }
415
-
416
- public function newHashAction($qtd = 30)
417
- {
418
- $chars = '0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMOPQRSTUVXWYZ0123456789';
419
- $anz = strlen($chars);
420
- $anz--;
421
- $hash=NULL;
422
- for($x=1;$x<=$qtd;$x++){
423
- $c = rand(0,$anz);
424
- $hash .= substr($chars,$c,1);
425
- }
426
- Mage::getConfig()->setNode('minubo_interface/settings/hash', $hash);
427
- Mage::app()->getResponse()->setBody($hash);
428
- }
429
- */
430
-
431
  }
432
  ?>
41
  echo (string) Mage::getConfig()->getNode()->modules->Minubo_Interface->version;
42
  }
43
 
44
+ public function counterAction()
45
  {
46
  $this->getParam($lastChangeDate, $maxChangeDate, $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id, $download);
47
 
73
  $productcategories = $model->readAll();
74
  echo '# ProductCategories: '.count($productcategories).'<br>';
75
 
76
+ // $orders = Mage::getModel('minubo_interface/read_collections')->read($lastChangeDate, '', $lastOrderID, $maxOrderID, $limit, $offset, $debug, $pdata, $store_id);
77
+ $model = Mage::getModel('minubo_interface/tables');
78
+ $model->init('orders');
79
+ $orders = $model->readAll();
80
  echo '# Orders: '.count($orders).'<br>';
81
+ $model = Mage::getModel('minubo_interface/tables');
82
+ $model->init('orderitems');
83
+ $orderitems = $model->readAll();
84
+ echo '# OrderItems: '.count($orderitems).'<br>';
85
 
86
  $model = Mage::getModel('minubo_interface/tables');
87
  $model->init('creditmemos');
162
 
163
  }
164
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  public function countriesAction ()
166
  {
167
  $start = $this->getStartlog();
191
  $file = null;
192
  }
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  /*
195
  * load and export of data of type TABLE
196
  * Read data directly from tables defined in config.xml and Model/Mysql4
197
  */
198
 
199
+ public function ordersAction ()
200
+ {
201
+ $renameCols = array('entity_id' => 'order_id');
202
+ $this->handleTable ('orders', 'order', 'orders', Array(), Array(), $renameCols);
203
+ }
204
+
205
+ public function orderItemsAction ()
206
+ {
207
+ $renameCols = array('item_id' => 'orderitem_id');
208
+ $this->handleTable ('orderitems', 'orderitem', 'orderitems', Array(), Array(), $renameCols);
209
+ }
210
+
211
+ public function orderCustomersAction ()
212
+ {
213
+ $this->handleTable ('orderaddresses', 'orderaddr', 'orderAddresses', Array(), Array(), Array());
214
+ }
215
+
216
+ public function customersAction ()
217
  {
218
  $renameCols = array('entity_id' => 'customer_id');
219
  $this->handleTable ('customers', 'customer', 'customers', Array(), Array(), $renameCols);
 
 
 
 
220
  }
221
 
222
  public function customerAddressesAction ()
223
  {
224
+ $this->handleTable ('orderaddresses', 'orderaddr', 'orderaddresses', Array(), Array(), Array());
 
 
 
 
 
225
  }
226
 
227
  public function productsAction ()
228
  {
229
  $skipCols = array('description', 'in_depth', 'activation_information');
230
+ $this->handleTable ('products', 'product', 'products', Array(), $skipCols, Array());
231
  }
232
 
233
  public function categoriesAction ()
234
  {
235
  $renameCols = array('entity_id' => 'category_id');
236
  $colTitles = array('Category_Id','Parent_Id','Position','Category_Name','level','image','url_key','url_path');
237
+ $this->handleTable ('categories', 'category', 'categories', $colTitles, Array(), $renameCols);
238
  }
239
 
240
  public function productcategoriesAction ()
241
  {
242
  $skipCols = array('is_parent');
243
  $colTitles = array('category_id','product_id','position','store_id','visibility');
244
+ $this->handleTable ('productcategories', 'productcategory', 'productcategories', $colTitles, $skipCols, Array());
245
  }
246
 
247
  public function productattributesAction ()
254
  'is_required' => 'attributeRequired',
255
  'value' => 'optionLabel',
256
  'value_id' => 'optionValue');
257
+ $this->handleTable ('productattributes', 'productattribute', 'productattributes', Array(), Array(), $renameCols);
258
  }
259
 
260
  public function regionsAction ()
261
  {
262
  $colTitles = array('Region_Id','Country_Id','Region_Code','Region_Name');
263
+ $this->handleTable ('regions', 'region', 'regions', $colTitles, Array(), Array());
264
  }
265
 
266
  public function creditmemosAction ()
316
  if($debug) echo $this->getEndlog($start);
317
  }
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  }
320
  ?>
app/code/community/Minubo/Interface/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Minubo_Interface>
5
- <version>1.0.2</version>
6
  </Minubo_Interface>
7
  </modules>
8
  <global>
@@ -14,6 +14,18 @@
14
  <minubo_mysql4>
15
  <class>Minubo_Interface_Model_Mysql4</class>
16
  <entities>
 
 
 
 
 
 
 
 
 
 
 
 
17
  <categories>
18
  <table>catalog_category_flat_store_1</table>
19
  </categories>
@@ -44,6 +56,9 @@
44
  <sales_flat_order>
45
  <table>sales_flat_order</table>
46
  </sales_flat_order>
 
 
 
47
  <regions>
48
  <table>directory_country_region</table>
49
  </regions>
2
  <config>
3
  <modules>
4
  <Minubo_Interface>
5
+ <version>1.0.3</version>
6
  </Minubo_Interface>
7
  </modules>
8
  <global>
14
  <minubo_mysql4>
15
  <class>Minubo_Interface_Model_Mysql4</class>
16
  <entities>
17
+ <orders>
18
+ <table>sales_flat_order</table>
19
+ </orders>
20
+ <sales_flat_order_address>
21
+ <table>sales_flat_order_address</table>
22
+ </sales_flat_order_address>
23
+ <sales_flat_order_payment>
24
+ <table>sales_flat_order_payment</table>
25
+ </sales_flat_order_payment>
26
+ <orderitems>
27
+ <table>sales_flat_order_item</table>
28
+ </orderitems>
29
  <categories>
30
  <table>catalog_category_flat_store_1</table>
31
  </categories>
56
  <sales_flat_order>
57
  <table>sales_flat_order</table>
58
  </sales_flat_order>
59
+ <sales_flat_order_item>
60
+ <table>sales_flat_order_item</table>
61
+ </sales_flat_order_item>
62
  <regions>
63
  <table>directory_country_region</table>
64
  </regions>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Minubo_Interface</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Minubo Interface connects your Magento Shop to the All-In-One eCommerce Cloud BI Solution at minubo.com</summary>
10
  <description>Minubo Interface connects your Magento Shop to the All-In-One eCommerce Cloud BI Solution at minubo.com. With this Extension in your Magento Shop your minubo Account at minubo.com can be configured to poll the newest data - of cause without any personalization - every day to bring the information to your screen, which you need to optimize your sales business. See more about minubo at minubo.com Minubo Interface supports Magento 1.5 (or newer). In Backend you can configure the Minubo Interface at System/Configuration/Sales/Minubo Interface (enable/disable, generate access key and see information about last export). Right now, the Minubo Interface is at the end of beta status and you have to change in the Magento Connect Backend the setting to allow download of other than stable releases.</description>
11
- <notes>Extended Country-Data; Performance-Enhancements Customer-Data; Preparation for future enhancements</notes>
12
  <authors><author><name>sven rothe</name><user>minubo</user><email>sven@minubo.com</email></author></authors>
13
- <date>2013-08-30</date>
14
- <time>12:31:58</time>
15
- <contents><target name="magecommunity"><dir name="Minubo"><dir name="Interface"><dir name="Block"><dir name="Adminhtml"><file name="Authhash.php" hash="defcbfced29732742d65bfead3043f23"/><file name="Lastchangedate.php" hash="c82ee55fad83d848f47a8594bd25c5af"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="a98e838be044c4d3fcc08d3bb95839af"/></dir></dir></dir><file name="Version.php" hash="31db32eca5dcaf3ad86c747bb3e11efc"/></dir></dir><dir name="Helper"><file name="Data.php" hash="dfb5e0b4b7b6be608872f6ef7791c94b"/></dir><dir name="Model"><dir name="Export"><file name="Abstractcsv.php" hash="f61dd9a03327e9ae8a38498ecdb3e0c9"/><file name="Csv.php" hash="f851d8061fcd5700fc9487a6158bfc9b"/><file name="Status.php" hash="3b2f6661e53b287d13d5951421e05dc1"/></dir><dir name="Mysql4"><file name="Categories.php" hash="7ea4b1b769c5f850d30483666c5dc065"/><file name="Categories2.php" hash="9690856ba935ad9d9aa3974090305fce"/><file name="Categories3.php" hash="c1331984e0569d24702e87baff52813b"/><file name="Creditmemoitems.php" hash="0b79c020f04df55e65f08387dea0c3be"/><file name="Creditmemos.php" hash="ab216deb1c15338e5c0d313d5ba29a48"/><file name="Customeraddresses.php" hash="169a9e08dd8f014f84d70937fcf9ce7f"/><file name="Customers.php" hash="ca12a74563b43fc1faf34a10b6b7f43a"/><file name="Invoiceitems.php" hash="d246e86915570560ab2c635c4b937a26"/><file name="Invoices.php" hash="80c8d20ede9861215bac724aa6bbf89a"/><file name="Orderaddresses.php" hash="b3373186e5319bef1ae188153d586a06"/><file name="Productattributes.php" hash="ef027acc9b06695c25baf3d618be533a"/><file name="Productcategories.php" hash="9d3a80b9d9c4dcbf720460113339d2bd"/><file name="Products.php" hash="d41da38a3e2ad2c68448362347c007b0"/><file name="Products2.php" hash="6ad444c1b3bb96297196161ce3787be4"/><file name="Products3.php" hash="fcfa53f99a322aea2727976f87fdbc18"/><file name="Regions.php" hash="4031838d04526b3eef77bc46b0b2e678"/></dir><dir name="Options"><file name="Options.php" hash="b551afea710a55faf8ef18d7cb997f53"/><file name="Version.php" hash="a1941579148ca49ba7bb73c3e69ed3d5"/></dir><dir name="Read"><file name="Collections.php" hash="6260235172d26e42b65740695af5b870"/><file name="Common.php" hash="0986eba552b56312c9fe6cadb9e31015"/></dir><file name="Tables.php" hash="d0f1bb93db995e86baf8e5cec91ed6e2"/></dir><dir name="controllers"><file name="ExportController.php" hash="dcab6b9f402fbbebbe25ceabb476b4dc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="375c548aacaf6f1bfdf4de3af7b29dfb"/><file name="config.xml" hash="4585e925f1a6fad692bda23b11e64ea8"/><file name="system.xml" hash="8b9608b7693b8750f5df874f8a008eec"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="minubo"><dir name="system"><dir name="config"><file name="button.phtml" hash=""/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Minubo_Interface.xml" hash=""/></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>Minubo_Interface</name>
4
+ <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Minubo Interface connects your Magento Shop to the All-In-One eCommerce Cloud BI Solution at minubo.com</summary>
10
  <description>Minubo Interface connects your Magento Shop to the All-In-One eCommerce Cloud BI Solution at minubo.com. With this Extension in your Magento Shop your minubo Account at minubo.com can be configured to poll the newest data - of cause without any personalization - every day to bring the information to your screen, which you need to optimize your sales business. See more about minubo at minubo.com Minubo Interface supports Magento 1.5 (or newer). In Backend you can configure the Minubo Interface at System/Configuration/Sales/Minubo Interface (enable/disable, generate access key and see information about last export). Right now, the Minubo Interface is at the end of beta status and you have to change in the Magento Connect Backend the setting to allow download of other than stable releases.</description>
11
+ <notes>Performance-Enhancements Order, Order-Items, Customers; Code-Review</notes>
12
  <authors><author><name>sven rothe</name><user>minubo</user><email>sven@minubo.com</email></author></authors>
13
+ <date>2013-09-03</date>
14
+ <time>12:34:39</time>
15
+ <contents><target name="magecommunity"><dir name="Minubo"><dir name="Interface"><dir name="Block"><dir name="Adminhtml"><file name="Authhash.php" hash="c98e63efd5e4e42a6bc1c223a75176c3"/><file name="Lastchangedate.php" hash="c82ee55fad83d848f47a8594bd25c5af"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="c288b69aa22cc9ff5e978ff2b89646e9"/></dir></dir></dir><file name="Version.php" hash="31db32eca5dcaf3ad86c747bb3e11efc"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d9cf690ff97d2014cd3e443c07ab4ea7"/></dir><dir name="Model"><dir name="Export"><file name="Abstractcsv.php" hash="13e3663020c59a2700c298c55613cfce"/><file name="Csv.php" hash="77cbeb41b49539b9179bc185bbbb6b4e"/><file name="Status.php" hash="cef67926aef558b87d4e3bcb02386743"/></dir><dir name="Mysql4"><file name="Categories.php" hash="4c5cc06db334e8f8e93176983ff2a2a5"/><file name="Categories2.php" hash="8aca4fa85df43b3a3ce218d0af27564b"/><file name="Categories3.php" hash="a39d7d2fa625e89f731a0b84a1659563"/><file name="Creditmemoitems.php" hash="417301b2227b91c6f4289214c287b4e8"/><file name="Creditmemos.php" hash="babaa8405f5b0440909b0f4eeafb5f8f"/><file name="Customeraddresses.php" hash="93d3c82c80f85de361de5e7e6c4ecf68"/><file name="Customers.php" hash="2243c128671e73cf70396efd9a9e5627"/><file name="Invoiceitems.php" hash="b487f7780366a832e9e28bb7e66e95e0"/><file name="Invoices.php" hash="c338054d505df896e03d0f0c7859c573"/><file name="Orderaddresses.php" hash="15672ef2e5eaf1a4a7d327edec087652"/><file name="Orderitems.php" hash="37fa91a9307f37441bdf0ac37794b3a4"/><file name="Orders.php" hash="50dc4dcae82933957d42d8abf51b5c5f"/><file name="Productattributes.php" hash="91c0171d737ad6e05e51477db8de041a"/><file name="Productcategories.php" hash="3fe724235a87d4700dc1a2dc9dde7175"/><file name="Products.php" hash="0747a444ac64231bfad7db2344366366"/><file name="Products2.php" hash="97063d53bb94a0fe3c93848ada913c02"/><file name="Products3.php" hash="cdb12b423cd3faedadff96232e038eef"/><file name="Regions.php" hash="f1575516572fbd9a58e8c025fefa95d4"/></dir><dir name="Options"><file name="Options.php" hash="b696a731d9daa7f53c8375f19ad3838f"/><file name="Version.php" hash="fafcca0d77fbbe7fb26b869a845963bf"/></dir><dir name="Read"><file name="Collections.php" hash="2af8284c1653b0637c9d1542397043f1"/><file name="Common.php" hash="18b089bb03cbb226b95db428a7c31ef2"/></dir><file name="Tables.php" hash="c66214083bce5f94d932c6521dfaf05a"/></dir><dir name="controllers"><file name="ExportController.php" hash="78e55dac25479930782c9281f91573e7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="375c548aacaf6f1bfdf4de3af7b29dfb"/><file name="config.xml" hash="fb0c2a0a8313e491db5e0957736345d2"/><file name="system.xml" hash="8b9608b7693b8750f5df874f8a008eec"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="minubo"><dir name="system"><dir name="config"><file name="button.phtml" hash=""/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Minubo_Interface.xml" hash=""/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>