Version Notes
--
Download this release
Release Info
| Developer | DHL Vertriebs GmbH |
| Extension | DHL_Allyouneed |
| Version | 2.6.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.4.0 to 2.6.1
- app/code/community/Dhl/MeinPaket/Block/Adminhtml/Backlog/Product.php +9 -9
- app/code/community/Dhl/MeinPaket/Block/Adminhtml/Backlog/Product/Grid.php +3 -3
- app/code/community/Dhl/MeinPaket/Block/Adminhtml/BestPrice/Grid.php +1 -1
- app/code/community/Dhl/MeinPaket/Block/Adminhtml/Catalog/Product/Renderer/Category.php +139 -0
- app/code/community/Dhl/MeinPaket/Helper/Backlog.php +19 -10
- app/code/community/Dhl/MeinPaket/Helper/Cron.php +3 -3
- app/code/community/Dhl/MeinPaket/Helper/Product.php +0 -363
- app/code/community/Dhl/MeinPaket/Model/Cron.php +0 -4
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Carrier.php +14 -1
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/MeinPaketCategory.php +3 -1
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/ProductAttribute.php +14 -1
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/ProductSyncMode.php +5 -12
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Taxclass.php +19 -6
- app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Taxrate.php +18 -5
- app/code/community/Dhl/MeinPaket/Model/Observer.php +136 -4
- app/code/community/Dhl/MeinPaket/Model/Service/Product/Export.php +8 -5
- app/code/community/Dhl/MeinPaket/Model/System/Config/Source/Attributes.php +73 -1
- app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{Backlog → Meinpaket/Backlog}/ProductController.php +34 -3
- app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{BestPriceController.php → Meinpaket/BestPriceController.php} +1 -1
- app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{CategoryImportController.php → Meinpaket/CategoryImportController.php} +1 -1
- app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{MatchingController.php → Meinpaket/MatchingController.php} +1 -1
- app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{ProductExportController.php → Meinpaket/ProductExportController.php} +2 -2
- app/code/community/Dhl/MeinPaket/etc/adminhtml.xml +3 -3
- app/code/community/Dhl/MeinPaket/etc/config.xml +54 -11
- app/code/community/Dhl/MeinPaket/etc/system.xml +20 -0
- app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.1.0-2.2.0.php +1 -1
- app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.5.0-2.6.0.php +19 -0
- app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.6.0-2.7.0.php +14 -0
- app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Async.php +2 -2
- app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Async/Grid.php +2 -2
- app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Log/Grid.php +4 -4
- app/code/community/Dhl/MeinPaketCommon/Helper/Cron.php +7 -3
- app/code/community/Dhl/MeinPaketCommon/Helper/Data.php +52 -1
- app/code/community/Dhl/MeinPaketCommon/Helper/Product.php +18 -0
- app/code/community/Dhl/MeinPaketCommon/Model/Client/XmlOverHttp.php +4 -0
- app/code/community/Dhl/MeinPaketCommon/Model/Cron.php +0 -2
- app/code/community/Dhl/MeinPaketCommon/Model/Entity/Attribute/Source/Carrier.php +33 -2
- app/code/community/Dhl/MeinPaketCommon/Model/Observer.php +16 -0
- app/code/community/Dhl/MeinPaketCommon/Model/Service/Async.php +6 -1
- app/code/community/Dhl/MeinPaketCommon/Model/Service/Order/ImportService.php +20 -11
- app/code/community/Dhl/MeinPaketCommon/Model/Xml/AbstractXmlPartial.php +5 -3
- app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/NotificationRequest.php +15 -7
- app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/QueryRequest.php +4 -0
- app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/SubmitCartRequest.php +25 -2
- app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/UploadRequest.php +187 -51
- app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{AsyncController.php → Meinpaketcommon/AsyncController.php} +4 -4
- app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{LogController.php → Meinpaketcommon/LogController.php} +1 -1
- app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{OrderImportController.php → Meinpaketcommon/OrderImportController.php} +2 -1
- app/code/community/Dhl/MeinPaketCommon/etc/adminhtml.xml +2 -2
- app/code/community/Dhl/MeinPaketCommon/etc/config.xml +13 -13
- app/code/community/Dhl/Postpay/Model/Cart.php +4 -0
- app/code/community/Dhl/Postpay/Model/Cron.php +1 -1
- app/code/community/Dhl/Postpay/Model/Payment/Method/Standard.php +1 -0
- app/code/community/Dhl/Postpay/Model/Service/Order/ImportService.php +86 -90
- app/code/community/Dhl/Postpay/controllers/NotificationController.php +11 -4
- app/code/community/Dhl/Postpay/controllers/ResponseController.php +1 -5
- app/code/community/Dhl/Postpay/etc/config.xml +6 -6
- app/code/community/Dhl/Postpay/etc/system.xml +37 -18
- app/design/adminhtml/default/default/layout/meinpaket.xml +10 -10
- app/design/adminhtml/default/default/layout/meinpaketcommon.xml +4 -4
- app/design/adminhtml/default/default/template/meinpaket/catalog/product/matching/result.phtml +1 -1
- app/design/adminhtml/default/default/template/meinpaket/catalog/product/matching/tab.phtml +1 -1
- app/design/adminhtml/default/default/template/meinpaket/category/import/import.phtml +5 -5
- app/design/adminhtml/default/default/template/meinpaket/category/import/index.phtml +2 -2
- app/locale/de_DE/Dhl_MeinPaket.csv +19 -1
- package.xml +4 -4
- shell/dhlmeinpaket-order-import.php +6 -4
app/code/community/Dhl/MeinPaket/Block/Adminhtml/Backlog/Product.php
CHANGED
|
@@ -19,15 +19,15 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product extends Mage_Adminhtml_Block
|
|
| 19 |
|
| 20 |
$this->_addButton ( 'run_async', array (
|
| 21 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Synchronize Async Jobs' ),
|
| 22 |
-
'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 23 |
-
'cronjob' =>
|
| 24 |
) ) . '\')',
|
| 25 |
'class' => 'add'
|
| 26 |
) );
|
| 27 |
|
| 28 |
$this->_addButton ( 'run_catalog', array (
|
| 29 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Synchronize Productlist' ),
|
| 30 |
-
'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 31 |
'cronjob' => Dhl_MeinPaket_Model_Cron::SYNC_CATALOG
|
| 32 |
) ) . '\')',
|
| 33 |
'class' => 'add'
|
|
@@ -35,15 +35,15 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product extends Mage_Adminhtml_Block
|
|
| 35 |
|
| 36 |
$this->_addButton ( 'run_orders', array (
|
| 37 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Import Orders' ),
|
| 38 |
-
'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 39 |
-
'cronjob' =>
|
| 40 |
) ) . '\')',
|
| 41 |
'class' => 'add'
|
| 42 |
) );
|
| 43 |
|
| 44 |
$this->_addButton ( 'schedule_jobs', array (
|
| 45 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Jobs' ),
|
| 46 |
-
'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 47 |
'cronjob' => 'all'
|
| 48 |
) ) . '\')',
|
| 49 |
'class' => 'add'
|
|
@@ -51,7 +51,7 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product extends Mage_Adminhtml_Block
|
|
| 51 |
|
| 52 |
// $this->_addButton ( 'schedule_catalog', array (
|
| 53 |
// 'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Catalog' ),
|
| 54 |
-
// 'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 55 |
// 'cronjob' => Dhl_MeinPaket_Model_Cron::SYNC_CATALOG
|
| 56 |
// ) ) . '\')',
|
| 57 |
// 'class' => 'add'
|
|
@@ -59,8 +59,8 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product extends Mage_Adminhtml_Block
|
|
| 59 |
|
| 60 |
// $this->_addButton ( 'schedule_orders', array (
|
| 61 |
// 'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Orders' ),
|
| 62 |
-
// 'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 63 |
-
// 'cronjob' =>
|
| 64 |
// ) ) . '\')',
|
| 65 |
// 'class' => 'add'
|
| 66 |
// ) );
|
| 19 |
|
| 20 |
$this->_addButton ( 'run_async', array (
|
| 21 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Synchronize Async Jobs' ),
|
| 22 |
+
'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/run', array (
|
| 23 |
+
'cronjob' => Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC
|
| 24 |
) ) . '\')',
|
| 25 |
'class' => 'add'
|
| 26 |
) );
|
| 27 |
|
| 28 |
$this->_addButton ( 'run_catalog', array (
|
| 29 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Synchronize Productlist' ),
|
| 30 |
+
'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/run', array (
|
| 31 |
'cronjob' => Dhl_MeinPaket_Model_Cron::SYNC_CATALOG
|
| 32 |
) ) . '\')',
|
| 33 |
'class' => 'add'
|
| 35 |
|
| 36 |
$this->_addButton ( 'run_orders', array (
|
| 37 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Import Orders' ),
|
| 38 |
+
'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/run', array (
|
| 39 |
+
'cronjob' => Dhl_MeinPaketCommon_Model_Cron::SYNC_ORDERS
|
| 40 |
) ) . '\')',
|
| 41 |
'class' => 'add'
|
| 42 |
) );
|
| 43 |
|
| 44 |
$this->_addButton ( 'schedule_jobs', array (
|
| 45 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Jobs' ),
|
| 46 |
+
'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/schedule', array (
|
| 47 |
'cronjob' => 'all'
|
| 48 |
) ) . '\')',
|
| 49 |
'class' => 'add'
|
| 51 |
|
| 52 |
// $this->_addButton ( 'schedule_catalog', array (
|
| 53 |
// 'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Catalog' ),
|
| 54 |
+
// 'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/schedule', array (
|
| 55 |
// 'cronjob' => Dhl_MeinPaket_Model_Cron::SYNC_CATALOG
|
| 56 |
// ) ) . '\')',
|
| 57 |
// 'class' => 'add'
|
| 59 |
|
| 60 |
// $this->_addButton ( 'schedule_orders', array (
|
| 61 |
// 'label' => Mage::helper ( 'meinpaket' )->__ ( 'Schedule Orders' ),
|
| 62 |
+
// 'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaket_backlog_product/schedule', array (
|
| 63 |
+
// 'cronjob' => Dhl_MeinPaketCommon_Model_Cron::SYNC_ORDERS
|
| 64 |
// ) ) . '\')',
|
| 65 |
// 'class' => 'add'
|
| 66 |
// ) );
|
app/code/community/Dhl/MeinPaket/Block/Adminhtml/Backlog/Product/Grid.php
CHANGED
|
@@ -33,7 +33,7 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product_Grid extends Mage_Adminhtml_
|
|
| 33 |
'type' => 'number',
|
| 34 |
'index' => 'product_id'
|
| 35 |
) );
|
| 36 |
-
|
| 37 |
$this->addColumn ( 'sku', array (
|
| 38 |
'header' => Mage::helper ( 'meinpaket' )->__ ( 'SKU' ),
|
| 39 |
'index' => 'sku'
|
|
@@ -59,7 +59,7 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product_Grid extends Mage_Adminhtml_
|
|
| 59 |
$this->getMassactionBlock ()->setFormFieldName ( 'backlogIds' );
|
| 60 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 61 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Delete' ),
|
| 62 |
-
'url' => $this->getUrl ( '
|
| 63 |
'confirm' => Mage::helper ( 'meinpaket' )->__ ( 'Are you sure?' )
|
| 64 |
) );
|
| 65 |
|
|
@@ -71,7 +71,7 @@ class Dhl_MeinPaket_Block_Adminhtml_Backlog_Product_Grid extends Mage_Adminhtml_
|
|
| 71 |
) );
|
| 72 |
}
|
| 73 |
public function getGridUrl() {
|
| 74 |
-
return $this->getUrl ( '
|
| 75 |
'_current' => true
|
| 76 |
) );
|
| 77 |
}
|
| 33 |
'type' => 'number',
|
| 34 |
'index' => 'product_id'
|
| 35 |
) );
|
| 36 |
+
|
| 37 |
$this->addColumn ( 'sku', array (
|
| 38 |
'header' => Mage::helper ( 'meinpaket' )->__ ( 'SKU' ),
|
| 39 |
'index' => 'sku'
|
| 59 |
$this->getMassactionBlock ()->setFormFieldName ( 'backlogIds' );
|
| 60 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 61 |
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Delete' ),
|
| 62 |
+
'url' => $this->getUrl ( 'adminhtml/meinpaket_backlog_product/massDelete', array () ),
|
| 63 |
'confirm' => Mage::helper ( 'meinpaket' )->__ ( 'Are you sure?' )
|
| 64 |
) );
|
| 65 |
|
| 71 |
) );
|
| 72 |
}
|
| 73 |
public function getGridUrl() {
|
| 74 |
+
return $this->getUrl ( 'adminhtml/meinpaket_backlog_product/grid', array (
|
| 75 |
'_current' => true
|
| 76 |
) );
|
| 77 |
}
|
app/code/community/Dhl/MeinPaket/Block/Adminhtml/BestPrice/Grid.php
CHANGED
|
@@ -81,7 +81,7 @@ class Dhl_MeinPaket_Block_Adminhtml_BestPrice_Grid extends Mage_Adminhtml_Block_
|
|
| 81 |
) );
|
| 82 |
}
|
| 83 |
public function getGridUrl() {
|
| 84 |
-
return $this->getUrl ( '
|
| 85 |
'_current' => true
|
| 86 |
) );
|
| 87 |
}
|
| 81 |
) );
|
| 82 |
}
|
| 83 |
public function getGridUrl() {
|
| 84 |
+
return $this->getUrl ( 'adminhtml/meinpaket_bestPrice/grid', array (
|
| 85 |
'_current' => true
|
| 86 |
) );
|
| 87 |
}
|
app/code/community/Dhl/MeinPaket/Block/Adminhtml/Catalog/Product/Renderer/Category.php
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Product allyouneed category attribute frontend.
|
| 4 |
+
*
|
| 5 |
+
* @category Dhl
|
| 6 |
+
* @package Dhl_Allyouneed
|
| 7 |
+
*/
|
| 8 |
+
class Dhl_MeinPaket_Block_Adminhtml_Catalog_Product_Renderer_Category extends Varien_Data_Form_Element_Abstract {
|
| 9 |
+
public function __construct($attributes = array()) {
|
| 10 |
+
parent::__construct ( $attributes );
|
| 11 |
+
$this->setType ( 'text' );
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
/**
|
| 15 |
+
*
|
| 16 |
+
* {@inheritDoc}
|
| 17 |
+
*
|
| 18 |
+
* @see Varien_Data_Form_Element_Abstract::getAfterElementHtml()
|
| 19 |
+
*/
|
| 20 |
+
public function getAfterElementHtml() {
|
| 21 |
+
$html = parent::getAfterElementHtml ();
|
| 22 |
+
$html .= $this->getTree ();
|
| 23 |
+
$html .= $this->getScript ();
|
| 24 |
+
return $html;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
*/
|
| 29 |
+
protected function getTreeJson() {
|
| 30 |
+
/* @var $source Dhl_MeinPaket_Model_Entity_Attribute_Source_MeinPaketCategory */
|
| 31 |
+
$source = Mage::getModel ( "meinpaket/entity_attribute_source_meinPaketCategory" );
|
| 32 |
+
return Mage::helper ( 'core' )->jsonEncode ( $source->getAllOptions () );
|
| 33 |
+
}
|
| 34 |
+
/**
|
| 35 |
+
*/
|
| 36 |
+
protected function getTree() {
|
| 37 |
+
return "<div class=\"tree x-tree\" id=\"" . $this->getId () . "_tree\"></div>";
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
* Get <script> tag
|
| 42 |
+
*
|
| 43 |
+
* @return string
|
| 44 |
+
*/
|
| 45 |
+
protected function getScript() {
|
| 46 |
+
$html = '<script type="text/javascript">' . "\n";
|
| 47 |
+
$html .= "
|
| 48 |
+
(function() {
|
| 49 |
+
if (typeof Ext !== 'undefined' && Ext && Ext.EventManager && Ext.EventManager.onDocumentReady) {
|
| 50 |
+
var treeData = " . $this->getTreeJson () . ";
|
| 51 |
+
var nodeId = '" . $this->getId () . "';
|
| 52 |
+
var inputNode = $(nodeId);
|
| 53 |
+
|
| 54 |
+
var labelNode = labelNode = document.createElement('span');
|
| 55 |
+
labelNode.id = '" . $this->getId () . "_label';
|
| 56 |
+
labelNode.for = '" . $this->getId () . "';
|
| 57 |
+
labelNode.style.marginLeft = '5px';
|
| 58 |
+
|
| 59 |
+
Ext.EventManager.onDocumentReady(function() {
|
| 60 |
+
// Create label
|
| 61 |
+
inputNode.parentNode.insertBefore(labelNode, inputNode.nextSibling);
|
| 62 |
+
|
| 63 |
+
var selectionModel = new Ext.tree.DefaultSelectionModel()
|
| 64 |
+
|
| 65 |
+
var tree = new Ext.tree.TreePanel(nodeId + '_tree', {
|
| 66 |
+
animate : false,
|
| 67 |
+
loader : false,
|
| 68 |
+
enableDD : false,
|
| 69 |
+
containerScroll : true,
|
| 70 |
+
selModel : selectionModel,
|
| 71 |
+
rootVisible : false,
|
| 72 |
+
singleExpand : false,
|
| 73 |
+
});
|
| 74 |
+
|
| 75 |
+
// set the root node
|
| 76 |
+
var root = new Ext.tree.TreeNode({
|
| 77 |
+
text : 'root',
|
| 78 |
+
draggable : false,
|
| 79 |
+
checked : false,
|
| 80 |
+
id : '__root__',
|
| 81 |
+
});
|
| 82 |
+
|
| 83 |
+
tree.setRootNode(root);
|
| 84 |
+
|
| 85 |
+
buildCategoryTree(root, treeData);
|
| 86 |
+
|
| 87 |
+
selectionModel.addListener('beforeselect', beforeSelectionChange);
|
| 88 |
+
selectionModel.addListener('selectionchange', selectionChange);
|
| 89 |
+
|
| 90 |
+
var initialNodeId = inputNode.value;
|
| 91 |
+
var initialNode = tree.getNodeById(initialNodeId);
|
| 92 |
+
|
| 93 |
+
// render the tree
|
| 94 |
+
tree.render();
|
| 95 |
+
|
| 96 |
+
if (initialNode) {
|
| 97 |
+
tree.expandPath(initialNode.getPath());
|
| 98 |
+
selectionModel.select(initialNode);
|
| 99 |
+
}
|
| 100 |
+
})
|
| 101 |
+
|
| 102 |
+
function beforeSelectionChange(model, _new, _old) {
|
| 103 |
+
return _new.isLeaf();
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
function selectionChange(model, node) {
|
| 107 |
+
inputNode.value = node.id;
|
| 108 |
+
labelNode.innerHTML = node.text;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
function buildCategoryTree(parent, config) {
|
| 112 |
+
if (!config) {
|
| 113 |
+
return null;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
if (parent && Array.isArray(config) && config.length) {
|
| 117 |
+
for (var i = 0; i < config.length; i++) {
|
| 118 |
+
var hasChildren = Array.isArray(config[i].value);
|
| 119 |
+
config[i].uiProvider = Ext.tree.TreeNodeUI;
|
| 120 |
+
config[i].id = config[i].code;
|
| 121 |
+
config[i].text = config[i].label;
|
| 122 |
+
config[i].expanded = false;
|
| 123 |
+
config[i].leaf = !hasChildren;
|
| 124 |
+
var node = new Ext.tree.TreeNode(config[i]);
|
| 125 |
+
parent.appendChild(node);
|
| 126 |
+
if (Array.isArray(config[i].value)) {
|
| 127 |
+
buildCategoryTree(node, config[i].value);
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
})();
|
| 134 |
+
";
|
| 135 |
+
|
| 136 |
+
$html .= '</script>' . "\n";
|
| 137 |
+
return $html;
|
| 138 |
+
}
|
| 139 |
+
}
|
app/code/community/Dhl/MeinPaket/Helper/Backlog.php
CHANGED
|
@@ -8,12 +8,14 @@ class Dhl_MeinPaket_Helper_Backlog extends Mage_Core_Helper_Abstract {
|
|
| 8 |
* to create backlog for
|
| 9 |
* @return integer count
|
| 10 |
*/
|
| 11 |
-
public function createParentBacklog($productId, $changes = '') {
|
| 12 |
$count = 0;
|
| 13 |
|
| 14 |
if ($productId) {
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
$count ++;
|
| 18 |
}
|
| 19 |
}
|
|
@@ -28,14 +30,16 @@ class Dhl_MeinPaket_Helper_Backlog extends Mage_Core_Helper_Abstract {
|
|
| 28 |
* to create backlog for
|
| 29 |
* @return integer count
|
| 30 |
*/
|
| 31 |
-
public function createChildrenBacklog($productId, $changes = '') {
|
| 32 |
$count = 0;
|
| 33 |
|
| 34 |
if ($productId) {
|
| 35 |
-
$
|
|
|
|
|
|
|
| 36 |
|
| 37 |
foreach ( $childIds [0] as $key => $val ) {
|
| 38 |
-
$this->createBacklog ( $val, $changes );
|
| 39 |
$count ++;
|
| 40 |
}
|
| 41 |
}
|
|
@@ -51,12 +55,15 @@ class Dhl_MeinPaket_Helper_Backlog extends Mage_Core_Helper_Abstract {
|
|
| 51 |
* @param string $changes
|
| 52 |
* to set
|
| 53 |
*/
|
| 54 |
-
public function createBacklog($productId, $changes = '') {
|
| 55 |
if ($productId) {
|
|
|
|
|
|
|
| 56 |
$backlog = Mage::getModel ( 'meinpaket/backlog_product' );
|
| 57 |
-
$backlog->product_id = $
|
| 58 |
$backlog->created_at = time ();
|
| 59 |
$backlog->changes = $changes;
|
|
|
|
| 60 |
$backlog->save ();
|
| 61 |
}
|
| 62 |
}
|
|
@@ -69,8 +76,10 @@ class Dhl_MeinPaket_Helper_Backlog extends Mage_Core_Helper_Abstract {
|
|
| 69 |
* @return array
|
| 70 |
*/
|
| 71 |
public function getParentIds($productId) {
|
| 72 |
-
$
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
return array_unique ( array_merge ( $parentIdsGrouped, $parentIdsConfigurable ) );
|
| 75 |
}
|
| 76 |
}
|
| 8 |
* to create backlog for
|
| 9 |
* @return integer count
|
| 10 |
*/
|
| 11 |
+
public function createParentBacklog($productId, $changes = '', $requestDescriptionUpload = false) {
|
| 12 |
$count = 0;
|
| 13 |
|
| 14 |
if ($productId) {
|
| 15 |
+
$id = is_object ( $productId ) ? $productId->getId () : $productId;
|
| 16 |
+
|
| 17 |
+
foreach ( $this->getParentIds ( $id ) as $productId ) {
|
| 18 |
+
$this->createBacklog ( $productId, $changes, $requestDescriptionUpload );
|
| 19 |
$count ++;
|
| 20 |
}
|
| 21 |
}
|
| 30 |
* to create backlog for
|
| 31 |
* @return integer count
|
| 32 |
*/
|
| 33 |
+
public function createChildrenBacklog($productId, $changes = '', $requestDescriptionUpload = false) {
|
| 34 |
$count = 0;
|
| 35 |
|
| 36 |
if ($productId) {
|
| 37 |
+
$id = is_object ( $productId ) ? $productId->getId () : $productId;
|
| 38 |
+
|
| 39 |
+
$childIds = Mage::getModel ( 'catalog/product_type_configurable' )->getChildrenIds ( $id );
|
| 40 |
|
| 41 |
foreach ( $childIds [0] as $key => $val ) {
|
| 42 |
+
$this->createBacklog ( $val, $changes, $requestDescriptionUpload );
|
| 43 |
$count ++;
|
| 44 |
}
|
| 45 |
}
|
| 55 |
* @param string $changes
|
| 56 |
* to set
|
| 57 |
*/
|
| 58 |
+
public function createBacklog($productId, $changes = '', $requestDescriptionUpload = false) {
|
| 59 |
if ($productId) {
|
| 60 |
+
$id = is_object ( $productId ) ? $productId->getId () : $productId;
|
| 61 |
+
|
| 62 |
$backlog = Mage::getModel ( 'meinpaket/backlog_product' );
|
| 63 |
+
$backlog->product_id = $id;
|
| 64 |
$backlog->created_at = time ();
|
| 65 |
$backlog->changes = $changes;
|
| 66 |
+
$backlog->request_description_upload = $requestDescriptionUpload;
|
| 67 |
$backlog->save ();
|
| 68 |
}
|
| 69 |
}
|
| 76 |
* @return array
|
| 77 |
*/
|
| 78 |
public function getParentIds($productId) {
|
| 79 |
+
$id = is_object ( $productId ) ? $productId->getId () : $productId;
|
| 80 |
+
|
| 81 |
+
$parentIdsGrouped = Mage::getModel ( 'catalog/product_type_grouped' )->getParentIdsByChild ( $id );
|
| 82 |
+
$parentIdsConfigurable = Mage::getModel ( 'catalog/product_type_configurable' )->getParentIdsByChild ( $id );
|
| 83 |
return array_unique ( array_merge ( $parentIdsGrouped, $parentIdsConfigurable ) );
|
| 84 |
}
|
| 85 |
}
|
app/code/community/Dhl/MeinPaket/Helper/Cron.php
CHANGED
|
@@ -44,15 +44,15 @@ class Dhl_MeinPaket_Helper_Cron extends Mage_Core_Helper_Abstract {
|
|
| 44 |
case Dhl_MeinPaket_Model_Cron::SYNC_CATALOG :
|
| 45 |
$res = Mage::getSingleton ( 'meinpaket/service_product_export' )->exportProducts ();
|
| 46 |
break;
|
| 47 |
-
case
|
| 48 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_order_importService' )->importOrders ();
|
| 49 |
break;
|
| 50 |
-
case
|
| 51 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_async' )->process ();
|
| 52 |
break;
|
| 53 |
}
|
| 54 |
|
| 55 |
-
$message = is_string($res) ? $res : Zend_Debug::dump ( $res, null, false );
|
| 56 |
|
| 57 |
if ($addMessage && strlen ( $message ) > 0) {
|
| 58 |
$session->addSuccess ( $this->__ ( 'Ran "%s":<pre>%s</pre>', $code, $message ) );
|
| 44 |
case Dhl_MeinPaket_Model_Cron::SYNC_CATALOG :
|
| 45 |
$res = Mage::getSingleton ( 'meinpaket/service_product_export' )->exportProducts ();
|
| 46 |
break;
|
| 47 |
+
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ORDERS :
|
| 48 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_order_importService' )->importOrders ();
|
| 49 |
break;
|
| 50 |
+
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC :
|
| 51 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_async' )->process ();
|
| 52 |
break;
|
| 53 |
}
|
| 54 |
|
| 55 |
+
$message = is_string ( $res ) ? $res : Zend_Debug::dump ( $res, null, false );
|
| 56 |
|
| 57 |
if ($addMessage && strlen ( $message ) > 0) {
|
| 58 |
$session->addSuccess ( $this->__ ( 'Ran "%s":<pre>%s</pre>', $code, $message ) );
|
app/code/community/Dhl/MeinPaket/Helper/Product.php
DELETED
|
@@ -1,363 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
class Dhl_MeinPaket_Helper_Product extends Mage_Core_Helper_Abstract {
|
| 3 |
-
/**
|
| 4 |
-
*
|
| 5 |
-
* @var string
|
| 6 |
-
*/
|
| 7 |
-
const TAX_CLASS_STANDARD = 'Standard';
|
| 8 |
-
|
| 9 |
-
/**
|
| 10 |
-
*
|
| 11 |
-
* @var string
|
| 12 |
-
*/
|
| 13 |
-
const TAX_CLASS_REDUCED = 'Reduced';
|
| 14 |
-
|
| 15 |
-
/**
|
| 16 |
-
*
|
| 17 |
-
* @var string
|
| 18 |
-
*/
|
| 19 |
-
const TAX_CLASS_FREE = 'Free';
|
| 20 |
-
|
| 21 |
-
/**
|
| 22 |
-
*
|
| 23 |
-
* @var Dhl_MeinPaket_Model_Validation_Validator_Ean
|
| 24 |
-
*/
|
| 25 |
-
protected $_eanValidator = null;
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Constructor.
|
| 29 |
-
*
|
| 30 |
-
* @return void
|
| 31 |
-
*/
|
| 32 |
-
public function __construct() {
|
| 33 |
-
$this->_eanValidator = Mage::getSingleton ( 'meinpaketcommon/validation_validator_ean' );
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
/**
|
| 37 |
-
* Return true if the product should be listed.
|
| 38 |
-
*
|
| 39 |
-
* @param Mage_Catalog_Model_Product $product to be checked
|
| 40 |
-
* @return boolean true if the product should be listed
|
| 41 |
-
*/
|
| 42 |
-
public function isActive(Mage_Catalog_Model_Product $product) {
|
| 43 |
-
return $product->getData ( 'sync_with_dhl_mein_paket' ) > 0;
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
/**
|
| 47 |
-
* Tells if the given product has a valid ean.
|
| 48 |
-
*
|
| 49 |
-
* @param Mage_Catalog_Model_Product $product
|
| 50 |
-
* @return boolean
|
| 51 |
-
*/
|
| 52 |
-
public function hasValidEan(Mage_Catalog_Model_Product $product) {
|
| 53 |
-
return $this->_eanValidator->isValid ( $this->getEan ( $product ) );
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
/**
|
| 57 |
-
* Returns the EAN of the given product.
|
| 58 |
-
*
|
| 59 |
-
* @param Mage_Catalog_Model_Product $product
|
| 60 |
-
* @return string
|
| 61 |
-
*/
|
| 62 |
-
public function getEan(Mage_Catalog_Model_Product $product) {
|
| 63 |
-
$eanAttributeCode = Mage::getStoreConfig ( 'meinpaket/product_attributes/ean_attribute' );
|
| 64 |
-
|
| 65 |
-
if (! empty ( $eanAttributeCode ) && $product->hasData ( $eanAttributeCode ) && $this->_eanValidator->isValid ( $product->getData ( $eanAttributeCode ) )) {
|
| 66 |
-
return $product->getData ( $eanAttributeCode );
|
| 67 |
-
} else {
|
| 68 |
-
return null;
|
| 69 |
-
}
|
| 70 |
-
}
|
| 71 |
-
|
| 72 |
-
/**
|
| 73 |
-
* Returns the images for the given product.
|
| 74 |
-
* The items of the returned array are arrays themselves and have the
|
| 75 |
-
* following structure:
|
| 76 |
-
* array(
|
| 77 |
-
* 'url' => 'the url of the image',
|
| 78 |
-
* 'caption' => 'the images description'
|
| 79 |
-
* )
|
| 80 |
-
*
|
| 81 |
-
* @param Mage_Catalog_Model_Product $product
|
| 82 |
-
* @return array
|
| 83 |
-
*/
|
| 84 |
-
public function getImages(Mage_Catalog_Model_Product $product) {
|
| 85 |
-
$images = array ();
|
| 86 |
-
$galleryImages = Mage::getModel ( 'catalog/product' )->load ( $product->getId () )->getMediaGalleryImages ();
|
| 87 |
-
$imageUrl = '';
|
| 88 |
-
$imageCaption = '';
|
| 89 |
-
|
| 90 |
-
if (is_object ( $galleryImages ) && $galleryImages->count () > 0) {
|
| 91 |
-
foreach ( $galleryImages as $image ) {
|
| 92 |
-
$images [] = array (
|
| 93 |
-
'url' => Mage::getBaseUrl ( Mage_Core_Model_Store::URL_TYPE_MEDIA ) . 'catalog/product' . $image ['file'],
|
| 94 |
-
'caption' => $image ['label']
|
| 95 |
-
);
|
| 96 |
-
}
|
| 97 |
-
}
|
| 98 |
-
|
| 99 |
-
return $images;
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
/**
|
| 103 |
-
* Returns the MeinPaket marketplace category code which is assigned to the
|
| 104 |
-
* product.
|
| 105 |
-
* If no marketplace category is assigned, an empty string will be
|
| 106 |
-
* returned.
|
| 107 |
-
*
|
| 108 |
-
* @param Mage_Catalog_Model_Product $product
|
| 109 |
-
* @return string
|
| 110 |
-
*/
|
| 111 |
-
public function getMeinPaketMarketplaceCategoryCode(Mage_Catalog_Model_Product $product) {
|
| 112 |
-
$category = $this->getFirstMarketplaceCategory ( $product );
|
| 113 |
-
|
| 114 |
-
return (is_object ( $category ) && get_class ( $category ) === 'Mage_Catalog_Model_Category') ? $category->getDhlMarketplaceCategoryId () : '';
|
| 115 |
-
}
|
| 116 |
-
|
| 117 |
-
/**
|
| 118 |
-
* Returns all marketplace categories the product exists in.
|
| 119 |
-
*
|
| 120 |
-
* @param Mage_Catalog_Model_Product $product
|
| 121 |
-
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
|
| 122 |
-
*/
|
| 123 |
-
public function getMarketplaceCategories(Mage_Catalog_Model_Product $product) {
|
| 124 |
-
return $product->getCategoryCollection ()->addAttributeToSelect ( 'dhl_marketplace_category_id' )->addAttributeToFilter ( 'dhl_marketplace_category_id', array (
|
| 125 |
-
'notnull' => 1
|
| 126 |
-
) )->load ();
|
| 127 |
-
}
|
| 128 |
-
|
| 129 |
-
/**
|
| 130 |
-
* Returns the first marketplace category for the given product.
|
| 131 |
-
*
|
| 132 |
-
* @param Mage_Catalog_Model_Product $product
|
| 133 |
-
* @return Mage_Catalog_Model_Category
|
| 134 |
-
*/
|
| 135 |
-
public function getFirstMarketplaceCategory(Mage_Catalog_Model_Product $product) {
|
| 136 |
-
/* @var $category Mage_Catalog_Model_Category */
|
| 137 |
-
$category = null;
|
| 138 |
-
|
| 139 |
-
$collection = $this->getMarketplaceCategories ( $product );
|
| 140 |
-
|
| 141 |
-
if ($collection->count () > 0) {
|
| 142 |
-
$category = $collection->getFirstItem ();
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
return $category;
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
/**
|
| 149 |
-
* Returns the price of the given product depending on tax settings.
|
| 150 |
-
*
|
| 151 |
-
* @param Mage_Catalog_Model_Product $product
|
| 152 |
-
* @return float
|
| 153 |
-
*/
|
| 154 |
-
public function getPriceConsideringTaxes(Mage_Catalog_Model_Product $product) {
|
| 155 |
-
/* @var $taxHelper Mage_Tax_Helper_Data */
|
| 156 |
-
$taxHelper = Mage::helper ( 'tax' );
|
| 157 |
-
$priceIncludesTax = ( bool ) Mage::getStoreConfig ( 'tax/calculation/price_includes_tax' ) ? true : null;
|
| 158 |
-
|
| 159 |
-
return $taxHelper->getPrice ( $product, $product->getPrice (), $priceIncludesTax );
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
/**
|
| 163 |
-
* Returns the MeinPaket tax group of the product.
|
| 164 |
-
*
|
| 165 |
-
* @param Mage_Catalog_Model_Product $product
|
| 166 |
-
* @return string May be "Free", "Reduced" or "Standard".
|
| 167 |
-
*/
|
| 168 |
-
public function getMeinPaketTaxGroup(Mage_Catalog_Model_Product $product) {
|
| 169 |
-
$taxGroup = self::TAX_CLASS_STANDARD;
|
| 170 |
-
|
| 171 |
-
if ($product->hasData ( 'tax_class_id' )) {
|
| 172 |
-
$taxGroups = array (
|
| 173 |
-
'0' => self::TAX_CLASS_FREE,
|
| 174 |
-
Mage::getStoreConfig ( 'meinpaket/taxrates/default_tax_rate' ) => self::TAX_CLASS_STANDARD,
|
| 175 |
-
Mage::getStoreConfig ( 'meinpaket/taxrates/reduced_tax_rate' ) => self::TAX_CLASS_REDUCED
|
| 176 |
-
);
|
| 177 |
-
if (array_key_exists ( $product->getTaxClassId (), $taxGroups )) {
|
| 178 |
-
$taxGroup = $taxGroups [$product->getTaxClassId ()];
|
| 179 |
-
}
|
| 180 |
-
}
|
| 181 |
-
|
| 182 |
-
return $taxGroup;
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
/**
|
| 186 |
-
* Returns the stock count of the product which can be used for MeinPaket.
|
| 187 |
-
*
|
| 188 |
-
* @param Mage_Catalog_Model_Product $product
|
| 189 |
-
* @return integer
|
| 190 |
-
*/
|
| 191 |
-
public function getMeinPaketStock(Mage_Catalog_Model_Product $product) {
|
| 192 |
-
$customDhlMeinPaketStock = 0;
|
| 193 |
-
$hasCustomMeinPaketStock = false;
|
| 194 |
-
$defaultStock = 0;
|
| 195 |
-
$stock = 0;
|
| 196 |
-
|
| 197 |
-
if ($product->hasData ( 'max_stock_for_dhl_mein_paket' )) {
|
| 198 |
-
$hasCustomMeinPaketStock = (strlen ( $product->getMaxStockForDhlMeinPaket () ) > 0);
|
| 199 |
-
$customDhlMeinPaketStock = ( integer ) $product->getMaxStockForDhlMeinPaket ();
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
/* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
|
| 203 |
-
$stockItem = Mage::getModel ( 'cataloginventory/stock_item' )->loadByProduct ( $product->getId () );
|
| 204 |
-
|
| 205 |
-
if (! $stockItem->getIsInStock ()) {
|
| 206 |
-
return 0;
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
$defaultStock = ( integer ) $stockItem->getQty ();
|
| 210 |
-
|
| 211 |
-
if ($hasCustomMeinPaketStock && is_integer ( $customDhlMeinPaketStock ) && $customDhlMeinPaketStock >= 0) {
|
| 212 |
-
$stock = $customDhlMeinPaketStock;
|
| 213 |
-
if ($stock > $defaultStock) {
|
| 214 |
-
$stock = $defaultStock;
|
| 215 |
-
}
|
| 216 |
-
} else {
|
| 217 |
-
$stock = $defaultStock;
|
| 218 |
-
}
|
| 219 |
-
|
| 220 |
-
return $stock;
|
| 221 |
-
}
|
| 222 |
-
|
| 223 |
-
/**
|
| 224 |
-
* Returns a date from which on the product won't be available on MeinPaket
|
| 225 |
-
* anymore.
|
| 226 |
-
*
|
| 227 |
-
* @param Mage_Catalog_Model_Product $product
|
| 228 |
-
* @return Zend_Date
|
| 229 |
-
*/
|
| 230 |
-
public function getMeinPaketEndDate(Mage_Catalog_Model_Product $product) {
|
| 231 |
-
$endDate = new Zend_Date ();
|
| 232 |
-
|
| 233 |
-
if ($product->getStatus () == Mage_Catalog_Model_Product_Status::STATUS_DISABLED/* ||
|
| 234 |
-
$product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE*/
|
| 235 |
-
) {
|
| 236 |
-
$endDate->setTimestamp ( time () - 86400 );
|
| 237 |
-
} else {
|
| 238 |
-
$endDate->setTimestamp ( time () + 31536000 );
|
| 239 |
-
}
|
| 240 |
-
|
| 241 |
-
return $endDate;
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
/**
|
| 245 |
-
* Returns the delivery time for orders from MeinPaket for the given product.
|
| 246 |
-
*
|
| 247 |
-
* @param Mage_Catalog_Model_Product $product
|
| 248 |
-
* @return integer The delivery time in days
|
| 249 |
-
*/
|
| 250 |
-
public function getMeinPaketDeliveryTime(Mage_Catalog_Model_Product $product) {
|
| 251 |
-
$attributeId = Mage::getStoreConfig ( 'meinpaket/product_attributes/delivery_time' );
|
| 252 |
-
$deliveryTime = Mage::getStoreConfig ( 'meinpaket/product_attributes/default_delivery_time' );
|
| 253 |
-
|
| 254 |
-
if (strlen ( $attributeId ) > 0 && $product->hasData ( $attributeId ) && @preg_match ( "/^[0-9]+$/", $product->getData ( $attributeId ) )) {
|
| 255 |
-
$deliveryTime = $product->getData ( $attributeId );
|
| 256 |
-
}
|
| 257 |
-
|
| 258 |
-
return $deliveryTime;
|
| 259 |
-
}
|
| 260 |
-
|
| 261 |
-
/**
|
| 262 |
-
* Returns the parent configurable product of the given product.
|
| 263 |
-
* Returns null if the given product isn't a simple one or it has
|
| 264 |
-
* no parent configurable.
|
| 265 |
-
*
|
| 266 |
-
* @param Mage_Catalog_Model_Product $simpleProduct
|
| 267 |
-
* @return Mage_Catalog_Model_Product
|
| 268 |
-
*/
|
| 269 |
-
public function getParentConfigurable(Mage_Catalog_Model_Product $simpleProduct) {
|
| 270 |
-
$parentConfigurable = null;
|
| 271 |
-
|
| 272 |
-
if ($simpleProduct->getTypeId () === Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) {
|
| 273 |
-
$parentIds = Mage::getModel ( 'catalog/product_type_configurable' )->getParentIdsByChild ( $simpleProduct->getId () );
|
| 274 |
-
if (isset ( $parentIds [0] )) {
|
| 275 |
-
$parentConfigurable = Mage::getModel ( 'catalog/product' )->setStoreId(Mage::helper ( 'meinpaketcommon/data' )->getMeinPaketStoreId ())->load ( $parentIds [0] );
|
| 276 |
-
}
|
| 277 |
-
}
|
| 278 |
-
|
| 279 |
-
return $parentConfigurable;
|
| 280 |
-
}
|
| 281 |
-
|
| 282 |
-
/**
|
| 283 |
-
* Returns an translated error description.
|
| 284 |
-
*
|
| 285 |
-
* @param string $errorType
|
| 286 |
-
* @param string $errorCode
|
| 287 |
-
* @return string
|
| 288 |
-
*/
|
| 289 |
-
public function getErrorDescription($errorType, $errorCode = '') {
|
| 290 |
-
$description = '';
|
| 291 |
-
|
| 292 |
-
switch ($errorType) {
|
| 293 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_FIELD_IS_INVALID :
|
| 294 |
-
$description = $this->__ ( 'Invalid value for field' ) . ' "<i><b>' . $this->__ ( $this->getLabelForFieldName ( $errorCode ) ) . '</b></i>".';
|
| 295 |
-
break;
|
| 296 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_REQUIRED_FIELD_IS_EMPTY :
|
| 297 |
-
$description = $this->__ ( 'Missing value for field' ) . ' "<i><b>' . $this->__ ( $this->getLabelForFieldName ( $errorCode ) ) . '</b></i>".';
|
| 298 |
-
break;
|
| 299 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_PRODUCT_NOT_EXISTS_IN_MEINPAKET :
|
| 300 |
-
$description = $this->__ ( 'Product is unknown in Allyouneed marketplace' ) . '.';
|
| 301 |
-
break;
|
| 302 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_PRODUCT_NEGATIVE_STOCK :
|
| 303 |
-
$description = $this->__ ( 'Product stock is lower than zero.' );
|
| 304 |
-
break;
|
| 305 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_MEINPAKET_SERVER_ERROR :
|
| 306 |
-
$description = $this->__ ( 'Internal error on Allyouneed server' ) . '.';
|
| 307 |
-
break;
|
| 308 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_NOT_AUTHORIZED :
|
| 309 |
-
$description = $this->__ ( 'You are not authorized to execute the requested functionality on Allyouneed' );
|
| 310 |
-
break;
|
| 311 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_INVALID_DATA :
|
| 312 |
-
$description = $this->__ ( 'The provided data was incorrect' );
|
| 313 |
-
break;
|
| 314 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_INVALID_MODIFICATION :
|
| 315 |
-
$description = $this->__ ( 'Invalid modification of element' );
|
| 316 |
-
break;
|
| 317 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_NO_CATEGORIZATION :
|
| 318 |
-
$description = $this->__ ( 'The product is not mapped to neither a marketplace nor a shop category' );
|
| 319 |
-
break;
|
| 320 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_PRODUCT_NOT_SELLABLE :
|
| 321 |
-
$description = $this->__ ( 'The referenced product cannot be sold' );
|
| 322 |
-
break;
|
| 323 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_MARKETPLACE_CATEGORY_NOT_FOUND :
|
| 324 |
-
$description = $this->__ ( 'The referenced marketplace category could not be found at Allyouneed' );
|
| 325 |
-
break;
|
| 326 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_SHOP_CATEGORY_NOT_FOUND :
|
| 327 |
-
$description = $this->__ ( 'The referenced shop category could not be found at Allyouneed' );
|
| 328 |
-
break;
|
| 329 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_MISSING_VALUE_FOR_ATTRIBUTE :
|
| 330 |
-
$description = $this->__ ( 'Missing value mapping for attribute' ) . ' "' . $errorCode . '".';
|
| 331 |
-
break;
|
| 332 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_VARIANT_GROUP_NOT_EXISTS :
|
| 333 |
-
$description = $this->__ ( 'Variant group does not exist on Allyouneed' ) . ' "' . $errorCode . '".';
|
| 334 |
-
break;
|
| 335 |
-
case Dhl_MeinPaket_Model_Validation_ValidationInterface::ERROR_UNDEFINED :
|
| 336 |
-
default :
|
| 337 |
-
$description = $this->__ ( 'Undefined Error' );
|
| 338 |
-
}
|
| 339 |
-
|
| 340 |
-
return $description;
|
| 341 |
-
}
|
| 342 |
-
|
| 343 |
-
/**
|
| 344 |
-
* Returns the frontend label for a given attribute.
|
| 345 |
-
*
|
| 346 |
-
* @param string $fieldName
|
| 347 |
-
* @return string
|
| 348 |
-
*/
|
| 349 |
-
public function getLabelForFieldName($fieldName) {
|
| 350 |
-
$productAttributeModel = Mage::getModel ( 'eav/config' )->getAttribute ( 'catalog_product', $fieldName );
|
| 351 |
-
$categoryAttributeModel = Mage::getModel ( 'eav/config' )->getAttribute ( 'catalog_category', $fieldName );
|
| 352 |
-
|
| 353 |
-
$label = $productAttributeModel->getFrontendLabel ();
|
| 354 |
-
|
| 355 |
-
if (! ( bool ) $label)
|
| 356 |
-
$label = $categoryAttributeModel->getFrontendLabel ();
|
| 357 |
-
|
| 358 |
-
if (! ( bool ) $label)
|
| 359 |
-
$label = $fieldName;
|
| 360 |
-
|
| 361 |
-
return $label;
|
| 362 |
-
}
|
| 363 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Dhl/MeinPaket/Model/Cron.php
CHANGED
|
@@ -9,12 +9,8 @@
|
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaket_Model_Cron {
|
| 11 |
const SYNC_CATALOG = 'meinpaket_sync_catalog';
|
| 12 |
-
const SYNC_ORDERS = 'meinpaket_sync_orders';
|
| 13 |
-
const SYNC_ASYNC = 'meinpaket_sync_async';
|
| 14 |
public static $CRONJOBS = array (
|
| 15 |
self::SYNC_CATALOG,
|
| 16 |
-
self::SYNC_ORDERS,
|
| 17 |
-
self::SYNC_ASYNC
|
| 18 |
);
|
| 19 |
|
| 20 |
/**
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaket_Model_Cron {
|
| 11 |
const SYNC_CATALOG = 'meinpaket_sync_catalog';
|
|
|
|
|
|
|
| 12 |
public static $CRONJOBS = array (
|
| 13 |
self::SYNC_CATALOG,
|
|
|
|
|
|
|
| 14 |
);
|
| 15 |
|
| 16 |
/**
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Carrier.php
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Carrier extends
|
| 12 |
/**
|
| 13 |
* Returns the available shipment methods.
|
| 14 |
*
|
|
@@ -47,5 +47,18 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_Carrier extends Mage_Eav_Model
|
|
| 47 |
public function toOptionArray() {
|
| 48 |
return $this->getActiveShipmentCarriers ();
|
| 49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Carrier extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 12 |
/**
|
| 13 |
* Returns the available shipment methods.
|
| 14 |
*
|
| 47 |
public function toOptionArray() {
|
| 48 |
return $this->getActiveShipmentCarriers ();
|
| 49 |
}
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Retrieve All options
|
| 53 |
+
*
|
| 54 |
+
* @return array
|
| 55 |
+
*/
|
| 56 |
+
public function getAllOptions() {
|
| 57 |
+
if (is_null ( $this->_options )) {
|
| 58 |
+
$this->_options = $this->getActiveShipmentCarriers ();
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
return $this->_options;
|
| 62 |
+
}
|
| 63 |
}
|
| 64 |
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/MeinPaketCategory.php
CHANGED
|
@@ -11,10 +11,11 @@
|
|
| 11 |
class Dhl_MeinPaket_Model_Entity_Attribute_Source_MeinPaketCategory extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 12 |
/**
|
| 13 |
* Cache key for list
|
|
|
|
| 14 |
* @var unknown
|
| 15 |
*/
|
| 16 |
const CACHE_KEY = 'meinpaket_categories';
|
| 17 |
-
|
| 18 |
/**
|
| 19 |
* Returns the MeinPaket categories.
|
| 20 |
*
|
|
@@ -39,6 +40,7 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_MeinPaketCategory extends Mage
|
|
| 39 |
$currentParents [$cat->getCode ()] = array (
|
| 40 |
'label' => $cat->getName (),
|
| 41 |
'value' => $cat->getCode (),
|
|
|
|
| 42 |
'parent' => $cat->getParent ()
|
| 43 |
);
|
| 44 |
}
|
| 11 |
class Dhl_MeinPaket_Model_Entity_Attribute_Source_MeinPaketCategory extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 12 |
/**
|
| 13 |
* Cache key for list
|
| 14 |
+
*
|
| 15 |
* @var unknown
|
| 16 |
*/
|
| 17 |
const CACHE_KEY = 'meinpaket_categories';
|
| 18 |
+
|
| 19 |
/**
|
| 20 |
* Returns the MeinPaket categories.
|
| 21 |
*
|
| 40 |
$currentParents [$cat->getCode ()] = array (
|
| 41 |
'label' => $cat->getName (),
|
| 42 |
'value' => $cat->getCode (),
|
| 43 |
+
'code' => $cat->getCode (),
|
| 44 |
'parent' => $cat->getParent ()
|
| 45 |
);
|
| 46 |
}
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/ProductAttribute.php
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
-
class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductAttribute extends
|
| 13 |
protected $attributes;
|
| 14 |
public function __construct() {
|
| 15 |
$this->attributes = array (
|
|
@@ -40,4 +40,17 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductAttribute extends Mage_
|
|
| 40 |
|
| 41 |
return $result;
|
| 42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
+
class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductAttribute extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 13 |
protected $attributes;
|
| 14 |
public function __construct() {
|
| 15 |
$this->attributes = array (
|
| 40 |
|
| 41 |
return $result;
|
| 42 |
}
|
| 43 |
+
|
| 44 |
+
/**
|
| 45 |
+
* Retrieve All options
|
| 46 |
+
*
|
| 47 |
+
* @return array
|
| 48 |
+
*/
|
| 49 |
+
public function getAllOptions() {
|
| 50 |
+
if (is_null ( $this->_options )) {
|
| 51 |
+
$this->_options = $this->attributes;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
return $this->_options;
|
| 55 |
+
}
|
| 56 |
}
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/ProductSyncMode.php
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends
|
| 12 |
/**
|
| 13 |
* Disabled.
|
| 14 |
*
|
|
@@ -28,18 +28,11 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends Mage_E
|
|
| 28 |
*/
|
| 29 |
const COMPLETE = 2;
|
| 30 |
|
| 31 |
-
/**
|
| 32 |
-
* Options
|
| 33 |
-
*
|
| 34 |
-
* @var array
|
| 35 |
-
*/
|
| 36 |
-
protected $options;
|
| 37 |
-
|
| 38 |
/**
|
| 39 |
* Default constructor.
|
| 40 |
*/
|
| 41 |
public function __construct() {
|
| 42 |
-
$this->
|
| 43 |
array (
|
| 44 |
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Disabled' ),
|
| 45 |
'value' => self::DISABLED
|
|
@@ -62,7 +55,7 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends Mage_E
|
|
| 62 |
* @return multitype:
|
| 63 |
*/
|
| 64 |
public function toOptionArray($addEmpty = true) {
|
| 65 |
-
return $this->
|
| 66 |
}
|
| 67 |
|
| 68 |
/**
|
|
@@ -72,7 +65,7 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends Mage_E
|
|
| 72 |
* @return multitype:
|
| 73 |
*/
|
| 74 |
public function getAllOptions() {
|
| 75 |
-
return $this->
|
| 76 |
}
|
| 77 |
|
| 78 |
/**
|
|
@@ -83,7 +76,7 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends Mage_E
|
|
| 83 |
public function toSelectArray() {
|
| 84 |
$result = array ();
|
| 85 |
|
| 86 |
-
foreach ( $this->
|
| 87 |
$result [$option ['value']] = $option ['label'];
|
| 88 |
}
|
| 89 |
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 12 |
/**
|
| 13 |
* Disabled.
|
| 14 |
*
|
| 28 |
*/
|
| 29 |
const COMPLETE = 2;
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
/**
|
| 32 |
* Default constructor.
|
| 33 |
*/
|
| 34 |
public function __construct() {
|
| 35 |
+
$this->_options = array (
|
| 36 |
array (
|
| 37 |
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Disabled' ),
|
| 38 |
'value' => self::DISABLED
|
| 55 |
* @return multitype:
|
| 56 |
*/
|
| 57 |
public function toOptionArray($addEmpty = true) {
|
| 58 |
+
return $this->_options;
|
| 59 |
}
|
| 60 |
|
| 61 |
/**
|
| 65 |
* @return multitype:
|
| 66 |
*/
|
| 67 |
public function getAllOptions() {
|
| 68 |
+
return $this->_options;
|
| 69 |
}
|
| 70 |
|
| 71 |
/**
|
| 76 |
public function toSelectArray() {
|
| 77 |
$result = array ();
|
| 78 |
|
| 79 |
+
foreach ( $this->_options as $option ) {
|
| 80 |
$result [$option ['value']] = $option ['label'];
|
| 81 |
}
|
| 82 |
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Taxclass.php
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
-
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxclass extends
|
| 13 |
/**
|
| 14 |
* returns tax classes from database
|
| 15 |
*
|
|
@@ -22,11 +22,11 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxclass extends Mage_Eav_Mode
|
|
| 22 |
$table_prefix = Mage::getConfig ()->getTablePrefix ();
|
| 23 |
|
| 24 |
$result = $db->query ( "
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
if ($result) {
|
| 32 |
while ( $row = $result->fetch ( PDO::FETCH_ASSOC ) ) {
|
|
@@ -47,5 +47,18 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxclass extends Mage_Eav_Mode
|
|
| 47 |
public function toOptionArray() {
|
| 48 |
return $this->getTaxClasses ();
|
| 49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
+
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxclass extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 13 |
/**
|
| 14 |
* returns tax classes from database
|
| 15 |
*
|
| 22 |
$table_prefix = Mage::getConfig ()->getTablePrefix ();
|
| 23 |
|
| 24 |
$result = $db->query ( "
|
| 25 |
+
SELECT class_id, class_name
|
| 26 |
+
FROM {$table_prefix}tax_class
|
| 27 |
+
WHERE class_type = 'PRODUCT'
|
| 28 |
+
ORDER BY class_id
|
| 29 |
+
" );
|
| 30 |
|
| 31 |
if ($result) {
|
| 32 |
while ( $row = $result->fetch ( PDO::FETCH_ASSOC ) ) {
|
| 47 |
public function toOptionArray() {
|
| 48 |
return $this->getTaxClasses ();
|
| 49 |
}
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Retrieve All options
|
| 53 |
+
*
|
| 54 |
+
* @return array
|
| 55 |
+
*/
|
| 56 |
+
public function getAllOptions() {
|
| 57 |
+
if (is_null ( $this->_options )) {
|
| 58 |
+
$this->_options = $this->getTaxClasses ();
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
return $this->_options;
|
| 62 |
+
}
|
| 63 |
}
|
| 64 |
|
app/code/community/Dhl/MeinPaket/Model/Entity/Attribute/Source/Taxrate.php
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
-
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxrate extends
|
| 13 |
/**
|
| 14 |
* returns tax rates from database
|
| 15 |
*
|
|
@@ -22,10 +22,10 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxrate extends Mage_Eav_Model
|
|
| 22 |
$table_prefix = Mage::getConfig ()->getTablePrefix ();
|
| 23 |
|
| 24 |
$result = $db->query ( "
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
if ($result) {
|
| 31 |
while ( $row = $result->fetch ( PDO::FETCH_ASSOC ) ) {
|
|
@@ -46,4 +46,17 @@ class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxrate extends Mage_Eav_Model
|
|
| 46 |
public function toOptionArray() {
|
| 47 |
return $this->getTaxRates ();
|
| 48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
}
|
| 9 |
* @subpackage Model_Entity_Attribute_Source
|
| 10 |
* @version $Id$
|
| 11 |
*/
|
| 12 |
+
class Dhl_MeinPaket_Model_Entity_Attribute_Source_Taxrate extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 13 |
/**
|
| 14 |
* returns tax rates from database
|
| 15 |
*
|
| 22 |
$table_prefix = Mage::getConfig ()->getTablePrefix ();
|
| 23 |
|
| 24 |
$result = $db->query ( "
|
| 25 |
+
SELECT tax_calculation_rate_id, rate
|
| 26 |
+
FROM {$table_prefix}tax_calculation_rate
|
| 27 |
+
ORDER BY tax_calculation_rate_id
|
| 28 |
+
" );
|
| 29 |
|
| 30 |
if ($result) {
|
| 31 |
while ( $row = $result->fetch ( PDO::FETCH_ASSOC ) ) {
|
| 46 |
public function toOptionArray() {
|
| 47 |
return $this->getTaxRates ();
|
| 48 |
}
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* Retrieve All options
|
| 52 |
+
*
|
| 53 |
+
* @return array
|
| 54 |
+
*/
|
| 55 |
+
public function getAllOptions() {
|
| 56 |
+
if (is_null ( $this->_options )) {
|
| 57 |
+
$this->_options = $this->getTaxRates ();
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
return $this->_options;
|
| 61 |
+
}
|
| 62 |
}
|
app/code/community/Dhl/MeinPaket/Model/Observer.php
CHANGED
|
@@ -9,6 +9,17 @@
|
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
class Dhl_MeinPaket_Model_Observer {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
/**
|
| 13 |
* Triggered when product is duplicated.
|
| 14 |
*
|
|
@@ -34,7 +45,17 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 34 |
*/
|
| 35 |
public function catalogProductDeleteBefore(Varien_Event_Observer $observer) {
|
| 36 |
try {
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
if ($product->hasData ( 'was_exported_for_dhl_mein_paket' ) && (( boolean ) $product->getData ( 'product_was_exported_for_dhl' )) === true) {
|
| 39 |
$product->setStatus ( Mage_Catalog_Model_Product_Status::STATUS_DISABLED )->save ();
|
| 40 |
}
|
|
@@ -61,6 +82,10 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 61 |
*/
|
| 62 |
$product = $observer->getEvent ()->getProduct ();
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
if (! $product->getId ()) {
|
| 65 |
/*
|
| 66 |
* Delete meinpaket data for new and as such not synchronized objects. It's assumed that meinpaket_export is either set by the user or productDuplicate in this class. This is for example needed for quick created variants.
|
|
@@ -103,7 +128,7 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 103 |
try {
|
| 104 |
$product = $observer->getEvent ()->getProduct ();
|
| 105 |
|
| 106 |
-
if (is_array ( $product->getData ( 'meinpaket_backlog_changes' ) )) {
|
| 107 |
// Schedule the product for later
|
| 108 |
$changes = $product->getData ( 'meinpaket_backlog_changes' );
|
| 109 |
if (count ( $changes ) && $product->getId ()) {
|
|
@@ -132,6 +157,10 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 132 |
$attributesData = $observer->getEvent ()->getAttributesData ();
|
| 133 |
$productIds = $observer->getEvent ()->getProductIds ();
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
$changes = implode ( ',', array_keys ( $attributesData ) );
|
| 136 |
|
| 137 |
foreach ( $productIds as $id ) {
|
|
@@ -142,8 +171,92 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 142 |
}
|
| 143 |
return $this;
|
| 144 |
}
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
}
|
| 148 |
|
| 149 |
/**
|
|
@@ -160,4 +273,23 @@ class Dhl_MeinPaket_Model_Observer {
|
|
| 160 |
'values' => Mage::getModel ( 'meinpaket/system_config_source_attributes' )->toOptionArray ()
|
| 161 |
) );
|
| 162 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
}
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
class Dhl_MeinPaket_Model_Observer {
|
| 12 |
+
/**
|
| 13 |
+
* Important attributes for stock.
|
| 14 |
+
*
|
| 15 |
+
* @var array
|
| 16 |
+
*/
|
| 17 |
+
private $STOCK_ATTRIBUTES = array (
|
| 18 |
+
'qty',
|
| 19 |
+
'manage_stock',
|
| 20 |
+
'is_in_stock'
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
/**
|
| 24 |
* Triggered when product is duplicated.
|
| 25 |
*
|
| 45 |
*/
|
| 46 |
public function catalogProductDeleteBefore(Varien_Event_Observer $observer) {
|
| 47 |
try {
|
| 48 |
+
/**
|
| 49 |
+
*
|
| 50 |
+
* @var $product Mage_Catalog_Model_Product
|
| 51 |
+
*/
|
| 52 |
+
$product = $observer->getEvent ()->getProduct ();
|
| 53 |
+
|
| 54 |
+
if ($product == null) {
|
| 55 |
+
return $this;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
$product = Mage::getModel ( 'catalog/product' )->setStoreId ( Mage::helper ( 'meinpaketcommon/data' )->getMeinPaketStoreId () )->load ( $product->getId () );
|
| 59 |
if ($product->hasData ( 'was_exported_for_dhl_mein_paket' ) && (( boolean ) $product->getData ( 'product_was_exported_for_dhl' )) === true) {
|
| 60 |
$product->setStatus ( Mage_Catalog_Model_Product_Status::STATUS_DISABLED )->save ();
|
| 61 |
}
|
| 82 |
*/
|
| 83 |
$product = $observer->getEvent ()->getProduct ();
|
| 84 |
|
| 85 |
+
if ($product == null) {
|
| 86 |
+
return $this;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
if (! $product->getId ()) {
|
| 90 |
/*
|
| 91 |
* Delete meinpaket data for new and as such not synchronized objects. It's assumed that meinpaket_export is either set by the user or productDuplicate in this class. This is for example needed for quick created variants.
|
| 128 |
try {
|
| 129 |
$product = $observer->getEvent ()->getProduct ();
|
| 130 |
|
| 131 |
+
if ($product != null && is_array ( $product->getData ( 'meinpaket_backlog_changes' ) )) {
|
| 132 |
// Schedule the product for later
|
| 133 |
$changes = $product->getData ( 'meinpaket_backlog_changes' );
|
| 134 |
if (count ( $changes ) && $product->getId ()) {
|
| 157 |
$attributesData = $observer->getEvent ()->getAttributesData ();
|
| 158 |
$productIds = $observer->getEvent ()->getProductIds ();
|
| 159 |
|
| 160 |
+
if ($attributesData == null || $productIds == null) {
|
| 161 |
+
return $this;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
$changes = implode ( ',', array_keys ( $attributesData ) );
|
| 165 |
|
| 166 |
foreach ( $productIds as $id ) {
|
| 171 |
}
|
| 172 |
return $this;
|
| 173 |
}
|
| 174 |
+
|
| 175 |
+
/**
|
| 176 |
+
* Trigger when stock changes.
|
| 177 |
+
*/
|
| 178 |
+
public function catalogInventoryStockItemSaveCommitAfter(Varien_Event_Observer $observer) {
|
| 179 |
+
try {
|
| 180 |
+
$stockItem = $observer->getEvent ()->getItem ();
|
| 181 |
+
/* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */
|
| 182 |
+
|
| 183 |
+
if ($stockItem != null) {
|
| 184 |
+
$changes = array ();
|
| 185 |
+
foreach ( $this->STOCK_ATTRIBUTES as $attribute ) {
|
| 186 |
+
if ($stockItem->getData ( $attribute ) != $stockItem->getOrigData ( $attribute )) {
|
| 187 |
+
$changes [] = $attribute;
|
| 188 |
+
}
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
if (! empty ( $changes )) {
|
| 192 |
+
$product = $stockItem->getProduct ();
|
| 193 |
+
|
| 194 |
+
if ($product != null && $product->getData ( 'meinpaket_id' )) {
|
| 195 |
+
$typeInstance = $product->getTypeInstance ();
|
| 196 |
+
if ($typeInstance instanceof Mage_Catalog_Model_Product_Type_Configurable) {
|
| 197 |
+
Mage::helper ( 'meinpaket/backlog' )->createChildrenBacklog ( $product->getId () );
|
| 198 |
+
} else {
|
| 199 |
+
Mage::helper ( 'meinpaket/backlog' )->createBacklog ( $product->getId (), implode ( ',', $changes ) );
|
| 200 |
+
}
|
| 201 |
+
}
|
| 202 |
+
}
|
| 203 |
+
}
|
| 204 |
+
} catch ( Exception $ex ) {
|
| 205 |
+
Mage::logException ( $ex );
|
| 206 |
+
}
|
| 207 |
+
return $this;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
/**
|
| 211 |
+
* Trigger when stock changes.
|
| 212 |
+
*/
|
| 213 |
+
public function salesModelServiceQuoteSubmitBefore_Failure(Varien_Event_Observer $observer) {
|
| 214 |
+
try {
|
| 215 |
+
/* @var $quote Mage_Sales_Model_Quote */
|
| 216 |
+
$quote = $observer->getEvent ()->getQuote ();
|
| 217 |
+
if ($quote != null) {
|
| 218 |
+
foreach ( $quote->getAllItems () as $item ) {
|
| 219 |
+
Mage::helper ( 'meinpaket/backlog' )->createBacklog ( $item->getProductId () );
|
| 220 |
+
}
|
| 221 |
+
}
|
| 222 |
+
} catch ( Exception $ex ) {
|
| 223 |
+
Mage::logException ( $ex );
|
| 224 |
+
}
|
| 225 |
+
return $this;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
/**
|
| 229 |
+
* Trigger when stock changes.
|
| 230 |
+
*/
|
| 231 |
+
public function salesOrderCreditmemoSaveAfter(Varien_Event_Observer $observer) {
|
| 232 |
+
try {
|
| 233 |
+
/* @var $quote Mage_Sales_Model_Order_Creditmemo */
|
| 234 |
+
$creditmemo = $observer->getEvent ()->getCreditmemo ();
|
| 235 |
+
if ($creditmemo != null) {
|
| 236 |
+
foreach ( $creditmemo->getAllItems () as $item ) {
|
| 237 |
+
Mage::helper ( 'meinpaket/backlog' )->createBacklog ( $item->getProductId () );
|
| 238 |
+
}
|
| 239 |
+
}
|
| 240 |
+
} catch ( Exception $ex ) {
|
| 241 |
+
Mage::logException ( $ex );
|
| 242 |
+
}
|
| 243 |
+
return $this;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
/**
|
| 247 |
+
* Trigger when stock changes
|
| 248 |
+
*/
|
| 249 |
+
public function salesOrderItemCancel(Varien_Event_Observer $observer) {
|
| 250 |
+
try {
|
| 251 |
+
/* @var $item Mage_Sales_Model_Order_Item */
|
| 252 |
+
$item = $observer->getEvent ()->getItem ();
|
| 253 |
+
if ($item != null) {
|
| 254 |
+
Mage::helper ( 'meinpaket/backlog' )->createBacklog ( $item->getProductId () );
|
| 255 |
+
}
|
| 256 |
+
} catch ( Exception $ex ) {
|
| 257 |
+
Mage::logException ( $ex );
|
| 258 |
+
}
|
| 259 |
+
return $this;
|
| 260 |
}
|
| 261 |
|
| 262 |
/**
|
| 273 |
'values' => Mage::getModel ( 'meinpaket/system_config_source_attributes' )->toOptionArray ()
|
| 274 |
) );
|
| 275 |
}
|
| 276 |
+
|
| 277 |
+
/**
|
| 278 |
+
* Triggered before Layout is prepared.
|
| 279 |
+
* So no parent set yet - argh.
|
| 280 |
+
*
|
| 281 |
+
* @param Varien_Event_Observer $observer
|
| 282 |
+
* @return Dhl_MeinPaket_Model_Observer
|
| 283 |
+
*/
|
| 284 |
+
function addProductGridMassaction(Varien_Event_Observer $observer) {
|
| 285 |
+
$block = $observer->getEvent ()->getBlock ();
|
| 286 |
+
if ($block != null && $block instanceof Mage_Adminhtml_Block_Widget_Grid_Massaction && $block->getRequest ()->getControllerName () == 'catalog_product') {
|
| 287 |
+
$block->addItem ( 'massAddToBacklog', array (
|
| 288 |
+
'label' => Mage::helper ( 'meinpaket' )->__ ( 'Add to Allyouneed backlog' ),
|
| 289 |
+
'url' => Mage::app ()->getStore ()->getUrl ( 'adminhtml/meinpaket_backlog_product/massAddToBacklog' )
|
| 290 |
+
) );
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
return $this;
|
| 294 |
+
}
|
| 295 |
}
|
app/code/community/Dhl/MeinPaket/Model/Service/Product/Export.php
CHANGED
|
@@ -69,8 +69,7 @@ class Dhl_MeinPaket_Model_Service_Product_Export extends Dhl_MeinPaketCommon_Mod
|
|
| 69 |
$seenMagentoProducts [$productId] = true;
|
| 70 |
|
| 71 |
/* @var $product Mage_Catalog_Model_Product */
|
| 72 |
-
$product = Mage::getModel ( 'catalog/product' )->setStoreId(
|
| 73 |
-
Mage::helper('meinpaketcommon/data')->getMeinPaketStoreId())->load ( $productId );
|
| 74 |
|
| 75 |
$syncMode = $product->getData ( 'sync_with_dhl_mein_paket' );
|
| 76 |
|
|
@@ -79,7 +78,11 @@ class Dhl_MeinPaket_Model_Service_Product_Export extends Dhl_MeinPaketCommon_Mod
|
|
| 79 |
$uploadRequest->addProductDescription ( $product );
|
| 80 |
break;
|
| 81 |
case Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode::OFFER :
|
| 82 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
break;
|
| 84 |
default :
|
| 85 |
$uploadRequest->removeProduct ( $product );
|
|
@@ -111,7 +114,7 @@ class Dhl_MeinPaket_Model_Service_Product_Export extends Dhl_MeinPaketCommon_Mod
|
|
| 111 |
|
| 112 |
if ($currentPage < $pages) {
|
| 113 |
Mage::helper ( 'meinpaket/cron' )->scheduleJobs ( array (
|
| 114 |
-
|
| 115 |
), false );
|
| 116 |
}
|
| 117 |
|
|
@@ -136,6 +139,6 @@ class Dhl_MeinPaket_Model_Service_Product_Export extends Dhl_MeinPaketCommon_Mod
|
|
| 136 |
$response = $client->send ( $uploadRequest, true );
|
| 137 |
}
|
| 138 |
|
| 139 |
-
return Mage::helper ( 'meinpaket/data' )->__ ( "
|
| 140 |
}
|
| 141 |
}
|
| 69 |
$seenMagentoProducts [$productId] = true;
|
| 70 |
|
| 71 |
/* @var $product Mage_Catalog_Model_Product */
|
| 72 |
+
$product = Mage::getModel ( 'catalog/product' )->setStoreId ( Mage::helper ( 'meinpaketcommon/data' )->getMeinPaketStoreId () )->load ( $productId );
|
|
|
|
| 73 |
|
| 74 |
$syncMode = $product->getData ( 'sync_with_dhl_mein_paket' );
|
| 75 |
|
| 78 |
$uploadRequest->addProductDescription ( $product );
|
| 79 |
break;
|
| 80 |
case Dhl_MeinPaket_Model_Entity_Attribute_Source_ProductSyncMode::OFFER :
|
| 81 |
+
if ($productBacklog->getRequestDescriptionUpload ()) {
|
| 82 |
+
$uploadRequest->addProductDescription ( $product );
|
| 83 |
+
} else {
|
| 84 |
+
$uploadRequest->addOffer ( $product );
|
| 85 |
+
}
|
| 86 |
break;
|
| 87 |
default :
|
| 88 |
$uploadRequest->removeProduct ( $product );
|
| 114 |
|
| 115 |
if ($currentPage < $pages) {
|
| 116 |
Mage::helper ( 'meinpaket/cron' )->scheduleJobs ( array (
|
| 117 |
+
Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC
|
| 118 |
), false );
|
| 119 |
}
|
| 120 |
|
| 139 |
$response = $client->send ( $uploadRequest, true );
|
| 140 |
}
|
| 141 |
|
| 142 |
+
return Mage::helper ( 'meinpaket/data' )->__ ( "Deleted %d products", 1 );
|
| 143 |
}
|
| 144 |
}
|
app/code/community/Dhl/MeinPaket/Model/System/Config/Source/Attributes.php
CHANGED
|
@@ -86,7 +86,79 @@ class Dhl_MeinPaket_Model_System_Config_Source_Attributes {
|
|
| 86 |
array (
|
| 87 |
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Cup' ),
|
| 88 |
'value' => 'Cup'
|
| 89 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
);
|
| 91 |
}
|
| 92 |
public function toOptionArray($addEmpty = true) {
|
| 86 |
array (
|
| 87 |
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Cup' ),
|
| 88 |
'value' => 'Cup'
|
| 89 |
+
),
|
| 90 |
+
array (
|
| 91 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Department' ),
|
| 92 |
+
'value' => 'Department'
|
| 93 |
+
),
|
| 94 |
+
array (
|
| 95 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Sleeve\'s Length' ),
|
| 96 |
+
'value' => 'Ärmellänge'
|
| 97 |
+
),
|
| 98 |
+
array (
|
| 99 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Frame' ),
|
| 100 |
+
'value' => 'Fassung'
|
| 101 |
+
),
|
| 102 |
+
array (
|
| 103 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Main Material' ),
|
| 104 |
+
'value' => 'Hauptmaterial'
|
| 105 |
+
),
|
| 106 |
+
array (
|
| 107 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Country of Manufacture' ),
|
| 108 |
+
'value' => 'Herstellungsland'
|
| 109 |
+
),
|
| 110 |
+
array (
|
| 111 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Speed Index' ),
|
| 112 |
+
'value' => 'Geschwindigkeitsindex'
|
| 113 |
+
),
|
| 114 |
+
array (
|
| 115 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Height' ),
|
| 116 |
+
'value' => 'Höhe'
|
| 117 |
+
),
|
| 118 |
+
array (
|
| 119 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Year' ),
|
| 120 |
+
'value' => 'Year'
|
| 121 |
+
),
|
| 122 |
+
array (
|
| 123 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Collection' ),
|
| 124 |
+
'value' => 'Kollektion'
|
| 125 |
+
),
|
| 126 |
+
array (
|
| 127 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Collar' ),
|
| 128 |
+
'value' => 'Kragenform'
|
| 129 |
+
),
|
| 130 |
+
array (
|
| 131 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Brand' ),
|
| 132 |
+
'value' => 'Marke'
|
| 133 |
+
),
|
| 134 |
+
array (
|
| 135 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Subject' ),
|
| 136 |
+
'value' => 'Motiv'
|
| 137 |
+
),
|
| 138 |
+
array (
|
| 139 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Optics' ),
|
| 140 |
+
'value' => 'Optik'
|
| 141 |
+
),
|
| 142 |
+
array (
|
| 143 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Sets' ),
|
| 144 |
+
'value' => 'Sets'
|
| 145 |
+
),
|
| 146 |
+
array (
|
| 147 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Language' ),
|
| 148 |
+
'value' => 'Sprache'
|
| 149 |
+
),
|
| 150 |
+
array (
|
| 151 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Style' ),
|
| 152 |
+
'value' => 'Stil'
|
| 153 |
+
),
|
| 154 |
+
array (
|
| 155 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Type' ),
|
| 156 |
+
'value' => 'Typ'
|
| 157 |
+
),
|
| 158 |
+
array (
|
| 159 |
+
'label' => Mage::helper ( 'meinpaket/data' )->__ ( 'Degree of Grinding' ),
|
| 160 |
+
'value' => 'Mahlgrad'
|
| 161 |
+
)
|
| 162 |
);
|
| 163 |
}
|
| 164 |
public function toOptionArray($addEmpty = true) {
|
app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{Backlog → Meinpaket/Backlog}/ProductController.php
RENAMED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
<?php
|
| 2 |
-
class
|
| 3 |
protected function _initAction() {
|
| 4 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaket/backlog' )->_addBreadcrumb ( Mage::helper ( 'meinpaket' )->__ ( 'Backlog' ), Mage::helper ( 'meinpaket' )->__ ( 'Backlog' ) );
|
| 5 |
return $this;
|
| 6 |
}
|
| 7 |
/**
|
| 8 |
* (non-PHPdoc)
|
| 9 |
-
*
|
| 10 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 11 |
*/
|
| 12 |
protected function _isAllowed() {
|
|
@@ -74,6 +74,33 @@ class Dhl_MeinPaket_Adminhtml_Backlog_ProductController extends Mage_Adminhtml_C
|
|
| 74 |
$this->_redirect ( '*/*/index' );
|
| 75 |
}
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
/**
|
| 78 |
* Get cronjobs from request.
|
| 79 |
*
|
|
@@ -87,7 +114,11 @@ class Dhl_MeinPaket_Adminhtml_Backlog_ProductController extends Mage_Adminhtml_C
|
|
| 87 |
return array (
|
| 88 |
$cronjob
|
| 89 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
}
|
| 91 |
-
return
|
| 92 |
}
|
| 93 |
}
|
| 1 |
<?php
|
| 2 |
+
class Dhl_MeinPaket_Adminhtml_Meinpaket_Backlog_ProductController extends Mage_Adminhtml_Controller_Action {
|
| 3 |
protected function _initAction() {
|
| 4 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaket/backlog' )->_addBreadcrumb ( Mage::helper ( 'meinpaket' )->__ ( 'Backlog' ), Mage::helper ( 'meinpaket' )->__ ( 'Backlog' ) );
|
| 5 |
return $this;
|
| 6 |
}
|
| 7 |
/**
|
| 8 |
* (non-PHPdoc)
|
| 9 |
+
*
|
| 10 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 11 |
*/
|
| 12 |
protected function _isAllowed() {
|
| 74 |
$this->_redirect ( '*/*/index' );
|
| 75 |
}
|
| 76 |
|
| 77 |
+
/**
|
| 78 |
+
*/
|
| 79 |
+
public function massAddToBacklogAction() {
|
| 80 |
+
$productIds = $this->getRequest ()->getPost ( 'product', array () );
|
| 81 |
+
|
| 82 |
+
/* @var $backlogHelper Dhl_MeinPaket_Helper_Backlog */
|
| 83 |
+
$backlogHelper = Mage::helper ( 'meinpaket/backlog' );
|
| 84 |
+
|
| 85 |
+
$productsAddedToBacklog = 0;
|
| 86 |
+
|
| 87 |
+
foreach ( $productIds as $id ) {
|
| 88 |
+
$count = $backlogHelper->createChildrenBacklog ( $id, '', true );
|
| 89 |
+
if ($count <= 0) {
|
| 90 |
+
$backlogHelper->createBacklog ( $id, $changes, true );
|
| 91 |
+
}
|
| 92 |
+
$productsAddedToBacklog ++;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
if ($productsAddedToBacklog > 0) {
|
| 96 |
+
Mage::getSingleton ( 'adminhtml/session' )->addSuccess ( Mage::helper ( 'meinpaket' )->__ ( 'Total %d of %d product(s) were added to backlog.', $productsAddedToBacklog, count ( $productIds ) ) );
|
| 97 |
+
} else {
|
| 98 |
+
Mage::getSingleton ( 'adminhtml/session' )->addError ( Mage::helper ( 'meinpaket' )->__ ( 'No product(s) added to backlog.' ) );
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
$this->_redirect ( 'adminhtml/catalog_product/index' );
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
/**
|
| 105 |
* Get cronjobs from request.
|
| 106 |
*
|
| 114 |
return array (
|
| 115 |
$cronjob
|
| 116 |
);
|
| 117 |
+
} else if (in_array ( $cronjob, Dhl_MeinPaketCommon_Model_Cron::$CRONJOBS )) {
|
| 118 |
+
return array (
|
| 119 |
+
$cronjob
|
| 120 |
+
);
|
| 121 |
}
|
| 122 |
+
return array ();
|
| 123 |
}
|
| 124 |
}
|
app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{BestPriceController.php → Meinpaket/BestPriceController.php}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
-
class
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaket/bestprice' )->_addBreadcrumb ( Mage::helper ( 'meinpaket' )->__ ( 'Best Price' ), Mage::helper ( 'meinpaket' )->__ ( 'Best Price' ) );
|
| 9 |
return $this;
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
+
class Dhl_MeinPaket_Adminhtml_Meinpaket_BestPriceController extends Mage_Adminhtml_Controller_Action {
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaket/bestprice' )->_addBreadcrumb ( Mage::helper ( 'meinpaket' )->__ ( 'Best Price' ), Mage::helper ( 'meinpaket' )->__ ( 'Best Price' ) );
|
| 9 |
return $this;
|
app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{CategoryImportController.php → Meinpaket/CategoryImportController.php}
RENAMED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class
|
| 12 |
/**
|
| 13 |
* Initializes the controller.
|
| 14 |
*
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaket_Adminhtml_Meinpaket_CategoryImportController extends Mage_Adminhtml_Controller_Action {
|
| 12 |
/**
|
| 13 |
* Initializes the controller.
|
| 14 |
*
|
app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{MatchingController.php → Meinpaket/MatchingController.php}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
-
class
|
| 7 |
/**
|
| 8 |
* (non-PHPdoc)
|
| 9 |
*
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
+
class Dhl_MeinPaket_Adminhtml_Meinpaket_MatchingController extends Mage_Adminhtml_Controller_Action {
|
| 7 |
/**
|
| 8 |
* (non-PHPdoc)
|
| 9 |
*
|
app/code/community/Dhl/MeinPaket/controllers/Adminhtml/{ProductExportController.php → Meinpaket/ProductExportController.php}
RENAMED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class
|
| 12 |
/**
|
| 13 |
*
|
| 14 |
* @var integer
|
|
@@ -42,7 +42,7 @@ class Dhl_MeinPaket_Adminhtml_ProductExportController extends Mage_Adminhtml_Con
|
|
| 42 |
|
| 43 |
/**
|
| 44 |
* (non-PHPdoc)
|
| 45 |
-
*
|
| 46 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 47 |
*/
|
| 48 |
protected function _isAllowed() {
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaket_Adminhtml_Meinpaket_ProductExportController extends Mage_Adminhtml_Controller_Action {
|
| 12 |
/**
|
| 13 |
*
|
| 14 |
* @var integer
|
| 42 |
|
| 43 |
/**
|
| 44 |
* (non-PHPdoc)
|
| 45 |
+
*
|
| 46 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 47 |
*/
|
| 48 |
protected function _isAllowed() {
|
app/code/community/Dhl/MeinPaket/etc/adminhtml.xml
CHANGED
|
@@ -6,21 +6,21 @@
|
|
| 6 |
<children>
|
| 7 |
<backlog translate="title" module="meinpaket">
|
| 8 |
<title>Synchronisation</title>
|
| 9 |
-
<action>
|
| 10 |
<depends>
|
| 11 |
<config>meinpaket/credentials/active</config>
|
| 12 |
</depends>
|
| 13 |
</backlog>
|
| 14 |
<category_import translate="title" module="meinpaket">
|
| 15 |
<title>import categories</title>
|
| 16 |
-
<action>
|
| 17 |
<depends>
|
| 18 |
<config>meinpaket/credentials/active</config>
|
| 19 |
</depends>
|
| 20 |
</category_import>
|
| 21 |
<bestprice translate="title" module="meinpaket">
|
| 22 |
<title>best prices</title>
|
| 23 |
-
<action>
|
| 24 |
<depends>
|
| 25 |
<config>meinpaket/credentials/active</config>
|
| 26 |
</depends>
|
| 6 |
<children>
|
| 7 |
<backlog translate="title" module="meinpaket">
|
| 8 |
<title>Synchronisation</title>
|
| 9 |
+
<action>adminhtml/meinpaket_backlog_product</action>
|
| 10 |
<depends>
|
| 11 |
<config>meinpaket/credentials/active</config>
|
| 12 |
</depends>
|
| 13 |
</backlog>
|
| 14 |
<category_import translate="title" module="meinpaket">
|
| 15 |
<title>import categories</title>
|
| 16 |
+
<action>adminhtml/meinpaket_categoryImport</action>
|
| 17 |
<depends>
|
| 18 |
<config>meinpaket/credentials/active</config>
|
| 19 |
</depends>
|
| 20 |
</category_import>
|
| 21 |
<bestprice translate="title" module="meinpaket">
|
| 22 |
<title>best prices</title>
|
| 23 |
+
<action>adminhtml/meinpaket_bestPrice</action>
|
| 24 |
<depends>
|
| 25 |
<config>meinpaket/credentials/active</config>
|
| 26 |
</depends>
|
app/code/community/Dhl/MeinPaket/etc/config.xml
CHANGED
|
@@ -2,18 +2,18 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_MeinPaket>
|
| 5 |
-
<version>2.
|
| 6 |
</Dhl_MeinPaket>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
-
<
|
| 11 |
-
<use>admin</use>
|
| 12 |
<args>
|
| 13 |
-
<
|
| 14 |
-
|
|
|
|
| 15 |
</args>
|
| 16 |
-
</
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
|
@@ -194,15 +194,49 @@
|
|
| 194 |
</meinpaket_product_attribute_update_before>
|
| 195 |
</observers>
|
| 196 |
</catalog_product_attribute_update_before>
|
| 197 |
-
|
|
|
|
| 198 |
<observers>
|
| 199 |
-
<
|
| 200 |
<type>singleton</type>
|
| 201 |
<class>meinpaket/observer</class>
|
| 202 |
-
<method>
|
| 203 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
</observers>
|
| 205 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
<adminhtml_catalog_product_attribute_edit_prepare_form>
|
| 207 |
<observers>
|
| 208 |
<add_meinpaket_to_attribute_editor>
|
|
@@ -212,6 +246,15 @@
|
|
| 212 |
</add_meinpaket_to_attribute_editor>
|
| 213 |
</observers>
|
| 214 |
</adminhtml_catalog_product_attribute_edit_prepare_form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
</events>
|
| 216 |
</global>
|
| 217 |
</config>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_MeinPaket>
|
| 5 |
+
<version>2.7.0</version>
|
| 6 |
</Dhl_MeinPaket>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
+
<adminhtml>
|
|
|
|
| 11 |
<args>
|
| 12 |
+
<modules>
|
| 13 |
+
<Dhl_MeinPaket after="Mage_Adminhtml">Dhl_MeinPaket_Adminhtml</Dhl_MeinPaket>
|
| 14 |
+
</modules>
|
| 15 |
</args>
|
| 16 |
+
</adminhtml>
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
| 194 |
</meinpaket_product_attribute_update_before>
|
| 195 |
</observers>
|
| 196 |
</catalog_product_attribute_update_before>
|
| 197 |
+
<!-- Detect stock changes end -->
|
| 198 |
+
<cataloginventory_stock_item_save_commit_after>
|
| 199 |
<observers>
|
| 200 |
+
<meinpaket_stock_item_save_ommit_after>
|
| 201 |
<type>singleton</type>
|
| 202 |
<class>meinpaket/observer</class>
|
| 203 |
+
<method>catalogInventoryStockItemSaveCommitAfter</method>
|
| 204 |
+
</meinpaket_stock_item_save_ommit_after>
|
| 205 |
+
</observers>
|
| 206 |
+
</cataloginventory_stock_item_save_commit_after>
|
| 207 |
+
<sales_model_service_quote_submit_before>
|
| 208 |
+
<observers>
|
| 209 |
+
<meinpaket_model_service_quote_submit_before>
|
| 210 |
+
<class>meinpaket/observer</class>
|
| 211 |
+
<method>salesModelServiceQuoteSubmitBefore_Failure</method>
|
| 212 |
+
</meinpaket_model_service_quote_submit_before>
|
| 213 |
+
</observers>
|
| 214 |
+
</sales_model_service_quote_submit_before>
|
| 215 |
+
<sales_model_service_quote_submit_failure>
|
| 216 |
+
<observers>
|
| 217 |
+
<meinpaket_model_service_quote_submit_failure>
|
| 218 |
+
<class>meinpaket/observer</class>
|
| 219 |
+
<method>salesModelServiceQuoteSubmitBefore_Failure</method>
|
| 220 |
+
</meinpaket_model_service_quote_submit_failure>
|
| 221 |
</observers>
|
| 222 |
+
</sales_model_service_quote_submit_failure>
|
| 223 |
+
<sales_order_item_cancel>
|
| 224 |
+
<observers>
|
| 225 |
+
<meinpaket_order_item_cancel>
|
| 226 |
+
<class>meinpaket/observer</class>
|
| 227 |
+
<method>salesOrderItemCancel</method>
|
| 228 |
+
</meinpaket_order_item_cancel>
|
| 229 |
+
</observers>
|
| 230 |
+
</sales_order_item_cancel>
|
| 231 |
+
<sales_order_creditmemo_save_after>
|
| 232 |
+
<observers>
|
| 233 |
+
<meinpaket_sales_order_creditmemo_save_after>
|
| 234 |
+
<class>meinpaket/observer</class>
|
| 235 |
+
<method>salesOrderCreditmemoSaveAfter</method>
|
| 236 |
+
</meinpaket_sales_order_creditmemo_save_after>
|
| 237 |
+
</observers>
|
| 238 |
+
</sales_order_creditmemo_save_after>
|
| 239 |
+
<!-- Detect stock changes end -->
|
| 240 |
<adminhtml_catalog_product_attribute_edit_prepare_form>
|
| 241 |
<observers>
|
| 242 |
<add_meinpaket_to_attribute_editor>
|
| 246 |
</add_meinpaket_to_attribute_editor>
|
| 247 |
</observers>
|
| 248 |
</adminhtml_catalog_product_attribute_edit_prepare_form>
|
| 249 |
+
<core_block_abstract_prepare_layout_before>
|
| 250 |
+
<observers>
|
| 251 |
+
<meinpaket_core_block_abstract_prepare_layout_before>
|
| 252 |
+
<type>singleton</type>
|
| 253 |
+
<class>meinpaket/observer</class>
|
| 254 |
+
<method>addProductGridMassaction</method>
|
| 255 |
+
</meinpaket_core_block_abstract_prepare_layout_before>
|
| 256 |
+
</observers>
|
| 257 |
+
</core_block_abstract_prepare_layout_before>
|
| 258 |
</events>
|
| 259 |
</global>
|
| 260 |
</config>
|
app/code/community/Dhl/MeinPaket/etc/system.xml
CHANGED
|
@@ -105,6 +105,26 @@
|
|
| 105 |
<show_in_website>1</show_in_website>
|
| 106 |
<show_in_store>0</show_in_store>
|
| 107 |
</use_available_special_price>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
</fields>
|
| 109 |
</product_attributes>
|
| 110 |
<customer translate="label">
|
| 105 |
<show_in_website>1</show_in_website>
|
| 106 |
<show_in_store>0</show_in_store>
|
| 107 |
</use_available_special_price>
|
| 108 |
+
<configurable_product_fallback translate="label comment">
|
| 109 |
+
<label>Configurable product fallback</label>
|
| 110 |
+
<comment><![CDATA[Fallback to configurable product data if the simple product does not have data]]></comment>
|
| 111 |
+
<frontend_type>select</frontend_type>
|
| 112 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 113 |
+
<sort_order>40</sort_order>
|
| 114 |
+
<show_in_default>1</show_in_default>
|
| 115 |
+
<show_in_website>1</show_in_website>
|
| 116 |
+
<show_in_store>0</show_in_store>
|
| 117 |
+
</configurable_product_fallback>
|
| 118 |
+
<include_configurable_product_images translate="label comment">
|
| 119 |
+
<label>Include configurable product images</label>
|
| 120 |
+
<comment><![CDATA[Include configurable product images when listing products]]></comment>
|
| 121 |
+
<frontend_type>select</frontend_type>
|
| 122 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 123 |
+
<sort_order>50</sort_order>
|
| 124 |
+
<show_in_default>1</show_in_default>
|
| 125 |
+
<show_in_website>1</show_in_website>
|
| 126 |
+
<show_in_store>0</show_in_store>
|
| 127 |
+
</include_configurable_product_images>
|
| 128 |
</fields>
|
| 129 |
</product_attributes>
|
| 130 |
<customer translate="label">
|
app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.1.0-2.2.0.php
CHANGED
|
@@ -9,7 +9,7 @@ $installer->addAttribute ( 'catalog_product', 'meinpaket_id', array (
|
|
| 9 |
'label' => 'Product DHL Allyouneed Id',
|
| 10 |
'required' => false,
|
| 11 |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
| 12 |
-
'visible' =>
|
| 13 |
'group' => 'Allyouneed'
|
| 14 |
) );
|
| 15 |
|
| 9 |
'label' => 'Product DHL Allyouneed Id',
|
| 10 |
'required' => false,
|
| 11 |
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
| 12 |
+
'visible' => true,
|
| 13 |
'group' => 'Allyouneed'
|
| 14 |
) );
|
| 15 |
|
app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.5.0-2.6.0.php
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/* @var $installer Dhl_MeinPaket_Model_Resource_Eav_Mysql4_Setup */
|
| 4 |
+
$installer = $this;
|
| 5 |
+
$installer->startSetup ();
|
| 6 |
+
|
| 7 |
+
$installer->addAttribute ( 'catalog_product', 'meinpaket_category', array (
|
| 8 |
+
'type' => 'text',
|
| 9 |
+
'label' => 'Allyouneed Category',
|
| 10 |
+
'input' => 'select',
|
| 11 |
+
'source' => 'meinpaket/entity_attribute_source_meinPaketCategory',
|
| 12 |
+
'input_renderer' => 'meinpaket/adminhtml_catalog_product_renderer_category',
|
| 13 |
+
'required' => false,
|
| 14 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
| 15 |
+
'visible' => true,
|
| 16 |
+
'group' => 'Allyouneed'
|
| 17 |
+
) );
|
| 18 |
+
|
| 19 |
+
$installer->endSetup ();
|
app/code/community/Dhl/MeinPaket/sql/meinpaket_setup/mysql4-upgrade-2.6.0-2.7.0.php
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
/* @var $installer Dhl_MeinPaket_Model_Resource_Eav_Mysql4_Setup */
|
| 4 |
+
$installer = $this;
|
| 5 |
+
$installer->startSetup ();
|
| 6 |
+
|
| 7 |
+
$installer->getConnection ()->addColumn ( $installer->getTable ( 'meinpaket/backlog_product' ), 'request_description_upload', array (
|
| 8 |
+
'type' => Varien_Db_Ddl_Table::TYPE_BOOLEAN,
|
| 9 |
+
'nullable' => false,
|
| 10 |
+
'default' => false,
|
| 11 |
+
'comment' => 'Force upload of product description'
|
| 12 |
+
) );
|
| 13 |
+
|
| 14 |
+
$installer->endSetup ();
|
app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Async.php
CHANGED
|
@@ -19,8 +19,8 @@ class Dhl_MeinPaketCommon_Block_Adminhtml_Async extends Mage_Adminhtml_Block_Wid
|
|
| 19 |
|
| 20 |
$this->_addButton ( 'run_async', array (
|
| 21 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Synchronize Async Jobs' ),
|
| 22 |
-
'onclick' => 'setLocation(\'' . $this->getUrl ( '
|
| 23 |
-
'cronjob' =>
|
| 24 |
) ) . '\')',
|
| 25 |
'class' => 'add'
|
| 26 |
) );
|
| 19 |
|
| 20 |
$this->_addButton ( 'run_async', array (
|
| 21 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Synchronize Async Jobs' ),
|
| 22 |
+
'onclick' => 'setLocation(\'' . $this->getUrl ( 'adminhtml/meinpaketcommon_async/run', array (
|
| 23 |
+
'cronjob' => Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC
|
| 24 |
) ) . '\')',
|
| 25 |
'class' => 'add'
|
| 26 |
) );
|
app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Async/Grid.php
CHANGED
|
@@ -51,14 +51,14 @@ class Dhl_MeinPaketCommon_Block_Adminhtml_Async_Grid extends Mage_Adminhtml_Bloc
|
|
| 51 |
$this->getMassactionBlock ()->setFormFieldName ( 'asyncIds' );
|
| 52 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 53 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Delete' ),
|
| 54 |
-
'url' => $this->getUrl ( '
|
| 55 |
'confirm' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Are you sure?' )
|
| 56 |
) );
|
| 57 |
|
| 58 |
return $this;
|
| 59 |
}
|
| 60 |
public function getGridUrl() {
|
| 61 |
-
return $this->getUrl ( '
|
| 62 |
'_current' => true
|
| 63 |
) );
|
| 64 |
}
|
| 51 |
$this->getMassactionBlock ()->setFormFieldName ( 'asyncIds' );
|
| 52 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 53 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Delete' ),
|
| 54 |
+
'url' => $this->getUrl ( 'adminhtml/meinpaketcommon_async/massDelete', array () ),
|
| 55 |
'confirm' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Are you sure?' )
|
| 56 |
) );
|
| 57 |
|
| 58 |
return $this;
|
| 59 |
}
|
| 60 |
public function getGridUrl() {
|
| 61 |
+
return $this->getUrl ( 'adminhtml/meinpaketcommon_async/grid', array (
|
| 62 |
'_current' => true
|
| 63 |
) );
|
| 64 |
}
|
app/code/community/Dhl/MeinPaketCommon/Block/Adminhtml/Log/Grid.php
CHANGED
|
@@ -24,10 +24,10 @@ class Dhl_MeinPaketCommon_Block_Adminhtml_Log_Grid extends Mage_Adminhtml_Block_
|
|
| 24 |
'header' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Request ID' ),
|
| 25 |
'index' => 'request_id'
|
| 26 |
) );
|
| 27 |
-
|
| 28 |
$this->addColumn ( 'url', array (
|
| 29 |
'header' => Mage::helper ( 'meinpaketcommon' )->__ ( 'URL' ),
|
| 30 |
-
'index' => 'url'
|
| 31 |
) );
|
| 32 |
|
| 33 |
$this->addColumn ( 'send', array (
|
|
@@ -60,14 +60,14 @@ class Dhl_MeinPaketCommon_Block_Adminhtml_Log_Grid extends Mage_Adminhtml_Block_
|
|
| 60 |
$this->getMassactionBlock ()->setFormFieldName ( 'logIds' );
|
| 61 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 62 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Delete' ),
|
| 63 |
-
'url' => $this->getUrl ( '
|
| 64 |
'confirm' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Are you sure?' )
|
| 65 |
) );
|
| 66 |
|
| 67 |
return $this;
|
| 68 |
}
|
| 69 |
public function getGridUrl() {
|
| 70 |
-
return $this->getUrl ( '
|
| 71 |
'_current' => true
|
| 72 |
) );
|
| 73 |
}
|
| 24 |
'header' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Request ID' ),
|
| 25 |
'index' => 'request_id'
|
| 26 |
) );
|
| 27 |
+
|
| 28 |
$this->addColumn ( 'url', array (
|
| 29 |
'header' => Mage::helper ( 'meinpaketcommon' )->__ ( 'URL' ),
|
| 30 |
+
'index' => 'url'
|
| 31 |
) );
|
| 32 |
|
| 33 |
$this->addColumn ( 'send', array (
|
| 60 |
$this->getMassactionBlock ()->setFormFieldName ( 'logIds' );
|
| 61 |
$this->getMassactionBlock ()->addItem ( 'delete', array (
|
| 62 |
'label' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Delete' ),
|
| 63 |
+
'url' => $this->getUrl ( 'adminhtml/meinpaketcommon_log/massDelete', array () ),
|
| 64 |
'confirm' => Mage::helper ( 'meinpaketcommon' )->__ ( 'Are you sure?' )
|
| 65 |
) );
|
| 66 |
|
| 67 |
return $this;
|
| 68 |
}
|
| 69 |
public function getGridUrl() {
|
| 70 |
+
return $this->getUrl ( 'adminhtml/meinpaketcommon_log/grid', array (
|
| 71 |
'_current' => true
|
| 72 |
) );
|
| 73 |
}
|
app/code/community/Dhl/MeinPaketCommon/Helper/Cron.php
CHANGED
|
@@ -40,16 +40,20 @@ class Dhl_MeinPaketCommon_Helper_Cron extends Mage_Core_Helper_Abstract {
|
|
| 40 |
|
| 41 |
foreach ( $cronjobs as $code ) {
|
| 42 |
try {
|
|
|
|
|
|
|
| 43 |
switch ($code) {
|
| 44 |
-
case Dhl_MeinPaketCommon_Model_Cron::SYNC_CATALOG :
|
| 45 |
-
$res = Mage::getSingleton ( 'meinpaket/service_product_export' )->exportProducts ();
|
| 46 |
-
break;
|
| 47 |
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ORDERS :
|
| 48 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_order_importService' )->importOrders ();
|
| 49 |
break;
|
| 50 |
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC :
|
| 51 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_async' )->process ();
|
| 52 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
|
| 55 |
$message = is_string ( $res ) ? $res : Zend_Debug::dump ( $res, null, false );
|
| 40 |
|
| 41 |
foreach ( $cronjobs as $code ) {
|
| 42 |
try {
|
| 43 |
+
$res = null;
|
| 44 |
+
|
| 45 |
switch ($code) {
|
|
|
|
|
|
|
|
|
|
| 46 |
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ORDERS :
|
| 47 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_order_importService' )->importOrders ();
|
| 48 |
break;
|
| 49 |
case Dhl_MeinPaketCommon_Model_Cron::SYNC_ASYNC :
|
| 50 |
$res = Mage::getSingleton ( 'meinpaketcommon/service_async' )->process ();
|
| 51 |
break;
|
| 52 |
+
default :
|
| 53 |
+
Mage::dispatchEvent ( ’dhl_meinpaket_run_cronjob’, array (
|
| 54 |
+
$code
|
| 55 |
+
) );
|
| 56 |
+
break;
|
| 57 |
}
|
| 58 |
|
| 59 |
$message = is_string ( $res ) ? $res : Zend_Debug::dump ( $res, null, false );
|
app/code/community/Dhl/MeinPaketCommon/Helper/Data.php
CHANGED
|
@@ -8,18 +8,49 @@
|
|
| 8 |
* @subpackage Helper
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaketCommon_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
const STORE_VIEW_CONFIG = 'meinpaket/store/view';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
private $_meinpaketStore = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
private $_meinpaketRootCategory = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
public function getExtensionVersion() {
|
| 15 |
return ( string ) Mage::getConfig ()->getModuleConfig ( 'Dhl_MeinPaketCommon' )->version;
|
| 16 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
public function getMeinPaketStore() {
|
| 18 |
if ($this->_meinpaketStore == null) {
|
| 19 |
$this->_meinpaketStore = Mage::app ()->getStore ( Mage::getStoreConfig ( self::STORE_VIEW_CONFIG ) );
|
| 20 |
}
|
| 21 |
return $this->_meinpaketStore;
|
| 22 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
public function getMeinPaketStoreId() {
|
| 24 |
$store = $this->getMeinPaketStore ();
|
| 25 |
if ($store == null) {
|
|
@@ -62,7 +93,7 @@ class Dhl_MeinPaketCommon_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
| 62 |
|
| 63 |
/**
|
| 64 |
* Calculate price without tax
|
| 65 |
-
*
|
| 66 |
* @param float $price
|
| 67 |
* with tax
|
| 68 |
* @param float $tax
|
|
@@ -75,4 +106,24 @@ class Dhl_MeinPaketCommon_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
| 75 |
|
| 76 |
return $price / (1 + $tax);
|
| 77 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 8 |
* @subpackage Helper
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaketCommon_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 11 |
+
|
| 12 |
+
/**
|
| 13 |
+
* Configuration for store view.
|
| 14 |
+
*
|
| 15 |
+
* @var unknown
|
| 16 |
+
*/
|
| 17 |
const STORE_VIEW_CONFIG = 'meinpaket/store/view';
|
| 18 |
+
|
| 19 |
+
/**
|
| 20 |
+
* Cache for store
|
| 21 |
+
*
|
| 22 |
+
* @var Mage_Core_Model_Store
|
| 23 |
+
*/
|
| 24 |
private $_meinpaketStore = null;
|
| 25 |
+
|
| 26 |
+
/**
|
| 27 |
+
* Cache for root category
|
| 28 |
+
*
|
| 29 |
+
* @var unknown
|
| 30 |
+
*/
|
| 31 |
private $_meinpaketRootCategory = null;
|
| 32 |
+
|
| 33 |
+
/**
|
| 34 |
+
* Get extension version.
|
| 35 |
+
*/
|
| 36 |
public function getExtensionVersion() {
|
| 37 |
return ( string ) Mage::getConfig ()->getModuleConfig ( 'Dhl_MeinPaketCommon' )->version;
|
| 38 |
}
|
| 39 |
+
|
| 40 |
+
/**
|
| 41 |
+
*
|
| 42 |
+
* @return Mage_Core_Model_Store
|
| 43 |
+
*/
|
| 44 |
public function getMeinPaketStore() {
|
| 45 |
if ($this->_meinpaketStore == null) {
|
| 46 |
$this->_meinpaketStore = Mage::app ()->getStore ( Mage::getStoreConfig ( self::STORE_VIEW_CONFIG ) );
|
| 47 |
}
|
| 48 |
return $this->_meinpaketStore;
|
| 49 |
}
|
| 50 |
+
|
| 51 |
+
/**
|
| 52 |
+
* Get StoreId
|
| 53 |
+
*/
|
| 54 |
public function getMeinPaketStoreId() {
|
| 55 |
$store = $this->getMeinPaketStore ();
|
| 56 |
if ($store == null) {
|
| 93 |
|
| 94 |
/**
|
| 95 |
* Calculate price without tax
|
| 96 |
+
*
|
| 97 |
* @param float $price
|
| 98 |
* with tax
|
| 99 |
* @param float $tax
|
| 106 |
|
| 107 |
return $price / (1 + $tax);
|
| 108 |
}
|
| 109 |
+
|
| 110 |
+
/**
|
| 111 |
+
* Filter allowed html tags.
|
| 112 |
+
*
|
| 113 |
+
* @param unknown $input
|
| 114 |
+
*/
|
| 115 |
+
public function filterHTMLTags($input) {
|
| 116 |
+
$filter = new Zend_Filter_StripTags ( array (
|
| 117 |
+
'allowTags' => array (
|
| 118 |
+
'b',
|
| 119 |
+
'br',
|
| 120 |
+
'p',
|
| 121 |
+
'ul',
|
| 122 |
+
'ol',
|
| 123 |
+
'li',
|
| 124 |
+
'hr'
|
| 125 |
+
)
|
| 126 |
+
) );
|
| 127 |
+
return $filter->filter ( $input );
|
| 128 |
+
}
|
| 129 |
}
|
app/code/community/Dhl/MeinPaketCommon/Helper/Product.php
CHANGED
|
@@ -361,4 +361,22 @@ class Dhl_MeinPaketCommon_Helper_Product extends Mage_Core_Helper_Abstract {
|
|
| 361 |
|
| 362 |
return $label;
|
| 363 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 364 |
}
|
| 361 |
|
| 362 |
return $label;
|
| 363 |
}
|
| 364 |
+
|
| 365 |
+
/**
|
| 366 |
+
*
|
| 367 |
+
* Get configurable attributes.
|
| 368 |
+
*
|
| 369 |
+
* @param Mage_Catalog_Model_Product $configurableProduct
|
| 370 |
+
*/
|
| 371 |
+
public function getConfigurableAttributes(Mage_Catalog_Model_Product $configurableProduct) {
|
| 372 |
+
$configurableAttributes = array ();
|
| 373 |
+
|
| 374 |
+
if ($configurableProduct != null && $configurableProduct->getTypeId () == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
|
| 375 |
+
foreach ( $configurableProduct->getTypeInstance ( true )->getConfigurableAttributes ( $configurableProduct ) as $attr ) {
|
| 376 |
+
$configurableAttributes [] = $attr->getProductAttribute ()->getAttributeCode ();
|
| 377 |
+
}
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
return $configurableAttributes;
|
| 381 |
+
}
|
| 382 |
}
|
app/code/community/Dhl/MeinPaketCommon/Model/Client/XmlOverHttp.php
CHANGED
|
@@ -84,6 +84,10 @@ class Dhl_MeinPaketCommon_Model_Client_XmlOverHttp extends Varien_Object {
|
|
| 84 |
* @return Dhl_MeinPaketCommon_Model_Xml_Response_Abstract
|
| 85 |
*/
|
| 86 |
public function send($xml, $async = false) {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
$xmlData = $xml instanceof Dhl_MeinPaketCommon_Model_Xml_AbstractXmlPartial ? $xml->__toString () : $xml;
|
| 88 |
|
| 89 |
$url = $this->endpoint . ($async ? self::ASYNC_SUFFIX : '');
|
| 84 |
* @return Dhl_MeinPaketCommon_Model_Xml_Response_Abstract
|
| 85 |
*/
|
| 86 |
public function send($xml, $async = false) {
|
| 87 |
+
/* @var $resource Mage_Core_Model_Resource */
|
| 88 |
+
//$resource = Mage::getModel('core/resource');
|
| 89 |
+
//$connection = $resource->getConnection('core_write');
|
| 90 |
+
|
| 91 |
$xmlData = $xml instanceof Dhl_MeinPaketCommon_Model_Xml_AbstractXmlPartial ? $xml->__toString () : $xml;
|
| 92 |
|
| 93 |
$url = $this->endpoint . ($async ? self::ASYNC_SUFFIX : '');
|
app/code/community/Dhl/MeinPaketCommon/Model/Cron.php
CHANGED
|
@@ -8,11 +8,9 @@
|
|
| 8 |
* @subpackage Model
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaketCommon_Model_Cron {
|
| 11 |
-
const SYNC_CATALOG = 'meinpaket_sync_catalog';
|
| 12 |
const SYNC_ORDERS = 'meinpaket_sync_orders';
|
| 13 |
const SYNC_ASYNC = 'meinpaket_sync_async';
|
| 14 |
public static $CRONJOBS = array (
|
| 15 |
-
self::SYNC_CATALOG,
|
| 16 |
self::SYNC_ORDERS,
|
| 17 |
self::SYNC_ASYNC
|
| 18 |
);
|
| 8 |
* @subpackage Model
|
| 9 |
*/
|
| 10 |
class Dhl_MeinPaketCommon_Model_Cron {
|
|
|
|
| 11 |
const SYNC_ORDERS = 'meinpaket_sync_orders';
|
| 12 |
const SYNC_ASYNC = 'meinpaket_sync_async';
|
| 13 |
public static $CRONJOBS = array (
|
|
|
|
| 14 |
self::SYNC_ORDERS,
|
| 15 |
self::SYNC_ASYNC
|
| 16 |
);
|
app/code/community/Dhl/MeinPaketCommon/Model/Entity/Attribute/Source/Carrier.php
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class Dhl_MeinPaketCommon_Model_Entity_Attribute_Source_Carrier extends
|
| 12 |
/**
|
| 13 |
* Returns the available shipment methods.
|
| 14 |
*
|
|
@@ -25,7 +25,6 @@ class Dhl_MeinPaketCommon_Model_Entity_Attribute_Source_Carrier extends Mage_Eav
|
|
| 25 |
if (sizeof ( $activeCarriers ) > 0) {
|
| 26 |
|
| 27 |
foreach ( $activeCarriers as $carrier ) {
|
| 28 |
-
|
| 29 |
$code = $carrier->getCarrierCode ();
|
| 30 |
$carrierMethods = $carrier->getAllowedMethods ();
|
| 31 |
$carrierTitle = Mage::getStoreConfig ( 'carriers/' . $code . '/title' );
|
|
@@ -47,5 +46,37 @@ class Dhl_MeinPaketCommon_Model_Entity_Attribute_Source_Carrier extends Mage_Eav
|
|
| 47 |
public function toOptionArray() {
|
| 48 |
return $this->getActiveShipmentCarriers ();
|
| 49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
|
| 8 |
* @subpackage Model_Entity_Attribute_Source
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaketCommon_Model_Entity_Attribute_Source_Carrier extends Mage_Eav_Model_Entity_Attribute_Source_Abstract {
|
| 12 |
/**
|
| 13 |
* Returns the available shipment methods.
|
| 14 |
*
|
| 25 |
if (sizeof ( $activeCarriers ) > 0) {
|
| 26 |
|
| 27 |
foreach ( $activeCarriers as $carrier ) {
|
|
|
|
| 28 |
$code = $carrier->getCarrierCode ();
|
| 29 |
$carrierMethods = $carrier->getAllowedMethods ();
|
| 30 |
$carrierTitle = Mage::getStoreConfig ( 'carriers/' . $code . '/title' );
|
| 46 |
public function toOptionArray() {
|
| 47 |
return $this->getActiveShipmentCarriers ();
|
| 48 |
}
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* Retrieve All options
|
| 52 |
+
*
|
| 53 |
+
* @return array
|
| 54 |
+
*/
|
| 55 |
+
public function getAllOptions() {
|
| 56 |
+
if (is_null ( $this->_options )) {
|
| 57 |
+
|
| 58 |
+
/* @var $shippingConfig Mage_Shipping_Model_Config */
|
| 59 |
+
$shippingConfig = Mage::getModel ( 'shipping/config' );
|
| 60 |
+
|
| 61 |
+
$activeCarriers = $shippingConfig->getActiveCarriers ();
|
| 62 |
+
|
| 63 |
+
if (sizeof ( $activeCarriers ) > 0) {
|
| 64 |
+
foreach ( $activeCarriers as $carrier ) {
|
| 65 |
+
$code = $carrier->getCarrierCode ();
|
| 66 |
+
$carrierMethods = $carrier->getAllowedMethods ();
|
| 67 |
+
$carrierTitle = Mage::getStoreConfig ( 'carriers/' . $code . '/title' );
|
| 68 |
+
|
| 69 |
+
foreach ( $carrierMethods as $methodCode => $methodTitle ) {
|
| 70 |
+
$this->_options = array (
|
| 71 |
+
'label' => $carrierTitle . ' - ' . $methodTitle,
|
| 72 |
+
'value' => $code . '_' . $methodCode
|
| 73 |
+
);
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
return $this->_options;
|
| 80 |
+
}
|
| 81 |
}
|
| 82 |
|
app/code/community/Dhl/MeinPaketCommon/Model/Observer.php
CHANGED
|
@@ -79,6 +79,10 @@ class Dhl_MeinPaketCommon_Model_Observer {
|
|
| 79 |
public function salesOrderSaveAfter(Varien_Event_Observer $observer) {
|
| 80 |
$order = $observer->getData ( 'order' );
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
self::setCurrentOrderId ( $order->getId () );
|
| 83 |
|
| 84 |
$this->_updateMeinPaketOrderId ( $order );
|
|
@@ -311,6 +315,10 @@ class Dhl_MeinPaketCommon_Model_Observer {
|
|
| 311 |
/* @var $shipment Mage_Sales_Model_Order_Shipment */
|
| 312 |
$shipment = $observer->getData ( 'shipment' );
|
| 313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
self::setCurrentOrderId ( $shipment->getOrder ()->getId () );
|
| 315 |
|
| 316 |
if ($shipmentHelper->isExportedToDhlMeinPaket ( $shipment )) {
|
|
@@ -342,6 +350,10 @@ class Dhl_MeinPaketCommon_Model_Observer {
|
|
| 342 |
/* @var $shipment Mage_Sales_Model_Order_Shipment */
|
| 343 |
$shipment = $observer->getShipment ();
|
| 344 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 345 |
self::setCurrentOrderId ( $shipment->getOrder ()->getId () );
|
| 346 |
|
| 347 |
if ($shipmentHelper->isExportedToDhlMeinPaket ( $shipment )) {
|
|
@@ -412,6 +424,10 @@ class Dhl_MeinPaketCommon_Model_Observer {
|
|
| 412 |
/* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
|
| 413 |
$creditmemo = $observer->getData ( 'creditmemo' );
|
| 414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 415 |
self::setCurrentOrderId ( $creditmemo->getOrder ()->getId () );
|
| 416 |
|
| 417 |
// check if creditmemo is refunded
|
| 79 |
public function salesOrderSaveAfter(Varien_Event_Observer $observer) {
|
| 80 |
$order = $observer->getData ( 'order' );
|
| 81 |
|
| 82 |
+
if ($order == null) {
|
| 83 |
+
return $this;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
self::setCurrentOrderId ( $order->getId () );
|
| 87 |
|
| 88 |
$this->_updateMeinPaketOrderId ( $order );
|
| 315 |
/* @var $shipment Mage_Sales_Model_Order_Shipment */
|
| 316 |
$shipment = $observer->getData ( 'shipment' );
|
| 317 |
|
| 318 |
+
if ($shipment == null) {
|
| 319 |
+
return $this;
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
self::setCurrentOrderId ( $shipment->getOrder ()->getId () );
|
| 323 |
|
| 324 |
if ($shipmentHelper->isExportedToDhlMeinPaket ( $shipment )) {
|
| 350 |
/* @var $shipment Mage_Sales_Model_Order_Shipment */
|
| 351 |
$shipment = $observer->getShipment ();
|
| 352 |
|
| 353 |
+
if ($shipment == null) {
|
| 354 |
+
return $this;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
self::setCurrentOrderId ( $shipment->getOrder ()->getId () );
|
| 358 |
|
| 359 |
if ($shipmentHelper->isExportedToDhlMeinPaket ( $shipment )) {
|
| 424 |
/* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
|
| 425 |
$creditmemo = $observer->getData ( 'creditmemo' );
|
| 426 |
|
| 427 |
+
if ($creditmemo == null || $creditmemo->getOrder () == null) {
|
| 428 |
+
return $this;
|
| 429 |
+
}
|
| 430 |
+
|
| 431 |
self::setCurrentOrderId ( $creditmemo->getOrder ()->getId () );
|
| 432 |
|
| 433 |
// check if creditmemo is refunded
|
app/code/community/Dhl/MeinPaketCommon/Model/Service/Async.php
CHANGED
|
@@ -26,6 +26,7 @@ class Dhl_MeinPaketCommon_Model_Service_Async extends Dhl_MeinPaketCommon_Model_
|
|
| 26 |
|
| 27 |
$count = 0;
|
| 28 |
|
|
|
|
| 29 |
foreach ( $asyncCollection as $async ) {
|
| 30 |
/* @var $statusRequest Dhl_MeinPaketCommon_Model_Xml_Request_AsynchronousStatusRequest */
|
| 31 |
$statusRequest = Mage::getModel ( 'meinpaketcommon/xml_request_asynchronousStatusRequest' );
|
|
@@ -33,7 +34,11 @@ class Dhl_MeinPaketCommon_Model_Service_Async extends Dhl_MeinPaketCommon_Model_
|
|
| 33 |
|
| 34 |
$response = null;
|
| 35 |
if ($statusRequest->isHasData ()) {
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
if ($response != null && $response instanceof Dhl_MeinPaketCommon_Model_Xml_Response_AsynchronousStatusResponse) {
|
| 26 |
|
| 27 |
$count = 0;
|
| 28 |
|
| 29 |
+
/* @var $async Dhl_MeinPaketCommon_Model_Async */
|
| 30 |
foreach ( $asyncCollection as $async ) {
|
| 31 |
/* @var $statusRequest Dhl_MeinPaketCommon_Model_Xml_Request_AsynchronousStatusRequest */
|
| 32 |
$statusRequest = Mage::getModel ( 'meinpaketcommon/xml_request_asynchronousStatusRequest' );
|
| 34 |
|
| 35 |
$response = null;
|
| 36 |
if ($statusRequest->isHasData ()) {
|
| 37 |
+
try {
|
| 38 |
+
$response = $client->send ( $statusRequest );
|
| 39 |
+
} catch ( Dhl_MeinPaketCommon_Model_Client_BadHttpReturnCodeException $e ) {
|
| 40 |
+
Mage::logException ( $e );
|
| 41 |
+
}
|
| 42 |
}
|
| 43 |
|
| 44 |
if ($response != null && $response instanceof Dhl_MeinPaketCommon_Model_Xml_Response_AsynchronousStatusResponse) {
|
app/code/community/Dhl/MeinPaketCommon/Model/Service/Order/ImportService.php
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Model_Order
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class Dhl_MeinPaketCommon_Model_Service_Order_ImportService
|
| 12 |
/**
|
| 13 |
* counts of imported and duplicate orders
|
| 14 |
*
|
|
@@ -95,6 +95,12 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 95 |
*/
|
| 96 |
protected $_dataHelper;
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
/**
|
| 99 |
* Constructor.
|
| 100 |
*
|
|
@@ -111,10 +117,8 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 111 |
|
| 112 |
$_outOfStockOrders = array ();
|
| 113 |
$this->_disabledProductOrders = array ();
|
| 114 |
-
|
| 115 |
$this->_dataHelper = Mage::helper ( 'meinpaketcommon/data' );
|
| 116 |
-
|
| 117 |
-
parent::__construct ();
|
| 118 |
}
|
| 119 |
|
| 120 |
/**
|
|
@@ -165,15 +169,12 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 165 |
* @return void
|
| 166 |
*/
|
| 167 |
public function importOrders($start = null, $stop = null) {
|
| 168 |
-
/* @var $client Dhl_MeinPaketCommon_Model_Client_XmlOverHttp */
|
| 169 |
-
$client = Mage::getModel ( 'meinpaketcommon/client_xmlOverHttp' );
|
| 170 |
-
|
| 171 |
$queryRequest = new Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest ();
|
| 172 |
// $queryRequest->addOrders ( $start, $stop );
|
| 173 |
$queryRequest->addOrders ( $start, $stop, 'Open' );
|
| 174 |
|
| 175 |
/* @var $queryResult Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse */
|
| 176 |
-
$queryResult = $client->send ( $queryRequest );
|
| 177 |
|
| 178 |
if ($queryResult == null) {
|
| 179 |
return;
|
|
@@ -269,7 +270,6 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 269 |
$productId = ( string ) $orderEntry->getProductId ();
|
| 270 |
|
| 271 |
if ($hasNoConfigurables) {
|
| 272 |
-
|
| 273 |
try {
|
| 274 |
/* @var $productObj Mage_Catalog_Model_Product */
|
| 275 |
$productObj = Mage::getModel ( 'catalog/product' )->setStoreId ( $storeId )->load ( $productId );
|
|
@@ -345,7 +345,7 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 345 |
if ($shippingIncludesTax) {
|
| 346 |
$deliveryCosts = $orderEntry->getBasePrice ();
|
| 347 |
} else {
|
| 348 |
-
$deliveryCosts = $
|
| 349 |
}
|
| 350 |
|
| 351 |
$rate = $this->calculateRate ( $order );
|
|
@@ -390,8 +390,9 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 390 |
$contactData = $order->getContactData ();
|
| 391 |
|
| 392 |
$orderModel->place ();
|
|
|
|
|
|
|
| 393 |
$orderModel->setState ( Mage_Sales_Model_Order::STATE_PROCESSING, true );
|
| 394 |
-
$orderModel->setData ( 'created_at', $this->_getFormattedDateString ( $order->getOrderDate () ) );
|
| 395 |
$orderModel->setData ( 'customer_email', strlen ( $contactData->getEmail () ) ? $contactData->getEmail () : Mage::getStoreConfig ( 'meinpaket/customer/default_email' ) );
|
| 396 |
$orderModel->setData ( 'ext_customer_id', $contactData->getCustomerId () );
|
| 397 |
$orderModel->setData ( 'dhl_mein_paket_order_id', $order->getOrderId () );
|
|
@@ -451,6 +452,8 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 451 |
* @param string $isoDateString
|
| 452 |
* @wins Code of the year contest
|
| 453 |
* @return string
|
|
|
|
|
|
|
| 454 |
*/
|
| 455 |
protected function _getFormattedDateString($isoDateString) {
|
| 456 |
$date = new Zend_Date ( $isoDateString, Zend_Date::ISO_8601 );
|
|
@@ -502,6 +505,12 @@ class Dhl_MeinPaketCommon_Model_Service_Order_ImportService extends Varien_Objec
|
|
| 502 |
|
| 503 |
return $customer;
|
| 504 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 505 |
public function createInvoice(Mage_Sales_Model_Order $order) {
|
| 506 |
/* @var $invoiceModel Sales_Model_Order_Invoice */
|
| 507 |
$invoice = $order->prepareInvoice ();
|
| 8 |
* @subpackage Model_Order
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaketCommon_Model_Service_Order_ImportService {
|
| 12 |
/**
|
| 13 |
* counts of imported and duplicate orders
|
| 14 |
*
|
| 95 |
*/
|
| 96 |
protected $_dataHelper;
|
| 97 |
|
| 98 |
+
/**
|
| 99 |
+
*
|
| 100 |
+
* @var $client Dhl_MeinPaketCommon_Model_Client_XmlOverHttp
|
| 101 |
+
*/
|
| 102 |
+
protected $client;
|
| 103 |
+
|
| 104 |
/**
|
| 105 |
* Constructor.
|
| 106 |
*
|
| 117 |
|
| 118 |
$_outOfStockOrders = array ();
|
| 119 |
$this->_disabledProductOrders = array ();
|
|
|
|
| 120 |
$this->_dataHelper = Mage::helper ( 'meinpaketcommon/data' );
|
| 121 |
+
$this->client = Mage::getModel ( 'meinpaketcommon/client_xmlOverHttp' );
|
|
|
|
| 122 |
}
|
| 123 |
|
| 124 |
/**
|
| 169 |
* @return void
|
| 170 |
*/
|
| 171 |
public function importOrders($start = null, $stop = null) {
|
|
|
|
|
|
|
|
|
|
| 172 |
$queryRequest = new Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest ();
|
| 173 |
// $queryRequest->addOrders ( $start, $stop );
|
| 174 |
$queryRequest->addOrders ( $start, $stop, 'Open' );
|
| 175 |
|
| 176 |
/* @var $queryResult Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse */
|
| 177 |
+
$queryResult = $this->client->send ( $queryRequest );
|
| 178 |
|
| 179 |
if ($queryResult == null) {
|
| 180 |
return;
|
| 270 |
$productId = ( string ) $orderEntry->getProductId ();
|
| 271 |
|
| 272 |
if ($hasNoConfigurables) {
|
|
|
|
| 273 |
try {
|
| 274 |
/* @var $productObj Mage_Catalog_Model_Product */
|
| 275 |
$productObj = Mage::getModel ( 'catalog/product' )->setStoreId ( $storeId )->load ( $productId );
|
| 345 |
if ($shippingIncludesTax) {
|
| 346 |
$deliveryCosts = $orderEntry->getBasePrice ();
|
| 347 |
} else {
|
| 348 |
+
$deliveryCosts = $this->_dataHelper->priceWithoutTax ( $order->getTotalDeliveryCosts (), "19" );
|
| 349 |
}
|
| 350 |
|
| 351 |
$rate = $this->calculateRate ( $order );
|
| 390 |
$contactData = $order->getContactData ();
|
| 391 |
|
| 392 |
$orderModel->place ();
|
| 393 |
+
$orderModel->setCreatedAt ( $order->getOrderDate () );
|
| 394 |
+
$orderModel->setUpdatedAt ( $order->getLastModificationDate () );
|
| 395 |
$orderModel->setState ( Mage_Sales_Model_Order::STATE_PROCESSING, true );
|
|
|
|
| 396 |
$orderModel->setData ( 'customer_email', strlen ( $contactData->getEmail () ) ? $contactData->getEmail () : Mage::getStoreConfig ( 'meinpaket/customer/default_email' ) );
|
| 397 |
$orderModel->setData ( 'ext_customer_id', $contactData->getCustomerId () );
|
| 398 |
$orderModel->setData ( 'dhl_mein_paket_order_id', $order->getOrderId () );
|
| 452 |
* @param string $isoDateString
|
| 453 |
* @wins Code of the year contest
|
| 454 |
* @return string
|
| 455 |
+
* @deprecated
|
| 456 |
+
*
|
| 457 |
*/
|
| 458 |
protected function _getFormattedDateString($isoDateString) {
|
| 459 |
$date = new Zend_Date ( $isoDateString, Zend_Date::ISO_8601 );
|
| 505 |
|
| 506 |
return $customer;
|
| 507 |
}
|
| 508 |
+
|
| 509 |
+
/**
|
| 510 |
+
* Create invoice for order.
|
| 511 |
+
*
|
| 512 |
+
* @param Mage_Sales_Model_Order $order
|
| 513 |
+
*/
|
| 514 |
public function createInvoice(Mage_Sales_Model_Order $order) {
|
| 515 |
/* @var $invoiceModel Sales_Model_Order_Invoice */
|
| 516 |
$invoice = $order->prepareInvoice ();
|
app/code/community/Dhl/MeinPaketCommon/Model/Xml/AbstractXmlPartial.php
CHANGED
|
@@ -165,9 +165,11 @@ abstract class Dhl_MeinPaketCommon_Model_Xml_AbstractXmlPartial {
|
|
| 165 |
* @return string
|
| 166 |
*/
|
| 167 |
protected function escapeStringForMeinPaket($string) {
|
| 168 |
-
$string =
|
| 169 |
-
$string =
|
| 170 |
-
$
|
|
|
|
|
|
|
| 171 |
|
| 172 |
return $string;
|
| 173 |
}
|
| 165 |
* @return string
|
| 166 |
*/
|
| 167 |
protected function escapeStringForMeinPaket($string) {
|
| 168 |
+
$string = Mage::helper ( 'meinpaketcommon' )->filterHTMLTags ( $string );
|
| 169 |
+
// $string = utf8_decode ( $string );
|
| 170 |
+
$charset = Mage::getStoreConfig ( 'design/head/default_charset' );
|
| 171 |
+
$string = html_entity_decode ( $string, ENT_COMPAT | ENT_HTML401, strtoupper ( $charset ) );
|
| 172 |
+
// $string = utf8_encode ( $string );
|
| 173 |
|
| 174 |
return $string;
|
| 175 |
}
|
app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/NotificationRequest.php
CHANGED
|
@@ -74,7 +74,9 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 74 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $order->getDhlMeinPaketOrderId () );
|
| 75 |
$consignmentNode->appendChild ( $orderIdNode );
|
| 76 |
|
| 77 |
-
$
|
|
|
|
|
|
|
| 78 |
$consignmentNode->appendChild ( $consignmentIdNode );
|
| 79 |
|
| 80 |
if ($trackingNumber == null) {
|
|
@@ -97,7 +99,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 97 |
$consignmentEntryNode->appendChild ( $this->getDocument ()->createElement ( 'quantity', ( int ) $item->getQty () ) );
|
| 98 |
}
|
| 99 |
|
| 100 |
-
$this->setHasData();
|
| 101 |
|
| 102 |
return $this;
|
| 103 |
}
|
|
@@ -117,7 +119,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 117 |
$trackingIdNode = $this->getDocument ()->createElement ( 'trackingId', $trackingNumber->getNumber () );
|
| 118 |
$trackingNumberNode->appendChild ( $trackingIdNode );
|
| 119 |
|
| 120 |
-
$this->setHasData();
|
| 121 |
|
| 122 |
return $this;
|
| 123 |
}
|
|
@@ -137,7 +139,9 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 137 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $order->getData ( 'dhl_mein_paket_order_id' ) );
|
| 138 |
$cancellationNode->appendChild ( $orderIdNode );
|
| 139 |
|
| 140 |
-
$
|
|
|
|
|
|
|
| 141 |
$cancellationNode->appendChild ( $consignmentIdNode );
|
| 142 |
|
| 143 |
foreach ( $order->getAllItems () as $orderItem ) {
|
|
@@ -154,7 +158,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 154 |
$cancellationEntryNode->appendChild ( $reasonNode );
|
| 155 |
}
|
| 156 |
|
| 157 |
-
$this->setHasData();
|
| 158 |
|
| 159 |
return $this;
|
| 160 |
}
|
|
@@ -171,7 +175,11 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 171 |
$creditMemoNode = $this->getDocument ()->createElement ( 'creditMemo' );
|
| 172 |
$this->getCredits ()->appendChild ( $creditMemoNode );
|
| 173 |
|
| 174 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
$creditMemoNode->appendChild ( $consignmentIdNode );
|
| 176 |
|
| 177 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $creditMemo->getOrder ()->getDhlMeinPaketOrderId () );
|
|
@@ -186,7 +194,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_NotificationRequest extends Dhl_Mein
|
|
| 186 |
$creditMemoReasonNode = $this->getDocument ()->createElement ( 'creditMemoReason', 'DEALER_GOODWILL' );
|
| 187 |
$creditMemoNode->appendChild ( $creditMemoReasonNode );
|
| 188 |
|
| 189 |
-
$this->setHasData();
|
| 190 |
|
| 191 |
return $this;
|
| 192 |
}
|
| 74 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $order->getDhlMeinPaketOrderId () );
|
| 75 |
$consignmentNode->appendChild ( $orderIdNode );
|
| 76 |
|
| 77 |
+
$consignmentId = $order->getId () . '_' . $shipment->getId () . '_' . microtime ();
|
| 78 |
+
|
| 79 |
+
$consignmentIdNode = $this->getDocument ()->createElement ( 'consignmentId', $consignmentId );
|
| 80 |
$consignmentNode->appendChild ( $consignmentIdNode );
|
| 81 |
|
| 82 |
if ($trackingNumber == null) {
|
| 99 |
$consignmentEntryNode->appendChild ( $this->getDocument ()->createElement ( 'quantity', ( int ) $item->getQty () ) );
|
| 100 |
}
|
| 101 |
|
| 102 |
+
$this->setHasData ();
|
| 103 |
|
| 104 |
return $this;
|
| 105 |
}
|
| 119 |
$trackingIdNode = $this->getDocument ()->createElement ( 'trackingId', $trackingNumber->getNumber () );
|
| 120 |
$trackingNumberNode->appendChild ( $trackingIdNode );
|
| 121 |
|
| 122 |
+
$this->setHasData ();
|
| 123 |
|
| 124 |
return $this;
|
| 125 |
}
|
| 139 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $order->getData ( 'dhl_mein_paket_order_id' ) );
|
| 140 |
$cancellationNode->appendChild ( $orderIdNode );
|
| 141 |
|
| 142 |
+
$consignmentId = $order->getId () . '_' . microtime ();
|
| 143 |
+
|
| 144 |
+
$consignmentIdNode = $this->getDocument ()->createElement ( 'consignmentId', $consignmentId );
|
| 145 |
$cancellationNode->appendChild ( $consignmentIdNode );
|
| 146 |
|
| 147 |
foreach ( $order->getAllItems () as $orderItem ) {
|
| 158 |
$cancellationEntryNode->appendChild ( $reasonNode );
|
| 159 |
}
|
| 160 |
|
| 161 |
+
$this->setHasData ();
|
| 162 |
|
| 163 |
return $this;
|
| 164 |
}
|
| 175 |
$creditMemoNode = $this->getDocument ()->createElement ( 'creditMemo' );
|
| 176 |
$this->getCredits ()->appendChild ( $creditMemoNode );
|
| 177 |
|
| 178 |
+
$order = $shipment->getOrder ();
|
| 179 |
+
|
| 180 |
+
$consignmentId = $order->getId () . '_' . $shipment->getId () . '_' . microtime ();
|
| 181 |
+
|
| 182 |
+
$consignmentIdNode = $this->getDocument ()->createElement ( 'consignmentId', $consignmentId );
|
| 183 |
$creditMemoNode->appendChild ( $consignmentIdNode );
|
| 184 |
|
| 185 |
$orderIdNode = $this->getDocument ()->createElement ( 'orderId', $creditMemo->getOrder ()->getDhlMeinPaketOrderId () );
|
| 194 |
$creditMemoReasonNode = $this->getDocument ()->createElement ( 'creditMemoReason', 'DEALER_GOODWILL' );
|
| 195 |
$creditMemoNode->appendChild ( $creditMemoReasonNode );
|
| 196 |
|
| 197 |
+
$this->setHasData ();
|
| 198 |
|
| 199 |
return $this;
|
| 200 |
}
|
app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/QueryRequest.php
CHANGED
|
@@ -131,6 +131,10 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest extends Dhl_MeinPaketCo
|
|
| 131 |
$externalId = $this->getDocument ()->createElement ( "externalId", $cartId );
|
| 132 |
$this->order_externalIds->appendChild ( $externalId );
|
| 133 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
protected function _initializeOrder() {
|
| 135 |
if ($this->orders == null) {
|
| 136 |
$this->orders = $this->getDocument ()->createElement ( 'orders' );
|
| 131 |
$externalId = $this->getDocument ()->createElement ( "externalId", $cartId );
|
| 132 |
$this->order_externalIds->appendChild ( $externalId );
|
| 133 |
}
|
| 134 |
+
|
| 135 |
+
/**
|
| 136 |
+
* Initialize order.
|
| 137 |
+
*/
|
| 138 |
protected function _initializeOrder() {
|
| 139 |
if ($this->orders == null) {
|
| 140 |
$this->orders = $this->getDocument ()->createElement ( 'orders' );
|
app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/SubmitCartRequest.php
CHANGED
|
@@ -35,6 +35,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_SubmitCartRequest extends Dhl_MeinPa
|
|
| 35 |
}
|
| 36 |
|
| 37 |
/**
|
|
|
|
| 38 |
*
|
| 39 |
* @param Mage_Sales_Model_Order|Mage_Sales_Model_Quote $order
|
| 40 |
* @param Dhl_Paypal_Model_Cart $cart
|
|
@@ -88,7 +89,14 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_SubmitCartRequest extends Dhl_MeinPa
|
|
| 88 |
|
| 89 |
return $cart->getNotificationId ();
|
| 90 |
}
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
if (! Mage::helper ( 'meinpaketcommon/data' )->checkItem ( $item )) {
|
| 93 |
return;
|
| 94 |
}
|
|
@@ -115,10 +123,18 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_SubmitCartRequest extends Dhl_MeinPa
|
|
| 115 |
$shoppingCartNode->appendChild ( $shoppingCartItemNode );
|
| 116 |
$this->setHasData ( true );
|
| 117 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
protected function addCustomerData(DOMElement $shoppingCartNode, Mage_Sales_Model_Order $order) {
|
| 119 |
$customerDataNode = $this->getDocument ()->createElement ( 'customerData' );
|
| 120 |
|
| 121 |
-
$emailNode = $this->
|
|
|
|
| 122 |
|
| 123 |
if ($order->getShippingAddressId () != $order->getBillingAddressId ()) {
|
| 124 |
$deliveryAddressNode = $this->getDocument ()->createElement ( 'deliveryAddress' );
|
|
@@ -132,6 +148,13 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_SubmitCartRequest extends Dhl_MeinPa
|
|
| 132 |
|
| 133 |
$shoppingCartNode->appendChild ( $customerDataNode );
|
| 134 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
protected function addCustomerAddressFields(DOMElement $addressNode, Mage_Sales_Model_Order_Address $address) {
|
| 136 |
$streetHouseNumber = Mage::helper ( 'meinpaketcommon/address' )->parseStreetHouseNumber ( $address->getStreet1 () );
|
| 137 |
|
| 35 |
}
|
| 36 |
|
| 37 |
/**
|
| 38 |
+
* Add cart.
|
| 39 |
*
|
| 40 |
* @param Mage_Sales_Model_Order|Mage_Sales_Model_Quote $order
|
| 41 |
* @param Dhl_Paypal_Model_Cart $cart
|
| 89 |
|
| 90 |
return $cart->getNotificationId ();
|
| 91 |
}
|
| 92 |
+
|
| 93 |
+
/**
|
| 94 |
+
* Add cart item.
|
| 95 |
+
*
|
| 96 |
+
* @param DOMElement $shoppingCartNode
|
| 97 |
+
* @param Mage_Sales_Model_Order_Item|Mage_Sales_Model_Quote_Item $item
|
| 98 |
+
*/
|
| 99 |
+
protected function addCartItem(DOMElement $shoppingCartNode, $item) {
|
| 100 |
if (! Mage::helper ( 'meinpaketcommon/data' )->checkItem ( $item )) {
|
| 101 |
return;
|
| 102 |
}
|
| 123 |
$shoppingCartNode->appendChild ( $shoppingCartItemNode );
|
| 124 |
$this->setHasData ( true );
|
| 125 |
}
|
| 126 |
+
|
| 127 |
+
/**
|
| 128 |
+
* Add customer address
|
| 129 |
+
*
|
| 130 |
+
* @param DOMElement $shoppingCartNode
|
| 131 |
+
* @param Mage_Sales_Model_Order $order
|
| 132 |
+
*/
|
| 133 |
protected function addCustomerData(DOMElement $shoppingCartNode, Mage_Sales_Model_Order $order) {
|
| 134 |
$customerDataNode = $this->getDocument ()->createElement ( 'customerData' );
|
| 135 |
|
| 136 |
+
$emailNode = $this->getCDATANode ( 'email', $order->getCustomerEmail () );
|
| 137 |
+
$customerDataNode->appendChild ( $emailNode );
|
| 138 |
|
| 139 |
if ($order->getShippingAddressId () != $order->getBillingAddressId ()) {
|
| 140 |
$deliveryAddressNode = $this->getDocument ()->createElement ( 'deliveryAddress' );
|
| 148 |
|
| 149 |
$shoppingCartNode->appendChild ( $customerDataNode );
|
| 150 |
}
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* Add customer address fields.
|
| 154 |
+
*
|
| 155 |
+
* @param DOMElement $addressNode
|
| 156 |
+
* @param Mage_Sales_Model_Order_Address $address
|
| 157 |
+
*/
|
| 158 |
protected function addCustomerAddressFields(DOMElement $addressNode, Mage_Sales_Model_Order_Address $address) {
|
| 159 |
$streetHouseNumber = Mage::helper ( 'meinpaketcommon/address' )->parseStreetHouseNumber ( $address->getStreet1 () );
|
| 160 |
|
app/code/community/Dhl/MeinPaketCommon/Model/Xml/Request/UploadRequest.php
CHANGED
|
@@ -40,6 +40,12 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 40 |
*/
|
| 41 |
protected $deletions = null;
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
/**
|
| 44 |
*
|
| 45 |
* @var Dhl_MeinPaketCommon_Helper_Product
|
|
@@ -59,6 +65,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 59 |
parent::__construct ();
|
| 60 |
$this->productHelper = Mage::helper ( 'meinpaketcommon/product' );
|
| 61 |
$this->dataHelper = Mage::helper ( 'meinpaketcommon/data' );
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
/**
|
|
@@ -108,26 +115,16 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 108 |
|
| 109 |
$meinPaketId = $product->getData ( 'meinpaket_id' );
|
| 110 |
|
| 111 |
-
// ean
|
| 112 |
-
if (strlen ( $meinPaketId ) <= 0 && $complete) {
|
| 113 |
-
$ean = $this->productHelper->getEan ( $product );
|
| 114 |
-
if (! empty ( $ean )) {
|
| 115 |
-
$offer->appendChild ( $this->getDocument ()->createElement ( 'common:ean', $ean ) );
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
// manufacturer
|
| 119 |
-
$manufacturer = $product->getAttributeText ( 'manufacturer' );
|
| 120 |
-
if (! empty ( $manufacturer )) {
|
| 121 |
-
$offer->appendChild ( $this->getCDATANode ( 'common:manufacturerName', $manufacturer ) );
|
| 122 |
-
}
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
// price
|
| 126 |
// Use final price to use timing
|
| 127 |
$price = Mage::getStoreConfigFlag ( 'meinpaket/product_attributes/use_available_special_price' ) && $product->getFinalPrice () > 0 ? $product->getFinalPrice () : $product->getPrice ();
|
| 128 |
$priceWithTax = Mage::helper ( 'tax' )->getPrice ( $product, $price );
|
| 129 |
$offer->appendChild ( $this->getDocument ()->createElement ( 'price', $priceWithTax ) );
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
// tax group
|
| 132 |
$taxGroup = $this->productHelper->getMeinPaketTaxGroup ( $product );
|
| 133 |
$offer->appendChild ( $this->getDocument ()->createElement ( 'taxGroup', $taxGroup ) );
|
|
@@ -166,7 +163,7 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 166 |
}
|
| 167 |
}
|
| 168 |
|
| 169 |
-
$this->exportAttributes ( $product, $offer, $configurableProduct );
|
| 170 |
}
|
| 171 |
|
| 172 |
$this->getOffers ()->appendChild ( $offer );
|
|
@@ -174,6 +171,12 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 174 |
|
| 175 |
return $offer;
|
| 176 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
public function removeProduct(Mage_Catalog_Model_Product $product) {
|
| 178 |
if ($product->getData ( 'meinpaket_id' )) {
|
| 179 |
/* @var $productDeletion DOMNode */
|
|
@@ -185,11 +188,113 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 185 |
$this->setHasData ();
|
| 186 |
}
|
| 187 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
public function addCategory(Mage_Catalog_Model_Product $product) {
|
| 189 |
-
// TODO:
|
| 190 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
public function removeCategory(Mage_Catalog_Model_Product $product) {
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
protected function getProductDescriptions() {
|
| 195 |
if ($this->productDescriptions == null) {
|
|
@@ -289,14 +394,23 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 289 |
}
|
| 290 |
}
|
| 291 |
|
| 292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
$this->removeProduct ( $product );
|
| 294 |
return false;
|
| 295 |
}
|
| 296 |
|
|
|
|
|
|
|
| 297 |
/* @var $productDescription DOMNode */
|
| 298 |
$productDescription = $this->getDocument ()->createElement ( 'productDescription' );
|
| 299 |
-
$variantInfo = null;
|
| 300 |
|
| 301 |
// product id
|
| 302 |
$productId = $this->getDocument ()->createElement ( 'common:productId', $product->getId () );
|
|
@@ -314,34 +428,78 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 314 |
$productDescription->appendChild ( $this->getCDATANode ( 'common:manufacturerName', $manufacturer ) );
|
| 315 |
}
|
| 316 |
|
| 317 |
-
|
|
|
|
|
|
|
|
|
|
| 318 |
$variantGroupInfoNode = $this->getDocument ()->createElement ( "variantGroupInfo" );
|
| 319 |
$variantGroupInfoNode->setAttribute ( "code", $configurableProduct->getId () );
|
| 320 |
$productDescription->appendChild ( $variantGroupInfoNode );
|
| 321 |
}
|
| 322 |
|
| 323 |
// name
|
| 324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
$productDescription->appendChild ( $this->getCDATANode ( 'name', $product->getName () ) );
|
| 326 |
} else {
|
| 327 |
throw new Dhl_MeinPaketCommon_Model_Exception_InvalidDataException ( $product->getId (), 'name' );
|
| 328 |
}
|
| 329 |
|
| 330 |
// shortdescription
|
| 331 |
-
|
| 332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 333 |
$productDescription->appendChild ( $this->getCDATANode ( 'shortDescription', $shortDescription ) );
|
| 334 |
} else {
|
| 335 |
throw new Dhl_MeinPaketCommon_Model_Exception_MissingDataException ( $product->getId (), 'shortDescription' );
|
| 336 |
}
|
| 337 |
|
| 338 |
// long description (optional) && (strlen > 0)
|
| 339 |
-
|
| 340 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
$productDescription->appendChild ( $this->getCDATANode ( 'longDescription', $description ) );
|
| 342 |
}
|
| 343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 344 |
// Export images
|
|
|
|
|
|
|
| 345 |
$images = $product->getMediaGalleryImages ();
|
| 346 |
if ($images != null) {
|
| 347 |
foreach ( $images as $image ) {
|
|
@@ -355,6 +513,8 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 355 |
$productDescription->appendChild ( $imageNode );
|
| 356 |
$imageNode->appendChild ( $this->getDocument ()->createElement ( "url", $image->getUrl () ) );
|
| 357 |
|
|
|
|
|
|
|
| 358 |
$label = $image->getLabel ();
|
| 359 |
if (! empty ( $label )) {
|
| 360 |
$imageNode->appendChild ( $this->getDocument ()->createElement ( "caption", $image->getLabel () ) );
|
|
@@ -362,37 +522,13 @@ class Dhl_MeinPaketCommon_Model_Xml_Request_UploadRequest extends Dhl_MeinPaketC
|
|
| 362 |
}
|
| 363 |
}
|
| 364 |
|
| 365 |
-
|
| 366 |
-
$meinpaketCategory = $product->getData ( 'meinpaket_category' );
|
| 367 |
-
if (strlen ( $meinpaketCategory ) > 0) {
|
| 368 |
-
$mNode = $this->getDocument ()->createElement ( 'marketplaceCategory' );
|
| 369 |
-
$mNode->setAttribute ( 'code', $meinpaketCategory );
|
| 370 |
-
$productDescription->appendChild ( $mNode );
|
| 371 |
-
} else {
|
| 372 |
-
throw new Dhl_MeinPaketCommon_Model_Exception_MissingDataException ( $product->getId (), 'dhl_marketplace_category_id' );
|
| 373 |
-
}
|
| 374 |
-
|
| 375 |
-
$this->exportAttributes ( $product, $productDescription, $configurableProduct );
|
| 376 |
-
$this->getProductDescriptions ()->appendChild ( $productDescription );
|
| 377 |
-
$this->addOffer ( $product, $configurableProduct, false );
|
| 378 |
-
|
| 379 |
-
$this->setHasData ();
|
| 380 |
-
|
| 381 |
-
return $productDescription;
|
| 382 |
}
|
| 383 |
|
| 384 |
/**
|
| 385 |
* Export product attributes.
|
| 386 |
*/
|
| 387 |
-
protected function exportAttributes(Mage_Catalog_Model_Product $product, DOMNode $node,
|
| 388 |
-
$configurableAttributes = array ();
|
| 389 |
-
|
| 390 |
-
if ($configurableProduct != null && $configurableProduct->getTypeId () == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
|
| 391 |
-
foreach ( $configurableProduct->getTypeInstance ( true )->getConfigurableAttributes ( $configurableProduct ) as $attr ) {
|
| 392 |
-
$configurableAttributes [] = $attr->getProductAttribute ()->getAttributeCode ();
|
| 393 |
-
}
|
| 394 |
-
}
|
| 395 |
-
|
| 396 |
foreach ( $product->getAttributes () as $attribute ) {
|
| 397 |
/* @var $attribute Mage_Eav_Model_Attribute */
|
| 398 |
|
| 40 |
*/
|
| 41 |
protected $deletions = null;
|
| 42 |
|
| 43 |
+
/**
|
| 44 |
+
*
|
| 45 |
+
* @var Mage_Core_Helper_Data
|
| 46 |
+
*/
|
| 47 |
+
protected $coreHelper = null;
|
| 48 |
+
|
| 49 |
/**
|
| 50 |
*
|
| 51 |
* @var Dhl_MeinPaketCommon_Helper_Product
|
| 65 |
parent::__construct ();
|
| 66 |
$this->productHelper = Mage::helper ( 'meinpaketcommon/product' );
|
| 67 |
$this->dataHelper = Mage::helper ( 'meinpaketcommon/data' );
|
| 68 |
+
$this->coreHelper = Mage::helper ( 'core/data' );
|
| 69 |
}
|
| 70 |
|
| 71 |
/**
|
| 115 |
|
| 116 |
$meinPaketId = $product->getData ( 'meinpaket_id' );
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
// price
|
| 119 |
// Use final price to use timing
|
| 120 |
$price = Mage::getStoreConfigFlag ( 'meinpaket/product_attributes/use_available_special_price' ) && $product->getFinalPrice () > 0 ? $product->getFinalPrice () : $product->getPrice ();
|
| 121 |
$priceWithTax = Mage::helper ( 'tax' )->getPrice ( $product, $price );
|
| 122 |
$offer->appendChild ( $this->getDocument ()->createElement ( 'price', $priceWithTax ) );
|
| 123 |
|
| 124 |
+
if ($this->coreHelper->isModuleEnabled ( 'DerModPro_BasePrice' )) {
|
| 125 |
+
$this->addDerModProBasePrice ( $offer, $product, $priceWithTax );
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
// tax group
|
| 129 |
$taxGroup = $this->productHelper->getMeinPaketTaxGroup ( $product );
|
| 130 |
$offer->appendChild ( $this->getDocument ()->createElement ( 'taxGroup', $taxGroup ) );
|
| 163 |
}
|
| 164 |
}
|
| 165 |
|
| 166 |
+
$this->exportAttributes ( $product, $offer, $this->productHelper->getConfigurableAttributes ( $configurableProduct ) );
|
| 167 |
}
|
| 168 |
|
| 169 |
$this->getOffers ()->appendChild ( $offer );
|
| 171 |
|
| 172 |
return $offer;
|
| 173 |
}
|
| 174 |
+
|
| 175 |
+
/**
|
| 176 |
+
* Remove given product.
|
| 177 |
+
*
|
| 178 |
+
* @param unknown $product
|
| 179 |
+
*/
|
| 180 |
public function removeProduct(Mage_Catalog_Model_Product $product) {
|
| 181 |
if ($product->getData ( 'meinpaket_id' )) {
|
| 182 |
/* @var $productDeletion DOMNode */
|
| 188 |
$this->setHasData ();
|
| 189 |
}
|
| 190 |
}
|
| 191 |
+
|
| 192 |
+
/**
|
| 193 |
+
* Add category
|
| 194 |
+
* TODO:
|
| 195 |
+
*
|
| 196 |
+
* @param unknown $product
|
| 197 |
+
*/
|
| 198 |
public function addCategory(Mage_Catalog_Model_Product $product) {
|
|
|
|
| 199 |
}
|
| 200 |
+
|
| 201 |
+
/**
|
| 202 |
+
* Remove category
|
| 203 |
+
* TODO:
|
| 204 |
+
*
|
| 205 |
+
* @param unknown $product
|
| 206 |
+
*/
|
| 207 |
public function removeCategory(Mage_Catalog_Model_Product $product) {
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
/**
|
| 211 |
+
* Add baseprice using DerModPro_BasePrice
|
| 212 |
+
*
|
| 213 |
+
* @param DOMElement $offer
|
| 214 |
+
* to add baseprice to
|
| 215 |
+
* @param Mage_Catalog_Product $product
|
| 216 |
+
* to get baseprice for
|
| 217 |
+
* @param unknown $productPrice
|
| 218 |
+
* to use
|
| 219 |
+
*/
|
| 220 |
+
protected function addDerModProBasePrice(DOMElement $offer, Mage_Catalog_Model_Product $product, $productPrice) {
|
| 221 |
+
if (! ($productAmount = $product->getBasePriceAmount ())) {
|
| 222 |
+
return;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
if (! ($referenceAmount = $product->getBasePriceBaseAmount ())) {
|
| 226 |
+
return;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
if (! ($productPrice)) {
|
| 230 |
+
return;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
if (! is_numeric ( $productAmount ) || ! is_numeric ( $referenceAmount ) || ! is_numeric ( $productPrice )) {
|
| 234 |
+
return;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
/* @var $basePriceHelper DerModePro_BasePrice_Helper_Data */
|
| 238 |
+
$basePriceHelper = Mage::helper ( 'baseprice/data' );
|
| 239 |
+
|
| 240 |
+
$productUnit = $product->getBasePriceUnit ();
|
| 241 |
+
$referenceUnit = $product->getBasePriceBaseUnit ();
|
| 242 |
+
$unit = null;
|
| 243 |
+
|
| 244 |
+
switch ($referenceUnit) {
|
| 245 |
+
case 'PCS' :
|
| 246 |
+
$unit = 'per_piece';
|
| 247 |
+
$referenceAmount = 1;
|
| 248 |
+
break;
|
| 249 |
+
case 'KG' :
|
| 250 |
+
case 'LB' :
|
| 251 |
+
$unit = 'per_1kg';
|
| 252 |
+
$referenceAmount = 1;
|
| 253 |
+
break;
|
| 254 |
+
case 'G' :
|
| 255 |
+
$unit = 'per_100g';
|
| 256 |
+
$referenceAmount = 100;
|
| 257 |
+
break;
|
| 258 |
+
case 'L' :
|
| 259 |
+
$unit = 'per_1l';
|
| 260 |
+
$referenceAmount = 1;
|
| 261 |
+
break;
|
| 262 |
+
case 'ML' :
|
| 263 |
+
$unit = 'per_100ml';
|
| 264 |
+
$referenceAmount = 100;
|
| 265 |
+
break;
|
| 266 |
+
case 'MM' :
|
| 267 |
+
case 'CM' :
|
| 268 |
+
case 'IN' :
|
| 269 |
+
case 'M' :
|
| 270 |
+
$unit = 'per_1m';
|
| 271 |
+
$referenceAmount = 1;
|
| 272 |
+
break;
|
| 273 |
+
case 'SQM' :
|
| 274 |
+
$unit = 'per_1m2';
|
| 275 |
+
$referenceAmount = 1;
|
| 276 |
+
break;
|
| 277 |
+
case 'CBM' :
|
| 278 |
+
$unit = 'per_1m3';
|
| 279 |
+
$referenceUnit = 1;
|
| 280 |
+
break;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
if (! $unit) {
|
| 284 |
+
return;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
/* @var $basePriceModel DerModePro_BasePrice_Model_BasePrice */
|
| 288 |
+
$basePriceModel = Mage::getModel ( 'baseprice/baseprice', array (
|
| 289 |
+
'reference_unit' => $referenceUnit,
|
| 290 |
+
'reference_amount' => $referenceAmount
|
| 291 |
+
) );
|
| 292 |
+
|
| 293 |
+
$unitPrice = round ( $basePriceModel->getBasePrice ( $productAmount, $productUnit, $productPrice ), 2 );
|
| 294 |
+
|
| 295 |
+
$unitPriceElement = $this->getDocument ()->createElement ( 'unitprice', $unitPrice );
|
| 296 |
+
$unitPriceElement->setAttribute ( 'unit', $unit );
|
| 297 |
+
$offer->appendChild ( $unitPriceElement );
|
| 298 |
}
|
| 299 |
protected function getProductDescriptions() {
|
| 300 |
if ($this->productDescriptions == null) {
|
| 394 |
}
|
| 395 |
}
|
| 396 |
|
| 397 |
+
$configurableProductFallback = Mage::getStoreConfigFlag ( 'meinpaket/product_attributes/configurable_product_fallback' );
|
| 398 |
+
$includeConfigurableProductImages = Mage::getStoreConfigFlag ( 'meinpaket/product_attributes/include_configurable_product_images' );
|
| 399 |
+
|
| 400 |
+
$meinpaketCategory = $product->getData ( 'meinpaket_category' );
|
| 401 |
+
if (empty ( $meinpaketCategory ) && $configurableProductFallback && $configurableProduct != null) {
|
| 402 |
+
$meinpaketCategory = $configurableProduct->getData ( 'meinpaket_category' );
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
if (! $this->productHelper->isActive ( $product ) || empty ( $meinpaketCategory )) {
|
| 406 |
$this->removeProduct ( $product );
|
| 407 |
return false;
|
| 408 |
}
|
| 409 |
|
| 410 |
+
$variantInfo = null;
|
| 411 |
+
|
| 412 |
/* @var $productDescription DOMNode */
|
| 413 |
$productDescription = $this->getDocument ()->createElement ( 'productDescription' );
|
|
|
|
| 414 |
|
| 415 |
// product id
|
| 416 |
$productId = $this->getDocument ()->createElement ( 'common:productId', $product->getId () );
|
| 428 |
$productDescription->appendChild ( $this->getCDATANode ( 'common:manufacturerName', $manufacturer ) );
|
| 429 |
}
|
| 430 |
|
| 431 |
+
$configurableAttributes = array ();
|
| 432 |
+
|
| 433 |
+
if ($configurableProduct != NULL && ! empty ( $configurableAttributes )) {
|
| 434 |
+
$configurableAttributes = $this->productHelper->getConfigurableAttributes ( $configurableProduct );
|
| 435 |
$variantGroupInfoNode = $this->getDocument ()->createElement ( "variantGroupInfo" );
|
| 436 |
$variantGroupInfoNode->setAttribute ( "code", $configurableProduct->getId () );
|
| 437 |
$productDescription->appendChild ( $variantGroupInfoNode );
|
| 438 |
}
|
| 439 |
|
| 440 |
// name
|
| 441 |
+
$name = $product->getName ();
|
| 442 |
+
if (empty ( $name ) && $configurableProductFallback && $configurableProduct != null) {
|
| 443 |
+
$shortDescription = $this->escapeStringForMeinPaket ( $configurableProduct->getName () );
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
if (! empty ( $name )) {
|
| 447 |
$productDescription->appendChild ( $this->getCDATANode ( 'name', $product->getName () ) );
|
| 448 |
} else {
|
| 449 |
throw new Dhl_MeinPaketCommon_Model_Exception_InvalidDataException ( $product->getId (), 'name' );
|
| 450 |
}
|
| 451 |
|
| 452 |
// shortdescription
|
| 453 |
+
$shortDescription = $this->escapeStringForMeinPaket ( $product->getShortDescription () );
|
| 454 |
+
|
| 455 |
+
if (empty ( $shortDescription ) && $configurableProductFallback && $configurableProduct != null) {
|
| 456 |
+
$shortDescription = $this->escapeStringForMeinPaket ( $configurableProduct->getShortDescription () );
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
if (! empty ( $shortDescription )) {
|
| 460 |
$productDescription->appendChild ( $this->getCDATANode ( 'shortDescription', $shortDescription ) );
|
| 461 |
} else {
|
| 462 |
throw new Dhl_MeinPaketCommon_Model_Exception_MissingDataException ( $product->getId (), 'shortDescription' );
|
| 463 |
}
|
| 464 |
|
| 465 |
// long description (optional) && (strlen > 0)
|
| 466 |
+
$description = $this->escapeStringForMeinPaket ( $product->getDescription () );
|
| 467 |
+
if (empty ( $description ) && $configurableProductFallback && $configurableProduct != null) {
|
| 468 |
+
$description = $this->escapeStringForMeinPaket ( $configurableProduct->getDescription () );
|
| 469 |
+
}
|
| 470 |
+
|
| 471 |
+
if (! empty ( $description )) {
|
| 472 |
$productDescription->appendChild ( $this->getCDATANode ( 'longDescription', $description ) );
|
| 473 |
}
|
| 474 |
|
| 475 |
+
// image
|
| 476 |
+
if (((! $this->exportImage ( $product, $productDescription ) && $configurableProductFallback) || $includeConfigurableProductImages) && $configurableProduct != null) {
|
| 477 |
+
$this->exportImage ( $configurableProduct, $productDescription );
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
// marketplace category
|
| 481 |
+
$mNode = $this->getDocument ()->createElement ( 'marketplaceCategory' );
|
| 482 |
+
$mNode->setAttribute ( 'code', $meinpaketCategory );
|
| 483 |
+
$productDescription->appendChild ( $mNode );
|
| 484 |
+
|
| 485 |
+
$this->exportAttributes ( $product, $productDescription, $configurableAttributes );
|
| 486 |
+
$this->getProductDescriptions ()->appendChild ( $productDescription );
|
| 487 |
+
$this->addOffer ( $product, $configurableProduct, false );
|
| 488 |
+
|
| 489 |
+
$this->setHasData ();
|
| 490 |
+
|
| 491 |
+
return $productDescription;
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
/**
|
| 495 |
+
*
|
| 496 |
+
* @param Mage_Catalog_Model_Product $product
|
| 497 |
+
* @param unknown $productDescription
|
| 498 |
+
*/
|
| 499 |
+
protected function exportImage(Mage_Catalog_Model_Product $product, $productDescription) {
|
| 500 |
// Export images
|
| 501 |
+
$imagesExported = false;
|
| 502 |
+
|
| 503 |
$images = $product->getMediaGalleryImages ();
|
| 504 |
if ($images != null) {
|
| 505 |
foreach ( $images as $image ) {
|
| 513 |
$productDescription->appendChild ( $imageNode );
|
| 514 |
$imageNode->appendChild ( $this->getDocument ()->createElement ( "url", $image->getUrl () ) );
|
| 515 |
|
| 516 |
+
$imagesExported = true;
|
| 517 |
+
|
| 518 |
$label = $image->getLabel ();
|
| 519 |
if (! empty ( $label )) {
|
| 520 |
$imageNode->appendChild ( $this->getDocument ()->createElement ( "caption", $image->getLabel () ) );
|
| 522 |
}
|
| 523 |
}
|
| 524 |
|
| 525 |
+
return $imagesExported;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 526 |
}
|
| 527 |
|
| 528 |
/**
|
| 529 |
* Export product attributes.
|
| 530 |
*/
|
| 531 |
+
protected function exportAttributes(Mage_Catalog_Model_Product $product, DOMNode $node, array $configurableAttributes = array()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 532 |
foreach ( $product->getAttributes () as $attribute ) {
|
| 533 |
/* @var $attribute Mage_Eav_Model_Attribute */
|
| 534 |
|
app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{AsyncController.php → Meinpaketcommon/AsyncController.php}
RENAMED
|
@@ -3,14 +3,14 @@
|
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
-
class
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaketcommon/async' )->_addBreadcrumb ( Mage::helper ( 'meinpaketcommon' )->__ ( 'Async' ), Mage::helper ( 'meinpaketcommon' )->__ ( 'Async' ) );
|
| 9 |
return $this;
|
| 10 |
}
|
| 11 |
/**
|
| 12 |
* (non-PHPdoc)
|
| 13 |
-
*
|
| 14 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 15 |
*/
|
| 16 |
protected function _isAllowed() {
|
|
@@ -78,12 +78,12 @@ class Dhl_MeinPaketCommon_Adminhtml_AsyncController extends Mage_Adminhtml_Contr
|
|
| 78 |
$cronjob = $this->getRequest ()->getParam ( 'cronjob', 'all' );
|
| 79 |
if ($cronjob == 'all') {
|
| 80 |
return Dhl_MeinPaket_Model_Cron::$CRONJOBS;
|
| 81 |
-
} else if (in_array ( $cronjob,
|
| 82 |
return array (
|
| 83 |
$cronjob
|
| 84 |
);
|
| 85 |
}
|
| 86 |
-
return
|
| 87 |
}
|
| 88 |
|
| 89 |
/**
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
+
class Dhl_MeinPaketCommon_Adminhtml_Meinpaketcommon_AsyncController extends Mage_Adminhtml_Controller_Action {
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaketcommon/async' )->_addBreadcrumb ( Mage::helper ( 'meinpaketcommon' )->__ ( 'Async' ), Mage::helper ( 'meinpaketcommon' )->__ ( 'Async' ) );
|
| 9 |
return $this;
|
| 10 |
}
|
| 11 |
/**
|
| 12 |
* (non-PHPdoc)
|
| 13 |
+
*
|
| 14 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 15 |
*/
|
| 16 |
protected function _isAllowed() {
|
| 78 |
$cronjob = $this->getRequest ()->getParam ( 'cronjob', 'all' );
|
| 79 |
if ($cronjob == 'all') {
|
| 80 |
return Dhl_MeinPaket_Model_Cron::$CRONJOBS;
|
| 81 |
+
} else if (in_array ( $cronjob, Dhl_MeinPaketCommon_Model_Cron::$CRONJOBS )) {
|
| 82 |
return array (
|
| 83 |
$cronjob
|
| 84 |
);
|
| 85 |
}
|
| 86 |
+
return array ();
|
| 87 |
}
|
| 88 |
|
| 89 |
/**
|
app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{LogController.php → Meinpaketcommon/LogController.php}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
-
class
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaketcommon/log' )->_addBreadcrumb ( Mage::helper ( 'meinpaketcommon' )->__ ( 'Log' ), Mage::helper ( 'meinpaketcommon' )->__ ( 'Log' ) );
|
| 9 |
return $this;
|
| 3 |
/**
|
| 4 |
*
|
| 5 |
*/
|
| 6 |
+
class Dhl_MeinPaketCommon_Adminhtml_Meinpaketcommon_LogController extends Mage_Adminhtml_Controller_Action {
|
| 7 |
protected function _initAction() {
|
| 8 |
$this->loadLayout ()->_setActiveMenu ( 'meinpaketcommon/log' )->_addBreadcrumb ( Mage::helper ( 'meinpaketcommon' )->__ ( 'Log' ), Mage::helper ( 'meinpaketcommon' )->__ ( 'Log' ) );
|
| 9 |
return $this;
|
app/code/community/Dhl/MeinPaketCommon/controllers/Adminhtml/{OrderImportController.php → Meinpaketcommon/OrderImportController.php}
RENAMED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
-
class
|
| 12 |
/**
|
| 13 |
* Initialized the controller.
|
| 14 |
*
|
|
@@ -22,6 +22,7 @@ class Dhl_MeinPaketCommon_Adminhtml_OrderImportController extends Mage_Adminhtml
|
|
| 22 |
|
| 23 |
/**
|
| 24 |
* (non-PHPdoc)
|
|
|
|
| 25 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 26 |
*/
|
| 27 |
protected function _isAllowed() {
|
| 8 |
* @subpackage Adminhtml
|
| 9 |
* @version $Id$
|
| 10 |
*/
|
| 11 |
+
class Dhl_MeinPaketCommon_Adminhtml_Meinpaketcommon_OrderImportController extends Mage_Adminhtml_Controller_Action {
|
| 12 |
/**
|
| 13 |
* Initialized the controller.
|
| 14 |
*
|
| 22 |
|
| 23 |
/**
|
| 24 |
* (non-PHPdoc)
|
| 25 |
+
*
|
| 26 |
* @see Mage_Adminhtml_Controller_Action::_isAllowed()
|
| 27 |
*/
|
| 28 |
protected function _isAllowed() {
|
app/code/community/Dhl/MeinPaketCommon/etc/adminhtml.xml
CHANGED
|
@@ -6,11 +6,11 @@
|
|
| 6 |
<children>
|
| 7 |
<log translate="title" module="meinpaketcommon">
|
| 8 |
<title>Log</title>
|
| 9 |
-
<action>
|
| 10 |
</log>
|
| 11 |
<async translate="title" module="meinpaketcommon">
|
| 12 |
<title>Async</title>
|
| 13 |
-
<action>
|
| 14 |
</async>
|
| 15 |
</children>
|
| 16 |
<sort_order>90</sort_order>
|
| 6 |
<children>
|
| 7 |
<log translate="title" module="meinpaketcommon">
|
| 8 |
<title>Log</title>
|
| 9 |
+
<action>adminhtml/meinpaketcommon_log</action>
|
| 10 |
</log>
|
| 11 |
<async translate="title" module="meinpaketcommon">
|
| 12 |
<title>Async</title>
|
| 13 |
+
<action>adminhtml/meinpaketcommon_async</action>
|
| 14 |
</async>
|
| 15 |
</children>
|
| 16 |
<sort_order>90</sort_order>
|
app/code/community/Dhl/MeinPaketCommon/etc/config.xml
CHANGED
|
@@ -2,18 +2,18 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_MeinPaketCommon>
|
| 5 |
-
<version>1.
|
| 6 |
</Dhl_MeinPaketCommon>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
-
<
|
| 11 |
-
<use>admin</use>
|
| 12 |
<args>
|
| 13 |
-
<
|
| 14 |
-
|
|
|
|
| 15 |
</args>
|
| 16 |
-
</
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
|
@@ -36,25 +36,25 @@
|
|
| 36 |
</adminhtml>
|
| 37 |
<crontab>
|
| 38 |
<jobs>
|
| 39 |
-
<
|
| 40 |
<schedule>
|
| 41 |
<config_path>meinpaket/cron/async</config_path>
|
| 42 |
</schedule>
|
| 43 |
<run>
|
| 44 |
<model>meinpaketcommon/cron::processAsyncTasks</model>
|
| 45 |
</run>
|
| 46 |
-
</
|
| 47 |
-
<
|
| 48 |
<schedule>
|
| 49 |
<config_path>meinpaket/cron/order</config_path>
|
| 50 |
</schedule>
|
| 51 |
<run>
|
| 52 |
<model>meinpaketcommon/cron::importOrders</model>
|
| 53 |
</run>
|
| 54 |
-
</
|
| 55 |
<meinpaketcommon_cleanup>
|
| 56 |
<schedule>
|
| 57 |
-
<config_path>
|
| 58 |
</schedule>
|
| 59 |
<run>
|
| 60 |
<model>meinpaketcommon/cron::cleanup</model>
|
|
@@ -68,7 +68,7 @@
|
|
| 68 |
<active>1</active>
|
| 69 |
<model>meinpaketcommon/payment_method_meinpaket</model>
|
| 70 |
<order_status>pending</order_status>
|
| 71 |
-
<title>
|
| 72 |
<allowspecific>0</allowspecific>
|
| 73 |
<group>offline</group>
|
| 74 |
</meinpaket>
|
|
@@ -76,7 +76,7 @@
|
|
| 76 |
<active>1</active>
|
| 77 |
<model>meinpaketcommon/payment_method_allyouneed</model>
|
| 78 |
<order_status>pending</order_status>
|
| 79 |
-
<title>
|
| 80 |
<allowspecific>0</allowspecific>
|
| 81 |
<group>offline</group>
|
| 82 |
</allyouneed>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_MeinPaketCommon>
|
| 5 |
+
<version>1.4.0</version>
|
| 6 |
</Dhl_MeinPaketCommon>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
+
<adminhtml>
|
|
|
|
| 11 |
<args>
|
| 12 |
+
<modules>
|
| 13 |
+
<Dhl_MeinPaketCommon after="Mage_Adminhtml">Dhl_MeinPaketCommon_Adminhtml</Dhl_MeinPaketCommon>
|
| 14 |
+
</modules>
|
| 15 |
</args>
|
| 16 |
+
</adminhtml>
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
| 36 |
</adminhtml>
|
| 37 |
<crontab>
|
| 38 |
<jobs>
|
| 39 |
+
<meinpaketcommon_processAsyncTasks>
|
| 40 |
<schedule>
|
| 41 |
<config_path>meinpaket/cron/async</config_path>
|
| 42 |
</schedule>
|
| 43 |
<run>
|
| 44 |
<model>meinpaketcommon/cron::processAsyncTasks</model>
|
| 45 |
</run>
|
| 46 |
+
</meinpaketcommon_processAsyncTasks>
|
| 47 |
+
<meinpaketcommon_importOrders>
|
| 48 |
<schedule>
|
| 49 |
<config_path>meinpaket/cron/order</config_path>
|
| 50 |
</schedule>
|
| 51 |
<run>
|
| 52 |
<model>meinpaketcommon/cron::importOrders</model>
|
| 53 |
</run>
|
| 54 |
+
</meinpaketcommon_importOrders>
|
| 55 |
<meinpaketcommon_cleanup>
|
| 56 |
<schedule>
|
| 57 |
+
<config_path>meinpaket/cron/cleanup</config_path>
|
| 58 |
</schedule>
|
| 59 |
<run>
|
| 60 |
<model>meinpaketcommon/cron::cleanup</model>
|
| 68 |
<active>1</active>
|
| 69 |
<model>meinpaketcommon/payment_method_meinpaket</model>
|
| 70 |
<order_status>pending</order_status>
|
| 71 |
+
<title>Allyouneed</title>
|
| 72 |
<allowspecific>0</allowspecific>
|
| 73 |
<group>offline</group>
|
| 74 |
</meinpaket>
|
| 76 |
<active>1</active>
|
| 77 |
<model>meinpaketcommon/payment_method_allyouneed</model>
|
| 78 |
<order_status>pending</order_status>
|
| 79 |
+
<title>Allyouneed</title>
|
| 80 |
<allowspecific>0</allowspecific>
|
| 81 |
<group>offline</group>
|
| 82 |
</allyouneed>
|
app/code/community/Dhl/Postpay/Model/Cart.php
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
<?php
|
| 2 |
class Dhl_Postpay_Model_Cart extends Mage_Core_Model_Abstract {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
/**
|
| 4 |
* (non-PHPdoc)
|
| 5 |
*
|
| 1 |
<?php
|
| 2 |
class Dhl_Postpay_Model_Cart extends Mage_Core_Model_Abstract {
|
| 3 |
+
const STATE_PENDING = 'PENDING';
|
| 4 |
+
const STATE_CREATEDORDER = 'CREATEDORDER';
|
| 5 |
+
const STATE_CANCELED = 'CANCELED';
|
| 6 |
+
|
| 7 |
/**
|
| 8 |
* (non-PHPdoc)
|
| 9 |
*
|
app/code/community/Dhl/Postpay/Model/Cron.php
CHANGED
|
@@ -18,7 +18,7 @@ class Dhl_Postpay_Model_Cron {
|
|
| 18 |
*
|
| 19 |
* @return NULL
|
| 20 |
*/
|
| 21 |
-
public function
|
| 22 |
try {
|
| 23 |
return Mage::getSingleton ( 'postpay/service_order_importService' )->importOrders ();
|
| 24 |
} catch ( Exception $e ) {
|
| 18 |
*
|
| 19 |
* @return NULL
|
| 20 |
*/
|
| 21 |
+
public function cartStatus() {
|
| 22 |
try {
|
| 23 |
return Mage::getSingleton ( 'postpay/service_order_importService' )->importOrders ();
|
| 24 |
} catch ( Exception $e ) {
|
app/code/community/Dhl/Postpay/Model/Payment/Method/Standard.php
CHANGED
|
@@ -61,6 +61,7 @@ class Dhl_Postpay_Model_Payment_Method_Standard extends Mage_Payment_Model_Metho
|
|
| 61 |
*/
|
| 62 |
protected $_canUseForMultishipping = false;
|
| 63 |
|
|
|
|
| 64 |
/**
|
| 65 |
* Can save credit card information for future processing?
|
| 66 |
*/
|
| 61 |
*/
|
| 62 |
protected $_canUseForMultishipping = false;
|
| 63 |
|
| 64 |
+
|
| 65 |
/**
|
| 66 |
* Can save credit card information for future processing?
|
| 67 |
*/
|
app/code/community/Dhl/Postpay/Model/Service/Order/ImportService.php
CHANGED
|
@@ -35,31 +35,28 @@ class Dhl_Postpay_Model_Service_Order_ImportService extends Dhl_MeinPaketCommon_
|
|
| 35 |
* @return void
|
| 36 |
*/
|
| 37 |
public function importOrders($start = null, $stop = null) {
|
| 38 |
-
|
| 39 |
-
$client = Mage::getModel ( 'meinpaketcommon/client_xmlOverHttp' );
|
| 40 |
-
|
| 41 |
-
$cartCollection = Mage::getModel ( 'postpay/cart' )->getCollection ()->addFilter ( 'state', 'PENDING' );
|
| 42 |
|
|
|
|
| 43 |
foreach ( $cartCollection as $cart ) {
|
| 44 |
-
$queryRequest = new Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest ();
|
| 45 |
$queryRequest->addShoppingCartStatus ( $cart->getCartId () );
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
$connection->commit ();
|
| 60 |
-
} catch ( Exception $e ) {
|
| 61 |
-
$connection->rollback ();
|
| 62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
}
|
| 65 |
|
|
@@ -75,80 +72,79 @@ class Dhl_Postpay_Model_Service_Order_ImportService extends Dhl_MeinPaketCommon_
|
|
| 75 |
protected function processQueryResponse(Dhl_Postpay_Model_Cart $cart, Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse $queryResult) {
|
| 76 |
$statusResponses = $queryResult->getShoppingCartStatusResponses ();
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
$orderModel =
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
if ($queryRequest->isHasData ()) {
|
| 96 |
-
/* @var $client Dhl_MeinPaketCommon_Model_Client_XmlOverHttp */
|
| 97 |
-
$client = Mage::getModel ( 'meinpaketcommon/client_xmlOverHttp' );
|
| 98 |
-
|
| 99 |
-
$queryResult = $client->send ( $queryRequest );
|
| 100 |
|
| 101 |
-
if ($
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
}
|
| 138 |
}
|
| 139 |
}
|
| 140 |
}
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
$
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
break;
|
| 152 |
}
|
| 153 |
}
|
| 154 |
}
|
| 35 |
* @return void
|
| 36 |
*/
|
| 37 |
public function importOrders($start = null, $stop = null) {
|
| 38 |
+
$cartCollection = Mage::getModel ( 'postpay/cart' )->getCollection ()->addFilter ( 'state', Dhl_Postpay_Model_Cart::STATE_PENDING );
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
$queryRequest = new Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest ();
|
| 41 |
foreach ( $cartCollection as $cart ) {
|
|
|
|
| 42 |
$queryRequest->addShoppingCartStatus ( $cart->getCartId () );
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
if ($queryRequest->isHasData ()) {
|
| 46 |
+
$connection = Mage::getSingleton ( 'core/resource' )->getConnection ( 'core_write' );
|
| 47 |
+
try {
|
| 48 |
+
$connection->beginTransaction ();
|
| 49 |
+
|
| 50 |
+
// Make saves and other actions that affect the database
|
| 51 |
+
$queryResult = $this->client->send ( $queryRequest );
|
| 52 |
+
|
| 53 |
+
if ($queryResult != null && $queryResult instanceof Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse) {
|
| 54 |
+
$this->processQueryResponse ( $cart, $queryResult );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
+
|
| 57 |
+
$connection->commit ();
|
| 58 |
+
} catch ( Exception $e ) {
|
| 59 |
+
$connection->rollback ();
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 72 |
protected function processQueryResponse(Dhl_Postpay_Model_Cart $cart, Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse $queryResult) {
|
| 73 |
$statusResponses = $queryResult->getShoppingCartStatusResponses ();
|
| 74 |
|
| 75 |
+
foreach ( $statusResponses as $key => $status ) {
|
| 76 |
+
$status = strtoupper ( $status );
|
| 77 |
+
|
| 78 |
+
if ($status == Dhl_Postpay_Model_Cart::STATE_PENDING ) {
|
| 79 |
+
continue;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
$orderModel = null;
|
| 83 |
+
/* @var $orderModel Mage_Sales_Model_Order */
|
| 84 |
+
if ($cart->getOrderId () != null) {
|
| 85 |
+
$orderModel = Mage::getModel ( 'sales/order' )->load ( $cart->getOrderId () );
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
switch ($status) {
|
| 89 |
+
case Dhl_Postpay_Model_Cart::STATE_CREATEDORDER :
|
| 90 |
+
$createdOrderRequest = new Dhl_MeinPaketCommon_Model_Xml_Request_QueryRequest ();
|
| 91 |
+
$createdOrderRequest->addOrderExternalId ( $cart->getCartId () );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
+
if ($createdOrderRequest->isHasData ()) {
|
| 94 |
+
$createdOrderResult = $this->client->send ( $createdOrderRequest );
|
| 95 |
+
|
| 96 |
+
if ($createdOrderResult != null && $createdOrderResult instanceof Dhl_MeinPaketCommon_Model_Xml_Response_QueryResponse) {
|
| 97 |
+
foreach ( $createdOrderResult->getOrders () as $order ) {
|
| 98 |
+
/* @var $order Dhl_MeinPaketCommon_Model_Xml_Response_Partial_Order */
|
| 99 |
+
if ($orderModel != null && $orderModel->getId ()) {
|
| 100 |
+
$this->_orderCount ['imported'] ++;
|
| 101 |
+
$orderModel->setData ( 'dhl_mein_paket_order_id', $order->getOrderId () );
|
| 102 |
+
$this->createInvoice ( $orderModel );
|
| 103 |
+
|
| 104 |
+
$cart->setState ( $status );
|
| 105 |
+
$cart->save ();
|
| 106 |
+
} else {
|
| 107 |
+
$successCode = $this->_importOrder ( $order, self::POSTPAY_IMPORT_PAYMENT_METHOD );
|
| 108 |
+
|
| 109 |
+
switch ($successCode) {
|
| 110 |
+
case self::IMPORTED_ORDER_STATUS :
|
| 111 |
+
$this->_orderCount ['imported'] ++;
|
| 112 |
+
|
| 113 |
+
$cart->setState ( $status );
|
| 114 |
+
$cart->save ();
|
| 115 |
+
|
| 116 |
+
break;
|
| 117 |
+
case self::DUPLICATE_ORDER_STATUS :
|
| 118 |
+
$this->_orderCount ['duplicates'] ++;
|
| 119 |
+
|
| 120 |
+
$cart->setState ( $status );
|
| 121 |
+
$cart->save ();
|
| 122 |
+
|
| 123 |
+
break;
|
| 124 |
+
case self::OUT_OF_STOCK_ORDER_STATUS :
|
| 125 |
+
$this->_orderCount ['outOfStock'] ++;
|
| 126 |
+
break;
|
| 127 |
+
case self::INVALID_PRODUCT_STATUS :
|
| 128 |
+
$this->_orderCount ['invalid'] ++;
|
| 129 |
+
break;
|
| 130 |
+
case self::DISABLED_ORDER_STATUS :
|
| 131 |
+
$this->_orderCount ['disabled'] ++;
|
| 132 |
+
break;
|
| 133 |
+
}
|
| 134 |
}
|
| 135 |
}
|
| 136 |
}
|
| 137 |
}
|
| 138 |
+
break;
|
| 139 |
+
case Dhl_Postpay_Model_Cart::STATE_CANCELED :
|
| 140 |
+
if ($orderModel != null) {
|
| 141 |
+
$orderModel->cancel ();
|
| 142 |
+
$orderModel->save ();
|
| 143 |
+
}
|
| 144 |
+
$cart->setState ( $status );
|
| 145 |
+
$cart->save ();
|
| 146 |
+
break;
|
| 147 |
+
}
|
|
|
|
| 148 |
}
|
| 149 |
}
|
| 150 |
}
|
app/code/community/Dhl/Postpay/controllers/NotificationController.php
CHANGED
|
@@ -1,17 +1,24 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
public function pushAction() {
|
| 4 |
// externalCartId=[CartId]&ordered=[ordered]&status=[Status]¬ificationId=[notificationId]
|
| 5 |
-
$cart =
|
| 6 |
|
| 7 |
-
if (! $cart->getId ()
|
| 8 |
return;
|
| 9 |
}
|
| 10 |
|
| 11 |
$order = Mage::getModel ( 'sales/order' )->load ( $cart->getOrderId () );
|
| 12 |
/* @var $order Mage_Sales_Model_Order */
|
| 13 |
|
| 14 |
-
if ($order && $order->getPayment ()->getMethodInstance ()->getCode () == 'postpay' && $order->getPayment ()->getMethodInstance ()->getInfoInstance ()->getData ( 'postpay_order_id' ) == $this->getRequest ()->getParam ( 'orderId' ) && $order->getPayment ()->getMethodInstance ()->getInfoInstance ()->getData ( 'postpay_notification_id' ) == $this->getRequest ()->getParam ( 'notificationId' )) {
|
| 15 |
$status = $this->getRequest ()->getParam ( 'status', 'Pending' );
|
| 16 |
$order->getPayment ()->getMethodInstance ()->getInfoInstance ()->setData ( 'postpay_status', $status );
|
| 17 |
|
| 1 |
<?php
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* Controller for notifications.
|
| 5 |
+
*/
|
| 6 |
+
class Dhl_Postpay_NotificationController extends Mage_Core_Controller_Front_Action {
|
| 7 |
+
/**
|
| 8 |
+
* Push notification
|
| 9 |
+
*/
|
| 10 |
public function pushAction() {
|
| 11 |
// externalCartId=[CartId]&ordered=[ordered]&status=[Status]¬ificationId=[notificationId]
|
| 12 |
+
$cart = Mage::getModel ( 'postpay/cart' )->load ( $this->getRequest ()->getParam ( 'externalCartId' ) );
|
| 13 |
|
| 14 |
+
if (! $cart || ! $cart->getId () || $cart->getOrderId () == null) {
|
| 15 |
return;
|
| 16 |
}
|
| 17 |
|
| 18 |
$order = Mage::getModel ( 'sales/order' )->load ( $cart->getOrderId () );
|
| 19 |
/* @var $order Mage_Sales_Model_Order */
|
| 20 |
|
| 21 |
+
if ($order && $order->getId () && $order->getPayment ()->getMethodInstance ()->getCode () == 'postpay' && $order->getPayment ()->getMethodInstance ()->getInfoInstance ()->getData ( 'postpay_order_id' ) == $this->getRequest ()->getParam ( 'orderId' ) && $order->getPayment ()->getMethodInstance ()->getInfoInstance ()->getData ( 'postpay_notification_id' ) == $this->getRequest ()->getParam ( 'notificationId' )) {
|
| 22 |
$status = $this->getRequest ()->getParam ( 'status', 'Pending' );
|
| 23 |
$order->getPayment ()->getMethodInstance ()->getInfoInstance ()->setData ( 'postpay_status', $status );
|
| 24 |
|
app/code/community/Dhl/Postpay/controllers/ResponseController.php
CHANGED
|
@@ -2,11 +2,7 @@
|
|
| 2 |
class Dhl_Postpay_ResponseController extends Mage_Core_Controller_Front_Action {
|
| 3 |
|
| 4 |
/**
|
| 5 |
-
* When
|
| 6 |
-
* The order information at this point is in POST
|
| 7 |
-
* variables.
|
| 8 |
-
* However, you don't want to "process" the order until you
|
| 9 |
-
* get validation from the api.
|
| 10 |
*/
|
| 11 |
public function successAction() {
|
| 12 |
Mage::log ( 'Called custom ' . __METHOD__ );
|
| 2 |
class Dhl_Postpay_ResponseController extends Mage_Core_Controller_Front_Action {
|
| 3 |
|
| 4 |
/**
|
| 5 |
+
* When postpay returns.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
*/
|
| 7 |
public function successAction() {
|
| 8 |
Mage::log ( 'Called custom ' . __METHOD__ );
|
app/code/community/Dhl/Postpay/etc/config.xml
CHANGED
|
@@ -2,18 +2,18 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_Postpay>
|
| 5 |
-
<version>1.
|
| 6 |
</Dhl_Postpay>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
-
<
|
| 11 |
-
<use>admin</use>
|
| 12 |
<args>
|
| 13 |
-
<
|
| 14 |
-
|
|
|
|
| 15 |
</args>
|
| 16 |
-
</
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Dhl_Postpay>
|
| 5 |
+
<version>1.3.0</version>
|
| 6 |
</Dhl_Postpay>
|
| 7 |
</modules>
|
| 8 |
<admin>
|
| 9 |
<routers>
|
| 10 |
+
<adminhtml>
|
|
|
|
| 11 |
<args>
|
| 12 |
+
<modules>
|
| 13 |
+
<Dhl_Postpay after="Mage_Adminhtml">Dhl_Postpay_Adminhtml</Dhl_Postpay>
|
| 14 |
+
</modules>
|
| 15 |
</args>
|
| 16 |
+
</adminhtml>
|
| 17 |
</routers>
|
| 18 |
</admin>
|
| 19 |
<adminhtml>
|
app/code/community/Dhl/Postpay/etc/system.xml
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
<sort_order>999</sort_order>
|
| 9 |
<show_in_default>1</show_in_default>
|
| 10 |
<show_in_website>1</show_in_website>
|
| 11 |
-
<show_in_store>
|
| 12 |
<fields>
|
| 13 |
<active translate="label">
|
| 14 |
<label>Enabled</label>
|
|
@@ -17,16 +17,16 @@
|
|
| 17 |
<sort_order>1</sort_order>
|
| 18 |
<show_in_default>1</show_in_default>
|
| 19 |
<show_in_website>1</show_in_website>
|
| 20 |
-
<show_in_store>
|
| 21 |
</active>
|
| 22 |
<order_status translate="label">
|
| 23 |
<label>New order status</label>
|
| 24 |
<frontend_type>select</frontend_type>
|
| 25 |
-
<source_model>adminhtml/
|
| 26 |
<sort_order>2</sort_order>
|
| 27 |
<show_in_default>1</show_in_default>
|
| 28 |
<show_in_website>1</show_in_website>
|
| 29 |
-
<show_in_store>
|
| 30 |
</order_status>
|
| 31 |
<title translate="label">
|
| 32 |
<label>Title</label>
|
|
@@ -34,18 +34,28 @@
|
|
| 34 |
<sort_order>3</sort_order>
|
| 35 |
<show_in_default>1</show_in_default>
|
| 36 |
<show_in_website>1</show_in_website>
|
| 37 |
-
<show_in_store>
|
| 38 |
</title>
|
| 39 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
<label>Send Customer Address</label>
|
| 41 |
<comment><![CDATA[Send Customer Address to POSTPAY]]></comment>
|
| 42 |
<frontend_type>select</frontend_type>
|
| 43 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 44 |
<sort_order>30</sort_order>
|
| 45 |
<show_in_default>1</show_in_default>
|
| 46 |
-
<show_in_website>
|
| 47 |
-
<show_in_store>
|
| 48 |
-
|
|
|
|
| 49 |
</fields>
|
| 50 |
</postpay_standard>
|
| 51 |
<postpay_express translate="label" module="postpay">
|
|
@@ -62,16 +72,16 @@
|
|
| 62 |
<sort_order>1</sort_order>
|
| 63 |
<show_in_default>1</show_in_default>
|
| 64 |
<show_in_website>1</show_in_website>
|
| 65 |
-
<show_in_store>
|
| 66 |
</active>
|
| 67 |
<order_status translate="label">
|
| 68 |
<label>New order status</label>
|
| 69 |
<frontend_type>select</frontend_type>
|
| 70 |
-
<source_model>adminhtml/
|
| 71 |
<sort_order>2</sort_order>
|
| 72 |
<show_in_default>1</show_in_default>
|
| 73 |
<show_in_website>1</show_in_website>
|
| 74 |
-
<show_in_store>
|
| 75 |
</order_status>
|
| 76 |
<title translate="label">
|
| 77 |
<label>Title</label>
|
|
@@ -79,22 +89,31 @@
|
|
| 79 |
<sort_order>3</sort_order>
|
| 80 |
<show_in_default>1</show_in_default>
|
| 81 |
<show_in_website>1</show_in_website>
|
| 82 |
-
<show_in_store>
|
| 83 |
</title>
|
| 84 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
<label>Send Customer Address</label>
|
| 86 |
<comment><![CDATA[Send Customer Address to POSTPAY]]></comment>
|
| 87 |
<frontend_type>select</frontend_type>
|
| 88 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 89 |
<sort_order>30</sort_order>
|
| 90 |
<show_in_default>1</show_in_default>
|
| 91 |
-
<show_in_website>
|
| 92 |
-
<show_in_store>
|
| 93 |
-
|
|
|
|
| 94 |
</fields>
|
| 95 |
</postpay_express>
|
| 96 |
</groups>
|
| 97 |
</payment>
|
| 98 |
</sections>
|
| 99 |
</config>
|
| 100 |
-
|
| 8 |
<sort_order>999</sort_order>
|
| 9 |
<show_in_default>1</show_in_default>
|
| 10 |
<show_in_website>1</show_in_website>
|
| 11 |
+
<show_in_store>1</show_in_store>
|
| 12 |
<fields>
|
| 13 |
<active translate="label">
|
| 14 |
<label>Enabled</label>
|
| 17 |
<sort_order>1</sort_order>
|
| 18 |
<show_in_default>1</show_in_default>
|
| 19 |
<show_in_website>1</show_in_website>
|
| 20 |
+
<show_in_store>1</show_in_store>
|
| 21 |
</active>
|
| 22 |
<order_status translate="label">
|
| 23 |
<label>New order status</label>
|
| 24 |
<frontend_type>select</frontend_type>
|
| 25 |
+
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
| 26 |
<sort_order>2</sort_order>
|
| 27 |
<show_in_default>1</show_in_default>
|
| 28 |
<show_in_website>1</show_in_website>
|
| 29 |
+
<show_in_store>1</show_in_store>
|
| 30 |
</order_status>
|
| 31 |
<title translate="label">
|
| 32 |
<label>Title</label>
|
| 34 |
<sort_order>3</sort_order>
|
| 35 |
<show_in_default>1</show_in_default>
|
| 36 |
<show_in_website>1</show_in_website>
|
| 37 |
+
<show_in_store>1</show_in_store>
|
| 38 |
</title>
|
| 39 |
+
<sort_order translate="label">
|
| 40 |
+
<label>Sort Order</label>
|
| 41 |
+
<frontend_type>text</frontend_type>
|
| 42 |
+
<sort_order>4</sort_order>
|
| 43 |
+
<show_in_default>1</show_in_default>
|
| 44 |
+
<show_in_website>1</show_in_website>
|
| 45 |
+
<show_in_store>1</show_in_store>
|
| 46 |
+
</sort_order>
|
| 47 |
+
<!--
|
| 48 |
+
<address translate="label comment">
|
| 49 |
<label>Send Customer Address</label>
|
| 50 |
<comment><![CDATA[Send Customer Address to POSTPAY]]></comment>
|
| 51 |
<frontend_type>select</frontend_type>
|
| 52 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 53 |
<sort_order>30</sort_order>
|
| 54 |
<show_in_default>1</show_in_default>
|
| 55 |
+
<show_in_website>1</show_in_website>
|
| 56 |
+
<show_in_store>1</show_in_store>
|
| 57 |
+
</address>
|
| 58 |
+
-->
|
| 59 |
</fields>
|
| 60 |
</postpay_standard>
|
| 61 |
<postpay_express translate="label" module="postpay">
|
| 72 |
<sort_order>1</sort_order>
|
| 73 |
<show_in_default>1</show_in_default>
|
| 74 |
<show_in_website>1</show_in_website>
|
| 75 |
+
<show_in_store>1</show_in_store>
|
| 76 |
</active>
|
| 77 |
<order_status translate="label">
|
| 78 |
<label>New order status</label>
|
| 79 |
<frontend_type>select</frontend_type>
|
| 80 |
+
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
| 81 |
<sort_order>2</sort_order>
|
| 82 |
<show_in_default>1</show_in_default>
|
| 83 |
<show_in_website>1</show_in_website>
|
| 84 |
+
<show_in_store>1</show_in_store>
|
| 85 |
</order_status>
|
| 86 |
<title translate="label">
|
| 87 |
<label>Title</label>
|
| 89 |
<sort_order>3</sort_order>
|
| 90 |
<show_in_default>1</show_in_default>
|
| 91 |
<show_in_website>1</show_in_website>
|
| 92 |
+
<show_in_store>1</show_in_store>
|
| 93 |
</title>
|
| 94 |
+
<sort_order translate="label">
|
| 95 |
+
<label>Sort Order</label>
|
| 96 |
+
<frontend_type>text</frontend_type>
|
| 97 |
+
<sort_order>4</sort_order>
|
| 98 |
+
<show_in_default>1</show_in_default>
|
| 99 |
+
<show_in_website>1</show_in_website>
|
| 100 |
+
<show_in_store>1</show_in_store>
|
| 101 |
+
</sort_order>
|
| 102 |
+
<!--
|
| 103 |
+
<address translate="label comment">
|
| 104 |
<label>Send Customer Address</label>
|
| 105 |
<comment><![CDATA[Send Customer Address to POSTPAY]]></comment>
|
| 106 |
<frontend_type>select</frontend_type>
|
| 107 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 108 |
<sort_order>30</sort_order>
|
| 109 |
<show_in_default>1</show_in_default>
|
| 110 |
+
<show_in_website>1</show_in_website>
|
| 111 |
+
<show_in_store>1</show_in_store>
|
| 112 |
+
</address>
|
| 113 |
+
-->
|
| 114 |
</fields>
|
| 115 |
</postpay_express>
|
| 116 |
</groups>
|
| 117 |
</payment>
|
| 118 |
</sections>
|
| 119 |
</config>
|
|
|
app/design/adminhtml/default/default/layout/meinpaket.xml
CHANGED
|
@@ -1,42 +1,42 @@
|
|
| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
-
<
|
| 4 |
<update handle="meinpaket_head_imports" />
|
| 5 |
<reference name="content">
|
| 6 |
<block type="meinpaket/adminhtml_categoryImport_index" name="meinpaket.adminhtml_categoryImport_index"
|
| 7 |
template="meinpaket/category/import/index.phtml" />
|
| 8 |
</reference>
|
| 9 |
-
</
|
| 10 |
|
| 11 |
-
<
|
| 12 |
<update handle="meinpaket_head_imports" />
|
| 13 |
<reference name="content">
|
| 14 |
<block type="meinpaket/adminhtml_categoryImport_index" name="meinpaket.adminhtml_categoryImport_import"
|
| 15 |
template="meinpaket/category/import/import.phtml" />
|
| 16 |
</reference>
|
| 17 |
-
</
|
| 18 |
|
| 19 |
-
<
|
| 20 |
<update handle="meinpaket_head_imports" />
|
| 21 |
<reference name="content">
|
| 22 |
<block type="meinpaket/adminhtml_backlog_product" name="meinpaket_admin_backlog_grid" />
|
| 23 |
</reference>
|
| 24 |
-
</
|
| 25 |
|
| 26 |
-
<
|
| 27 |
<update handle="meinpaket_head_imports" />
|
| 28 |
<block type="core/text_list" name="root" output="toHtml">
|
| 29 |
<block type="meinpaket/adminhtml_catalog_product_matching_result" name="catalog.product.matching.result"
|
| 30 |
template="meinpaket/catalog/product/matching/result.phtml" />
|
| 31 |
</block>
|
| 32 |
-
</
|
| 33 |
|
| 34 |
-
<
|
| 35 |
<update handle="meinpaket_head_imports" />
|
| 36 |
<reference name="content">
|
| 37 |
<block type="meinpaket/adminhtml_bestPrice" name="meinpaket_admin_bestPrice_grid" />
|
| 38 |
</reference>
|
| 39 |
-
</
|
| 40 |
|
| 41 |
<adminhtml_catalog_product_edit>
|
| 42 |
<update handle="meinpaket_head_imports" />
|
| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<layout version="0.1.0">
|
| 3 |
+
<adminhtml_meinpaket_categoryimport_index>
|
| 4 |
<update handle="meinpaket_head_imports" />
|
| 5 |
<reference name="content">
|
| 6 |
<block type="meinpaket/adminhtml_categoryImport_index" name="meinpaket.adminhtml_categoryImport_index"
|
| 7 |
template="meinpaket/category/import/index.phtml" />
|
| 8 |
</reference>
|
| 9 |
+
</adminhtml_meinpaket_categoryimport_index>
|
| 10 |
|
| 11 |
+
<adminhtml_meinpaket_categoryimport_import>
|
| 12 |
<update handle="meinpaket_head_imports" />
|
| 13 |
<reference name="content">
|
| 14 |
<block type="meinpaket/adminhtml_categoryImport_index" name="meinpaket.adminhtml_categoryImport_import"
|
| 15 |
template="meinpaket/category/import/import.phtml" />
|
| 16 |
</reference>
|
| 17 |
+
</adminhtml_meinpaket_categoryimport_import>
|
| 18 |
|
| 19 |
+
<adminhtml_meinpaket_backlog_product_index>
|
| 20 |
<update handle="meinpaket_head_imports" />
|
| 21 |
<reference name="content">
|
| 22 |
<block type="meinpaket/adminhtml_backlog_product" name="meinpaket_admin_backlog_grid" />
|
| 23 |
</reference>
|
| 24 |
+
</adminhtml_meinpaket_backlog_product_index>
|
| 25 |
|
| 26 |
+
<adminhtml_meinpaket_matching_index>
|
| 27 |
<update handle="meinpaket_head_imports" />
|
| 28 |
<block type="core/text_list" name="root" output="toHtml">
|
| 29 |
<block type="meinpaket/adminhtml_catalog_product_matching_result" name="catalog.product.matching.result"
|
| 30 |
template="meinpaket/catalog/product/matching/result.phtml" />
|
| 31 |
</block>
|
| 32 |
+
</adminhtml_meinpaket_matching_index>
|
| 33 |
|
| 34 |
+
<adminhtml_meinpaket_bestprice_index translate="label" module="meinpaket">
|
| 35 |
<update handle="meinpaket_head_imports" />
|
| 36 |
<reference name="content">
|
| 37 |
<block type="meinpaket/adminhtml_bestPrice" name="meinpaket_admin_bestPrice_grid" />
|
| 38 |
</reference>
|
| 39 |
+
</adminhtml_meinpaket_bestprice_index>
|
| 40 |
|
| 41 |
<adminhtml_catalog_product_edit>
|
| 42 |
<update handle="meinpaket_head_imports" />
|
app/design/adminhtml/default/default/layout/meinpaketcommon.xml
CHANGED
|
@@ -15,21 +15,21 @@
|
|
| 15 |
</reference>
|
| 16 |
</meinpaket_head_imports>
|
| 17 |
|
| 18 |
-
<
|
| 19 |
module="meinpaketcommon">
|
| 20 |
<update handle="meinpaket_head_imports" />
|
| 21 |
<reference name="content">
|
| 22 |
<block type="meinpaketcommon/adminhtml_log" name="meinpaketcommon_admin_log_grid" />
|
| 23 |
</reference>
|
| 24 |
-
</
|
| 25 |
|
| 26 |
-
<
|
| 27 |
module="meinpaketcommon">
|
| 28 |
<update handle="meinpaket_head_imports" />
|
| 29 |
<reference name="content">
|
| 30 |
<block type="meinpaketcommon/adminhtml_async" name="meinpaket_admin_async_grid" />
|
| 31 |
</reference>
|
| 32 |
-
</
|
| 33 |
|
| 34 |
<adminhtml_system_config_edit>
|
| 35 |
<update handle="meinpaket_head_imports" />
|
| 15 |
</reference>
|
| 16 |
</meinpaket_head_imports>
|
| 17 |
|
| 18 |
+
<adminhtml_meinpaketcommon_log_index translate="label"
|
| 19 |
module="meinpaketcommon">
|
| 20 |
<update handle="meinpaket_head_imports" />
|
| 21 |
<reference name="content">
|
| 22 |
<block type="meinpaketcommon/adminhtml_log" name="meinpaketcommon_admin_log_grid" />
|
| 23 |
</reference>
|
| 24 |
+
</adminhtml_meinpaketcommon_log_index>
|
| 25 |
|
| 26 |
+
<adminhtml_meinpaketcommon_async_index translate="label"
|
| 27 |
module="meinpaketcommon">
|
| 28 |
<update handle="meinpaket_head_imports" />
|
| 29 |
<reference name="content">
|
| 30 |
<block type="meinpaketcommon/adminhtml_async" name="meinpaket_admin_async_grid" />
|
| 31 |
</reference>
|
| 32 |
+
</adminhtml_meinpaketcommon_async_index>
|
| 33 |
|
| 34 |
<adminhtml_system_config_edit>
|
| 35 |
<update handle="meinpaket_head_imports" />
|
app/design/adminhtml/default/default/template/meinpaket/catalog/product/matching/result.phtml
CHANGED
|
@@ -40,7 +40,7 @@
|
|
| 40 |
<td class="cell-assign a-center last">
|
| 41 |
<?php if (true || strlen($suggestion->getMarketplaceCategory())):?>
|
| 42 |
<a
|
| 43 |
-
href="<?php echo $this->getUrl('
|
| 44 |
<?php echo $this->__('Apply'); ?>
|
| 45 |
</a>
|
| 46 |
<?php endif;?>
|
| 40 |
<td class="cell-assign a-center last">
|
| 41 |
<?php if (true || strlen($suggestion->getMarketplaceCategory())):?>
|
| 42 |
<a
|
| 43 |
+
href="<?php echo $this->getUrl('adminhtml/meinpaket_matching/apply', array('id' => Mage::registry('current_product')->getId(), 'category' => $suggestion->getMarketplaceCategory())); ?>">
|
| 44 |
<?php echo $this->__('Apply'); ?>
|
| 45 |
</a>
|
| 46 |
<?php endif;?>
|
app/design/adminhtml/default/default/template/meinpaket/catalog/product/matching/tab.phtml
CHANGED
|
@@ -39,7 +39,7 @@
|
|
| 39 |
</div>
|
| 40 |
|
| 41 |
<script type="text/javascript">
|
| 42 |
-
var mp_url = '<?php echo $this->getUrl('
|
| 43 |
var mp_productId = <?php echo Mage::registry("current_product")->getId();?>;
|
| 44 |
|
| 45 |
function loadSuggestions() {
|
| 39 |
</div>
|
| 40 |
|
| 41 |
<script type="text/javascript">
|
| 42 |
+
var mp_url = '<?php echo $this->getUrl('adminhtml/meinpaket_matching/index') ?>';
|
| 43 |
var mp_productId = <?php echo Mage::registry("current_product")->getId();?>;
|
| 44 |
|
| 45 |
function loadSuggestions() {
|
app/design/adminhtml/default/default/template/meinpaket/category/import/import.phtml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
-
/* @var $this Dhl_MeinPaket_Block_Adminhtml_CategoryImport_Import */
|
| 3 |
-
|
| 4 |
-
|
| 5 |
?>
|
| 6 |
<div class="content-header">
|
| 7 |
<table class="grid-header">
|
|
@@ -9,7 +9,7 @@
|
|
| 9 |
<td><h3 class="icon-head allyouneed"><?php echo __('Import Categories'); ?></h3></td>
|
| 10 |
<td class="a-right">
|
| 11 |
<button
|
| 12 |
-
onclick="setLocation('<?php echo $this->getUrl('
|
| 13 |
class="scalable back" type="button">
|
| 14 |
<span><?php echo $this->__('start again'); ?></span>
|
| 15 |
</button>
|
|
@@ -94,7 +94,7 @@
|
|
| 94 |
<th class="header-center">#</th>
|
| 95 |
<th class="col-product" colspan="2"><?php echo __('Category'); ?></th>
|
| 96 |
<th><?php echo __('Category Code'); ?></th>
|
| 97 |
-
|
| 98 |
<?php
|
| 99 |
$deletedCategories = $result->getDeletedCategories ();
|
| 100 |
$currentIndex = 0;
|
| 1 |
<?php
|
| 2 |
+
/* @var $this Dhl_MeinPaket_Block_Adminhtml_CategoryImport_Import */
|
| 3 |
+
/* @var $result Dhl_MeinPaket_Model_Service_MarketplaceCategoryImport_Result */
|
| 4 |
+
$result = $this->getResult ();
|
| 5 |
?>
|
| 6 |
<div class="content-header">
|
| 7 |
<table class="grid-header">
|
| 9 |
<td><h3 class="icon-head allyouneed"><?php echo __('Import Categories'); ?></h3></td>
|
| 10 |
<td class="a-right">
|
| 11 |
<button
|
| 12 |
+
onclick="setLocation('<?php echo $this->getUrl('adminhtml/meinpaket_categoryImport/index/') ?>')"
|
| 13 |
class="scalable back" type="button">
|
| 14 |
<span><?php echo $this->__('start again'); ?></span>
|
| 15 |
</button>
|
| 94 |
<th class="header-center">#</th>
|
| 95 |
<th class="col-product" colspan="2"><?php echo __('Category'); ?></th>
|
| 96 |
<th><?php echo __('Category Code'); ?></th>
|
| 97 |
+
</tr>
|
| 98 |
<?php
|
| 99 |
$deletedCategories = $result->getDeletedCategories ();
|
| 100 |
$currentIndex = 0;
|
app/design/adminhtml/default/default/template/meinpaket/category/import/index.phtml
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<tr>
|
| 5 |
<td><h3 class="icon-head meinpaket"><?php echo __('Import Categories'); ?></h3></td>
|
| 6 |
<td class="a-right">
|
| 7 |
-
<!-- <button onclick="setLocationWithWait('<?php echo $this->getUrl('
|
| 8 |
<button onclick="startProcessing()" class="scalable" type="button"
|
| 9 |
id="startButton">
|
| 10 |
<span><?php echo $this->__('import categories'); ?></span>
|
|
@@ -28,7 +28,7 @@
|
|
| 28 |
<p><?php echo __('Textual introduction into category import goes here...'); ?></p>
|
| 29 |
|
| 30 |
<form id="allyouneed_form" name="allyouneed_form" method="get"
|
| 31 |
-
action="<?php echo $this->getUrl('
|
| 32 |
<fieldset>
|
| 33 |
<button onclick="startProcessing()" class="scalable" type="button"
|
| 34 |
id="startButton">
|
| 4 |
<tr>
|
| 5 |
<td><h3 class="icon-head meinpaket"><?php echo __('Import Categories'); ?></h3></td>
|
| 6 |
<td class="a-right">
|
| 7 |
+
<!-- <button onclick="setLocationWithWait('<?php echo $this->getUrl('adminhtml/meinpaket_categoryImport/import/') ?>')" class="scalable" type="button"><span><?php echo $this->__('import categories'); ?></span></button> -->
|
| 8 |
<button onclick="startProcessing()" class="scalable" type="button"
|
| 9 |
id="startButton">
|
| 10 |
<span><?php echo $this->__('import categories'); ?></span>
|
| 28 |
<p><?php echo __('Textual introduction into category import goes here...'); ?></p>
|
| 29 |
|
| 30 |
<form id="allyouneed_form" name="allyouneed_form" method="get"
|
| 31 |
+
action="<?php echo $this->getUrl('adminhtml/meinpaket_categoryImport/import/') ?>">
|
| 32 |
<fieldset>
|
| 33 |
<button onclick="startProcessing()" class="scalable" type="button"
|
| 34 |
id="startButton">
|
app/locale/de_DE/Dhl_MeinPaket.csv
CHANGED
|
@@ -7,12 +7,16 @@
|
|
| 7 |
"BestPrice Interval (only Allyouneed)","BestPrice Intervall (nur Allyouneed)"
|
| 8 |
"BestPrice refresh interval.","Intervall für BestPrice Aktualisierung."
|
| 9 |
"best prices","Beste Preise"
|
|
|
|
| 10 |
"Bust Measurement",Brustumfang
|
| 11 |
"Category","Kategorie"
|
|
|
|
|
|
|
| 12 |
"Color","Farbe"
|
| 13 |
"Connecting to Allyouneed server failed.","Die Verbindung zum Allyouneed-Server konnte nicht aufgebaut werden."
|
| 14 |
"Connection to Allyouneed server timed out.","Zeitüberschreitung beim Verbindungsaufbau zu Allyouneed-Server."
|
| 15 |
-
"Count of products transfered during a single cycle","Anzahl der Produkte, die in einem Durchlauf übertragen werden"
|
|
|
|
| 16 |
"Credentials","Zugangsdaten"
|
| 17 |
"Cup","Cup"
|
| 18 |
"Customer (nur Allyouneed)","Kunde (nur Allyouneed)"
|
|
@@ -21,11 +25,13 @@
|
|
| 21 |
"Default customer email","Standard Kunden Email"
|
| 22 |
"Default delivery time","Standard-Lieferzeit"
|
| 23 |
"Default tax rate","Standard-Steuersatz"
|
|
|
|
| 24 |
"Deleted categories","Gelöschte Kategorien"
|
| 25 |
"Deleted %s categories.","Es wurden %s Kategorien gelöscht, die im Allyouneed-Marktplatz nicht mehr verfügbar sind."
|
| 26 |
"Delivery time attribute","Attribut für Lieferzeit"
|
| 27 |
"Delivery time in days if no other delivery time applies","Lieferzeit in Tagen, wenn keine andere Lieferzeit angegeben wird"
|
| 28 |
"Delivery time","Lieferzeit (in Tagen)"
|
|
|
|
| 29 |
"Diameter","Durchmesser"
|
| 30 |
"Dimension","Abmessung"
|
| 31 |
"Disable Postpay using Configuration / Payment Methods / Postpay Standard and Postpay Express.","Deaktivierung von Postpay unter Konfiguration / Bezahlmethoden / Postpay Standard und Postpay Express."
|
|
@@ -33,6 +39,8 @@
|
|
| 33 |
"Error","Fehler"
|
| 34 |
"Flavor","Geschmacksrichtung"
|
| 35 |
"Format","Format"
|
|
|
|
|
|
|
| 36 |
"Import Categories","Allyouneed Kategorien importieren"
|
| 37 |
"import categories","Kategorien importieren"
|
| 38 |
"Inscription","Beschriftung"
|
|
@@ -40,12 +48,15 @@
|
|
| 40 |
"Invalid modification of element","Unerlaubte Modifikation des Elementes"
|
| 41 |
"Invalid response from Allyouneed server.","Ungültige Antwort von Allyouneed-Server erhalten."
|
| 42 |
"Invalid value for field","Ungültiger Wert für Feld"
|
|
|
|
| 43 |
"Length","Länge"
|
|
|
|
| 44 |
"Marketplace category structure was up to date. There have been no changes.","Markplatz-Kategoriestruktur ist auf dem neuesten Stand."
|
| 45 |
"Material","Material"
|
| 46 |
"Missing value for field","Fehlender Wert für Feld"
|
| 47 |
"Model","Modell"
|
| 48 |
"New categories","Neue Kategorien"
|
|
|
|
| 49 |
"Overview","Übersicht"
|
| 50 |
"Platform","Plattform"
|
| 51 |
"Please select the product attribute which represents the approx. delivery time","Bitte wählen Sie die Produkteigenschaft, welche die Lieferzeit angibt."
|
|
@@ -64,10 +75,15 @@
|
|
| 64 |
"Reduced tax rate","Reduzierter Steuersatz"
|
| 65 |
"Renamed %s categories.","Es wurden %s Kategorien umbenannt."
|
| 66 |
"Result","Ergebnis"
|
|
|
|
| 67 |
"Size","Größe"
|
|
|
|
| 68 |
"%s of %s products were successfully exported","%s von %s Produkten wurden erfolgreich exportiert"
|
|
|
|
| 69 |
"start again","nochmal starten"
|
| 70 |
"Strength","Stärke"
|
|
|
|
|
|
|
| 71 |
"Successfully imported marketplace categories.","Die Marktplatz-Kategorien wurden erfolgreich mit Allyouneed abgeglichen."
|
| 72 |
"Tax rates (nur Allyouneed)","Steuersätze (nur Allyouneed)"
|
| 73 |
"Tax rates","Steuersätze"
|
|
@@ -82,9 +98,11 @@
|
|
| 82 |
"There were no products that could be exported.","Es konnten keine Produkte exportiert werden."
|
| 83 |
"This eMail address is used as the default one for orders that do not include one.","Diese E-Mail-Adresse wird als Standard-Adresse für Bestellungen verwendet, für die keine Kunden-E-Mail-Adresse geliefert wird."
|
| 84 |
"total","gesamt"
|
|
|
|
| 85 |
"Unknown error","Es ist ein unbekannter Fehler aufgetreten"
|
| 86 |
"Use product special price if available","Verwende den Sonderpreis, wenn ein solcher vorhanden ist"
|
| 87 |
"Use special price if available","Verwende Sonderpreis, wenn vorhanden"
|
| 88 |
"Variant group does not exist on Allyouneed","Die verwendeten Produktattribute sind als Allyouneed-Variantenkonfiguration nicht bekannt."
|
| 89 |
"Width","Breite"
|
|
|
|
| 90 |
"You are not authorized to execute the requested functionality on Allyouneed","Sie sind nicht berechtigt diese Funktionalität der Allyouneed-Plattform zu nutzen"
|
| 7 |
"BestPrice Interval (only Allyouneed)","BestPrice Intervall (nur Allyouneed)"
|
| 8 |
"BestPrice refresh interval.","Intervall für BestPrice Aktualisierung."
|
| 9 |
"best prices","Beste Preise"
|
| 10 |
+
"Brand","Marke"
|
| 11 |
"Bust Measurement",Brustumfang
|
| 12 |
"Category","Kategorie"
|
| 13 |
+
"Collar","Kragenform"
|
| 14 |
+
"Collection","Kollektion"
|
| 15 |
"Color","Farbe"
|
| 16 |
"Connecting to Allyouneed server failed.","Die Verbindung zum Allyouneed-Server konnte nicht aufgebaut werden."
|
| 17 |
"Connection to Allyouneed server timed out.","Zeitüberschreitung beim Verbindungsaufbau zu Allyouneed-Server."
|
| 18 |
+
"Count of products transfered during a single cycle","Anzahl der Produkte, die in einem Durchlauf übertragen werden"
|
| 19 |
+
"Country of Manufacture","Herstellungsland"
|
| 20 |
"Credentials","Zugangsdaten"
|
| 21 |
"Cup","Cup"
|
| 22 |
"Customer (nur Allyouneed)","Kunde (nur Allyouneed)"
|
| 25 |
"Default customer email","Standard Kunden Email"
|
| 26 |
"Default delivery time","Standard-Lieferzeit"
|
| 27 |
"Default tax rate","Standard-Steuersatz"
|
| 28 |
+
"Degree of Grinding","Mahlgrad"
|
| 29 |
"Deleted categories","Gelöschte Kategorien"
|
| 30 |
"Deleted %s categories.","Es wurden %s Kategorien gelöscht, die im Allyouneed-Marktplatz nicht mehr verfügbar sind."
|
| 31 |
"Delivery time attribute","Attribut für Lieferzeit"
|
| 32 |
"Delivery time in days if no other delivery time applies","Lieferzeit in Tagen, wenn keine andere Lieferzeit angegeben wird"
|
| 33 |
"Delivery time","Lieferzeit (in Tagen)"
|
| 34 |
+
"Department","Abteilung"
|
| 35 |
"Diameter","Durchmesser"
|
| 36 |
"Dimension","Abmessung"
|
| 37 |
"Disable Postpay using Configuration / Payment Methods / Postpay Standard and Postpay Express.","Deaktivierung von Postpay unter Konfiguration / Bezahlmethoden / Postpay Standard und Postpay Express."
|
| 39 |
"Error","Fehler"
|
| 40 |
"Flavor","Geschmacksrichtung"
|
| 41 |
"Format","Format"
|
| 42 |
+
"Frame","Fassung"
|
| 43 |
+
"Height","Höhe"
|
| 44 |
"Import Categories","Allyouneed Kategorien importieren"
|
| 45 |
"import categories","Kategorien importieren"
|
| 46 |
"Inscription","Beschriftung"
|
| 48 |
"Invalid modification of element","Unerlaubte Modifikation des Elementes"
|
| 49 |
"Invalid response from Allyouneed server.","Ungültige Antwort von Allyouneed-Server erhalten."
|
| 50 |
"Invalid value for field","Ungültiger Wert für Feld"
|
| 51 |
+
"Language","Sprache"
|
| 52 |
"Length","Länge"
|
| 53 |
+
"Main Material","Hauptmaterial"
|
| 54 |
"Marketplace category structure was up to date. There have been no changes.","Markplatz-Kategoriestruktur ist auf dem neuesten Stand."
|
| 55 |
"Material","Material"
|
| 56 |
"Missing value for field","Fehlender Wert für Feld"
|
| 57 |
"Model","Modell"
|
| 58 |
"New categories","Neue Kategorien"
|
| 59 |
+
"Optics","Optik"
|
| 60 |
"Overview","Übersicht"
|
| 61 |
"Platform","Plattform"
|
| 62 |
"Please select the product attribute which represents the approx. delivery time","Bitte wählen Sie die Produkteigenschaft, welche die Lieferzeit angibt."
|
| 75 |
"Reduced tax rate","Reduzierter Steuersatz"
|
| 76 |
"Renamed %s categories.","Es wurden %s Kategorien umbenannt."
|
| 77 |
"Result","Ergebnis"
|
| 78 |
+
"Sets","Sets"
|
| 79 |
"Size","Größe"
|
| 80 |
+
"Sleeve's Length","Ärmellänge"
|
| 81 |
"%s of %s products were successfully exported","%s von %s Produkten wurden erfolgreich exportiert"
|
| 82 |
+
"Speed Index","Geschwindigkeitsindex"
|
| 83 |
"start again","nochmal starten"
|
| 84 |
"Strength","Stärke"
|
| 85 |
+
"Style","Stil"
|
| 86 |
+
"Subject","Motiv"
|
| 87 |
"Successfully imported marketplace categories.","Die Marktplatz-Kategorien wurden erfolgreich mit Allyouneed abgeglichen."
|
| 88 |
"Tax rates (nur Allyouneed)","Steuersätze (nur Allyouneed)"
|
| 89 |
"Tax rates","Steuersätze"
|
| 98 |
"There were no products that could be exported.","Es konnten keine Produkte exportiert werden."
|
| 99 |
"This eMail address is used as the default one for orders that do not include one.","Diese E-Mail-Adresse wird als Standard-Adresse für Bestellungen verwendet, für die keine Kunden-E-Mail-Adresse geliefert wird."
|
| 100 |
"total","gesamt"
|
| 101 |
+
"Type","Typ"
|
| 102 |
"Unknown error","Es ist ein unbekannter Fehler aufgetreten"
|
| 103 |
"Use product special price if available","Verwende den Sonderpreis, wenn ein solcher vorhanden ist"
|
| 104 |
"Use special price if available","Verwende Sonderpreis, wenn vorhanden"
|
| 105 |
"Variant group does not exist on Allyouneed","Die verwendeten Produktattribute sind als Allyouneed-Variantenkonfiguration nicht bekannt."
|
| 106 |
"Width","Breite"
|
| 107 |
+
"Year","Jahr"
|
| 108 |
"You are not authorized to execute the requested functionality on Allyouneed","Sie sind nicht berechtigt diese Funktionalität der Allyouneed-Plattform zu nutzen"
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>DHL_Allyouneed</name>
|
| 4 |
-
<version>2.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>--</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>The Extension connects your Magento shop with DHL Allyouneed.</description>
|
| 11 |
<notes>--</notes>
|
| 12 |
<authors><author><name>DHL Vertriebs GmbH</name><user>ybmdeutschland</user><email>support@meinpaket.de</email></author></authors>
|
| 13 |
-
<date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir><dir name="Dhl"><dir name="MeinPaket"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Backlog"><dir name="Product"><file name="Grid.php" hash="7541700fffd1811943ce7d1d5f1ecdaf"/></dir><file name="Product.php" hash="d0fa6e92c7a2349cb2ef578eb1dad702"/></dir><dir name="BestPrice"><file name="Grid.php" hash="adb8a1085e086f3d1dc57a489619ff5d"/></dir><file name="BestPrice.php" hash="b4f9912d464830a48fd5154c45b0c040"/><dir name="Catalog"><dir name="Product"><dir name="Matching"><file name="Result.php" hash="135446bcf25b60bb017e29b15881daa8"/><file name="Tab.php" hash="3d5c316f511ca64dfa511f04ac4b4a14"/></dir></dir></dir><dir name="CategoryImport"><file name="Import.php" hash="47f0969b175e1480efe8a97480c169da"/><file name="Index.php" hash="745b3c71e101599fbba7a7fd275362c9"/></dir><file name="LeftMenu.php" hash="b60dea4f9e9a39b663cab89be8e32b97"/><dir name="OrderImport"><file name="Index.php" hash="b45724d6ff1fcda6102b3147f3a66a94"/></dir><dir name="ProductExport"><file name="Export.php" hash="ba11e432eafe4d98693284229bcf16e7"/><file name="Index.php" hash="65cf2306ad93f387f525ec66cec1abee"/><file name="List.php" hash="4a32ced740d35ebb7a10d0fffa782223"/></dir><file name="Steps.php" hash="ffb3f688b43cd0c1f457b89c84e68b7f"/><file name="Version.php" hash="476febd9f5d12ac999bdc7a6d646fe20"/></dir></dir><dir name="Helper"><file name="Attribute.php" hash="36cf44cf54204426e3f50864381a6443"/><file name="Backlog.php" hash="51c08b4ef137799d0e7dbf900543ab3e"/><file name="Cron.php" hash="b320de066adaec731a4ce5d77397a1e8"/><file name="Data.php" hash="da9a067e866242802d77e67b8e319358"/><file name="Order.php" hash="e3dca5761fa8e5e4171a9712b14b5c30"/><file name="Product.php" hash="7cec9f2bcc86efddc8d4e8055fe625ea"/><file name="Shipment.php" hash="c8764cf370aded8e4d3c55e8c218a879"/></dir><dir name="Model"><dir name="Attribute"><file name="Mapping.php" hash="7d8a8d9e18f7c6019ae71a7032061ab7"/></dir><dir name="Backlog"><file name="Product.php" hash="a2d547dcfba28c80819155a73ff5cff4"/></dir><file name="BestPrice.php" hash="b75de965445df6125e115d0d89add52c"/><file name="Category.php" hash="d0f5804e7900915f1c03364b079a7dc5"/><file name="Cron.php" hash="6f418837cc6e452eb8470864f6d4b396"/><dir name="Entity"><dir name="Attribute"><dir name="Frontend"><file name="LabelTranslation.php" hash="7f4b3b49b6e12dadd768aee95e041579"/></dir><dir name="Source"><file name="Carrier.php" hash="65770c58617deb2dce75d8e83e055d79"/><file name="MeinPaketCategory.php" hash="17f784c2d79bfd847dd6472dca661334"/><file name="ProductAttribute.php" hash="aba17fe2a9acb85d0483926c3d5ba9a8"/><file name="ProductSyncMode.php" hash="39db6c156e9100ab59384756ec9ac2c5"/><file name="Taxclass.php" hash="696e7dda6d0bd21eeceb61adc0121cd6"/><file name="Taxrate.php" hash="40bbb2336441fa02916ab992279961e8"/></dir></dir></dir><dir name="Exception"><file name="InvalidDataException.php" hash="dcbfbe06f3d0190d5f4a9f0b47973bf2"/><file name="MissingDataException.php" hash="377d6cc783aa6e8973728a77e1e5b8a9"/></dir><dir name="Mysql4"><dir name="Backlog"><dir name="Product"><file name="Collection.php" hash="2711f602d90e22ea72b773003cf38ef4"/></dir><file name="Product.php" hash="d46057bf2e8b93b32b23653222599316"/></dir><dir name="BestPrice"><file name="Collection.php" hash="fedcad4595269a646ff1c452bed87b00"/></dir><file name="BestPrice.php" hash="79399000e407b6a22489d0dbfedd6f34"/><dir name="Category"><file name="Collection.php" hash="06fd9a509c1ef252c0b75f6acda1b9eb"/></dir><file name="Category.php" hash="449c4f90fe5e797ca587025c63c745c3"/></dir><file name="Observer.php" hash="f24372a506e25cdc15ea96ec4eb0d3a4"/><dir name="Payment"><dir name="Method"><file name="Meinpaket.php" hash="dcb6ac810be4d0bb9e426464be91610d"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="6a8952042b65c89685e24b3b503c0d67"/></dir></dir></dir><dir name="Service"><dir name="MarketplaceCategoryImport"><file name="ImportService.php" hash="bf0c889ce83b0afe084c20f97288370e"/><file name="Result.php" hash="cdebaf351ccd1c7aa285801701d32e7f"/></dir><dir name="Product"><dir name="Export"><dir name="Exception"><file name="InvalidEan.php" hash="bc88e3bc48a8a96e45079054290ae68c"/></dir></dir><file name="Export.php" hash="6981381700d186d943957c49d1e1965e"/></dir><dir name="ProductData"><file name="RequestService.php" hash="381ffeb30499242407bbf88d1eb82141"/></dir><dir name="Result"><file name="Abstract.php" hash="c7d84905431b651779dc1011f246983b"/><file name="Upload.php" hash="4ddf194a126ce18938610f61fcc1260d"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="e6cd11540ebf6bc87f4d949d81285703"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Backlog"><file name="ProductController.php" hash="044e311e2b1f66e67f8f2f7324b26707"/></dir><file name="BestPriceController.php" hash="7c246fb0174072ba7a34476e0b3f4fe9"/><file name="CategoryImportController.php" hash="aa451cc2c30d4f8bb6c65a84dd473236"/><file name="MatchingController.php" hash="ff50f09fb0ca13cf9d4f822fea573d0b"/><file name="ProductExportController.php" hash="3dbe834e4dff03bb3abc2674e022f4e6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0f5199337bb69d97a435e5bbf35943f0"/><file name="config.xml" hash="e590da33738b175c612df862093dcc39"/><file name="system.xml" hash="381fa94cf8cef54db494eea83f26dff1"/></dir><dir name="sql"><dir name="meinpaket_setup"><file name="mysql4-install-1.0.0.php" hash="f517a9fbaa8e58738d67fc146f493496"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="b52cd860cbc35cff0f704a033b296cdf"/><file name="mysql4-upgrade-1.1.0-2.0.0.php" hash="199b74750e105a4e215bb268dceeb897"/><file name="mysql4-upgrade-2.1.0-2.2.0.php" hash="2312e1c6c3d2c254383b0f0e163cd243"/></dir></dir></dir></dir><dir name="Postpay"><dir><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="887b1a63cd09847ba7ab3392bd4f9602"/></dir><file name="Checkout.php" hash="ec8b0f2764d863f03dec0167617510a6"/><dir name="Payment"><dir name="Form"><file name="Standard.php" hash="6aca4f231c317c45ac1556d39639d84f"/></dir><dir name="Info"><file name="Standard.php" hash="45252ddc1f9ebb332ef75efa5f868432"/></dir></dir></dir><dir name="Helper"><file name="Cron.php" hash="c2391d5d085c31f2650655e8acdbfb97"/><file name="Data.php" hash="418df17f5f760dc47bba8bb815d77c58"/></dir><dir name="Model"><file name="Cart.php" hash="e599a64fec791a587552a020b563b426"/><file name="Cron.php" hash="7f563b1e5fabd6534a72ad8239af341d"/><dir name="Mysql4"><dir name="Cart"><file name="Collection.php" hash="3b5150eb69a37a738e3f8494db0f4af1"/></dir><file name="Cart.php" hash="74042698f6fb9f2c7ca054d17f1ff0a2"/></dir><file name="Observer.php" hash="8a9eb2111c0a450e460f10e2b2a721eb"/><dir name="Payment"><dir name="Method"><file name="Express.php" hash="91259cee6e39f7c993a823edbaab4817"/><file name="Standard.php" hash="30d139303e4f80c1ed8c03397666c890"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ac36d5a7a1988eab4dad69efd472c50f"/></dir></dir></dir><dir name="Service"><dir name="Order"><file name="ImportService.php" hash="60c7e7a116d65b2bb3a1e15f03860558"/></dir></dir></dir><dir name="controllers"><file name="CheckoutController.php" hash="7a0801e7c03be05beb8c38004dea1464"/><file name="NotificationController.php" hash="41a608eddf5b891ca0b26b1ef1323691"/><file name="ResponseController.php" hash="79cb81c28fe2460fac0be802a8b598b2"/></dir><dir name="etc"><file name="config.xml" hash="03ec5091a924c490954cbfdb0a8ea8df"/><file name="system.xml" hash="43de1564100406a0cfcf69096f89b41a"/></dir><dir name="sql"><dir name="postpay_setup"><file name="mysql4-install-1.0.0.php" hash="8a5f877376e1df9b1a8bde8d4ce70158"/></dir></dir></dir></dir><dir name="MeinPaketCommon"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Async"><file name="Grid.php" hash="dbf8ebeac3b98728c3cef8785c83c897"/></dir><file name="Async.php" hash="7169a4ea405f54ae1d6da4c56c302fcc"/><dir name="Log"><file name="Grid.php" hash="5d689a4f204c8cade2b6d2a97b1fe0e6"/></dir><file name="Log.php" hash="36a68e5de0cf7dfb87e3b090c05c1e9c"/><file name="Version.php" hash="28defa5c89727f8c3a877affb55d0443"/></dir></dir><dir name="Helper"><file name="Address.php" hash="def05195630f6f98802481d228b4f25e"/><file name="Attribute.php" hash="905db640dbe49889e273aeb7415b2441"/><file name="Cron.php" hash="023eb7080558ebd43af77c1846a44534"/><file name="Data.php" hash="4f97cc684778b9fe75003c71d86192f8"/><file name="Order.php" hash="736798b03eefd167e60854ad2e07792b"/><file name="Product.php" hash="64b549bcf8210028cd6f5af4063c8486"/><file name="Shipment.php" hash="4f62b24147d2998762ca74975e4cc379"/></dir><dir name="Model"><file name="Async.php" hash="3112120abd4ff2773dbcf19dedfd4044"/><dir name="Carrier"><file name="Allyouneed.php" hash="25eaf021d05a89e988c9370f25fd56cf"/><file name="Meinpaket.php" hash="b16814df68414d1fb6e795eadc4d6e83"/></dir><dir name="Client"><file name="BadHttpReturnCodeException.php" hash="3f3d67278be542e42bb882f387c04b67"/><file name="HttpException.php" hash="963bc4b8d30d2996a2a08b4c8aaa6b8f"/><file name="HttpTimeoutException.php" hash="d633742d26c8c5438543c1bbdf5c09bd"/><file name="XmlOverHttp.php" hash="f440d7016304ae65d17f6cdb79fc7c5c"/></dir><file name="Cron.php" hash="35c06419c8aa9c6413f8304fda80c3ff"/><dir name="Entity"><dir name="Attribute"><dir name="Source"><file name="Carrier.php" hash="437c70fc9b4e8fa719bdd19676bbbacf"/></dir></dir></dir><dir name="Exception"><file name="InvalidDataException.php" hash="808caf989c24f1146d47fc610be6e131"/><file name="MissingDataException.php" hash="67a06069dcb66c02235f636b6790a62d"/></dir><file name="Log.php" hash="516fc34067f4573d160100d7a975a66c"/><dir name="Mysql4"><dir name="Async"><file name="Collection.php" hash="d5f6fbe4a4be75181844eddfbbd557cf"/></dir><file name="Async.php" hash="2120d8c0411c8773853cee4c5925467a"/><dir name="Log"><file name="Collection.php" hash="9bba87a636029d675e1ceda42f96dbc4"/></dir><file name="Log.php" hash="a09be611512f4dc95880e6e00dab93ca"/></dir><file name="Observer.php" hash="15812db421a573332a95f35e9acb9be9"/><dir name="Payment"><dir name="Method"><file name="Allyouneed.php" hash="663bf3c0f796e41a36eed0c277c0af42"/><file name="Meinpaket.php" hash="fdbc24e8330ecbb71243e1f4b5b83bc3"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ce3a02f9c90e0a1f04a6202305c72ff4"/></dir></dir></dir><dir name="Service"><file name="Abstract.php" hash="406fb92c370df8e93aaffacbad56937b"/><file name="Async.php" hash="5dba3892bc2b78846f2ca7593385a1bc"/><dir name="Order"><dir name="CancellationService"><file name="Result.php" hash="fd81666a5855ea6b25904e14d498ea20"/></dir><file name="CancellationService.php" hash="a6806a3531b596a729a418688ba51dcc"/><file name="ImportService.php" hash="d8f63edb5939a479b8b5f359b23944b9"/><dir name="RefundExportService"><file name="Result.php" hash="dcfd1f479709368b446041674ee445d8"/></dir><file name="RefundExportService.php" hash="7ab8222a77e76517247f7f710d60b590"/><dir name="ShipmentExportService"><file name="Result.php" hash="0ba713e725c87d0bc82321582e3fe776"/></dir><file name="ShipmentExportService.php" hash="3045ed7ffb7f6a1f4c592e49832577f9"/></dir><dir name="Result"><file name="Abstract.php" hash="c7d84905431b651779dc1011f246983b"/><file name="Upload.php" hash="51438929f66a7efe3541511b6966ea09"/></dir></dir><dir name="System"><file name="MemoryLimiter.php" hash="813d89b8c21834fb911acc8e59be950c"/></dir><dir name="Validation"><file name="ValidationInterface.php" hash="d11950e6d4a7b52e3784867e8d8d2230"/><dir name="Validator"><file name="CDATAContent.php" hash="425678e9cf44efee9d884c20e4db1f14"/><file name="Ean.php" hash="7bab4c07ebcbdf3ce9e087ff20976d1a"/><file name="IntGreaterZero.php" hash="682c11f5cf24cafcef61350194a65be1"/><file name="NonEmptyString.php" hash="7075a72eace8e1f8c5bc5b61a5a25231"/><file name="StringMaxLength.php" hash="c19f729ff39b5b6b438635fe9bd9c6bf"/><file name="Url.php" hash="7b1f83a803fd8788ad4b22aaa982d04f"/></dir><file name="ValidatorChain.php" hash="72148d630805652276c446ebef817f47"/><file name="ValidatorInterface.php" hash="df41d71f7970d758b18bf36c2e49f6f1"/></dir><dir name="Xml"><file name="AbstractXmlPartial.php" hash="303a1e75e4ba719683f09ea9a5cc2743"/><file name="AbstractXmlRequest.php" hash="9a72dc1e6fe6cc1f027d1f339e6bc0f4"/><file name="InvalidXmlException.php" hash="22c021f43b7df35045814cd1ca714968"/><dir name="Request"><file name="AsynchronousStatusRequest.php" hash="4b17665dfef64f23d366f671a06634e3"/><file name="DataRequest.php" hash="c841bd02a2d20c01fa27315397717ba7"/><file name="DownloadRequest.php" hash="05e941a0db71e679d5e3bce00bd5da8d"/><file name="NotificationRequest.php" hash="2902af863aaa33df93cc6e8cfdbf4b8c"/><file name="QueryRequest.php" hash="31746798830da6d1a5909e9f6761e5e1"/><file name="SubmitCartRequest.php" hash="bda8ba8a1662b59e49ddb974219cacf4"/><file name="UploadRequest.php" hash="0f43ff9cb25661ef75609a485f7a4939"/></dir><dir name="Response"><file name="Abstract.php" hash="f7e963bf5586d26347c4d1a6887a4b79"/><file name="AsynchronousStatusResponse.php" hash="6571d1b3093cd73e7eda7ff940df4453"/><file name="DataResponse.php" hash="672c55dd8e770219eac74214726cb5ef"/><file name="DownloadResponse.php" hash="831f43cece257d44fe65d02304362a8c"/><file name="NotificationResponse.php" hash="be7626da7ef2f744f183228110aabbea"/><dir name="Partial"><file name="Address.php" hash="d9ea71d56eb49fe3a512edd412293922"/><file name="Attribute.php" hash="4c27a169c0c773afde7502d6704ee372"/><file name="Category.php" hash="2b040bd3b89121ba28fef0ae07915915"/><file name="CategoryId.php" hash="09f6b3ecf29c4d3a16d37978efd53b4a"/><dir name="DataResponse"><file name="BestPrice.php" hash="e545a040a9201c3c8a71d4b410dcfc4d"/><file name="Confirmation.php" hash="b93b06d18277c10899535d91c1b71829"/><file name="MerchantData.php" hash="f03d2b35691c4356c43251e3c1c1fd20"/><file name="ProductData.php" hash="ab11140f6a0c4556a558d317651db82b"/><file name="QuotaData.php" hash="feb7180ff8c332decc938c1394ab8018"/></dir><dir name="NotificationResponse"><file name="Confirmation.php" hash="62225a96f3c9ce1047afc3f2c04b44ea"/><file name="Consignment.php" hash="20cb98f68cb94033d7abc5cb29ba47a4"/><file name="Credit.php" hash="7dfa1b551c938bbdbcab3e7f5ca4a86e"/><file name="Return.php" hash="d2538c678241727e3fe996d800da75b1"/></dir><dir name="Order"><file name="ContactData.php" hash="27cd1f6a5f8125352f3c383ab40e18af"/><file name="Entry.php" hash="f925387971c3a4e90bf3a66735f78025"/></dir><file name="Order.php" hash="470ed2a1671600318de784fedc34dbb9"/><file name="ProductId.php" hash="098e038cb611d92a65aa8a305567a2d0"/><file name="VariantConfiguration.php" hash="c3840d3e11cc2cc2c50d1f4f03bca963"/></dir><file name="QueryResponse.php" hash="300bfcfdb7f52380b207b45fede50e8e"/><file name="SubmitCartResponse.php" hash="82743d5832c4a12675796bbbde6f72e0"/><file name="UploadResponse.php" hash="72febd4c94809063f0df96bd32eb0c97"/></dir><file name="XmlBuildException.php" hash="72ee8a17dab2c457bb821cd36bbff689"/><file name="XmlResponseParser.php" hash="94502547e6f7495e708652f72155c020"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="AsyncController.php" hash="5289ad7eeea143238d1c273cf2e83e34"/><file name="LogController.php" hash="f1642d5954656247bb30d71e671d37ba"/><file name="OrderImportController.php" hash="48fb94a275992162063bac34626b681e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="f627a6fe1d4f783b5e81cf183baaffe6"/><file name="config.xml" hash="72a0800a7e1562ff209d9ffe124dd66d"/><file name="system.xml" hash="e6e194ead56359c8c3dfad7f2005bec9"/></dir><dir name="sql"><dir name="meinpaketcommon_setup"><file name="mysql4-install-1.0.0.php" hash="619358ad78ac3123511e8d77f11dc39f"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="f44902d977f8aca8e25fd3f716b6d9ab"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="55ef95a239ccc835f3a4cc2de9ae9c5a"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Dhl_MeinPaket.xml" hash="b2ab0b71945c9849bbabe9cac0280beb"/><file name="Dhl_Postpay.xml" hash="26852f055604828ffca341f7437db998"/><file name="Dhl_MeinPaketCommon.xml" hash="b926a30bca6162be2a951f9fb0f62e00"/></dir></dir></target><target name="mage"><dir><dir name="shell"><file name="dhlmeinpaket-category-import.php" hash="b7c47a9b557e7fae4c5309ed95628ab6"/><file name="dhlmeinpaket-product-export.php" hash="9cfb888cdec7047a488fd68e84f5c495"/><file name="dhlmeinpaket-request-bestprice.php" hash="8bbcdd8eb442861f7e94d44b8db99226"/><file name="dhlmeinpaket-order-import.php" hash="7ff812c3c5dbb27d88554946c7e1edab"/></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="meinpaket.xml" hash="3854556688b7e27a8e7eda0cdf2b6610"/><file name="postpay.xml" hash="890708f41152cb5326040006a0d13bf1"/><file name="meinpaketcommon.xml" hash="3854556688b7e27a8e7eda0cdf2b6610"/></dir><dir name="template"><dir name="postpay"><dir><dir name="checkout"><file name="image.phtml" hash="9283259a1e502907c0ba1c659f4ffe1b"/></dir><dir name="payment"><file name="redirect.phtml" hash="4d6e571020670c2069a2323b54f707ea"/></dir></dir><file name="checkout.phtml" hash="424e3ad9ab6f20dba21412ed9de315e6"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="meinpaket.xml" hash="973b9b6f616f8da3528ab68cc379819c"/><file name="postpay.xml" hash="5bef4c0511b6e60ed9abf1503849809e"/><file name="meinpaketcommon.xml" hash="4563e3cf8fc469dcecf1c8ff88e26cf7"/></dir><dir name="template"><dir name="meinpaket"><dir><dir name="catalog"><dir name="product"><dir name="matching"><file name="result.phtml" hash="fcc1b10a90944f5657e7c39bda175d44"/><file name="tab.phtml" hash="143d3ef87d9f351b1f578d66354671d6"/></dir></dir></dir><dir name="category"><dir name="import"><file name="import.phtml" hash="d749033dde8fe39bc006d9ac2c458ef1"/><file name="index.phtml" hash="cd832201909c7cbfb76f165fe29c0f03"/></dir></dir></dir><file name="leftmenu.phtml" hash="4afb8d200ed8ceddf2f682c5911c565c"/><file name="steps.phtml" hash="70a343086b4559dc0e77173d9a799e39"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir><dir name="de_DE"><file name="Dhl_MeinPaket.csv" hash="b50d2271da07991f17833bdac53ee71e"/><file name="Dhl_Postpay.csv" hash="5c803ebc2d02c6272b6b7b05951faba6"/><file name="Dhl_MeinPaketCommon.csv" hash="c7b3ed7c2c3d6b24a9bd66925658a439"/></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="meinpaketcommon"><dir name="images"><file name="1.png" hash="3c2c9a82eb1ba846ba83fff02a7fb89d"/><file name="2.png" hash="ebbbb39b16a74905e9089014dadf27bb"/><file name="3.png" hash="4db863bc8404ba77b12b318d7932ca3d"/><file name="ayn_ger_tuete_produkte_aussen.jpg" hash="18acc68e20f2bc7e9417bb04cb64e2c5"/><file name="dhl_logo_kl.gif" hash="43fdd8c3b923355fdd27070feca49dc7"/><file name="loader.gif" hash="823d2e0f3345c88e9463a38a9c360817"/><file name="shadowtopbg.png" hash="9e274a269dcbe50256d1be49a192a9cd"/></dir><file name="module.css" hash="d477570fa7a981d64d2fdc79af098999"/><file name="module.js" hash="60aec009320033b3c786784934d5cdb2"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>DHL_Allyouneed</name>
|
| 4 |
+
<version>2.6.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>--</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>The Extension connects your Magento shop with DHL Allyouneed.</description>
|
| 11 |
<notes>--</notes>
|
| 12 |
<authors><author><name>DHL Vertriebs GmbH</name><user>ybmdeutschland</user><email>support@meinpaket.de</email></author></authors>
|
| 13 |
+
<date>2016-02-25</date>
|
| 14 |
+
<time>16:32:00</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir><dir name="Dhl"><dir name="MeinPaket"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Backlog"><dir name="Product"><file name="Grid.php" hash="e3818a7ef10534ce30159309ebe3f711"/></dir><file name="Product.php" hash="238c6793960501e61799b7327408790f"/></dir><dir name="BestPrice"><file name="Grid.php" hash="c82331fb3fc74e35aa6541daeba9c539"/></dir><file name="BestPrice.php" hash="b4f9912d464830a48fd5154c45b0c040"/><dir name="Catalog"><dir name="Product"><dir name="Matching"><file name="Result.php" hash="135446bcf25b60bb017e29b15881daa8"/><file name="Tab.php" hash="3d5c316f511ca64dfa511f04ac4b4a14"/></dir><dir name="Renderer"><file name="Category.php" hash="7a76bea9952bb91916951d7361472656"/></dir></dir></dir><dir name="CategoryImport"><file name="Import.php" hash="47f0969b175e1480efe8a97480c169da"/><file name="Index.php" hash="745b3c71e101599fbba7a7fd275362c9"/></dir><file name="LeftMenu.php" hash="b60dea4f9e9a39b663cab89be8e32b97"/><dir name="OrderImport"><file name="Index.php" hash="b45724d6ff1fcda6102b3147f3a66a94"/></dir><dir name="ProductExport"><file name="Export.php" hash="ba11e432eafe4d98693284229bcf16e7"/><file name="Index.php" hash="65cf2306ad93f387f525ec66cec1abee"/><file name="List.php" hash="4a32ced740d35ebb7a10d0fffa782223"/></dir><file name="Steps.php" hash="ffb3f688b43cd0c1f457b89c84e68b7f"/><file name="Version.php" hash="476febd9f5d12ac999bdc7a6d646fe20"/></dir></dir><dir name="Helper"><file name="Attribute.php" hash="36cf44cf54204426e3f50864381a6443"/><file name="Backlog.php" hash="51625d92642f77fb5f45a6950e840de7"/><file name="Cron.php" hash="315c11502b6a0927199684047a2f1c73"/><file name="Data.php" hash="da9a067e866242802d77e67b8e319358"/><file name="Order.php" hash="e3dca5761fa8e5e4171a9712b14b5c30"/><file name="Shipment.php" hash="c8764cf370aded8e4d3c55e8c218a879"/></dir><dir name="Model"><dir name="Attribute"><file name="Mapping.php" hash="7d8a8d9e18f7c6019ae71a7032061ab7"/></dir><dir name="Backlog"><file name="Product.php" hash="a2d547dcfba28c80819155a73ff5cff4"/></dir><file name="BestPrice.php" hash="b75de965445df6125e115d0d89add52c"/><file name="Category.php" hash="d0f5804e7900915f1c03364b079a7dc5"/><file name="Cron.php" hash="aa1d3eb85718ab35057df743aa04b176"/><dir name="Entity"><dir name="Attribute"><dir name="Frontend"><file name="LabelTranslation.php" hash="7f4b3b49b6e12dadd768aee95e041579"/></dir><dir name="Source"><file name="Carrier.php" hash="089d067ed17b0bd5df6d45600c819e44"/><file name="MeinPaketCategory.php" hash="c2fccb5002954eb03ff1dd429194b00f"/><file name="ProductAttribute.php" hash="337597811d6a7f98286a2a7546557db4"/><file name="ProductSyncMode.php" hash="1c4d5dd89d8ebe242a13646f786dbcdc"/><file name="Taxclass.php" hash="0d132eaf636fc366a585317784a5724b"/><file name="Taxrate.php" hash="5ba78d386436df27b9dd358d576b64d8"/></dir></dir></dir><dir name="Exception"><file name="InvalidDataException.php" hash="dcbfbe06f3d0190d5f4a9f0b47973bf2"/><file name="MissingDataException.php" hash="377d6cc783aa6e8973728a77e1e5b8a9"/></dir><dir name="Mysql4"><dir name="Backlog"><dir name="Product"><file name="Collection.php" hash="2711f602d90e22ea72b773003cf38ef4"/></dir><file name="Product.php" hash="d46057bf2e8b93b32b23653222599316"/></dir><dir name="BestPrice"><file name="Collection.php" hash="fedcad4595269a646ff1c452bed87b00"/></dir><file name="BestPrice.php" hash="79399000e407b6a22489d0dbfedd6f34"/><dir name="Category"><file name="Collection.php" hash="06fd9a509c1ef252c0b75f6acda1b9eb"/></dir><file name="Category.php" hash="449c4f90fe5e797ca587025c63c745c3"/></dir><file name="Observer.php" hash="3d641b177f7281fa747e437db3838e70"/><dir name="Payment"><dir name="Method"><file name="Meinpaket.php" hash="dcb6ac810be4d0bb9e426464be91610d"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="6a8952042b65c89685e24b3b503c0d67"/></dir></dir></dir><dir name="Service"><dir name="MarketplaceCategoryImport"><file name="ImportService.php" hash="bf0c889ce83b0afe084c20f97288370e"/><file name="Result.php" hash="cdebaf351ccd1c7aa285801701d32e7f"/></dir><dir name="Product"><dir name="Export"><dir name="Exception"><file name="InvalidEan.php" hash="bc88e3bc48a8a96e45079054290ae68c"/></dir></dir><file name="Export.php" hash="dbda15c27ea64fc80dabf04977d3d016"/></dir><dir name="ProductData"><file name="RequestService.php" hash="381ffeb30499242407bbf88d1eb82141"/></dir><dir name="Result"><file name="Abstract.php" hash="c7d84905431b651779dc1011f246983b"/><file name="Upload.php" hash="4ddf194a126ce18938610f61fcc1260d"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="fb7fb1630ede6e1a656b63295a9580eb"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Meinpaket"><dir name="Backlog"><file name="ProductController.php" hash="2beaf15d9c7da08e684781da85d6c87f"/></dir><file name="BestPriceController.php" hash="74bb219de2df5876d691a8c6327c67d5"/><file name="CategoryImportController.php" hash="f44dc06f1d1dd61cb5ae8e8e6d8af08a"/><file name="MatchingController.php" hash="35b41e6596871752b34e93f4f68056ca"/><file name="ProductExportController.php" hash="dc397c0999c80d748cdd48bc54d917bf"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="faf0731068709be37b6eb9dd80b797ff"/><file name="config.xml" hash="23b05b8024dab60f04dcd9321dd37409"/><file name="system.xml" hash="9811aedefc5850f9ac82cf1e922fb35a"/></dir><dir name="sql"><dir name="meinpaket_setup"><file name="mysql4-install-1.0.0.php" hash="f517a9fbaa8e58738d67fc146f493496"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="b52cd860cbc35cff0f704a033b296cdf"/><file name="mysql4-upgrade-1.1.0-2.0.0.php" hash="199b74750e105a4e215bb268dceeb897"/><file name="mysql4-upgrade-2.1.0-2.2.0.php" hash="70fb260c8a4b10b30ee989b75be88d0f"/><file name="mysql4-upgrade-2.5.0-2.6.0.php" hash="8311439ba499b132a144ca727572803f"/><file name="mysql4-upgrade-2.6.0-2.7.0.php" hash="cc76f3357809e59c74b5a2446cc4e4db"/></dir></dir></dir></dir><dir name="Postpay"><dir><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="887b1a63cd09847ba7ab3392bd4f9602"/></dir><file name="Checkout.php" hash="ec8b0f2764d863f03dec0167617510a6"/><dir name="Payment"><dir name="Form"><file name="Standard.php" hash="6aca4f231c317c45ac1556d39639d84f"/></dir><dir name="Info"><file name="Standard.php" hash="45252ddc1f9ebb332ef75efa5f868432"/></dir></dir></dir><dir name="Helper"><file name="Cron.php" hash="c2391d5d085c31f2650655e8acdbfb97"/><file name="Data.php" hash="418df17f5f760dc47bba8bb815d77c58"/></dir><dir name="Model"><file name="Cart.php" hash="1c72c7a35b1a58d074a097c22f81b080"/><file name="Cron.php" hash="c94e8c1919f96b3c16988ca643da7f71"/><dir name="Mysql4"><dir name="Cart"><file name="Collection.php" hash="3b5150eb69a37a738e3f8494db0f4af1"/></dir><file name="Cart.php" hash="74042698f6fb9f2c7ca054d17f1ff0a2"/></dir><file name="Observer.php" hash="8a9eb2111c0a450e460f10e2b2a721eb"/><dir name="Payment"><dir name="Method"><file name="Express.php" hash="91259cee6e39f7c993a823edbaab4817"/><file name="Standard.php" hash="12d90706187a26494b9dc072821003ee"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ac36d5a7a1988eab4dad69efd472c50f"/></dir></dir></dir><dir name="Service"><dir name="Order"><file name="ImportService.php" hash="38f4942edcb2ddeb9dc7a161149ead3b"/></dir></dir></dir><dir name="controllers"><file name="CheckoutController.php" hash="7a0801e7c03be05beb8c38004dea1464"/><file name="NotificationController.php" hash="a6a1c01b219d03f9941af2c4e91a3e85"/><file name="ResponseController.php" hash="a182997c01139ffe2137d6dcb51f34ec"/></dir><dir name="etc"><file name="config.xml" hash="aa1af5fc595e99577293d45d3da2869e"/><file name="system.xml" hash="c42ac176d831392baaff505fddffc652"/></dir><dir name="sql"><dir name="postpay_setup"><file name="mysql4-install-1.0.0.php" hash="8a5f877376e1df9b1a8bde8d4ce70158"/></dir></dir></dir></dir><dir name="MeinPaketCommon"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Async"><file name="Grid.php" hash="3c7549ff52bf47de9558cc14a3008fc2"/></dir><file name="Async.php" hash="b755d5bd1cef59264fd5a2309e07e3ce"/><dir name="Log"><file name="Grid.php" hash="8299f7085d6bdbaad1d19b1ca43eca9d"/></dir><file name="Log.php" hash="36a68e5de0cf7dfb87e3b090c05c1e9c"/><file name="Version.php" hash="28defa5c89727f8c3a877affb55d0443"/></dir></dir><dir name="Helper"><file name="Address.php" hash="def05195630f6f98802481d228b4f25e"/><file name="Attribute.php" hash="905db640dbe49889e273aeb7415b2441"/><file name="Cron.php" hash="c853776f75db4063fc1e6bf247d4e5ab"/><file name="Data.php" hash="6b587eecc5c02fd7523f1127c469d568"/><file name="Order.php" hash="736798b03eefd167e60854ad2e07792b"/><file name="Product.php" hash="43213811a6ba758af79bb4574e90f196"/><file name="Shipment.php" hash="4f62b24147d2998762ca74975e4cc379"/></dir><dir name="Model"><file name="Async.php" hash="3112120abd4ff2773dbcf19dedfd4044"/><dir name="Carrier"><file name="Allyouneed.php" hash="25eaf021d05a89e988c9370f25fd56cf"/><file name="Meinpaket.php" hash="b16814df68414d1fb6e795eadc4d6e83"/></dir><dir name="Client"><file name="BadHttpReturnCodeException.php" hash="3f3d67278be542e42bb882f387c04b67"/><file name="HttpException.php" hash="963bc4b8d30d2996a2a08b4c8aaa6b8f"/><file name="HttpTimeoutException.php" hash="d633742d26c8c5438543c1bbdf5c09bd"/><file name="XmlOverHttp.php" hash="887c9c5de3f323bc8963a06780fcd36f"/></dir><file name="Cron.php" hash="18925c4ea5e36226fc3f370219b3c7d5"/><dir name="Entity"><dir name="Attribute"><dir name="Source"><file name="Carrier.php" hash="33fd2d2163e27a2fc54f8e1b25787998"/></dir></dir></dir><dir name="Exception"><file name="InvalidDataException.php" hash="808caf989c24f1146d47fc610be6e131"/><file name="MissingDataException.php" hash="67a06069dcb66c02235f636b6790a62d"/></dir><file name="Log.php" hash="516fc34067f4573d160100d7a975a66c"/><dir name="Mysql4"><dir name="Async"><file name="Collection.php" hash="d5f6fbe4a4be75181844eddfbbd557cf"/></dir><file name="Async.php" hash="2120d8c0411c8773853cee4c5925467a"/><dir name="Log"><file name="Collection.php" hash="9bba87a636029d675e1ceda42f96dbc4"/></dir><file name="Log.php" hash="a09be611512f4dc95880e6e00dab93ca"/></dir><file name="Observer.php" hash="6722c636ef4fc9061e9da39ba3dda173"/><dir name="Payment"><dir name="Method"><file name="Allyouneed.php" hash="663bf3c0f796e41a36eed0c277c0af42"/><file name="Meinpaket.php" hash="fdbc24e8330ecbb71243e1f4b5b83bc3"/></dir></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="ce3a02f9c90e0a1f04a6202305c72ff4"/></dir></dir></dir><dir name="Service"><file name="Abstract.php" hash="406fb92c370df8e93aaffacbad56937b"/><file name="Async.php" hash="3722821241353cfd3f7da184ea5cadab"/><dir name="Order"><dir name="CancellationService"><file name="Result.php" hash="fd81666a5855ea6b25904e14d498ea20"/></dir><file name="CancellationService.php" hash="a6806a3531b596a729a418688ba51dcc"/><file name="ImportService.php" hash="dbf2b6498b9f3031d41b53b3133d7a28"/><dir name="RefundExportService"><file name="Result.php" hash="dcfd1f479709368b446041674ee445d8"/></dir><file name="RefundExportService.php" hash="7ab8222a77e76517247f7f710d60b590"/><dir name="ShipmentExportService"><file name="Result.php" hash="0ba713e725c87d0bc82321582e3fe776"/></dir><file name="ShipmentExportService.php" hash="3045ed7ffb7f6a1f4c592e49832577f9"/></dir><dir name="Result"><file name="Abstract.php" hash="c7d84905431b651779dc1011f246983b"/><file name="Upload.php" hash="51438929f66a7efe3541511b6966ea09"/></dir></dir><dir name="System"><file name="MemoryLimiter.php" hash="813d89b8c21834fb911acc8e59be950c"/></dir><dir name="Validation"><file name="ValidationInterface.php" hash="d11950e6d4a7b52e3784867e8d8d2230"/><dir name="Validator"><file name="CDATAContent.php" hash="425678e9cf44efee9d884c20e4db1f14"/><file name="Ean.php" hash="7bab4c07ebcbdf3ce9e087ff20976d1a"/><file name="IntGreaterZero.php" hash="682c11f5cf24cafcef61350194a65be1"/><file name="NonEmptyString.php" hash="7075a72eace8e1f8c5bc5b61a5a25231"/><file name="StringMaxLength.php" hash="c19f729ff39b5b6b438635fe9bd9c6bf"/><file name="Url.php" hash="7b1f83a803fd8788ad4b22aaa982d04f"/></dir><file name="ValidatorChain.php" hash="72148d630805652276c446ebef817f47"/><file name="ValidatorInterface.php" hash="df41d71f7970d758b18bf36c2e49f6f1"/></dir><dir name="Xml"><file name="AbstractXmlPartial.php" hash="2cf177e53b3b4b54309b9573aab4d646"/><file name="AbstractXmlRequest.php" hash="9a72dc1e6fe6cc1f027d1f339e6bc0f4"/><file name="InvalidXmlException.php" hash="22c021f43b7df35045814cd1ca714968"/><dir name="Request"><file name="AsynchronousStatusRequest.php" hash="4b17665dfef64f23d366f671a06634e3"/><file name="DataRequest.php" hash="c841bd02a2d20c01fa27315397717ba7"/><file name="DownloadRequest.php" hash="05e941a0db71e679d5e3bce00bd5da8d"/><file name="NotificationRequest.php" hash="dcdc7c28553eccbf6eba95104f1430ff"/><file name="QueryRequest.php" hash="653c70900c92eb76a5aac273cf49f155"/><file name="SubmitCartRequest.php" hash="6e3297eebbfeb13fbe7874431474c528"/><file name="UploadRequest.php" hash="111693655db902b6482649c1fa46ad04"/></dir><dir name="Response"><file name="Abstract.php" hash="f7e963bf5586d26347c4d1a6887a4b79"/><file name="AsynchronousStatusResponse.php" hash="6571d1b3093cd73e7eda7ff940df4453"/><file name="DataResponse.php" hash="672c55dd8e770219eac74214726cb5ef"/><file name="DownloadResponse.php" hash="831f43cece257d44fe65d02304362a8c"/><file name="NotificationResponse.php" hash="be7626da7ef2f744f183228110aabbea"/><dir name="Partial"><file name="Address.php" hash="d9ea71d56eb49fe3a512edd412293922"/><file name="Attribute.php" hash="4c27a169c0c773afde7502d6704ee372"/><file name="Category.php" hash="2b040bd3b89121ba28fef0ae07915915"/><file name="CategoryId.php" hash="09f6b3ecf29c4d3a16d37978efd53b4a"/><dir name="DataResponse"><file name="BestPrice.php" hash="e545a040a9201c3c8a71d4b410dcfc4d"/><file name="Confirmation.php" hash="b93b06d18277c10899535d91c1b71829"/><file name="MerchantData.php" hash="f03d2b35691c4356c43251e3c1c1fd20"/><file name="ProductData.php" hash="ab11140f6a0c4556a558d317651db82b"/><file name="QuotaData.php" hash="feb7180ff8c332decc938c1394ab8018"/></dir><dir name="NotificationResponse"><file name="Confirmation.php" hash="62225a96f3c9ce1047afc3f2c04b44ea"/><file name="Consignment.php" hash="20cb98f68cb94033d7abc5cb29ba47a4"/><file name="Credit.php" hash="7dfa1b551c938bbdbcab3e7f5ca4a86e"/><file name="Return.php" hash="d2538c678241727e3fe996d800da75b1"/></dir><dir name="Order"><file name="ContactData.php" hash="27cd1f6a5f8125352f3c383ab40e18af"/><file name="Entry.php" hash="f925387971c3a4e90bf3a66735f78025"/></dir><file name="Order.php" hash="470ed2a1671600318de784fedc34dbb9"/><file name="ProductId.php" hash="098e038cb611d92a65aa8a305567a2d0"/><file name="VariantConfiguration.php" hash="c3840d3e11cc2cc2c50d1f4f03bca963"/></dir><file name="QueryResponse.php" hash="300bfcfdb7f52380b207b45fede50e8e"/><file name="SubmitCartResponse.php" hash="82743d5832c4a12675796bbbde6f72e0"/><file name="UploadResponse.php" hash="72febd4c94809063f0df96bd32eb0c97"/></dir><file name="XmlBuildException.php" hash="72ee8a17dab2c457bb821cd36bbff689"/><file name="XmlResponseParser.php" hash="94502547e6f7495e708652f72155c020"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Meinpaketcommon"><file name="AsyncController.php" hash="8a7bc982fcdfa959b839e0fc96db806f"/><file name="LogController.php" hash="465f5dfff9e21a1d0d5d7ec02ae5423e"/><file name="OrderImportController.php" hash="a6d656b467545f9884adb1bf2ba576ab"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="27e4abfd28368d0a2e69664fcc744c19"/><file name="config.xml" hash="1f1f4c2fe0b94a3a1c7b498aa2ab074b"/><file name="system.xml" hash="e6e194ead56359c8c3dfad7f2005bec9"/></dir><dir name="sql"><dir name="meinpaketcommon_setup"><file name="mysql4-install-1.0.0.php" hash="619358ad78ac3123511e8d77f11dc39f"/><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="f44902d977f8aca8e25fd3f716b6d9ab"/><file name="mysql4-upgrade-1.1.1-1.2.0.php" hash="55ef95a239ccc835f3a4cc2de9ae9c5a"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Dhl_MeinPaket.xml" hash="b2ab0b71945c9849bbabe9cac0280beb"/><file name="Dhl_Postpay.xml" hash="26852f055604828ffca341f7437db998"/><file name="Dhl_MeinPaketCommon.xml" hash="b926a30bca6162be2a951f9fb0f62e00"/></dir></dir></target><target name="mage"><dir><dir name="shell"><file name="dhlmeinpaket-category-import.php" hash="b7c47a9b557e7fae4c5309ed95628ab6"/><file name="dhlmeinpaket-product-export.php" hash="9cfb888cdec7047a488fd68e84f5c495"/><file name="dhlmeinpaket-request-bestprice.php" hash="8bbcdd8eb442861f7e94d44b8db99226"/><file name="dhlmeinpaket-order-import.php" hash="78ed4ffb48e530950bde3818e432b972"/></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="meinpaket.xml" hash="3854556688b7e27a8e7eda0cdf2b6610"/><file name="postpay.xml" hash="890708f41152cb5326040006a0d13bf1"/><file name="meinpaketcommon.xml" hash="3854556688b7e27a8e7eda0cdf2b6610"/></dir><dir name="template"><dir name="postpay"><dir><dir name="checkout"><file name="image.phtml" hash="9283259a1e502907c0ba1c659f4ffe1b"/></dir><dir name="payment"><file name="redirect.phtml" hash="4d6e571020670c2069a2323b54f707ea"/></dir></dir><file name="checkout.phtml" hash="424e3ad9ab6f20dba21412ed9de315e6"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="meinpaket.xml" hash="869a9e19149fb25e4cb41fc67750facd"/><file name="postpay.xml" hash="5bef4c0511b6e60ed9abf1503849809e"/><file name="meinpaketcommon.xml" hash="c9f8a98599b050b01f0f5da8ba9378ab"/></dir><dir name="template"><dir name="meinpaket"><dir><dir name="catalog"><dir name="product"><dir name="matching"><file name="result.phtml" hash="d13ff26ad0f634c732a3baa2f25ddbad"/><file name="tab.phtml" hash="9124f82cd5f7ac58b2b5561381fb25c5"/></dir></dir></dir><dir name="category"><dir name="import"><file name="import.phtml" hash="dde1fbeacc6fb333206c4c3344774a7f"/><file name="index.phtml" hash="fa21c3dbf009f7a9874196c06679f5fc"/></dir></dir></dir><file name="leftmenu.phtml" hash="4afb8d200ed8ceddf2f682c5911c565c"/><file name="steps.phtml" hash="70a343086b4559dc0e77173d9a799e39"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir><dir name="de_DE"><file name="Dhl_MeinPaket.csv" hash="b2aa75c347128272a8ebdf4e771c828f"/><file name="Dhl_Postpay.csv" hash="5c803ebc2d02c6272b6b7b05951faba6"/><file name="Dhl_MeinPaketCommon.csv" hash="c7b3ed7c2c3d6b24a9bd66925658a439"/></dir></dir></dir></target><target name="mageskin"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="meinpaketcommon"><dir name="images"><file name="1.png" hash="3c2c9a82eb1ba846ba83fff02a7fb89d"/><file name="2.png" hash="ebbbb39b16a74905e9089014dadf27bb"/><file name="3.png" hash="4db863bc8404ba77b12b318d7932ca3d"/><file name="ayn_ger_tuete_produkte_aussen.jpg" hash="18acc68e20f2bc7e9417bb04cb64e2c5"/><file name="dhl_logo_kl.gif" hash="43fdd8c3b923355fdd27070feca49dc7"/><file name="loader.gif" hash="823d2e0f3345c88e9463a38a9c360817"/><file name="shadowtopbg.png" hash="9e274a269dcbe50256d1be49a192a9cd"/></dir><file name="module.css" hash="d477570fa7a981d64d2fdc79af098999"/><file name="module.js" hash="60aec009320033b3c786784934d5cdb2"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
shell/dhlmeinpaket-order-import.php
CHANGED
|
@@ -24,8 +24,10 @@ class Dhl_MeinPaketCommon_Shell_OrderImport extends Mage_Shell_Abstract {
|
|
| 24 |
public function run() {
|
| 25 |
echo "Starting order import (" . $this->getFormattedDate () . ")\n";
|
| 26 |
|
| 27 |
-
/* @var $service
|
| 28 |
-
$service = Mage::
|
|
|
|
|
|
|
| 29 |
$hours = self::DEFAULT_HOURS;
|
| 30 |
$startTime = 0;
|
| 31 |
$endTime = 0;
|
|
@@ -51,8 +53,8 @@ class Dhl_MeinPaketCommon_Shell_OrderImport extends Mage_Shell_Abstract {
|
|
| 51 |
echo 'Order import failed. Exception occured: ' . $e->getMessage ();
|
| 52 |
}
|
| 53 |
|
| 54 |
-
echo "Import finished
|
| 55 |
-
echo "Imported " . $service->getOrderCount ()['imported'] . " orders.\n";
|
| 56 |
|
| 57 |
return $this;
|
| 58 |
}
|
| 24 |
public function run() {
|
| 25 |
echo "Starting order import (" . $this->getFormattedDate () . ")\n";
|
| 26 |
|
| 27 |
+
/* @var $service Dhl_MeinPaketCommon_Model_Service_Order_ImportService */
|
| 28 |
+
$service = Mage::getSingleton ( 'meinpaketcommon/service_order_importService' );
|
| 29 |
+
$service->getOrderCount ();
|
| 30 |
+
|
| 31 |
$hours = self::DEFAULT_HOURS;
|
| 32 |
$startTime = 0;
|
| 33 |
$endTime = 0;
|
| 53 |
echo 'Order import failed. Exception occured: ' . $e->getMessage ();
|
| 54 |
}
|
| 55 |
|
| 56 |
+
echo "Import finished (" . $this->getFormattedDate () . ")\n";
|
| 57 |
+
echo "Imported " . $service->getOrderCount () ['imported'] . " orders.\n";
|
| 58 |
|
| 59 |
return $this;
|
| 60 |
}
|
