Version Notes
Shopgate Modul
Download this release
Release Info
Developer | Stephan Recknagel |
Extension | shopgate_module |
Version | 2.9.37 |
Comparing to | |
See all releases |
Code changes from version 2.9.36 to 2.9.37
- app/code/community/Shopgate/Framework/Block/Payment/MobilePayment.php +35 -15
- app/code/community/Shopgate/Framework/Helper/Billsafe/Client.php +2 -2
- app/code/community/Shopgate/Framework/Helper/Config.php +54 -57
- app/code/community/Shopgate/Framework/Helper/Coupon.php +46 -17
- app/code/community/Shopgate/Framework/Helper/Data.php +10 -2
- app/code/community/Shopgate/Framework/Helper/Sales.php +50 -52
- app/code/community/Shopgate/Framework/Model/Carrier/Fix.php +41 -40
- app/code/community/Shopgate/Framework/Model/Config.php +55 -0
- app/code/community/Shopgate/Framework/Model/Export/Customer/Orders.php +36 -43
- app/code/community/Shopgate/Framework/Model/Export/Product/Xml.php +25 -38
- app/code/community/Shopgate/Framework/Model/Factory.php +70 -0
- app/code/community/Shopgate/Framework/Model/Interfaces/Modules/Router.php +32 -0
- app/code/community/Shopgate/Framework/Model/Interfaces/Modules/Validator.php +54 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Factory.php +118 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Redeem.php +177 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Utility.php +51 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Validator.php +29 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Router.php +215 -0
- app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Utility.php +61 -0
- app/code/community/Shopgate/Framework/Model/Modules/Factory.php +65 -0
- app/code/community/Shopgate/Framework/Model/Modules/Validator.php +108 -0
- app/code/community/Shopgate/Framework/Model/Payment/Abstract.php +3 -1
- app/code/community/Shopgate/Framework/Model/Payment/Abstract/AbstractPayol.php +1 -0
- app/code/community/Shopgate/Framework/Model/Payment/Cc/AuthnAbstract.php +6 -5
- app/code/community/Shopgate/Framework/Model/Payment/Interface.php +0 -29
- app/code/community/Shopgate/Framework/Model/Shopgate/Cart/Validation/Stock/Simple.php +1 -3
- app/code/community/Shopgate/Framework/Model/Shopgate/Order.php +26 -23
- app/code/community/Shopgate/Framework/Model/Shopgate/Plugin.php +133 -113
- app/code/community/Shopgate/Framework/Model/Shopgate/Shipping/Mapper.php +8 -1
- app/code/community/Shopgate/Framework/Test/Helper/Billsafe/ClientTest.php +68 -0
- app/code/community/Shopgate/Framework/Test/Model/Modules/Affiliate/RouterTest.php +144 -0
- app/code/community/Shopgate/Framework/changelog.txt +14 -0
- app/code/community/Shopgate/Framework/etc/config.xml +1 -1
- app/code/community/Shopgate/Framework/sql/shopgate_setup/mysql4-upgrade-2.9.36-2.9.37.php +31 -0
- app/design/adminhtml/default/default/template/shopgate/payment/mobile_payment.phtml +43 -28
- package.xml +4 -4
app/code/community/Shopgate/Framework/Block/Payment/MobilePayment.php
CHANGED
@@ -21,12 +21,7 @@
|
|
21 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
22 |
*/
|
23 |
|
24 |
-
|
25 |
-
* User: Peter Liebig
|
26 |
-
* Date: 27.01.14
|
27 |
-
* Time: 15:55
|
28 |
-
* E-Mail: p.liebig@me.com
|
29 |
-
*/
|
30 |
|
31 |
/**
|
32 |
* mobile payment block
|
@@ -34,12 +29,10 @@
|
|
34 |
* @author Shopgate GmbH, 35510 Butzbach, DE
|
35 |
* @package Shopgate_Framework
|
36 |
*/
|
37 |
-
include_once Mage::getBaseDir("lib") . '/Shopgate/shopgate.php';
|
38 |
-
|
39 |
class Shopgate_Framework_Block_Payment_MobilePayment extends Mage_Payment_Block_Info
|
40 |
{
|
41 |
/**
|
42 |
-
*
|
43 |
*/
|
44 |
protected function _construct()
|
45 |
{
|
@@ -60,7 +53,7 @@ class Shopgate_Framework_Block_Payment_MobilePayment extends Mage_Payment_Block_
|
|
60 |
*/
|
61 |
public function getShopgateOrder()
|
62 |
{
|
63 |
-
return Mage::getModel(
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -94,11 +87,36 @@ class Shopgate_Framework_Block_Payment_MobilePayment extends Mage_Payment_Block_
|
|
94 |
$order = $this->getOrder();
|
95 |
$shopgateOrder = $this->getShopgateOrder()->getShopgateOrderObject();
|
96 |
|
97 |
-
|
|
|
|
|
|
|
|
|
98 |
|
99 |
return $isDifferent;
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/**
|
103 |
* Helper function to print PaymentInfo
|
104 |
* recursively
|
@@ -114,13 +132,15 @@ class Shopgate_Framework_Block_Payment_MobilePayment extends Mage_Payment_Block_
|
|
114 |
if (is_array($_value)) {
|
115 |
return $this->printPaymentInfo($_value, $html);
|
116 |
} else {
|
117 |
-
$html .= '<span style="font-weight: bold">'
|
118 |
-
. $this->__(
|
119 |
-
|
|
|
|
|
120 |
}
|
121 |
}
|
122 |
} else {
|
123 |
-
$html .= $this->__($this->escapeHtml($list)) .
|
124 |
}
|
125 |
|
126 |
return $html;
|
21 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
22 |
*/
|
23 |
|
24 |
+
include_once Mage::getBaseDir("lib") . '/Shopgate/shopgate.php';
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
/**
|
27 |
* mobile payment block
|
29 |
* @author Shopgate GmbH, 35510 Butzbach, DE
|
30 |
* @package Shopgate_Framework
|
31 |
*/
|
|
|
|
|
32 |
class Shopgate_Framework_Block_Payment_MobilePayment extends Mage_Payment_Block_Info
|
33 |
{
|
34 |
/**
|
35 |
+
* Sets template directly
|
36 |
*/
|
37 |
protected function _construct()
|
38 |
{
|
53 |
*/
|
54 |
public function getShopgateOrder()
|
55 |
{
|
56 |
+
return Mage::getModel('shopgate/shopgate_order')->load($this->getOrder()->getId(), 'order_id');
|
57 |
}
|
58 |
|
59 |
/**
|
87 |
$order = $this->getOrder();
|
88 |
$shopgateOrder = $this->getShopgateOrder()->getShopgateOrderObject();
|
89 |
|
90 |
+
if (!$shopgateOrder instanceof ShopgateOrder) {
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
$isDifferent = !Mage::helper('shopgate')->isOrderTotalCorrect($shopgateOrder, $order, $msg);
|
95 |
|
96 |
return $isDifferent;
|
97 |
}
|
98 |
|
99 |
+
/**
|
100 |
+
* Error message wrapper
|
101 |
+
*
|
102 |
+
* @param $errorMessage - wraps the message with error markup
|
103 |
+
*
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
public function printHtmlError($errorMessage)
|
107 |
+
{
|
108 |
+
$html = '';
|
109 |
+
if (!$errorMessage) {
|
110 |
+
return $html;
|
111 |
+
}
|
112 |
+
|
113 |
+
$html .= '<strong style="color: red; font-size: 1.2em;">';
|
114 |
+
$html .= $this->__($errorMessage);
|
115 |
+
$html .= '</strong><br/>';
|
116 |
+
|
117 |
+
return $html;
|
118 |
+
}
|
119 |
+
|
120 |
/**
|
121 |
* Helper function to print PaymentInfo
|
122 |
* recursively
|
132 |
if (is_array($_value)) {
|
133 |
return $this->printPaymentInfo($_value, $html);
|
134 |
} else {
|
135 |
+
$html .= '<span style="font-weight: bold">'
|
136 |
+
. $this->__(
|
137 |
+
uc_words($_key, ' ') . '</span> : '
|
138 |
+
. uc_words($_value, ' ') . '<br />'
|
139 |
+
);
|
140 |
}
|
141 |
}
|
142 |
} else {
|
143 |
+
$html .= $this->__($this->escapeHtml($list)) . '<br />';
|
144 |
}
|
145 |
|
146 |
return $html;
|
app/code/community/Shopgate/Framework/Helper/Billsafe/Client.php
CHANGED
@@ -71,10 +71,10 @@ class Shopgate_Framework_Helper_Billsafe_Client extends Netresearch_Billsafe_Mod
|
|
71 |
* Retrieves the Shopgate order number, else retrieves the
|
72 |
* real ID. This ensures safety of this rewrite.
|
73 |
*
|
74 |
-
* @param Mage_Sales_Model_Order $mageOrder
|
75 |
* @return string | int
|
76 |
*/
|
77 |
-
private function getShopgateOrderNumber(
|
78 |
{
|
79 |
$sgOrder = Mage::getModel('shopgate/shopgate_order')->load($mageOrder->getId(), 'order_id');
|
80 |
|
71 |
* Retrieves the Shopgate order number, else retrieves the
|
72 |
* real ID. This ensures safety of this rewrite.
|
73 |
*
|
74 |
+
* @param Mage_Sales_Model_Order | Varien_Object $mageOrder - comes in as Varien on import, order from ship observer
|
75 |
* @return string | int
|
76 |
*/
|
77 |
+
private function getShopgateOrderNumber(Varien_Object $mageOrder)
|
78 |
{
|
79 |
$sgOrder = Mage::getModel('shopgate/shopgate_order')->load($mageOrder->getId(), 'order_id');
|
80 |
|
app/code/community/Shopgate/Framework/Helper/Config.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shopgate GmbH
|
4 |
*
|
@@ -20,46 +21,43 @@
|
|
20 |
*
|
21 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
22 |
*/
|
23 |
-
|
24 |
-
/**
|
25 |
-
* User: Peter Liebig
|
26 |
-
* Date: 22.01.14
|
27 |
-
* Time: 15:06
|
28 |
-
* E-Mail: p.liebig@me.com
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* config helper
|
33 |
-
*
|
34 |
-
* @author Shopgate GmbH, 35510 Butzbach, DE
|
35 |
-
* @package Shopgate_Framework
|
36 |
-
*/
|
37 |
class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
38 |
{
|
39 |
/**
|
40 |
-
*
|
41 |
*/
|
42 |
const COMMUNITY_EDITION = 'Community';
|
43 |
|
44 |
/**
|
45 |
-
*
|
46 |
*/
|
47 |
const ENTERPRISE_EDITION = 'Enterprise';
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
/**
|
50 |
* When native COD & Bank payments
|
51 |
* were introduced
|
52 |
-
*
|
53 |
* @var string
|
54 |
*/
|
55 |
protected $_magentoVersion1700 = '';
|
56 |
-
|
57 |
/**
|
58 |
* When PayPal UI was updated
|
|
|
59 |
* @var string
|
60 |
*/
|
61 |
protected $_magentoVersion1701 = '';
|
62 |
|
|
|
|
|
|
|
|
|
|
|
63 |
/**
|
64 |
* @var string
|
65 |
*/
|
@@ -76,11 +74,11 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
76 |
protected $_config = null;
|
77 |
|
78 |
/**
|
79 |
-
*
|
80 |
*/
|
81 |
public function __construct()
|
82 |
{
|
83 |
-
$this->
|
84 |
$this->_magentoVersion1701 = ($this->getEdition() == 'Enterprise') ? '1.12.0.2' : '1.7.0.1';
|
85 |
$this->_magentoVersion1700 = ($this->getEdition() == 'Enterprise') ? '1.12.0.0' : '1.7.0.0';
|
86 |
$this->_magentoVersion16 = ($this->getEdition() == 'Enterprise') ? '1.11.0.0' : '1.6.0.0';
|
@@ -89,7 +87,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
-
*
|
93 |
*
|
94 |
* @return string
|
95 |
*/
|
@@ -100,7 +98,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
100 |
if (method_exists('Mage', 'getEdition')) {
|
101 |
$edition = Mage::getEdition();
|
102 |
} else {
|
103 |
-
$dir =
|
104 |
if (file_exists($dir)) {
|
105 |
$edition = self::ENTERPRISE_EDITION;
|
106 |
}
|
@@ -118,6 +116,14 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
118 |
return version_compare(Mage::getVersion(), $version, "<");
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
/**
|
122 |
* @return bool
|
123 |
*/
|
@@ -125,10 +131,8 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
125 |
{
|
126 |
return $this->getIsMagentoVersionLower($this->_magentoVersion1700);
|
127 |
}
|
128 |
-
|
129 |
/**
|
130 |
-
* compare version if it is lower than 1.7.0.1
|
131 |
-
*
|
132 |
* @return bool
|
133 |
*/
|
134 |
public function getIsMagentoVersionLower1701()
|
@@ -137,18 +141,14 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
137 |
}
|
138 |
|
139 |
/**
|
140 |
-
* Compare version if it is lower than 1.6
|
141 |
-
*
|
142 |
* @return mixed
|
143 |
*/
|
144 |
public function getIsMagentoVersionLower16()
|
145 |
{
|
146 |
return $this->getIsMagentoVersionLower($this->_magentoVersion16);
|
147 |
}
|
148 |
-
|
149 |
/**
|
150 |
-
* Compare version if it is lower than 1.5
|
151 |
-
*
|
152 |
* @return mixed
|
153 |
*/
|
154 |
public function getIsMagentoVersionLower15()
|
@@ -157,8 +157,6 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
157 |
}
|
158 |
|
159 |
/**
|
160 |
-
* compare version if it is lower than 1.4.1.0
|
161 |
-
*
|
162 |
* @return mixed
|
163 |
*/
|
164 |
public function getIsMagentoVersionLower1410()
|
@@ -180,7 +178,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
180 |
}
|
181 |
|
182 |
/**
|
183 |
-
*
|
184 |
*
|
185 |
* @param int $shopnumber
|
186 |
* @param int $storeViewId
|
@@ -209,26 +207,26 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
209 |
}
|
210 |
|
211 |
/* a shopnumber has a default store view set exactly like the base store view for the new shopnumber */
|
212 |
-
$resource
|
213 |
$table_config_data = $resource->getTableName('core/config_data');
|
214 |
-
$collection
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
|
233 |
foreach ($collection as $item) {
|
234 |
if (isset($item['default_store_view'])
|
@@ -242,7 +240,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
242 |
}
|
243 |
|
244 |
/**
|
245 |
-
*
|
246 |
*
|
247 |
* @param int $websiteId
|
248 |
* @param int $shopnumber
|
@@ -286,8 +284,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
286 |
*/
|
287 |
public function hasShopgateConnections()
|
288 |
{
|
289 |
-
return $this->getShopgateConnections()
|
290 |
-
->getSize();
|
291 |
}
|
292 |
|
293 |
/**
|
@@ -335,7 +332,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
335 |
|
336 |
/**
|
337 |
* Retrieves store id based on store code
|
338 |
-
*
|
339 |
* @param $storeCode
|
340 |
* @return int
|
341 |
*/
|
@@ -354,7 +351,7 @@ class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
|
354 |
|
355 |
/**
|
356 |
* Retrieves the oauth token of the store
|
357 |
-
*
|
358 |
* @param null $storeId
|
359 |
* @return mixed - oauth if it exists
|
360 |
*/
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Shopgate GmbH
|
5 |
*
|
21 |
*
|
22 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
class Shopgate_Framework_Helper_Config extends Mage_Core_Helper_Abstract
|
25 |
{
|
26 |
/**
|
27 |
+
* Const for community
|
28 |
*/
|
29 |
const COMMUNITY_EDITION = 'Community';
|
30 |
|
31 |
/**
|
32 |
+
* Const for enterprise
|
33 |
*/
|
34 |
const ENTERPRISE_EDITION = 'Enterprise';
|
35 |
|
36 |
+
/**
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
protected $_magentoVersion19 = '';
|
40 |
+
|
41 |
/**
|
42 |
* When native COD & Bank payments
|
43 |
* were introduced
|
44 |
+
*
|
45 |
* @var string
|
46 |
*/
|
47 |
protected $_magentoVersion1700 = '';
|
48 |
+
|
49 |
/**
|
50 |
* When PayPal UI was updated
|
51 |
+
*
|
52 |
* @var string
|
53 |
*/
|
54 |
protected $_magentoVersion1701 = '';
|
55 |
|
56 |
+
/**
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
protected $_magentoVersion16;
|
60 |
+
|
61 |
/**
|
62 |
* @var string
|
63 |
*/
|
74 |
protected $_config = null;
|
75 |
|
76 |
/**
|
77 |
+
* Construct for helper
|
78 |
*/
|
79 |
public function __construct()
|
80 |
{
|
81 |
+
$this->_magentoVersion19 = ($this->getEdition() == 'Enterprise') ? '1.14' : '1.9';
|
82 |
$this->_magentoVersion1701 = ($this->getEdition() == 'Enterprise') ? '1.12.0.2' : '1.7.0.1';
|
83 |
$this->_magentoVersion1700 = ($this->getEdition() == 'Enterprise') ? '1.12.0.0' : '1.7.0.0';
|
84 |
$this->_magentoVersion16 = ($this->getEdition() == 'Enterprise') ? '1.11.0.0' : '1.6.0.0';
|
87 |
}
|
88 |
|
89 |
/**
|
90 |
+
* Get edition of magento
|
91 |
*
|
92 |
* @return string
|
93 |
*/
|
98 |
if (method_exists('Mage', 'getEdition')) {
|
99 |
$edition = Mage::getEdition();
|
100 |
} else {
|
101 |
+
$dir = Mage::getBaseDir('code') . DS . 'core' . DS . self::ENTERPRISE_EDITION;
|
102 |
if (file_exists($dir)) {
|
103 |
$edition = self::ENTERPRISE_EDITION;
|
104 |
}
|
116 |
return version_compare(Mage::getVersion(), $version, "<");
|
117 |
}
|
118 |
|
119 |
+
/**
|
120 |
+
* @return bool
|
121 |
+
*/
|
122 |
+
public function getIsMagentoVersionLower19()
|
123 |
+
{
|
124 |
+
return $this->getIsMagentoVersionLower($this->_magentoVersion19);
|
125 |
+
}
|
126 |
+
|
127 |
/**
|
128 |
* @return bool
|
129 |
*/
|
131 |
{
|
132 |
return $this->getIsMagentoVersionLower($this->_magentoVersion1700);
|
133 |
}
|
134 |
+
|
135 |
/**
|
|
|
|
|
136 |
* @return bool
|
137 |
*/
|
138 |
public function getIsMagentoVersionLower1701()
|
141 |
}
|
142 |
|
143 |
/**
|
|
|
|
|
144 |
* @return mixed
|
145 |
*/
|
146 |
public function getIsMagentoVersionLower16()
|
147 |
{
|
148 |
return $this->getIsMagentoVersionLower($this->_magentoVersion16);
|
149 |
}
|
150 |
+
|
151 |
/**
|
|
|
|
|
152 |
* @return mixed
|
153 |
*/
|
154 |
public function getIsMagentoVersionLower15()
|
157 |
}
|
158 |
|
159 |
/**
|
|
|
|
|
160 |
* @return mixed
|
161 |
*/
|
162 |
public function getIsMagentoVersionLower1410()
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
+
* Checks if a shopnumber is already registered or a storeview has already a shopnumber set explicit
|
182 |
*
|
183 |
* @param int $shopnumber
|
184 |
* @param int $storeViewId
|
207 |
}
|
208 |
|
209 |
/* a shopnumber has a default store view set exactly like the base store view for the new shopnumber */
|
210 |
+
$resource = Mage::getSingleton('core/resource');
|
211 |
$table_config_data = $resource->getTableName('core/config_data');
|
212 |
+
$collection = Mage::getModel('core/config_data')->getCollection()
|
213 |
+
->addFieldToFilter(
|
214 |
+
'main_table.path',
|
215 |
+
Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_SHOP_NUMBER
|
216 |
+
)
|
217 |
+
->addFieldToFilter('main_table.scope', 'websites')
|
218 |
+
->addFieldToFilter('main_table.value', array('nin' => array('', null)))
|
219 |
+
->addFieldToFilter(
|
220 |
+
'dsv.path',
|
221 |
+
Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_SHOP_DEFAULT_STORE
|
222 |
+
)
|
223 |
+
->getSelect()
|
224 |
+
->joinInner(
|
225 |
+
array('dsv' => $table_config_data),
|
226 |
+
'dsv.scope = main_table.scope AND dsv.scope_id = main_table.scope_id',
|
227 |
+
array('default_store_view' => 'value')
|
228 |
+
)->query()
|
229 |
+
->fetchAll();
|
230 |
|
231 |
foreach ($collection as $item) {
|
232 |
if (isset($item['default_store_view'])
|
240 |
}
|
241 |
|
242 |
/**
|
243 |
+
* Fetches any shopnumber definition in a given website scope
|
244 |
*
|
245 |
* @param int $websiteId
|
246 |
* @param int $shopnumber
|
284 |
*/
|
285 |
public function hasShopgateConnections()
|
286 |
{
|
287 |
+
return $this->getShopgateConnections()->getSize();
|
|
|
288 |
}
|
289 |
|
290 |
/**
|
332 |
|
333 |
/**
|
334 |
* Retrieves store id based on store code
|
335 |
+
*
|
336 |
* @param $storeCode
|
337 |
* @return int
|
338 |
*/
|
351 |
|
352 |
/**
|
353 |
* Retrieves the oauth token of the store
|
354 |
+
*
|
355 |
* @param null $storeId
|
356 |
* @return mixed - oauth if it exists
|
357 |
*/
|
app/code/community/Shopgate/Framework/Helper/Coupon.php
CHANGED
@@ -192,15 +192,19 @@ class Shopgate_Framework_Helper_Coupon extends Mage_Core_Helper_Abstract
|
|
192 |
/**
|
193 |
* Check coupons for validation and apply shopping cart price rules to the cart
|
194 |
*
|
195 |
-
* @param Mage_Checkout_Model_Cart
|
196 |
-
* @param ShopgateCart
|
197 |
-
* @param bool
|
|
|
198 |
*
|
199 |
* @return ShopgateExternalCoupon[]
|
200 |
-
* @throws ShopgateLibraryException
|
201 |
*/
|
202 |
-
public function checkCouponsAndCartRules(
|
203 |
-
|
|
|
|
|
|
|
|
|
204 |
/* @var $mageQuote Mage_Sales_Model_Quote */
|
205 |
/* @var $mageCart Mage_Checkout_Model_Cart */
|
206 |
/* @var $mageCoupon Mage_SalesRule_Model_Coupon */
|
@@ -364,23 +368,48 @@ class Shopgate_Framework_Helper_Coupon extends Mage_Core_Helper_Abstract
|
|
364 |
}
|
365 |
|
366 |
/**
|
367 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
*
|
369 |
-
* @param
|
370 |
*
|
371 |
-
* @return
|
372 |
*/
|
373 |
-
public function
|
374 |
{
|
375 |
-
$
|
376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
/* @var $coupon ShopgateExternalCoupon */
|
378 |
-
if ($coupon->getCode() !==
|
379 |
-
$
|
380 |
}
|
381 |
}
|
382 |
-
$
|
383 |
-
|
384 |
-
return $order;
|
385 |
}
|
386 |
}
|
192 |
/**
|
193 |
* Check coupons for validation and apply shopping cart price rules to the cart
|
194 |
*
|
195 |
+
* @param Mage_Checkout_Model_Cart $mageCart
|
196 |
+
* @param ShopgateCart $cart
|
197 |
+
* @param bool $useTaxClasses
|
198 |
+
* @param Shopgate_Framework_Model_Modules_Affiliate_Factory $factory
|
199 |
*
|
200 |
* @return ShopgateExternalCoupon[]
|
|
|
201 |
*/
|
202 |
+
public function checkCouponsAndCartRules(
|
203 |
+
$mageCart,
|
204 |
+
ShopgateCart $cart,
|
205 |
+
$useTaxClasses,
|
206 |
+
Shopgate_Framework_Model_Modules_Affiliate_Factory $factory
|
207 |
+
) {
|
208 |
/* @var $mageQuote Mage_Sales_Model_Quote */
|
209 |
/* @var $mageCart Mage_Checkout_Model_Cart */
|
210 |
/* @var $mageCoupon Mage_SalesRule_Model_Coupon */
|
368 |
}
|
369 |
|
370 |
/**
|
371 |
+
* Remove CartRule coupons from an array
|
372 |
+
*
|
373 |
+
* @param ShopgateExternalCoupon[] $coupons
|
374 |
+
*
|
375 |
+
* @return ShopgateExternalCoupon[] $coupons
|
376 |
+
*/
|
377 |
+
public function removeCartRuleCoupons($coupons)
|
378 |
+
{
|
379 |
+
$code = self::CART_RULE_COUPON_CODE;
|
380 |
+
return $this->removeCouponsByCode($coupons, $code);
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Remove Affiliate coupons from an array
|
385 |
*
|
386 |
+
* @param ShopgateExternalCoupon[] $coupons
|
387 |
*
|
388 |
+
* @return ShopgateExternalCoupon[] $coupons
|
389 |
*/
|
390 |
+
public function removeAffiliateCoupons($coupons)
|
391 |
{
|
392 |
+
$code = Shopgate_Framework_Model_Modules_Affiliate_Utility::COUPON_TYPE;
|
393 |
+
return $this->removeCouponsByCode($coupons, $code);
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Remove coupons with a specific code from an array
|
398 |
+
*
|
399 |
+
* @param ShopgateExternalCoupon[] $coupons
|
400 |
+
* @param string $code
|
401 |
+
*
|
402 |
+
* @return ShopgateExternalCoupon[] $filteredCoupons
|
403 |
+
*/
|
404 |
+
public function removeCouponsByCode($coupons, $code)
|
405 |
+
{
|
406 |
+
$filteredCoupons = array();
|
407 |
+
foreach ($coupons as $coupon) {
|
408 |
/* @var $coupon ShopgateExternalCoupon */
|
409 |
+
if ($coupon->getCode() !== $code) {
|
410 |
+
$filteredCoupons[] = $coupon;
|
411 |
}
|
412 |
}
|
413 |
+
return $filteredCoupons;
|
|
|
|
|
414 |
}
|
415 |
}
|
app/code/community/Shopgate/Framework/Helper/Data.php
CHANGED
@@ -540,8 +540,16 @@ class Shopgate_Framework_Helper_Data extends Mage_Core_Helper_Abstract
|
|
540 |
}
|
541 |
|
542 |
ShopgateLogger::getInstance()->log("# Start of setShippingMethod process", ShopgateLogger::LOGTYPE_DEBUG);
|
543 |
-
$
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
|
546 |
ShopgateLogger::getInstance()->log(
|
547 |
" Shipping method set: '" . $shippingAddress->getShippingMethod() . "'",
|
540 |
}
|
541 |
|
542 |
ShopgateLogger::getInstance()->log("# Start of setShippingMethod process", ShopgateLogger::LOGTYPE_DEBUG);
|
543 |
+
$infos = $order->getShippingInfos();
|
544 |
+
if ($order->getShippingType() == Shopgate_Framework_Model_Shopgate_Shipping_Mapper::SHIPPING_TYPE_PLUGINAPI
|
545 |
+
&& $infos->getName()
|
546 |
+
) {
|
547 |
+
$shippingMethod = $infos->getName();
|
548 |
+
} else {
|
549 |
+
$mapper = Mage::getModel('shopgate/shopgate_shipping_mapper')->init($shippingAddress, $order);
|
550 |
+
$shippingMethod = $mapper->getCarrier() . '_' . $mapper->getMethod();
|
551 |
+
}
|
552 |
+
$shippingAddress->setShippingMethod($shippingMethod);
|
553 |
|
554 |
ShopgateLogger::getInstance()->log(
|
555 |
" Shipping method set: '" . $shippingAddress->getShippingMethod() . "'",
|
app/code/community/Shopgate/Framework/Helper/Sales.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shopgate GmbH
|
4 |
*
|
@@ -18,21 +19,8 @@
|
|
18 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
-
* @author
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* User: pliebig
|
26 |
-
* Date: 18.03.14
|
27 |
-
* Time: 18:15
|
28 |
-
* E-Mail: p.liebig@me.com
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* sales helper for everything related to sales / orders / qupte and stuff
|
33 |
-
*
|
34 |
-
* @author Shopgate GmbH, 35510 Butzbach, DE
|
35 |
-
* @package Shopgate_Framework
|
36 |
*/
|
37 |
class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
38 |
{
|
@@ -51,24 +39,23 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
51 |
$phoneNumber = $order->getPhone();
|
52 |
}
|
53 |
if (empty($phoneNumber)) {
|
54 |
-
$phoneNumber =
|
55 |
}
|
56 |
|
57 |
$region = Mage::helper('shopgate/customer')->getMagentoRegionByShopgateAddress($address);
|
58 |
|
59 |
-
$prefix =
|
60 |
-
if ($address->getGender() ==
|
61 |
-
$prefix =
|
62 |
}
|
63 |
-
$prefix = $this->_getHelper()->__($prefix);
|
64 |
|
65 |
$addressData = array(
|
66 |
-
'prefix' => $prefix,
|
67 |
'company' => $address->getCompany(),
|
68 |
'firstname' => $address->getFirstName(),
|
69 |
'lastname' => $address->getLastName(),
|
70 |
'street' => $address->getStreet1()
|
71 |
-
. ($address->getStreet2() ?
|
72 |
'city' => $address->getCity(),
|
73 |
'postcode' => $address->getZipcode(),
|
74 |
'telephone' => $phoneNumber,
|
@@ -83,7 +70,7 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
83 |
$customFields[] = array($field->getInternalFieldName() => $field->getValue());
|
84 |
}
|
85 |
$addressData = array_merge($addressData, $customFields);
|
86 |
-
|
87 |
return $addressData;
|
88 |
}
|
89 |
|
@@ -101,6 +88,7 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
101 |
$methods = array();
|
102 |
$paymentMethods = Mage::helper('payment')->getStoreMethods(Mage::app()->getStore()->getId(), $quote);
|
103 |
|
|
|
104 |
foreach ($paymentMethods as $_paymentMethod) {
|
105 |
|
106 |
if (!$_paymentMethod->canUseForCountry($quote->getBillingAddress()->getCountry())
|
@@ -141,27 +129,33 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
141 |
*/
|
142 |
public function getShippingMethods($mageCart)
|
143 |
{
|
144 |
-
$methods = array();
|
145 |
/** @var Mage_Sales_Model_Quote_Address $shippingAddress */
|
146 |
-
$shippingAddress
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
$shippingAddress->collectTotals();
|
148 |
$shippingAddress->collectShippingRates();
|
149 |
-
$calc = Mage::getSingleton('tax/calculation');
|
150 |
-
$rates = $calc->getRatesForAllProductTaxClasses($calc->getRateOriginRequest());
|
151 |
-
$taxClassIdShipping = Mage::helper('tax')->getShippingTaxClass(
|
152 |
-
Mage::helper("shopgate/config")->getConfig()->getStoreViewId());
|
153 |
-
$taxRateShipping = $taxClassIdShipping ? $rates[$taxClassIdShipping] : $taxClassIdShipping;
|
154 |
|
|
|
|
|
155 |
/** @var Mage_Sales_Model_Quote_Address_Rate $_rate */
|
156 |
foreach ($shippingAddress->getShippingRatesCollection() as $_rate) {
|
157 |
if ($_rate instanceof Mage_Shipping_Model_Rate_Result_Error
|
158 |
|| strpos($_rate->getCode(), 'error') !== false
|
159 |
-
|
160 |
) {
|
161 |
/* skip errors so they dont get processed as valid shipping rates without any cost */
|
162 |
ShopgateLogger::getInstance()->log(
|
163 |
-
|
164 |
-
|
165 |
);
|
166 |
continue;
|
167 |
}
|
@@ -204,14 +198,14 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
204 |
|
205 |
/** @var Mage_Sales_Model_Quote_Item $_item */
|
206 |
foreach ($quote->getAllVisibleItems() as $_item) {
|
207 |
-
$price
|
208 |
$priceIncludesTax = Mage::helper('tax')->priceIncludesTax($quote->getStore());
|
209 |
-
$percent
|
210 |
if ($priceIncludesTax) {
|
211 |
$priceInclTax = $price;
|
212 |
-
$priceExclTax = $price / (1 + ($percent/100));
|
213 |
} else {
|
214 |
-
$priceInclTax = $price * (1 + ($percent/100));
|
215 |
$priceExclTax = $price;
|
216 |
}
|
217 |
$items[] = $validator->validateStock($_item, $priceInclTax, $priceExclTax);
|
@@ -251,20 +245,24 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
251 |
protected function _getCustomerGroups(ShopgateCart $cart, $websiteId)
|
252 |
{
|
253 |
/** @var Mage_Customer_Model_Customer $customer */
|
254 |
-
$customer
|
255 |
$externalCustomerId = $cart->getExternalCustomerId();
|
256 |
|
257 |
if ($externalCustomerId) {
|
258 |
$customer->load($externalCustomerId);
|
259 |
-
} else
|
260 |
-
$
|
261 |
-
|
262 |
-
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
-
if(!$externalCustomerId && $customer->getId()) {
|
265 |
$cart->setExternalCustomerId($customer->getId());
|
266 |
}
|
267 |
-
|
268 |
return Mage::helper('shopgate/customer')->getShopgateCustomerGroups($customer);
|
269 |
}
|
270 |
|
@@ -278,22 +276,22 @@ class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
|
278 |
*/
|
279 |
public function getCustomerData(ShopgateCart $cart, $storeViewId)
|
280 |
{
|
281 |
-
$websiteId
|
282 |
-
|
283 |
-
$result
|
284 |
|
285 |
-
if ($customerGroups
|
286 |
foreach ($customerGroups as $customerGroup) {
|
287 |
-
$result[
|
288 |
}
|
289 |
}
|
290 |
|
291 |
-
if (isset($result[
|
292 |
-
$customerGroupId = $result[
|
293 |
$taxClassId = Mage::getModel('customer/group')->load($customerGroupId)->getTaxClassId();
|
294 |
$taxClassModel = Mage::getModel('tax/class')->load($taxClassId);
|
295 |
|
296 |
-
$result[
|
297 |
}
|
298 |
|
299 |
return new ShopgateCartCustomer($result);
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Shopgate GmbH
|
5 |
*
|
19 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @description Sales helper for everything related to sales / orders / quote and stuff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
*/
|
25 |
class Shopgate_Framework_Helper_Sales extends Mage_Core_Helper_Abstract
|
26 |
{
|
39 |
$phoneNumber = $order->getPhone();
|
40 |
}
|
41 |
if (empty($phoneNumber)) {
|
42 |
+
$phoneNumber = 'n.a.';
|
43 |
}
|
44 |
|
45 |
$region = Mage::helper('shopgate/customer')->getMagentoRegionByShopgateAddress($address);
|
46 |
|
47 |
+
$prefix = 'Mr.';
|
48 |
+
if ($address->getGender() == 'f') {
|
49 |
+
$prefix = 'Mrs.';
|
50 |
}
|
|
|
51 |
|
52 |
$addressData = array(
|
53 |
+
'prefix' => $this->_getHelper()->__($prefix),
|
54 |
'company' => $address->getCompany(),
|
55 |
'firstname' => $address->getFirstName(),
|
56 |
'lastname' => $address->getLastName(),
|
57 |
'street' => $address->getStreet1()
|
58 |
+
. ($address->getStreet2() ? '\n' . $address->getStreet2() : ''),
|
59 |
'city' => $address->getCity(),
|
60 |
'postcode' => $address->getZipcode(),
|
61 |
'telephone' => $phoneNumber,
|
70 |
$customFields[] = array($field->getInternalFieldName() => $field->getValue());
|
71 |
}
|
72 |
$addressData = array_merge($addressData, $customFields);
|
73 |
+
|
74 |
return $addressData;
|
75 |
}
|
76 |
|
88 |
$methods = array();
|
89 |
$paymentMethods = Mage::helper('payment')->getStoreMethods(Mage::app()->getStore()->getId(), $quote);
|
90 |
|
91 |
+
/** @var Mage_Payment_Model_Method_Abstract $_paymentMethod */
|
92 |
foreach ($paymentMethods as $_paymentMethod) {
|
93 |
|
94 |
if (!$_paymentMethod->canUseForCountry($quote->getBillingAddress()->getCountry())
|
129 |
*/
|
130 |
public function getShippingMethods($mageCart)
|
131 |
{
|
|
|
132 |
/** @var Mage_Sales_Model_Quote_Address $shippingAddress */
|
133 |
+
$shippingAddress = $mageCart->getQuote()->getShippingAddress();
|
134 |
+
$billingAddress = $mageCart->getQuote()->getBillingAddress();
|
135 |
+
$customerTaxClass = $mageCart->getQuote()->getCustomer()->getTaxClassId();
|
136 |
+
$storeViewId = Mage::helper('shopgate/config')->getConfig()->getStoreViewId();
|
137 |
+
$store = Mage::app()->getStore($storeViewId);
|
138 |
+
$calc = Mage::getSingleton('tax/calculation');
|
139 |
+
$rateRequest = $calc->getRateRequest($shippingAddress, $billingAddress, $customerTaxClass, $store);
|
140 |
+
$rates = $calc->getRatesForAllProductTaxClasses($rateRequest);
|
141 |
+
$taxClassIdShipping = Mage::helper('tax')->getShippingTaxClass($storeViewId);
|
142 |
+
$taxRateShipping = $taxClassIdShipping ? $rates[$taxClassIdShipping] : 0;
|
143 |
+
|
144 |
$shippingAddress->collectTotals();
|
145 |
$shippingAddress->collectShippingRates();
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
+
|
148 |
+
$methods = array();
|
149 |
/** @var Mage_Sales_Model_Quote_Address_Rate $_rate */
|
150 |
foreach ($shippingAddress->getShippingRatesCollection() as $_rate) {
|
151 |
if ($_rate instanceof Mage_Shipping_Model_Rate_Result_Error
|
152 |
|| strpos($_rate->getCode(), 'error') !== false
|
153 |
+
|| $_rate->getCarrierInstance() == false
|
154 |
) {
|
155 |
/* skip errors so they dont get processed as valid shipping rates without any cost */
|
156 |
ShopgateLogger::getInstance()->log(
|
157 |
+
"Skipping Shipping Rate because of Error Type: '" . $_rate->getCode() . "'",
|
158 |
+
ShopgateLogger::LOGTYPE_DEBUG
|
159 |
);
|
160 |
continue;
|
161 |
}
|
198 |
|
199 |
/** @var Mage_Sales_Model_Quote_Item $_item */
|
200 |
foreach ($quote->getAllVisibleItems() as $_item) {
|
201 |
+
$price = $_item->getProduct()->getFinalPrice();
|
202 |
$priceIncludesTax = Mage::helper('tax')->priceIncludesTax($quote->getStore());
|
203 |
+
$percent = $_item->getTaxPercent();
|
204 |
if ($priceIncludesTax) {
|
205 |
$priceInclTax = $price;
|
206 |
+
$priceExclTax = $price / (1 + ($percent / 100));
|
207 |
} else {
|
208 |
+
$priceInclTax = $price * (1 + ($percent / 100));
|
209 |
$priceExclTax = $price;
|
210 |
}
|
211 |
$items[] = $validator->validateStock($_item, $priceInclTax, $priceExclTax);
|
245 |
protected function _getCustomerGroups(ShopgateCart $cart, $websiteId)
|
246 |
{
|
247 |
/** @var Mage_Customer_Model_Customer $customer */
|
248 |
+
$customer = Mage::getModel('customer/customer');
|
249 |
$externalCustomerId = $cart->getExternalCustomerId();
|
250 |
|
251 |
if ($externalCustomerId) {
|
252 |
$customer->load($externalCustomerId);
|
253 |
+
} else {
|
254 |
+
if ($cart->getDeliveryAddress() && $cart->getDeliveryAddress()->getMail()) {
|
255 |
+
$customer->setWebsiteId($websiteId)->loadByEmail($cart->getDeliveryAddress()->getMail());
|
256 |
+
} else {
|
257 |
+
if ($cart->getInvoiceAddress() && $cart->getInvoiceAddress()->getMail()) {
|
258 |
+
$customer->setWebsiteId($websiteId)->loadByEmail($cart->getInvoiceAddress()->getMail());
|
259 |
+
}
|
260 |
+
}
|
261 |
}
|
262 |
+
if (!$externalCustomerId && $customer->getId()) {
|
263 |
$cart->setExternalCustomerId($customer->getId());
|
264 |
}
|
265 |
+
|
266 |
return Mage::helper('shopgate/customer')->getShopgateCustomerGroups($customer);
|
267 |
}
|
268 |
|
276 |
*/
|
277 |
public function getCustomerData(ShopgateCart $cart, $storeViewId)
|
278 |
{
|
279 |
+
$websiteId = Mage::getModel('core/store')->load($storeViewId)->getWebsite()->getId();
|
280 |
+
$customerGroups = $this->_getCustomerGroups($cart, $websiteId);
|
281 |
+
$result = array();
|
282 |
|
283 |
+
if ($customerGroups) {
|
284 |
foreach ($customerGroups as $customerGroup) {
|
285 |
+
$result['customer_groups'][] = new ShopgateCartCustomerGroup($customerGroup);
|
286 |
}
|
287 |
}
|
288 |
|
289 |
+
if (isset($result['customer_groups']) && count($result['customer_groups'])) {
|
290 |
+
$customerGroupId = $result['customer_groups'][0]->getId();
|
291 |
$taxClassId = Mage::getModel('customer/group')->load($customerGroupId)->getTaxClassId();
|
292 |
$taxClassModel = Mage::getModel('tax/class')->load($taxClassId);
|
293 |
|
294 |
+
$result['customer_tax_class_key'] = $taxClassModel->getId() ? $taxClassModel->getClassName() : null;
|
295 |
}
|
296 |
|
297 |
return new ShopgateCartCustomer($result);
|
app/code/community/Shopgate/Framework/Model/Carrier/Fix.php
CHANGED
@@ -18,21 +18,7 @@
|
|
18 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
-
*
|
22 |
-
*/
|
23 |
-
|
24 |
-
/**
|
25 |
-
* User: Peter Liebig
|
26 |
-
* Date: 22.01.14
|
27 |
-
* Time: 15:06
|
28 |
-
* E-Mail: p.liebig@me.com
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* carrier fix model
|
33 |
-
*
|
34 |
-
* @author Shopgate GmbH, 35510 Butzbach, DE
|
35 |
-
* @package Shopgate_Framework
|
36 |
*/
|
37 |
class Shopgate_Framework_Model_Carrier_Fix
|
38 |
extends Mage_Shipping_Model_Carrier_Abstract
|
@@ -62,20 +48,19 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
62 |
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
63 |
{
|
64 |
$result = Mage::getModel('shipping/rate_result');
|
65 |
-
|
66 |
$amount = array(
|
67 |
-
|
68 |
-
|
69 |
);
|
70 |
|
71 |
/* @var $sgOrder ShopgateOrder */
|
72 |
-
$sgOrder = Mage::getSingleton(
|
73 |
if (!$sgOrder) {
|
74 |
return false;
|
75 |
}
|
76 |
|
77 |
$shippingInfo = $sgOrder->getShippingInfos();
|
78 |
-
$carrierTitle = Mage::getStoreConfig(
|
79 |
$methodTitle = $shippingInfo->getName();
|
80 |
$displayName = $shippingInfo->getDisplayName();
|
81 |
if (!empty($displayName)) {
|
@@ -94,13 +79,29 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
94 |
$method->setMethod($this->_method);
|
95 |
$method->setMethodTitle($methodTitle);
|
96 |
|
97 |
-
$
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
102 |
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
$amountShopPayment = $sgOrder->getAmountShopPayment();
|
106 |
if ($amountShopPayment >= 0) {
|
@@ -110,7 +111,7 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
110 |
|| (!Mage::getConfig()->getModuleConfig('Phoenix_CashOnDelivery')->is('active', 'true')
|
111 |
&& !Mage::getConfig()->getModuleConfig('MSP_CashOnDelivery')->is('active', 'true'))
|
112 |
) {
|
113 |
-
$amount[
|
114 |
}
|
115 |
}
|
116 |
|
@@ -128,24 +129,24 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
128 |
*/
|
129 |
protected function _getNetForGrossShipping($amount, $amountContainsTax = true)
|
130 |
{
|
131 |
-
$storeViewId = Mage::helper(
|
132 |
-
$taxClassId = Mage::helper(
|
133 |
|
134 |
$pseudoProduct = new Varien_Object();
|
135 |
$pseudoProduct->setTaxClassId($taxClassId);
|
136 |
|
137 |
-
$returnIncludesTax = Mage::helper(
|
138 |
$customerTaxClass = null;
|
139 |
|
140 |
-
$amount = Mage::helper(
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
);
|
150 |
return $amount;
|
151 |
}
|
@@ -155,7 +156,7 @@ class Shopgate_Framework_Model_Carrier_Fix
|
|
155 |
*/
|
156 |
public function isActive()
|
157 |
{
|
158 |
-
return Mage::helper(
|
159 |
}
|
160 |
|
161 |
/**
|
18 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
*/
|
23 |
class Shopgate_Framework_Model_Carrier_Fix
|
24 |
extends Mage_Shipping_Model_Carrier_Abstract
|
48 |
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
49 |
{
|
50 |
$result = Mage::getModel('shipping/rate_result');
|
|
|
51 |
$amount = array(
|
52 |
+
'shipping' => 0,
|
53 |
+
'payment' => 0
|
54 |
);
|
55 |
|
56 |
/* @var $sgOrder ShopgateOrder */
|
57 |
+
$sgOrder = Mage::getSingleton('core/session')->getData('shopgate_order');
|
58 |
if (!$sgOrder) {
|
59 |
return false;
|
60 |
}
|
61 |
|
62 |
$shippingInfo = $sgOrder->getShippingInfos();
|
63 |
+
$carrierTitle = Mage::getStoreConfig('shopgate/orders/shipping_title');
|
64 |
$methodTitle = $shippingInfo->getName();
|
65 |
$displayName = $shippingInfo->getDisplayName();
|
66 |
if (!empty($displayName)) {
|
79 |
$method->setMethod($this->_method);
|
80 |
$method->setMethodTitle($methodTitle);
|
81 |
|
82 |
+
$scopeId = Mage::helper('shopgate/config')->getConfig()->getStoreViewId();
|
83 |
+
|
84 |
+
$shippingIncludesTax = Mage::helper('tax')->shippingPriceIncludesTax($scopeId);
|
85 |
+
$shippingTaxClass = Mage::helper('tax')->getShippingTaxClass($scopeId);
|
86 |
+
|
87 |
+
$amountNet = $shippingInfo->getAmountNet();
|
88 |
+
$amountGross = $shippingInfo->getAmountGross();
|
89 |
|
90 |
+
if ($shippingIncludesTax) {
|
91 |
+
if (Mage::helper('shopgate/config')->getIsMagentoVersionLower19()
|
92 |
+
|| !Mage::helper('tax')->isCrossBorderTradeEnabled($scopeId)
|
93 |
+
) {
|
94 |
+
$calc = Mage::getSingleton('tax/calculation');
|
95 |
+
$store = Mage::app()->getStore($scopeId);
|
96 |
+
$taxRequest = $calc->getRateOriginRequest($store)
|
97 |
+
->setProductClassId($shippingTaxClass);
|
98 |
+
$rate = $calc->getRate($taxRequest) / 100;
|
99 |
+
$amountGross = $amountNet * (1 + $rate);
|
100 |
+
}
|
101 |
+
$amount['shipping'] = $amountGross;
|
102 |
+
} else {
|
103 |
+
$amount['shipping'] = $amountNet;
|
104 |
+
}
|
105 |
|
106 |
$amountShopPayment = $sgOrder->getAmountShopPayment();
|
107 |
if ($amountShopPayment >= 0) {
|
111 |
|| (!Mage::getConfig()->getModuleConfig('Phoenix_CashOnDelivery')->is('active', 'true')
|
112 |
&& !Mage::getConfig()->getModuleConfig('MSP_CashOnDelivery')->is('active', 'true'))
|
113 |
) {
|
114 |
+
$amount['payment'] = $this->_getNetForGrossShipping($amountShopPayment);
|
115 |
}
|
116 |
}
|
117 |
|
129 |
*/
|
130 |
protected function _getNetForGrossShipping($amount, $amountContainsTax = true)
|
131 |
{
|
132 |
+
$storeViewId = Mage::helper('shopgate/config')->getConfig()->getStoreViewId();
|
133 |
+
$taxClassId = Mage::helper('tax')->getShippingTaxClass($storeViewId);
|
134 |
|
135 |
$pseudoProduct = new Varien_Object();
|
136 |
$pseudoProduct->setTaxClassId($taxClassId);
|
137 |
|
138 |
+
$returnIncludesTax = Mage::helper('tax')->shippingPriceIncludesTax($storeViewId);
|
139 |
$customerTaxClass = null;
|
140 |
|
141 |
+
$amount = Mage::helper('tax')->getPrice(
|
142 |
+
$pseudoProduct,
|
143 |
+
$amount,
|
144 |
+
$returnIncludesTax,
|
145 |
+
null,
|
146 |
+
null,
|
147 |
+
null,
|
148 |
+
$storeViewId,
|
149 |
+
$amountContainsTax
|
150 |
);
|
151 |
return $amount;
|
152 |
}
|
156 |
*/
|
157 |
public function isActive()
|
158 |
{
|
159 |
+
return Mage::helper('shopgate')->isShopgateApiRequest();
|
160 |
}
|
161 |
|
162 |
/**
|
app/code/community/Shopgate/Framework/Model/Config.php
CHANGED
@@ -109,6 +109,11 @@ class Shopgate_Framework_Model_Config extends ShopgateConfig
|
|
109 |
const XML_PATH_SHOPGATE_NOT_PREDEFINED_CONFIG = "shopgate/not_predefined_config/";
|
110 |
const XML_PATH_SHOPGATE_NET_MARKET_COUNTRIES = "shopgate/export/net_market_countries";
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
/**
|
113 |
* blacklist for config keys
|
114 |
*/
|
@@ -1084,4 +1089,54 @@ class Shopgate_Framework_Model_Config extends ShopgateConfig
|
|
1084 |
$this->getStoreViewId()
|
1085 |
);
|
1086 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1087 |
}
|
109 |
const XML_PATH_SHOPGATE_NOT_PREDEFINED_CONFIG = "shopgate/not_predefined_config/";
|
110 |
const XML_PATH_SHOPGATE_NET_MARKET_COUNTRIES = "shopgate/export/net_market_countries";
|
111 |
|
112 |
+
/**
|
113 |
+
* @var string key - affiliate key
|
114 |
+
*/
|
115 |
+
private $affiliateParameter;
|
116 |
+
|
117 |
/**
|
118 |
* blacklist for config keys
|
119 |
*/
|
1089 |
$this->getStoreViewId()
|
1090 |
);
|
1091 |
}
|
1092 |
+
|
1093 |
+
/**
|
1094 |
+
* @inheritdoc
|
1095 |
+
*/
|
1096 |
+
public function getRedirectableGetParams()
|
1097 |
+
{
|
1098 |
+
$this->addAffiliateParameterToRedirectable();
|
1099 |
+
|
1100 |
+
return parent::getRedirectableGetParams();
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
/**
|
1104 |
+
* Adds affiliate parameter to allowed redirect parameters
|
1105 |
+
* Cached for page load efficiency.
|
1106 |
+
*/
|
1107 |
+
private function addAffiliateParameterToRedirectable()
|
1108 |
+
{
|
1109 |
+
if (is_null($this->affiliateParameter)) {
|
1110 |
+
$params = $this->translateMagentoGetParameters(Mage::app()->getRequest()->getParams());
|
1111 |
+
if (!empty($params)) {
|
1112 |
+
$sgOrder = new ShopgateOrder();
|
1113 |
+
$sgOrder->setTrackingGetParameters($params);
|
1114 |
+
$parameter = Mage::getModel('shopgate/factory')
|
1115 |
+
->getAffiliate($sgOrder)
|
1116 |
+
->getModuleTrackingParameter();
|
1117 |
+
if ($parameter) {
|
1118 |
+
$this->affiliateParameter = $parameter['key'];
|
1119 |
+
$this->redirectable_get_params[] = $parameter['key'];
|
1120 |
+
}
|
1121 |
+
} else {
|
1122 |
+
$this->affiliateParameter = '';
|
1123 |
+
}
|
1124 |
+
}
|
1125 |
+
}
|
1126 |
+
|
1127 |
+
/**
|
1128 |
+
* Helps translate magento GET parameters into Shopgate GET parameters
|
1129 |
+
*
|
1130 |
+
* @param array $parameters - array('get_key' => 'get_value')
|
1131 |
+
*
|
1132 |
+
* @return array( array('key'=>'get_key', 'value'=>'get_value'), ...)
|
1133 |
+
*/
|
1134 |
+
private function translateMagentoGetParameters($parameters)
|
1135 |
+
{
|
1136 |
+
$sgGetParams = array();
|
1137 |
+
foreach ($parameters as $key => $value) {
|
1138 |
+
$sgGetParams[] = array('key' => $key, 'value' => $value);
|
1139 |
+
}
|
1140 |
+
return $sgGetParams;
|
1141 |
+
}
|
1142 |
}
|
app/code/community/Shopgate/Framework/Model/Export/Customer/Orders.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shopgate GmbH
|
4 |
*
|
@@ -18,27 +19,14 @@
|
|
18 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
-
* @author
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* User: pliebig
|
26 |
-
* Date: 14.08.14
|
27 |
-
* Time: 18:41
|
28 |
-
* E-Mail: p.liebig@me.com, peter.liebig@magcorp.de
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Model to export get_orders for customers
|
33 |
-
*
|
34 |
-
* @package Shopgate_Framework
|
35 |
-
* @author Peter Liebig <p.liebig@me.com, peter.liebig@magcorp.de>
|
36 |
*/
|
37 |
class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework_Model_Export_Abstract
|
38 |
{
|
39 |
/**
|
40 |
-
*
|
41 |
-
*
|
42 |
* @param $customerToken
|
43 |
* @param $limit
|
44 |
* @param $offset
|
@@ -51,34 +39,34 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
51 |
{
|
52 |
$relation = Mage::getModel('shopgate/customer')->loadByToken($customerToken);
|
53 |
$response = array();
|
|
|
54 |
if ($relation->getId()) {
|
55 |
-
|
56 |
$sort = str_replace('created_', '', $sortOrder);
|
57 |
$_orders = Mage::getModel('sales/order')->getCollection()->addFieldToSelect('*');
|
58 |
if ($orderDateFrom) {
|
59 |
$_orders->addFieldToFilter(
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
);
|
65 |
}
|
66 |
$_orders->addFieldToFilter('customer_id', $relation->getCustomerId())
|
67 |
->addFieldToFilter(
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
$_orders->getSelect()->limit($limit, $offset);
|
74 |
if ($_orders->count() > 0) {
|
75 |
/** @var Mage_Sales_Model_Order $order */
|
76 |
foreach ($_orders as $order) {
|
77 |
-
|
78 |
-
$shopgateOrder = $this->_getShopgateOrderNumber($order->getId());
|
79 |
-
|
80 |
$shopgateExternalOrder = new ShopgateExternalOrder();
|
81 |
-
$shopgateExternalOrder->setOrderNumber(
|
|
|
|
|
82 |
$shopgateExternalOrder->setExternalOrderId($order->getId());
|
83 |
$shopgateExternalOrder->setExternalOrderNumber($order->getIncrementId());
|
84 |
$shopgateExternalOrder->setCreatedTime(date(DateTime::ISO8601, strtotime($order->getCreatedAt())));
|
@@ -88,8 +76,12 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
88 |
$shopgateExternalOrder->setIsPaid(($shopgateOrder) ? $shopgateOrder->getIsPaid() : null);
|
89 |
$shopgateExternalOrder->setPaymentTransactionNumber($this->_getPaymentTransactionNumber($order));
|
90 |
$shopgateExternalOrder->setAmountComplete($order->getGrandTotal());
|
91 |
-
$shopgateExternalOrder->setInvoiceAddress(
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
$shopgateExternalOrder->setItems($this->_getOrderItemsFormatted($order));
|
94 |
$shopgateExternalOrder->setOrderTaxes($this->_getOrderTaxFormatted($order));
|
95 |
$shopgateExternalOrder->setDeliveryNotes($this->_getDeliveryNotes($order));
|
@@ -108,12 +100,11 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
108 |
|
109 |
/**
|
110 |
* @param $orderId
|
111 |
-
* @return
|
112 |
*/
|
113 |
protected function _getShopgateOrderNumber($orderId)
|
114 |
{
|
115 |
-
|
116 |
-
$shopgateOrder = Mage::getModel("shopgate/shopgate_order")->load($orderId, "order_id");
|
117 |
if ($shopgateOrder->getId()) {
|
118 |
return $shopgateOrder;
|
119 |
} else {
|
@@ -150,7 +141,7 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
150 |
$shopgateAddress->setFirstName($address->getFirstname());
|
151 |
$shopgateAddress->setLastName($address->getLastname());
|
152 |
$shopgateAddress->setGender(
|
153 |
-
|
154 |
);
|
155 |
$shopgateAddress->setCompany($address->getCompany());
|
156 |
$shopgateAddress->setPhone($address->getTelephone());
|
@@ -179,7 +170,7 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
179 |
$shopgateItem->setItemNumber($item->getProductId());
|
180 |
$shopgateItem->setItemNumberPublic($item->getSku());
|
181 |
$shopgateItem->setQuantity((int)$item->getQtyOrdered());
|
182 |
-
$shopgateItem->
|
183 |
$shopgateItem->setUnitAmount($item->getPrice());
|
184 |
$shopgateItem->setUnitAmountWithTax($item->getPriceInclTax());
|
185 |
$shopgateItem->setTaxPercent($item->getTaxPercent());
|
@@ -241,7 +232,7 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
241 |
{
|
242 |
$result = array();
|
243 |
if ($order->getCouponCode()) {
|
244 |
-
if (Mage::helper(
|
245 |
$mageRule = Mage::getModel('salesrule/rule')->load($order->getCouponCode(), 'coupon_code');
|
246 |
$mageCoupon = $mageRule;
|
247 |
} else {
|
@@ -251,8 +242,8 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
251 |
|
252 |
$externalCoupon = new ShopgateExternalCoupon();
|
253 |
$couponInfo = array();
|
254 |
-
$couponInfo[
|
255 |
-
$couponInfo[
|
256 |
|
257 |
$externalCoupon->setCode($order->getCouponCode());
|
258 |
$externalCoupon->setCurrency($order->getOrderCurrencyCode());
|
@@ -286,7 +277,8 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
286 |
$extraCost->setType(ShopgateExternalOrderExtraCost::TYPE_SHIPPING);
|
287 |
$extraCost->setTaxPercent(
|
288 |
Mage::helper('shopgate')->calculateTaxRate(
|
289 |
-
$shippingCostAmount,
|
|
|
290 |
)
|
291 |
);
|
292 |
|
@@ -314,7 +306,8 @@ class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework
|
|
314 |
$extraCost->setType(ShopgateExternalOrderExtraCost::TYPE_PAYMENT);
|
315 |
$extraCost->setTaxPercent(
|
316 |
Mage::helper('shopgate')->calculateTaxRate(
|
317 |
-
$codPaymentFee,
|
|
|
318 |
)
|
319 |
);
|
320 |
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Shopgate GmbH
|
5 |
*
|
19 |
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @description Model to export get_orders for customers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
*/
|
25 |
class Shopgate_Framework_Model_Export_Customer_Orders extends Shopgate_Framework_Model_Export_Abstract
|
26 |
{
|
27 |
/**
|
28 |
+
* Getting orders for the customer filtered by given data
|
29 |
+
*
|
30 |
* @param $customerToken
|
31 |
* @param $limit
|
32 |
* @param $offset
|
39 |
{
|
40 |
$relation = Mage::getModel('shopgate/customer')->loadByToken($customerToken);
|
41 |
$response = array();
|
42 |
+
|
43 |
if ($relation->getId()) {
|
|
|
44 |
$sort = str_replace('created_', '', $sortOrder);
|
45 |
$_orders = Mage::getModel('sales/order')->getCollection()->addFieldToSelect('*');
|
46 |
if ($orderDateFrom) {
|
47 |
$_orders->addFieldToFilter(
|
48 |
+
'created_at',
|
49 |
+
array(
|
50 |
+
'from' => date('Y-m-d H:i:s', strtotime($orderDateFrom))
|
51 |
+
)
|
52 |
);
|
53 |
}
|
54 |
$_orders->addFieldToFilter('customer_id', $relation->getCustomerId())
|
55 |
->addFieldToFilter(
|
56 |
+
'state',
|
57 |
+
array(
|
58 |
+
'in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()
|
59 |
+
)
|
60 |
+
)->setOrder('created_at', $sort);
|
61 |
$_orders->getSelect()->limit($limit, $offset);
|
62 |
if ($_orders->count() > 0) {
|
63 |
/** @var Mage_Sales_Model_Order $order */
|
64 |
foreach ($_orders as $order) {
|
65 |
+
$shopgateOrder = $this->_getShopgateOrderNumber($order->getId());
|
|
|
|
|
66 |
$shopgateExternalOrder = new ShopgateExternalOrder();
|
67 |
+
$shopgateExternalOrder->setOrderNumber(
|
68 |
+
($shopgateOrder) ? $shopgateOrder->getShopgateOrderNumber() : null
|
69 |
+
);
|
70 |
$shopgateExternalOrder->setExternalOrderId($order->getId());
|
71 |
$shopgateExternalOrder->setExternalOrderNumber($order->getIncrementId());
|
72 |
$shopgateExternalOrder->setCreatedTime(date(DateTime::ISO8601, strtotime($order->getCreatedAt())));
|
76 |
$shopgateExternalOrder->setIsPaid(($shopgateOrder) ? $shopgateOrder->getIsPaid() : null);
|
77 |
$shopgateExternalOrder->setPaymentTransactionNumber($this->_getPaymentTransactionNumber($order));
|
78 |
$shopgateExternalOrder->setAmountComplete($order->getGrandTotal());
|
79 |
+
$shopgateExternalOrder->setInvoiceAddress(
|
80 |
+
$this->_getShopgateAddressFromOrderAddress($order->getBillingAddress())
|
81 |
+
);
|
82 |
+
$shopgateExternalOrder->setDeliveryAddress(
|
83 |
+
$this->_getShopgateAddressFromOrderAddress($order->getShippingAddress())
|
84 |
+
);
|
85 |
$shopgateExternalOrder->setItems($this->_getOrderItemsFormatted($order));
|
86 |
$shopgateExternalOrder->setOrderTaxes($this->_getOrderTaxFormatted($order));
|
87 |
$shopgateExternalOrder->setDeliveryNotes($this->_getDeliveryNotes($order));
|
100 |
|
101 |
/**
|
102 |
* @param $orderId
|
103 |
+
* @return false | Shopgate_Framework_Model_Shopgate_Order
|
104 |
*/
|
105 |
protected function _getShopgateOrderNumber($orderId)
|
106 |
{
|
107 |
+
$shopgateOrder = Mage::getModel('shopgate/shopgate_order')->load($orderId, 'order_id');
|
|
|
108 |
if ($shopgateOrder->getId()) {
|
109 |
return $shopgateOrder;
|
110 |
} else {
|
141 |
$shopgateAddress->setFirstName($address->getFirstname());
|
142 |
$shopgateAddress->setLastName($address->getLastname());
|
143 |
$shopgateAddress->setGender(
|
144 |
+
$this->_getCustomerHelper()->getShopgateCustomerGender($address)
|
145 |
);
|
146 |
$shopgateAddress->setCompany($address->getCompany());
|
147 |
$shopgateAddress->setPhone($address->getTelephone());
|
170 |
$shopgateItem->setItemNumber($item->getProductId());
|
171 |
$shopgateItem->setItemNumberPublic($item->getSku());
|
172 |
$shopgateItem->setQuantity((int)$item->getQtyOrdered());
|
173 |
+
$shopgateItem->setName($item->getName());
|
174 |
$shopgateItem->setUnitAmount($item->getPrice());
|
175 |
$shopgateItem->setUnitAmountWithTax($item->getPriceInclTax());
|
176 |
$shopgateItem->setTaxPercent($item->getTaxPercent());
|
232 |
{
|
233 |
$result = array();
|
234 |
if ($order->getCouponCode()) {
|
235 |
+
if (Mage::helper('shopgate/config')->getIsMagentoVersionLower1410()) {
|
236 |
$mageRule = Mage::getModel('salesrule/rule')->load($order->getCouponCode(), 'coupon_code');
|
237 |
$mageCoupon = $mageRule;
|
238 |
} else {
|
242 |
|
243 |
$externalCoupon = new ShopgateExternalCoupon();
|
244 |
$couponInfo = array();
|
245 |
+
$couponInfo['coupon_id'] = $mageCoupon->getId();
|
246 |
+
$couponInfo['rule_id'] = $mageRule->getId();
|
247 |
|
248 |
$externalCoupon->setCode($order->getCouponCode());
|
249 |
$externalCoupon->setCurrency($order->getOrderCurrencyCode());
|
277 |
$extraCost->setType(ShopgateExternalOrderExtraCost::TYPE_SHIPPING);
|
278 |
$extraCost->setTaxPercent(
|
279 |
Mage::helper('shopgate')->calculateTaxRate(
|
280 |
+
$shippingCostAmount,
|
281 |
+
$order->getShippingTaxAmount()
|
282 |
)
|
283 |
);
|
284 |
|
306 |
$extraCost->setType(ShopgateExternalOrderExtraCost::TYPE_PAYMENT);
|
307 |
$extraCost->setTaxPercent(
|
308 |
Mage::helper('shopgate')->calculateTaxRate(
|
309 |
+
$codPaymentFee,
|
310 |
+
$order->getCodTaxAmount()
|
311 |
)
|
312 |
);
|
313 |
|
app/code/community/Shopgate/Framework/Model/Export/Product/Xml.php
CHANGED
@@ -385,11 +385,12 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
385 |
}
|
386 |
|
387 |
/**
|
388 |
-
*
|
389 |
*/
|
390 |
public function setPrice()
|
391 |
{
|
392 |
$useParent = false;
|
|
|
393 |
|
394 |
if (Mage::getStoreConfig(Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_EXPORT_USE_ROOT_PRICES)
|
395 |
&& $this->_parent != null
|
@@ -398,33 +399,22 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
398 |
$useParent = true;
|
399 |
}
|
400 |
|
401 |
-
$
|
402 |
-
|
403 |
-
: $this->item->getPrice();
|
404 |
|
405 |
if (Mage::getStoreConfig(Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_EXPORT_USE_PRICE_INDEX_ON_EXPORT)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
|
407 |
-
$index = Mage::getModel('catalog/product_indexer_price');
|
408 |
-
if ($this->item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
409 |
-
$finalPrice = $useParent
|
410 |
-
? $index->load($this->_parent->getId())->getMinPrice()
|
411 |
-
: $index->load($this->item->getId())->getMinPrice();
|
412 |
-
} else {
|
413 |
-
$finalPrice = $useParent
|
414 |
-
? $index->load($this->_parent->getId())->getFinalPrice()
|
415 |
-
: $index->load($this->item->getId())->getFinalPrice();
|
416 |
-
}
|
417 |
} else {
|
418 |
-
|
419 |
-
$
|
420 |
-
$useParent
|
421 |
-
? $this->_parent
|
422 |
-
: $this->item
|
423 |
-
);
|
424 |
-
|
425 |
-
$finalPrice = $useParent
|
426 |
-
? $this->_parent->getFinalPrice()
|
427 |
-
: $this->item->getFinalPrice();
|
428 |
|
429 |
if ($rulePrice && $rulePrice < $finalPrice) {
|
430 |
$finalPrice = $rulePrice;
|
@@ -432,17 +422,14 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
432 |
}
|
433 |
|
434 |
if ($finalPrice <= 0) {
|
435 |
-
$rulePrice = Mage::helper(
|
436 |
$finalPrice = $this->item->getFinalPrice();
|
437 |
if ($rulePrice && $rulePrice < $finalPrice) {
|
438 |
$finalPrice = $rulePrice;
|
439 |
}
|
440 |
}
|
441 |
|
442 |
-
if (
|
443 |
-
&& $this->_parent->isConfigurable()
|
444 |
-
&& $useParent
|
445 |
-
) {
|
446 |
$totalOffset = 0;
|
447 |
$totalPercentage = 0;
|
448 |
$superAttributes = $this->_parent
|
@@ -456,12 +443,12 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
456 |
|
457 |
if ($superAttribute->hasData('prices')) {
|
458 |
foreach ($superAttribute->getPrices() as $saPrice) {
|
459 |
-
if ($index == $saPrice[
|
460 |
-
if ($saPrice[
|
461 |
-
$totalPercentage += $saPrice[
|
462 |
$isPercent = true;
|
463 |
} else {
|
464 |
-
$totalOffset += $saPrice[
|
465 |
}
|
466 |
break;
|
467 |
}
|
@@ -492,17 +479,18 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
492 |
if (Mage::getConfig()->getModuleConfig('DerModPro_BasePrice')->is('active', 'true')
|
493 |
&& Mage::getStoreConfig('catalog/baseprice/disable_ext') == 0
|
494 |
) {
|
495 |
-
$format
|
496 |
$basePriceSuccess = true;
|
497 |
try {
|
498 |
-
$basePrice = Mage::helper(
|
499 |
} catch (Exception $e) {
|
500 |
$basePriceSuccess = false;
|
501 |
$this->log('error in DerModPro_BasePrice for item uid:' . $this->item->getId());
|
502 |
}
|
503 |
if ($basePriceSuccess) {
|
|
|
504 |
$basePrice = strip_tags($basePrice);
|
505 |
-
$basePrice = htmlentities($basePrice, null,
|
506 |
$priceModel->setBasePrice($basePrice);
|
507 |
}
|
508 |
}
|
@@ -525,8 +513,7 @@ class Shopgate_Framework_Model_Export_Product_Xml
|
|
525 |
$priceModel->setPrice($this->_formatPrice($price));
|
526 |
$priceModel->setCost($this->_formatPrice($this->item->getCost()));
|
527 |
$priceModel->setSalePrice($this->_formatPrice($finalPrice));
|
528 |
-
$priceModel->setMsrp(round($this->_formatPrice($this->item->getMsrp()),2));
|
529 |
-
|
530 |
|
531 |
if ($isGross) {
|
532 |
$priceModel->setType(Shopgate_Model_Catalog_Price::DEFAULT_PRICE_TYPE_GROSS);
|
385 |
}
|
386 |
|
387 |
/**
|
388 |
+
* Set price
|
389 |
*/
|
390 |
public function setPrice()
|
391 |
{
|
392 |
$useParent = false;
|
393 |
+
$websiteId = Mage::app()->getWebsite()->getId();
|
394 |
|
395 |
if (Mage::getStoreConfig(Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_EXPORT_USE_ROOT_PRICES)
|
396 |
&& $this->_parent != null
|
399 |
$useParent = true;
|
400 |
}
|
401 |
|
402 |
+
$currentItem = $useParent ? $this->_parent : $this->item;
|
403 |
+
$price = $currentItem->getPrice();
|
|
|
404 |
|
405 |
if (Mage::getStoreConfig(Shopgate_Framework_Model_Config::XML_PATH_SHOPGATE_EXPORT_USE_PRICE_INDEX_ON_EXPORT)) {
|
406 |
+
/** @var Mage_Catalog_Model_Product_Indexer_Price $product */
|
407 |
+
$product = Mage::getResourceModel('catalog/product_collection')
|
408 |
+
->addPriceData(null, $websiteId)
|
409 |
+
->addIdFilter($currentItem->getId())
|
410 |
+
->getFirstItem();
|
411 |
+
$finalPrice = ($this->item->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
|
412 |
+
? $product->getMinPrice()
|
413 |
+
: $product->getFinalPrice();
|
414 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
} else {
|
416 |
+
$rulePrice = Mage::helper('shopgate/export')->calcProductPriceRule($currentItem);
|
417 |
+
$finalPrice = $currentItem->getFinalPrice();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
|
419 |
if ($rulePrice && $rulePrice < $finalPrice) {
|
420 |
$finalPrice = $rulePrice;
|
422 |
}
|
423 |
|
424 |
if ($finalPrice <= 0) {
|
425 |
+
$rulePrice = Mage::helper('shopgate/export')->calcProductPriceRule($this->item);
|
426 |
$finalPrice = $this->item->getFinalPrice();
|
427 |
if ($rulePrice && $rulePrice < $finalPrice) {
|
428 |
$finalPrice = $rulePrice;
|
429 |
}
|
430 |
}
|
431 |
|
432 |
+
if ($useParent) {
|
|
|
|
|
|
|
433 |
$totalOffset = 0;
|
434 |
$totalPercentage = 0;
|
435 |
$superAttributes = $this->_parent
|
443 |
|
444 |
if ($superAttribute->hasData('prices')) {
|
445 |
foreach ($superAttribute->getPrices() as $saPrice) {
|
446 |
+
if ($index == $saPrice['value_index']) {
|
447 |
+
if ($saPrice['is_percent']) {
|
448 |
+
$totalPercentage += $saPrice['pricing_value'];
|
449 |
$isPercent = true;
|
450 |
} else {
|
451 |
+
$totalOffset += $saPrice['pricing_value'];
|
452 |
}
|
453 |
break;
|
454 |
}
|
479 |
if (Mage::getConfig()->getModuleConfig('DerModPro_BasePrice')->is('active', 'true')
|
480 |
&& Mage::getStoreConfig('catalog/baseprice/disable_ext') == 0
|
481 |
) {
|
482 |
+
$format = '{{baseprice}} / {{reference_amount}} {{reference_unit_short}}';
|
483 |
$basePriceSuccess = true;
|
484 |
try {
|
485 |
+
$basePrice = Mage::helper('baseprice')->getBasePriceLabel($this->item, $format);
|
486 |
} catch (Exception $e) {
|
487 |
$basePriceSuccess = false;
|
488 |
$this->log('error in DerModPro_BasePrice for item uid:' . $this->item->getId());
|
489 |
}
|
490 |
if ($basePriceSuccess) {
|
491 |
+
/** @noinspection PhpUndefinedVariableInspection */
|
492 |
$basePrice = strip_tags($basePrice);
|
493 |
+
$basePrice = htmlentities($basePrice, null, 'UTF-8');
|
494 |
$priceModel->setBasePrice($basePrice);
|
495 |
}
|
496 |
}
|
513 |
$priceModel->setPrice($this->_formatPrice($price));
|
514 |
$priceModel->setCost($this->_formatPrice($this->item->getCost()));
|
515 |
$priceModel->setSalePrice($this->_formatPrice($finalPrice));
|
516 |
+
$priceModel->setMsrp(round($this->_formatPrice($this->item->getMsrp()), 2));
|
|
|
517 |
|
518 |
if ($isGross) {
|
519 |
$priceModel->setType(Shopgate_Model_Catalog_Price::DEFAULT_PRICE_TYPE_GROSS);
|
app/code/community/Shopgate/Framework/Model/Factory.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Factory
|
25 |
+
{
|
26 |
+
/** @var null | Shopgate_Framework_Model_Payment_Factory */
|
27 |
+
protected $paymentFactory = null;
|
28 |
+
|
29 |
+
/** @var null | Shopgate_Framework_Model_Modules_Affiliate_Factory */
|
30 |
+
protected $affiliateFactory = null;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Payment factory retriever
|
34 |
+
*
|
35 |
+
* @param ShopgateOrder | null $sgOrder
|
36 |
+
*
|
37 |
+
* @return Shopgate_Framework_Model_Payment_Factory
|
38 |
+
*/
|
39 |
+
public function getPayment(ShopgateOrder $sgOrder = null)
|
40 |
+
{
|
41 |
+
if (is_null($this->paymentFactory)) {
|
42 |
+
if (is_null($sgOrder)) {
|
43 |
+
$sgOrder = Mage::getModel('core/session')->getShopgateOrder();
|
44 |
+
}
|
45 |
+
$this->paymentFactory = Mage::getModel('shopgate/payment_factory', array($sgOrder));
|
46 |
+
}
|
47 |
+
|
48 |
+
return $this->paymentFactory;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Affiliate factory retriever
|
53 |
+
*
|
54 |
+
* @param ShopgateCartBase | null $sgOrder
|
55 |
+
*
|
56 |
+
* @return Shopgate_Framework_Model_Modules_Affiliate_Factory
|
57 |
+
*/
|
58 |
+
public function getAffiliate(ShopgateCartBase $sgOrder = null)
|
59 |
+
{
|
60 |
+
if (is_null($this->affiliateFactory)) {
|
61 |
+
if (is_null($sgOrder)) {
|
62 |
+
$sgOrder = Mage::getModel('core/session')->getShopgateOrder();
|
63 |
+
}
|
64 |
+
$router = Mage::getModel('shopgate/modules_affiliate_router', array($sgOrder));
|
65 |
+
$this->affiliateFactory = Mage::getModel('shopgate/modules_affiliate_factory', array($sgOrder, $router));
|
66 |
+
}
|
67 |
+
|
68 |
+
return $this->affiliateFactory;
|
69 |
+
}
|
70 |
+
}
|
app/code/community/Shopgate/Framework/Model/Interfaces/Modules/Router.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
interface Shopgate_Framework_Model_Interfaces_Modules_Router
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Retrieves the validation model of the plugin or abstract validator
|
28 |
+
*
|
29 |
+
* @return Shopgate_Framework_Model_Interfaces_Modules_Validator
|
30 |
+
*/
|
31 |
+
public function getValidator();
|
32 |
+
}
|
app/code/community/Shopgate/Framework/Model/Interfaces/Modules/Validator.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
interface Shopgate_Framework_Model_Interfaces_Modules_Validator
|
25 |
+
{
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Checks isValid, isEnabled, isModuleActive & checkGenericValid
|
29 |
+
*
|
30 |
+
* @return bool
|
31 |
+
*/
|
32 |
+
public function isValid();
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Checks if module is enabled based on XML_CONFIG_ENABLED constant
|
36 |
+
*
|
37 |
+
* @return mixed
|
38 |
+
*/
|
39 |
+
public function isEnabled();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Checks if module is active based on MODULE_CONFIG constant
|
43 |
+
*
|
44 |
+
* @return bool
|
45 |
+
*/
|
46 |
+
public function isModuleActive();
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Generic validity check that can be overridden
|
50 |
+
*
|
51 |
+
* @return bool
|
52 |
+
*/
|
53 |
+
public function checkGenericValid();
|
54 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Factory.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Affiliate_Factory extends Shopgate_Framework_Model_Modules_Factory
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Runs the initial setup functionality. Usually setting
|
28 |
+
* up parameters before the totals collector runs.
|
29 |
+
*
|
30 |
+
* @param Mage_Sales_Model_Quote | null $quote
|
31 |
+
*
|
32 |
+
* @return bool
|
33 |
+
*/
|
34 |
+
public function setUp($quote = null)
|
35 |
+
{
|
36 |
+
$result = false;
|
37 |
+
if (!$this->getRouter()->getValidator()->isValid()) {
|
38 |
+
return $result;
|
39 |
+
}
|
40 |
+
|
41 |
+
$utility = $this->getRouter()->getUtility();
|
42 |
+
if ($utility instanceof Shopgate_Framework_Model_Modules_Affiliate_Utility) {
|
43 |
+
$utility->salesRuleHook();
|
44 |
+
$message = 'Ran the sales rule hook in ' . get_class($utility);
|
45 |
+
ShopgateLogger::getInstance()->log($message, ShopgateLogger::LOGTYPE_DEBUG);
|
46 |
+
}
|
47 |
+
|
48 |
+
$redeemer = $this->getRouter()->getRedeemer();
|
49 |
+
if ($redeemer) {
|
50 |
+
$result = $redeemer->setAffiliateData(
|
51 |
+
$this->getRouter()->getAffiliateParameter(),
|
52 |
+
$this->getSgOrder()->getExternalCustomerId(),
|
53 |
+
$quote
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
return $result;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Retrieves a Shopgate coupon to export in check_cart call
|
62 |
+
*
|
63 |
+
* @param Mage_Sales_Model_Quote $quote
|
64 |
+
* @param bool $useTaxClasses
|
65 |
+
*
|
66 |
+
* @return false | ShopgateExternalCoupon
|
67 |
+
*/
|
68 |
+
public function redeemCoupon(Mage_Sales_Model_Quote $quote, $useTaxClasses)
|
69 |
+
{
|
70 |
+
if (!$this->getRouter()->getValidator()->isValid()) {
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
$redeemer = $this->getRouter()->getRedeemer();
|
75 |
+
$parameter = $this->getRouter()->getAffiliateParameter();
|
76 |
+
|
77 |
+
return $redeemer ? $redeemer->retrieveCoupon($quote, $parameter, $useTaxClasses) : false;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Trigger affiliate commission retrieval
|
82 |
+
*
|
83 |
+
* @param Mage_Sales_Model_Order $order
|
84 |
+
* @return bool | Mage_Sales_Model_Quote
|
85 |
+
*/
|
86 |
+
public function promptCommission(Mage_Sales_Model_Order $order)
|
87 |
+
{
|
88 |
+
if (!$this->getRouter()->getValidator()->isValid()) {
|
89 |
+
return false;
|
90 |
+
}
|
91 |
+
|
92 |
+
return $this->getRouter()->getRedeemer()->promptCommission($order, $this->getSgOrder());
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @see Shopgate_Framework_Model_Modules_Affiliate_Router::getAffiliateParameter
|
97 |
+
*
|
98 |
+
* @return array | false
|
99 |
+
*/
|
100 |
+
public function getModuleTrackingParameter()
|
101 |
+
{
|
102 |
+
if (!$this->getRouter()->getValidator()->isValid()) {
|
103 |
+
return false;
|
104 |
+
}
|
105 |
+
|
106 |
+
return $this->getRouter()->getAffiliateParameter();
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Destroys cookies
|
111 |
+
*/
|
112 |
+
public function destroyCookies()
|
113 |
+
{
|
114 |
+
if ($this->getRouter()->getValidator()->isValid()) {
|
115 |
+
$this->getRouter()->getRedeemer()->destroyCookies();
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Redeem.php
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Redeem
|
25 |
+
{
|
26 |
+
/**
|
27 |
+
* Sets up affiliate data to be pulled in totals collector
|
28 |
+
*
|
29 |
+
* @param array $parameter - affiliate parameter ['key' => '', 'value' => '']
|
30 |
+
* @param string $customerId - magento customer id
|
31 |
+
* @param Mage_Sales_Model_Quote | null $quote - manipulate sessions for program initialization
|
32 |
+
*
|
33 |
+
* @return bool
|
34 |
+
*/
|
35 |
+
public function setAffiliateData($parameter, $customerId, $quote)
|
36 |
+
{
|
37 |
+
/** @see Magestore_Affiliateplusprogram_Helper_Data::initProgram */
|
38 |
+
if ($quote instanceof Mage_Sales_Model_Quote) {
|
39 |
+
Mage::getSingleton('checkout/session')->replaceQuote($quote);
|
40 |
+
Mage::getSingleton('checkout/cart')->setQuote($quote);
|
41 |
+
}
|
42 |
+
|
43 |
+
Mage::getSingleton('customer/session')->setCustomerId($customerId);
|
44 |
+
$accountCode = !empty($parameter['value']) ? $parameter['value'] : '';
|
45 |
+
$account = Mage::getSingleton('affiliateplus/session')->getAccount();
|
46 |
+
|
47 |
+
if ($accountCode && $account->getIdentifyCode() != $accountCode) {
|
48 |
+
$affiliateAccount = Mage::getModel('affiliateplus/account')->loadByIdentifyCode($accountCode);
|
49 |
+
$cookieName = 'affiliateplus_account_code_';
|
50 |
+
|
51 |
+
if ($affiliateAccount->getId()) {
|
52 |
+
$cookie = Mage::getSingleton('core/cookie');
|
53 |
+
$currentIndex = $cookie->get('affiliateplus_map_index');
|
54 |
+
|
55 |
+
for ($i = intval($currentIndex); $i > 0; $i--) {
|
56 |
+
if ($_COOKIE[$cookieName . $i] == $accountCode) {
|
57 |
+
$curI = intval($currentIndex);
|
58 |
+
|
59 |
+
for ($j = $i; $j < $curI; $j++) {
|
60 |
+
$cookieValue = $cookie->get($cookieName . intval($j + 1));
|
61 |
+
$_COOKIE[$cookieName . $j] = $cookieValue;
|
62 |
+
}
|
63 |
+
$_COOKIE[$cookieName . $curI] = $accountCode;
|
64 |
+
|
65 |
+
return true;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
$currentIndex = $currentIndex ? intval($currentIndex) + 1 : 1;
|
69 |
+
/**
|
70 |
+
* todo-sg: may need to be revisited, but the setting & deleting cookies doesn't work
|
71 |
+
* Would this somehow interfere with frontend cookies?
|
72 |
+
* $cookie->set('affiliateplus_map_index', $currentIndex);
|
73 |
+
* $cookie->set("affiliateplus_account_code_$currentIndex", $accountCode);
|
74 |
+
*/
|
75 |
+
$_COOKIE['affiliateplus_map_index'] = $currentIndex;
|
76 |
+
$_COOKIE[$cookieName . $currentIndex] = $accountCode;
|
77 |
+
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Returns an export ready affiliate coupon, in case there is no
|
87 |
+
* affiliate discount it returns false
|
88 |
+
*
|
89 |
+
* @param Mage_Sales_Model_Quote $quote
|
90 |
+
* @param array $parameter - ('key' => 'get_key', 'value => 'get_val')
|
91 |
+
* @param bool $useTaxClasses
|
92 |
+
*
|
93 |
+
* @return false | ShopgateExternalCoupon
|
94 |
+
*/
|
95 |
+
public function retrieveCoupon(Mage_Sales_Model_Quote $quote, $parameter, $useTaxClasses)
|
96 |
+
{
|
97 |
+
$coupon = false;
|
98 |
+
if ($quote->getData('affiliateplus_discount')) {
|
99 |
+
$discount = abs($quote->getData('affiliateplus_discount'));
|
100 |
+
$coupon = new ShopgateExternalCoupon();
|
101 |
+
$coupon->setIsValid(true);
|
102 |
+
$coupon->setCode(Shopgate_Framework_Model_Modules_Affiliate_Utility::COUPON_TYPE);
|
103 |
+
$coupon->setName('Affiliate Discount');
|
104 |
+
$coupon->setIsFreeShipping(false);
|
105 |
+
if ($useTaxClasses) {
|
106 |
+
$coupon->setAmountGross($discount);
|
107 |
+
} else {
|
108 |
+
$coupon->setAmountNet($discount);
|
109 |
+
}
|
110 |
+
$coupon->setInternalInfo(
|
111 |
+
Zend_Json::encode(
|
112 |
+
array(
|
113 |
+
'parameter' => array($parameter['key'], $parameter['value'])
|
114 |
+
)
|
115 |
+
)
|
116 |
+
);
|
117 |
+
} else {
|
118 |
+
$message = 'Affiliate discount was not found in the quote';
|
119 |
+
ShopgateLogger::getInstance()->log($message, ShopgateLogger::LOGTYPE_DEBUG);
|
120 |
+
}
|
121 |
+
|
122 |
+
return $coupon;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Prompts to create a commission transaction in case
|
127 |
+
* checkout_submit_all_after observer is not triggered
|
128 |
+
* by our order import (some payment methods).
|
129 |
+
* Note! that there are other observers in Magestore
|
130 |
+
* Affiliate that could be triggered to create a
|
131 |
+
* transaction.
|
132 |
+
*
|
133 |
+
* @param Mage_Sales_Model_Order $order
|
134 |
+
* @param ShopgateOrder $sgOrder
|
135 |
+
*
|
136 |
+
* @return Mage_Sales_Model_Quote
|
137 |
+
* @throws Zend_Json_Exception
|
138 |
+
*/
|
139 |
+
public function promptCommission(Mage_Sales_Model_Order $order, ShopgateOrder $sgOrder)
|
140 |
+
{
|
141 |
+
$customer = Mage::getModel('customer/customer');
|
142 |
+
$customer->setData('website_id', Mage::app()->getWebsite()->getId());
|
143 |
+
$customer->loadByEmail($sgOrder->getMail());
|
144 |
+
$order->setCustomerId($customer->getId());
|
145 |
+
|
146 |
+
$observer = new Varien_Event_Observer();
|
147 |
+
$observer->setData('orders', array($order));
|
148 |
+
Mage::getModel('affiliateplus/observer')->checkout_submit_all_after($observer);
|
149 |
+
|
150 |
+
return $order;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Destroy cookies when done
|
155 |
+
*/
|
156 |
+
public function destroyCookies()
|
157 |
+
{
|
158 |
+
$cookie = Mage::getSingleton('core/cookie');
|
159 |
+
$currentIndex = $cookie->get('affiliateplus_map_index');
|
160 |
+
$cookieName = 'affiliateplus_account_code_';
|
161 |
+
|
162 |
+
for ($i = intval($currentIndex); $i > 0; $i--) {
|
163 |
+
$curI = intval($currentIndex);
|
164 |
+
|
165 |
+
for ($j = $i; $j < $curI; $j++) {
|
166 |
+
$cookieValue = $cookie->get(
|
167 |
+
$cookieName . intval($j + 1)
|
168 |
+
);
|
169 |
+
$_COOKIE[$cookieName . $j] = $cookieValue;
|
170 |
+
}
|
171 |
+
unset($_COOKIE[$cookieName . $currentIndex]);
|
172 |
+
}
|
173 |
+
$currentIndex = $currentIndex ? intval($currentIndex) + 1 : 1;
|
174 |
+
unset($_COOKIE['affiliateplus_map_index']);
|
175 |
+
unset($_COOKIE[$cookieName . $currentIndex]);
|
176 |
+
}
|
177 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Utility.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Utility
|
25 |
+
extends Shopgate_Framework_Model_Modules_Affiliate_Utility
|
26 |
+
{
|
27 |
+
const CONFIG_IGNORE_CART_RULES = 'affiliate';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @inheritdoc
|
31 |
+
*/
|
32 |
+
public function getTrackingCodeKey()
|
33 |
+
{
|
34 |
+
if (!$this->validator->isValid()) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
return Mage::helper('affiliateplus/url')->getPersonalUrlParameter();
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @inheritdoc
|
43 |
+
*/
|
44 |
+
public function salesRuleHook()
|
45 |
+
{
|
46 |
+
$allowDiscount = Mage::helper('affiliateplus/config')->getDiscountConfig('allow_discount');
|
47 |
+
if ($allowDiscount === self::CONFIG_IGNORE_CART_RULES) {
|
48 |
+
Mage::register('shopgate_disable_sales_rules', true, true);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Packages/Magestore/Validator.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Validator
|
25 |
+
extends Shopgate_Framework_Model_Modules_Validator
|
26 |
+
{
|
27 |
+
const MODULE_CONFIG = 'Magestore_Affiliateplus';
|
28 |
+
const XML_CONFIG_ENABLED = 'affiliateplus/general/enable';
|
29 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Router.php
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Affiliate_Router
|
25 |
+
implements Shopgate_Framework_Model_Interfaces_Modules_Router
|
26 |
+
{
|
27 |
+
const VALIDATOR = 'validator';
|
28 |
+
const REDEEM = 'redeem';
|
29 |
+
const UTILITY = 'utility';
|
30 |
+
const CLASS_SHORT_PATH = 'shopgate/modules_affiliate_packages';
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @var array
|
34 |
+
*/
|
35 |
+
private $affiliateParameters;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var ShopgateOrder | ShopgateCart
|
39 |
+
*/
|
40 |
+
private $sgOrder;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* A map of param to module
|
44 |
+
*
|
45 |
+
* @var array
|
46 |
+
*/
|
47 |
+
protected $paramModuleMap = array(
|
48 |
+
'acc' => 'Magestore'
|
49 |
+
);
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param array $data - should contain an array of affiliate params in first element
|
53 |
+
* @throws Exception
|
54 |
+
*/
|
55 |
+
public function __construct(array $data)
|
56 |
+
{
|
57 |
+
$sgOrder = current($data);
|
58 |
+
if (!$sgOrder instanceof ShopgateCartBase) {
|
59 |
+
$error = Mage::helper('shopgate')->__('Incorrect class provided to: %s::_constructor()', get_class($this));
|
60 |
+
ShopgateLogger::getInstance()->log($error, ShopgateLogger::LOGTYPE_ERROR);
|
61 |
+
throw new Exception($error);
|
62 |
+
}
|
63 |
+
$this->sgOrder = $sgOrder;
|
64 |
+
$this->affiliateParameters = $sgOrder->getTrackingGetParameters();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @inheritdoc
|
69 |
+
*/
|
70 |
+
public function getValidator()
|
71 |
+
{
|
72 |
+
$validator = $this->getPluginModel(self::VALIDATOR);
|
73 |
+
|
74 |
+
return $validator ? $validator : Mage::getModel('shopgate/modules_validator');
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Retrieves the utility class of affiliate package
|
79 |
+
*
|
80 |
+
* @param null | string $moduleName - package folder name
|
81 |
+
*
|
82 |
+
* @return false | Shopgate_Framework_Model_Modules_Affiliate_Utility
|
83 |
+
*/
|
84 |
+
public function getUtility($moduleName = null)
|
85 |
+
{
|
86 |
+
if (!$moduleName) {
|
87 |
+
$moduleName = $this->getModuleName();
|
88 |
+
}
|
89 |
+
$baseClassName = strtolower($moduleName);
|
90 |
+
$validator = $this->initAffiliateClass($baseClassName, self::VALIDATOR);
|
91 |
+
$utility = $this->initAffiliateClass($baseClassName, self::UTILITY, array($validator));
|
92 |
+
|
93 |
+
if ($utility instanceof Shopgate_Framework_Model_Modules_Affiliate_Utility) {
|
94 |
+
return $utility;
|
95 |
+
}
|
96 |
+
|
97 |
+
return false;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Retrieves the redeemer class
|
102 |
+
*
|
103 |
+
* @return false | Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Redeem
|
104 |
+
*/
|
105 |
+
public function getRedeemer()
|
106 |
+
{
|
107 |
+
return $this->getPluginModel(self::REDEEM);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Traverses the list of affiliate parameters
|
112 |
+
* and attempts to match it to a the module map.
|
113 |
+
* Once the correct match is found, it returns the
|
114 |
+
* affiliate parameter.
|
115 |
+
*
|
116 |
+
* @return false | array - array('key' => 'GET_KEY', 'value' => 'GET_VALUE')
|
117 |
+
*/
|
118 |
+
public function getAffiliateParameter()
|
119 |
+
{
|
120 |
+
foreach ($this->affiliateParameters as $param) {
|
121 |
+
if (isset($param['key']) && isset($this->paramModuleMap[$param['key']])) {
|
122 |
+
return $param;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
return false;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* ======================================
|
131 |
+
* ========= Helper Functions ===========
|
132 |
+
* ======================================
|
133 |
+
*/
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Retrieves the correct module name
|
137 |
+
* mapping based on the affiliate parameter
|
138 |
+
* passed
|
139 |
+
*
|
140 |
+
* @return bool | string
|
141 |
+
*/
|
142 |
+
private function getModuleName()
|
143 |
+
{
|
144 |
+
$modulePath = $this->getParameterMapping();
|
145 |
+
|
146 |
+
if (!$modulePath && !empty($this->affiliateParameters)) {
|
147 |
+
$this->checkForCustomParameterKeyMapping();
|
148 |
+
$modulePath = $this->getParameterMapping();
|
149 |
+
}
|
150 |
+
|
151 |
+
return $modulePath;
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Retrieves the class name of the main package on success
|
157 |
+
*
|
158 |
+
* @return string
|
159 |
+
*/
|
160 |
+
private function getParameterMapping()
|
161 |
+
{
|
162 |
+
$parameter = $this->getAffiliateParameter();
|
163 |
+
|
164 |
+
return !empty($parameter['key']) ? $this->paramModuleMap[$parameter['key']] : '';
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* In case the module's key parameter can be customized,
|
169 |
+
* we will need to make a call to add the custom key to
|
170 |
+
* the module mapping array.
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
private function checkForCustomParameterKeyMapping()
|
175 |
+
{
|
176 |
+
foreach ($this->paramModuleMap as $param => $packageName) {
|
177 |
+
$utility = $this->getUtility($packageName);
|
178 |
+
if ($utility) {
|
179 |
+
$this->paramModuleMap[$utility->getTrackingCodeKey()] = $packageName;
|
180 |
+
unset($this->paramModuleMap[$param]);
|
181 |
+
|
182 |
+
return true;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
return false;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Retrieves a model to access
|
191 |
+
*
|
192 |
+
* @param string $path
|
193 |
+
* @return mixed
|
194 |
+
*/
|
195 |
+
private function getPluginModel($path)
|
196 |
+
{
|
197 |
+
return $this->initAffiliateClass($this->getModuleName(), $path);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Small helper that concatenate the first two params given
|
202 |
+
* with an underscore & loads the model
|
203 |
+
*
|
204 |
+
* @param string $partOne - first part of class name
|
205 |
+
* @param string $partTwo - second part of class name
|
206 |
+
* @param array $data - constructor params
|
207 |
+
*
|
208 |
+
* @return mixed
|
209 |
+
*/
|
210 |
+
private function initAffiliateClass($partOne, $partTwo, $data = array())
|
211 |
+
{
|
212 |
+
$partOne = strtolower(self::CLASS_SHORT_PATH . '_' . $partOne);
|
213 |
+
return @ Mage::getModel($partOne . '_' . strtolower($partTwo), $data);
|
214 |
+
}
|
215 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Affiliate/Utility.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
abstract class Shopgate_Framework_Model_Modules_Affiliate_Utility
|
25 |
+
{
|
26 |
+
const DEFAULT_KEY = '';
|
27 |
+
const COUPON_TYPE = 'affiliate';
|
28 |
+
|
29 |
+
/** @var Shopgate_Framework_Model_Modules_Validator */
|
30 |
+
protected $validator;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Loads validator as it needs to check that the module is active
|
34 |
+
* before running module specific methods
|
35 |
+
*
|
36 |
+
* @param array $data - array holding the injection
|
37 |
+
* @throws Exception
|
38 |
+
*/
|
39 |
+
public function __construct(array $data)
|
40 |
+
{
|
41 |
+
$validator = current($data);
|
42 |
+
|
43 |
+
if (!$validator instanceof Shopgate_Framework_Model_Interfaces_Modules_Validator) {
|
44 |
+
throw new Exception('Error loading validator');
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->validator = $validator;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Returns a custom parameter key
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
abstract public function getTrackingCodeKey();
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Run sales rule validation/invalidation hook
|
59 |
+
*/
|
60 |
+
abstract public function salesRuleHook();
|
61 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Factory.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Main factory that gets inherited by other module factories
|
27 |
+
*/
|
28 |
+
class Shopgate_Framework_Model_Modules_Factory extends Mage_Core_Model_Abstract
|
29 |
+
{
|
30 |
+
/** @var ShopgateOrder | ShopgateCart */
|
31 |
+
private $sgOrder;
|
32 |
+
|
33 |
+
/** @var Shopgate_Framework_Model_Interfaces_Modules_Router */
|
34 |
+
private $routerModel;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @throws Exception
|
38 |
+
*/
|
39 |
+
public function _construct()
|
40 |
+
{
|
41 |
+
$sgOrder = current($this->_data);
|
42 |
+
$router = next($this->_data);
|
43 |
+
if (!$sgOrder instanceof ShopgateCartBase
|
44 |
+
|| !$router instanceof Shopgate_Framework_Model_Interfaces_Modules_Router
|
45 |
+
) {
|
46 |
+
$error = Mage::helper('shopgate')->__('Incorrect class provided to: %s::_constructor()', get_class($this));
|
47 |
+
ShopgateLogger::getInstance()->log($error, ShopgateLogger::LOGTYPE_ERROR);
|
48 |
+
throw new Exception($error);
|
49 |
+
}
|
50 |
+
$this->sgOrder = $sgOrder;
|
51 |
+
$this->routerModel = $router;
|
52 |
+
}
|
53 |
+
|
54 |
+
/** @return Shopgate_Framework_Model_Modules_Affiliate_Router */
|
55 |
+
protected function getRouter()
|
56 |
+
{
|
57 |
+
return $this->routerModel;
|
58 |
+
}
|
59 |
+
|
60 |
+
/** @return ShopgateCart|ShopgateOrder */
|
61 |
+
protected function getSgOrder()
|
62 |
+
{
|
63 |
+
return $this->sgOrder;
|
64 |
+
}
|
65 |
+
}
|
app/code/community/Shopgate/Framework/Model/Modules/Validator.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
class Shopgate_Framework_Model_Modules_Validator implements Shopgate_Framework_Model_Interfaces_Modules_Validator
|
25 |
+
{
|
26 |
+
const XML_CONFIG_ENABLED = '';
|
27 |
+
const MODULE_CONFIG = '';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* All around check for whether module is the one to use
|
31 |
+
*
|
32 |
+
* @return bool
|
33 |
+
*/
|
34 |
+
public function isValid()
|
35 |
+
{
|
36 |
+
return $this->isEnabled() && $this->isModuleActive() && $this->checkGenericValid();
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Checks store config to be active
|
41 |
+
*
|
42 |
+
* @return bool
|
43 |
+
*/
|
44 |
+
public function isEnabled()
|
45 |
+
{
|
46 |
+
$config = $this->getConstant('XML_CONFIG_ENABLED');
|
47 |
+
$val = Mage::getStoreConfig($config);
|
48 |
+
$enabled = !empty($val);
|
49 |
+
if (!$enabled) {
|
50 |
+
$debug = Mage::helper('shopgate')->__(
|
51 |
+
'Enabled check by path "%s" was evaluated as empty: "%s" in class "%s"',
|
52 |
+
$config,
|
53 |
+
$val,
|
54 |
+
get_class($this)
|
55 |
+
);
|
56 |
+
ShopgateLogger::getInstance()->log($debug, ShopgateLogger::LOGTYPE_DEBUG);
|
57 |
+
}
|
58 |
+
|
59 |
+
return $enabled;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Checks module node to be active
|
64 |
+
*
|
65 |
+
* @return mixed
|
66 |
+
*/
|
67 |
+
public function isModuleActive()
|
68 |
+
{
|
69 |
+
$config = $this->getConstant('MODULE_CONFIG');
|
70 |
+
$active = Mage::getConfig()->getModuleConfig($config)->is('active', 'true');
|
71 |
+
|
72 |
+
if (!$active) {
|
73 |
+
$debug = Mage::helper('shopgate')->__(
|
74 |
+
'Module by config "%s" was not active in class "%s"',
|
75 |
+
$config,
|
76 |
+
get_class($this)
|
77 |
+
);
|
78 |
+
ShopgateLogger::getInstance()->log($debug, ShopgateLogger::LOGTYPE_DEBUG);
|
79 |
+
}
|
80 |
+
|
81 |
+
return $active;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Implement any custom validation
|
86 |
+
*
|
87 |
+
* @return bool
|
88 |
+
*/
|
89 |
+
public function checkGenericValid()
|
90 |
+
{
|
91 |
+
return true;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Added support for PHP version 5.2
|
96 |
+
* constant retrieval
|
97 |
+
*
|
98 |
+
* @param string $input
|
99 |
+
*
|
100 |
+
* @return mixed
|
101 |
+
*/
|
102 |
+
protected final function getConstant($input)
|
103 |
+
{
|
104 |
+
$configClass = new ReflectionClass($this);
|
105 |
+
|
106 |
+
return $configClass->getConstant($input);
|
107 |
+
}
|
108 |
+
}
|
app/code/community/Shopgate/Framework/Model/Payment/Abstract.php
CHANGED
@@ -27,7 +27,9 @@
|
|
27 |
* @package Shopgate_Framework_Model_Payment_Abstract
|
28 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
29 |
*/
|
30 |
-
class Shopgate_Framework_Model_Payment_Abstract
|
|
|
|
|
31 |
{
|
32 |
/**
|
33 |
* Has to match the payment_method coming from API call
|
27 |
* @package Shopgate_Framework_Model_Payment_Abstract
|
28 |
* @author Konstantin Kiritsenko <konstantin@kiritsenko.com>
|
29 |
*/
|
30 |
+
class Shopgate_Framework_Model_Payment_Abstract
|
31 |
+
extends Mage_Core_Model_Abstract
|
32 |
+
implements Shopgate_Framework_Model_Interfaces_Modules_Validator
|
33 |
{
|
34 |
/**
|
35 |
* Has to match the payment_method coming from API call
|
app/code/community/Shopgate/Framework/Model/Payment/Abstract/AbstractPayol.php
CHANGED
@@ -100,6 +100,7 @@ class Shopgate_Framework_Model_Payment_Abstract_AbstractPayol extends Shopgate_F
|
|
100 |
*/
|
101 |
public function setOrderStatus($magentoOrder)
|
102 |
{
|
|
|
103 |
$status = '';
|
104 |
$amountToCapture = $this->getShopgateOrder()->getAmountComplete();
|
105 |
$payment = $this->getOrder()->getPayment();
|
100 |
*/
|
101 |
public function setOrderStatus($magentoOrder)
|
102 |
{
|
103 |
+
$this->setOrder($magentoOrder);
|
104 |
$status = '';
|
105 |
$amountToCapture = $this->getShopgateOrder()->getAmountComplete();
|
106 |
$payment = $this->getOrder()->getPayment();
|
app/code/community/Shopgate/Framework/Model/Payment/Cc/AuthnAbstract.php
CHANGED
@@ -79,14 +79,15 @@ class Shopgate_Framework_Model_Payment_Cc_AuthnAbstract extends Shopgate_Framewo
|
|
79 |
*/
|
80 |
public function setOrderStatus($order)
|
81 |
{
|
82 |
-
$
|
|
|
83 |
$state = Mage_Sales_Model_Order::STATE_PROCESSING;
|
84 |
$status = $this->_getHelper()->getStatusFromState($state);
|
85 |
$message = '';
|
86 |
|
87 |
switch ($this->_responseCode) {
|
88 |
case self::RESPONSE_CODE_APPROVED:
|
89 |
-
$duePrice = $this->
|
90 |
$message = Mage::helper('paypal')->__('Authorized amount of %s.', $duePrice);
|
91 |
|
92 |
if ($this->_transactionType == self::SHOPGATE_PAYMENT_STATUS_AUTH_CAPTURE) {
|
@@ -117,10 +118,10 @@ class Shopgate_Framework_Model_Payment_Cc_AuthnAbstract extends Shopgate_Framewo
|
|
117 |
$message = $this->_getHelper()->__('[SHOPGATE] Unrecognized response code: %s', $this->_responseCode);
|
118 |
ShopgateLogger::getInstance()->log($message, ShopgateLogger::LOGTYPE_ERROR);
|
119 |
}
|
120 |
-
$this->
|
121 |
-
$
|
122 |
|
123 |
-
return $
|
124 |
}
|
125 |
|
126 |
/**
|
79 |
*/
|
80 |
public function setOrderStatus($order)
|
81 |
{
|
82 |
+
$this->setOrder($order);
|
83 |
+
$captured = $this->getOrder()->getBaseCurrency()->formatTxt($this->getOrder()->getBaseTotalInvoiced());
|
84 |
$state = Mage_Sales_Model_Order::STATE_PROCESSING;
|
85 |
$status = $this->_getHelper()->getStatusFromState($state);
|
86 |
$message = '';
|
87 |
|
88 |
switch ($this->_responseCode) {
|
89 |
case self::RESPONSE_CODE_APPROVED:
|
90 |
+
$duePrice = $this->getOrder()->getBaseCurrency()->formatTxt($this->getOrder()->getTotalDue());
|
91 |
$message = Mage::helper('paypal')->__('Authorized amount of %s.', $duePrice);
|
92 |
|
93 |
if ($this->_transactionType == self::SHOPGATE_PAYMENT_STATUS_AUTH_CAPTURE) {
|
118 |
$message = $this->_getHelper()->__('[SHOPGATE] Unrecognized response code: %s', $this->_responseCode);
|
119 |
ShopgateLogger::getInstance()->log($message, ShopgateLogger::LOGTYPE_ERROR);
|
120 |
}
|
121 |
+
$this->getOrder()->setState($state, $status, $message);
|
122 |
+
$this->getOrder()->setShopgateStatusSet(true);
|
123 |
|
124 |
+
return $this->getOrder();
|
125 |
}
|
126 |
|
127 |
/**
|
app/code/community/Shopgate/Framework/Model/Payment/Interface.php
CHANGED
@@ -58,33 +58,4 @@ interface Shopgate_Framework_Model_Payment_Interface
|
|
58 |
* @return mixed
|
59 |
*/
|
60 |
public function setOrderStatus($magentoOrder);
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Checks isValid, isEnabled, isModuleActive & checkGenericValid
|
64 |
-
*
|
65 |
-
* @return bool
|
66 |
-
*/
|
67 |
-
public function isValid();
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Checks if module is enabled based on XML_CONFIG_ENABLED constant
|
71 |
-
*
|
72 |
-
* @return mixed
|
73 |
-
*/
|
74 |
-
public function isEnabled();
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Checks if module is active based on MODULE_CONFIG constant
|
78 |
-
*
|
79 |
-
* @return bool
|
80 |
-
*/
|
81 |
-
public function isModuleActive();
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Generic validity check that can be overridden
|
85 |
-
*
|
86 |
-
* @return bool
|
87 |
-
*/
|
88 |
-
public function checkGenericValid();
|
89 |
-
|
90 |
}
|
58 |
* @return mixed
|
59 |
*/
|
60 |
public function setOrderStatus($magentoOrder);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
}
|
app/code/community/Shopgate/Framework/Model/Shopgate/Cart/Validation/Stock/Simple.php
CHANGED
@@ -65,9 +65,7 @@ class Shopgate_Framework_Model_Shopgate_Cart_Validation_Stock_Simple
|
|
65 |
$checkIncrements = $stockItem->checkQtyIncrements($item->getQty());
|
66 |
}
|
67 |
|
68 |
-
if ($stockItem->getManageStock() && !$product->isSaleable()
|
69 |
-
&& (!$stockItem->getBackorders() || !$stockItem->getIsInStock())
|
70 |
-
) {
|
71 |
$isBuyable = false;
|
72 |
$error = array();
|
73 |
$error['type'] = ShopgateLibraryException::CART_ITEM_OUT_OF_STOCK;
|
65 |
$checkIncrements = $stockItem->checkQtyIncrements($item->getQty());
|
66 |
}
|
67 |
|
68 |
+
if ($stockItem->getManageStock() && !$product->isSaleable() && !$stockItem->getBackorders()) {
|
|
|
|
|
69 |
$isBuyable = false;
|
70 |
$error = array();
|
71 |
$error['type'] = ShopgateLibraryException::CART_ITEM_OUT_OF_STOCK;
|
app/code/community/Shopgate/Framework/Model/Shopgate/Order.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Shopgate GmbH
|
4 |
*
|
@@ -19,21 +20,7 @@
|
|
19 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
*
|
21 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
22 |
-
|
23 |
-
|
24 |
-
/**
|
25 |
-
* User: Peter Liebig
|
26 |
-
* Date: 23.01.14
|
27 |
-
* Time: 00:51
|
28 |
-
* E-Mail: p.liebig@me.com
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @author Shopgate GmbH, 35510 Butzbach, DE
|
33 |
-
* @package Shopgate_Framework
|
34 |
-
*/
|
35 |
-
|
36 |
-
/**
|
37 |
* @method int getShopgateOrderId()
|
38 |
* @method Shopgate_Framework_Model_Shopgate_Order setStoreId(int $value)
|
39 |
* @method int getStoreId()
|
@@ -55,12 +42,11 @@
|
|
55 |
* @method Shopgate_Framework_Model_Shopgate_Order setIsTest(bool $value)
|
56 |
* @method bool getIsCustomerInvoiceBlocked()
|
57 |
* @method Shopgate_Framework_Model_Shopgate_Order setIsCustomerInvoiceBlocked(bool $value)
|
58 |
-
*
|
59 |
*/
|
60 |
class Shopgate_Framework_Model_Shopgate_Order extends Mage_Core_Model_Abstract
|
61 |
{
|
62 |
/**
|
63 |
-
*
|
64 |
*/
|
65 |
protected function _construct()
|
66 |
{
|
@@ -82,19 +68,36 @@ class Shopgate_Framework_Model_Shopgate_Order extends Mage_Core_Model_Abstract
|
|
82 |
public function getShopgateOrderObject()
|
83 |
{
|
84 |
$data = $this->getReceivedData();
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
return $data;
|
88 |
}
|
89 |
|
90 |
/**
|
91 |
-
*
|
92 |
*
|
93 |
* @return array
|
94 |
*/
|
95 |
public function getReportedShippingCollections()
|
96 |
{
|
97 |
-
$data = $this->getData(
|
98 |
$data = unserialize($data);
|
99 |
if (!$data) {
|
100 |
$data = array();
|
@@ -110,7 +113,7 @@ class Shopgate_Framework_Model_Shopgate_Order extends Mage_Core_Model_Abstract
|
|
110 |
public function setReportedShippingCollections(array $collection_ids)
|
111 |
{
|
112 |
$collection_ids = serialize($collection_ids);
|
113 |
-
$this->setData(
|
114 |
|
115 |
return $this;
|
116 |
}
|
@@ -138,14 +141,14 @@ class Shopgate_Framework_Model_Shopgate_Order extends Mage_Core_Model_Abstract
|
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
-
*
|
142 |
*
|
143 |
* @return Mage_Sales_Model_Order|NULL
|
144 |
*/
|
145 |
public function getOrder()
|
146 |
{
|
147 |
if ($this->getOrderId() !== null) {
|
148 |
-
return Mage::getModel(
|
149 |
}
|
150 |
|
151 |
return null;
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Shopgate GmbH
|
5 |
*
|
20 |
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
*
|
22 |
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
* @method int getShopgateOrderId()
|
25 |
* @method Shopgate_Framework_Model_Shopgate_Order setStoreId(int $value)
|
26 |
* @method int getStoreId()
|
42 |
* @method Shopgate_Framework_Model_Shopgate_Order setIsTest(bool $value)
|
43 |
* @method bool getIsCustomerInvoiceBlocked()
|
44 |
* @method Shopgate_Framework_Model_Shopgate_Order setIsCustomerInvoiceBlocked(bool $value)
|
|
|
45 |
*/
|
46 |
class Shopgate_Framework_Model_Shopgate_Order extends Mage_Core_Model_Abstract
|
47 |
{
|
48 |
/**
|
49 |
+
* Init Shopgate model
|
50 |
*/
|
51 |
protected function _construct()
|
52 |
{
|
68 |
public function getShopgateOrderObject()
|
69 |
{
|
70 |
$data = $this->getReceivedData();
|
71 |
+
|
72 |
+
if ($data) {
|
73 |
+
$data = unserialize($data);
|
74 |
+
}
|
75 |
+
|
76 |
+
if (!$data instanceof ShopgateOrder) {
|
77 |
+
$orderNumber = $this->getShopgateOrderNumber();
|
78 |
+
ShopgateLogger::getInstance()->log("Could not unserialize order $orderNumber. Requesting Merchant API.");
|
79 |
+
$config = Mage::helper('shopgate/config')->getConfig($this->getStoreId());
|
80 |
+
$builder = new ShopgateBuilder($config);
|
81 |
+
$merchantApi = $builder->buildMerchantApi();
|
82 |
+
$response = $merchantApi->getOrders(array('order_numbers[0]' => $orderNumber, 'with_items' => 1));
|
83 |
+
$dataArray = $response->getData();
|
84 |
+
$data = $dataArray[0];
|
85 |
+
$this->setReceivedData(serialize($data));
|
86 |
+
$this->save();
|
87 |
+
ShopgateLogger::getInstance()->log("Got order $orderNumber again. Saved to database");
|
88 |
+
}
|
89 |
|
90 |
return $data;
|
91 |
}
|
92 |
|
93 |
/**
|
94 |
+
* Get all shipments for the order
|
95 |
*
|
96 |
* @return array
|
97 |
*/
|
98 |
public function getReportedShippingCollections()
|
99 |
{
|
100 |
+
$data = $this->getData('reported_shipping_collections');
|
101 |
$data = unserialize($data);
|
102 |
if (!$data) {
|
103 |
$data = array();
|
113 |
public function setReportedShippingCollections(array $collection_ids)
|
114 |
{
|
115 |
$collection_ids = serialize($collection_ids);
|
116 |
+
$this->setData('reported_shipping_collections', $collection_ids);
|
117 |
|
118 |
return $this;
|
119 |
}
|
141 |
}
|
142 |
|
143 |
/**
|
144 |
+
* Return real order from shopgate order if exists
|
145 |
*
|
146 |
* @return Mage_Sales_Model_Order|NULL
|
147 |
*/
|
148 |
public function getOrder()
|
149 |
{
|
150 |
if ($this->getOrderId() !== null) {
|
151 |
+
return Mage::getModel('sales/order')->load($this->getOrderId());
|
152 |
}
|
153 |
|
154 |
return null;
|
app/code/community/Shopgate/Framework/Model/Shopgate/Plugin.php
CHANGED
@@ -73,7 +73,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
73 |
protected $_defaultCategoryRow = null;
|
74 |
|
75 |
/**
|
76 |
-
* @var null |
|
77 |
*/
|
78 |
protected $_factory = null;
|
79 |
|
@@ -102,26 +102,14 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
-
*
|
106 |
*
|
107 |
-
* @
|
108 |
-
*/
|
109 |
-
protected function _setFactory(Shopgate_Framework_Model_Payment_Factory $factory)
|
110 |
-
{
|
111 |
-
$this->_factory = $factory;
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Factory getter
|
116 |
-
*
|
117 |
-
* @return null|Shopgate_Framework_Model_Payment_Factory
|
118 |
*/
|
119 |
protected function _getFactory()
|
120 |
{
|
121 |
if (!$this->_factory) {
|
122 |
-
$
|
123 |
-
$factory = Mage::getModel('shopgate/payment_factory', array($shopgateOrder));
|
124 |
-
$this->_setFactory($factory);
|
125 |
}
|
126 |
return $this->_factory;
|
127 |
}
|
@@ -372,6 +360,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
372 |
$quote = $this->executeLoaders($this->_getCreateOrderQuoteLoaders(), $quote, $order);
|
373 |
$quote->setInventoryProcessed(false);
|
374 |
$quote->setTotalsCollectedFlag(false);
|
|
|
375 |
|
376 |
// Shipping rate is set at Shopgate_Framework_Model_Carrier_Fix
|
377 |
$quote->getShippingAddress()->setCollectShippingRates(true);
|
@@ -383,10 +372,12 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
383 |
$session = Mage::getSingleton('checkout/session');
|
384 |
$session->replaceQuote($quote);
|
385 |
}
|
|
|
386 |
$quote->collectTotals();
|
387 |
-
$rates
|
388 |
-
$title
|
389 |
-
$method
|
|
|
390 |
if (array_key_exists('shopgate', $rates)) {
|
391 |
/** @var Mage_Sales_Model_Quote_Address_Rate $addressRate */
|
392 |
$addressRate = $rates['shopgate'][0];
|
@@ -400,11 +391,16 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
400 |
$addressRate->setMethodTitle($rate->getMethodTitle());
|
401 |
$addressRate->save();
|
402 |
$title = $addressRate->getCarrierTitle() . " - " . $addressRate->getMethodTitle();
|
|
|
403 |
break;
|
404 |
}
|
405 |
}
|
406 |
}
|
407 |
}
|
|
|
|
|
|
|
|
|
408 |
$title = $title ? $title : $order->getShippingInfos()->getDisplayName();
|
409 |
$quote->getShippingAddress()->setShippingDescription($title);
|
410 |
$quote->save();
|
@@ -413,7 +409,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
413 |
// needed before $service->submitAll() is called
|
414 |
Mage::getSingleton('checkout/session')->replaceQuote($quote);
|
415 |
|
416 |
-
$magentoOrder = $this->_getFactory()->createNewOrder($quote);
|
417 |
|
418 |
$this->log("# Create order from quote", ShopgateLogger::LOGTYPE_DEBUG);
|
419 |
$this->log("# Modify order", ShopgateLogger::LOGTYPE_DEBUG);
|
@@ -422,7 +418,10 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
422 |
$magentoOrder->setCanShipPartiallyItem(true);
|
423 |
$magentoOrder = $this->executeLoaders($this->_getCreateOrderLoaders(), $magentoOrder, $order);
|
424 |
$magentoOrder->setShippingDescription($title);
|
425 |
-
$magentoOrder->
|
|
|
|
|
|
|
426 |
|
427 |
//todo: move this out, intentionally here after executeLoaders?
|
428 |
if ($magentoOrder->getTotalDue() > 0
|
@@ -435,6 +434,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
435 |
$magentoOrder->setBaseTotalDue(0);
|
436 |
}
|
437 |
}
|
|
|
438 |
$magentoOrder->save();
|
439 |
|
440 |
$this->log("# Commit Transaction", ShopgateLogger::LOGTYPE_DEBUG);
|
@@ -474,6 +474,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
474 |
$result["warnings"] = $warnings;
|
475 |
}
|
476 |
$this->_setShopgateOrder($magentoOrder, $order);
|
|
|
477 |
} catch (ShopgateLibraryException $e) {
|
478 |
Mage::getModel("sales/order")->getResource()->rollback();
|
479 |
throw $e;
|
@@ -532,9 +533,9 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
532 |
continue;
|
533 |
}
|
534 |
|
535 |
-
$orderInfo
|
536 |
-
$orderInfo
|
537 |
-
$amountWithTax
|
538 |
|
539 |
$stackQuantity = 1;
|
540 |
if (!empty($orderInfo['stack_quantity']) && $orderInfo['stack_quantity'] > 1) {
|
@@ -547,7 +548,8 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
547 |
|
548 |
$pId = $orderInfo["product_id"];
|
549 |
/** @var Mage_Catalog_Model_Product $product */
|
550 |
-
$product = Mage::getModel('catalog/product')
|
|
|
551 |
->load($pId);
|
552 |
|
553 |
if (!$product->getId()) {
|
@@ -562,30 +564,27 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
562 |
if (strpos($itemNumber, '-') !== false) {
|
563 |
$productWeight = $product->getTypeInstance()->getWeight();
|
564 |
$productIds = explode('-', $itemNumber);
|
565 |
-
|
566 |
-
$
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
$buyObject = $this->_createQuoteItemBuyInfo($item, $
|
574 |
-
$superAttributes = $
|
575 |
$superAttConfig = array();
|
576 |
|
577 |
foreach ($superAttributes as $productAttribute) {
|
578 |
-
$superAttConfig[$productAttribute['attribute_id']] = $
|
579 |
$productAttribute['attribute_code']
|
580 |
);
|
581 |
}
|
582 |
$buyObject->setSuperAttribute($superAttConfig);
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
$product = Mage::getModel('catalog/product')->setStoreId($this->_getConfig()->getStoreViewId())->load($childId);
|
587 |
-
$buyObject = $this->_createQuoteItemBuyInfo($item, $product, $stackQuantity);
|
588 |
-
$associatedProducts = $parent->getTypeInstance(true)->getAssociatedProducts($parent);
|
589 |
$superGroup = array();
|
590 |
foreach ($associatedProducts as $associatedProduct) {
|
591 |
/** @var Mage_Catalog_Model_Product $associatedProduct */
|
@@ -593,7 +592,10 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
593 |
}
|
594 |
$buyObject->setSuperGroup($superGroup);
|
595 |
$buyObject->setSuperProductConfig(
|
596 |
-
array(
|
|
|
|
|
|
|
597 |
);
|
598 |
} else {
|
599 |
$buyObject = $this->_createQuoteItemBuyInfo($item, $product, $stackQuantity);
|
@@ -637,9 +639,9 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
637 |
$quoteItem->setTaxPercent($item->getTaxPercent());
|
638 |
|
639 |
if (!is_null($productWeight)) {
|
640 |
-
$quoteItem->setWeight($productWeight);
|
641 |
}
|
642 |
-
$quoteItem->setRowWeight($quoteItem->getWeight() * $quoteItem->
|
643 |
$quoteItem->setWeeeTaxApplied(serialize(array()));
|
644 |
} catch (Exception $e) {
|
645 |
$quote->setShopgateError(array($itemNumber => array($e->getCode() => $e->getMessage())));
|
@@ -822,7 +824,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
822 |
*/
|
823 |
protected function _setQuotePayment($quote, $order)
|
824 |
{
|
825 |
-
$payment = $this->_getFactory()->getPaymentModel();
|
826 |
|
827 |
$paymentInfo = array();
|
828 |
$info = $order->getPaymentInfos();
|
@@ -859,7 +861,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
859 |
$quote->getPayment()->setAdditionalInformation($paymentInfo);
|
860 |
$quote->getPayment()->setLastTransId($order->getPaymentTransactionNumber());
|
861 |
|
862 |
-
$quote = $this->_getFactory()->prepareQuote($quote, $info);
|
863 |
|
864 |
return $quote;
|
865 |
}
|
@@ -1062,9 +1064,10 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1062 |
*/
|
1063 |
protected function _setQuoteShopCoupons($quote, $order)
|
1064 |
{
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
|
|
1068 |
|
1069 |
if (count($order->getExternalCoupons()) > 1) {
|
1070 |
throw new ShopgateLibraryException(ShopgateLibraryException::COUPON_TOO_MANY_COUPONS);
|
@@ -1082,6 +1085,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1082 |
'Field "internal_info" is empty.'
|
1083 |
);
|
1084 |
}
|
|
|
1085 |
if (!isset($couponInfos["coupon_id"])) {
|
1086 |
throw new ShopgateLibraryException(
|
1087 |
ShopgateLibraryException::COUPON_NOT_VALID,
|
@@ -1153,6 +1157,8 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1153 |
}
|
1154 |
|
1155 |
/**
|
|
|
|
|
1156 |
* @param Mage_Sales_Model_Order $magentoOrder
|
1157 |
* @param ShopgateOrder $shopgateOrder
|
1158 |
*
|
@@ -1161,22 +1167,17 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1161 |
protected function _addCustomFields(Mage_Sales_Model_Order $magentoOrder, ShopgateOrder $shopgateOrder)
|
1162 |
{
|
1163 |
$magentoOrder = $this->_getHelper()->setCustomFields($magentoOrder, $shopgateOrder);
|
|
|
|
|
|
|
|
|
|
|
1164 |
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
$billing = $this->_getHelper()->setCustomFields($billing, $invoiceAddress);
|
1171 |
-
$magentoOrder->setBillingAddress($billing);
|
1172 |
-
|
1173 |
-
/**
|
1174 |
-
* Assign custom fields to shipping address
|
1175 |
-
*/
|
1176 |
-
$deliveryAddress = $shopgateOrder->getDeliveryAddress();
|
1177 |
-
$shipping = $magentoOrder->getShippingAddress();
|
1178 |
-
$shipping = $this->_getHelper()->setCustomFields($shipping, $deliveryAddress);
|
1179 |
-
$magentoOrder->setShippingAddress($shipping);
|
1180 |
|
1181 |
return $magentoOrder;
|
1182 |
}
|
@@ -1429,7 +1430,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1429 |
*/
|
1430 |
protected function _setOrderState($magentoOrder, $shopgateOrder)
|
1431 |
{
|
1432 |
-
$magentoOrder = $this->_getFactory()->setOrderStatus($magentoOrder);
|
1433 |
if ($magentoOrder->getShopgateStatusSet()) {
|
1434 |
//do nothing, but we will need to pull this whole thing inside factory
|
1435 |
} elseif ($shopgateOrder->getPaymentMethod() == ShopgateOrder::PREPAY && !$shopgateOrder->getIsPaid()) {
|
@@ -1522,7 +1523,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1522 |
*/
|
1523 |
protected function _setOrderPayment($magentoOrder, $shopgateOrder = null)
|
1524 |
{
|
1525 |
-
return $this->_getFactory()->manipulateOrderWithPaymentData($magentoOrder);
|
1526 |
}
|
1527 |
|
1528 |
/**
|
@@ -1616,7 +1617,12 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1616 |
/* @var $mageRule Mage_SalesRule_Model_Rule */
|
1617 |
|
1618 |
if ($this->_getConfig()->applyCartRulesToCart()) {
|
1619 |
-
return $this->_getCouponHelper()->checkCouponsAndCartRules(
|
|
|
|
|
|
|
|
|
|
|
1620 |
}
|
1621 |
|
1622 |
if (!$cart->getExternalCoupons()) {
|
@@ -1629,7 +1635,6 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1629 |
|
1630 |
foreach ($cart->getExternalCoupons() as $coupon) {
|
1631 |
$externalCoupon = $this->_getCouponHelper()->validateExternalCoupon($coupon, $mageQuote, $this->useTaxClasses);
|
1632 |
-
|
1633 |
if ($externalCoupon->getIsValid()) {
|
1634 |
$validCouponsInCart++;
|
1635 |
}
|
@@ -1648,6 +1653,7 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1648 |
/**
|
1649 |
* Checks the content of a cart to be valid and returns necessary changes if applicable.
|
1650 |
* This currently only supports the validation of coupons.
|
|
|
1651 |
*
|
1652 |
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_cart#API_Response
|
1653 |
*
|
@@ -1662,41 +1668,57 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1662 |
*/
|
1663 |
public function checkCart(ShopgateCart $cart)
|
1664 |
{
|
1665 |
-
$
|
|
|
1666 |
$db->beginTransaction();
|
1667 |
$this->_errorOnInvalidCoupon = false;
|
1668 |
$this->_getCustomerHelper()->addCustomerToCart($cart);
|
1669 |
$mageCart = $this->_createMagentoCartFromShopgateCart($cart);
|
|
|
1670 |
$response = array(
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
$cart,
|
1678 |
$this->_getConfig()->getStoreViewId()
|
1679 |
)
|
1680 |
);
|
1681 |
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
$
|
1686 |
}
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
|
|
|
|
1690 |
}
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
|
|
|
|
1694 |
}
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
|
|
|
|
1698 |
}
|
1699 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1700 |
$db->rollback();
|
1701 |
|
1702 |
return $response;
|
@@ -1798,20 +1820,25 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1798 |
}
|
1799 |
|
1800 |
/**
|
1801 |
-
* @param string $type
|
1802 |
-
* @param int $parentId
|
1803 |
-
* @param null $uIds
|
1804 |
*/
|
1805 |
protected function _buildCategoryTree($type, $parentId, $uIds = null)
|
1806 |
{
|
1807 |
-
$this->log(
|
1808 |
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
|
|
|
|
|
|
|
|
|
|
1813 |
|
1814 |
-
$maxCategoryPosition = Mage::getModel(
|
1815 |
->setOrder('position', 'DESC')
|
1816 |
->getFirstItem()
|
1817 |
->getPosition();
|
@@ -1819,24 +1846,18 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1819 |
$this->log("Max Category Position: {$maxCategoryPosition}", ShopgateLogger::LOGTYPE_DEBUG);
|
1820 |
$maxCategoryPosition += 100;
|
1821 |
|
1822 |
-
$categories = $tree->getChildren($root);
|
1823 |
-
if ($uIds) {
|
1824 |
-
$categories = array_intersect_key($categories, $uIds);
|
1825 |
-
}
|
1826 |
-
|
1827 |
if ($this->splittedExport) {
|
1828 |
$categories = array_slice($categories, $this->exportOffset, $this->exportLimit);
|
1829 |
-
$this->log(
|
1830 |
-
$this->log(
|
1831 |
-
$this->log(
|
1832 |
-
$this->log(
|
1833 |
}
|
1834 |
|
1835 |
foreach ($categories as $categoryId) {
|
1836 |
-
$this->log(
|
1837 |
-
|
1838 |
-
$
|
1839 |
-
if ($type == "csv") {
|
1840 |
$categoryExportModel = Mage::getModel('shopgate/export_category_csv');
|
1841 |
$categoryExportModel->setDefaultRow($this->buildDefaultCategoryRow());
|
1842 |
$categoryExportModel->setItem($category);
|
@@ -1942,9 +1963,8 @@ class Shopgate_Framework_Model_Shopgate_Plugin extends ShopgatePlugin
|
|
1942 |
$start = time();
|
1943 |
$productIds = $this->_getExportProduct(false, $this->exportLimit, $this->exportOffset);
|
1944 |
$oldVersion = $this->_getConfigHelper()->getIsMagentoVersionLower15();
|
1945 |
-
|
1946 |
$i = 1;
|
1947 |
-
|
1948 |
$productExportModel = Mage::getModel('shopgate/export_product_csv');
|
1949 |
$productExportModel->setDefaultRow($this->buildDefaultItemRow());
|
1950 |
$productExportModel->setDefaultTax($this->_defaultTax);
|
73 |
protected $_defaultCategoryRow = null;
|
74 |
|
75 |
/**
|
76 |
+
* @var null | Shopgate_Framework_Model_Factory
|
77 |
*/
|
78 |
protected $_factory = null;
|
79 |
|
102 |
}
|
103 |
|
104 |
/**
|
105 |
+
* Retrieve main factory
|
106 |
*
|
107 |
+
* @return Shopgate_Framework_Model_Factory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
*/
|
109 |
protected function _getFactory()
|
110 |
{
|
111 |
if (!$this->_factory) {
|
112 |
+
$this->_factory = Mage::getModel('shopgate/factory');
|
|
|
|
|
113 |
}
|
114 |
return $this->_factory;
|
115 |
}
|
360 |
$quote = $this->executeLoaders($this->_getCreateOrderQuoteLoaders(), $quote, $order);
|
361 |
$quote->setInventoryProcessed(false);
|
362 |
$quote->setTotalsCollectedFlag(false);
|
363 |
+
$this->_getFactory()->getAffiliate($order)->setUp($quote);
|
364 |
|
365 |
// Shipping rate is set at Shopgate_Framework_Model_Carrier_Fix
|
366 |
$quote->getShippingAddress()->setCollectShippingRates(true);
|
372 |
$session = Mage::getSingleton('checkout/session');
|
373 |
$session->replaceQuote($quote);
|
374 |
}
|
375 |
+
|
376 |
$quote->collectTotals();
|
377 |
+
$rates = $quote->getShippingAddress()->collectShippingRates()->getGroupedAllShippingRates();
|
378 |
+
$title = null;
|
379 |
+
$method = 'shopgate_fix';
|
380 |
+
$foundMappedMethod = false;
|
381 |
if (array_key_exists('shopgate', $rates)) {
|
382 |
/** @var Mage_Sales_Model_Quote_Address_Rate $addressRate */
|
383 |
$addressRate = $rates['shopgate'][0];
|
391 |
$addressRate->setMethodTitle($rate->getMethodTitle());
|
392 |
$addressRate->save();
|
393 |
$title = $addressRate->getCarrierTitle() . " - " . $addressRate->getMethodTitle();
|
394 |
+
$foundMappedMethod = true;
|
395 |
break;
|
396 |
}
|
397 |
}
|
398 |
}
|
399 |
}
|
400 |
+
|
401 |
+
if (!$foundMappedMethod) {
|
402 |
+
$quote->getShippingAddress()->setShippingMethod($method);
|
403 |
+
}
|
404 |
$title = $title ? $title : $order->getShippingInfos()->getDisplayName();
|
405 |
$quote->getShippingAddress()->setShippingDescription($title);
|
406 |
$quote->save();
|
409 |
// needed before $service->submitAll() is called
|
410 |
Mage::getSingleton('checkout/session')->replaceQuote($quote);
|
411 |
|
412 |
+
$magentoOrder = $this->_getFactory()->getPayment()->createNewOrder($quote);
|
413 |
|
414 |
$this->log("# Create order from quote", ShopgateLogger::LOGTYPE_DEBUG);
|
415 |
$this->log("# Modify order", ShopgateLogger::LOGTYPE_DEBUG);
|
418 |
$magentoOrder->setCanShipPartiallyItem(true);
|
419 |
$magentoOrder = $this->executeLoaders($this->_getCreateOrderLoaders(), $magentoOrder, $order);
|
420 |
$magentoOrder->setShippingDescription($title);
|
421 |
+
$orderShippingMethod = $magentoOrder->getShippingMethod();
|
422 |
+
if (empty($orderShippingMethod) || $method !== 'shopgate_fix') {
|
423 |
+
$magentoOrder->setShippingMethod($method);
|
424 |
+
}
|
425 |
|
426 |
//todo: move this out, intentionally here after executeLoaders?
|
427 |
if ($magentoOrder->getTotalDue() > 0
|
434 |
$magentoOrder->setBaseTotalDue(0);
|
435 |
}
|
436 |
}
|
437 |
+
$this->_getFactory()->getAffiliate($order)->promptCommission($magentoOrder);
|
438 |
$magentoOrder->save();
|
439 |
|
440 |
$this->log("# Commit Transaction", ShopgateLogger::LOGTYPE_DEBUG);
|
474 |
$result["warnings"] = $warnings;
|
475 |
}
|
476 |
$this->_setShopgateOrder($magentoOrder, $order);
|
477 |
+
$this->_getFactory()->getAffiliate($order)->destroyCookies();
|
478 |
} catch (ShopgateLibraryException $e) {
|
479 |
Mage::getModel("sales/order")->getResource()->rollback();
|
480 |
throw $e;
|
533 |
continue;
|
534 |
}
|
535 |
|
536 |
+
$orderInfo = $item->getInternalOrderInfo();
|
537 |
+
$orderInfo = $this->jsonDecode($orderInfo, true);
|
538 |
+
$amountWithTax = $item->getUnitAmountWithTax();
|
539 |
|
540 |
$stackQuantity = 1;
|
541 |
if (!empty($orderInfo['stack_quantity']) && $orderInfo['stack_quantity'] > 1) {
|
548 |
|
549 |
$pId = $orderInfo["product_id"];
|
550 |
/** @var Mage_Catalog_Model_Product $product */
|
551 |
+
$product = Mage::getModel('catalog/product')
|
552 |
+
->setStoreId($this->_getConfig()->getStoreViewId())
|
553 |
->load($pId);
|
554 |
|
555 |
if (!$product->getId()) {
|
564 |
if (strpos($itemNumber, '-') !== false) {
|
565 |
$productWeight = $product->getTypeInstance()->getWeight();
|
566 |
$productIds = explode('-', $itemNumber);
|
567 |
+
|
568 |
+
/** @var Mage_Catalog_Model_Product $child */
|
569 |
+
$child = Mage::getModel('catalog/product')
|
570 |
+
->setStoreId($this->_getConfig()->getStoreViewId())
|
571 |
+
->load($productIds[1]);
|
572 |
+
|
573 |
+
if ($product->isConfigurable() && !$this->_getConfig()->addOnlySimplesToCart()) {
|
574 |
+
$productWeight = $child->getTypeInstance()->getWeight();
|
575 |
+
$buyObject = $this->_createQuoteItemBuyInfo($item, $product, $stackQuantity);
|
576 |
+
$superAttributes = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product);
|
577 |
$superAttConfig = array();
|
578 |
|
579 |
foreach ($superAttributes as $productAttribute) {
|
580 |
+
$superAttConfig[$productAttribute['attribute_id']] = $child->getData(
|
581 |
$productAttribute['attribute_code']
|
582 |
);
|
583 |
}
|
584 |
$buyObject->setSuperAttribute($superAttConfig);
|
585 |
+
} elseif ($product->isGrouped()) {
|
586 |
+
$buyObject = $this->_createQuoteItemBuyInfo($item, $child, $stackQuantity);
|
587 |
+
$associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
|
|
|
|
|
|
|
588 |
$superGroup = array();
|
589 |
foreach ($associatedProducts as $associatedProduct) {
|
590 |
/** @var Mage_Catalog_Model_Product $associatedProduct */
|
592 |
}
|
593 |
$buyObject->setSuperGroup($superGroup);
|
594 |
$buyObject->setSuperProductConfig(
|
595 |
+
array(
|
596 |
+
'product_type' => Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE,
|
597 |
+
'product_id' => $product->getId()
|
598 |
+
)
|
599 |
);
|
600 |
} else {
|
601 |
$buyObject = $this->_createQuoteItemBuyInfo($item, $product, $stackQuantity);
|
639 |
$quoteItem->setTaxPercent($item->getTaxPercent());
|
640 |
|
641 |
if (!is_null($productWeight)) {
|
642 |
+
$quoteItem->setWeight((float)$productWeight);
|
643 |
}
|
644 |
+
$quoteItem->setRowWeight($quoteItem->getWeight() * $quoteItem->getQty());
|
645 |
$quoteItem->setWeeeTaxApplied(serialize(array()));
|
646 |
} catch (Exception $e) {
|
647 |
$quote->setShopgateError(array($itemNumber => array($e->getCode() => $e->getMessage())));
|
824 |
*/
|
825 |
protected function _setQuotePayment($quote, $order)
|
826 |
{
|
827 |
+
$payment = $this->_getFactory()->getPayment()->getPaymentModel();
|
828 |
|
829 |
$paymentInfo = array();
|
830 |
$info = $order->getPaymentInfos();
|
861 |
$quote->getPayment()->setAdditionalInformation($paymentInfo);
|
862 |
$quote->getPayment()->setLastTransId($order->getPaymentTransactionNumber());
|
863 |
|
864 |
+
$quote = $this->_getFactory()->getPayment()->prepareQuote($quote, $info);
|
865 |
|
866 |
return $quote;
|
867 |
}
|
1064 |
*/
|
1065 |
protected function _setQuoteShopCoupons($quote, $order)
|
1066 |
{
|
1067 |
+
$coupons = $order->getExternalCoupons();
|
1068 |
+
$coupons = $this->_getCouponHelper()->removeCartRuleCoupons($coupons);
|
1069 |
+
$coupons = $this->_getCouponHelper()->removeAffiliateCoupons($coupons);
|
1070 |
+
$order->setExternalCoupons($coupons);
|
1071 |
|
1072 |
if (count($order->getExternalCoupons()) > 1) {
|
1073 |
throw new ShopgateLibraryException(ShopgateLibraryException::COUPON_TOO_MANY_COUPONS);
|
1085 |
'Field "internal_info" is empty.'
|
1086 |
);
|
1087 |
}
|
1088 |
+
|
1089 |
if (!isset($couponInfos["coupon_id"])) {
|
1090 |
throw new ShopgateLibraryException(
|
1091 |
ShopgateLibraryException::COUPON_NOT_VALID,
|
1157 |
}
|
1158 |
|
1159 |
/**
|
1160 |
+
* Adds custom fields to order, billing and shipping address
|
1161 |
+
*
|
1162 |
* @param Mage_Sales_Model_Order $magentoOrder
|
1163 |
* @param ShopgateOrder $shopgateOrder
|
1164 |
*
|
1167 |
protected function _addCustomFields(Mage_Sales_Model_Order $magentoOrder, ShopgateOrder $shopgateOrder)
|
1168 |
{
|
1169 |
$magentoOrder = $this->_getHelper()->setCustomFields($magentoOrder, $shopgateOrder);
|
1170 |
+
$billing = $magentoOrder->getBillingAddress();
|
1171 |
+
if ($billing) {
|
1172 |
+
$this->_getHelper()->setCustomFields($billing, $shopgateOrder->getInvoiceAddress());
|
1173 |
+
$magentoOrder->setBillingAddress($billing);
|
1174 |
+
}
|
1175 |
|
1176 |
+
$shipping = $magentoOrder->getShippingAddress();
|
1177 |
+
if ($shipping) {
|
1178 |
+
$this->_getHelper()->setCustomFields($shipping, $shopgateOrder->getDeliveryAddress());
|
1179 |
+
$magentoOrder->setShippingAddress($shipping);
|
1180 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1181 |
|
1182 |
return $magentoOrder;
|
1183 |
}
|
1430 |
*/
|
1431 |
protected function _setOrderState($magentoOrder, $shopgateOrder)
|
1432 |
{
|
1433 |
+
$magentoOrder = $this->_getFactory()->getPayment()->setOrderStatus($magentoOrder);
|
1434 |
if ($magentoOrder->getShopgateStatusSet()) {
|
1435 |
//do nothing, but we will need to pull this whole thing inside factory
|
1436 |
} elseif ($shopgateOrder->getPaymentMethod() == ShopgateOrder::PREPAY && !$shopgateOrder->getIsPaid()) {
|
1523 |
*/
|
1524 |
protected function _setOrderPayment($magentoOrder, $shopgateOrder = null)
|
1525 |
{
|
1526 |
+
return $this->_getFactory()->getPayment()->manipulateOrderWithPaymentData($magentoOrder);
|
1527 |
}
|
1528 |
|
1529 |
/**
|
1617 |
/* @var $mageRule Mage_SalesRule_Model_Rule */
|
1618 |
|
1619 |
if ($this->_getConfig()->applyCartRulesToCart()) {
|
1620 |
+
return $this->_getCouponHelper()->checkCouponsAndCartRules(
|
1621 |
+
$mageCart,
|
1622 |
+
$cart,
|
1623 |
+
$this->useTaxClasses,
|
1624 |
+
$this->_getFactory()->getAffiliate($cart)
|
1625 |
+
);
|
1626 |
}
|
1627 |
|
1628 |
if (!$cart->getExternalCoupons()) {
|
1635 |
|
1636 |
foreach ($cart->getExternalCoupons() as $coupon) {
|
1637 |
$externalCoupon = $this->_getCouponHelper()->validateExternalCoupon($coupon, $mageQuote, $this->useTaxClasses);
|
|
|
1638 |
if ($externalCoupon->getIsValid()) {
|
1639 |
$validCouponsInCart++;
|
1640 |
}
|
1653 |
/**
|
1654 |
* Checks the content of a cart to be valid and returns necessary changes if applicable.
|
1655 |
* This currently only supports the validation of coupons.
|
1656 |
+
* Affiliate logic is ran after the customer info was added to ShopgateCart
|
1657 |
*
|
1658 |
* @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_cart#API_Response
|
1659 |
*
|
1668 |
*/
|
1669 |
public function checkCart(ShopgateCart $cart)
|
1670 |
{
|
1671 |
+
$affiliateFactory = $this->_getFactory()->getAffiliate($cart);
|
1672 |
+
$db = Mage::getSingleton('core/resource')->getConnection('core_write');
|
1673 |
$db->beginTransaction();
|
1674 |
$this->_errorOnInvalidCoupon = false;
|
1675 |
$this->_getCustomerHelper()->addCustomerToCart($cart);
|
1676 |
$mageCart = $this->_createMagentoCartFromShopgateCart($cart);
|
1677 |
+
$affiliateFactory->setUp();
|
1678 |
$response = array(
|
1679 |
+
'currency' => Mage::app()->getStore()->getCurrentCurrencyCode(),
|
1680 |
+
'external_coupons' => array(),
|
1681 |
+
'shipping_methods' => array(),
|
1682 |
+
'payment_methods' => array(),
|
1683 |
+
'items' => array(),
|
1684 |
+
'customer' => $this->_getSalesHelper()->getCustomerData(
|
1685 |
$cart,
|
1686 |
$this->_getConfig()->getStoreViewId()
|
1687 |
)
|
1688 |
);
|
1689 |
|
1690 |
+
$shippingMethods = $this->_getSalesHelper()->getShippingMethods($mageCart);
|
1691 |
+
if ($mageCart->getQuote()->hasItems() && $shippingMethods) {
|
1692 |
+
$response['shipping_methods'] = $shippingMethods;
|
1693 |
+
$this->log('Shipping methods loaded', ShopgateLogger::LOGTYPE_DEBUG);
|
1694 |
}
|
1695 |
+
|
1696 |
+
$coupons = $this->checkCoupons($mageCart, $cart);
|
1697 |
+
if ($coupons) {
|
1698 |
+
$response['external_coupons'] = $coupons;
|
1699 |
+
$this->log('Coupons loaded', ShopgateLogger::LOGTYPE_DEBUG);
|
1700 |
}
|
1701 |
+
|
1702 |
+
$paymentMethods = $this->_getSalesHelper()->getPaymentMethods($mageCart);
|
1703 |
+
if ($paymentMethods) {
|
1704 |
+
$response['payment_methods'] = $paymentMethods;
|
1705 |
+
$this->log('Payment methods loaded', ShopgateLogger::LOGTYPE_DEBUG);
|
1706 |
}
|
1707 |
+
|
1708 |
+
$items = $this->_getSalesHelper()->getItems($mageCart->getQuote(), $cart);
|
1709 |
+
if ($items) {
|
1710 |
+
$response['items'] = $items;
|
1711 |
+
$this->log('Items loaded', ShopgateLogger::LOGTYPE_DEBUG);
|
1712 |
}
|
1713 |
|
1714 |
+
$affiliateCoupon = $affiliateFactory->redeemCoupon($mageCart->getQuote(), $this->useTaxClasses);
|
1715 |
+
if ($affiliateCoupon) {
|
1716 |
+
$externalCoupons = $response['external_coupons'];
|
1717 |
+
$externalCoupons = $this->_getCouponHelper()->removeAffiliateCoupons($externalCoupons);
|
1718 |
+
$externalCoupons[] = $affiliateCoupon;
|
1719 |
+
$response['external_coupons'] = $externalCoupons;
|
1720 |
+
$this->log('Affiliate coupon loaded', ShopgateLogger::LOGTYPE_DEBUG);
|
1721 |
+
}
|
1722 |
$db->rollback();
|
1723 |
|
1724 |
return $response;
|
1820 |
}
|
1821 |
|
1822 |
/**
|
1823 |
+
* @param string $type - type of export
|
1824 |
+
* @param int $parentId - children of the parentId category will be pulled
|
1825 |
+
* @param null $uIds - UIDs to limit categories pulled
|
1826 |
*/
|
1827 |
protected function _buildCategoryTree($type, $parentId, $uIds = null)
|
1828 |
{
|
1829 |
+
$this->log('Build Tree with Parent-ID: ' . $parentId, ShopgateLogger::LOGTYPE_DEBUG);
|
1830 |
|
1831 |
+
if (!empty($uIds)) {
|
1832 |
+
$categories = $uIds;
|
1833 |
+
} else {
|
1834 |
+
$category = Mage::getModel('catalog/category');
|
1835 |
+
$tree = $category->getTreeModel();
|
1836 |
+
/** @noinspection PhpParamsInspection */
|
1837 |
+
$root = $category->getTreeModel()->load()->getNodeById($parentId);
|
1838 |
+
$categories = $tree->getChildren($root);
|
1839 |
+
}
|
1840 |
|
1841 |
+
$maxCategoryPosition = Mage::getModel('catalog/category')->getCollection()
|
1842 |
->setOrder('position', 'DESC')
|
1843 |
->getFirstItem()
|
1844 |
->getPosition();
|
1846 |
$this->log("Max Category Position: {$maxCategoryPosition}", ShopgateLogger::LOGTYPE_DEBUG);
|
1847 |
$maxCategoryPosition += 100;
|
1848 |
|
|
|
|
|
|
|
|
|
|
|
1849 |
if ($this->splittedExport) {
|
1850 |
$categories = array_slice($categories, $this->exportOffset, $this->exportLimit);
|
1851 |
+
$this->log('Limit: ' . $this->exportLimit, ShopgateLogger::LOGTYPE_ACCESS);
|
1852 |
+
$this->log('[*] Limit: ' . $this->exportLimit, ShopgateLogger::LOGTYPE_DEBUG);
|
1853 |
+
$this->log('Offset: ' . $this->exportOffset, ShopgateLogger::LOGTYPE_ACCESS);
|
1854 |
+
$this->log('[*] Offset: ' . $this->exportOffset, ShopgateLogger::LOGTYPE_DEBUG);
|
1855 |
}
|
1856 |
|
1857 |
foreach ($categories as $categoryId) {
|
1858 |
+
$this->log('Load Category with ID: ' . $categoryId, ShopgateLogger::LOGTYPE_DEBUG);
|
1859 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
1860 |
+
if ($type == 'csv') {
|
|
|
1861 |
$categoryExportModel = Mage::getModel('shopgate/export_category_csv');
|
1862 |
$categoryExportModel->setDefaultRow($this->buildDefaultCategoryRow());
|
1863 |
$categoryExportModel->setItem($category);
|
1963 |
$start = time();
|
1964 |
$productIds = $this->_getExportProduct(false, $this->exportLimit, $this->exportOffset);
|
1965 |
$oldVersion = $this->_getConfigHelper()->getIsMagentoVersionLower15();
|
|
|
1966 |
$i = 1;
|
1967 |
+
|
1968 |
$productExportModel = Mage::getModel('shopgate/export_product_csv');
|
1969 |
$productExportModel->setDefaultRow($this->buildDefaultItemRow());
|
1970 |
$productExportModel->setDefaultTax($this->_defaultTax);
|
app/code/community/Shopgate/Framework/Model/Shopgate/Shipping/Mapper.php
CHANGED
@@ -30,9 +30,16 @@
|
|
30 |
class Shopgate_Framework_Model_Shopgate_Shipping_Mapper extends Mage_Core_Model_Abstract
|
31 |
{
|
32 |
/**
|
33 |
-
*
|
34 |
*/
|
35 |
const DEFAULT_CARRIER = 'shopgate';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
* @var
|
38 |
*/
|
30 |
class Shopgate_Framework_Model_Shopgate_Shipping_Mapper extends Mage_Core_Model_Abstract
|
31 |
{
|
32 |
/**
|
33 |
+
* Default carrier const
|
34 |
*/
|
35 |
const DEFAULT_CARRIER = 'shopgate';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Plugin type returned in case of shipping methods
|
39 |
+
* provided
|
40 |
+
*/
|
41 |
+
const SHIPPING_TYPE_PLUGINAPI = 'PLUGINAPI';
|
42 |
+
|
43 |
/**
|
44 |
* @var
|
45 |
*/
|
app/code/community/Shopgate/Framework/Test/Helper/Billsafe/ClientTest.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
*/
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @coversDefaultClass Shopgate_Framework_Helper_Billsafe_Client
|
27 |
+
*/
|
28 |
+
class Shopgate_Framework_Test_Helper_Billsafe_ClientTest extends Shopgate_Framework_Test_Model_Utility
|
29 |
+
{
|
30 |
+
/**
|
31 |
+
* @uses Shopgate_Framework_Model_Shopgate_Order::load
|
32 |
+
* @covers ::getShopgateOrderNumber
|
33 |
+
*/
|
34 |
+
public function testGetShopgateOrderNumber()
|
35 |
+
{
|
36 |
+
$this->activateModule(Shopgate_Framework_Model_Payment_Simple_Billsafe::MODULE_CONFIG);
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Setup for load call. Will return and empty self first, then the Varien object
|
40 |
+
*/
|
41 |
+
$varien = new Varien_Object(array('shopgate_order_number' => '01234'));
|
42 |
+
$order = Mage::getModel('sales/order')->setIncrementId('5678');
|
43 |
+
$mock = $this->getModelMock('shopgate/shopgate_order');
|
44 |
+
$mock->expects($this->any())
|
45 |
+
->method('load')
|
46 |
+
->willReturnOnConsecutiveCalls($this->returnSelf(), $varien, $varien);
|
47 |
+
$this->replaceByMock('model', 'shopgate/shopgate_order', $mock);
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Client class setup as the constructor is buggy
|
51 |
+
*/
|
52 |
+
$client = $this->getHelperMock('shopgate/billsafe_client', array(), false, array(), '', false);
|
53 |
+
$reflection = new ReflectionClass($client);
|
54 |
+
$method = $reflection->getMethod('getShopgateOrderNumber');
|
55 |
+
$method->setAccessible(true);
|
56 |
+
|
57 |
+
$test = $method->invoke($client, $order);
|
58 |
+
$this->assertEquals($order->getIncrementId(), $test);
|
59 |
+
|
60 |
+
$test2 = $method->invoke($client, $order);
|
61 |
+
$this->assertEquals('01234', $test2);
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Test passing in Varien_Object to method signature, as long as there is no error, we are good
|
65 |
+
*/
|
66 |
+
$this->assertNotEmpty($method->invoke($client, $varien));
|
67 |
+
}
|
68 |
+
}
|
app/code/community/Shopgate/Framework/Test/Model/Modules/Affiliate/RouterTest.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Shopgate GmbH
|
5 |
+
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
+
* @coversDefaultClass Shopgate_Framework_Model_Modules_Affiliate_Router
|
24 |
+
*/
|
25 |
+
class Shopgate_Framework_Test_Model_Modules_Affiliate_RouterTest extends EcomDev_PHPUnit_Test_Case
|
26 |
+
{
|
27 |
+
/**
|
28 |
+
* @param string $expected - expected value of the parameter
|
29 |
+
* @param array $params - parameter list passed to setTrackingParameters
|
30 |
+
*
|
31 |
+
* @uses ShopgateOrder::setTrackingGetParameters
|
32 |
+
* @covers ::getAffiliateParameter
|
33 |
+
*
|
34 |
+
* @dataProvider affiliateParamDataProvider
|
35 |
+
*/
|
36 |
+
public function testGetAffiliateParameter($expected, $params)
|
37 |
+
{
|
38 |
+
$router = $this->getRouter($params);
|
39 |
+
$parameter = $router->getAffiliateParameter();
|
40 |
+
$actual = isset($parameter['value']) ? $parameter['value'] : '';
|
41 |
+
$this->assertEquals($expected, $actual);
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* @param string $expected - class name returned from method call result
|
46 |
+
* @param array $params - parameter list passed to setTrackingParameters
|
47 |
+
*
|
48 |
+
* @dataProvider validatorDataProvider
|
49 |
+
*/
|
50 |
+
public function testGetValidator($expected, $params)
|
51 |
+
{
|
52 |
+
//core_config_data key rewrite of a parameter that maps to Magestore
|
53 |
+
Mage::app()->getStore(0)->setConfig('affiliateplus/refer/url_param_array', ',acc,account');
|
54 |
+
$router = $this->getRouter($params);
|
55 |
+
$validator = $router->getValidator();
|
56 |
+
|
57 |
+
$this->assertInstanceOf($expected, $validator);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @expectedException Exception
|
62 |
+
*/
|
63 |
+
public function testBadConstructorCall()
|
64 |
+
{
|
65 |
+
Mage::getModel('shopgate/modules_affiliate_router', array());
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Simple data sets
|
70 |
+
*
|
71 |
+
* @return array
|
72 |
+
*/
|
73 |
+
public function affiliateParamDataProvider()
|
74 |
+
{
|
75 |
+
return array(
|
76 |
+
array(
|
77 |
+
'expected' => '12345',
|
78 |
+
'params' => array(
|
79 |
+
array('key' => 'test key', 'value' => 'test value'),
|
80 |
+
array('key' => 'acc', 'value' => '12345'),
|
81 |
+
array('key' => 'test_key2', 'value' => 'test_value2')
|
82 |
+
)
|
83 |
+
),
|
84 |
+
array(
|
85 |
+
'expected' => 'hello',
|
86 |
+
'params' => array(
|
87 |
+
array('key' => 'acc', 'value' => 'hello'),
|
88 |
+
array('key' => 'test key', 'value' => 'test value'),
|
89 |
+
array('key' => 'test_key2', 'value' => 'test_value2')
|
90 |
+
)
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'expected' => false,
|
94 |
+
'params' => array()
|
95 |
+
),
|
96 |
+
);
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @return array
|
101 |
+
*/
|
102 |
+
public function validatorDataProvider()
|
103 |
+
{
|
104 |
+
return array(
|
105 |
+
array(
|
106 |
+
'Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Validator',
|
107 |
+
'testing default param mapping' => array(
|
108 |
+
array('key' => 'test key', 'value' => 'test value'),
|
109 |
+
array('key' => 'acc', 'value' => '12345'),
|
110 |
+
array('key' => 'test_key2', 'value' => 'test_value2')
|
111 |
+
)
|
112 |
+
),
|
113 |
+
array(
|
114 |
+
'Shopgate_Framework_Model_Modules_Affiliate_Packages_Magestore_Validator',
|
115 |
+
'param rewrite in db config' => array(
|
116 |
+
array('key' => 'test key', 'value' => 'test value'),
|
117 |
+
array('key' => 'account', 'value' => '12345'),
|
118 |
+
array('key' => 'test_key2', 'value' => 'test_value2')
|
119 |
+
)
|
120 |
+
),
|
121 |
+
array(
|
122 |
+
'Shopgate_Framework_Model_Modules_Validator',
|
123 |
+
'param rewrite in db config' => array(
|
124 |
+
array('key' => 'test key', 'value' => 'test value'),
|
125 |
+
)
|
126 |
+
),
|
127 |
+
|
128 |
+
);
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Router retriever
|
133 |
+
*
|
134 |
+
* @param $params - parameter list passed to setTrackingParameters
|
135 |
+
* @return Shopgate_Framework_Model_Modules_Affiliate_Router
|
136 |
+
*/
|
137 |
+
private function getRouter($params)
|
138 |
+
{
|
139 |
+
$sgOrder = new ShopgateOrder();
|
140 |
+
$sgOrder->setTrackingGetParameters($params);
|
141 |
+
|
142 |
+
return Mage::getModel('shopgate/modules_affiliate_router', array($sgOrder));
|
143 |
+
}
|
144 |
+
}
|
app/code/community/Shopgate/Framework/changelog.txt
CHANGED
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
'''Version 2.9.36'''
|
2 |
* Update to library version 2.9.42
|
3 |
* Added support of shopping cart price rules for mobile orders
|
1 |
+
'''Version 2.9.37'''
|
2 |
+
* Magestore Affiliate Pro discount parameter support added
|
3 |
+
* Fixed get_categories by UID retriever
|
4 |
+
* Fixed configurable child product weight calculation
|
5 |
+
* Fixes for order 'shipping_method' mapping in the database
|
6 |
+
* Orders will print even if shopgate data is not present
|
7 |
+
* Fix for catalog price rules not honoring multi-store specific rules
|
8 |
+
* Fixed display error for big orders
|
9 |
+
* Fixed tax_percent calculation for shipping methods
|
10 |
+
* Fixed issue with virtual item import + custom options
|
11 |
+
* Fixed error in stock validation for items with backorders
|
12 |
+
* Fixed API order shipping updates in Authorize & Payoli orders
|
13 |
+
* Fixed BillSAFE order import no response
|
14 |
+
|
15 |
'''Version 2.9.36'''
|
16 |
* Update to library version 2.9.42
|
17 |
* Added support of shopping cart price rules for mobile orders
|
app/code/community/Shopgate/Framework/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgate_Framework>
|
5 |
-
<version>2.9.
|
6 |
</Shopgate_Framework>
|
7 |
</modules>
|
8 |
<phpunit>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Shopgate_Framework>
|
5 |
+
<version>2.9.37</version>
|
6 |
</Shopgate_Framework>
|
7 |
</modules>
|
8 |
<phpunit>
|
app/code/community/Shopgate/Framework/sql/shopgate_setup/mysql4-upgrade-2.9.36-2.9.37.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shopgate GmbH
|
4 |
+
*
|
5 |
+
* URHEBERRECHTSHINWEIS
|
6 |
+
*
|
7 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
8 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
9 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
10 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
11 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
12 |
+
*
|
13 |
+
* COPYRIGHT NOTICE
|
14 |
+
*
|
15 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
16 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
17 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
18 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
19 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
20 |
+
*
|
21 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
22 |
+
*/
|
23 |
+
|
24 |
+
$this->startSetup();
|
25 |
+
|
26 |
+
$this->run("
|
27 |
+
ALTER TABLE `{$this->getTable('shopgate_order')}`
|
28 |
+
MODIFY COLUMN received_data mediumtext NOT NULL
|
29 |
+
");
|
30 |
+
|
31 |
+
$this->endSetup();
|
app/design/adminhtml/default/default/template/shopgate/payment/mobile_payment.phtml
CHANGED
@@ -1,41 +1,56 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* User: Peter Liebig
|
4 |
-
* Date: 27.01.14
|
5 |
-
* Time: 15:58
|
6 |
-
* E-Mail: p.liebig@me.com
|
7 |
-
*/
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*
|
12 |
-
*
|
13 |
-
*
|
14 |
-
*
|
15 |
-
|
16 |
-
|
17 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
*/
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
) ?></strong><br /><?php endif; ?>
|
37 |
|
38 |
-
|
39 |
<p style="margin-top: 1em;">
|
40 |
<?php echo $this->printPaymentInfo($this->getPaymentInfos()); ?>
|
41 |
</p>
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
/**
|
4 |
+
* Shopgate GmbH
|
5 |
*
|
6 |
+
* URHEBERRECHTSHINWEIS
|
7 |
+
*
|
8 |
+
* Dieses Plugin ist urheberrechtlich geschützt. Es darf ausschließlich von Kunden der Shopgate GmbH
|
9 |
+
* zum Zwecke der eigenen Kommunikation zwischen dem IT-System des Kunden mit dem IT-System der
|
10 |
+
* Shopgate GmbH über www.shopgate.com verwendet werden. Eine darüber hinausgehende Vervielfältigung, Verbreitung,
|
11 |
+
* öffentliche Zugänglichmachung, Bearbeitung oder Weitergabe an Dritte ist nur mit unserer vorherigen
|
12 |
+
* schriftlichen Zustimmung zulässig. Die Regelungen der §§ 69 d Abs. 2, 3 und 69 e UrhG bleiben hiervon unberührt.
|
13 |
+
*
|
14 |
+
* COPYRIGHT NOTICE
|
15 |
+
*
|
16 |
+
* This plugin is the subject of copyright protection. It is only for the use of Shopgate GmbH customers,
|
17 |
+
* for the purpose of facilitating communication between the IT system of the customer and the IT system
|
18 |
+
* of Shopgate GmbH via www.shopgate.com. Any reproduction, dissemination, public propagation, processing or
|
19 |
+
* transfer to third parties is only permitted where we previously consented thereto in writing. The provisions
|
20 |
+
* of paragraph 69 d, sub-paragraphs 2, 3 and paragraph 69, sub-paragraph e of the German Copyright Act shall remain unaffected.
|
21 |
+
*
|
22 |
+
* @author Shopgate GmbH <interfaces@shopgate.com>
|
23 |
*/
|
24 |
|
25 |
+
/** @var Shopgate_Framework_Block_Payment_MobilePayment $this */
|
26 |
+
$shopgateOrder = $this->getShopgateOrder();
|
27 |
+
$shopgateObject = $shopgateOrder->getShopgateOrderObject();
|
28 |
+
|
29 |
+
if (!$shopgateOrder->getId() || empty($shopgateObject)):
|
30 |
+
echo $this->printHtmlError($this->__('Error importing order information: please contact Shopgate'));
|
31 |
+
endif;
|
32 |
+
|
33 |
+
if (!empty($shopgateObject) && $shopgateObject->getIsTest()):
|
34 |
+
echo $this->printHtmlError($this->__('## This order is a TEST by Shopgate - DO NOT SHIP!'));
|
35 |
+
endif;
|
36 |
|
37 |
+
if ($this->hasDifferentPrices()):
|
38 |
+
echo $this->printHtmlError(
|
39 |
+
$this->__(
|
40 |
+
'!! The total amount in Magento differs from the total amount at Shopgate. Please check your tax settings.'
|
41 |
+
)
|
42 |
+
);
|
43 |
+
endif;
|
44 |
|
45 |
+
if ($shopgateOrder->getIsShippingBlocked()):
|
46 |
+
echo $this->printHtmlError($this->__('## Note: Shipping of this order is blocked by Shopgate!'));
|
47 |
+
endif;
|
48 |
|
49 |
+
if ($shopgateOrder->getIsCustomerInvoiceBlocked()):
|
50 |
+
echo $this->__('## Note: For this order you must not create an invoice!');
|
51 |
+
endif;
|
|
|
52 |
|
53 |
+
echo $this->__('Shopgate order number: %s', $shopgateOrder->getShopgateOrderNumber()); ?>
|
54 |
<p style="margin-top: 1em;">
|
55 |
<?php echo $this->printPaymentInfo($this->getPaymentInfos()); ?>
|
56 |
</p>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>shopgate_module</name>
|
4 |
-
<version>2.9.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://wiki.shopgate.com/Magento/de">Shopgate Plugin</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Shopgate Plugin</description>
|
11 |
<notes>Shopgate Modul</notes>
|
12 |
<authors><author><name>Stephan Recknagel</name><user>Shopgate</user><email>stephan.recknagel@shopgate.com</email></author><author><name>André Kraus</name><user>Shopgate</user><email>andre.kraus@shopgate.com</email></author><author><name>Alexander Wesselburg</name><user>Shopgate</user><email>alexander.wesselburg@shopgate.com</email></author><author><name>Rainer Skistims</name><user>Shopgate</user><email>rainer.skistims@shopgate.com</email></author><author><name>Konstantin Kiritsenko</name><user>Shopgate</user><email>konstantin.kiritsenko@shopgate.com</email></author></authors>
|
13 |
-
<date>2016-04-
|
14 |
-
<time>
|
15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Shopgate_Framework.xml" hash="029a3b0976d6f4de9146c8011124de93"/></dir></target><target name="magecommunity"><dir name="Shopgate"><dir name="Framework"><dir name="Block"><dir name="Adminhtml"><dir name="OAuth"><dir name="Config"><file name="Connector.php" hash="890d04b08bf692c12b02f29abf813f83"/></dir><dir name="Connect"><dir name="Add"><file name="Form.php" hash="45685099b41a46919a9900d22c30b711"/></dir><file name="Info.php" hash="ee7bbc837bf3f298791b8496f2d6d565"/><file name="Overlay.php" hash="a6496896dccb5898b36e3e65585650f4"/></dir><file name="Connect.php" hash="cc7e43ba447b6338f6c50ccaa5fd073a"/><file name="Data.php" hash="1903e819d5d16abba4c37d7823909260"/><file name="Disconnect.php" hash="2545e56bca73577ba5f73fce0501624a"/><dir name="Manage"><file name="Grid.php" hash="78357b78fed0e8b3535a7e505c8f6425"/></dir><file name="Manage.php" hash="a99e12333f7c27771ca42a0764108639"/></dir></dir><file name="Info.php" hash="3dd73900370546289a6033942a0c0528"/><dir name="Payment"><file name="MobilePayment.php" hash="01644c4114edd24cab5965e20252e3cf"/><file name="Shopgate.php" hash="67af406fa04da70461b3580b8adea89d"/></dir><dir name="Totals"><file name="AbstractPaymentFee.php" hash="5e36647f536d1c6daba33cd6e0a5e302"/><file name="CreditmemoPaymentFee.php" hash="4a287f54554d8d45772db386f54a45e7"/><file name="InvoicePaymentFee.php" hash="818164536fe249016af3046aef73f181"/><file name="OrderPaymentFee.php" hash="55c8f62c4da8014c99414ece9cd125c4"/></dir><file name="Version.php" hash="2f45712bb20635ac17d8bdee213819e5"/></dir><dir name="Helper"><dir name="Billsafe"><file name="Client.php" hash="175215077f24bcd2bed626aa59fc039c"/><file name="Order.php" hash="474c2aa15f352224c11c8ab17e921c9d"/></dir><file name="Config.php" hash="b0e489659332274686965e5e8d200d88"/><file name="Coupon.php" hash="502774efdc4bc7e609cab04cc6b7022e"/><file name="Customer.php" hash="c68047909c0c6e14977336ab6afe2f6b"/><file name="Data.php" hash="430fdcef33670d03d9c511e14345bf02"/><file name="Debug.php" hash="82c85038046fc9b2f994df18b7f202a6"/><file name="Export.php" hash="02c5dbce181e7489b5d75b20c1584aab"/><dir name="Import"><file name="Order.php" hash="e40ed484faf6f9757bee1970bafaed30"/></dir><file name="Install.php" hash="57f42693c9a6ddb18b8a25a2a5da7cf8"/><dir name="Payment"><file name="Abstract.php" hash="207f16aab8224761b7d91802b9fb10ee"/><file name="Payone.php" hash="ddced5955ff55105d8b3c91e0fcb0778"/><file name="Wspp.php" hash="4214f1d3332cd189cee3df48108ebd8d"/></dir><file name="Sales.php" hash="bc9439ce868f7597f64815befddb6950"/></dir><dir name="Model"><dir name="Carrier"><file name="Fix.php" hash="8dc7a12f501e2b5cc9dc6e6394a99b38"/></dir><dir name="Cataloginventory"><file name="Stock.php" hash="42ffccc3d644f8b04358a3e76bda32dd"/></dir><dir name="Compiler"><file name="Process.php" hash="740452b7bc234417788db1f1ee892ef5"/></dir><file name="Config.php" hash="ca7c79b51b4379946ba3d792b9bca76b"/><file name="Customer.php" hash="97ed53ca3f69c7a24fb40cce11f58721"/><dir name="DreamRobot"><file name="Observer.php" hash="7b4e8922a46f5974b8edf359c632a9d3"/></dir><dir name="Export"><file name="Abstract.php" hash="9e86667845e8cebd8e0ccb8879b70b6d"/><dir name="Category"><file name="Csv.php" hash="72f4f58345d95f8f621783bedf2a092e"/><file name="Xml.php" hash="12ab046b9a000636ed4ed5eefb770af2"/></dir><file name="Category.php" hash="5a41141ecec85669674ec818c4661cdc"/><dir name="Customer"><file name="Orders.php" hash="30123a6fe3e391fca911fed042b256c8"/></dir><file name="Customer.php" hash="2711476c9538a22242d1511649ec77f1"/><dir name="Product"><file name="Csv.php" hash="cc25a5c6a19233b33b1f1ec37837c404"/><file name="Xml.php" hash="06fc07d5c054290548e5bdab40c2bfc5"/></dir><file name="Product.php" hash="d9c807df57af3f1cced2d9bb433338ec"/><dir name="Review"><file name="Csv.php" hash="5c72f802a2de256ca1ec8dab1b75b291"/><file name="Xml.php" hash="bc16f60d9ed20705422921955a5071fe"/></dir><file name="Review.php" hash="ad6f548035a30da642d2459354acbb40"/><file name="Settings.php" hash="960f3d9991ecca41bd9e8b4ba632e9ea"/></dir><file name="Feed.php" hash="fb99cd7b2b3d94908848b722df666b67"/><dir name="Mobile"><file name="Redirect.php" hash="6492fb81d950812af8db28e959ffcd7e"/></dir><dir name="Mysql4"><dir name="Core"><file name="Core.php" hash="fc129d4d929f83e8389367b9c5d6d5e1"/></dir><dir name="Customer"><file name="Collection.php" hash="89d31997abc3c2145f74e02dd5456a7c"/></dir><file name="Customer.php" hash="d5f460b2d5bfa87b8368a8a6c6b51115"/><file name="Product.php" hash="6a99b3d0de44dfbd132ce9caca19034e"/><dir name="Shopgate"><dir name="Order"><file name="Collection.php" hash="e180ba816be47239828bea65cd5f8445"/></dir><file name="Order.php" hash="c297847e39ad01307dba4a69c13445f2"/></dir></dir><file name="Observer.php" hash="e5c9a67abe17a40938e95c5629fda1d5"/><dir name="Payment"><dir name="Abstract"><file name="AbstractPayol.php" hash="0228e80536a7decbbc0a883a4bde0d0d"/></dir><file name="Abstract.php" hash="6fdd4edd829d56525c09357fab95c540"/><file name="Amazon.php" hash="908d7f65ae7a0513ff796b49f8b8a556"/><file name="Authorize.php" hash="f51637fcb5058620b359e066fa1a6dd3"/><file name="Billsafe.php" hash="abc7caf1d47a33353b4b575b237fee70"/><dir name="Cc"><file name="Abstract.php" hash="2b291ac14d9e1e3120416d6aeb4c3487"/><file name="Authn.php" hash="3d0af24fa01b3d878bfed81a87930b15"/><file name="AuthnAbstract.php" hash="59c3e39376e695ac161d228fc9a3fabf"/><dir name="Authncim"><file name="Gateway.php" hash="1f8df3fe0e50f4729bebfc1d4763b015"/><file name="Method.php" hash="aa6916548a71848ad7c83e4f053bc27e"/></dir><file name="Authncim.php" hash="89f1c2a0bb59d08c895da84c14c325ff"/><file name="Chargeitpro.php" hash="6fd3a2fd42df00831d6e363a23a414f1"/><file name="Usaepay.php" hash="00bd8969c1eceb13eacbb37ed9a1f714"/></dir><file name="Cc.php" hash="3b8b092334fd1c72e824f560b9e33405"/><file name="Express.php" hash="6c8a2ea8ef4cebf40fe35b840f0d41d9"/><file name="Factory.php" hash="c31171980613fc74eff0ce727746f9ef"/><file name="Generic.php" hash="666f06186d1bb96b94af287d221e27c5"/><dir name="Ins"><file name="Payol.php" hash="b6961c4ab1fb9a95ab2d470aeaad8d29"/></dir><file name="Interface.php" hash="151002297bcce208b85bd260c7a25b47"/><dir name="Inv"><file name="Payol.php" hash="6d1c28b2ea2fb2fd63e09712f4533c77"/></dir><file name="MobilePayment.php" hash="59554c65e778831f6add450e0f846f42"/><dir name="Payone"><file name="Abstract.php" hash="fcc75447f2a2053d720289fb27b3c476"/><file name="BankAbstract.php" hash="0fdc5847e23c2aa4a9e4fee535d1df4c"/><file name="Cc.php" hash="fa47b35c9455bba74d2ef325835ab865"/><file name="Dbt.php" hash="7f098887ba6f12669a18f62d7885de6d"/><file name="Gp.php" hash="7686149aedae93b0d5eef0b06fc08d7e"/><file name="Idl.php" hash="57d144744565ff644db917cab7ef689e"/><file name="Inv.php" hash="91d893ee5eacdc00ff8fbb3f1b750894"/><file name="Klv.php" hash="f82fb0cc874ea8f1121f282372e4e404"/><file name="Pp.php" hash="1165aa67ef8ccdc93a2eb0b7bf03f3d0"/><file name="Prp.php" hash="367e84cc2089596dba96c5a7e9ae1723"/><file name="Sue.php" hash="31280f2c8abf21f0a582b656fb0d38ad"/></dir><dir name="Pp"><file name="Abstract.php" hash="9108e63c82d14a7cef72a58c5fd2df81"/><file name="Wspp.php" hash="a03e4e06431daac65d8ae5a79eb5335b"/></dir><file name="Pp.php" hash="c521bbb32aed313c0170dd6e8361f934"/><dir name="Ppal"><file name="Plus.php" hash="a26adaab47adb3f3b84ff872673b4ed1"/></dir><file name="Router.php" hash="8c5c3d698dbddeec2823d8e2ad284b72"/><file name="Shopgate.php" hash="f0d59e2a4369f7a22e47cf9c3bb9c44a"/><dir name="Simple"><file name="Billsafe.php" hash="d352d66d5101454f4cfec46e4fcaa88a"/><dir name="Cod"><file name="Abstract.php" hash="7bcb77e2906200f8a7576a24d782d541"/><file name="Msp.php" hash="0bb90c25c102ea55ead07312793c523b"/><file name="Native.php" hash="ac835fa8062afb1d3c77e67bc7b87b3c"/><file name="Phoenix107.php" hash="0172683522d4aad72e149a896aad757f"/><file name="Phoenix108.php" hash="b2fc93153eb4e11b0fcf567d66ef298d"/></dir><file name="Cod.php" hash="13329a686494412b304364f0707dd024"/><file name="Invoice.php" hash="a86d8500a0dee3056e56b0ccfb1fae3d"/><dir name="Mws"><file name="Abstract.php" hash="b4a90287eafca0d87087f6dede80dd2c"/><file name="Mws.php" hash="e919cd10f5be16e404a2aac43211005b"/><file name="Mws15.php" hash="db272b23821ea5010fe0e19023b9ca81"/></dir><file name="Mws.php" hash="e19cdfee86d84d80a234138a5f86c5af"/><dir name="Paypal"><file name="Express.php" hash="e2d33dbc600503d9a7541ab53df60662"/><file name="Standard.php" hash="5281ddc90f8f560b6cffa2e97fe08304"/><file name="Standard1400.php" hash="d80d26e8189b12c9796929dfad77f6c8"/></dir><file name="Paypal.php" hash="f9d9361711099812b46ac8335efef454"/><dir name="Prepay"><file name="Abstract.php" hash="89767868690e40bc3d96f8bee4484880"/><file name="Checkmo.php" hash="781dd32522f7bc97c62313cb76429633"/><file name="Native.php" hash="48542e3e9ad2bafb504a200a6529eccc"/><file name="Phoenix.php" hash="7118e404d6f1755cdab35dbc2c8f058d"/></dir><file name="Prepay.php" hash="75a238298ab408184e109411a8cc08b0"/><file name="Shopgate.php" hash="5fb1a053ac9b69e5d38bc9f6631ee8f1"/><dir name="Sue"><file name="Abstract.php" hash="d07d6b3a5702b458ed4e5f4574e3ced9"/><file name="Sue118.php" hash="759f4a7e103f9f9f4457aa1d0694c26d"/><file name="Sue300.php" hash="c804244222e5fe67ead8916c5c1ffef1"/></dir><file name="Sue.php" hash="6802dc052e2088957329689b003a16f8"/></dir><file name="Simple.php" hash="e4f0b3cd8282c2661cb19eabdb77d075"/><file name="Usaepay.php" hash="30f17f5a6bf8d0a68b2c14cd1d013885"/><file name="Wspp.php" hash="dbcd289795c112f2f0dbabeda19fbc69"/></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="0ee7969070ab0dddfdd3bb2cc404cd3c"/></dir><dir name="Customer"><file name="Collection.php" hash="2ddb7db1355100bc9e86f966f1d4612c"/></dir><file name="Customer.php" hash="69848842d4be07be4d66d700a7b6695b"/><file name="Product.php" hash="5c62ef4cfc3f0ebbbe5a9a46d1c25dfa"/><file name="Setup.php" hash="7b5cc0f99c857e9292638c1fbeb43969"/><dir name="Shopgate"><dir name="Connection"><file name="Collection.php" hash="f294d4239cee276b7e3c5e6e2109de66"/><dir name="Grid"><file name="Collection.php" hash="d499139d50dffbfe1b1e868b5aeeee0f"/></dir></dir><dir name="Order"><file name="Collection.php" hash="2c18a4ca248ca8719e7ead85f0c57619"/></dir><file name="Order.php" hash="1942eeb8268781c499f8cad384081b02"/></dir></dir><dir name="Sales"><dir name="Creditmemo"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="614d1e96cd2c97e0fcd7db86ee3aad89"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="c4400832de32367067fd5396bcf7bfc8"/></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="7a309b69fb20fb6fcae5f3b77f5b7ba9"/></dir></dir></dir></dir><dir name="Search"><dir name="Shopgate"><file name="Order.php" hash="94dcf366528641687b89ab0c9f973ef5"/></dir></dir><dir name="Shopgate"><dir name="Cart"><dir name="Validation"><dir name="Stock"><file name="Bundle.php" hash="13180790586d19b04aa1cfcf1f88f0c8"/><file name="Simple.php" hash="190017285cd454ec98129c4dc9651781"/></dir><file name="Stock.php" hash="03d8139aa9840d707c8e4cb991bca20f"/></dir></dir><file name="Connection.php" hash="ff0da764d444103f5892ef21e23ba353"/><file name="Order.php" hash="89e0e425fc48282c1b46d3078b294be1"/><file name="Plugin.php" hash="14d619891b5a9410b7e529d7b363bd27"/><dir name="Shipping"><dir name="Mapper"><file name="Carrier.php" hash="ef57904070fdf7921e51e88c3991c029"/><dir name="Method"><file name="Abstract.php" hash="bb402c49f3da66f7bd4baf5b215f989e"/><file name="Interface.php" hash="1bab00e6e0356184c3f213acfce601da"/><file name="Shopgate.php" hash="af8e1ade067d1b9fb0e5b493ad814576"/><file name="Usps.php" hash="fa7259d6751ce649e65159753c73fe60"/></dir></dir><file name="Mapper.php" hash="b93ac160c4c176c77887a23593ab058c"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="8dfc3964b750aebac8db5f584559d5c3"/><dir name="Description"><file name="List.php" hash="c83f37019461ab7adc86a57400f63761"/></dir><file name="Description.php" hash="d0dcebc9d75fdb0bb80f3c3faba6397c"/><file name="Enabledisable.php" hash="7f189c26cd1c2c7f1cd6dc56379798b5"/><dir name="Item"><file name="Sort.php" hash="2dc75f9c1e8baaddbf895945acd2ff19"/></dir><dir name="Product"><file name="Image.php" hash="e9d0e7c5769446290094d2b67e5c468b"/><file name="Names.php" hash="98de8ee7ae9b3c504eb087f5e09d3afd"/><file name="Types.php" hash="007b54c2e095691380c21a5ab62846fc"/></dir><dir name="Redirect"><file name="Types.php" hash="c5d3c44ab1f5ba74224b41836b14afff"/></dir><file name="Server.php" hash="b569e24076ca68c4063729fb708b666a"/><file name="Store.php" hash="cb2998beb43ba8afeeaa5b64a5b5e946"/><dir name="Validation"><file name="Config.php" hash="64efaea0bcd38872b44e8fa5eb6ffa0d"/></dir><dir name="Variation"><dir name="Export"><file name="Type.php" hash="bb19358c2c2fbee3cb9776f3540faa20"/></dir></dir><dir name="Weight"><file name="Units.php" hash="10af44d670bcfdb559f4196c7006e893"/></dir></dir></dir></dir></dir><dir name="Test"><dir name="Controller"><dir name="FrameworkController"><dir name="fixtures"><file name="testPluginNotActive.yaml" hash="9e25f93814834419e9c83995021860c2"/></dir></dir><file name="FrameworkController.php" hash="f2332ffd91ff17cb73382210ba3301d7"/></dir><dir name="Helper"><dir name="Data"><dir name="providers"><file name="testCalculateTaxRate.yaml" hash="2b1fb398f41a0d7706ab9701d77ce978"/></dir></dir><file name="Data.php" hash="e6892cda8a5c0a034657707ae6951317"/><dir name="Payment"><dir name="Wspp"><dir name="providers"><file name="testGetActionByStatus.yaml" hash="7c2d30f7e376da449185e19f3b2a642a"/><file name="testGetPaypalStatus.yaml" hash="8381a01d6d22190b4d1e5c14db984a5d"/></dir></dir><file name="Wspp.php" hash="8bda17bc29a6f006e51ec54063c7b42c"/></dir></dir><dir name="Model"><file name="ObserverTest.php" hash="bd6dea886fed4a44f5a3f581621a833a"/><dir name="Payment"><dir name="Abstract"><dir name="fixtures"><file name="testIsDisabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/><file name="testIsEnabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/></dir></dir><file name="Abstract.php" hash="7dc37f4b6c2a911a726a0395ae5e49eb"/><dir name="Cc"><dir name="Abstract"><dir name="providers"><file name="testGetCcTypeName.yaml" hash="eaf5dc89060f82581dea1a116c58e5dc"/></dir></dir><file name="Abstract.php" hash="ccf09de30cde5ee26757794e2a509896"/><file name="Authn.php" hash="77306ad6afc450df8a45a1d6a177ff32"/><file name="AuthnAbstract.php" hash="11784c806b9ca43772af538a13dea371"/></dir><file name="Cc.php" hash="8da9d7be59ca374d8d69e587d6c47464"/><dir name="Pp"><file name="AbstractTest.php" hash="1369367e5198c8178a475eccd193da35"/></dir><dir name="Router"><file name="Exception.php" hash="f7619c0f81e3aec39171687b3fd44185"/><dir name="providers"><file name="testGetModelCombinations.yaml" hash="e74482392a5c0a767903c73628dbfc21"/><file name="testMethodPart.yaml" hash="f9e17d95fba5fed400d4bbfce722212d"/></dir></dir><file name="Router.php" hash="42c755b3d736deb853548db48e2cbe3f"/><file name="RouterAbstract.php" hash="8f3207a8c6db231f72c81d891919cdbd"/><dir name="Simple"><file name="Billsafe.php" hash="82672c2300658c22c6fe0165245b5590"/><dir name="Cod"><file name="Msp.php" hash="d87f920cb0db4267f7246ea5542c2867"/><file name="Native.php" hash="9699b7aa21466cb2014f27d924ac7717"/><file name="Phoenix107.php" hash="c482e1e2a78fc9c5d277d22c3e4271c2"/><file name="Phoenix108.php" hash="f0f6847ea8279388cb12915f7aeb6597"/><dir name="fixtures"><file name="testGetCodMspMethod.yaml" hash="877ac87663c27392723481e813adac94"/><file name="testGetCodNativeMethod.yaml" hash="78dec590236fda34a7baa1681f1f799b"/><file name="testGetCodPhoenixMethod.yaml" hash="d47bddf587fad20d43acec341eb97c55"/><file name="testGetNoCodMethod.yaml" hash="f598847006617b5ed14f83d677739951"/></dir></dir><file name="Cod.php" hash="03391eaa3b2233c8d51a020e09dacde4"/><file name="Invoice.php" hash="08161a51fab47b14b652da12819337bf"/><dir name="Mws"><file name="Mws.php" hash="ec0f5f5b20656367416e505213439819"/><file name="Mws15.php" hash="06b3ada52a543d31bbf877032450368e"/></dir><file name="Mws.php" hash="9645cc9098c989424644de6b2f8bcfbd"/><dir name="Paypal"><file name="Express.php" hash="23da162636ff6ccca1e703b1967c14cf"/><dir name="fixtures"><file name="testGetPpExpressMethod.yaml" hash="304d7be2dcefedfe925695b85ead1ef7"/><file name="testGetPpStandardMethod.yaml" hash="79830109fcd1f32140f97cfd0caf4ab3"/></dir></dir><file name="Paypal.php" hash="cce4b99dcf9ee10621af4c6b24538a8e"/><dir name="Prepay"><file name="Checkmo.php" hash="b4bf41747b9e20c76d22f39fdafe6318"/><file name="Native.php" hash="dd31b6d04518750a1d03a7f9b85510f0"/><file name="Phoenix.php" hash="c8c7a408d8bf13917083826eed369f12"/><dir name="fixtures"><file name="testGetAllPrepayEnabled.yaml" hash="f4fd365d15f4a72a27056abc86254d32"/><file name="testGetPrepayNativeMethod.yaml" hash="10fc3dd5a6ea63187eb11c0f8dfcdce4"/><file name="testGetPrepayPhoenixMethod.yaml" hash="e8e4ab7d7e995aea4e701e2aac72c9c0"/></dir></dir><file name="Prepay.php" hash="410b8d87c6c3c2d726cc3a4dd59e85fb"/><file name="Shopgate.php" hash="744c9424ad4db0917e437140662c6298"/><dir name="Sue"><file name="Sue118.php" hash="25daa525b66855a9c617d68f58818e1f"/><file name="Sue300.php" hash="38e4539f1adb242b67920f43d93a15fc"/></dir><file name="Sue.php" hash="c6b29f00dbf3e4177b1bc7da20c0af5c"/></dir><file name="Simple.php" hash="8f3d015f1f8e32ddef4ae60c681d6280"/></dir><file name="Utility.php" hash="f7b78aefc882670c716cbcf5cac4dc99"/></dir></dir><file name="changelog.txt" hash="5aa4b51f11bf31288aa2e661c22ce135"/><dir name="controllers"><dir name="Adminhtml"><file name="ShopgateController.php" hash="b1bb6a24af72d5d151a6773be640c9e9"/></dir><file name="FrameworkController.php" hash="2152205bd372d999a56eb378ed810a8d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ed53de480c8a0642b7ae75c59f1ff8df"/><file name="config.xml" hash="cf40e376c1903805ec3759490525f993"/><file name="system.xml" hash="c7f55765dac95c436147785275f4b362"/></dir><file name="licence.txt" hash="dec6ca25c420b36a2e400caf1541c923"/><dir name="sql"><dir name="shopgate_setup"><file name="mysql4-install-0.1.0.php" hash="069abba038757da43b2ca6c5a0c82aba"/><file name="mysql4-install-2.1.45.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-install-2.2.0.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="cc637fc1bc511e745f02a56d0b36e3be"/><file name="mysql4-upgrade-1.0.5-1.0.7.php" hash="1e800d9d235b817bf5be698288bc0129"/><file name="mysql4-upgrade-2.1.44-2.1.45.php" hash="134d0b665746c61d364f6fd93d83f46c"/><file name="mysql4-upgrade-2.1.49-2.1.50.php" hash="e0fd395bb9c25c0e544c455186cfe7c9"/><file name="mysql4-upgrade-2.4.28-2.4.29.php" hash="9c8c868ce90e42b56182b23b78d6fbe7"/><file name="mysql4-upgrade-2.4.29-2.4.30.php" hash="ca3ee1e2f337bcea26264a17f603548e"/><file name="mysql4-upgrade-2.7.5-2.8.0.php" hash="34393a58a0b4ec90b4e618d3ff4cc565"/><file name="mysql4-upgrade-2.9.15-2.9.16.php" hash="980e7cc83f912ef4f630ef8d1cb964d1"/><file name="mysql4-upgrade-2.9.4-2.9.5.php" hash="dc6770e94c31d2f79915528c0993d546"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Shopgate_Framework.csv" hash="eb25c8acdee6d7a4d6b51c354774e0ce"/></dir><dir name="de_CH"><file name="Shopgate_Framework.csv" hash="eb25c8acdee6d7a4d6b51c354774e0ce"/></dir><dir name="de_AT"><file name="Shopgate_Framework.csv" hash="2fb25887b4b9c89b2a241759ddc1590b"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="shopgate"><file name="logo.png" hash="b7139047ecc90b15a5710ab0fe77fc81"/><file name="logo_big.png" hash="b98bfcf09766589506a1cca24ca47972"/><file name="logo_small.png" hash="7abf7f774c592eb582c2856e027af798"/><file name="oauth_connect.js" hash="8e5c77d9ad1354f826445f03c91008f4"/><file name="shopgate_admin.css" hash="0fbc07171267b9fb5dba7004a0858f66"/><file name="target.js" hash="80484a4dae515f708c97545d9959673a"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Shopgate"><dir name="assets"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="js_header.html" hash="7ff2c12f8b7c23542f3ff49b451720a8"/><file name="link_tag.html" hash="f7c53599b55d442fd49f970bd41eb2a4"/><file name="mobile_header.html" hash="17616650e160eaccd24e25729396c5a9"/></dir><file name="changelog.txt" hash="f9c3e9cfc0470a026fb9eaca705403b8"/><dir name="classes"><file name="apis.php" hash="8d89fdce7a3eeca342a5165bb9a2530b"/><file name="configuration.php" hash="264d43767346d16fd8c1fcfdcbec0ca2"/><file name="core.php" hash="754c598a012e63a23eccd600cc4618a6"/><file name="customers.php" hash="24c9dbbcafe379c224fcce4b02d58ad2"/><file name="external_orders.php" hash="7239071113b5decc70ec9672bf6fc3fe"/><dir name="helper"><file name="DataStructure.php" hash="ece9e9f855756777f543d090f5ecc710"/><file name="Pricing.php" hash="fd4c74999abc3bfa05fd74994a2ce78f"/><file name="String.php" hash="10c9396b2975bf0bde86f171932c3074"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="redirect"><file name="KeywordsManager.php" hash="3e8233fa248cb795642b4306b3ebdd13"/><file name="KeywordsManagerInterface.php" hash="32cda83161084b4f5904eeb5f50a6547"/><file name="LinkBuilder.php" hash="52d193384a8ffed61fd83c5e1befd63c"/><file name="LinkBuilderInterface.php" hash="a755af7b57fda9b9ff1564a0059529d1"/><file name="MobileRedirect.php" hash="1f58517a45d5d8814514001b1e690312"/><file name="MobileRedirectInterface.php" hash="80b8da18c8bf498461c2b8e183bce326"/><file name="Redirector.php" hash="1a06dc19980c8a51ae0cdbed4d04322d"/><file name="RedirectorInterface.php" hash="9a11e4e85b6005029458a035e4295935"/><file name="SettingsManager.php" hash="d1b1722715688da2a095fba8c607f45c"/><file name="SettingsManagerInterface.php" hash="ae16aa5ea4df7f0def80711f8cc14f70"/><file name="TagsGenerator.php" hash="de6e73da61a282d24226065671d67d6b"/><file name="TagsGeneratorInterface.php" hash="1a5c500631331a4ae970d2a442e5d7e2"/><file name="TemplateParser.php" hash="1e087c9ba5720c9065702d9ebfc5723a"/><file name="TemplateParserInterface.php" hash="d6897cd9e5622d1991bb7aab678e37f8"/></dir></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="items.php" hash="107f9bc5fcc0c0dbfe568a3b8235107c"/><dir name="models"><file name="Abstract.php" hash="a32633283eb403a55a166bbad70b3e2f"/><file name="AbstractExport.php" hash="f265f9e906208e1799994d117582be20"/><file name="XmlEmptyObject.php" hash="d6cfdae3bdd858d4f10fcebdb542f533"/><file name="XmlResultObject.php" hash="340804eb0f2ba6bcb6b05311b8bb1f11"/><dir name="catalog"><file name="Attribute.php" hash="28d8f3bc6c416661d1eaa77726ba7009"/><file name="AttributeGroup.php" hash="0270086ec8006ee8231c6b0baa8d6034"/><file name="Category.php" hash="beba58d2796cf7b4ca08ce68de65415b"/><file name="CategoryPath.php" hash="475869aef74c567c8569ee9953210faa"/><file name="Identifier.php" hash="d9a3b16d1fcdec641ca2b0fd77fbd625"/><file name="Input.php" hash="77df45fd89aec19565a5fae7178205bb"/><file name="Manufacturer.php" hash="e45f534f5f6acad118be24ffc63a0460"/><file name="Option.php" hash="fd95fe72bff985ae0b2861da115e2468"/><file name="Price.php" hash="3cb25372ae58bd0c71b342f9ef2dca73"/><file name="Product.php" hash="7e7c49e10b379eae5d0141efe2c91305"/><file name="Property.php" hash="5967f0403a606a27ea4fec71a8402327"/><file name="Relation.php" hash="263cde539af500af911baec4e354079e"/><file name="Review.php" hash="72c94cb1f2a54bafffdb5672d87ecd4d"/><file name="Shipping.php" hash="1fe425496bd9720dc18bd076e56aca9e"/><file name="Stock.php" hash="4e645877e778ec8d02ae98262bfa9663"/><file name="Tag.php" hash="39e7b845ab157d2f707707576e868d64"/><file name="TierPrice.php" hash="9dd757c9c3d193944a5727fbe5cf4704"/><file name="Validation.php" hash="0be71640c1df60ab809347194ec66457"/><file name="Visibility.php" hash="d60c6b8ec486da4afdc46a00d65ad172"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="media"><file name="Attachment.php" hash="c074ef3426c2506350cbf5ff0133c89d"/><file name="Image.php" hash="c9319f2a82811239313e328eaf7e2094"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><dir name="redirect"><file name="DeeplinkSuffix.php" hash="e6aebbb49db1b3b1d0bbb3a5f8e52927"/><file name="DeeplinkSuffixValue.php" hash="809684ff8f7d588d39060f5469e2c3b0"/><file name="DeeplinkSuffixValueDisabled.php" hash="83ff30aeeaf40c070f71b29b7f2bbbd8"/><file name="DeeplinkSuffixValueUnset.php" hash="1275996c7d012acfa3fbd6cbe43b08b3"/><file name="HtmlTag.php" hash="e5494a280dd090e3869445431e6c8c2a"/><file name="HtmlTagAttribute.php" hash="368c63b7c3043f7ae0bee107527152de"/><file name="HtmlTagVariable.php" hash="1484f93ec0e69b3f94313e4cac849e0f"/></dir></dir><file name="orders.php" hash="db9fb6643aafe97c93447e4fcc950b6b"/><file name="redirect.php" hash="75ba604b4a9885e861a96683e566ac5c"/></dir><dir name="config"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="de19abc78063ea9a4112964c79946f1c"/><file name="shopgate.php" hash="248033be19931f7eccdc40d12e59d1bf"/><file name="shopgate_license.txt" hash="21fbb2f00b832416916b27c5e3f5d6d1"/><dir name="temp"><dir name="cache"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/><dir name="logs"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir></dir><dir name="tests"><dir name="classes"><dir name="helper"><dir name="redirect"><file name="KeywordsManagerTest.php" hash="185c285d78e7c4e25ede957918018fe6"/><file name="TemplateParserTest.php" hash="aa7aea33f78f0fda58437c83421d2f31"/></dir></dir></dir></dir><dir name="vendors"><file name="2d_is.php" hash="087decaca87ee85d548d8caaa43f1212"/><file name="BSD_license.txt" hash="2df4dd93533ca2c19f6f2d601bc3e0d5"/><file name="JSON.php" hash="cbb23366cd8c20319292458a87dc2870"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name=".htaccess" hash="34479bc8d9df775c38a980ecaf6f3f4b"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="608ba89093ef89e1c182cd6085dbf3b1"/></dir><dir name="template"><dir name="shopgate"><file name="mobile_website.phtml" hash="229cbefd12ea77676f8af9c7159528ea"/><dir name="payment"><file name="mobile_payment.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/><file name="shopgate.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="8bab300fb25a48cd2c8119ae1942ed54"/></dir><dir name="template"><dir name="shopgate"><dir name="oauth"><dir name="config"><file name="connector.phtml" hash="478c309bdde7834bf20a48b65a4699fb"/></dir><dir name="connect"><file name="info.phtml" hash="4f75dc4311616081873a7d416b96c1c2"/><file name="overlay.phtml" hash="2a17d5b6ff8023568437b194f8a9d482"/></dir><file name="connect.phtml" hash="6956aa22eedf549c4565304b4e4a4ab9"/><file name="data.phtml" hash="09b4c5d83863f104db7a018510cdb315"/><file name="disconnect.phtml" hash="2858cebe9004c9fb5764f79faee46f87"/><file name="manage.phtml" hash="1f99255efbce4dbdc1ee781820d455b8"/></dir><dir name="payment"><file name="mobile_payment.phtml" hash="2892e0dd200db6c0ffa5fa83f87d838c"/><file name="shopgate.phtml" hash="5457030290f8aa08c2711a8bd27c3dee"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>shopgate_module</name>
|
4 |
+
<version>2.9.37</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://wiki.shopgate.com/Magento/de">Shopgate Plugin</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Shopgate Plugin</description>
|
11 |
<notes>Shopgate Modul</notes>
|
12 |
<authors><author><name>Stephan Recknagel</name><user>Shopgate</user><email>stephan.recknagel@shopgate.com</email></author><author><name>André Kraus</name><user>Shopgate</user><email>andre.kraus@shopgate.com</email></author><author><name>Alexander Wesselburg</name><user>Shopgate</user><email>alexander.wesselburg@shopgate.com</email></author><author><name>Rainer Skistims</name><user>Shopgate</user><email>rainer.skistims@shopgate.com</email></author><author><name>Konstantin Kiritsenko</name><user>Shopgate</user><email>konstantin.kiritsenko@shopgate.com</email></author></authors>
|
13 |
+
<date>2016-04-21</date>
|
14 |
+
<time>08:54:15</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Shopgate_Framework.xml" hash="029a3b0976d6f4de9146c8011124de93"/></dir></target><target name="magecommunity"><dir name="Shopgate"><dir name="Framework"><dir name="Block"><dir name="Adminhtml"><dir name="OAuth"><dir name="Config"><file name="Connector.php" hash="890d04b08bf692c12b02f29abf813f83"/></dir><dir name="Connect"><dir name="Add"><file name="Form.php" hash="45685099b41a46919a9900d22c30b711"/></dir><file name="Info.php" hash="ee7bbc837bf3f298791b8496f2d6d565"/><file name="Overlay.php" hash="a6496896dccb5898b36e3e65585650f4"/></dir><file name="Connect.php" hash="cc7e43ba447b6338f6c50ccaa5fd073a"/><file name="Data.php" hash="1903e819d5d16abba4c37d7823909260"/><file name="Disconnect.php" hash="2545e56bca73577ba5f73fce0501624a"/><dir name="Manage"><file name="Grid.php" hash="78357b78fed0e8b3535a7e505c8f6425"/></dir><file name="Manage.php" hash="a99e12333f7c27771ca42a0764108639"/></dir></dir><file name="Info.php" hash="3dd73900370546289a6033942a0c0528"/><dir name="Payment"><file name="MobilePayment.php" hash="59d29cc2dcf39652feafd8886e6a044e"/><file name="Shopgate.php" hash="67af406fa04da70461b3580b8adea89d"/></dir><dir name="Totals"><file name="AbstractPaymentFee.php" hash="5e36647f536d1c6daba33cd6e0a5e302"/><file name="CreditmemoPaymentFee.php" hash="4a287f54554d8d45772db386f54a45e7"/><file name="InvoicePaymentFee.php" hash="818164536fe249016af3046aef73f181"/><file name="OrderPaymentFee.php" hash="55c8f62c4da8014c99414ece9cd125c4"/></dir><file name="Version.php" hash="2f45712bb20635ac17d8bdee213819e5"/></dir><dir name="Helper"><dir name="Billsafe"><file name="Client.php" hash="ae85878961343c33ca32cb9964c8fae5"/><file name="Order.php" hash="474c2aa15f352224c11c8ab17e921c9d"/></dir><file name="Config.php" hash="3c4c745cae49363b7a118bf30e49efa9"/><file name="Coupon.php" hash="26dde886215b4e10276c9ae742ad6171"/><file name="Customer.php" hash="c68047909c0c6e14977336ab6afe2f6b"/><file name="Data.php" hash="f2f44b7052036735f7cdca9b8bfead2d"/><file name="Debug.php" hash="82c85038046fc9b2f994df18b7f202a6"/><file name="Export.php" hash="02c5dbce181e7489b5d75b20c1584aab"/><dir name="Import"><file name="Order.php" hash="e40ed484faf6f9757bee1970bafaed30"/></dir><file name="Install.php" hash="57f42693c9a6ddb18b8a25a2a5da7cf8"/><dir name="Payment"><file name="Abstract.php" hash="207f16aab8224761b7d91802b9fb10ee"/><file name="Payone.php" hash="ddced5955ff55105d8b3c91e0fcb0778"/><file name="Wspp.php" hash="4214f1d3332cd189cee3df48108ebd8d"/></dir><file name="Sales.php" hash="b9dc3427b8cdaa38c6a4b7ceb213b78b"/></dir><dir name="Model"><dir name="Carrier"><file name="Fix.php" hash="a232e49ed4dabb87fcc27d4a10705d22"/></dir><dir name="Cataloginventory"><file name="Stock.php" hash="42ffccc3d644f8b04358a3e76bda32dd"/></dir><dir name="Compiler"><file name="Process.php" hash="740452b7bc234417788db1f1ee892ef5"/></dir><file name="Config.php" hash="b8706fa9570bbe073c7438e78cb015b4"/><file name="Customer.php" hash="97ed53ca3f69c7a24fb40cce11f58721"/><dir name="DreamRobot"><file name="Observer.php" hash="7b4e8922a46f5974b8edf359c632a9d3"/></dir><dir name="Export"><file name="Abstract.php" hash="9e86667845e8cebd8e0ccb8879b70b6d"/><dir name="Category"><file name="Csv.php" hash="72f4f58345d95f8f621783bedf2a092e"/><file name="Xml.php" hash="12ab046b9a000636ed4ed5eefb770af2"/></dir><file name="Category.php" hash="5a41141ecec85669674ec818c4661cdc"/><dir name="Customer"><file name="Orders.php" hash="b033a463f19b5436e28897adebd634df"/></dir><file name="Customer.php" hash="2711476c9538a22242d1511649ec77f1"/><dir name="Product"><file name="Csv.php" hash="cc25a5c6a19233b33b1f1ec37837c404"/><file name="Xml.php" hash="48a15a1e2ca1730e64ec901d160ecdbb"/></dir><file name="Product.php" hash="d9c807df57af3f1cced2d9bb433338ec"/><dir name="Review"><file name="Csv.php" hash="5c72f802a2de256ca1ec8dab1b75b291"/><file name="Xml.php" hash="bc16f60d9ed20705422921955a5071fe"/></dir><file name="Review.php" hash="ad6f548035a30da642d2459354acbb40"/><file name="Settings.php" hash="960f3d9991ecca41bd9e8b4ba632e9ea"/></dir><file name="Factory.php" hash="ffc69a308b1d93247d8346c653b0d2ad"/><file name="Feed.php" hash="fb99cd7b2b3d94908848b722df666b67"/><dir name="Interfaces"><dir name="Modules"><file name="Router.php" hash="ca1de41cd4fce45d6af452879fc7ba1b"/><file name="Validator.php" hash="274be1cefc2e179ed33c703f76047cff"/></dir></dir><dir name="Mobile"><file name="Redirect.php" hash="6492fb81d950812af8db28e959ffcd7e"/></dir><dir name="Modules"><dir name="Affiliate"><file name="Factory.php" hash="a3de64c9c70b581a7a2b9975aaff7985"/><dir name="Packages"><dir name="Magestore"><file name="Redeem.php" hash="1084a868ec3bc0099cd860dfb2c5438f"/><file name="Utility.php" hash="825877604ccb52c1c8af34c7b5152a32"/><file name="Validator.php" hash="d79db83b85371c592ca8556c60fced7a"/></dir></dir><file name="Router.php" hash="e5968a99fb26d75e3bfafdb09930ae9d"/><file name="Utility.php" hash="62e51bfe3f4d789c04c4357f1174e089"/></dir><file name="Factory.php" hash="274d360ce8088cb0b140b2d0da09827a"/><file name="Validator.php" hash="8ac94d08fda28ee72ab18caa4523905e"/></dir><dir name="Mysql4"><dir name="Core"><file name="Core.php" hash="fc129d4d929f83e8389367b9c5d6d5e1"/></dir><dir name="Customer"><file name="Collection.php" hash="89d31997abc3c2145f74e02dd5456a7c"/></dir><file name="Customer.php" hash="d5f460b2d5bfa87b8368a8a6c6b51115"/><file name="Product.php" hash="6a99b3d0de44dfbd132ce9caca19034e"/><dir name="Shopgate"><dir name="Order"><file name="Collection.php" hash="e180ba816be47239828bea65cd5f8445"/></dir><file name="Order.php" hash="c297847e39ad01307dba4a69c13445f2"/></dir></dir><file name="Observer.php" hash="e5c9a67abe17a40938e95c5629fda1d5"/><dir name="Payment"><dir name="Abstract"><file name="AbstractPayol.php" hash="9ef2b4ce9b4e740da52308adbb50ceb5"/></dir><file name="Abstract.php" hash="29dd56fbc07930496b24c87dda721138"/><file name="Amazon.php" hash="908d7f65ae7a0513ff796b49f8b8a556"/><file name="Authorize.php" hash="f51637fcb5058620b359e066fa1a6dd3"/><file name="Billsafe.php" hash="abc7caf1d47a33353b4b575b237fee70"/><dir name="Cc"><file name="Abstract.php" hash="2b291ac14d9e1e3120416d6aeb4c3487"/><file name="Authn.php" hash="3d0af24fa01b3d878bfed81a87930b15"/><file name="AuthnAbstract.php" hash="bfb024a9e5ef4e4b671f98ebcb87c649"/><dir name="Authncim"><file name="Gateway.php" hash="1f8df3fe0e50f4729bebfc1d4763b015"/><file name="Method.php" hash="aa6916548a71848ad7c83e4f053bc27e"/></dir><file name="Authncim.php" hash="89f1c2a0bb59d08c895da84c14c325ff"/><file name="Chargeitpro.php" hash="6fd3a2fd42df00831d6e363a23a414f1"/><file name="Usaepay.php" hash="00bd8969c1eceb13eacbb37ed9a1f714"/></dir><file name="Cc.php" hash="3b8b092334fd1c72e824f560b9e33405"/><file name="Express.php" hash="6c8a2ea8ef4cebf40fe35b840f0d41d9"/><file name="Factory.php" hash="c31171980613fc74eff0ce727746f9ef"/><file name="Generic.php" hash="666f06186d1bb96b94af287d221e27c5"/><dir name="Ins"><file name="Payol.php" hash="b6961c4ab1fb9a95ab2d470aeaad8d29"/></dir><file name="Interface.php" hash="c59467883ede0cbd63be3f2535aaed65"/><dir name="Inv"><file name="Payol.php" hash="6d1c28b2ea2fb2fd63e09712f4533c77"/></dir><file name="MobilePayment.php" hash="59554c65e778831f6add450e0f846f42"/><dir name="Payone"><file name="Abstract.php" hash="fcc75447f2a2053d720289fb27b3c476"/><file name="BankAbstract.php" hash="0fdc5847e23c2aa4a9e4fee535d1df4c"/><file name="Cc.php" hash="fa47b35c9455bba74d2ef325835ab865"/><file name="Dbt.php" hash="7f098887ba6f12669a18f62d7885de6d"/><file name="Gp.php" hash="7686149aedae93b0d5eef0b06fc08d7e"/><file name="Idl.php" hash="57d144744565ff644db917cab7ef689e"/><file name="Inv.php" hash="91d893ee5eacdc00ff8fbb3f1b750894"/><file name="Klv.php" hash="f82fb0cc874ea8f1121f282372e4e404"/><file name="Pp.php" hash="1165aa67ef8ccdc93a2eb0b7bf03f3d0"/><file name="Prp.php" hash="367e84cc2089596dba96c5a7e9ae1723"/><file name="Sue.php" hash="31280f2c8abf21f0a582b656fb0d38ad"/></dir><dir name="Pp"><file name="Abstract.php" hash="9108e63c82d14a7cef72a58c5fd2df81"/><file name="Wspp.php" hash="a03e4e06431daac65d8ae5a79eb5335b"/></dir><file name="Pp.php" hash="c521bbb32aed313c0170dd6e8361f934"/><dir name="Ppal"><file name="Plus.php" hash="a26adaab47adb3f3b84ff872673b4ed1"/></dir><file name="Router.php" hash="8c5c3d698dbddeec2823d8e2ad284b72"/><file name="Shopgate.php" hash="f0d59e2a4369f7a22e47cf9c3bb9c44a"/><dir name="Simple"><file name="Billsafe.php" hash="d352d66d5101454f4cfec46e4fcaa88a"/><dir name="Cod"><file name="Abstract.php" hash="7bcb77e2906200f8a7576a24d782d541"/><file name="Msp.php" hash="0bb90c25c102ea55ead07312793c523b"/><file name="Native.php" hash="ac835fa8062afb1d3c77e67bc7b87b3c"/><file name="Phoenix107.php" hash="0172683522d4aad72e149a896aad757f"/><file name="Phoenix108.php" hash="b2fc93153eb4e11b0fcf567d66ef298d"/></dir><file name="Cod.php" hash="13329a686494412b304364f0707dd024"/><file name="Invoice.php" hash="a86d8500a0dee3056e56b0ccfb1fae3d"/><dir name="Mws"><file name="Abstract.php" hash="b4a90287eafca0d87087f6dede80dd2c"/><file name="Mws.php" hash="e919cd10f5be16e404a2aac43211005b"/><file name="Mws15.php" hash="db272b23821ea5010fe0e19023b9ca81"/></dir><file name="Mws.php" hash="e19cdfee86d84d80a234138a5f86c5af"/><dir name="Paypal"><file name="Express.php" hash="e2d33dbc600503d9a7541ab53df60662"/><file name="Standard.php" hash="5281ddc90f8f560b6cffa2e97fe08304"/><file name="Standard1400.php" hash="d80d26e8189b12c9796929dfad77f6c8"/></dir><file name="Paypal.php" hash="f9d9361711099812b46ac8335efef454"/><dir name="Prepay"><file name="Abstract.php" hash="89767868690e40bc3d96f8bee4484880"/><file name="Checkmo.php" hash="781dd32522f7bc97c62313cb76429633"/><file name="Native.php" hash="48542e3e9ad2bafb504a200a6529eccc"/><file name="Phoenix.php" hash="7118e404d6f1755cdab35dbc2c8f058d"/></dir><file name="Prepay.php" hash="75a238298ab408184e109411a8cc08b0"/><file name="Shopgate.php" hash="5fb1a053ac9b69e5d38bc9f6631ee8f1"/><dir name="Sue"><file name="Abstract.php" hash="d07d6b3a5702b458ed4e5f4574e3ced9"/><file name="Sue118.php" hash="759f4a7e103f9f9f4457aa1d0694c26d"/><file name="Sue300.php" hash="c804244222e5fe67ead8916c5c1ffef1"/></dir><file name="Sue.php" hash="6802dc052e2088957329689b003a16f8"/></dir><file name="Simple.php" hash="e4f0b3cd8282c2661cb19eabdb77d075"/><file name="Usaepay.php" hash="30f17f5a6bf8d0a68b2c14cd1d013885"/><file name="Wspp.php" hash="dbcd289795c112f2f0dbabeda19fbc69"/></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="0ee7969070ab0dddfdd3bb2cc404cd3c"/></dir><dir name="Customer"><file name="Collection.php" hash="2ddb7db1355100bc9e86f966f1d4612c"/></dir><file name="Customer.php" hash="69848842d4be07be4d66d700a7b6695b"/><file name="Product.php" hash="5c62ef4cfc3f0ebbbe5a9a46d1c25dfa"/><file name="Setup.php" hash="7b5cc0f99c857e9292638c1fbeb43969"/><dir name="Shopgate"><dir name="Connection"><file name="Collection.php" hash="f294d4239cee276b7e3c5e6e2109de66"/><dir name="Grid"><file name="Collection.php" hash="d499139d50dffbfe1b1e868b5aeeee0f"/></dir></dir><dir name="Order"><file name="Collection.php" hash="2c18a4ca248ca8719e7ead85f0c57619"/></dir><file name="Order.php" hash="1942eeb8268781c499f8cad384081b02"/></dir></dir><dir name="Sales"><dir name="Creditmemo"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="614d1e96cd2c97e0fcd7db86ee3aad89"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="c4400832de32367067fd5396bcf7bfc8"/></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="ShopgatePaymentFee.php" hash="7a309b69fb20fb6fcae5f3b77f5b7ba9"/></dir></dir></dir></dir><dir name="Search"><dir name="Shopgate"><file name="Order.php" hash="94dcf366528641687b89ab0c9f973ef5"/></dir></dir><dir name="Shopgate"><dir name="Cart"><dir name="Validation"><dir name="Stock"><file name="Bundle.php" hash="13180790586d19b04aa1cfcf1f88f0c8"/><file name="Simple.php" hash="b5af5f6906c75fa1148b4cbd355e595c"/></dir><file name="Stock.php" hash="03d8139aa9840d707c8e4cb991bca20f"/></dir></dir><file name="Connection.php" hash="ff0da764d444103f5892ef21e23ba353"/><file name="Order.php" hash="0fb57412d6aa625ce2c4d2a73c0a28b2"/><file name="Plugin.php" hash="5b93bcd19db34f3d7b2d8bfe3ae410fe"/><dir name="Shipping"><dir name="Mapper"><file name="Carrier.php" hash="ef57904070fdf7921e51e88c3991c029"/><dir name="Method"><file name="Abstract.php" hash="bb402c49f3da66f7bd4baf5b215f989e"/><file name="Interface.php" hash="1bab00e6e0356184c3f213acfce601da"/><file name="Shopgate.php" hash="af8e1ade067d1b9fb0e5b493ad814576"/><file name="Usps.php" hash="fa7259d6751ce649e65159753c73fe60"/></dir></dir><file name="Mapper.php" hash="3ecd0aa8d8d16b6109c53ac8e636a672"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="8dfc3964b750aebac8db5f584559d5c3"/><dir name="Description"><file name="List.php" hash="c83f37019461ab7adc86a57400f63761"/></dir><file name="Description.php" hash="d0dcebc9d75fdb0bb80f3c3faba6397c"/><file name="Enabledisable.php" hash="7f189c26cd1c2c7f1cd6dc56379798b5"/><dir name="Item"><file name="Sort.php" hash="2dc75f9c1e8baaddbf895945acd2ff19"/></dir><dir name="Product"><file name="Image.php" hash="e9d0e7c5769446290094d2b67e5c468b"/><file name="Names.php" hash="98de8ee7ae9b3c504eb087f5e09d3afd"/><file name="Types.php" hash="007b54c2e095691380c21a5ab62846fc"/></dir><dir name="Redirect"><file name="Types.php" hash="c5d3c44ab1f5ba74224b41836b14afff"/></dir><file name="Server.php" hash="b569e24076ca68c4063729fb708b666a"/><file name="Store.php" hash="cb2998beb43ba8afeeaa5b64a5b5e946"/><dir name="Validation"><file name="Config.php" hash="64efaea0bcd38872b44e8fa5eb6ffa0d"/></dir><dir name="Variation"><dir name="Export"><file name="Type.php" hash="bb19358c2c2fbee3cb9776f3540faa20"/></dir></dir><dir name="Weight"><file name="Units.php" hash="10af44d670bcfdb559f4196c7006e893"/></dir></dir></dir></dir></dir><dir name="Test"><dir name="Controller"><dir name="FrameworkController"><dir name="fixtures"><file name="testPluginNotActive.yaml" hash="9e25f93814834419e9c83995021860c2"/></dir></dir><file name="FrameworkController.php" hash="f2332ffd91ff17cb73382210ba3301d7"/></dir><dir name="Helper"><dir name="Billsafe"><file name="ClientTest.php" hash="2e3427398bf45801753b32be01b07b26"/></dir><dir name="Data"><dir name="providers"><file name="testCalculateTaxRate.yaml" hash="2b1fb398f41a0d7706ab9701d77ce978"/></dir></dir><file name="Data.php" hash="e6892cda8a5c0a034657707ae6951317"/><dir name="Payment"><dir name="Wspp"><dir name="providers"><file name="testGetActionByStatus.yaml" hash="7c2d30f7e376da449185e19f3b2a642a"/><file name="testGetPaypalStatus.yaml" hash="8381a01d6d22190b4d1e5c14db984a5d"/></dir></dir><file name="Wspp.php" hash="8bda17bc29a6f006e51ec54063c7b42c"/></dir></dir><dir name="Model"><dir name="Modules"><dir name="Affiliate"><file name="RouterTest.php" hash="e84df3fe416472465a98742030f93662"/></dir></dir><file name="ObserverTest.php" hash="bd6dea886fed4a44f5a3f581621a833a"/><dir name="Payment"><dir name="Abstract"><dir name="fixtures"><file name="testIsDisabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/><file name="testIsEnabled.yaml" hash="53ed5e65872f20c2328430e0e395e70f"/></dir></dir><file name="Abstract.php" hash="7dc37f4b6c2a911a726a0395ae5e49eb"/><dir name="Cc"><dir name="Abstract"><dir name="providers"><file name="testGetCcTypeName.yaml" hash="eaf5dc89060f82581dea1a116c58e5dc"/></dir></dir><file name="Abstract.php" hash="ccf09de30cde5ee26757794e2a509896"/><file name="Authn.php" hash="77306ad6afc450df8a45a1d6a177ff32"/><file name="AuthnAbstract.php" hash="11784c806b9ca43772af538a13dea371"/></dir><file name="Cc.php" hash="8da9d7be59ca374d8d69e587d6c47464"/><dir name="Pp"><file name="AbstractTest.php" hash="1369367e5198c8178a475eccd193da35"/></dir><dir name="Router"><file name="Exception.php" hash="f7619c0f81e3aec39171687b3fd44185"/><dir name="providers"><file name="testGetModelCombinations.yaml" hash="e74482392a5c0a767903c73628dbfc21"/><file name="testMethodPart.yaml" hash="f9e17d95fba5fed400d4bbfce722212d"/></dir></dir><file name="Router.php" hash="42c755b3d736deb853548db48e2cbe3f"/><file name="RouterAbstract.php" hash="8f3207a8c6db231f72c81d891919cdbd"/><dir name="Simple"><file name="Billsafe.php" hash="82672c2300658c22c6fe0165245b5590"/><dir name="Cod"><file name="Msp.php" hash="d87f920cb0db4267f7246ea5542c2867"/><file name="Native.php" hash="9699b7aa21466cb2014f27d924ac7717"/><file name="Phoenix107.php" hash="c482e1e2a78fc9c5d277d22c3e4271c2"/><file name="Phoenix108.php" hash="f0f6847ea8279388cb12915f7aeb6597"/><dir name="fixtures"><file name="testGetCodMspMethod.yaml" hash="877ac87663c27392723481e813adac94"/><file name="testGetCodNativeMethod.yaml" hash="78dec590236fda34a7baa1681f1f799b"/><file name="testGetCodPhoenixMethod.yaml" hash="d47bddf587fad20d43acec341eb97c55"/><file name="testGetNoCodMethod.yaml" hash="f598847006617b5ed14f83d677739951"/></dir></dir><file name="Cod.php" hash="03391eaa3b2233c8d51a020e09dacde4"/><file name="Invoice.php" hash="08161a51fab47b14b652da12819337bf"/><dir name="Mws"><file name="Mws.php" hash="ec0f5f5b20656367416e505213439819"/><file name="Mws15.php" hash="06b3ada52a543d31bbf877032450368e"/></dir><file name="Mws.php" hash="9645cc9098c989424644de6b2f8bcfbd"/><dir name="Paypal"><file name="Express.php" hash="23da162636ff6ccca1e703b1967c14cf"/><dir name="fixtures"><file name="testGetPpExpressMethod.yaml" hash="304d7be2dcefedfe925695b85ead1ef7"/><file name="testGetPpStandardMethod.yaml" hash="79830109fcd1f32140f97cfd0caf4ab3"/></dir></dir><file name="Paypal.php" hash="cce4b99dcf9ee10621af4c6b24538a8e"/><dir name="Prepay"><file name="Checkmo.php" hash="b4bf41747b9e20c76d22f39fdafe6318"/><file name="Native.php" hash="dd31b6d04518750a1d03a7f9b85510f0"/><file name="Phoenix.php" hash="c8c7a408d8bf13917083826eed369f12"/><dir name="fixtures"><file name="testGetAllPrepayEnabled.yaml" hash="f4fd365d15f4a72a27056abc86254d32"/><file name="testGetPrepayNativeMethod.yaml" hash="10fc3dd5a6ea63187eb11c0f8dfcdce4"/><file name="testGetPrepayPhoenixMethod.yaml" hash="e8e4ab7d7e995aea4e701e2aac72c9c0"/></dir></dir><file name="Prepay.php" hash="410b8d87c6c3c2d726cc3a4dd59e85fb"/><file name="Shopgate.php" hash="744c9424ad4db0917e437140662c6298"/><dir name="Sue"><file name="Sue118.php" hash="25daa525b66855a9c617d68f58818e1f"/><file name="Sue300.php" hash="38e4539f1adb242b67920f43d93a15fc"/></dir><file name="Sue.php" hash="c6b29f00dbf3e4177b1bc7da20c0af5c"/></dir><file name="Simple.php" hash="8f3d015f1f8e32ddef4ae60c681d6280"/></dir><file name="Utility.php" hash="f7b78aefc882670c716cbcf5cac4dc99"/></dir></dir><file name="changelog.txt" hash="e4d89ec8a19d5fd9ea1c4fb7d6bebdb6"/><dir name="controllers"><dir name="Adminhtml"><file name="ShopgateController.php" hash="b1bb6a24af72d5d151a6773be640c9e9"/></dir><file name="FrameworkController.php" hash="2152205bd372d999a56eb378ed810a8d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ed53de480c8a0642b7ae75c59f1ff8df"/><file name="config.xml" hash="ff29298b094af48078f9c1c3eb564e34"/><file name="system.xml" hash="c7f55765dac95c436147785275f4b362"/></dir><file name="licence.txt" hash="dec6ca25c420b36a2e400caf1541c923"/><dir name="sql"><dir name="shopgate_setup"><file name="mysql4-install-0.1.0.php" hash="069abba038757da43b2ca6c5a0c82aba"/><file name="mysql4-install-2.1.45.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-install-2.2.0.php" hash="eddddf157e55a87edc77361dde564463"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="cc637fc1bc511e745f02a56d0b36e3be"/><file name="mysql4-upgrade-1.0.5-1.0.7.php" hash="1e800d9d235b817bf5be698288bc0129"/><file name="mysql4-upgrade-2.1.44-2.1.45.php" hash="134d0b665746c61d364f6fd93d83f46c"/><file name="mysql4-upgrade-2.1.49-2.1.50.php" hash="e0fd395bb9c25c0e544c455186cfe7c9"/><file name="mysql4-upgrade-2.4.28-2.4.29.php" hash="9c8c868ce90e42b56182b23b78d6fbe7"/><file name="mysql4-upgrade-2.4.29-2.4.30.php" hash="ca3ee1e2f337bcea26264a17f603548e"/><file name="mysql4-upgrade-2.7.5-2.8.0.php" hash="34393a58a0b4ec90b4e618d3ff4cc565"/><file name="mysql4-upgrade-2.9.15-2.9.16.php" hash="980e7cc83f912ef4f630ef8d1cb964d1"/><file name="mysql4-upgrade-2.9.36-2.9.37.php" hash="07dafdabd4764c9685f1317ebbbe842f"/><file name="mysql4-upgrade-2.9.4-2.9.5.php" hash="dc6770e94c31d2f79915528c0993d546"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Shopgate_Framework.csv" hash="eb25c8acdee6d7a4d6b51c354774e0ce"/></dir><dir name="de_CH"><file name="Shopgate_Framework.csv" hash="eb25c8acdee6d7a4d6b51c354774e0ce"/></dir><dir name="de_AT"><file name="Shopgate_Framework.csv" hash="2fb25887b4b9c89b2a241759ddc1590b"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="shopgate"><file name="logo.png" hash="b7139047ecc90b15a5710ab0fe77fc81"/><file name="logo_big.png" hash="b98bfcf09766589506a1cca24ca47972"/><file name="logo_small.png" hash="7abf7f774c592eb582c2856e027af798"/><file name="oauth_connect.js" hash="8e5c77d9ad1354f826445f03c91008f4"/><file name="shopgate_admin.css" hash="0fbc07171267b9fb5dba7004a0858f66"/><file name="target.js" hash="80484a4dae515f708c97545d9959673a"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Shopgate"><dir name="assets"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="js_header.html" hash="7ff2c12f8b7c23542f3ff49b451720a8"/><file name="link_tag.html" hash="f7c53599b55d442fd49f970bd41eb2a4"/><file name="mobile_header.html" hash="17616650e160eaccd24e25729396c5a9"/></dir><file name="changelog.txt" hash="f9c3e9cfc0470a026fb9eaca705403b8"/><dir name="classes"><file name="apis.php" hash="8d89fdce7a3eeca342a5165bb9a2530b"/><file name="configuration.php" hash="264d43767346d16fd8c1fcfdcbec0ca2"/><file name="core.php" hash="754c598a012e63a23eccd600cc4618a6"/><file name="customers.php" hash="24c9dbbcafe379c224fcce4b02d58ad2"/><file name="external_orders.php" hash="7239071113b5decc70ec9672bf6fc3fe"/><dir name="helper"><file name="DataStructure.php" hash="ece9e9f855756777f543d090f5ecc710"/><file name="Pricing.php" hash="fd4c74999abc3bfa05fd74994a2ce78f"/><file name="String.php" hash="10c9396b2975bf0bde86f171932c3074"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="redirect"><file name="KeywordsManager.php" hash="3e8233fa248cb795642b4306b3ebdd13"/><file name="KeywordsManagerInterface.php" hash="32cda83161084b4f5904eeb5f50a6547"/><file name="LinkBuilder.php" hash="52d193384a8ffed61fd83c5e1befd63c"/><file name="LinkBuilderInterface.php" hash="a755af7b57fda9b9ff1564a0059529d1"/><file name="MobileRedirect.php" hash="1f58517a45d5d8814514001b1e690312"/><file name="MobileRedirectInterface.php" hash="80b8da18c8bf498461c2b8e183bce326"/><file name="Redirector.php" hash="1a06dc19980c8a51ae0cdbed4d04322d"/><file name="RedirectorInterface.php" hash="9a11e4e85b6005029458a035e4295935"/><file name="SettingsManager.php" hash="d1b1722715688da2a095fba8c607f45c"/><file name="SettingsManagerInterface.php" hash="ae16aa5ea4df7f0def80711f8cc14f70"/><file name="TagsGenerator.php" hash="de6e73da61a282d24226065671d67d6b"/><file name="TagsGeneratorInterface.php" hash="1a5c500631331a4ae970d2a442e5d7e2"/><file name="TemplateParser.php" hash="1e087c9ba5720c9065702d9ebfc5723a"/><file name="TemplateParserInterface.php" hash="d6897cd9e5622d1991bb7aab678e37f8"/></dir></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><file name="items.php" hash="107f9bc5fcc0c0dbfe568a3b8235107c"/><dir name="models"><file name="Abstract.php" hash="a32633283eb403a55a166bbad70b3e2f"/><file name="AbstractExport.php" hash="f265f9e906208e1799994d117582be20"/><file name="XmlEmptyObject.php" hash="d6cfdae3bdd858d4f10fcebdb542f533"/><file name="XmlResultObject.php" hash="340804eb0f2ba6bcb6b05311b8bb1f11"/><dir name="catalog"><file name="Attribute.php" hash="28d8f3bc6c416661d1eaa77726ba7009"/><file name="AttributeGroup.php" hash="0270086ec8006ee8231c6b0baa8d6034"/><file name="Category.php" hash="beba58d2796cf7b4ca08ce68de65415b"/><file name="CategoryPath.php" hash="475869aef74c567c8569ee9953210faa"/><file name="Identifier.php" hash="d9a3b16d1fcdec641ca2b0fd77fbd625"/><file name="Input.php" hash="77df45fd89aec19565a5fae7178205bb"/><file name="Manufacturer.php" hash="e45f534f5f6acad118be24ffc63a0460"/><file name="Option.php" hash="fd95fe72bff985ae0b2861da115e2468"/><file name="Price.php" hash="3cb25372ae58bd0c71b342f9ef2dca73"/><file name="Product.php" hash="7e7c49e10b379eae5d0141efe2c91305"/><file name="Property.php" hash="5967f0403a606a27ea4fec71a8402327"/><file name="Relation.php" hash="263cde539af500af911baec4e354079e"/><file name="Review.php" hash="72c94cb1f2a54bafffdb5672d87ecd4d"/><file name="Shipping.php" hash="1fe425496bd9720dc18bd076e56aca9e"/><file name="Stock.php" hash="4e645877e778ec8d02ae98262bfa9663"/><file name="Tag.php" hash="39e7b845ab157d2f707707576e868d64"/><file name="TierPrice.php" hash="9dd757c9c3d193944a5727fbe5cf4704"/><file name="Validation.php" hash="0be71640c1df60ab809347194ec66457"/><file name="Visibility.php" hash="d60c6b8ec486da4afdc46a00d65ad172"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/><dir name="media"><file name="Attachment.php" hash="c074ef3426c2506350cbf5ff0133c89d"/><file name="Image.php" hash="c9319f2a82811239313e328eaf7e2094"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><dir name="redirect"><file name="DeeplinkSuffix.php" hash="e6aebbb49db1b3b1d0bbb3a5f8e52927"/><file name="DeeplinkSuffixValue.php" hash="809684ff8f7d588d39060f5469e2c3b0"/><file name="DeeplinkSuffixValueDisabled.php" hash="83ff30aeeaf40c070f71b29b7f2bbbd8"/><file name="DeeplinkSuffixValueUnset.php" hash="1275996c7d012acfa3fbd6cbe43b08b3"/><file name="HtmlTag.php" hash="e5494a280dd090e3869445431e6c8c2a"/><file name="HtmlTagAttribute.php" hash="368c63b7c3043f7ae0bee107527152de"/><file name="HtmlTagVariable.php" hash="1484f93ec0e69b3f94313e4cac849e0f"/></dir></dir><file name="orders.php" hash="db9fb6643aafe97c93447e4fcc950b6b"/><file name="redirect.php" hash="75ba604b4a9885e861a96683e566ac5c"/></dir><dir name="config"><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name="index.php" hash="de19abc78063ea9a4112964c79946f1c"/><file name="shopgate.php" hash="248033be19931f7eccdc40d12e59d1bf"/><file name="shopgate_license.txt" hash="21fbb2f00b832416916b27c5e3f5d6d1"/><dir name="temp"><dir name="cache"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/><dir name="logs"><file name="index.php" hash="7573387748996e2dd9e02a237056f158"/></dir></dir><dir name="tests"><dir name="classes"><dir name="helper"><dir name="redirect"><file name="KeywordsManagerTest.php" hash="185c285d78e7c4e25ede957918018fe6"/><file name="TemplateParserTest.php" hash="aa7aea33f78f0fda58437c83421d2f31"/></dir></dir></dir></dir><dir name="vendors"><file name="2d_is.php" hash="087decaca87ee85d548d8caaa43f1212"/><file name="BSD_license.txt" hash="2df4dd93533ca2c19f6f2d601bc3e0d5"/><file name="JSON.php" hash="cbb23366cd8c20319292458a87dc2870"/><file name="index.php" hash="bfc5021f1ee9b67f78a0fc9fdab6c558"/></dir><file name=".htaccess" hash="34479bc8d9df775c38a980ecaf6f3f4b"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="608ba89093ef89e1c182cd6085dbf3b1"/></dir><dir name="template"><dir name="shopgate"><file name="mobile_website.phtml" hash="229cbefd12ea77676f8af9c7159528ea"/><dir name="payment"><file name="mobile_payment.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/><file name="shopgate.phtml" hash="1e18979028fb13e99af7c595c75a5d27"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shopgate.xml" hash="8bab300fb25a48cd2c8119ae1942ed54"/></dir><dir name="template"><dir name="shopgate"><dir name="oauth"><dir name="config"><file name="connector.phtml" hash="478c309bdde7834bf20a48b65a4699fb"/></dir><dir name="connect"><file name="info.phtml" hash="4f75dc4311616081873a7d416b96c1c2"/><file name="overlay.phtml" hash="2a17d5b6ff8023568437b194f8a9d482"/></dir><file name="connect.phtml" hash="6956aa22eedf549c4565304b4e4a4ab9"/><file name="data.phtml" hash="09b4c5d83863f104db7a018510cdb315"/><file name="disconnect.phtml" hash="2858cebe9004c9fb5764f79faee46f87"/><file name="manage.phtml" hash="1f99255efbce4dbdc1ee781820d455b8"/></dir><dir name="payment"><file name="mobile_payment.phtml" hash="c7ee8f42029c4baf7375e0f4afa611c3"/><file name="shopgate.phtml" hash="5457030290f8aa08c2711a8bd27c3dee"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|