Version Notes
* Add company name to addresses
* Fetch attributes for child products
Download this release
Release Info
Developer | Christiaan de Ridder |
Extension | Tritac_ChannelEngine |
Version | 3.5.0 |
Comparing to | |
See all releases |
Code changes from version 3.4.1 to 3.5.0
app/code/community/Tritac/ChannelEngine/Model/Observer.php
CHANGED
@@ -146,10 +146,11 @@ class Tritac_ChannelEngine_Model_Observer
|
|
146 |
}
|
147 |
|
148 |
$phone = $order->getPhone();
|
149 |
-
if(empty($phone))
|
150 |
-
|
151 |
// Prepare billing and shipping addresses
|
152 |
$billingData = array(
|
|
|
153 |
'firstname' => $billingAddress->getFirstName(),
|
154 |
'lastname' => $billingAddress->getLastName(),
|
155 |
'email' => $order->getEmail(),
|
@@ -162,7 +163,9 @@ class Tritac_ChannelEngine_Model_Observer
|
|
162 |
$billingAddress->getHouseNr().
|
163 |
$billingAddress->getHouseNrAddition()
|
164 |
);
|
|
|
165 |
$shippingData = array(
|
|
|
166 |
'firstname' => $shippingAddress->getFirstName(),
|
167 |
'lastname' => $shippingAddress->getLastName(),
|
168 |
'email' => $order->getEmail(),
|
@@ -184,6 +187,7 @@ class Tritac_ChannelEngine_Model_Observer
|
|
184 |
|
185 |
$quote->getBillingAddress()
|
186 |
->addData($billingData);
|
|
|
187 |
$quote->getShippingAddress()
|
188 |
->addData($shippingData)
|
189 |
->setSaveInAddressBook(0)
|
@@ -314,7 +318,6 @@ class Tritac_ChannelEngine_Model_Observer
|
|
314 |
$trackingCode = null;
|
315 |
$trackingCodes = $_shipment->getAllTracks();
|
316 |
if(count($trackingCodes) > 0) {
|
317 |
-
|
318 |
$trackingCode = $trackingCodes[0];
|
319 |
$ceShipment->setTrackTraceNo($trackingCode->getNumber());
|
320 |
$ceShipment->setMethod($trackingCode->getTitle());
|
@@ -480,7 +483,7 @@ class Tritac_ChannelEngine_Model_Observer
|
|
480 |
$parent = Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId();
|
481 |
$category = Mage::getModel('catalog/category');
|
482 |
if ($category->checkId($parent)) {
|
483 |
-
$storeCategories = $category->getCategories($parent, 0,
|
484 |
foreach($storeCategories as $_category) {
|
485 |
$categoryArray[$_category->getId()] = $_category->getData();
|
486 |
}
|
@@ -664,11 +667,12 @@ class Tritac_ChannelEngine_Model_Observer
|
|
664 |
$parentData['price'] = Mage::getModel('catalog/product_type_price')->calculateSpecialPrice($parentData['price'], $specialPrice, $specialFrom, $specialTo, $storeId);
|
665 |
|
666 |
$xml = $this->_getProductXml($parentData, $categoryArray, array('systemAttributes' => $systemAttributes, 'attributes' => $visibleAttributes));
|
667 |
-
|
668 |
$_childProducts = Mage::getModel('catalog/product_type_configurable')
|
669 |
-
|
670 |
-
|
671 |
-
->
|
|
|
672 |
|
673 |
foreach($_childProducts as $_child) {
|
674 |
$childData = $_child->getData();
|
146 |
}
|
147 |
|
148 |
$phone = $order->getPhone();
|
149 |
+
if(empty($phone)) $phone = '-';
|
150 |
+
|
151 |
// Prepare billing and shipping addresses
|
152 |
$billingData = array(
|
153 |
+
'company' => $billingAddress->getCompanyName(),
|
154 |
'firstname' => $billingAddress->getFirstName(),
|
155 |
'lastname' => $billingAddress->getLastName(),
|
156 |
'email' => $order->getEmail(),
|
163 |
$billingAddress->getHouseNr().
|
164 |
$billingAddress->getHouseNrAddition()
|
165 |
);
|
166 |
+
|
167 |
$shippingData = array(
|
168 |
+
'company' => $shippingAddress->getCompanyName(),
|
169 |
'firstname' => $shippingAddress->getFirstName(),
|
170 |
'lastname' => $shippingAddress->getLastName(),
|
171 |
'email' => $order->getEmail(),
|
187 |
|
188 |
$quote->getBillingAddress()
|
189 |
->addData($billingData);
|
190 |
+
|
191 |
$quote->getShippingAddress()
|
192 |
->addData($shippingData)
|
193 |
->setSaveInAddressBook(0)
|
318 |
$trackingCode = null;
|
319 |
$trackingCodes = $_shipment->getAllTracks();
|
320 |
if(count($trackingCodes) > 0) {
|
|
|
321 |
$trackingCode = $trackingCodes[0];
|
322 |
$ceShipment->setTrackTraceNo($trackingCode->getNumber());
|
323 |
$ceShipment->setMethod($trackingCode->getTitle());
|
483 |
$parent = Mage::app()->getWebsite(true)->getDefaultStore()->getRootCategoryId();
|
484 |
$category = Mage::getModel('catalog/category');
|
485 |
if ($category->checkId($parent)) {
|
486 |
+
$storeCategories = $category->getCategories($parent, 0, true, true, true);
|
487 |
foreach($storeCategories as $_category) {
|
488 |
$categoryArray[$_category->getId()] = $_category->getData();
|
489 |
}
|
667 |
$parentData['price'] = Mage::getModel('catalog/product_type_price')->calculateSpecialPrice($parentData['price'], $specialPrice, $specialFrom, $specialTo, $storeId);
|
668 |
|
669 |
$xml = $this->_getProductXml($parentData, $categoryArray, array('systemAttributes' => $systemAttributes, 'attributes' => $visibleAttributes));
|
670 |
+
|
671 |
$_childProducts = Mage::getModel('catalog/product_type_configurable')
|
672 |
+
->getUsedProductCollection($_product)
|
673 |
+
->addAttributeToSelect($attributesToSelect)
|
674 |
+
->getItems();
|
675 |
+
|
676 |
|
677 |
foreach($_childProducts as $_child) {
|
678 |
$childData = $_child->getData();
|
app/code/community/Tritac/ChannelEngine/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Tritac_ChannelEngine>
|
5 |
-
<version>3.
|
6 |
</Tritac_ChannelEngine>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Tritac_ChannelEngine>
|
5 |
+
<version>3.5.0</version>
|
6 |
</Tritac_ChannelEngine>
|
7 |
</modules>
|
8 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tritac_ChannelEngine</name>
|
4 |
-
<version>3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -20,11 +20,12 @@ Features of ChannelEngine:
|
|
20 |
* Receive orders from marketplaces using one single connection.
|
21 |
* Using this magento extension you can connect to ChannelEngine instantly without any further configuration.
|
22 |
* For more information, visit: ChannelEngine.com</description>
|
23 |
-
<notes>*
|
|
|
24 |
<authors><author><name>Christiaan de Ridder</name><user>christiaander</user><email>support@channelengine.com</email></author></authors>
|
25 |
-
<date>2017-
|
26 |
-
<time>
|
27 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Tritac_ChannelEngine.xml" hash="f6b4a6d9af9aa3bcd3019fd566d6a67c"/></dir></target><target name="magecommunity"><dir name="Tritac"><dir name="ChannelEngine"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Feed.php" hash="004083344207a444e00ebaf4a86835b9"/></dir></dir></dir><file name="Head.php" hash="74004d8749f6267c4ce024b47970af23"/></dir><dir name="Helper"><file name="Data.php" hash="7517ee0d0acd0567e1f1f14cf794107c"/></dir><dir name="Model"><dir name="Carrier"><file name="Channelengine.php" hash="b6e04e43096e934d57e8e8745dd67c75"/></dir><file name="Observer.php" hash="
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>5.5.0</min><max>7.1.0</max></php><extension><name>curl</name><min>7.0</min><max>7.50</max></extension></required></dependencies>
|
30 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Tritac_ChannelEngine</name>
|
4 |
+
<version>3.5.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
20 |
* Receive orders from marketplaces using one single connection.
|
21 |
* Using this magento extension you can connect to ChannelEngine instantly without any further configuration.
|
22 |
* For more information, visit: ChannelEngine.com</description>
|
23 |
+
<notes>* Add company name to addresses
|
24 |
+
* Fetch attributes for child products</notes>
|
25 |
<authors><author><name>Christiaan de Ridder</name><user>christiaander</user><email>support@channelengine.com</email></author></authors>
|
26 |
+
<date>2017-02-17</date>
|
27 |
+
<time>08:34:04</time>
|
28 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Tritac_ChannelEngine.xml" hash="f6b4a6d9af9aa3bcd3019fd566d6a67c"/></dir></target><target name="magecommunity"><dir name="Tritac"><dir name="ChannelEngine"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Feed.php" hash="004083344207a444e00ebaf4a86835b9"/></dir></dir></dir><file name="Head.php" hash="74004d8749f6267c4ce024b47970af23"/></dir><dir name="Helper"><file name="Data.php" hash="7517ee0d0acd0567e1f1f14cf794107c"/></dir><dir name="Model"><dir name="Carrier"><file name="Channelengine.php" hash="b6e04e43096e934d57e8e8745dd67c75"/></dir><file name="Observer.php" hash="7bf9280e95303d71685b4836dfbdfb89"/><file name="Order.php" hash="7b5d59152a0341cf5bff5b7adf6c76b7"/><dir name="Payment"><dir name="Method"><file name="Channelengine.php" hash="b938300284d504de42dd04777c45c75b"/></dir></dir><dir name="Resource"><dir name="Order"><file name="Collection.php" hash="fedd812bdf0090a36ce7bdd23e7876f5"/></dir><file name="Order.php" hash="cab73cceec877cda4daadc5c66f356fe"/><file name="Setup.php" hash="ed5ca35f61e6158a8b617630ae84c5b8"/><dir name="Shipment"><file name="Collection.php" hash="56e7c3bee221edefdcb587801bd36cc2"/></dir><file name="Shipment.php" hash="e09302f0ff110b94fc34031ee9255caa"/></dir><file name="Shipment.php" hash="5aa413e4e1ca441456d0d28ed541d2fc"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Gtin.php" hash="d2c18169dfaf87a01d9d7357329f1c78"/><file name="Shipping.php" hash="00d71eaebba3014fe9d17ee75f7cf0a9"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="GenerateController.php" hash="b69ead94a34e01bdf093ee6282b66c18"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2a9dc6ac1738bebb470c1aa699478467"/><file name="config.xml" hash="adca574233237009c8fd49d17aacfaaa"/><file name="system.xml" hash="ebd9a53cd2b8bc9c7c0ab19c68996d8c"/></dir><dir name="sql"><dir name="channelengine_setup"><file name="mysql4-install-1.0.0.php" hash="6d04678d7750ff3de5a9eb697c13d52f"/><file name="mysql4-upgrade-2.6.0-2.7.0.php" hash="1f8c2f9d0239c9fbf31d3bfdd1c6cc46"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Tritac"><dir name="ChannelEngineApiClient"><file name="AddTrustExternalCARoot.crt" hash="f85d1ff17b0079709f131f3ce3f288d2"/><file name="Client.php" hash="9e0065d5902495dcf12c6526a6309998"/><dir name="Enums"><file name="CancellationLineStatus.php" hash="b48713c95dea7855255eca6d9af68ba4"/><file name="CancellationStatus.php" hash="ea61f9cdf047d615c63d49e943ef7776"/><file name="Gender.php" hash="ec9d3e083df38a188c57b1015e011bce"/><file name="MancoReason.php" hash="b5a7ecf30975a494223df3135e111760"/><file name="OrderStatus.php" hash="451569e1788da5f08b01527ee86463cd"/><file name="ReturnAcceptStatus.php" hash="760598e7176288210d349686899e76aa"/><file name="ReturnReason.php" hash="9d8aea80edbb7d012e7abcbb0f54d5e4"/><file name="ReturnStatus.php" hash="7827e8d3b27faf6073835ecbcde1db6b"/><file name="ShipmentLineStatus.php" hash="ccdddd9f80610cbf284154db5930247a"/><file name="ShipmentStatus.php" hash="0b0351af3409590614ff249e1bac688e"/></dir><dir name="Helpers"><file name="Collection.php" hash="4dcae246e9de6e847818dc3be49ddad0"/><file name="HttpMethod.php" hash="79b753f221780fbf75773669cf3d1f86"/><file name="JsonMapper.php" hash="c8742a0636d3f866c8a1c2c97365cfb8"/></dir><dir name="Models"><file name="Address.php" hash="49a1cd2a405ba2832f638979a14c7187"/><file name="BaseModel.php" hash="9604e198f22fef25d60992c2cb9f506c"/><file name="Cancellation.php" hash="edddc28fc842661311da1d79f9b6b634"/><file name="CancellationLine.php" hash="f2eb604ccc7ea5678941394cb5861c48"/><file name="Message.php" hash="658c867e131588eb2520c349d6ebc5a7"/><file name="Order.php" hash="11df07d8acb3fc985b3eec812955ef42"/><file name="OrderExtraDataItem.php" hash="965abccf11c8157b7fd85e05a8ef4e28"/><file name="OrderLine.php" hash="78252a465c5f1b9b1c5e23c8ce09552d"/><file name="ReturnLine.php" hash="c011dfcf44f25b255e529fd26755fbd9"/><file name="ReturnObject.php" hash="28378a651ad7e41b127bfd1839f25dad"/><file name="Shipment.php" hash="c8903a23b59a1cada56b8518db56ce2d"/><file name="ShipmentLine.php" hash="0ca0e5441553f722ade5ad5924c9f801"/></dir><file name="loader.php" hash="5bba6033b0bdc5cb87afdbdde2deadf9"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="channelengine.xml" hash="ae6a00b46a84a610964743034eb72081"/></dir><dir name="template"><dir name="channelengine"><dir name="checkout"><file name="success.phtml" hash="dbcb8298cd52a3c44560ae911349a3c7"/></dir><file name="head.phtml" hash="a7a7ab566adc1dc7d2645bf1cdfac0d4"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="channelengine"><dir name="system"><dir name="config"><dir name="feed"><file name="generate_button.phtml" hash="ed8c5f4a81f19c7ceaacd1b1c004772e"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.5.0</min><max>7.1.0</max></php><extension><name>curl</name><min>7.0</min><max>7.50</max></extension></required></dependencies>
|
31 |
</package>
|