Version Notes
For installation and configuration instructions, as well as a full list of new features and known issues, please review the Implementation Guide.
Download this release
Release Info
Developer | Chris Geiss |
Extension | Bronto_Extension |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- app/code/community/Bronto/Common/Block/Adminhtml/System/Config/About.php +1 -1
- app/code/community/Bronto/Common/Model/Email/Message/Filter.php +94 -1
- app/code/community/Bronto/Common/Model/Email/Message/Templatefilter.php +5 -0
- app/code/community/Bronto/Common/etc/config.xml +1 -1
- app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Cron.php +6 -0
- app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes.php +18 -8
- app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes/Address.php +5 -1
- app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes/Customer.php +1 -1
- app/code/community/Bronto/Customer/Block/Adminhtml/Widget/Button/Sync.php +31 -0
- app/code/community/Bronto/Customer/Helper/Data.php +28 -0
- app/code/community/Bronto/Customer/Model/Mysql4/Queue/Collection.php +18 -0
- app/code/community/Bronto/Customer/Model/Observer.php +71 -41
- app/code/community/Bronto/Customer/Model/Queue.php +38 -0
- app/code/community/Bronto/Customer/Model/Resource/Customer.php +28 -0
- app/code/community/Bronto/Customer/Model/System/Config/Backend/Brontofield.php +13 -15
- app/code/community/Bronto/Customer/controllers/Adminhtml/CustomerController.php +33 -1
- app/code/community/Bronto/Customer/etc/config.xml +8 -3
- app/code/community/Bronto/Customer/sql/bronto_customer_setup/mysql4-upgrade-1.0.2-1.0.3.php +20 -0
- app/code/community/Bronto/Email/Block/Adminhtml/System/Email/Template/Grid.php +1 -1
- app/code/community/Bronto/Email/Model/Template/Import.php +41 -26
- app/code/community/Bronto/Newsletter/Model/Observer.php +23 -14
- app/code/community/Bronto/Order/Block/Adminhtml/System/Config/Cron.php +8 -0
- app/code/community/Bronto/Order/Block/Adminhtml/Widget/Button/Sync.php +31 -0
- app/code/community/Bronto/Order/Block/Bta.php +9 -10
- app/code/community/Bronto/Order/Helper/Data.php +109 -0
- app/code/community/Bronto/Order/Model/Mysql4/Queue/Collection.php +24 -0
- app/code/community/Bronto/Order/Model/Observer.php +56 -21
- app/code/community/Bronto/Order/Model/Order/Observer.php +11 -1
- app/code/community/Bronto/Order/Model/Queue.php +63 -15
- app/code/community/Bronto/Order/Model/Quote/Observer.php +2 -1
- app/code/community/Bronto/Order/controllers/Adminhtml/OrderController.php +33 -0
- app/code/community/Bronto/Order/etc/config.xml +8 -9
- app/code/community/Bronto/Order/sql/bronto_order_setup/mysql4-upgrade-1.1.7-1.1.8.php +20 -0
- app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit.php +12 -4
- app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit/Tab/Customers.php +3 -4
- app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit/Tab/General.php +18 -18
- app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Grid.php +1 -0
- app/code/community/Bronto/Reminder/Block/Adminhtml/System/Config/Settings.php +23 -0
- app/code/community/Bronto/Reminder/Block/Adminhtml/Widget/Grid/Column/Renderer/Email.php +1 -1
- app/code/community/Bronto/Reminder/Block/Adminhtml/Widget/Grid/Column/Renderer/Id.php +3 -0
- app/code/community/Bronto/Reminder/Helper/Data.php +48 -1
- app/code/community/Bronto/Reminder/Model/Condition/Abstract.php +2 -2
- app/code/community/Bronto/Reminder/Model/Condition/Combine/Abstract.php +9 -10
- app/code/community/Bronto/Reminder/Model/Guest.php +0 -15
- app/code/community/Bronto/Reminder/Model/Mysql4/Customer/Collection.php +24 -6
- app/code/community/Bronto/Reminder/Model/Mysql4/Guest.php +0 -14
- app/code/community/Bronto/Reminder/Model/Mysql4/Guest/Collection.php +0 -15
- app/code/community/Bronto/Reminder/Model/Mysql4/Rule.php +40 -13
- app/code/community/Bronto/Reminder/Model/Observer.php +32 -39
- app/code/community/Bronto/Reminder/Model/Rule.php +81 -152
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart.php +24 -28
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Amount.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Attributes.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Couponcode.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Itemsquantity.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Sku.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Storeview.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Subselection.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Totalquantity.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Virtual.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Combine/Root.php +151 -20
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist.php +19 -15
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Quantity.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Sharing.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Storeview.php +3 -3
- app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Subselection.php +3 -3
- app/code/community/Bronto/Reminder/controllers/Adminhtml/RemindersController.php +18 -1
- app/code/community/Bronto/Reminder/controllers/LoadController.php +31 -11
- app/code/community/Bronto/Reminder/etc/config.xml +16 -6
- app/code/community/Bronto/Reminder/etc/system.xml +18 -7
- app/code/community/Bronto/Reminder/sql/bronto_reminder_setup/mysql4-upgrade-1.4.11-1.4.12.php +34 -0
- app/code/community/Bronto/Roundtrip/Helper/Data.php +1 -1
- app/design/frontend/base/default/layout/bronto/order.xml +9 -0
- lib/Bronto/Api.php +10 -0
- lib/Bronto/Api/ContentTag.php +45 -0
- lib/Bronto/Api/ContentTag/Exception.php +14 -0
- lib/Bronto/Api/ContentTag/Row.php +59 -0
- package.xml +4 -4
app/code/community/Bronto/Common/Block/Adminhtml/System/Config/About.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @copyright 2011-2013 Bronto Software, Inc.
|
6 |
* @license http://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
|
7 |
*
|
8 |
-
* @version 2.0.
|
9 |
*/
|
10 |
class Bronto_Common_Block_Adminhtml_System_Config_About extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
11 |
{
|
5 |
* @copyright 2011-2013 Bronto Software, Inc.
|
6 |
* @license http://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
|
7 |
*
|
8 |
+
* @version 2.0.4
|
9 |
*/
|
10 |
class Bronto_Common_Block_Adminhtml_System_Config_About extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
11 |
{
|
app/code/community/Bronto/Common/Model/Email/Message/Filter.php
CHANGED
@@ -210,6 +210,11 @@ class Bronto_Common_Model_Email_Message_Filter
|
|
210 |
$this->_filterQuote($value);
|
211 |
}
|
212 |
|
|
|
|
|
|
|
|
|
|
|
213 |
// Product
|
214 |
if ($value instanceOf Mage_Catalog_Model_Product) {
|
215 |
$this->_filterProduct($value);
|
@@ -416,7 +421,7 @@ class Bronto_Common_Model_Email_Message_Filter
|
|
416 |
$index++;
|
417 |
}
|
418 |
}
|
419 |
-
|
420 |
$queryParams = $this->getQueryParams();
|
421 |
$queryParams['id'] = urlencode(base64_encode(Mage::helper('core')->encrypt($quote->getId())));
|
422 |
if ($store = $this->getStore()) {
|
@@ -471,6 +476,75 @@ class Bronto_Common_Model_Email_Message_Filter
|
|
471 |
return $this;
|
472 |
}
|
473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
/**
|
475 |
* @param Mage_Sales_Model_Order $order
|
476 |
* @return String containing HTML for order items
|
@@ -665,6 +739,25 @@ class Bronto_Common_Model_Email_Message_Filter
|
|
665 |
return $product->getUrlModel()->getUrl($product);
|
666 |
}
|
667 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
/**
|
669 |
* @param string $key
|
670 |
* @param string|array $value
|
210 |
$this->_filterQuote($value);
|
211 |
}
|
212 |
|
213 |
+
// Wishlist
|
214 |
+
if ($value instanceOf Mage_Wishlist_Model_Wishlist) {
|
215 |
+
$this->_filterWishlist($value);
|
216 |
+
}
|
217 |
+
|
218 |
// Product
|
219 |
if ($value instanceOf Mage_Catalog_Model_Product) {
|
220 |
$this->_filterProduct($value);
|
421 |
$index++;
|
422 |
}
|
423 |
}
|
424 |
+
|
425 |
$queryParams = $this->getQueryParams();
|
426 |
$queryParams['id'] = urlencode(base64_encode(Mage::helper('core')->encrypt($quote->getId())));
|
427 |
if ($store = $this->getStore()) {
|
476 |
return $this;
|
477 |
}
|
478 |
|
479 |
+
/**
|
480 |
+
* @param Mage_Wishlist_Model_Wishlist $wishlist
|
481 |
+
* @return Bronto_Common_Model_Email_Message_Filter
|
482 |
+
*/
|
483 |
+
protected function _filterWishlist(Mage_Wishlist_Model_Wishlist $wishlist)
|
484 |
+
{
|
485 |
+
if (!in_array('wishlist', $this->_filteredObjects)) {
|
486 |
+
$index = 1;
|
487 |
+
foreach ($wishlist->getItemCollection() as $item /* @var $item Mage_Wishlist_Model_Item */) {
|
488 |
+
if (!$item->getParentItem()) {
|
489 |
+
$this->_filterWishlistItem($item, $index);
|
490 |
+
$index++;
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
$queryParams = $this->getQueryParams();
|
495 |
+
$queryParams['wishlist_id'] = urlencode(base64_encode(Mage::helper('core')->encrypt($wishlist->getId())));
|
496 |
+
if ($store = $this->getStore()) {
|
497 |
+
$this->setField('wishlistURL', $store->getUrl('reminder/load/index', $queryParams));
|
498 |
+
} else {
|
499 |
+
$this->setField('wishlistURL', Mage::getUrl('reminder/load/index', $queryParams));
|
500 |
+
}
|
501 |
+
|
502 |
+
// Setup wishlist items as a template
|
503 |
+
if (class_exists('Bronto_Reminder_Block_Wishlist_Items', false)) {
|
504 |
+
$layout = Mage::getSingleton('core/layout');
|
505 |
+
|
506 |
+
/* @var $items Mage_Sales_Block_Items_Abstract */
|
507 |
+
$items = $layout->createBlock('bronto/bronto_reminder_wishlist_items', 'items');
|
508 |
+
$items->setTemplate('bronto/reminder/items.phtml');
|
509 |
+
$items->setWishlist($item->getWishlist());
|
510 |
+
|
511 |
+
// When emailing from the admin, we need to ensure that we're using templates from the frontend
|
512 |
+
Mage::getDesign()->setArea('frontend');
|
513 |
+
$this->setField("wishlistItems", $items->toHtml());
|
514 |
+
}
|
515 |
+
|
516 |
+
$this->_filteredObjects[] = 'wishlist';
|
517 |
+
}
|
518 |
+
return $this;
|
519 |
+
}
|
520 |
+
|
521 |
+
/**
|
522 |
+
* @param Mage_Wishlist_Model_Item $item
|
523 |
+
* @return Bronto_Common_Model_Email_Message_Filter
|
524 |
+
*/
|
525 |
+
protected function _filterWishlistItem(Mage_Wishlist_Model_Item $item, $index = null)
|
526 |
+
{
|
527 |
+
if ($item->getParentItem()) {
|
528 |
+
return $this;
|
529 |
+
}
|
530 |
+
|
531 |
+
$this->setField("productName_{$index}", $item->getName());
|
532 |
+
$this->setField("productPrice_{$index}", number_format($item->getPrice(), 2));
|
533 |
+
$this->setField("productQty_{$index}", $item->getQty());
|
534 |
+
$this->setField("productUrl_{$index}", $this->_getWishlistItemUrl($item));
|
535 |
+
|
536 |
+
/* @var $product Mage_Catalog_Model_Product */
|
537 |
+
$product = $item->getProduct();
|
538 |
+
if (!$product) {
|
539 |
+
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
540 |
+
}
|
541 |
+
$this->setField("productSku_{$index}", $product->getSku());
|
542 |
+
|
543 |
+
$this->_filterProduct($product, $index);
|
544 |
+
|
545 |
+
return $this;
|
546 |
+
}
|
547 |
+
|
548 |
/**
|
549 |
* @param Mage_Sales_Model_Order $order
|
550 |
* @return String containing HTML for order items
|
739 |
return $product->getUrlModel()->getUrl($product);
|
740 |
}
|
741 |
|
742 |
+
/**
|
743 |
+
* @param Mage_Wishlist_Model_Item $item
|
744 |
+
* @return string
|
745 |
+
*/
|
746 |
+
protected function _getWishlistItemUrl(Mage_Wishlist_Model_Item $item)
|
747 |
+
{
|
748 |
+
if ($item->getRedirectUrl()) {
|
749 |
+
return $item->getRedirectUrl();
|
750 |
+
}
|
751 |
+
|
752 |
+
$product = $item->getProduct();
|
753 |
+
$option = $item->getOptionByCode('product_type');
|
754 |
+
if ($option) {
|
755 |
+
$product = $option->getProduct();
|
756 |
+
}
|
757 |
+
|
758 |
+
return $product->getUrlModel()->getUrl($product);
|
759 |
+
}
|
760 |
+
|
761 |
/**
|
762 |
* @param string $key
|
763 |
* @param string|array $value
|
app/code/community/Bronto/Common/Model/Email/Message/Templatefilter.php
CHANGED
@@ -97,6 +97,11 @@ class Bronto_Common_Model_Email_Message_Templatefilter extends Mage_Core_Model_E
|
|
97 |
switch (trim($params['url'],'/')) {
|
98 |
case 'checkout/cart':
|
99 |
return $this->_addBrontoStyle('cartURL');
|
|
|
|
|
|
|
|
|
|
|
100 |
case 'customer/account':
|
101 |
return $this->_addBrontoStyle('customerURL');
|
102 |
case 'adminhtml/index/resetpassword':
|
97 |
switch (trim($params['url'],'/')) {
|
98 |
case 'checkout/cart':
|
99 |
return $this->_addBrontoStyle('cartURL');
|
100 |
+
case 'wishlist/wishlist':
|
101 |
+
case 'wishlist/index':
|
102 |
+
case 'wishlist/index/index':
|
103 |
+
case 'wishlist':
|
104 |
+
return $this->_addBrontoStyle('wishlistURL');
|
105 |
case 'customer/account':
|
106 |
return $this->_addBrontoStyle('customerURL');
|
107 |
case 'adminhtml/index/resetpassword':
|
app/code/community/Bronto/Common/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Common>
|
5 |
-
<version>2.0.
|
6 |
</Bronto_Common>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Common>
|
5 |
+
<version>2.0.4</version>
|
6 |
</Bronto_Common>
|
7 |
</modules>
|
8 |
<global>
|
app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Cron.php
CHANGED
@@ -15,6 +15,10 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Cron extends Bronto_Common_B
|
|
15 |
*/
|
16 |
protected function _prepareLayout()
|
17 |
{
|
|
|
|
|
|
|
|
|
18 |
$this->addButton($this->getLayout()->createBlock('bronto_customer/adminhtml_widget_button_reset'));
|
19 |
$this->addButton($this->getLayout()->createBlock('bronto_customer/adminhtml_widget_button_run'));
|
20 |
|
@@ -27,6 +31,7 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Cron extends Bronto_Common_B
|
|
27 |
protected function getProgressBarTotal()
|
28 |
{
|
29 |
return $this->getCustomerResourceCollection()
|
|
|
30 |
->getSize()
|
31 |
;
|
32 |
}
|
@@ -38,6 +43,7 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Cron extends Bronto_Common_B
|
|
38 |
{
|
39 |
return $this->getCustomerResourceCollection()
|
40 |
->addBrontoNotImportedFilter()
|
|
|
41 |
->getSize();
|
42 |
}
|
43 |
|
15 |
*/
|
16 |
protected function _prepareLayout()
|
17 |
{
|
18 |
+
$missingCustomers = $this->helper('bronto_customer')->getMissingCustomers(true);
|
19 |
+
if ($missingCustomers > 0) {
|
20 |
+
$this->addButton($this->getLayout()->createBlock('bronto_customer/adminhtml_widget_button_sync'));
|
21 |
+
}
|
22 |
$this->addButton($this->getLayout()->createBlock('bronto_customer/adminhtml_widget_button_reset'));
|
23 |
$this->addButton($this->getLayout()->createBlock('bronto_customer/adminhtml_widget_button_run'));
|
24 |
|
31 |
protected function getProgressBarTotal()
|
32 |
{
|
33 |
return $this->getCustomerResourceCollection()
|
34 |
+
->addBrontoNotSuppressedFilter()
|
35 |
->getSize()
|
36 |
;
|
37 |
}
|
43 |
{
|
44 |
return $this->getCustomerResourceCollection()
|
45 |
->addBrontoNotImportedFilter()
|
46 |
+
->addBrontoNotSuppressedFilter()
|
47 |
->getSize();
|
48 |
}
|
49 |
|
app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes.php
CHANGED
@@ -32,8 +32,16 @@ abstract class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attri
|
|
32 |
if (in_array($_attributeCode, $skips)) {
|
33 |
continue;
|
34 |
} else {
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
}
|
39 |
|
@@ -104,14 +112,14 @@ abstract class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attri
|
|
104 |
* @param int $order
|
105 |
* @return string
|
106 |
*/
|
107 |
-
protected function _getFieldHtml(Varien_Data_Form_Element_Abstract $fieldset, Mage_Eav_Model_Entity_Attribute $attribute,
|
108 |
{
|
109 |
// Create Select Field
|
110 |
-
$e
|
111 |
$field = $this->_createField($fieldset, $e, $attribute);
|
112 |
|
113 |
// Create New Field
|
114 |
-
$en
|
115 |
$newField = $this->_createField($fieldset, $en, $attribute, 'newfield');
|
116 |
|
117 |
// Define Field Dependencies
|
@@ -140,7 +148,9 @@ abstract class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attri
|
|
140 |
{
|
141 |
// Get Config Data
|
142 |
$configData = $this->getConfigData();
|
143 |
-
|
|
|
|
|
144 |
// Define Attribute Code
|
145 |
$attributeCode = $attribute->getAttributeCode();
|
146 |
$attributeCode = ($fieldStep == 'newfield') ? "dynamic_new_{$attributeCode}" : $attributeCode;
|
@@ -176,8 +186,8 @@ abstract class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attri
|
|
176 |
$model->setPath($path)->setValue($data)->afterLoad();
|
177 |
$data = $model->getValue();
|
178 |
}
|
179 |
-
|
180 |
-
// Select Field for Existing attributes
|
181 |
$field = $fieldset->addField($attributeCode, $fieldType,
|
182 |
array(
|
183 |
'name' => $name,
|
32 |
if (in_array($_attributeCode, $skips)) {
|
33 |
continue;
|
34 |
} else {
|
35 |
+
|
36 |
+
try {
|
37 |
+
$order = $order+5;
|
38 |
+
$html.= $this->_getFieldHtml($element, $_attribute, $order);
|
39 |
+
} catch(Exception $e) {
|
40 |
+
Mage::helper('bronto_customer')->writeError('Creating field failed: ' . $e->getMessage());
|
41 |
+
|
42 |
+
continue;
|
43 |
+
}
|
44 |
+
|
45 |
}
|
46 |
}
|
47 |
|
112 |
* @param int $order
|
113 |
* @return string
|
114 |
*/
|
115 |
+
protected function _getFieldHtml(Varien_Data_Form_Element_Abstract $fieldset, Mage_Eav_Model_Entity_Attribute $attribute, $order)
|
116 |
{
|
117 |
// Create Select Field
|
118 |
+
$e = $this->_getDummyElement($order);
|
119 |
$field = $this->_createField($fieldset, $e, $attribute);
|
120 |
|
121 |
// Create New Field
|
122 |
+
$en = $this->_getDummyNewElement($order+1);
|
123 |
$newField = $this->_createField($fieldset, $en, $attribute, 'newfield');
|
124 |
|
125 |
// Define Field Dependencies
|
148 |
{
|
149 |
// Get Config Data
|
150 |
$configData = $this->getConfigData();
|
151 |
+
if ('' == $attribute->getFrontendLabel()) {
|
152 |
+
Mage::throwException("Field has no label: " . $attribute->getAttributeCode() . (string)$e->backend_model);
|
153 |
+
}
|
154 |
// Define Attribute Code
|
155 |
$attributeCode = $attribute->getAttributeCode();
|
156 |
$attributeCode = ($fieldStep == 'newfield') ? "dynamic_new_{$attributeCode}" : $attributeCode;
|
186 |
$model->setPath($path)->setValue($data)->afterLoad();
|
187 |
$data = $model->getValue();
|
188 |
}
|
189 |
+
|
190 |
+
// Select Field for Existing attributes.
|
191 |
$field = $fieldset->addField($attributeCode, $fieldType,
|
192 |
array(
|
193 |
'name' => $name,
|
app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes/Address.php
CHANGED
@@ -23,6 +23,10 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attributes_Add
|
|
23 |
'region_id',
|
24 |
'suffix',
|
25 |
'vat_id',
|
|
|
|
|
|
|
|
|
26 |
);
|
27 |
|
28 |
protected $_configPath = Bronto_Customer_Helper_Data::XML_PREFIX_ADDRESS_ATTR;
|
@@ -42,7 +46,7 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attributes_Add
|
|
42 |
private function _getAddressAttributes()
|
43 |
{
|
44 |
if ($this->_addressAttributes === null) {
|
45 |
-
$this->_addressAttributes = Mage::getModel('customer/entity_address_attribute_collection')
|
46 |
}
|
47 |
|
48 |
return $this->_addressAttributes;
|
23 |
'region_id',
|
24 |
'suffix',
|
25 |
'vat_id',
|
26 |
+
'vat_is_valid',
|
27 |
+
'vat_request_id',
|
28 |
+
'vat_request_date',
|
29 |
+
'vat_request_success',
|
30 |
);
|
31 |
|
32 |
protected $_configPath = Bronto_Customer_Helper_Data::XML_PREFIX_ADDRESS_ATTR;
|
46 |
private function _getAddressAttributes()
|
47 |
{
|
48 |
if ($this->_addressAttributes === null) {
|
49 |
+
$this->_addressAttributes = Mage::getModel('customer/entity_address_attribute_collection');
|
50 |
}
|
51 |
|
52 |
return $this->_addressAttributes;
|
app/code/community/Bronto/Customer/Block/Adminhtml/System/Config/Form/Fieldset/Attributes/Customer.php
CHANGED
@@ -48,7 +48,7 @@ class Bronto_Customer_Block_Adminhtml_System_Config_Form_Fieldset_Attributes_Cus
|
|
48 |
private function _getCustomerAttributes()
|
49 |
{
|
50 |
if ($this->_customerAttributes === null) {
|
51 |
-
$this->_customerAttributes = Mage::getModel('customer/entity_attribute_collection')
|
52 |
}
|
53 |
|
54 |
return $this->_customerAttributes;
|
48 |
private function _getCustomerAttributes()
|
49 |
{
|
50 |
if ($this->_customerAttributes === null) {
|
51 |
+
$this->_customerAttributes = Mage::getModel('customer/entity_attribute_collection');
|
52 |
}
|
53 |
|
54 |
return $this->_customerAttributes;
|
app/code/community/Bronto/Customer/Block/Adminhtml/Widget/Button/Sync.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package Bronto\Customer
|
5 |
+
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
+
* @version 1.1.5
|
7 |
+
*/
|
8 |
+
class Bronto_Customer_Block_Adminhtml_Widget_Button_Sync extends Mage_Adminhtml_Block_Widget_Button
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Internal constructor not depended on params. Can be used for object initialization
|
12 |
+
*/
|
13 |
+
protected function _construct()
|
14 |
+
{
|
15 |
+
$missingCustomers = $this->helper('bronto_customer')->getMissingCustomers(true);
|
16 |
+
|
17 |
+
$this->setLabel(sprintf('Sync %d Contacts to Queue', $missingCustomers));
|
18 |
+
$this->setOnClick("setLocation('" . Mage::helper('adminhtml')->getUrl('*/customer/sync') . "'); return false;");
|
19 |
+
$this->setClass('save');
|
20 |
+
|
21 |
+
|
22 |
+
if ($missingCustomers == 0) {
|
23 |
+
$this->setLabel('Sync Complete');
|
24 |
+
$this->setDisabled(true)->setClass('disabled');
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!extension_loaded('soap') || !extension_loaded('openssl') || !Mage::helper('bronto_common')->getApiToken() || !Mage::helper('bronto_customer')->isEnabled()) {
|
28 |
+
$this->setDisabled(true)->setClass('disabled');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
app/code/community/Bronto/Customer/Helper/Data.php
CHANGED
@@ -97,4 +97,32 @@ class Bronto_Customer_Helper_Data extends Bronto_Common_Helper_Data implements B
|
|
97 |
}
|
98 |
return false;
|
99 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
97 |
}
|
98 |
return false;
|
99 |
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get Customers who aren't in contact queue
|
103 |
+
* @param boolean $getCount
|
104 |
+
* @return int|Mage_Customer_Model_Resource_Customer_Collection
|
105 |
+
*/
|
106 |
+
public function getMissingCustomers($getCount = false)
|
107 |
+
{
|
108 |
+
$queue = Mage::getModel('bronto_customer/queue');
|
109 |
+
$ids = $queue->getExistingIds();
|
110 |
+
|
111 |
+
// If just getting count, don't limit results
|
112 |
+
if ($getCount) {
|
113 |
+
$limit = false;
|
114 |
+
} else {
|
115 |
+
$limit = 250;
|
116 |
+
}
|
117 |
+
|
118 |
+
// Get Collection of active customers not already in queue
|
119 |
+
/* @var Mage_Customer_Model_Resource_Customer_Collection */
|
120 |
+
$customers = $queue->getMissingCustomers($ids, $limit);
|
121 |
+
|
122 |
+
if ($getCount) {
|
123 |
+
return $customers->count();
|
124 |
+
}
|
125 |
+
|
126 |
+
return $customers;
|
127 |
+
}
|
128 |
}
|
app/code/community/Bronto/Customer/Model/Mysql4/Queue/Collection.php
CHANGED
@@ -27,6 +27,15 @@ class Bronto_Customer_Model_Mysql4_Queue_Collection
|
|
27 |
$this->addFieldToFilter('bronto_imported', array('notnull' => true));
|
28 |
return $this;
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
/**
|
32 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
@@ -37,6 +46,15 @@ class Bronto_Customer_Model_Mysql4_Queue_Collection
|
|
37 |
return $this;
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @param mixed $storeIds (null, int|string, array, array may contain null)
|
42 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
27 |
$this->addFieldToFilter('bronto_imported', array('notnull' => true));
|
28 |
return $this;
|
29 |
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
33 |
+
*/
|
34 |
+
public function addBrontoSuppressedFilter()
|
35 |
+
{
|
36 |
+
$this->addFieldToFilter('bronto_suppressed', array('notnull' => true));
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
|
40 |
/**
|
41 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
46 |
return $this;
|
47 |
}
|
48 |
|
49 |
+
/**
|
50 |
+
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
51 |
+
*/
|
52 |
+
public function addBrontoNotSuppressedFilter()
|
53 |
+
{
|
54 |
+
$this->addFieldToFilter('bronto_suppressed', array('null' => true));
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
/**
|
59 |
* @param mixed $storeIds (null, int|string, array, array may contain null)
|
60 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
app/code/community/Bronto/Customer/Model/Observer.php
CHANGED
@@ -7,8 +7,8 @@
|
|
7 |
*/
|
8 |
class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
9 |
{
|
10 |
-
|
11 |
-
|
12 |
/**
|
13 |
* @param mixed $storeId
|
14 |
*
|
@@ -16,14 +16,9 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
16 |
*/
|
17 |
public function processCustomersForStore($storeId = null)
|
18 |
{
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
} else {
|
23 |
-
$store = Mage::app()->getStore($storeId);
|
24 |
-
$storeId = $store->getId();
|
25 |
-
}
|
26 |
-
|
27 |
$result = array('total' => 0, 'success' => 0, 'error' => 0);
|
28 |
Mage::helper('bronto_customer')->writeDebug("Starting Customer Import process for store: {$store->getName()} ({$storeId})");
|
29 |
|
@@ -51,6 +46,7 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
51 |
$customerRows = Mage::getModel('bronto_customer/queue')
|
52 |
->getCollection()
|
53 |
->addBrontoNotImportedFilter()
|
|
|
54 |
->orderByUpdatedAt()
|
55 |
->setPageSize($limit)
|
56 |
->addStoreFilter($storeId)
|
@@ -62,14 +58,14 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
62 |
}
|
63 |
|
64 |
$customerAttributes = Mage::getModel('customer/entity_attribute_collection');
|
65 |
-
$addressAttributes = Mage::getModel('customer/entity_address_attribute_collection')
|
66 |
$customerCache = array();
|
67 |
|
68 |
// For each Customer...
|
69 |
foreach ($customerRows as $customerRow) {
|
70 |
$customerId = $customerRow->getCustomerId();
|
71 |
if ($customer = Mage::getModel('customer/customer')->load($customerId) /* @var $customer Mage_Customer_Model_Customer */) {
|
72 |
-
Mage::helper('bronto_customer')->writeDebug(" Processing Customer ID: {$customerId}");
|
73 |
$customerCache[] = array('customerId' => $customerId, 'storeId' => $storeId);
|
74 |
|
75 |
/* @var $brontoContact Bronto_Api_Contact_Row */
|
@@ -77,15 +73,19 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
77 |
$brontoContact->email = $customer->getEmail();
|
78 |
|
79 |
/* Process Customer Attributes */
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
-
|
88 |
-
$brontoContact->persist();
|
89 |
|
90 |
try {
|
91 |
// Mark Customer as imported
|
@@ -102,6 +102,7 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
102 |
|
103 |
// Mark Customer as *not* imported
|
104 |
$customerRow->setBrontoImported(null);
|
|
|
105 |
$customerRow->save();
|
106 |
|
107 |
$result['error']++;
|
@@ -120,8 +121,6 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
120 |
|
121 |
return $results;
|
122 |
}
|
123 |
-
|
124 |
-
// }}}
|
125 |
|
126 |
/**
|
127 |
* Cycle through attributes and validate against Bronto Field type
|
@@ -136,6 +135,9 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
136 |
{
|
137 |
// For each Customer attribute
|
138 |
foreach ($attributes as $attribute) {
|
|
|
|
|
|
|
139 |
$_attributeCode = $attribute->getAttributeCode();
|
140 |
|
141 |
// Get Attribute Field
|
@@ -156,6 +158,11 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
156 |
continue;
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
159 |
$brontoContact->setField($_fieldName, $_attributeValue);
|
160 |
}
|
161 |
|
@@ -171,7 +178,31 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
171 |
public function getReadableValue($attribute, $value)
|
172 |
{
|
173 |
$_attributeType = $attribute->getFrontendInput();
|
|
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
switch ($_attributeType) {
|
176 |
case 'select':
|
177 |
case 'boolean':
|
@@ -192,9 +223,6 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
192 |
break;
|
193 |
}
|
194 |
}
|
195 |
-
|
196 |
-
|
197 |
-
// {{{ flushCustomers()
|
198 |
|
199 |
/**
|
200 |
* @param Bronto_Api_Customer $customerObject
|
@@ -218,24 +246,33 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
218 |
$errorMessage = $flushResultRow->getErrorMessage();
|
219 |
|
220 |
// Catch Error and Replace Field ID with Field Name
|
221 |
-
if ($
|
222 |
-
|
223 |
-
$fieldObject = $fieldModel->getFieldObjectById($
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
226 |
}
|
227 |
|
228 |
if (isset($customerCache[$i])) {
|
229 |
// Get Customer Object
|
230 |
$customer = Mage::getModel('customer/customer')->load($customerCache[$i]['customerId']);
|
|
|
|
|
|
|
231 |
|
232 |
// Reset Bronto Import status
|
233 |
-
|
234 |
->getCustomerRow($customerCache[$i]['customerId'], $customerCache[$i]['storeId'])
|
235 |
->setBrontoImported(null)
|
|
|
236 |
->save();
|
237 |
|
238 |
-
Mage::helper('bronto_customer')->writeError("[{$errorCode}] {$errorMessage} ({$customer->
|
239 |
} else {
|
240 |
Mage::helper('bronto_customer')->writeError("[{$errorCode}] {$errorMessage}");
|
241 |
}
|
@@ -244,13 +281,10 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
244 |
$result['success']++;
|
245 |
}
|
246 |
}
|
247 |
-
|
248 |
return $result;
|
249 |
}
|
250 |
|
251 |
-
// }}}
|
252 |
-
// {{{ processCustomers()
|
253 |
-
|
254 |
/**
|
255 |
* @return array
|
256 |
*/
|
@@ -273,9 +307,6 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
273 |
return $result;
|
274 |
}
|
275 |
|
276 |
-
// }}}
|
277 |
-
// {{{ markCustomerForReimport()
|
278 |
-
|
279 |
/**
|
280 |
* @param Varien_Event_Observer $observer
|
281 |
*/
|
@@ -285,15 +316,14 @@ class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
|
285 |
$customer = $observer->getCustomer();
|
286 |
|
287 |
/* @var $contactQueue Bronto_Customer_Model_Queue */
|
288 |
-
|
289 |
->getCustomerRow($customer->getId(), Mage::app()->getStore()->getId())
|
290 |
->setCreatedAt($customer->getCreatedAt())
|
291 |
->setUpdatedAt(Mage::getSingleton('core/date')->gmtDate())
|
292 |
->setBrontoImported(null)
|
|
|
293 |
->save();
|
294 |
}
|
295 |
-
|
296 |
-
// }}}
|
297 |
|
298 |
/**
|
299 |
* Grab Config Data Object before save and handle the 'Create New...' value for
|
7 |
*/
|
8 |
class Bronto_Customer_Model_Observer extends Mage_Core_Model_Abstract
|
9 |
{
|
10 |
+
private $_fieldMap = array();
|
11 |
+
|
12 |
/**
|
13 |
* @param mixed $storeId
|
14 |
*
|
16 |
*/
|
17 |
public function processCustomersForStore($storeId = null)
|
18 |
{
|
19 |
+
$store = Mage::app()->getStore($storeId);
|
20 |
+
$storeId = $store->getId();
|
21 |
+
|
|
|
|
|
|
|
|
|
|
|
22 |
$result = array('total' => 0, 'success' => 0, 'error' => 0);
|
23 |
Mage::helper('bronto_customer')->writeDebug("Starting Customer Import process for store: {$store->getName()} ({$storeId})");
|
24 |
|
46 |
$customerRows = Mage::getModel('bronto_customer/queue')
|
47 |
->getCollection()
|
48 |
->addBrontoNotImportedFilter()
|
49 |
+
->addBrontoNotSuppressedFilter()
|
50 |
->orderByUpdatedAt()
|
51 |
->setPageSize($limit)
|
52 |
->addStoreFilter($storeId)
|
58 |
}
|
59 |
|
60 |
$customerAttributes = Mage::getModel('customer/entity_attribute_collection');
|
61 |
+
$addressAttributes = Mage::getModel('customer/entity_address_attribute_collection');
|
62 |
$customerCache = array();
|
63 |
|
64 |
// For each Customer...
|
65 |
foreach ($customerRows as $customerRow) {
|
66 |
$customerId = $customerRow->getCustomerId();
|
67 |
if ($customer = Mage::getModel('customer/customer')->load($customerId) /* @var $customer Mage_Customer_Model_Customer */) {
|
68 |
+
Mage::helper('bronto_customer')->writeDebug(" Processing Customer ID: {$customerId} for Store ID: {$storeId}");
|
69 |
$customerCache[] = array('customerId' => $customerId, 'storeId' => $storeId);
|
70 |
|
71 |
/* @var $brontoContact Bronto_Api_Contact_Row */
|
73 |
$brontoContact->email = $customer->getEmail();
|
74 |
|
75 |
/* Process Customer Attributes */
|
76 |
+
try {
|
77 |
+
$brontoContact = $this->processAttributes($brontoContact, $customer, $customerAttributes, $store, 'customer');
|
78 |
+
|
79 |
+
/* Process Address Attributes */
|
80 |
+
$primaryAddress = $customer->getPrimaryShippingAddress();
|
81 |
+
if (!empty($primaryAddress)) {
|
82 |
+
$brontoContact = $this->processAttributes($brontoContact, $primaryAddress, $addressAttributes, $store, 'address');
|
83 |
+
}
|
84 |
+
|
85 |
+
$brontoContact->persist();
|
86 |
+
} catch (Exception $e) {
|
87 |
+
|
88 |
}
|
|
|
|
|
89 |
|
90 |
try {
|
91 |
// Mark Customer as imported
|
102 |
|
103 |
// Mark Customer as *not* imported
|
104 |
$customerRow->setBrontoImported(null);
|
105 |
+
|
106 |
$customerRow->save();
|
107 |
|
108 |
$result['error']++;
|
121 |
|
122 |
return $results;
|
123 |
}
|
|
|
|
|
124 |
|
125 |
/**
|
126 |
* Cycle through attributes and validate against Bronto Field type
|
135 |
{
|
136 |
// For each Customer attribute
|
137 |
foreach ($attributes as $attribute) {
|
138 |
+
if ('' == $attribute->getFrontendLabel()) {
|
139 |
+
continue;
|
140 |
+
}
|
141 |
$_attributeCode = $attribute->getAttributeCode();
|
142 |
|
143 |
// Get Attribute Field
|
158 |
continue;
|
159 |
}
|
160 |
|
161 |
+
// Store Bronto Key => Magento field label for errors
|
162 |
+
if (!array_key_exists($_fieldName, $this->_fieldMap)) {
|
163 |
+
$this->_fieldMap[$_fieldName] = $attribute->getFrontendLabel();
|
164 |
+
}
|
165 |
+
|
166 |
$brontoContact->setField($_fieldName, $_attributeValue);
|
167 |
}
|
168 |
|
178 |
public function getReadableValue($attribute, $value)
|
179 |
{
|
180 |
$_attributeType = $attribute->getFrontendInput();
|
181 |
+
$_attributeCode = $attribute->getAttributeCode();
|
182 |
|
183 |
+
// Pick up Website/Store/Group Values
|
184 |
+
switch ($_attributeCode) {
|
185 |
+
case 'website_id':
|
186 |
+
$websiteModel = Mage::getModel('core/website')->load($value);
|
187 |
+
return $websiteModel->getName();
|
188 |
+
break;
|
189 |
+
case 'store_id':
|
190 |
+
$storeModel = Mage::getModel('core/store')->load($value);
|
191 |
+
return $storeModel->getName();
|
192 |
+
break;
|
193 |
+
case 'group_id':
|
194 |
+
$groupModel = Mage::getModel('customer/group')->load($value);
|
195 |
+
return $groupModel->getCode();
|
196 |
+
break;
|
197 |
+
case 'country_id':
|
198 |
+
$countryModel = Mage::getModel('directory/country')->load($value);
|
199 |
+
return $countryModel->getName();
|
200 |
+
break;
|
201 |
+
default:
|
202 |
+
break;
|
203 |
+
}
|
204 |
+
|
205 |
+
// Format Attribute Values
|
206 |
switch ($_attributeType) {
|
207 |
case 'select':
|
208 |
case 'boolean':
|
223 |
break;
|
224 |
}
|
225 |
}
|
|
|
|
|
|
|
226 |
|
227 |
/**
|
228 |
* @param Bronto_Api_Customer $customerObject
|
246 |
$errorMessage = $flushResultRow->getErrorMessage();
|
247 |
|
248 |
// Catch Error and Replace Field ID with Field Name
|
249 |
+
if (preg_match_all("/([a-zA-Z0-9\-]){36}/", $errorMessage, $matches)) { // Grab field id if exists
|
250 |
+
foreach ($matches[0] as $match) {
|
251 |
+
$fieldObject = $fieldModel->getFieldObjectById($match);
|
252 |
+
if ($fieldObject) {
|
253 |
+
$errorMessage = str_replace($match, $fieldObject->name, $errorMessage);
|
254 |
+
} elseif(array_key_exists($match, $this->_fieldMap)) {
|
255 |
+
$mageLabel = $this->_fieldMap[$match];
|
256 |
+
$errorMessage = "Bronto field mapped for {$mageLabel} no longer exists in your bronto account";
|
257 |
+
}
|
258 |
}
|
259 |
}
|
260 |
|
261 |
if (isset($customerCache[$i])) {
|
262 |
// Get Customer Object
|
263 |
$customer = Mage::getModel('customer/customer')->load($customerCache[$i]['customerId']);
|
264 |
+
$store = Mage::getModel('core/store')->load($customerCache[$i]['storeId']);
|
265 |
+
$website = Mage::getModel('core/website')->load($store->getWebsiteId());
|
266 |
+
$storeMessage = "For `{$website->getName()}`:`{$store->getName()}`: ";
|
267 |
|
268 |
// Reset Bronto Import status
|
269 |
+
Mage::getModel('bronto_customer/queue')
|
270 |
->getCustomerRow($customerCache[$i]['customerId'], $customerCache[$i]['storeId'])
|
271 |
->setBrontoImported(null)
|
272 |
+
->setBrontoSuppressed($errorMessage)
|
273 |
->save();
|
274 |
|
275 |
+
Mage::helper('bronto_customer')->writeError("[{$errorCode}] {$storeMessage}{$errorMessage} ({$customer->getEmail()})");
|
276 |
} else {
|
277 |
Mage::helper('bronto_customer')->writeError("[{$errorCode}] {$errorMessage}");
|
278 |
}
|
281 |
$result['success']++;
|
282 |
}
|
283 |
}
|
284 |
+
|
285 |
return $result;
|
286 |
}
|
287 |
|
|
|
|
|
|
|
288 |
/**
|
289 |
* @return array
|
290 |
*/
|
307 |
return $result;
|
308 |
}
|
309 |
|
|
|
|
|
|
|
310 |
/**
|
311 |
* @param Varien_Event_Observer $observer
|
312 |
*/
|
316 |
$customer = $observer->getCustomer();
|
317 |
|
318 |
/* @var $contactQueue Bronto_Customer_Model_Queue */
|
319 |
+
Mage::getModel('bronto_customer/queue')
|
320 |
->getCustomerRow($customer->getId(), Mage::app()->getStore()->getId())
|
321 |
->setCreatedAt($customer->getCreatedAt())
|
322 |
->setUpdatedAt(Mage::getSingleton('core/date')->gmtDate())
|
323 |
->setBrontoImported(null)
|
324 |
+
->setBrontoSuppressed(null)
|
325 |
->save();
|
326 |
}
|
|
|
|
|
327 |
|
328 |
/**
|
329 |
* Grab Config Data Object before save and handle the 'Create New...' value for
|
app/code/community/Bronto/Customer/Model/Queue.php
CHANGED
@@ -36,4 +36,42 @@ class Bronto_Customer_Model_Queue extends Mage_Core_Model_Abstract
|
|
36 |
|
37 |
return $this;
|
38 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
36 |
|
37 |
return $this;
|
38 |
}
|
39 |
+
|
40 |
+
public function getExistingIds()
|
41 |
+
{
|
42 |
+
$collection = $this->getCollection();
|
43 |
+
$collection->getSelect()
|
44 |
+
->reset(Zend_Db_Select::COLUMNS)
|
45 |
+
->columns('customer_id')
|
46 |
+
->group(array('customer_id'));
|
47 |
+
|
48 |
+
return $collection->getColumnValues('customer_id');
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get collection of customers who aren't already in the queue, but should be
|
53 |
+
* @param array $existingIds
|
54 |
+
* @return Mage_Customer_Model_Resource_Customer_Collection
|
55 |
+
*/
|
56 |
+
public function getMissingCustomers($existingIds = array(), $count = 250)
|
57 |
+
{
|
58 |
+
$customers = Mage::getModel('customer/customer')
|
59 |
+
->getCollection()
|
60 |
+
->addAttributeToSelect('bronto_imported');
|
61 |
+
|
62 |
+
// Only pull active users
|
63 |
+
$customers->getSelect()->where('is_active = 1');
|
64 |
+
|
65 |
+
// If there are existing IDs, don't pull those customers
|
66 |
+
if (count($existingIds) > 0) {
|
67 |
+
$customers->addFieldToFilter('entity_id', array('nin' => $existingIds));
|
68 |
+
}
|
69 |
+
|
70 |
+
// If there is a count limit, limit to that many results
|
71 |
+
if ($count) {
|
72 |
+
$customers->getSelect()->limit($count);
|
73 |
+
}
|
74 |
+
|
75 |
+
return $customers;
|
76 |
+
}
|
77 |
}
|
app/code/community/Bronto/Customer/Model/Resource/Customer.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Bronto_Customer_Model_Resource_Customer extends Mage_Customer_Model_Resource_Customer
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Retrieve customer entity default attributes
|
12 |
+
*
|
13 |
+
* @return array
|
14 |
+
*/
|
15 |
+
protected function _getDefaultAttributes()
|
16 |
+
{
|
17 |
+
return array(
|
18 |
+
'entity_type_id',
|
19 |
+
'attribute_set_id',
|
20 |
+
'created_at',
|
21 |
+
'updated_at',
|
22 |
+
'increment_id',
|
23 |
+
'store_id',
|
24 |
+
'website_id',
|
25 |
+
'is_active' // This should be in here by default, but it isn't
|
26 |
+
);
|
27 |
+
}
|
28 |
+
}
|
app/code/community/Bronto/Customer/Model/System/Config/Backend/Brontofield.php
CHANGED
@@ -13,9 +13,8 @@ class Bronto_Customer_Model_System_Config_Backend_Brontofield extends Mage_Core_
|
|
13 |
*/
|
14 |
protected function _beforeSave()
|
15 |
{
|
16 |
-
|
17 |
-
|
18 |
-
$fieldObject = Mage::getModel('bronto_common/system_config_source_field')->getFieldObjectById($this->getValue());
|
19 |
|
20 |
if ($fieldObject) {
|
21 |
if ('attributes' == $this->group_id) {
|
@@ -24,22 +23,21 @@ class Bronto_Customer_Model_System_Config_Backend_Brontofield extends Mage_Core_
|
|
24 |
$attributes = Mage::getModel('customer/entity_address_attribute_collection')->addVisibleFilter();
|
25 |
}
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
}
|
39 |
}
|
40 |
}
|
41 |
}
|
42 |
-
|
43 |
|
44 |
return parent::_beforeSave();
|
45 |
}
|
13 |
*/
|
14 |
protected function _beforeSave()
|
15 |
{
|
16 |
+
/* @var $fieldObject Bronto_Api_Field */
|
17 |
+
$fieldObject = Mage::getModel('bronto_common/system_config_source_field')->getFieldObjectById($this->getValue());
|
|
|
18 |
|
19 |
if ($fieldObject) {
|
20 |
if ('attributes' == $this->group_id) {
|
23 |
$attributes = Mage::getModel('customer/entity_address_attribute_collection')->addVisibleFilter();
|
24 |
}
|
25 |
|
26 |
+
if ($attributes) {
|
27 |
+
foreach ($attributes as $attribute) {
|
28 |
+
if ($this->field == $attribute->attribute_code) {
|
29 |
+
if ($attribute->frontend_input != $fieldObject->type && $fieldObject->type != 'text') {
|
30 |
+
$message = "Input type doesn't match: {$this->getFieldConfig()->label} [type: {$attribute->frontend_input}] => {$fieldObject->label} [type: {$fieldObject->type}]"
|
31 |
+
. "... Please note that this could cause issues when attempting to import customers";
|
32 |
+
// Throw Warning, but allow saving
|
33 |
+
Mage::getSingleton('core/session')->addWarning(Mage::helper('adminhtml')->__($message));
|
34 |
+
// Throw Exception and prevent saving
|
35 |
+
// Mage::throwException(Mage::helper('adminhtml')->__($message));
|
|
|
36 |
}
|
37 |
}
|
38 |
}
|
39 |
}
|
40 |
+
}
|
41 |
|
42 |
return parent::_beforeSave();
|
43 |
}
|
app/code/community/Bronto/Customer/controllers/Adminhtml/CustomerController.php
CHANGED
@@ -57,7 +57,7 @@ class Bronto_Customer_Adminhtml_CustomerController extends Mage_Adminhtml_Contro
|
|
57 |
|
58 |
foreach ($collection->getItems() as $customerRow) {
|
59 |
try {
|
60 |
-
$customerRow->setBrontoImported(null)->save();
|
61 |
} catch (Exception $e) {
|
62 |
Mage::helper('bronto_customer')->writeError($e);
|
63 |
$this->_getSession()->addError('Reset failed: ' . $e->getMessage());
|
@@ -66,6 +66,38 @@ class Bronto_Customer_Adminhtml_CustomerController extends Mage_Adminhtml_Contro
|
|
66 |
|
67 |
$this->_redirect('*/system_config/edit', array('section' => 'bronto_customer'));
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
/**
|
71 |
* @return bool
|
57 |
|
58 |
foreach ($collection->getItems() as $customerRow) {
|
59 |
try {
|
60 |
+
$customerRow->setBrontoImported(null)->setBrontoSuppressed(null)->save();
|
61 |
} catch (Exception $e) {
|
62 |
Mage::helper('bronto_customer')->writeError($e);
|
63 |
$this->_getSession()->addError('Reset failed: ' . $e->getMessage());
|
66 |
|
67 |
$this->_redirect('*/system_config/edit', array('section' => 'bronto_customer'));
|
68 |
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Pull Customers from Customer Table if not in queue
|
72 |
+
*/
|
73 |
+
public function syncAction()
|
74 |
+
{
|
75 |
+
$imported = 0;
|
76 |
+
$waiting = 0;
|
77 |
+
|
78 |
+
try {
|
79 |
+
$customers = Mage::helper('bronto_customer')->getMissingCustomers();
|
80 |
+
$waiting = $customers->count();
|
81 |
+
|
82 |
+
if ($waiting > 0) {
|
83 |
+
foreach ($customers as $customer) {
|
84 |
+
Mage::getModel('bronto_customer/queue')->getCustomerRow($customer->getEntityId(), $customer->getStoreId())
|
85 |
+
->setCreatedAt($customer->getCreatedAt())
|
86 |
+
->setUpdatedAt(Mage::getSingleton('core/date')->gmtDate())
|
87 |
+
->setBrontoImported($customer->getBrontoImported())
|
88 |
+
->save();
|
89 |
+
|
90 |
+
$imported++;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
} catch (Exception $e) {
|
94 |
+
Mage::helper('bronto_customer')->writeError($e);
|
95 |
+
$this->_getSession()->addError('Sync failed: ' . $e->getMessage());
|
96 |
+
}
|
97 |
+
|
98 |
+
$this->_getSession()->addSuccess(sprintf("%d of %d Customers were added to the Queue", $imported, $waiting));
|
99 |
+
$this->_redirect('*/system_config/edit', array('section' => 'bronto_customer'));
|
100 |
+
}
|
101 |
|
102 |
/**
|
103 |
* @return bool
|
app/code/community/Bronto/Customer/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Customer>
|
5 |
-
<version>1.0.
|
6 |
</Bronto_Customer>
|
7 |
</modules>
|
8 |
<global>
|
@@ -21,6 +21,11 @@
|
|
21 |
<class>Bronto_Customer_Model</class>
|
22 |
<resourceModel>bronto_customer_mysql4</resourceModel>
|
23 |
</bronto_customer>
|
|
|
|
|
|
|
|
|
|
|
24 |
<bronto_customer_mysql4>
|
25 |
<class>Bronto_Customer_Model_Mysql4</class>
|
26 |
<entities>
|
@@ -79,9 +84,9 @@
|
|
79 |
<children>
|
80 |
<config>
|
81 |
<children>
|
82 |
-
<
|
83 |
<title>Bronto Customer Import Section</title>
|
84 |
-
</
|
85 |
</children>
|
86 |
</config>
|
87 |
</children>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Customer>
|
5 |
+
<version>1.0.3</version>
|
6 |
</Bronto_Customer>
|
7 |
</modules>
|
8 |
<global>
|
21 |
<class>Bronto_Customer_Model</class>
|
22 |
<resourceModel>bronto_customer_mysql4</resourceModel>
|
23 |
</bronto_customer>
|
24 |
+
<bronto_customer_resource>
|
25 |
+
<rewrite>
|
26 |
+
<customer_resource>Bronto_Company_Model_Resource_Customer</customer_resource>
|
27 |
+
</rewrite>
|
28 |
+
</bronto_customer_resource>
|
29 |
<bronto_customer_mysql4>
|
30 |
<class>Bronto_Customer_Model_Mysql4</class>
|
31 |
<entities>
|
84 |
<children>
|
85 |
<config>
|
86 |
<children>
|
87 |
+
<bronto_customer>
|
88 |
<title>Bronto Customer Import Section</title>
|
89 |
+
</bronto_customer>
|
90 |
</children>
|
91 |
</config>
|
92 |
</children>
|
app/code/community/Bronto/Customer/sql/bronto_customer_setup/mysql4-upgrade-1.0.2-1.0.3.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* fall back to create table if existing modules already exists to support upgrade
|
4 |
+
*/
|
5 |
+
|
6 |
+
$installer = $this;
|
7 |
+
/* @var $installer Mage_Core_Model_Mysql4_Setup */
|
8 |
+
|
9 |
+
$installer->startSetup();
|
10 |
+
|
11 |
+
try {
|
12 |
+
// Update Table
|
13 |
+
$installer->run("
|
14 |
+
ALTER TABLE `{$this->getTable('bronto_customer_queue')}` ADD COLUMN `bronto_suppressed` VARCHAR(255) NULL DEFAULT NULL;
|
15 |
+
");
|
16 |
+
} catch (Exception $e) {
|
17 |
+
throw new RuntimeException('Failed Modifying Table: ' . $e->getMessage());
|
18 |
+
}
|
19 |
+
|
20 |
+
$installer->endSetup();
|
app/code/community/Bronto/Email/Block/Adminhtml/System/Email/Template/Grid.php
CHANGED
@@ -25,7 +25,7 @@ class Bronto_Email_Block_Adminhtml_System_Email_Template_Grid extends Mage_Admin
|
|
25 |
$mainTable = $resource->getTableName('core/email_template');
|
26 |
$version = Mage::getVersionInfo();
|
27 |
|
28 |
-
if (1 == $version['major'] && 9 != $version['minor'] && 10 != $version['minor']
|
29 |
$mainTable = 'main_table';
|
30 |
}
|
31 |
$collection->getSelect()
|
25 |
$mainTable = $resource->getTableName('core/email_template');
|
26 |
$version = Mage::getVersionInfo();
|
27 |
|
28 |
+
if (1 == $version['major'] && 9 != $version['minor'] && 10 != $version['minor']) {
|
29 |
$mainTable = 'main_table';
|
30 |
}
|
31 |
$collection->getSelect()
|
app/code/community/Bronto/Email/Model/Template/Import.php
CHANGED
@@ -46,6 +46,7 @@ class Bronto_Email_Model_Template_Import extends Mage_Core_Model_Email_Template
|
|
46 |
public function importTemplates()
|
47 |
{
|
48 |
$allStores = Mage::app()->getStores();
|
|
|
49 |
//process existing
|
50 |
$token = Mage::helper('bronto_common')->getApiToken();
|
51 |
if($token) {
|
@@ -60,8 +61,9 @@ class Bronto_Email_Model_Template_Import extends Mage_Core_Model_Email_Template
|
|
60 |
$this->processMessage($template);
|
61 |
}
|
62 |
}
|
|
|
63 |
//process defaults
|
64 |
-
foreach ($allStores as $_eachStoreId
|
65 |
{
|
66 |
$_storeCode = Mage::app()->getStore($_eachStoreId)->getCode();
|
67 |
$_storeId = Mage::app()->getStore($_eachStoreId)->getId();
|
@@ -74,14 +76,13 @@ class Bronto_Email_Model_Template_Import extends Mage_Core_Model_Email_Template
|
|
74 |
|
75 |
//process default
|
76 |
$templates = Mage::getModel('bronto_common/email_message')->getDefaultTemplates();
|
77 |
-
$
|
78 |
-
foreach($templates as $templateToLoad => $temp) {
|
79 |
$template = Mage::getModel('bronto_common/email_message');
|
80 |
$template->loadDefault($templateToLoad);
|
81 |
$template->setOrigTemplateCode($templateToLoad);
|
82 |
$template->setTemplateCode($_storeCode . '_' . $templateToLoad);
|
83 |
-
$template->setAddedAt(
|
84 |
-
|
85 |
$template->setStoreId($_storeId);
|
86 |
$this->processMessage($template);
|
87 |
}
|
@@ -94,7 +95,7 @@ class Bronto_Email_Model_Template_Import extends Mage_Core_Model_Email_Template
|
|
94 |
protected function processMessage($template)
|
95 |
{
|
96 |
$data = $template->getData();
|
97 |
-
$emt
|
98 |
|
99 |
if(!isset($data['bronto_message_id']) || $data['bronto_message_id'] == '') {
|
100 |
try{
|
@@ -103,26 +104,40 @@ class Bronto_Email_Model_Template_Import extends Mage_Core_Model_Email_Template
|
|
103 |
'apiObject' => $this->_apiObject
|
104 |
));
|
105 |
|
106 |
-
|
107 |
-
$
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
)
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
catch(Exception $e) {
|
128 |
Mage::log('Bronto Import:' . $e->getMessage());
|
46 |
public function importTemplates()
|
47 |
{
|
48 |
$allStores = Mage::app()->getStores();
|
49 |
+
|
50 |
//process existing
|
51 |
$token = Mage::helper('bronto_common')->getApiToken();
|
52 |
if($token) {
|
61 |
$this->processMessage($template);
|
62 |
}
|
63 |
}
|
64 |
+
|
65 |
//process defaults
|
66 |
+
foreach (array_keys($allStores) as $_eachStoreId)
|
67 |
{
|
68 |
$_storeCode = Mage::app()->getStore($_eachStoreId)->getCode();
|
69 |
$_storeId = Mage::app()->getStore($_eachStoreId)->getId();
|
76 |
|
77 |
//process default
|
78 |
$templates = Mage::getModel('bronto_common/email_message')->getDefaultTemplates();
|
79 |
+
foreach(array_keys($templates) as $templateToLoad) {
|
|
|
80 |
$template = Mage::getModel('bronto_common/email_message');
|
81 |
$template->loadDefault($templateToLoad);
|
82 |
$template->setOrigTemplateCode($templateToLoad);
|
83 |
$template->setTemplateCode($_storeCode . '_' . $templateToLoad);
|
84 |
+
$template->setAddedAt(Mage::getModel('core/date')->date('Y-m-d H:i:s'));
|
85 |
+
//$template->unsTemplateId();
|
86 |
$template->setStoreId($_storeId);
|
87 |
$this->processMessage($template);
|
88 |
}
|
95 |
protected function processMessage($template)
|
96 |
{
|
97 |
$data = $template->getData();
|
98 |
+
$emt = Mage::getModel('bronto_common/email_message_templatefilter');
|
99 |
|
100 |
if(!isset($data['bronto_message_id']) || $data['bronto_message_id'] == '') {
|
101 |
try{
|
104 |
'apiObject' => $this->_apiObject
|
105 |
));
|
106 |
|
107 |
+
// Add Check for required fields
|
108 |
+
if (array_key_exists('template_text', $data) && array_key_exists('template_subject', $data)) {
|
109 |
+
$message->name = $data['template_code'];
|
110 |
+
$message->status = 'active';
|
111 |
+
|
112 |
+
// Define variables for filtered Subject and Text
|
113 |
+
$templateSubject = $emt->filter($data['template_subject']);
|
114 |
+
$templateText = $emt->filter($data['template_text']);
|
115 |
+
$templateTextRip = $emt->filter($this->ripTags($data['template_text']));
|
116 |
+
|
117 |
+
// Template has invalid or missing required attributes
|
118 |
+
if ('' == $templateSubject || '' == $templateText || '' == $templateTextRip) {
|
119 |
+
return;
|
120 |
+
}
|
121 |
+
|
122 |
+
$message->content = array(
|
123 |
+
array(
|
124 |
+
'type' => 'html',
|
125 |
+
'subject' => $templateSubject,
|
126 |
+
'content' => $templateText,
|
127 |
+
),
|
128 |
+
array(
|
129 |
+
'type' => 'text',
|
130 |
+
'subject' => $templateSubject,
|
131 |
+
'content' => $templateTextRip,
|
132 |
+
)
|
133 |
+
);
|
134 |
+
$message->subject = $templateSubject;
|
135 |
+
$message->save();
|
136 |
+
$template->setBrontoMessageId($message->id);
|
137 |
+
$template->setBrontoMessageName($message->name);
|
138 |
+
$template->setBrontoMessageApproved(0);
|
139 |
+
$template->save();
|
140 |
+
}
|
141 |
}
|
142 |
catch(Exception $e) {
|
143 |
Mage::log('Bronto Import:' . $e->getMessage());
|
app/code/community/Bronto/Newsletter/Model/Observer.php
CHANGED
@@ -40,18 +40,22 @@ class Bronto_Newsletter_Model_Observer extends Mage_Core_Model_Abstract
|
|
40 |
if (!Mage::helper('bronto_newsletter')->isEnabled()) {
|
41 |
return;
|
42 |
}
|
43 |
-
Mage::getSingleton('checkout/session')->unsIsSubscribed();
|
44 |
-
$params = Mage::app()->getRequest()->getParams();
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
(
|
49 |
-
$params
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
|
57 |
return $observer;
|
@@ -85,6 +89,14 @@ class Bronto_Newsletter_Model_Observer extends Mage_Core_Model_Abstract
|
|
85 |
return;
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
try {
|
89 |
// Get e-mail address we are working with
|
90 |
$email = $observer->getEvent()->getOrder()->getData('customer_email');
|
@@ -106,9 +118,6 @@ class Bronto_Newsletter_Model_Observer extends Mage_Core_Model_Abstract
|
|
106 |
return false;
|
107 |
}
|
108 |
|
109 |
-
// Get Subscription status
|
110 |
-
$isSubscribed = Mage::getSingleton('checkout/session')->getIsSubscribed();
|
111 |
-
|
112 |
// Determine action
|
113 |
switch ($isSubscribed) {
|
114 |
case self::BOX_CHECKED:
|
40 |
if (!Mage::helper('bronto_newsletter')->isEnabled()) {
|
41 |
return;
|
42 |
}
|
|
|
|
|
43 |
|
44 |
+
$controllerAction = $observer->getControllerAction();
|
45 |
+
if ($controllerAction instanceof Mage_Checkout_OnepageController) {
|
46 |
+
Mage::getSingleton('checkout/session')->unsIsSubscribed();
|
47 |
+
$params = Mage::app()->getRequest()->getParams();
|
48 |
+
|
49 |
+
if (
|
50 |
+
isset($params['billing']['is_subscribed']) &&
|
51 |
+
($params['billing']['is_subscribed'] === '1' ||
|
52 |
+
$params['billing']['is_subscribed'] === '0')
|
53 |
+
) {
|
54 |
+
$isSubscribed = (int) $params['billing']['is_subscribed'];
|
55 |
+
Mage::getSingleton('checkout/session')->setIsSubscribed($isSubscribed);
|
56 |
+
} else {
|
57 |
+
Mage::getSingleton('checkout/session')->setIsSubscribed(self::BOX_NOT_CHANGED);
|
58 |
+
}
|
59 |
}
|
60 |
|
61 |
return $observer;
|
89 |
return;
|
90 |
}
|
91 |
|
92 |
+
// Get Subscription status from session
|
93 |
+
$isSubscribed = Mage::getSingleton('checkout/session')->getIsSubscribed();
|
94 |
+
|
95 |
+
// If Subscription status isn't set, we do nothing
|
96 |
+
if (!is_int($isSubscribed)) {
|
97 |
+
return $observer;
|
98 |
+
}
|
99 |
+
|
100 |
try {
|
101 |
// Get e-mail address we are working with
|
102 |
$email = $observer->getEvent()->getOrder()->getData('customer_email');
|
118 |
return false;
|
119 |
}
|
120 |
|
|
|
|
|
|
|
121 |
// Determine action
|
122 |
switch ($isSubscribed) {
|
123 |
case self::BOX_CHECKED:
|
app/code/community/Bronto/Order/Block/Adminhtml/System/Config/Cron.php
CHANGED
@@ -22,6 +22,10 @@ class Bronto_Order_Block_Adminhtml_System_Config_Cron extends Bronto_Common_Bloc
|
|
22 |
*/
|
23 |
protected function _prepareLayout()
|
24 |
{
|
|
|
|
|
|
|
|
|
25 |
$this->addButton($this->getLayout()->createBlock('bronto_order/adminhtml_widget_button_reset'));
|
26 |
$this->addButton($this->getLayout()->createBlock('bronto_order/adminhtml_widget_button_run'));
|
27 |
|
@@ -34,6 +38,8 @@ class Bronto_Order_Block_Adminhtml_System_Config_Cron extends Bronto_Common_Bloc
|
|
34 |
protected function getProgressBarTotal()
|
35 |
{
|
36 |
return $this->getOrderResourceCollection()
|
|
|
|
|
37 |
->getSize();
|
38 |
}
|
39 |
|
@@ -44,6 +50,8 @@ class Bronto_Order_Block_Adminhtml_System_Config_Cron extends Bronto_Common_Bloc
|
|
44 |
{
|
45 |
return $this->getOrderResourceCollection()
|
46 |
->addBrontoNotImportedFilter()
|
|
|
|
|
47 |
->getSize();
|
48 |
}
|
49 |
|
22 |
*/
|
23 |
protected function _prepareLayout()
|
24 |
{
|
25 |
+
$missingOrders = $this->helper('bronto_order')->getMissingOrders(true);
|
26 |
+
if ($missingOrders > 0) {
|
27 |
+
$this->addButton($this->getLayout()->createBlock('bronto_order/adminhtml_widget_button_sync'));
|
28 |
+
}
|
29 |
$this->addButton($this->getLayout()->createBlock('bronto_order/adminhtml_widget_button_reset'));
|
30 |
$this->addButton($this->getLayout()->createBlock('bronto_order/adminhtml_widget_button_run'));
|
31 |
|
38 |
protected function getProgressBarTotal()
|
39 |
{
|
40 |
return $this->getOrderResourceCollection()
|
41 |
+
->addBrontoNotSuppressedFilter()
|
42 |
+
->addBrontoHasOrderFilter()
|
43 |
->getSize();
|
44 |
}
|
45 |
|
50 |
{
|
51 |
return $this->getOrderResourceCollection()
|
52 |
->addBrontoNotImportedFilter()
|
53 |
+
->addBrontoNotSuppressedFilter()
|
54 |
+
->addBrontoHasOrderFilter()
|
55 |
->getSize();
|
56 |
}
|
57 |
|
app/code/community/Bronto/Order/Block/Adminhtml/Widget/Button/Sync.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package Bronto\Order
|
5 |
+
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
+
* @version 1.1.8
|
7 |
+
*/
|
8 |
+
class Bronto_Order_Block_Adminhtml_Widget_Button_Sync extends Mage_Adminhtml_Block_Widget_Button
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Internal constructor not depended on params. Can be used for object initialization
|
12 |
+
*/
|
13 |
+
protected function _construct()
|
14 |
+
{
|
15 |
+
$missingOrders = $this->helper('bronto_order')->getMissingOrders(true);
|
16 |
+
|
17 |
+
$this->setLabel(sprintf('Sync %d Orders to Queue', $missingOrders));
|
18 |
+
$this->setOnClick("setLocation('" . Mage::helper('adminhtml')->getUrl('*/order/sync') . "'); return false;");
|
19 |
+
$this->setClass('save');
|
20 |
+
|
21 |
+
|
22 |
+
if ($missingOrders == 0) {
|
23 |
+
$this->setLabel('Sync Complete');
|
24 |
+
$this->setDisabled(true)->setClass('disabled');
|
25 |
+
}
|
26 |
+
|
27 |
+
if (!extension_loaded('soap') || !extension_loaded('openssl') || !Mage::helper('bronto_common')->getApiToken() || !Mage::helper('bronto_order')->isEnabled()) {
|
28 |
+
$this->setDisabled(true)->setClass('disabled');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
app/code/community/Bronto/Order/Block/Bta.php
CHANGED
@@ -15,17 +15,16 @@ class Bronto_Order_Block_Bta extends Mage_Core_Block_Text
|
|
15 |
*/
|
16 |
protected function _toHtml()
|
17 |
{
|
18 |
-
|
19 |
-
|
|
|
20 |
|
21 |
return "
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}(document,'script'));
|
29 |
-
</script>";
|
30 |
}
|
31 |
}
|
15 |
*/
|
16 |
protected function _toHtml()
|
17 |
{
|
18 |
+
if (!Mage::helper('bronto_order')->isModuleEnabled()) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
|
22 |
return "
|
23 |
+
<script type=\"text/javascript\">
|
24 |
+
document.write(unescape(\"%3Cscript src='\"
|
25 |
+
+ ((document.location.protocol == \"https:\") ? \"https:\" : \"http:\")
|
26 |
+
+ \"//p.bm23.com/bta.js' type='text/javascript'%3E%3C/script%3E\"));
|
27 |
+
</script>
|
28 |
+
";
|
|
|
|
|
29 |
}
|
30 |
}
|
app/code/community/Bronto/Order/Helper/Data.php
CHANGED
@@ -59,4 +59,113 @@ class Bronto_Order_Helper_Data extends Bronto_Common_Helper_Data implements Bron
|
|
59 |
{
|
60 |
return 'Bronto_Order';
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
59 |
{
|
60 |
return 'Bronto_Order';
|
61 |
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get Item Product Url
|
65 |
+
* @param Mage_Sales_Model_Order_Item $item
|
66 |
+
* @param Mage_Catalog_Model_Product $itemProduct
|
67 |
+
* @return string
|
68 |
+
*/
|
69 |
+
public function getItemUrl(Mage_Sales_Model_Order_Item $item, Mage_Catalog_Model_Product $itemProduct)
|
70 |
+
{
|
71 |
+
$productId = $this->_getIdToUse($item, $itemProduct);
|
72 |
+
return Mage::helper('bronto_common/product')->getProductAttribute($productId, 'url');
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Get Item image
|
77 |
+
* @param Mage_Sales_Model_Order_Item $item
|
78 |
+
* @param Mage_Catalog_Model_Product $itemProduct
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
public function getItemImg(Mage_Sales_Model_Order_Item $item, Mage_Catalog_Model_Product $itemProduct)
|
82 |
+
{
|
83 |
+
if (Mage::helper('bronto_common/product')->getProductAttribute($itemProduct->getId(), 'image')) {
|
84 |
+
return Mage::helper('bronto_common/product')->getProductAttribute($itemProduct->getId(), 'image');
|
85 |
+
}
|
86 |
+
|
87 |
+
$productId = $this->_getIdToUse($item, $itemProduct, false);
|
88 |
+
return Mage::helper('bronto_common/product')->getProductAttribute($productId, 'image');
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get the product ID to use based on Item visibility
|
93 |
+
* @param Mage_Sales_Model_Order_Item $item
|
94 |
+
* @param Mage_Catalog_Model_Product $itemProduct
|
95 |
+
* @param boolean $checkVisible
|
96 |
+
* @return int
|
97 |
+
*/
|
98 |
+
protected function _getIdToUse(Mage_Sales_Model_Order_Item $item, Mage_Catalog_Model_Product $itemProduct, $checkVisible = true)
|
99 |
+
{
|
100 |
+
if ($checkVisible && in_array($itemProduct->getVisibility(), array('2', '4'))) {
|
101 |
+
return $item->getProductId();
|
102 |
+
} else {
|
103 |
+
$superProductConfig = $this->_getSuperProductConfig($item);
|
104 |
+
if ($superProductConfig && array_key_exists('product_id', $superProductConfig)) {
|
105 |
+
return $superProductConfig['product_id'];
|
106 |
+
} elseif (method_exists($item, 'getParentItemId')) {
|
107 |
+
return $item->getParentItemId();
|
108 |
+
} else {
|
109 |
+
return $item->getProductId();
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* This function gets the order item's info_buyRequest super_product_config values
|
116 |
+
* if they exist
|
117 |
+
* @param Mage_Sales_Model_Order_Item $item
|
118 |
+
* @return boolean|array
|
119 |
+
* @access protected
|
120 |
+
*/
|
121 |
+
protected function _getSuperProductConfig(Mage_Sales_Model_Order_Item $item)
|
122 |
+
{
|
123 |
+
if (method_exists($item, 'getBuyRequest')) {
|
124 |
+
$buyRequest = $item->getBuyRequest()->getData();
|
125 |
+
} elseif (method_exists($item, 'getProductOptionByCode')) {
|
126 |
+
$buyRequest = $item->getProductOptionByCode('info_buyRequest');
|
127 |
+
} elseif (method_exists($item, 'getProductOptions')) {
|
128 |
+
$options = $item->getProductOptions();
|
129 |
+
$buyRequest = $options['info_buyRequest'];
|
130 |
+
} elseif (method_exists($item, 'getOptionByCode')) {
|
131 |
+
$buyRequest = $item->getOptionByCode('info_buyRequest');
|
132 |
+
} else {
|
133 |
+
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
|
137 |
+
if ($buyRequest && array_key_exists('super_product_config', $buyRequest)) {
|
138 |
+
return $buyRequest['super_product_config'];
|
139 |
+
} elseif ($buyRequest && array_key_exists('product', $buyRequest)) {
|
140 |
+
return array('product_id' => $buyRequest['product']);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get Orders which aren't in contact queue
|
146 |
+
* @param boolean $getCount
|
147 |
+
* @return int|Mage_Sales_Model_Resource_Order_Collection
|
148 |
+
*/
|
149 |
+
public function getMissingOrders($getCount = false)
|
150 |
+
{
|
151 |
+
$queue = Mage::getModel('bronto_order/queue');
|
152 |
+
$ids = $queue->getExistingIds();
|
153 |
+
|
154 |
+
// If just getting count, don't limit results
|
155 |
+
if ($getCount) {
|
156 |
+
$limit = false;
|
157 |
+
} else {
|
158 |
+
$limit = 250;
|
159 |
+
}
|
160 |
+
|
161 |
+
// Get Collection of active orders not already in queue
|
162 |
+
/* @var Mage_Sales_Model_Resource_Order_Collection */
|
163 |
+
$orders = $queue->getMissingOrders($ids, $limit);
|
164 |
+
|
165 |
+
if ($getCount) {
|
166 |
+
return $orders->count();
|
167 |
+
}
|
168 |
+
|
169 |
+
return $orders;
|
170 |
+
}
|
171 |
}
|
app/code/community/Bronto/Order/Model/Mysql4/Queue/Collection.php
CHANGED
@@ -27,6 +27,15 @@ class Bronto_Order_Model_Mysql4_Queue_Collection
|
|
27 |
$this->addFieldToFilter('bronto_imported', array('notnull' => true));
|
28 |
return $this;
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
/**
|
32 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
@@ -37,6 +46,21 @@ class Bronto_Order_Model_Mysql4_Queue_Collection
|
|
37 |
return $this;
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
/**
|
41 |
* @param mixed $storeIds (null, int|string, array, array may contain null)
|
42 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
27 |
$this->addFieldToFilter('bronto_imported', array('notnull' => true));
|
28 |
return $this;
|
29 |
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
33 |
+
*/
|
34 |
+
public function addBrontoSuppressedFilter()
|
35 |
+
{
|
36 |
+
$this->addFieldToFilter('bronto_suppressed', array('notnull' => true));
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
|
40 |
/**
|
41 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
46 |
return $this;
|
47 |
}
|
48 |
|
49 |
+
/**
|
50 |
+
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
51 |
+
*/
|
52 |
+
public function addBrontoNotSuppressedFilter()
|
53 |
+
{
|
54 |
+
$this->addFieldToFilter('bronto_suppressed', array('null' => true));
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function addBrontoHasOrderFilter()
|
59 |
+
{
|
60 |
+
$this->addFieldToFilter('order_id', array('neq' => 0));
|
61 |
+
return $this;
|
62 |
+
}
|
63 |
+
|
64 |
/**
|
65 |
* @param mixed $storeIds (null, int|string, array, array may contain null)
|
66 |
* @return Bronto_Order_Model_Mysql4_Queue_Collection
|
app/code/community/Bronto/Order/Model/Observer.php
CHANGED
@@ -30,13 +30,8 @@ class Bronto_Order_Model_Observer
|
|
30 |
*/
|
31 |
public function processOrdersForStore($storeId = null)
|
32 |
{
|
33 |
-
|
34 |
-
|
35 |
-
$storeId = $store->getId();
|
36 |
-
} else {
|
37 |
-
$store = Mage::app()->getStore($storeId);
|
38 |
-
$storeId = $store->getId();
|
39 |
-
}
|
40 |
|
41 |
// Set the current store ID
|
42 |
Mage::app()->setCurrentStore($storeId);
|
@@ -67,6 +62,8 @@ class Bronto_Order_Model_Observer
|
|
67 |
$orderRows = Mage::getModel('bronto_order/queue')
|
68 |
->getCollection()
|
69 |
->addBrontoNotImportedFilter()
|
|
|
|
|
70 |
->orderByUpdatedAt()
|
71 |
->setPageSize($limit)
|
72 |
->addStoreFilter($storeId)
|
@@ -107,19 +104,54 @@ class Bronto_Order_Model_Observer
|
|
107 |
|
108 |
default:
|
109 |
// loop through the items. if it's a bundled item, replace the parent item with the child items.
|
110 |
-
$items
|
111 |
-
$
|
112 |
-
foreach ($items as $item) {
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
$
|
117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
-
$i++;
|
120 |
}
|
121 |
-
|
122 |
-
foreach ($
|
123 |
/* @var $product Mage_Catalog_Model_Product */
|
124 |
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
125 |
$categoryIds = $product->getCategoryIds();
|
@@ -140,8 +172,8 @@ class Bronto_Order_Model_Observer
|
|
140 |
'name' => $item->getName(),
|
141 |
'description' => $productHelper->getProductAttribute($item->getProductId(), $descriptionAttr),
|
142 |
'category' => implode(' ', $categories),
|
143 |
-
'image' => $productHelper->getProductAttribute($item->getProductId(), 'image'),
|
144 |
-
'url' => $productHelper->getProductAttribute($item->getProductId(), 'url'),
|
145 |
'quantity' => (int) $item->getQtyOrdered(),
|
146 |
'price' => (float) $item->getPrice(),
|
147 |
);
|
@@ -150,7 +182,7 @@ class Bronto_Order_Model_Observer
|
|
150 |
$brontoOrder->persist();
|
151 |
break;
|
152 |
}
|
153 |
-
|
154 |
try {
|
155 |
// Mark order as imported
|
156 |
$orderRow->setBrontoImported(Mage::getSingleton('core/date')->gmtDate());
|
@@ -166,6 +198,8 @@ class Bronto_Order_Model_Observer
|
|
166 |
|
167 |
// Mark import as *not* imported
|
168 |
$orderRow->setBrontoImported(null);
|
|
|
|
|
169 |
$orderRow->save();
|
170 |
|
171 |
$result['error']++;
|
@@ -214,6 +248,7 @@ class Bronto_Order_Model_Observer
|
|
214 |
$orderRow = Mage::getModel('bronto_order/queue')
|
215 |
->getOrderRow($order->getId(), $order->getQuoteId(), $order->getStoreId())
|
216 |
->setBrontoImported(null)
|
|
|
217 |
->save();
|
218 |
|
219 |
Mage::helper('bronto_order')->writeError("[{$errorCode}] {$errorMessage} ({$order->getIncrementId})");
|
30 |
*/
|
31 |
public function processOrdersForStore($storeId = null)
|
32 |
{
|
33 |
+
$store = Mage::app()->getStore($storeId);
|
34 |
+
$storeId = $store->getId();
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
// Set the current store ID
|
37 |
Mage::app()->setCurrentStore($storeId);
|
62 |
$orderRows = Mage::getModel('bronto_order/queue')
|
63 |
->getCollection()
|
64 |
->addBrontoNotImportedFilter()
|
65 |
+
->addBrontoNotSuppressedFilter()
|
66 |
+
->addBrontoHasOrderFilter()
|
67 |
->orderByUpdatedAt()
|
68 |
->setPageSize($limit)
|
69 |
->addStoreFilter($storeId)
|
104 |
|
105 |
default:
|
106 |
// loop through the items. if it's a bundled item, replace the parent item with the child items.
|
107 |
+
$items = $order->getAllVisibleItems();
|
108 |
+
$fullItems = array(); // Keep product order by using a new array
|
109 |
+
foreach ($items as $item) {
|
110 |
+
$itemProduct = Mage::getModel('catalog/product')->load($item->getProductId());
|
111 |
+
switch ($itemProduct->getTypeId()) {
|
112 |
+
case Mage_Catalog_Model_Product_Type::TYPE_BUNDLE:
|
113 |
+
if (count($item->getChildrenItems()) > 0) {
|
114 |
+
foreach ($item->getChildrenItems() as $child_item) {
|
115 |
+
$fullItems[] = $child_item;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
break;
|
119 |
+
case Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE:
|
120 |
+
$childItems = $item->getChildrenItems();
|
121 |
+
if (1 === count($childItems)) {
|
122 |
+
$childItem = $childItems[0];
|
123 |
+
|
124 |
+
// Collect options applicable to the configurable product
|
125 |
+
$productAttributeOptions = $itemProduct->getTypeInstance(true)->getConfigurableAttributesAsArray($itemProduct);
|
126 |
+
|
127 |
+
// Build Selected Options Name
|
128 |
+
$nameWithOptions = array();
|
129 |
+
foreach ($productAttributeOptions as $productAttribute) {
|
130 |
+
$itemValue = $productHelper->getProductAttribute($childItem->getProductId(), $productAttribute['attribute_code']);
|
131 |
+
$nameWithOptions[] = $productAttribute['label'] . ': ' . $itemValue;
|
132 |
+
}
|
133 |
+
|
134 |
+
// Set parent product name to include selected options
|
135 |
+
$parentName = $item->getName() . ' [' . implode(', ', $nameWithOptions) . ']';
|
136 |
+
$item->setName($parentName);
|
137 |
+
}
|
138 |
+
|
139 |
+
$fullItems[] = $item;
|
140 |
+
break;
|
141 |
+
case Mage_Catalog_Model_Product_Type::TYPE_GROUPED:
|
142 |
+
// This condition probably never gets hit, parent grouped items don't show in order
|
143 |
+
$fullItems[] = $item;
|
144 |
+
foreach ($item->getChildrenItems() as $child_item) {
|
145 |
+
$fullItems[] = $child_item;
|
146 |
+
}
|
147 |
+
break;
|
148 |
+
default:
|
149 |
+
$fullItems[] = $item;
|
150 |
+
break;
|
151 |
}
|
|
|
152 |
}
|
153 |
+
|
154 |
+
foreach ($fullItems as $item /* @var $item Mage_Sales_Model_Order_Item */) {
|
155 |
/* @var $product Mage_Catalog_Model_Product */
|
156 |
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
157 |
$categoryIds = $product->getCategoryIds();
|
172 |
'name' => $item->getName(),
|
173 |
'description' => $productHelper->getProductAttribute($item->getProductId(), $descriptionAttr),
|
174 |
'category' => implode(' ', $categories),
|
175 |
+
'image' => Mage::helper('bronto_order')->getItemImg($item, $product),//$productHelper->getProductAttribute($item->getProductId(), 'image'),
|
176 |
+
'url' => Mage::helper('bronto_order')->getItemUrl($item, $product),//$productHelper->getProductAttribute($item->getProductId(), 'url'),
|
177 |
'quantity' => (int) $item->getQtyOrdered(),
|
178 |
'price' => (float) $item->getPrice(),
|
179 |
);
|
182 |
$brontoOrder->persist();
|
183 |
break;
|
184 |
}
|
185 |
+
|
186 |
try {
|
187 |
// Mark order as imported
|
188 |
$orderRow->setBrontoImported(Mage::getSingleton('core/date')->gmtDate());
|
198 |
|
199 |
// Mark import as *not* imported
|
200 |
$orderRow->setBrontoImported(null);
|
201 |
+
// Do not suppress on Exception
|
202 |
+
//$orderRow->setBrontoSuppressed($e->getMessage());
|
203 |
$orderRow->save();
|
204 |
|
205 |
$result['error']++;
|
248 |
$orderRow = Mage::getModel('bronto_order/queue')
|
249 |
->getOrderRow($order->getId(), $order->getQuoteId(), $order->getStoreId())
|
250 |
->setBrontoImported(null)
|
251 |
+
->setBrontoSuppressed($errorMessage)
|
252 |
->save();
|
253 |
|
254 |
Mage::helper('bronto_order')->writeError("[{$errorCode}] {$errorMessage} ({$order->getIncrementId})");
|
app/code/community/Bronto/Order/Model/Order/Observer.php
CHANGED
@@ -54,7 +54,17 @@ class Bronto_Order_Model_Order_Observer
|
|
54 |
|
55 |
/* @var $contactQueue Bronto_Order_Model_Queue */
|
56 |
$orderRow = Mage::getModel('bronto_order/queue')
|
57 |
-
->getOrderRow($order->getId(), $order->getQuoteId(), $order->getStoreId())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
->setCreatedAt($order->getCreatedAt())
|
59 |
->setUpdatedAt($order->getUpdatedAt())
|
60 |
->setBrontoImported(null)
|
54 |
|
55 |
/* @var $contactQueue Bronto_Order_Model_Queue */
|
56 |
$orderRow = Mage::getModel('bronto_order/queue')
|
57 |
+
->getOrderRow($order->getId(), $order->getQuoteId(), $order->getStoreId());
|
58 |
+
|
59 |
+
foreach (Mage::getModel('core/cookie')->get() as $key => $value) {
|
60 |
+
if (stripos($key, "tid") !== false) {
|
61 |
+
$orderRow->setBrontoTid($value);
|
62 |
+
|
63 |
+
break;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
$orderRow
|
68 |
->setCreatedAt($order->getCreatedAt())
|
69 |
->setUpdatedAt($order->getUpdatedAt())
|
70 |
->setBrontoImported(null)
|
app/code/community/Bronto/Order/Model/Queue.php
CHANGED
@@ -31,28 +31,76 @@ class Bronto_Order_Model_Queue extends Mage_Core_Model_Abstract
|
|
31 |
$collection = $this->getCollection();
|
32 |
|
33 |
// Add Filters
|
34 |
-
if ($orderId) {
|
35 |
-
$collection->
|
36 |
-
}
|
37 |
-
if ($quoteId) {
|
38 |
$collection->addFieldToFilter('quote_id', $quoteId);
|
|
|
|
|
39 |
}
|
40 |
$collection->addFieldToFilter('store_id', $storeId);
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
52 |
-
|
53 |
-
|
54 |
}
|
55 |
|
56 |
return $this;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
31 |
$collection = $this->getCollection();
|
32 |
|
33 |
// Add Filters
|
34 |
+
if (($quoteId > 0) && ($orderId > 0)) {
|
35 |
+
$collection->getSelect()->where("`quote_id` = $quoteId OR `order_id` = $orderId");
|
36 |
+
} elseif (($quoteId > 0)) {
|
|
|
37 |
$collection->addFieldToFilter('quote_id', $quoteId);
|
38 |
+
} elseif (($orderId > 0)) {
|
39 |
+
$collection->addFieldToFilter('order_id', $orderId);
|
40 |
}
|
41 |
$collection->addFieldToFilter('store_id', $storeId);
|
42 |
|
43 |
+
try {
|
44 |
+
// Handle Results
|
45 |
+
if ($collection->count() == 1) {
|
46 |
+
$order = $collection->getFirstItem();
|
47 |
+
if (($quoteId > 0)) {
|
48 |
+
$order->setQuoteId($quoteId);
|
49 |
+
}
|
50 |
+
if (($orderId > 0)) {
|
51 |
+
$order->setOrderId($orderId);
|
52 |
+
}
|
53 |
+
$order->save();
|
54 |
+
|
55 |
+
return $order;
|
56 |
+
} else {
|
57 |
+
if (($quoteId > 0)) {
|
58 |
+
$this->setQuoteId($quoteId);
|
59 |
+
}
|
60 |
+
if (($orderId > 0)) {
|
61 |
+
$this->setOrderId($orderId);
|
62 |
+
}
|
63 |
+
|
64 |
+
$this->setStoreId($storeId);
|
65 |
}
|
66 |
+
} catch (Exception $e) {
|
67 |
+
Mage::helper('bronto_order')->writeDebug("Exception Thrown pulling order row");
|
68 |
}
|
69 |
|
70 |
return $this;
|
71 |
}
|
72 |
+
|
73 |
+
public function getExistingIds()
|
74 |
+
{
|
75 |
+
$collection = $this->getCollection();
|
76 |
+
$collection->getSelect()
|
77 |
+
->reset(Zend_Db_Select::COLUMNS)
|
78 |
+
->columns('order_id')
|
79 |
+
->group(array('order_id'));
|
80 |
+
|
81 |
+
return $collection->getColumnValues('order_id');
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get collection of orders which aren't already in the queue, but should be
|
86 |
+
* @param array $existingIds
|
87 |
+
* @return Mage_Sales_Model_Resource_Order_Collection
|
88 |
+
*/
|
89 |
+
public function getMissingOrders($existingIds = array(), $count = 250)
|
90 |
+
{
|
91 |
+
$orders = Mage::getModel('sales/order')
|
92 |
+
->getCollection();
|
93 |
+
|
94 |
+
// If there are existing IDs, don't pull those orders
|
95 |
+
if (count($existingIds) > 0) {
|
96 |
+
$orders->addFieldToFilter('entity_id', array('nin' => $existingIds));
|
97 |
+
}
|
98 |
+
|
99 |
+
// If there is a count limit, limit to that many results
|
100 |
+
if ($count) {
|
101 |
+
$orders->getSelect()->limit($count);
|
102 |
+
}
|
103 |
+
|
104 |
+
return $orders;
|
105 |
+
}
|
106 |
}
|
app/code/community/Bronto/Order/Model/Quote/Observer.php
CHANGED
@@ -20,11 +20,12 @@ class Bronto_Order_Model_Quote_Observer
|
|
20 |
|
21 |
/* @var $contactQueue Bronto_Order_Model_Queue */
|
22 |
$orderRow = Mage::getModel('bronto_order/queue')
|
23 |
-
->getOrderRow(
|
24 |
|
25 |
foreach (Mage::getModel('core/cookie')->get() as $key => $value) {
|
26 |
if (stripos($key, "tid_") !== false) {
|
27 |
$orderRow->setBrontoTid($value)->save();
|
|
|
28 |
break;
|
29 |
}
|
30 |
}
|
20 |
|
21 |
/* @var $contactQueue Bronto_Order_Model_Queue */
|
22 |
$orderRow = Mage::getModel('bronto_order/queue')
|
23 |
+
->getOrderRow(null, $quote->getId(), $quote->getStoreId());
|
24 |
|
25 |
foreach (Mage::getModel('core/cookie')->get() as $key => $value) {
|
26 |
if (stripos($key, "tid_") !== false) {
|
27 |
$orderRow->setBrontoTid($value)->save();
|
28 |
+
|
29 |
break;
|
30 |
}
|
31 |
}
|
app/code/community/Bronto/Order/controllers/Adminhtml/OrderController.php
CHANGED
@@ -66,6 +66,39 @@ class Bronto_Order_Adminhtml_OrderController extends Mage_Adminhtml_Controller_A
|
|
66 |
|
67 |
$this->_redirect('*/system_config/edit', array('section' => 'bronto_order'));
|
68 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
/**
|
71 |
* @return bool
|
66 |
|
67 |
$this->_redirect('*/system_config/edit', array('section' => 'bronto_order'));
|
68 |
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Pull Orders from Order Table if not in queue
|
72 |
+
*/
|
73 |
+
public function syncAction()
|
74 |
+
{
|
75 |
+
$imported = 0;
|
76 |
+
$waiting = 0;
|
77 |
+
|
78 |
+
try {
|
79 |
+
$orders = Mage::helper('bronto_order')->getMissingOrders();
|
80 |
+
$waiting = $orders->count();
|
81 |
+
|
82 |
+
if ($waiting > 0) {
|
83 |
+
foreach ($orders as $order) {
|
84 |
+
Mage::getModel('bronto_order/queue')->getOrderRow($order->getEntityId(), null, $order->getStoreId())
|
85 |
+
->setQuoteId($order->getQuoteId())
|
86 |
+
->setCreatedAt($order->getCreatedAt())
|
87 |
+
->setUpdatedAt(Mage::getSingleton('core/date')->gmtDate())
|
88 |
+
->setBrontoImported(0)
|
89 |
+
->save();
|
90 |
+
|
91 |
+
$imported++;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
} catch (Exception $e) {
|
95 |
+
Mage::helper('bronto_order')->writeError($e);
|
96 |
+
$this->_getSession()->addError('Sync failed: ' . $e->getMessage());
|
97 |
+
}
|
98 |
+
|
99 |
+
$this->_getSession()->addSuccess(sprintf("%d of %d Orders were added to the Queue", $imported, $waiting));
|
100 |
+
$this->_redirect('*/system_config/edit', array('section' => 'bronto_order'));
|
101 |
+
}
|
102 |
|
103 |
/**
|
104 |
* @return bool
|
app/code/community/Bronto/Order/etc/config.xml
CHANGED
@@ -2,18 +2,10 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Order>
|
5 |
-
<version>1.1.
|
6 |
</Bronto_Order>
|
7 |
</modules>
|
8 |
<global>
|
9 |
-
<fieldsets>
|
10 |
-
<sales_convert_quote>
|
11 |
-
<bronto_tid><to_order>*</to_order></bronto_tid>
|
12 |
-
</sales_convert_quote>
|
13 |
-
<sales_convert_order>
|
14 |
-
<bronto_tid><to_quote>*</to_quote></bronto_tid>
|
15 |
-
</sales_convert_order>
|
16 |
-
</fieldsets>
|
17 |
<helpers>
|
18 |
<bronto_order>
|
19 |
<class>Bronto_Order_Helper</class>
|
@@ -88,6 +80,13 @@
|
|
88 |
</events>
|
89 |
</global>
|
90 |
<frontend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
<events>
|
92 |
<sales_quote_save_after>
|
93 |
<observers>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Order>
|
5 |
+
<version>1.1.8</version>
|
6 |
</Bronto_Order>
|
7 |
</modules>
|
8 |
<global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
<helpers>
|
10 |
<bronto_order>
|
11 |
<class>Bronto_Order_Helper</class>
|
80 |
</events>
|
81 |
</global>
|
82 |
<frontend>
|
83 |
+
<layout>
|
84 |
+
<updates>
|
85 |
+
<bronto_order>
|
86 |
+
<file>bronto/order.xml</file>
|
87 |
+
</bronto_order>
|
88 |
+
</updates>
|
89 |
+
</layout>
|
90 |
<events>
|
91 |
<sales_quote_save_after>
|
92 |
<observers>
|
app/code/community/Bronto/Order/sql/bronto_order_setup/mysql4-upgrade-1.1.7-1.1.8.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* fall back to create table if existing modules already exists to support upgrade
|
4 |
+
*/
|
5 |
+
|
6 |
+
$installer = $this;
|
7 |
+
/* @var $installer Mage_Core_Model_Mysql4_Setup */
|
8 |
+
|
9 |
+
$installer->startSetup();
|
10 |
+
|
11 |
+
try {
|
12 |
+
// Update Table
|
13 |
+
$installer->run("
|
14 |
+
ALTER TABLE `{$this->getTable('bronto_order_queue')}` ADD COLUMN `bronto_suppressed` VARCHAR(255) NULL DEFAULT NULL;
|
15 |
+
");
|
16 |
+
} catch (Exception $e) {
|
17 |
+
throw new RuntimeException('Failed Modifying Table: ' . $e->getMessage());
|
18 |
+
}
|
19 |
+
|
20 |
+
$installer->endSetup();
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit.php
CHANGED
@@ -41,10 +41,18 @@ class Bronto_Reminder_Block_Adminhtml_Reminder_Edit extends Mage_Adminhtml_Block
|
|
41 |
if ($limit = Mage::helper('bronto_reminder')->getOneRunLimit()) {
|
42 |
$confirm .= ' ' . Mage::helper('bronto_reminder')->__('Up to %s customers may receive a reminder email after this action.', $limit);
|
43 |
}
|
44 |
-
|
45 |
-
|
46 |
-
'
|
47 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
$this->_addButton('save_and_continue_edit', array(
|
41 |
if ($limit = Mage::helper('bronto_reminder')->getOneRunLimit()) {
|
42 |
$confirm .= ' ' . Mage::helper('bronto_reminder')->__('Up to %s customers may receive a reminder email after this action.', $limit);
|
43 |
}
|
44 |
+
|
45 |
+
$sendButtonSettings = array(
|
46 |
+
'label' => Mage::helper('bronto_reminder')->__('Send Now')
|
47 |
+
);
|
48 |
+
|
49 |
+
if (!Mage::helper('bronto_reminder')->isAllowSend()) {
|
50 |
+
$sendButtonSettings['disabled'] = 'disabled';
|
51 |
+
} else {
|
52 |
+
$sendButtonSettings['onclick'] = "confirmSetLocation('{$confirm}', '{$this->getRunUrl()}')";
|
53 |
+
}
|
54 |
+
|
55 |
+
$this->_addButton('run_now', $sendButtonSettings, -1);
|
56 |
}
|
57 |
|
58 |
$this->_addButton('save_and_continue_edit', array(
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit/Tab/Customers.php
CHANGED
@@ -15,10 +15,9 @@ class Bronto_Reminder_Block_Adminhtml_Reminder_Edit_Tab_Customers extends Mage_A
|
|
15 |
parent::__construct();
|
16 |
$this->setId('customerGrid');
|
17 |
$this->setUseAjax(true);
|
18 |
-
$this->setDefaultSort('
|
19 |
-
$this->setDefaultDir('ASC');
|
20 |
-
|
21 |
-
//$this->setDefaultFilter(array('grid_is_active' => 1));
|
22 |
}
|
23 |
|
24 |
/**
|
15 |
parent::__construct();
|
16 |
$this->setId('customerGrid');
|
17 |
$this->setUseAjax(true);
|
18 |
+
$this->setDefaultSort('email');
|
19 |
+
$this->setDefaultDir('ASC');
|
20 |
+
$this->setDefaultFilter(array('grid_is_active' => 1));
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Edit/Tab/General.php
CHANGED
@@ -101,24 +101,24 @@ class Bronto_Reminder_Block_Adminhtml_Reminder_Edit_Tab_General extends Mage_Adm
|
|
101 |
'format' => $dateFormatIso
|
102 |
));
|
103 |
|
104 |
-
$subfieldset = $form->addFieldset('sub_fieldset', array(
|
105 |
-
'legend' => Mage::helper('bronto_reminder')->__('Repeat Schedule'),
|
106 |
-
'comment' => '
|
107 |
-
By default, a rule will only send a Reminder Email to a customer once.
|
108 |
-
To allow a rule to re-send a message (as long as the conditions still match) to a customer, you must configure the Repeat Schedule.
|
109 |
-
',
|
110 |
-
));
|
111 |
-
|
112 |
-
$subfieldset->addField('schedule', 'text', array(
|
113 |
-
'name' => 'schedule',
|
114 |
-
'label' => Mage::helper('bronto_reminder')->__('Schedule (Days)'),
|
115 |
-
'note' => '
|
116 |
-
Enter days, comma-separated.<br/>
|
117 |
-
<strong>Examples:</strong><br/>
|
118 |
-
"<span style="font-family:monospace">0</span>": Message to be sent again the same day.<br/>
|
119 |
-
"<span style="font-family:monospace">1</span>": Message to be sent again the next day.<br/>
|
120 |
-
',
|
121 |
-
));
|
122 |
|
123 |
$form->setValues($model->getData());
|
124 |
$this->setForm($form);
|
101 |
'format' => $dateFormatIso
|
102 |
));
|
103 |
|
104 |
+
// $subfieldset = $form->addFieldset('sub_fieldset', array(
|
105 |
+
// 'legend' => Mage::helper('bronto_reminder')->__('Repeat Schedule'),
|
106 |
+
// 'comment' => '
|
107 |
+
// By default, a rule will only send a Reminder Email to a customer once.
|
108 |
+
// To allow a rule to re-send a message (as long as the conditions still match) to a customer, you must configure the Repeat Schedule.
|
109 |
+
// ',
|
110 |
+
// ));
|
111 |
+
//
|
112 |
+
// $subfieldset->addField('schedule', 'text', array(
|
113 |
+
// 'name' => 'schedule',
|
114 |
+
// 'label' => Mage::helper('bronto_reminder')->__('Schedule (Days)'),
|
115 |
+
// 'note' => '
|
116 |
+
// In what number of days to repeat reminder email, if the rule condition still matches. Enter days, comma-separated.<br/>
|
117 |
+
// <strong>Examples:</strong><br/>
|
118 |
+
// "<span style="font-family:monospace">0</span>": Message to be sent again the same day.<br/>
|
119 |
+
// "<span style="font-family:monospace">1</span>": Message to be sent again the next day.<br/>
|
120 |
+
// ',
|
121 |
+
// ));
|
122 |
|
123 |
$form->setValues($model->getData());
|
124 |
$this->setForm($form);
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Reminder/Grid.php
CHANGED
@@ -13,6 +13,7 @@ class Bronto_Reminder_Block_Adminhtml_Reminder_Grid extends Mage_Adminhtml_Block
|
|
13 |
$this->setId('reminderGrid');
|
14 |
$this->setIdFieldName('rule_id');
|
15 |
$this->setDefaultSort('rule_id', 'asc');
|
|
|
16 |
}
|
17 |
|
18 |
protected function _prepareCollection()
|
13 |
$this->setId('reminderGrid');
|
14 |
$this->setIdFieldName('rule_id');
|
15 |
$this->setDefaultSort('rule_id', 'asc');
|
16 |
+
$this->setDefaultFilter('is_active', '1');
|
17 |
}
|
18 |
|
19 |
protected function _prepareCollection()
|
app/code/community/Bronto/Reminder/Block/Adminhtml/System/Config/Settings.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package Bronto\Reminder
|
5 |
+
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
+
* @version 1.5.0
|
7 |
+
*/
|
8 |
+
class Bronto_Reminder_Block_Adminhtml_System_Config_Settings
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Return header comment part of html for fieldset
|
13 |
+
*
|
14 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
protected function _getHeaderCommentHtml($element)
|
18 |
+
{
|
19 |
+
$url = Mage::helper('adminhtml')->getUrl('/reminders');
|
20 |
+
$element->setComment("Test Additional configuration located at: <strong>Promotions › <a href=\"{$url}\">Bronto Reminder Emails</a></strong><br/><br/>");
|
21 |
+
return parent::_getHeaderCommentHtml($element);
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Widget/Grid/Column/Renderer/Email.php
CHANGED
@@ -16,6 +16,6 @@ class Bronto_Reminder_Block_Adminhtml_Widget_Grid_Column_Renderer_Email extends
|
|
16 |
protected function _getValue(Varien_Object $row)
|
17 |
{
|
18 |
$customerEmail = $this->htmlEscape($row->getData($this->getColumn()->getIndex()));
|
19 |
-
return
|
20 |
}
|
21 |
}
|
16 |
protected function _getValue(Varien_Object $row)
|
17 |
{
|
18 |
$customerEmail = $this->htmlEscape($row->getData($this->getColumn()->getIndex()));
|
19 |
+
return $this->htmlEscape($customerEmail);
|
20 |
}
|
21 |
}
|
app/code/community/Bronto/Reminder/Block/Adminhtml/Widget/Grid/Column/Renderer/Id.php
CHANGED
@@ -16,6 +16,9 @@ class Bronto_Reminder_Block_Adminhtml_Widget_Grid_Column_Renderer_Id extends Mag
|
|
16 |
protected function _getValue(Varien_Object $row)
|
17 |
{
|
18 |
$customerId = $this->htmlEscape($row->getData($this->getColumn()->getIndex()));
|
|
|
|
|
|
|
19 |
return '<a href="' . Mage::getSingleton('adminhtml/url')->getUrl('*/customer/edit',
|
20 |
array('id' => $customerId)) . '">' . $customerId . '</a>';
|
21 |
}
|
16 |
protected function _getValue(Varien_Object $row)
|
17 |
{
|
18 |
$customerId = $this->htmlEscape($row->getData($this->getColumn()->getIndex()));
|
19 |
+
if (is_null($customerId)) {
|
20 |
+
return 'Guest';
|
21 |
+
}
|
22 |
return '<a href="' . Mage::getSingleton('adminhtml/url')->getUrl('*/customer/edit',
|
23 |
array('id' => $customerId)) . '">' . $customerId . '</a>';
|
24 |
}
|
app/code/community/Bronto/Reminder/Helper/Data.php
CHANGED
@@ -8,7 +8,11 @@
|
|
8 |
class Bronto_Reminder_Helper_Data extends Bronto_Common_Helper_Data implements Bronto_Common_Helper_DataInterface
|
9 |
{
|
10 |
const XML_PATH_ENABLED = 'bronto_reminder/settings/enabled';
|
|
|
|
|
11 |
const XML_PATH_INTERVAL = 'bronto_reminder/settings/interval';
|
|
|
|
|
12 |
const XML_PATH_SEND_LIMIT = 'bronto_reminder/settings/limit';
|
13 |
const XML_PATH_EMAIL_IDENTITY = 'bronto_reminder/settings/identity';
|
14 |
const XML_PATH_EMAIL_THRESHOLD = 'bronto_reminder/settings/threshold';
|
@@ -30,6 +34,28 @@ class Bronto_Reminder_Helper_Data extends Bronto_Common_Helper_Data implements B
|
|
30 |
{
|
31 |
return (bool) Mage::getStoreConfig(self::XML_PATH_ENABLED);
|
32 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
/**
|
35 |
* @param string $path
|
@@ -46,7 +72,28 @@ class Bronto_Reminder_Helper_Data extends Bronto_Common_Helper_Data implements B
|
|
46 |
*/
|
47 |
public function getCronInterval()
|
48 |
{
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
8 |
class Bronto_Reminder_Helper_Data extends Bronto_Common_Helper_Data implements Bronto_Common_Helper_DataInterface
|
9 |
{
|
10 |
const XML_PATH_ENABLED = 'bronto_reminder/settings/enabled';
|
11 |
+
const XML_PATH_ALLOW_SEND = 'bronto_reminder/settings/allow_send';
|
12 |
+
const XML_PATH_TIME = 'bronto_reminder/settings/time';
|
13 |
const XML_PATH_INTERVAL = 'bronto_reminder/settings/interval';
|
14 |
+
const XML_PATH_FREQUENCY = 'bronto_reminder/settings/frequency';
|
15 |
+
const XML_PATH_FREQUENCY_MIN = 'bronto_reminder/settings/minutes';
|
16 |
const XML_PATH_SEND_LIMIT = 'bronto_reminder/settings/limit';
|
17 |
const XML_PATH_EMAIL_IDENTITY = 'bronto_reminder/settings/identity';
|
18 |
const XML_PATH_EMAIL_THRESHOLD = 'bronto_reminder/settings/threshold';
|
34 |
{
|
35 |
return (bool) Mage::getStoreConfig(self::XML_PATH_ENABLED);
|
36 |
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @param null|string|bool|int|Mage_Core_Model_Store $store
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
public function isAllowSend($store = null)
|
43 |
+
{
|
44 |
+
return (bool) Mage::getStoreConfig(self::XML_PATH_ALLOW_SEND, $store);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Text to display when reminder module not allowed to send emails
|
49 |
+
* @return type
|
50 |
+
*/
|
51 |
+
public function getNotAllowedText()
|
52 |
+
{
|
53 |
+
$url = Mage::helper('adminhtml')->getUrl('/system_config/edit/section/bronto_reminder');
|
54 |
+
$messageText = $this->__('Rules are currently unable to send emails.
|
55 |
+
You can enable this function in the System Configuration <a href="' . $url . '">Reminder Emails</a>');
|
56 |
+
|
57 |
+
return $messageText;
|
58 |
+
}
|
59 |
|
60 |
/**
|
61 |
* @param string $path
|
72 |
*/
|
73 |
public function getCronInterval()
|
74 |
{
|
75 |
+
switch ($this->getCronFrequency()) {
|
76 |
+
case 'I':
|
77 |
+
return (int) Mage::getStoreConfig(self::XML_PATH_INTERVAL);
|
78 |
+
break;
|
79 |
+
case 'H':
|
80 |
+
return 60;
|
81 |
+
break;
|
82 |
+
case 'D':
|
83 |
+
return 1440;
|
84 |
+
break;
|
85 |
+
default:
|
86 |
+
return 5;
|
87 |
+
break;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
public function getCronFrequency()
|
95 |
+
{
|
96 |
+
return Mage::getStoreConfig(self::XML_PATH_FREQUENCY);
|
97 |
}
|
98 |
|
99 |
/**
|
app/code/community/Bronto/Reminder/Model/Condition/Abstract.php
CHANGED
@@ -38,9 +38,9 @@ class Bronto_Reminder_Model_Condition_Abstract extends Mage_Rule_Model_Condition
|
|
38 |
* @param string $fieldName
|
39 |
* @return string
|
40 |
*/
|
41 |
-
protected function _createCustomerFilter($
|
42 |
{
|
43 |
-
return "{$fieldName} = root.
|
44 |
}
|
45 |
|
46 |
/**
|
38 |
* @param string $fieldName
|
39 |
* @return string
|
40 |
*/
|
41 |
+
protected function _createCustomerFilter($fieldName)
|
42 |
{
|
43 |
+
return "{$fieldName} = root.customer_id";
|
44 |
}
|
45 |
|
46 |
/**
|
app/code/community/Bronto/Reminder/Model/Condition/Combine/Abstract.php
CHANGED
@@ -55,28 +55,27 @@ abstract class Bronto_Reminder_Model_Condition_Combine_Abstract extends Mage_Rul
|
|
55 |
/**
|
56 |
* Get filter by customer condition for rule matching sql
|
57 |
*
|
58 |
-
* @param int|Zend_Db_Expr $customer
|
59 |
* @param string $fieldName
|
60 |
* @return string
|
61 |
*/
|
62 |
-
protected function _createCustomerFilter($
|
63 |
{
|
64 |
-
return "{$fieldName} = root.
|
65 |
}
|
66 |
|
67 |
/**
|
68 |
* Build query for matching customer to rule condition
|
69 |
*
|
70 |
-
* @param $
|
71 |
* @param $website
|
72 |
* @return Varien_Db_Select
|
73 |
*/
|
74 |
-
protected function _prepareConditionsSql($
|
75 |
{
|
76 |
$select = $this->getResource()->createSelect();
|
77 |
$table = $this->getResource()->getTable('customer/entity');
|
78 |
$select->from($table, array(new Zend_Db_Expr(1)));
|
79 |
-
$select->where($this->_createCustomerFilter(
|
80 |
return $select;
|
81 |
}
|
82 |
|
@@ -93,16 +92,16 @@ abstract class Bronto_Reminder_Model_Condition_Combine_Abstract extends Mage_Rul
|
|
93 |
/**
|
94 |
* Get SQL select for matching customer to rule condition
|
95 |
*
|
96 |
-
* @param $
|
97 |
* @param $website
|
98 |
* @return Varien_Db_Select
|
99 |
*/
|
100 |
-
public function getConditionsSql($
|
101 |
{
|
102 |
/**
|
103 |
* Build base SQL
|
104 |
*/
|
105 |
-
$select = $this->_prepareConditionsSql($
|
106 |
$required = $this->_getRequiredValidation();
|
107 |
$whereFunction = ($this->getAggregator() == 'all') ? 'where' : 'orWhere';
|
108 |
$operator = $required ? '=' : '<>';
|
@@ -114,7 +113,7 @@ abstract class Bronto_Reminder_Model_Condition_Combine_Abstract extends Mage_Rul
|
|
114 |
* Add children subselects conditions
|
115 |
*/
|
116 |
foreach ($this->getConditions() as $condition) {
|
117 |
-
if ($sql = $condition->getConditionsSql($
|
118 |
$criteriaSql = "(IFNULL(($sql), 0) {$operator} 1)";
|
119 |
$select->$whereFunction($criteriaSql);
|
120 |
$gotConditions = true;
|
55 |
/**
|
56 |
* Get filter by customer condition for rule matching sql
|
57 |
*
|
|
|
58 |
* @param string $fieldName
|
59 |
* @return string
|
60 |
*/
|
61 |
+
protected function _createCustomerFilter($fieldName)
|
62 |
{
|
63 |
+
return "{$fieldName} = root.customer_id";
|
64 |
}
|
65 |
|
66 |
/**
|
67 |
* Build query for matching customer to rule condition
|
68 |
*
|
69 |
+
* @param $rule
|
70 |
* @param $website
|
71 |
* @return Varien_Db_Select
|
72 |
*/
|
73 |
+
protected function _prepareConditionsSql($rule, $website)
|
74 |
{
|
75 |
$select = $this->getResource()->createSelect();
|
76 |
$table = $this->getResource()->getTable('customer/entity');
|
77 |
$select->from($table, array(new Zend_Db_Expr(1)));
|
78 |
+
$select->where($this->_createCustomerFilter('entity_id'));
|
79 |
return $select;
|
80 |
}
|
81 |
|
92 |
/**
|
93 |
* Get SQL select for matching customer to rule condition
|
94 |
*
|
95 |
+
* @param $rule
|
96 |
* @param $website
|
97 |
* @return Varien_Db_Select
|
98 |
*/
|
99 |
+
public function getConditionsSql($rule, $website)
|
100 |
{
|
101 |
/**
|
102 |
* Build base SQL
|
103 |
*/
|
104 |
+
$select = $this->_prepareConditionsSql($rule, $website);
|
105 |
$required = $this->_getRequiredValidation();
|
106 |
$whereFunction = ($this->getAggregator() == 'all') ? 'where' : 'orWhere';
|
107 |
$operator = $required ? '=' : '<>';
|
113 |
* Add children subselects conditions
|
114 |
*/
|
115 |
foreach ($this->getConditions() as $condition) {
|
116 |
+
if ($sql = $condition->getConditionsSql($rule, $website)) {
|
117 |
$criteriaSql = "(IFNULL(($sql), 0) {$operator} 1)";
|
118 |
$select->$whereFunction($criteriaSql);
|
119 |
$gotConditions = true;
|
app/code/community/Bronto/Reminder/Model/Guest.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @package Bronto\Reminder
|
5 |
-
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
-
* @version 1.5.0
|
7 |
-
*/
|
8 |
-
class Bronto_Reminder_Model_Guest extends Mage_Core_Model_Abstract
|
9 |
-
{
|
10 |
-
public function _construct()
|
11 |
-
{
|
12 |
-
parent::_construct();
|
13 |
-
$this->_init('bronto_reminder/guest');
|
14 |
-
}
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Bronto/Reminder/Model/Mysql4/Customer/Collection.php
CHANGED
@@ -20,6 +20,9 @@ class Bronto_Reminder_Model_Mysql4_Customer_Collection extends Mage_Customer_Mod
|
|
20 |
$customerTable = $this->getTable('customer/entity');
|
21 |
$couponTable = $this->getTable('bronto_reminder/coupon');
|
22 |
$logTable = $this->getTable('bronto_reminder/log');
|
|
|
|
|
|
|
23 |
|
24 |
try {
|
25 |
$salesRuleCouponTable = $this->getTable('salesrule/coupon');
|
@@ -27,29 +30,44 @@ class Bronto_Reminder_Model_Mysql4_Customer_Collection extends Mage_Customer_Mod
|
|
27 |
$salesRuleCouponTable = false;
|
28 |
}
|
29 |
|
30 |
-
$select->from(array('c' => $couponTable), array('associated_at', 'emails_failed', 'is_active'));
|
31 |
$select->where('c.rule_id = ?', $rule->getId());
|
32 |
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
array('e' => $customerTable),
|
35 |
'e.entity_id = c.customer_id',
|
36 |
-
array(
|
|
|
|
|
|
|
37 |
);
|
38 |
|
39 |
$subSelect = $this->getConnection()->select();
|
40 |
$subSelect->from(array('g' => $logTable), array(
|
41 |
-
'
|
42 |
'rule_id',
|
43 |
'emails_sent' => new Zend_Db_Expr('COUNT(log_id)'),
|
44 |
'last_sent' => new Zend_Db_Expr('MAX(sent_at)')
|
45 |
));
|
46 |
|
47 |
$subSelect->where('rule_id = ?', $rule->getId());
|
48 |
-
$subSelect->group(array('
|
49 |
|
50 |
$select->joinLeft(
|
51 |
array('l' => $subSelect),
|
52 |
-
'l.rule_id = c.rule_id AND l.
|
53 |
array('l.emails_sent', 'l.last_sent')
|
54 |
);
|
55 |
|
20 |
$customerTable = $this->getTable('customer/entity');
|
21 |
$couponTable = $this->getTable('bronto_reminder/coupon');
|
22 |
$logTable = $this->getTable('bronto_reminder/log');
|
23 |
+
// Used for gathering guest data
|
24 |
+
$quoteTable = $this->getResource()->getTable('sales/quote');
|
25 |
+
$logQuoteTable = Mage::getResourceSingleton('log/log')->getTable('log/quote_table');
|
26 |
|
27 |
try {
|
28 |
$salesRuleCouponTable = $this->getTable('salesrule/coupon');
|
30 |
$salesRuleCouponTable = false;
|
31 |
}
|
32 |
|
33 |
+
$select->from(array('c' => $couponTable), array('store_id', 'unique_id', 'customer_id', 'visitor_id', 'associated_at', 'emails_failed', 'is_active'));
|
34 |
$select->where('c.rule_id = ?', $rule->getId());
|
35 |
|
36 |
+
// Select Guest Data
|
37 |
+
$guestSelect = $this->getConnection()->select();
|
38 |
+
$guestSelect->from(
|
39 |
+
array('q' => $quoteTable),
|
40 |
+
array('email' => 'q.customer_email')
|
41 |
+
)->where('lq.visitor_id = c.visitor_id');
|
42 |
+
$guestSelect->joinInner(
|
43 |
+
array('lq' => $logQuoteTable),
|
44 |
+
'q.entity_id = lq.quote_id',
|
45 |
+
array()
|
46 |
+
);
|
47 |
+
|
48 |
+
$select->joinLeft(
|
49 |
array('e' => $customerTable),
|
50 |
'e.entity_id = c.customer_id',
|
51 |
+
array(
|
52 |
+
'entity_id',
|
53 |
+
'email' => new Zend_Db_Expr("IF(e.email IS NULL, ($guestSelect), e.email)")
|
54 |
+
)
|
55 |
);
|
56 |
|
57 |
$subSelect = $this->getConnection()->select();
|
58 |
$subSelect->from(array('g' => $logTable), array(
|
59 |
+
'unique_id',
|
60 |
'rule_id',
|
61 |
'emails_sent' => new Zend_Db_Expr('COUNT(log_id)'),
|
62 |
'last_sent' => new Zend_Db_Expr('MAX(sent_at)')
|
63 |
));
|
64 |
|
65 |
$subSelect->where('rule_id = ?', $rule->getId());
|
66 |
+
$subSelect->group(array('unique_id', 'rule_id'));
|
67 |
|
68 |
$select->joinLeft(
|
69 |
array('l' => $subSelect),
|
70 |
+
'l.rule_id = c.rule_id AND l.unique_id = c.unique_id',
|
71 |
array('l.emails_sent', 'l.last_sent')
|
72 |
);
|
73 |
|
app/code/community/Bronto/Reminder/Model/Mysql4/Guest.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @package Bronto\Reminder
|
5 |
-
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
-
* @version 1.5.0
|
7 |
-
*/
|
8 |
-
class Bronto_Reminder_Model_Mysql4_Guest extends Mage_Core_Model_Mysql4_Abstract
|
9 |
-
{
|
10 |
-
public function _construct()
|
11 |
-
{
|
12 |
-
$this->_init('bronto_reminder/guest', 'guest_email_id');
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Bronto/Reminder/Model/Mysql4/Guest/Collection.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* @package Bronto\Reminder
|
5 |
-
* @copyright 2011-2012 Bronto Software, Inc.
|
6 |
-
* @version 1.5.0
|
7 |
-
*/
|
8 |
-
class Bronto_Reminder_Model_Mysql4_Guest_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
9 |
-
{
|
10 |
-
public function _construct()
|
11 |
-
{
|
12 |
-
parent::_construct();
|
13 |
-
$this->_init('bronto_reminder/guest');
|
14 |
-
}
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Bronto/Reminder/Model/Mysql4/Rule.php
CHANGED
@@ -201,17 +201,23 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
201 |
|
202 |
/**
|
203 |
* @param int $ruleId
|
|
|
204 |
* @param int $customerId
|
205 |
* @param string $messageId
|
206 |
* @return array
|
207 |
*/
|
208 |
-
public function getRuleLogItemsData($ruleId, $customerId, $messageId = null)
|
209 |
{
|
|
|
210 |
$logTable = $this->getTable('bronto_reminder/log');
|
211 |
|
212 |
$select = $this->createSelect()->from(array('l' => $logTable));
|
|
|
|
|
|
|
|
|
|
|
213 |
$select->where('l.rule_id = ?', $ruleId);
|
214 |
-
$select->where('l.customer_id = ?', $customerId);
|
215 |
if (!empty($messageId)) {
|
216 |
$select->where('l.bronto_message_id = ?', $messageId);
|
217 |
}
|
@@ -311,14 +317,12 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
311 |
*/
|
312 |
public function saveMatchedCustomers($rule, $salesRule, $websiteId, $threshold=null)
|
313 |
{
|
314 |
-
|
315 |
-
// $rule->setConditions(null);
|
316 |
-
// $rule->afterLoad();
|
317 |
-
$select = $rule->getConditions()->getConditionsSql(null, $websiteId);
|
318 |
|
319 |
if (!$rule->getConditionSql()) {
|
320 |
return $this;
|
321 |
}
|
|
|
322 |
if ($threshold) {
|
323 |
$select->where('c.emails_failed IS NULL OR c.emails_failed < ? ', $threshold);
|
324 |
}
|
@@ -330,9 +334,10 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
330 |
$dataToInsert = array();
|
331 |
Mage::helper('bronto_reminder')->writeDebug('ruleId: ' . $rule->getId() . ' website: ' . $websiteId, 'bronto_reminder_sql.log');
|
332 |
Mage::helper('bronto_reminder')->writeDebug($select->__toString(), 'bronto_reminder_sql.log');
|
|
|
333 |
/* @var $stmt Varien_Db_Statement_Pdo_Mysql */
|
334 |
$stmt = $adapter->query($select, array('rule_id' => $ruleId));
|
335 |
-
|
336 |
Mage::helper('bronto_reminder')->writeDebug('saveMatchedCustomers():', 'bronto_reminder_sql.log');
|
337 |
|
338 |
try {
|
@@ -349,7 +354,12 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
349 |
$dataToInsert[] = array(
|
350 |
'rule_id' => $ruleId,
|
351 |
'coupon_id' => $couponId,
|
352 |
-
'
|
|
|
|
|
|
|
|
|
|
|
353 |
'associated_at' => $currentDate,
|
354 |
'is_active' => '1'
|
355 |
);
|
@@ -362,6 +372,7 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
362 |
$dataToInsert = array();
|
363 |
}
|
364 |
}
|
|
|
365 |
$this->_saveMatchedCustomerData($dataToInsert);
|
366 |
$adapter->commit();
|
367 |
} catch (Exception $e) {
|
@@ -402,7 +413,7 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
402 |
|
403 |
$select = $this->createSelect()->from(
|
404 |
array('c' => $couponTable),
|
405 |
-
array('
|
406 |
);
|
407 |
|
408 |
$select->join(
|
@@ -413,7 +424,7 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
413 |
|
414 |
$select->joinLeft(
|
415 |
array('l' => $logTable),
|
416 |
-
'c.rule_id=l.rule_id AND c.
|
417 |
array()
|
418 |
);
|
419 |
|
@@ -422,7 +433,7 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
422 |
}
|
423 |
|
424 |
$select->where('c.is_active = 1');
|
425 |
-
$select->group(array('c.
|
426 |
$select->having("(MAX(l.sent_at) IS NULL) OR (FIND_IN_SET(TO_DAYS('{$currentDate}') - TO_DAYS(MIN(l.sent_at)), r.schedule))");
|
427 |
|
428 |
if ($limit) {
|
@@ -452,11 +463,11 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
452 |
* @param int $customerId
|
453 |
* @return Bronto_Reminder_Model_Mysql4_Rule
|
454 |
*/
|
455 |
-
public function addNotificationLog($ruleId, $
|
456 |
{
|
457 |
$data = array(
|
458 |
'rule_id' => $ruleId,
|
459 |
-
'
|
460 |
'sent_at' => $this->formatDate(time()),
|
461 |
'bronto_delivery_id' => $deliveryId,
|
462 |
'bronto_message_id' => $messageId,
|
@@ -497,4 +508,20 @@ class Bronto_Reminder_Model_Mysql4_Rule extends Mage_Core_Model_Mysql4_Abstract
|
|
497 |
$select->where('r.salesrule_id = ?', $salesruleId);
|
498 |
return $this->_getReadAdapter()->fetchOne($select);
|
499 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
}
|
201 |
|
202 |
/**
|
203 |
* @param int $ruleId
|
204 |
+
* @param int $storeId
|
205 |
* @param int $customerId
|
206 |
* @param string $messageId
|
207 |
* @return array
|
208 |
*/
|
209 |
+
public function getRuleLogItemsData($ruleId, $storeId, $customerId, $messageId = null)
|
210 |
{
|
211 |
+
$couponTable = $this->getTable('bronto_reminder/coupon');
|
212 |
$logTable = $this->getTable('bronto_reminder/log');
|
213 |
|
214 |
$select = $this->createSelect()->from(array('l' => $logTable));
|
215 |
+
$select->joinInner(
|
216 |
+
array('c' => $couponTable),
|
217 |
+
"c.rule_id = {$ruleId} AND c.store_id = {$storeId} AND c.customer_id = {$customerId} AND c.unique_id = l.unique_id",
|
218 |
+
array()
|
219 |
+
);
|
220 |
$select->where('l.rule_id = ?', $ruleId);
|
|
|
221 |
if (!empty($messageId)) {
|
222 |
$select->where('l.bronto_message_id = ?', $messageId);
|
223 |
}
|
317 |
*/
|
318 |
public function saveMatchedCustomers($rule, $salesRule, $websiteId, $threshold=null)
|
319 |
{
|
320 |
+
$select = $rule->getConditions()->getConditionsSql($rule, $websiteId);
|
|
|
|
|
|
|
321 |
|
322 |
if (!$rule->getConditionSql()) {
|
323 |
return $this;
|
324 |
}
|
325 |
+
|
326 |
if ($threshold) {
|
327 |
$select->where('c.emails_failed IS NULL OR c.emails_failed < ? ', $threshold);
|
328 |
}
|
334 |
$dataToInsert = array();
|
335 |
Mage::helper('bronto_reminder')->writeDebug('ruleId: ' . $rule->getId() . ' website: ' . $websiteId, 'bronto_reminder_sql.log');
|
336 |
Mage::helper('bronto_reminder')->writeDebug($select->__toString(), 'bronto_reminder_sql.log');
|
337 |
+
|
338 |
/* @var $stmt Varien_Db_Statement_Pdo_Mysql */
|
339 |
$stmt = $adapter->query($select, array('rule_id' => $ruleId));
|
340 |
+
|
341 |
Mage::helper('bronto_reminder')->writeDebug('saveMatchedCustomers():', 'bronto_reminder_sql.log');
|
342 |
|
343 |
try {
|
354 |
$dataToInsert[] = array(
|
355 |
'rule_id' => $ruleId,
|
356 |
'coupon_id' => $couponId,
|
357 |
+
'unique_id' => $row['unique_id'],
|
358 |
+
'store_id' => $row['store_id'],
|
359 |
+
'customer_id' => $row['customer_id'],
|
360 |
+
'quote_id' => $row['quote_id'],
|
361 |
+
'wishlist_id' => $row['wishlist_id'],
|
362 |
+
'visitor_id' => $row['visitor_id'],
|
363 |
'associated_at' => $currentDate,
|
364 |
'is_active' => '1'
|
365 |
);
|
372 |
$dataToInsert = array();
|
373 |
}
|
374 |
}
|
375 |
+
|
376 |
$this->_saveMatchedCustomerData($dataToInsert);
|
377 |
$adapter->commit();
|
378 |
} catch (Exception $e) {
|
413 |
|
414 |
$select = $this->createSelect()->from(
|
415 |
array('c' => $couponTable),
|
416 |
+
array('rule_id', 'coupon_id', 'unique_id', 'store_id', 'customer_id', 'quote_id', 'wishlist_id', 'visitor_id')
|
417 |
);
|
418 |
|
419 |
$select->join(
|
424 |
|
425 |
$select->joinLeft(
|
426 |
array('l' => $logTable),
|
427 |
+
'c.rule_id=l.rule_id AND c.unique_id=l.unique_id',
|
428 |
array()
|
429 |
);
|
430 |
|
433 |
}
|
434 |
|
435 |
$select->where('c.is_active = 1');
|
436 |
+
$select->group(array('c.unique_id', 'c.rule_id'));
|
437 |
$select->having("(MAX(l.sent_at) IS NULL) OR (FIND_IN_SET(TO_DAYS('{$currentDate}') - TO_DAYS(MIN(l.sent_at)), r.schedule))");
|
438 |
|
439 |
if ($limit) {
|
463 |
* @param int $customerId
|
464 |
* @return Bronto_Reminder_Model_Mysql4_Rule
|
465 |
*/
|
466 |
+
public function addNotificationLog($ruleId, $uniqueId, $deliveryId = null, $messageId = null)
|
467 |
{
|
468 |
$data = array(
|
469 |
'rule_id' => $ruleId,
|
470 |
+
'unique_id' => $uniqueId,
|
471 |
'sent_at' => $this->formatDate(time()),
|
472 |
'bronto_delivery_id' => $deliveryId,
|
473 |
'bronto_message_id' => $messageId,
|
508 |
$select->where('r.salesrule_id = ?', $salesruleId);
|
509 |
return $this->_getReadAdapter()->fetchOne($select);
|
510 |
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Remove row from coupon table by column, value and store_id
|
514 |
+
*
|
515 |
+
* @param type $column
|
516 |
+
* @param type $value
|
517 |
+
* @param type $storeId
|
518 |
+
* @return Bronto_Reminder_Model_Mysql4_Rule
|
519 |
+
*/
|
520 |
+
public function removeFromReminders($column, $value, $storeId)
|
521 |
+
{
|
522 |
+
$where = "$column = $value AND store_id = $storeId";
|
523 |
+
$this->_getWriteAdapter()->delete($this->getTable('bronto_reminder/coupon'), $where);
|
524 |
+
|
525 |
+
return $this;
|
526 |
+
}
|
527 |
}
|
app/code/community/Bronto/Reminder/Model/Observer.php
CHANGED
@@ -78,50 +78,43 @@ class Bronto_Reminder_Model_Observer
|
|
78 |
}
|
79 |
Mage::helper('bronto_reminder')->writeDebug('Done!');
|
80 |
}
|
81 |
-
|
82 |
/**
|
83 |
-
*
|
|
|
|
|
|
|
|
|
84 |
*/
|
85 |
-
public function
|
86 |
{
|
87 |
-
$
|
88 |
-
$
|
89 |
-
|
90 |
-
|
91 |
-
) {
|
92 |
-
$
|
93 |
-
$
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$guestModel = Mage::getModel('bronto_reminder/guest');
|
99 |
-
$guestModel->setEmailAddress($quote->getCustomerEmail())
|
100 |
-
->setFirstname($quote->getCustomerFirstname())
|
101 |
-
->setLastname($quote->getCustomerLastname())
|
102 |
-
->setSessionId($session->getSessionId())
|
103 |
-
->setStoreId(Mage::app()->getStore()->getStoreId())
|
104 |
-
->setQuoteId(Mage::getSingleton('checkout/session')->getQuote()->getId())
|
105 |
-
->save();
|
106 |
}
|
107 |
-
}
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
public function guestCheckoutCompleted(Varien_Event_Observer $observer)
|
114 |
-
{
|
115 |
-
if (!Mage::helper('customer')->isLoggedIn()) {
|
116 |
-
// Remove this guest from the extended table
|
117 |
-
// so that they do not get reminder emails
|
118 |
-
$guests = Mage::getModel('bronto_reminder/guest')
|
119 |
-
->getCollection()
|
120 |
-
->addFieldToFilter('session_id', session_id());
|
121 |
-
|
122 |
-
foreach ($guests as $guest) {
|
123 |
-
$guest->delete();
|
124 |
}
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
}
|
78 |
}
|
79 |
Mage::helper('bronto_reminder')->writeDebug('Done!');
|
80 |
}
|
81 |
+
|
82 |
/**
|
83 |
+
* If a Quote/Wishlist becomes inactive/deleted/checked-out/converted,
|
84 |
+
* remove from bronto_reminder_rule_coupon
|
85 |
+
*
|
86 |
+
* @param Varien_Event_Observer $observer
|
87 |
+
* @return Varien_Event_Observer
|
88 |
*/
|
89 |
+
public function updateReminderQueue(Varien_Event_Observer $observer)
|
90 |
{
|
91 |
+
$object = $observer->getEvent()->getDataObject();
|
92 |
+
$filterField = false;
|
93 |
+
$filterValue = false;
|
94 |
+
|
95 |
+
if ($object instanceof Mage_Wishlist_Model_Wishlist) {
|
96 |
+
$wishlist = $object;
|
97 |
+
$collection = $wishlist->getItemCollection();
|
98 |
+
|
99 |
+
if (0 === $collection->count()) {
|
100 |
+
$filterField = 'wishlist_id';
|
101 |
+
$filterValue = $wishlist->getId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
+
} elseif ($object instanceof Mage_Sales_Model_Quote) {
|
104 |
+
$quote = $object;
|
105 |
+
|
106 |
+
if (0 === $quote->getIsActive() || 0 === $quote->getItemsCount()) {
|
107 |
+
$filterField = 'quote_id';
|
108 |
+
$filterValue = $quote->getId();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
}
|
111 |
+
|
112 |
+
if ($filterField && $filterValue) {
|
113 |
+
// Quote is not active, so remove from queue if exists
|
114 |
+
Mage::getModel('bronto_reminder/rule')
|
115 |
+
->removeFromReminders($filterField, $filterValue, Mage::app()->getStore()->getId());
|
116 |
+
}
|
117 |
+
|
118 |
+
return $observer;
|
119 |
}
|
120 |
}
|
app/code/community/Bronto/Reminder/Model/Rule.php
CHANGED
@@ -97,22 +97,6 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
97 |
return $this->_getData('website_ids');
|
98 |
}
|
99 |
|
100 |
-
/**
|
101 |
-
* Get Store Object for customer
|
102 |
-
* @param Mage_Customer_Model_Customer $customer
|
103 |
-
* @return Mage_Core_Model_Store
|
104 |
-
*/
|
105 |
-
protected function _getRuleStore(Mage_Customer_Model_Customer $customer)
|
106 |
-
{
|
107 |
-
if ($customer->getStoreId()) {
|
108 |
-
$store = $customer->getStore();
|
109 |
-
} else {
|
110 |
-
$store = Mage::app()->getWebsite($customer->getWebsiteId())->getDefaultStore();
|
111 |
-
}
|
112 |
-
|
113 |
-
return $store;
|
114 |
-
}
|
115 |
-
|
116 |
/**
|
117 |
* Get array of Registered User abandons and then Guest abandons
|
118 |
* @param int $limit
|
@@ -121,44 +105,29 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
121 |
protected function _getRecipients($limit)
|
122 |
{
|
123 |
// Pull in array of customers who abandoned their cart
|
124 |
-
|
125 |
-
|
126 |
-
// Check how many more we are allowed to pull
|
127 |
-
$remainingLimit = $limit - count($recipients);
|
128 |
-
|
129 |
-
// Pull remining available number from guest abandons
|
130 |
-
if ($remainingLimit > 0 && $remainingLimit <= $limit) {
|
131 |
-
$guestAbandons = (array) $this->_getGuestAbandons($remainingLimit);
|
132 |
-
$recipients = array_merge($recipients, $guestAbandons);
|
133 |
-
}
|
134 |
-
|
135 |
-
// Ensure we aren't pulling more than the limit
|
136 |
-
if (count($recipients) > $limit) {
|
137 |
-
$recipients = array_slice($recipients, $limit);
|
138 |
-
}
|
139 |
-
|
140 |
-
return $recipients;
|
141 |
}
|
142 |
|
143 |
/**
|
144 |
* Get customer object for recipient
|
145 |
* @param array $recipient
|
|
|
146 |
* @return boolean|Mage_Customer_Model_Customer
|
147 |
*/
|
148 |
-
protected function _getRecipientCustomer($recipient)
|
149 |
{
|
150 |
if($recipient['customer_id'] != 0) {
|
151 |
/* @var $customer Mage_Customer_Model_Customer */
|
152 |
$customer = Mage::getModel('customer/customer')->load($recipient['customer_id']);
|
153 |
-
}
|
154 |
// Guest Abandon. Create Customer on the fly
|
155 |
-
$storeId = $recipient['
|
156 |
$customer = Mage::getModel('customer/customer')
|
157 |
-
->setFirstName($
|
158 |
-
->setLastName($
|
159 |
-
->setEmail($
|
160 |
->setStoreId($storeId)
|
161 |
-
->setId(
|
162 |
->setWebsiteId(Mage::getModel('core/store')->load($storeId)->getWebsiteId());
|
163 |
}
|
164 |
|
@@ -168,29 +137,6 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
168 |
|
169 |
return $customer;
|
170 |
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Get Quote Object from customer or guest
|
174 |
-
* @param Mage_Customer_Model_Customer $customer
|
175 |
-
* @param array $recipient
|
176 |
-
* @param Mage_Core_Model_Store $store
|
177 |
-
* @return Mage_Sales_Model_Quote
|
178 |
-
*/
|
179 |
-
protected function _getRecipientQuote(Mage_Customer_Model_Customer $customer, array $recipient, Mage_Core_Model_Store $store)
|
180 |
-
{
|
181 |
-
if($customer->getId() != 0) {
|
182 |
-
$quote = Mage::getModel('sales/quote')
|
183 |
-
->setStoreId($store->getId())
|
184 |
-
->loadByCustomer($customer->getId());
|
185 |
-
} else {
|
186 |
-
// Load quote stored for guest
|
187 |
-
$quote = Mage::getModel('sales/quote')
|
188 |
-
->setStoreId($store->getId())
|
189 |
-
->loadByIdWithoutStore($recipient['guest']->getQuoteId());
|
190 |
-
}
|
191 |
-
|
192 |
-
return $quote;
|
193 |
-
}
|
194 |
|
195 |
/**
|
196 |
* Send reminder emails
|
@@ -200,11 +146,16 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
200 |
*/
|
201 |
public function sendReminderEmails($dontSend = false)
|
202 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/* @var $mail Bronto_Reminder_Model_Email_Message */
|
204 |
-
$mail
|
205 |
-
$limit
|
206 |
-
$identity
|
207 |
-
|
208 |
$this->_matchCustomers();
|
209 |
|
210 |
if ($dontSend) {
|
@@ -220,17 +171,47 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
220 |
foreach ($recipients as $recipient) {
|
221 |
$total++;
|
222 |
|
223 |
-
|
224 |
-
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
$error++;
|
|
|
227 |
}
|
228 |
|
229 |
-
//
|
230 |
-
|
231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
|
233 |
-
$messageData = $this->getMessageData($recipient['rule_id'], $store->getId(), $
|
234 |
if (!$messageData) {
|
235 |
Mage::helper('bronto_reminder')->writeInfo("Rule doesn't have an associated Bronto message.");
|
236 |
$error++;
|
@@ -241,11 +222,8 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
241 |
if (class_exists('Mage_SalesRule_Model_Coupon', false)) {
|
242 |
/* @var $coupon Mage_SalesRule_Model_Coupon */
|
243 |
$coupon = Mage::getModel('salesrule/coupon')->load($recipient['coupon_id']);
|
244 |
-
}
|
245 |
-
|
246 |
-
/* @var $quote Mage_Sales_Model_Quote */
|
247 |
-
$quote = $this->_getRecipientQuote($customer, $recipient, $store);
|
248 |
-
|
249 |
$templateVars = array(
|
250 |
'store' => $store,
|
251 |
'customer' => $customer,
|
@@ -253,13 +231,20 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
253 |
'promotion_description' => $messageData['description'],
|
254 |
'coupon' => $coupon,
|
255 |
'rule' => $this,
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
Mage::helper('bronto_reminder')->writeDebug('Sending message to: ' . $customer->getEmail());
|
260 |
|
261 |
try {
|
262 |
-
$message = Mage::helper('bronto_reminder/message')->getMessageById($messageData['message_id'], $store->getId(), $
|
263 |
|
264 |
$mail->sendTransactional(
|
265 |
$message,
|
@@ -278,13 +263,8 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
278 |
Mage::helper('bronto_reminder')->writeDebug(' Success');
|
279 |
|
280 |
$this->_getResource()->addNotificationLog(
|
281 |
-
$recipient['rule_id'], $
|
282 |
);
|
283 |
-
|
284 |
-
if($customer->getId() == 0) {
|
285 |
-
// Update guest to reflect they have received a reminder notification
|
286 |
-
$recipient['guest']->setEmailSent(1)->save();
|
287 |
-
}
|
288 |
|
289 |
$success++;
|
290 |
} else {
|
@@ -365,80 +345,29 @@ class Bronto_Reminder_Model_Rule extends Mage_Rule_Model_Rule
|
|
365 |
|
366 |
/**
|
367 |
* @param int $ruleId
|
|
|
368 |
* @param int $customerId
|
369 |
* @param string $messageId
|
370 |
* @return boolean|array
|
371 |
*/
|
372 |
-
public function getRuleLogItems($ruleId, $customerId, $messageId = null)
|
373 |
{
|
374 |
-
if ($data = $this->_getResource()->getRuleLogItemsData($ruleId, $customerId, $messageId)) {
|
375 |
return $data;
|
376 |
}
|
377 |
return false;
|
378 |
}
|
379 |
-
|
380 |
/**
|
381 |
-
*
|
382 |
-
*
|
383 |
-
* @param
|
384 |
-
* @
|
|
|
|
|
385 |
*/
|
386 |
-
|
387 |
{
|
388 |
-
$
|
389 |
-
->getCollection()
|
390 |
-
->addFieldToFilter('email_sent', array('eq' => 0))
|
391 |
-
->setPageSize($limit);
|
392 |
-
|
393 |
-
$retVal = array();
|
394 |
-
$ruleId = null;
|
395 |
-
$couponId = null;
|
396 |
-
$schedule = null;
|
397 |
-
|
398 |
-
$currentDate = Mage::getModel('core/date')->date('Y-m-d');
|
399 |
-
|
400 |
-
$rules = $this->getCollection()->addDateFilter($currentDate)
|
401 |
-
->addIsActiveFilter(1);
|
402 |
-
|
403 |
-
if ($ruleId = $this->getRuleId()) {
|
404 |
-
$rules->addRuleFilter($ruleId);
|
405 |
-
}
|
406 |
-
|
407 |
-
foreach($guestAbandons as $guest) {
|
408 |
-
foreach ($rules as $rule) {
|
409 |
-
$this->_getResource()->deactivateMatchedCustomers($rule->getId());
|
410 |
-
|
411 |
-
if ($rule->getSalesruleId()) {
|
412 |
-
/* @var $salesRule Mage_SalesRule_Model_Rule */
|
413 |
-
$salesRule = Mage::getSingleton('salesrule/rule')->load($rule->getSalesruleId());
|
414 |
-
$websiteIds = array_intersect($rule->getWebsiteIds(), $salesRule->getWebsiteIds());
|
415 |
-
$coupon = $salesRule->acquireCoupon();
|
416 |
-
$couponId = ($coupon !== null) ? $coupon->getId() : null;
|
417 |
-
} else {
|
418 |
-
$salesRule = null;
|
419 |
-
$websiteIds = $rule->getWebsiteIds();
|
420 |
-
}
|
421 |
-
|
422 |
-
$rule->setConditions(null);
|
423 |
-
$rule->afterLoad();
|
424 |
-
|
425 |
-
foreach ($websiteIds as $websiteId) {
|
426 |
-
// Saving matched guests
|
427 |
-
$retVal[] = array(
|
428 |
-
'customer_id' => 0,
|
429 |
-
'rule_id' => $rule->getId(),
|
430 |
-
'coupon_id' => $couponId,
|
431 |
-
'schedule' => $schedule,
|
432 |
-
// Additional index for guest abandons used to create the
|
433 |
-
// Magento Customer object when sending reminder emails
|
434 |
-
'guest' => $guest,
|
435 |
-
);
|
436 |
-
}
|
437 |
-
|
438 |
-
$couponId = null;
|
439 |
-
}
|
440 |
-
}
|
441 |
-
|
442 |
-
return $retVal;
|
443 |
}
|
444 |
}
|
97 |
return $this->_getData('website_ids');
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
/**
|
101 |
* Get array of Registered User abandons and then Guest abandons
|
102 |
* @param int $limit
|
105 |
protected function _getRecipients($limit)
|
106 |
{
|
107 |
// Pull in array of customers who abandoned their cart
|
108 |
+
return (array) $this->_getResource()->getCustomersForNotification($limit, $this->getRuleId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
/**
|
112 |
* Get customer object for recipient
|
113 |
* @param array $recipient
|
114 |
+
* @param Mage_Sales_Model_Quote $quote
|
115 |
* @return boolean|Mage_Customer_Model_Customer
|
116 |
*/
|
117 |
+
protected function _getRecipientCustomer(array $recipient, $quote)
|
118 |
{
|
119 |
if($recipient['customer_id'] != 0) {
|
120 |
/* @var $customer Mage_Customer_Model_Customer */
|
121 |
$customer = Mage::getModel('customer/customer')->load($recipient['customer_id']);
|
122 |
+
} elseif ($quote) {
|
123 |
// Guest Abandon. Create Customer on the fly
|
124 |
+
$storeId = $recipient['store_id'];
|
125 |
$customer = Mage::getModel('customer/customer')
|
126 |
+
->setFirstName($quote->getCustomerFirstname())
|
127 |
+
->setLastName($quote->getCustomerLastname())
|
128 |
+
->setEmail($quote->getCustomerEmail())
|
129 |
->setStoreId($storeId)
|
130 |
+
->setId($recipient['customer_id'])
|
131 |
->setWebsiteId(Mage::getModel('core/store')->load($storeId)->getWebsiteId());
|
132 |
}
|
133 |
|
137 |
|
138 |
return $customer;
|
139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
/**
|
142 |
* Send reminder emails
|
146 |
*/
|
147 |
public function sendReminderEmails($dontSend = false)
|
148 |
{
|
149 |
+
// If we aren't matching and we aren't allow to send emails, say so
|
150 |
+
if (!$dontSend && !Mage::helper('bronto_reminder')->isAllowSend()) {
|
151 |
+
Mage::helper('bronto_reminder')->writeInfo(Mage::helper('bronto_reminder')->getNotAllowedText());
|
152 |
+
return $this;
|
153 |
+
}
|
154 |
+
|
155 |
/* @var $mail Bronto_Reminder_Model_Email_Message */
|
156 |
+
$mail = Mage::getModel('bronto_reminder/email_message');
|
157 |
+
$limit = Mage::helper('bronto_reminder')->getOneRunLimit();
|
158 |
+
$identity = Mage::helper('bronto_reminder')->getEmailIdentity();
|
|
|
159 |
$this->_matchCustomers();
|
160 |
|
161 |
if ($dontSend) {
|
171 |
foreach ($recipients as $recipient) {
|
172 |
$total++;
|
173 |
|
174 |
+
$quote = false;
|
175 |
+
$wishlist = false;
|
176 |
+
|
177 |
+
// Load Store
|
178 |
+
/* @var $store Mage_Core_Model_Store */
|
179 |
+
$store = Mage::getModel('core/store')->load($recipient['store_id']);
|
180 |
+
|
181 |
+
// If Sending not allowed for this store
|
182 |
+
if (!Mage::helper('bronto_reminder')->isAllowSend($store)) {
|
183 |
$error++;
|
184 |
+
continue;
|
185 |
}
|
186 |
|
187 |
+
// Load Quote
|
188 |
+
if ($recipient['quote_id'] > 0) {
|
189 |
+
/* @var $quote Mage_Sales_Model_Quote */
|
190 |
+
$quote = Mage::getModel('sales/quote')
|
191 |
+
->setStoreId($store->getId())
|
192 |
+
->loadByIdWithoutStore($recipient['quote_id']);
|
193 |
+
}
|
194 |
+
|
195 |
+
// Load Wishlist
|
196 |
+
if ($recipient['wishlist_id'] > 0) {
|
197 |
+
/* @var $wishlist Mage_Wishlist_Model_Wishlist */
|
198 |
+
$wishlist = Mage::getModel('wishlist/wishlist')->load($recipient['wishlist_id']);
|
199 |
+
}
|
200 |
+
|
201 |
+
// If quote and wishlist are empty, move on to next recipient
|
202 |
+
if (false === $quote && false === $wishlist) {
|
203 |
+
$error++;
|
204 |
+
continue;
|
205 |
+
}
|
206 |
+
|
207 |
+
// Load Customer
|
208 |
+
/* @var $customer Mage_Customer_Model_Customer */
|
209 |
+
if (!$customer = $this->_getRecipientCustomer($recipient, $quote)) {
|
210 |
+
$error++;
|
211 |
+
continue;
|
212 |
+
}
|
213 |
|
214 |
+
$messageData = $this->getMessageData($recipient['rule_id'], $store->getId(), $store->getWebsiteId());
|
215 |
if (!$messageData) {
|
216 |
Mage::helper('bronto_reminder')->writeInfo("Rule doesn't have an associated Bronto message.");
|
217 |
$error++;
|
222 |
if (class_exists('Mage_SalesRule_Model_Coupon', false)) {
|
223 |
/* @var $coupon Mage_SalesRule_Model_Coupon */
|
224 |
$coupon = Mage::getModel('salesrule/coupon')->load($recipient['coupon_id']);
|
225 |
+
}
|
226 |
+
|
|
|
|
|
|
|
227 |
$templateVars = array(
|
228 |
'store' => $store,
|
229 |
'customer' => $customer,
|
231 |
'promotion_description' => $messageData['description'],
|
232 |
'coupon' => $coupon,
|
233 |
'rule' => $this,
|
234 |
+
);
|
235 |
+
|
236 |
+
|
237 |
+
if ($quote) {
|
238 |
+
$templateVars['quote'] = $quote;
|
239 |
+
}
|
240 |
+
if ($wishlist) {
|
241 |
+
$templateVars['wishlist'] = $wishlist;
|
242 |
+
}
|
243 |
+
|
244 |
Mage::helper('bronto_reminder')->writeDebug('Sending message to: ' . $customer->getEmail());
|
245 |
|
246 |
try {
|
247 |
+
$message = Mage::helper('bronto_reminder/message')->getMessageById($messageData['message_id'], $store->getId(), $store->getWebsiteId());
|
248 |
|
249 |
$mail->sendTransactional(
|
250 |
$message,
|
263 |
Mage::helper('bronto_reminder')->writeDebug(' Success');
|
264 |
|
265 |
$this->_getResource()->addNotificationLog(
|
266 |
+
$recipient['rule_id'], $recipient['unique_id'], $mail->getLastDeliveryId(), $messageData['message_id']
|
267 |
);
|
|
|
|
|
|
|
|
|
|
|
268 |
|
269 |
$success++;
|
270 |
} else {
|
345 |
|
346 |
/**
|
347 |
* @param int $ruleId
|
348 |
+
* @param int $storeId
|
349 |
* @param int $customerId
|
350 |
* @param string $messageId
|
351 |
* @return boolean|array
|
352 |
*/
|
353 |
+
public function getRuleLogItems($ruleId, $storeId, $customerId, $messageId = null)
|
354 |
{
|
355 |
+
if ($data = $this->_getResource()->getRuleLogItemsData($ruleId, $storeId, $customerId, $messageId)) {
|
356 |
return $data;
|
357 |
}
|
358 |
return false;
|
359 |
}
|
360 |
+
|
361 |
/**
|
362 |
+
* Remove row from coupon table by column, value and store_id
|
363 |
+
*
|
364 |
+
* @param type $column
|
365 |
+
* @param type $value
|
366 |
+
* @param type $storeId
|
367 |
+
* @return Bronto_Reminder_Model_Mysql4_Rule
|
368 |
*/
|
369 |
+
public function removeFromReminders($column, $value, $storeId)
|
370 |
{
|
371 |
+
$this->_getResource()->removeFromReminders($column, $value, $storeId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
}
|
373 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart.php
CHANGED
@@ -54,10 +54,10 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
54 |
{
|
55 |
$this->setOperatorOption(array(
|
56 |
'==' => Mage::helper('rule')->__('for'),
|
57 |
-
'>' => Mage::helper('rule')->__('for greater than'),
|
58 |
-
'>=' => Mage::helper('rule')->__('for or greater than'),
|
59 |
-
'<' => Mage::helper('rule')->__('for less than'),
|
60 |
-
'<=' => Mage::helper('rule')->__('for or less than'),
|
61 |
));
|
62 |
return $this;
|
63 |
}
|
@@ -95,8 +95,8 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
95 |
public function asHtml()
|
96 |
{
|
97 |
return $this->getTypeElementHtml()
|
98 |
-
. Mage::helper('bronto_reminder')->__('Shopping cart is not empty and abandoned
|
99 |
-
$this->getOperatorElementHtml(),
|
100 |
$this->getValueElementHtml(),
|
101 |
$this->getAttributeElementHtml(),
|
102 |
$this->getAggregatorElement()->getHtml())
|
@@ -106,11 +106,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
106 |
/**
|
107 |
* Get condition SQL select
|
108 |
*
|
109 |
-
* @param
|
110 |
* @param int|Zend_Db_Expr $website
|
111 |
* @return Varien_Db_Select
|
112 |
*/
|
113 |
-
protected function _prepareConditionsSql($
|
114 |
{
|
115 |
$interval = Mage::helper('bronto_reminder')->getCronInterval();
|
116 |
$attributeValue = strtolower($this->getAttribute());
|
@@ -136,7 +136,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
136 |
break;
|
137 |
case 'days':
|
138 |
default:
|
139 |
-
$currentDateStart = now(
|
140 |
$durationSql = 'DAY';
|
141 |
$conditionValue = (int) $this->getValue();
|
142 |
if ($conditionValue < 1) {
|
@@ -150,7 +150,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
150 |
}
|
151 |
|
152 |
$table = $this->getResource()->getTable('sales/quote');
|
153 |
-
$operator =
|
154 |
|
155 |
$select = $this->getResource()->createSelect();
|
156 |
$select->from(array('quote' => $table), array(new Zend_Db_Expr(1)));
|
@@ -163,35 +163,31 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
163 |
// cart + X hour(s) <= [now] <= cart + (X hour(s) * 60) + interval minute(s)
|
164 |
// 3 hours: cart + 180 minutes <= [now] <= cart + 195 minutes
|
165 |
$conditionValueInMinutes = $conditionValue * 60;
|
166 |
-
$select->where("'{$currentDateStart}' >= DATE_ADD(quote.updated_at, INTERVAL ? HOUR)", $conditionValue);
|
167 |
-
$select->where("'{$currentDateStart}' <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValueInMinutes + $interval);
|
168 |
break;
|
169 |
case 'minutes':
|
170 |
// cart + X minute(s) <= [now] <= cart + X minute(s) + interval minute(s)
|
171 |
// 60 minutes: cart + 60 minutes <= [now] <= cart + 75 minutes
|
172 |
-
$select->where("'{$currentDateStart}' >= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValue);
|
173 |
-
$select->where("'{$currentDateStart}' <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValue + $interval);
|
174 |
break;
|
175 |
case 'days':
|
176 |
default:
|
177 |
// cart + X day(s) <= [now] <= cart + (X day(s) * 1440) + interval minute(s)
|
178 |
// 1 day: cart + 1 day <= [now] <= cart + 1455 minutes
|
179 |
$conditionValueInMinutes = $conditionValue * 1440;
|
180 |
-
$select->where("'{$currentDateStart}' >= DATE_ADD(quote.updated_at, INTERVAL ? DAY)", $conditionValue);
|
181 |
-
$select->where("'{$currentDateStart}' <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValueInMinutes + $interval);
|
182 |
break;
|
183 |
}
|
184 |
} else {
|
185 |
if ($operator == '>=') {
|
186 |
-
if (
|
187 |
-
$conditionValue--;
|
188 |
-
} else {
|
189 |
$currentDateStart = now();
|
190 |
}
|
191 |
} elseif ($operator == '<=') {
|
192 |
-
if (
|
193 |
-
$conditionValue++;
|
194 |
-
} else {
|
195 |
$currentDateStart = now();
|
196 |
}
|
197 |
}
|
@@ -201,7 +197,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
201 |
|
202 |
$select->where('quote.is_active = 1');
|
203 |
$select->where('quote.items_count > 0');
|
204 |
-
$select->where(
|
205 |
$select->limit(1);
|
206 |
|
207 |
return $select;
|
@@ -210,20 +206,20 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
210 |
/**
|
211 |
* Get base SQL select
|
212 |
*
|
213 |
-
* @param
|
214 |
* @param int|Zend_Db_Expr $website
|
215 |
* @return Varien_Db_Select
|
216 |
*/
|
217 |
-
public function getConditionsSql($
|
218 |
{
|
219 |
-
$select = $this->_prepareConditionsSql($
|
220 |
$required = $this->_getRequiredValidation();
|
221 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
222 |
$operator = $required ? '=' : '<>';
|
223 |
$conditions = array();
|
224 |
|
225 |
foreach ($this->getConditions() as $condition) {
|
226 |
-
if ($sql = $condition->getConditionsSql($
|
227 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
228 |
}
|
229 |
}
|
@@ -231,7 +227,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart extends Bronto_Reminder_Model_Co
|
|
231 |
if (!empty($conditions)) {
|
232 |
$select->where(implode($aggregator, $conditions));
|
233 |
}
|
234 |
-
|
235 |
return $select;
|
236 |
}
|
237 |
}
|
54 |
{
|
55 |
$this->setOperatorOption(array(
|
56 |
'==' => Mage::helper('rule')->__('for'),
|
57 |
+
// '>' => Mage::helper('rule')->__('for greater than'),
|
58 |
+
// '>=' => Mage::helper('rule')->__('for or greater than'),
|
59 |
+
// '<' => Mage::helper('rule')->__('for less than'),
|
60 |
+
// '<=' => Mage::helper('rule')->__('for or less than'),
|
61 |
));
|
62 |
return $this;
|
63 |
}
|
95 |
public function asHtml()
|
96 |
{
|
97 |
return $this->getTypeElementHtml()
|
98 |
+
. Mage::helper('bronto_reminder')->__('Shopping cart is not empty and abandoned for %s %s and %s of these conditions match:',
|
99 |
+
// $this->getOperatorElementHtml(),
|
100 |
$this->getValueElementHtml(),
|
101 |
$this->getAttributeElementHtml(),
|
102 |
$this->getAggregatorElement()->getHtml())
|
106 |
/**
|
107 |
* Get condition SQL select
|
108 |
*
|
109 |
+
* @param $rule
|
110 |
* @param int|Zend_Db_Expr $website
|
111 |
* @return Varien_Db_Select
|
112 |
*/
|
113 |
+
protected function _prepareConditionsSql($rule, $website)
|
114 |
{
|
115 |
$interval = Mage::helper('bronto_reminder')->getCronInterval();
|
116 |
$attributeValue = strtolower($this->getAttribute());
|
136 |
break;
|
137 |
case 'days':
|
138 |
default:
|
139 |
+
$currentDateStart = now(false);
|
140 |
$durationSql = 'DAY';
|
141 |
$conditionValue = (int) $this->getValue();
|
142 |
if ($conditionValue < 1) {
|
150 |
}
|
151 |
|
152 |
$table = $this->getResource()->getTable('sales/quote');
|
153 |
+
$operator = '='; //$this->getResource()->getSqlOperator($this->getOperator());
|
154 |
|
155 |
$select = $this->getResource()->createSelect();
|
156 |
$select->from(array('quote' => $table), array(new Zend_Db_Expr(1)));
|
163 |
// cart + X hour(s) <= [now] <= cart + (X hour(s) * 60) + interval minute(s)
|
164 |
// 3 hours: cart + 180 minutes <= [now] <= cart + 195 minutes
|
165 |
$conditionValueInMinutes = $conditionValue * 60;
|
166 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) >= DATE_ADD(quote.updated_at, INTERVAL ? HOUR)", $conditionValue);
|
167 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValueInMinutes + $interval);
|
168 |
break;
|
169 |
case 'minutes':
|
170 |
// cart + X minute(s) <= [now] <= cart + X minute(s) + interval minute(s)
|
171 |
// 60 minutes: cart + 60 minutes <= [now] <= cart + 75 minutes
|
172 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) >= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValue);
|
173 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValue + $interval);
|
174 |
break;
|
175 |
case 'days':
|
176 |
default:
|
177 |
// cart + X day(s) <= [now] <= cart + (X day(s) * 1440) + interval minute(s)
|
178 |
// 1 day: cart + 1 day <= [now] <= cart + 1455 minutes
|
179 |
$conditionValueInMinutes = $conditionValue * 1440;
|
180 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) >= DATE_ADD(quote.updated_at, INTERVAL ? DAY)", $conditionValue);
|
181 |
+
$select->where("STR_TO_DATE('{$currentDateStart}',GET_FORMAT(DATETIME,'ISO')) <= DATE_ADD(quote.updated_at, INTERVAL ? MINUTE)", $conditionValueInMinutes + $interval);
|
182 |
break;
|
183 |
}
|
184 |
} else {
|
185 |
if ($operator == '>=') {
|
186 |
+
if (!$conditionValue > 0) {
|
|
|
|
|
187 |
$currentDateStart = now();
|
188 |
}
|
189 |
} elseif ($operator == '<=') {
|
190 |
+
if (!$conditionValue > 0) {
|
|
|
|
|
191 |
$currentDateStart = now();
|
192 |
}
|
193 |
}
|
197 |
|
198 |
$select->where('quote.is_active = 1');
|
199 |
$select->where('quote.items_count > 0');
|
200 |
+
$select->where('quote.entity_id = root.quote_id');
|
201 |
$select->limit(1);
|
202 |
|
203 |
return $select;
|
206 |
/**
|
207 |
* Get base SQL select
|
208 |
*
|
209 |
+
* @param $rule
|
210 |
* @param int|Zend_Db_Expr $website
|
211 |
* @return Varien_Db_Select
|
212 |
*/
|
213 |
+
public function getConditionsSql($rule, $website)
|
214 |
{
|
215 |
+
$select = $this->_prepareConditionsSql($rule, $website);
|
216 |
$required = $this->_getRequiredValidation();
|
217 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
218 |
$operator = $required ? '=' : '<>';
|
219 |
$conditions = array();
|
220 |
|
221 |
foreach ($this->getConditions() as $condition) {
|
222 |
+
if ($sql = $condition->getConditionsSql($rule, $website)) {
|
223 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
224 |
}
|
225 |
}
|
227 |
if (!empty($conditions)) {
|
228 |
$select->where(implode($aggregator, $conditions));
|
229 |
}
|
230 |
+
|
231 |
return $select;
|
232 |
}
|
233 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Amount.php
CHANGED
@@ -61,11 +61,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Amount extends Bronto_Reminder_M
|
|
61 |
/**
|
62 |
* Build condition limitations sql string for specific website
|
63 |
*
|
64 |
-
* @param $
|
65 |
* @param int | Zend_Db_Expr $website
|
66 |
* @return Varien_Db_Select
|
67 |
*/
|
68 |
-
public function getConditionsSql($
|
69 |
{
|
70 |
$table = $this->getResource()->getTable('sales/quote');
|
71 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
@@ -87,7 +87,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Amount extends Bronto_Reminder_M
|
|
87 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
88 |
$select->where('quote.is_active = 1');
|
89 |
$select->where("{$field} {$operator} ?", $this->getValue());
|
90 |
-
$select->where(
|
91 |
$select->limit(1);
|
92 |
return $select;
|
93 |
}
|
61 |
/**
|
62 |
* Build condition limitations sql string for specific website
|
63 |
*
|
64 |
+
* @param $rule
|
65 |
* @param int | Zend_Db_Expr $website
|
66 |
* @return Varien_Db_Select
|
67 |
*/
|
68 |
+
public function getConditionsSql($rule, $website)
|
69 |
{
|
70 |
$table = $this->getResource()->getTable('sales/quote');
|
71 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
87 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
88 |
$select->where('quote.is_active = 1');
|
89 |
$select->where("{$field} {$operator} ?", $this->getValue());
|
90 |
+
$select->where('quote.entity_id = root.quote_id');
|
91 |
$select->limit(1);
|
92 |
return $select;
|
93 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Attributes.php
CHANGED
@@ -63,11 +63,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Attributes extends Bronto_Remind
|
|
63 |
/**
|
64 |
* Build condition limitations sql string for specific website
|
65 |
*
|
66 |
-
* @param $
|
67 |
* @param int | Zend_Db_Expr $website
|
68 |
* @return Varien_Db_Select
|
69 |
*/
|
70 |
-
public function getConditionsSql($
|
71 |
{
|
72 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
73 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
@@ -105,7 +105,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Attributes extends Bronto_Remind
|
|
105 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
106 |
$select->where('quote.is_active = 1');
|
107 |
$select->where("{$field} {$operator} ?", $this->getValue());
|
108 |
-
$select->where(
|
109 |
$select->limit(1);
|
110 |
return $select;
|
111 |
}
|
63 |
/**
|
64 |
* Build condition limitations sql string for specific website
|
65 |
*
|
66 |
+
* @param $rule
|
67 |
* @param int | Zend_Db_Expr $website
|
68 |
* @return Varien_Db_Select
|
69 |
*/
|
70 |
+
public function getConditionsSql($rule, $website)
|
71 |
{
|
72 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
73 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
105 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
106 |
$select->where('quote.is_active = 1');
|
107 |
$select->where("{$field} {$operator} ?", $this->getValue());
|
108 |
+
$select->where('quote.entity_id = root.quote_id');
|
109 |
$select->limit(1);
|
110 |
return $select;
|
111 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Couponcode.php
CHANGED
@@ -65,11 +65,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Couponcode extends Bronto_Remind
|
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
-
* @param $
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
-
public function getConditionsSql($
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('sales/quote');
|
75 |
$inversion = ((int)$this->getValue() ? '' : '!');
|
@@ -80,7 +80,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Couponcode extends Bronto_Remind
|
|
80 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
81 |
$select->where('quote.is_active = 1');
|
82 |
$select->where("{$inversion}(IFNULL(quote.coupon_code, '') <> '')");
|
83 |
-
$select->where(
|
84 |
$select->limit(1);
|
85 |
|
86 |
return $select;
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
+
* @param $rule
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
+
public function getConditionsSql($rule, $website)
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('sales/quote');
|
75 |
$inversion = ((int)$this->getValue() ? '' : '!');
|
80 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
81 |
$select->where('quote.is_active = 1');
|
82 |
$select->where("{$inversion}(IFNULL(quote.coupon_code, '') <> '')");
|
83 |
+
$select->where('quote.entity_id = root.quote_id');
|
84 |
$select->limit(1);
|
85 |
|
86 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Itemsquantity.php
CHANGED
@@ -46,11 +46,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Itemsquantity extends Bronto_Rem
|
|
46 |
/**
|
47 |
* Get SQL select for matching shopping cart items count
|
48 |
*
|
49 |
-
* @param $
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
-
public function getConditionsSql($
|
54 |
{
|
55 |
$table = $this->getResource()->getTable('sales/quote');
|
56 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
@@ -61,7 +61,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Itemsquantity extends Bronto_Rem
|
|
61 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
62 |
$select->where('quote.is_active = 1');
|
63 |
$select->where("quote.items_count {$operator} ?", $this->getValue());
|
64 |
-
$select->where(
|
65 |
$select->limit(1);
|
66 |
|
67 |
return $select;
|
46 |
/**
|
47 |
* Get SQL select for matching shopping cart items count
|
48 |
*
|
49 |
+
* @param $rule
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
+
public function getConditionsSql($rule, $website)
|
54 |
{
|
55 |
$table = $this->getResource()->getTable('sales/quote');
|
56 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
61 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
62 |
$select->where('quote.is_active = 1');
|
63 |
$select->where("quote.items_count {$operator} ?", $this->getValue());
|
64 |
+
$select->where('quote.entity_id = root.quote_id');
|
65 |
$select->limit(1);
|
66 |
|
67 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Sku.php
CHANGED
@@ -52,11 +52,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Sku extends Bronto_Reminder_Mode
|
|
52 |
/**
|
53 |
* Get SQL select
|
54 |
*
|
55 |
-
* @param $
|
56 |
* @param int | Zend_Db_Expr $website
|
57 |
* @return Varien_Db_Select
|
58 |
*/
|
59 |
-
public function getConditionsSql($
|
60 |
{
|
61 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
62 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
@@ -74,7 +74,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Sku extends Bronto_Reminder_Mode
|
|
74 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
75 |
$select->where('quote.is_active = 1');
|
76 |
$select->where("item.sku {$operator} ?", $this->getValue());
|
77 |
-
$select->where(
|
78 |
$select->limit(1);
|
79 |
|
80 |
return $select;
|
52 |
/**
|
53 |
* Get SQL select
|
54 |
*
|
55 |
+
* @param $rule
|
56 |
* @param int | Zend_Db_Expr $website
|
57 |
* @return Varien_Db_Select
|
58 |
*/
|
59 |
+
public function getConditionsSql($rule, $website)
|
60 |
{
|
61 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
62 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
74 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
75 |
$select->where('quote.is_active = 1');
|
76 |
$select->where("item.sku {$operator} ?", $this->getValue());
|
77 |
+
$select->where('quote.entity_id = root.quote_id');
|
78 |
$select->limit(1);
|
79 |
|
80 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Storeview.php
CHANGED
@@ -87,11 +87,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Storeview extends Bronto_Reminde
|
|
87 |
/**
|
88 |
* Get SQL select
|
89 |
*
|
90 |
-
* @param $
|
91 |
* @param int | Zend_Db_Expr $website
|
92 |
* @return Varien_Db_Select
|
93 |
*/
|
94 |
-
public function getConditionsSql($
|
95 |
{
|
96 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
97 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
@@ -109,7 +109,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Storeview extends Bronto_Reminde
|
|
109 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
110 |
$select->where('quote.is_active = 1');
|
111 |
$select->where("item.store_id {$operator} ?", $this->getValue());
|
112 |
-
$select->where(
|
113 |
$select->limit(1);
|
114 |
|
115 |
return $select;
|
87 |
/**
|
88 |
* Get SQL select
|
89 |
*
|
90 |
+
* @param $rule
|
91 |
* @param int | Zend_Db_Expr $website
|
92 |
* @return Varien_Db_Select
|
93 |
*/
|
94 |
+
public function getConditionsSql($rule, $website)
|
95 |
{
|
96 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
97 |
$quoteItemTable = $this->getResource()->getTable('sales/quote_item');
|
109 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
110 |
$select->where('quote.is_active = 1');
|
111 |
$select->where("item.store_id {$operator} ?", $this->getValue());
|
112 |
+
$select->where('quote.entity_id = root.quote_id');
|
113 |
$select->limit(1);
|
114 |
|
115 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Subselection.php
CHANGED
@@ -65,11 +65,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Subselection extends Bronto_Remi
|
|
65 |
/**
|
66 |
* Build query for matching shopping cart items
|
67 |
*
|
68 |
-
* @param $
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
-
protected function _prepareConditionsSql($
|
73 |
{
|
74 |
$select = $this->getResource()->createSelect();
|
75 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
@@ -85,7 +85,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Subselection extends Bronto_Remi
|
|
85 |
|
86 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
87 |
$select->where('quote.is_active = 1');
|
88 |
-
$select->where(
|
89 |
$select->limit(1);
|
90 |
|
91 |
return $select;
|
65 |
/**
|
66 |
* Build query for matching shopping cart items
|
67 |
*
|
68 |
+
* @param $rule
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
+
protected function _prepareConditionsSql($rule, $website)
|
73 |
{
|
74 |
$select = $this->getResource()->createSelect();
|
75 |
$quoteTable = $this->getResource()->getTable('sales/quote');
|
85 |
|
86 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
87 |
$select->where('quote.is_active = 1');
|
88 |
+
$select->where('quote.entity_id = root.quote_id');
|
89 |
$select->limit(1);
|
90 |
|
91 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Totalquantity.php
CHANGED
@@ -46,11 +46,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Totalquantity extends Bronto_Rem
|
|
46 |
/**
|
47 |
* Get SQL select for matching shopping cart products count
|
48 |
*
|
49 |
-
* @param $
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
-
public function getConditionsSql($
|
54 |
{
|
55 |
$table = $this->getResource()->getTable('sales/quote');
|
56 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
@@ -61,7 +61,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Totalquantity extends Bronto_Rem
|
|
61 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
62 |
$select->where('quote.is_active = 1');
|
63 |
$select->where("quote.items_qty {$operator} ?", $this->getValue());
|
64 |
-
$select->where(
|
65 |
$select->limit(1);
|
66 |
|
67 |
return $select;
|
46 |
/**
|
47 |
* Get SQL select for matching shopping cart products count
|
48 |
*
|
49 |
+
* @param $rule
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
+
public function getConditionsSql($rule, $website)
|
54 |
{
|
55 |
$table = $this->getResource()->getTable('sales/quote');
|
56 |
$operator = $this->getResource()->getSqlOperator($this->getOperator());
|
61 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
62 |
$select->where('quote.is_active = 1');
|
63 |
$select->where("quote.items_qty {$operator} ?", $this->getValue());
|
64 |
+
$select->where('quote.entity_id = root.quote_id');
|
65 |
$select->limit(1);
|
66 |
|
67 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Cart/Virtual.php
CHANGED
@@ -65,11 +65,11 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Virtual extends Bronto_Reminder_
|
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
-
* @param $
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
-
public function getConditionsSql($
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('sales/quote');
|
75 |
|
@@ -79,7 +79,7 @@ class Bronto_Reminder_Model_Rule_Condition_Cart_Virtual extends Bronto_Reminder_
|
|
79 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
80 |
$select->where('quote.is_active = 1');
|
81 |
$select->where("quote.is_virtual = ?", $this->getValue());
|
82 |
-
$select->where(
|
83 |
$select->limit(1);
|
84 |
|
85 |
return $select;
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
+
* @param $rule
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
+
public function getConditionsSql($rule, $website)
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('sales/quote');
|
75 |
|
79 |
$this->_limitByStoreWebsite($select, $website, 'quote.store_id');
|
80 |
$select->where('quote.is_active = 1');
|
81 |
$select->where("quote.is_virtual = ?", $this->getValue());
|
82 |
+
$select->where('quote.entity_id = root.quote_id');
|
83 |
$select->limit(1);
|
84 |
|
85 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Combine/Root.php
CHANGED
@@ -16,29 +16,160 @@ class Bronto_Reminder_Model_Rule_Condition_Combine_Root extends Bronto_Reminder_
|
|
16 |
/**
|
17 |
* Prepare base select with limitation by customer
|
18 |
*
|
19 |
-
* @param null
|
20 |
* @param int | Zend_Db_Expr $website
|
21 |
* @return Varien_Db_Select
|
22 |
*/
|
23 |
-
protected function _prepareConditionsSql($
|
24 |
{
|
25 |
$select = $this->getResource()->createSelect();
|
26 |
-
|
27 |
-
$
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$select->joinLeft(
|
32 |
array('c' => $couponTable),
|
33 |
-
'c.customer_id=root.
|
34 |
array('c.coupon_id')
|
35 |
);
|
36 |
-
|
37 |
-
if ($customer === null) {
|
38 |
-
if (Mage::getSingleton('customer/config_share')->isWebsiteScope()) {
|
39 |
-
$select->where('website_id=?', $website);
|
40 |
-
}
|
41 |
-
}
|
42 |
return $select;
|
43 |
}
|
44 |
|
@@ -46,31 +177,31 @@ class Bronto_Reminder_Model_Rule_Condition_Combine_Root extends Bronto_Reminder_
|
|
46 |
* Get SQL select.
|
47 |
* Rewrited for cover root conditions combination with additional condition by customer
|
48 |
*
|
49 |
-
* @param
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
-
public function getConditionsSql($
|
54 |
{
|
55 |
-
$select = $this->_prepareConditionsSql($
|
56 |
$required = $this->_getRequiredValidation();
|
57 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
58 |
$operator = $required ? '=' : '<>';
|
59 |
$conditions = array();
|
60 |
-
|
61 |
foreach ($this->getConditions() as $condition) {
|
62 |
-
if ($sql = $condition->getConditionsSql($
|
63 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
64 |
}
|
65 |
}
|
66 |
-
|
67 |
if (!empty($conditions)) {
|
68 |
$select->where(implode($aggregator, $conditions));
|
69 |
}
|
70 |
else {
|
71 |
$select->reset();
|
72 |
}
|
73 |
-
|
74 |
return $select;
|
75 |
}
|
76 |
}
|
16 |
/**
|
17 |
* Prepare base select with limitation by customer
|
18 |
*
|
19 |
+
* @param null|Bronto_Reminder_Model_Rule $rule
|
20 |
* @param int | Zend_Db_Expr $website
|
21 |
* @return Varien_Db_Select
|
22 |
*/
|
23 |
+
protected function _prepareConditionsSql($rule, $website)
|
24 |
{
|
25 |
$select = $this->getResource()->createSelect();
|
26 |
+
|
27 |
+
$conditionTypes = array();
|
28 |
+
foreach ($this->getConditions() as $condition) {
|
29 |
+
$type = explode('_', $condition->getType());
|
30 |
+
$conditionTypes[] = array_pop($type);
|
31 |
+
}
|
32 |
+
|
33 |
+
// Define Tables
|
34 |
+
$customerTable = $this->getResource()->getTable('customer/entity');
|
35 |
+
$quoteTable = $this->getResource()->getTable('sales/quote');
|
36 |
+
$storeTable = $this->getResource()->getTable('core/store');
|
37 |
+
$logQuoteTable = Mage::getResourceSingleton('log/log')->getTable('log/quote_table');
|
38 |
+
$logCustomerTable = Mage::getResourceSingleton('log/log')->getTable('log/customer');
|
39 |
+
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
40 |
+
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
41 |
|
42 |
+
// If conditions are based on Cart or Wishlist
|
43 |
+
if (in_array('cart', $conditionTypes) || in_array('wishlist', $conditionTypes)) {
|
44 |
+
$subselect = $this->getResource()->createSelect();
|
45 |
+
|
46 |
+
// If conditions are based on Cart and Wishlist
|
47 |
+
if (in_array('cart', $conditionTypes) && in_array('wishlist', $conditionTypes)) {
|
48 |
+
$groupby = array('quote_id', 'wishlist_id');
|
49 |
+
|
50 |
+
$subselect->from(
|
51 |
+
array('quote' => $quoteTable),
|
52 |
+
array(
|
53 |
+
'quote_id' => 'entity_id',
|
54 |
+
'customer_id' => new Zend_Db_Expr('IF(quote.customer_id IS NULL, IF(wishlist.customer_id IS NULL, 0, wishlist.customer_id), quote.customer_id)')
|
55 |
+
)
|
56 |
+
)
|
57 |
+
->where('quote.is_active = ?', 1)
|
58 |
+
->where('quote.items_count > ?', 0)
|
59 |
+
->where('quote.customer_email IS NOT NULL');
|
60 |
+
|
61 |
+
$subselect->joinLeft(
|
62 |
+
array('log' => $logQuoteTable),
|
63 |
+
'log.quote_id=quote.entity_id',
|
64 |
+
array('visitor_id' => 'log.visitor_id')
|
65 |
+
);
|
66 |
+
|
67 |
+
$subselect->joinInner(
|
68 |
+
array('store' => $storeTable),
|
69 |
+
'quote.store_id=store.store_id',
|
70 |
+
array('store_id' => 'store.store_id')
|
71 |
+
)->where('store.website_id=?', $website);
|
72 |
+
|
73 |
+
$subselect->joinLeft(
|
74 |
+
array('wishlist' => $wishlistTable),
|
75 |
+
'wishlist.customer_id=quote.customer_id',
|
76 |
+
array('wishlist_id' => 'wishlist.wishlist_id')
|
77 |
+
);
|
78 |
+
|
79 |
+
$subselect->joinLeft(
|
80 |
+
array('wishlist_item' => $wishlistItemTable),
|
81 |
+
'wishlist_item.wishlist_id=wishlist.wishlist_id',
|
82 |
+
array()
|
83 |
+
);
|
84 |
+
|
85 |
+
}
|
86 |
+
// If conditions are based on Cart Only
|
87 |
+
elseif (in_array('cart', $conditionTypes)) {
|
88 |
+
$groupby = 'quote_id';
|
89 |
+
|
90 |
+
$subselect->from(
|
91 |
+
array('quote' => $quoteTable),
|
92 |
+
array(
|
93 |
+
'quote_id' => 'entity_id',
|
94 |
+
'customer_id' => new Zend_Db_Expr('IF(quote.customer_id IS NULL, 0, quote.customer_id)'),
|
95 |
+
'wishlist_id' => new Zend_Db_Expr('0'),
|
96 |
+
)
|
97 |
+
)
|
98 |
+
->where('quote.is_active = ?', 1)
|
99 |
+
->where('quote.items_count > ?', 0)
|
100 |
+
->where('quote.customer_email IS NOT NULL');
|
101 |
+
|
102 |
+
$subselect->joinLeft(
|
103 |
+
array('log' => $logQuoteTable),
|
104 |
+
'log.quote_id=quote.entity_id',
|
105 |
+
array('visitor_id' => 'log.visitor_id')
|
106 |
+
);
|
107 |
+
|
108 |
+
$subselect->joinInner(
|
109 |
+
array('store' => $storeTable),
|
110 |
+
'quote.store_id=store.store_id',
|
111 |
+
array('store_id' => 'store.store_id')
|
112 |
+
)->where('store.website_id=?', $website);
|
113 |
+
}
|
114 |
+
// If conditions are based on Wishlist Only
|
115 |
+
elseif (in_array('wishlist', $conditionTypes)) {
|
116 |
+
$groupby = 'wishlist_id';
|
117 |
+
|
118 |
+
$subselect->from(
|
119 |
+
array('customer' => $customerTable),
|
120 |
+
array(
|
121 |
+
'quote_id' => new Zend_Db_Expr('0'),
|
122 |
+
'customer_id' => 'entity_id',
|
123 |
+
)
|
124 |
+
);
|
125 |
+
|
126 |
+
$subselect->joinLeft(
|
127 |
+
array('wishlist' => $wishlistTable),
|
128 |
+
'wishlist.customer_id=customer.entity_id',
|
129 |
+
array('wishlist_id' => 'wishlist.wishlist_id')
|
130 |
+
);
|
131 |
+
|
132 |
+
$subselect->joinLeft(
|
133 |
+
array('wishlist_item' => $wishlistItemTable),
|
134 |
+
'wishlist_item.wishlist_id=wishlist.wishlist_id',
|
135 |
+
array()
|
136 |
+
);
|
137 |
+
|
138 |
+
$subselect->joinLeft(
|
139 |
+
array('log' => $logCustomerTable),
|
140 |
+
'log.customer_id=customer.entity_id',
|
141 |
+
array('visitor_id' => 'log.visitor_id')
|
142 |
+
);
|
143 |
+
|
144 |
+
$subselect->joinInner(
|
145 |
+
array('store' => $storeTable),
|
146 |
+
'wishlist_item.store_id=store.store_id',
|
147 |
+
array('store_id' => 'store.store_id')
|
148 |
+
)->where('store.website_id=?', $website);
|
149 |
+
}
|
150 |
+
|
151 |
+
// Set main select to pull use subselect as root and pull required fields
|
152 |
+
$select->from(array('root' => $subselect), array(
|
153 |
+
'unique_id' => new Zend_Db_Expr(
|
154 |
+
"CONCAT(:rule_id, '-', `root`.`store_id`, '-', IF(`root`.`customer_id` IS NULL, 0, `root`.`customer_id`), '-', IF(`root`.`visitor_id` IS NULL, 0, `root`.`visitor_id`))"
|
155 |
+
),
|
156 |
+
'store_id',
|
157 |
+
'customer_id' => new Zend_Db_Expr("IF(`root`.`customer_id` IS NULL, 0, `root`.`customer_id`)"),
|
158 |
+
'quote_id' => new Zend_Db_Expr("IF(`root`.`quote_id` IS NULL, 0, `root`.`quote_id`)"),
|
159 |
+
'wishlist_id' => new Zend_Db_Expr("IF(`root`.`wishlist_id` IS NULL, 0, `root`.`wishlist_id`)"),
|
160 |
+
'visitor_id' => new Zend_Db_Expr("IF(`root`.`visitor_id` IS NULL, 0, `root`.`visitor_id`)")
|
161 |
+
))
|
162 |
+
->group($groupby);
|
163 |
+
}
|
164 |
+
|
165 |
+
$couponTable = $this->getResource()->getTable('bronto_reminder/coupon');
|
166 |
+
|
167 |
$select->joinLeft(
|
168 |
array('c' => $couponTable),
|
169 |
+
'c.customer_id=root.customer_id AND c.store_id=root.store_id AND c.rule_id=:rule_id',
|
170 |
array('c.coupon_id')
|
171 |
);
|
172 |
+
|
|
|
|
|
|
|
|
|
|
|
173 |
return $select;
|
174 |
}
|
175 |
|
177 |
* Get SQL select.
|
178 |
* Rewrited for cover root conditions combination with additional condition by customer
|
179 |
*
|
180 |
+
* @param null|Bronto_Reminder_Model_Rule $rule
|
181 |
* @param int | Zend_Db_Expr $website
|
182 |
* @return Varien_Db_Select
|
183 |
*/
|
184 |
+
public function getConditionsSql($rule, $website)
|
185 |
{
|
186 |
+
$select = $this->_prepareConditionsSql($rule, $website);
|
187 |
$required = $this->_getRequiredValidation();
|
188 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
189 |
$operator = $required ? '=' : '<>';
|
190 |
$conditions = array();
|
191 |
+
|
192 |
foreach ($this->getConditions() as $condition) {
|
193 |
+
if ($sql = $condition->getConditionsSql($rule, $website)) {
|
194 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
195 |
}
|
196 |
}
|
197 |
+
|
198 |
if (!empty($conditions)) {
|
199 |
$select->where(implode($aggregator, $conditions));
|
200 |
}
|
201 |
else {
|
202 |
$select->reset();
|
203 |
}
|
204 |
+
|
205 |
return $select;
|
206 |
}
|
207 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist.php
CHANGED
@@ -54,8 +54,8 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist extends Bronto_Reminder_Mode
|
|
54 |
{
|
55 |
$this->setOperatorOption(array(
|
56 |
'==' => Mage::helper('rule')->__('for'),
|
57 |
-
'>' => Mage::helper('rule')->__('for greater than'),
|
58 |
-
'>=' => Mage::helper('rule')->__('for or greater than')
|
59 |
));
|
60 |
return $this;
|
61 |
}
|
@@ -78,8 +78,8 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist extends Bronto_Reminder_Mode
|
|
78 |
public function asHtml()
|
79 |
{
|
80 |
return $this->getTypeElementHtml()
|
81 |
-
. Mage::helper('bronto_reminder')->__('Wishlist is not empty and abandoned %s
|
82 |
-
$this->getOperatorElementHtml(),
|
83 |
$this->getValueElementHtml(),
|
84 |
$this->getAggregatorElement()->getHtml())
|
85 |
. $this->getRemoveLinkHtml();
|
@@ -88,20 +88,21 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist extends Bronto_Reminder_Mode
|
|
88 |
/**
|
89 |
* Get condition SQL select
|
90 |
*
|
91 |
-
* @param $
|
92 |
* @param $website
|
93 |
* @return Varien_Db_Select
|
94 |
*/
|
95 |
-
protected function _prepareConditionsSql($
|
96 |
{
|
|
|
97 |
$conditionValue = (int)$this->getValue();
|
98 |
if ($conditionValue < 1) {
|
99 |
Mage::throwException(Mage::helper('bronto_reminder')->__('Root wishlist condition should have days value at least 1.'));
|
100 |
}
|
101 |
|
102 |
-
$wishlistTable
|
103 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
104 |
-
$operator =
|
105 |
|
106 |
$select = $this->getResource()->createSelect();
|
107 |
$select->from(array('item' => $wishlistItemTable), array(new Zend_Db_Expr(1)));
|
@@ -111,31 +112,34 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist extends Bronto_Reminder_Mode
|
|
111 |
'item.wishlist_id = list.wishlist_id',
|
112 |
array()
|
113 |
);
|
114 |
-
|
115 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
116 |
-
$
|
117 |
-
$select->where(
|
|
|
|
|
118 |
$select->limit(1);
|
|
|
119 |
return $select;
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
* Get base SQL select
|
124 |
*
|
125 |
-
* @param $
|
126 |
* @param $website
|
127 |
* @return Varien_Db_Select
|
128 |
*/
|
129 |
-
public function getConditionsSql($
|
130 |
{
|
131 |
-
$select = $this->_prepareConditionsSql($
|
132 |
$required = $this->_getRequiredValidation();
|
133 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
134 |
$operator = $required ? '=' : '<>';
|
135 |
$conditions = array();
|
136 |
|
137 |
foreach ($this->getConditions() as $condition) {
|
138 |
-
if ($sql = $condition->getConditionsSql($
|
139 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
140 |
}
|
141 |
}
|
54 |
{
|
55 |
$this->setOperatorOption(array(
|
56 |
'==' => Mage::helper('rule')->__('for'),
|
57 |
+
// '>' => Mage::helper('rule')->__('for greater than'),
|
58 |
+
// '>=' => Mage::helper('rule')->__('for or greater than')
|
59 |
));
|
60 |
return $this;
|
61 |
}
|
78 |
public function asHtml()
|
79 |
{
|
80 |
return $this->getTypeElementHtml()
|
81 |
+
. Mage::helper('bronto_reminder')->__('Wishlist is not empty and abandoned for %s day(s) and %s of these conditions match:',
|
82 |
+
// $this->getOperatorElementHtml(),
|
83 |
$this->getValueElementHtml(),
|
84 |
$this->getAggregatorElement()->getHtml())
|
85 |
. $this->getRemoveLinkHtml();
|
88 |
/**
|
89 |
* Get condition SQL select
|
90 |
*
|
91 |
+
* @param $rule
|
92 |
* @param $website
|
93 |
* @return Varien_Db_Select
|
94 |
*/
|
95 |
+
protected function _prepareConditionsSql($rule, $website)
|
96 |
{
|
97 |
+
$interval = Mage::helper('bronto_reminder')->getCronInterval();
|
98 |
$conditionValue = (int)$this->getValue();
|
99 |
if ($conditionValue < 1) {
|
100 |
Mage::throwException(Mage::helper('bronto_reminder')->__('Root wishlist condition should have days value at least 1.'));
|
101 |
}
|
102 |
|
103 |
+
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
104 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
105 |
+
$operator = '='; //$this->getResource()->getSqlOperator($this->getOperator());
|
106 |
|
107 |
$select = $this->getResource()->createSelect();
|
108 |
$select->from(array('item' => $wishlistItemTable), array(new Zend_Db_Expr(1)));
|
112 |
'item.wishlist_id = list.wishlist_id',
|
113 |
array()
|
114 |
);
|
115 |
+
|
116 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
117 |
+
$conditionValueInMinutes = $conditionValue * 1440;
|
118 |
+
$select->where("STR_TO_DATE('".now()."',GET_FORMAT(DATETIME,'ISO')) >= DATE_ADD(list.updated_at, INTERVAL ? DAY)", $conditionValue);
|
119 |
+
$select->where("STR_TO_DATE('".now()."',GET_FORMAT(DATETIME,'ISO')) <= DATE_ADD(list.updated_at, INTERVAL ? MINUTE)", $conditionValueInMinutes + $interval);
|
120 |
+
$select->where($this->_createCustomerFilter('list.customer_id'));
|
121 |
$select->limit(1);
|
122 |
+
|
123 |
return $select;
|
124 |
}
|
125 |
|
126 |
/**
|
127 |
* Get base SQL select
|
128 |
*
|
129 |
+
* @param $rule
|
130 |
* @param $website
|
131 |
* @return Varien_Db_Select
|
132 |
*/
|
133 |
+
public function getConditionsSql($rule, $website)
|
134 |
{
|
135 |
+
$select = $this->_prepareConditionsSql($rule, $website);
|
136 |
$required = $this->_getRequiredValidation();
|
137 |
$aggregator = ($this->getAggregator() == 'all') ? ' AND ' : ' OR ';
|
138 |
$operator = $required ? '=' : '<>';
|
139 |
$conditions = array();
|
140 |
|
141 |
foreach ($this->getConditions() as $condition) {
|
142 |
+
if ($sql = $condition->getConditionsSql($rule, $website)) {
|
143 |
$conditions[] = "(IFNULL(($sql), 0) {$operator} 1)";
|
144 |
}
|
145 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Quantity.php
CHANGED
@@ -46,11 +46,11 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Quantity extends Bronto_Remi
|
|
46 |
/**
|
47 |
* Get SQL select
|
48 |
*
|
49 |
-
* @param $
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
-
public function getConditionsSql($
|
54 |
{
|
55 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
56 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
@@ -67,7 +67,7 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Quantity extends Bronto_Remi
|
|
67 |
);
|
68 |
|
69 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
70 |
-
$select->where($this->_createCustomerFilter(
|
71 |
return $select;
|
72 |
}
|
73 |
}
|
46 |
/**
|
47 |
* Get SQL select
|
48 |
*
|
49 |
+
* @param $rule
|
50 |
* @param int | Zend_Db_Expr $website
|
51 |
* @return Varien_Db_Select
|
52 |
*/
|
53 |
+
public function getConditionsSql($rule, $website)
|
54 |
{
|
55 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
56 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
67 |
);
|
68 |
|
69 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
70 |
+
$select->where($this->_createCustomerFilter('list.customer_id'));
|
71 |
return $select;
|
72 |
}
|
73 |
}
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Sharing.php
CHANGED
@@ -65,18 +65,18 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Sharing extends Bronto_Remin
|
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
-
* @param $
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
-
public function getConditionsSql($
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('wishlist/wishlist');
|
75 |
|
76 |
$select = $this->getResource()->createSelect();
|
77 |
$select->from(array('list' => $table), array(new Zend_Db_Expr(1)));
|
78 |
$select->where("list.shared = ?", $this->getValue());
|
79 |
-
$select->where($this->_createCustomerFilter(
|
80 |
$select->limit(1);
|
81 |
|
82 |
return $select;
|
65 |
/**
|
66 |
* Get SQL select
|
67 |
*
|
68 |
+
* @param $rule
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
+
public function getConditionsSql($rule, $website)
|
73 |
{
|
74 |
$table = $this->getResource()->getTable('wishlist/wishlist');
|
75 |
|
76 |
$select = $this->getResource()->createSelect();
|
77 |
$select->from(array('list' => $table), array(new Zend_Db_Expr(1)));
|
78 |
$select->where("list.shared = ?", $this->getValue());
|
79 |
+
$select->where($this->_createCustomerFilter('list.customer_id'));
|
80 |
$select->limit(1);
|
81 |
|
82 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Storeview.php
CHANGED
@@ -87,11 +87,11 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Storeview extends Bronto_Rem
|
|
87 |
/**
|
88 |
* Get SQL select
|
89 |
*
|
90 |
-
* @param $
|
91 |
* @param int | Zend_Db_Expr $website
|
92 |
* @return Varien_Db_Select
|
93 |
*/
|
94 |
-
public function getConditionsSql($
|
95 |
{
|
96 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
97 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
@@ -108,7 +108,7 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Storeview extends Bronto_Rem
|
|
108 |
|
109 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
110 |
$select->where("item.store_id {$operator} ?", $this->getValue());
|
111 |
-
$select->where($this->_createCustomerFilter(
|
112 |
$select->limit(1);
|
113 |
|
114 |
return $select;
|
87 |
/**
|
88 |
* Get SQL select
|
89 |
*
|
90 |
+
* @param $rule
|
91 |
* @param int | Zend_Db_Expr $website
|
92 |
* @return Varien_Db_Select
|
93 |
*/
|
94 |
+
public function getConditionsSql($rule, $website)
|
95 |
{
|
96 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
97 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
108 |
|
109 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
110 |
$select->where("item.store_id {$operator} ?", $this->getValue());
|
111 |
+
$select->where($this->_createCustomerFilter('list.customer_id'));
|
112 |
$select->limit(1);
|
113 |
|
114 |
return $select;
|
app/code/community/Bronto/Reminder/Model/Rule/Condition/Wishlist/Subselection.php
CHANGED
@@ -65,11 +65,11 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Subselection extends Bronto_
|
|
65 |
/**
|
66 |
* Build query for matching wishlist items
|
67 |
*
|
68 |
-
* @param $
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
-
protected function _prepareConditionsSql($
|
73 |
{
|
74 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
75 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
@@ -84,7 +84,7 @@ class Bronto_Reminder_Model_Rule_Condition_Wishlist_Subselection extends Bronto_
|
|
84 |
);
|
85 |
|
86 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
87 |
-
$select->where($this->_createCustomerFilter(
|
88 |
$select->limit(1);
|
89 |
|
90 |
return $select;
|
65 |
/**
|
66 |
* Build query for matching wishlist items
|
67 |
*
|
68 |
+
* @param $rule
|
69 |
* @param int | Zend_Db_Expr $website
|
70 |
* @return Varien_Db_Select
|
71 |
*/
|
72 |
+
protected function _prepareConditionsSql($rule, $website)
|
73 |
{
|
74 |
$wishlistTable = $this->getResource()->getTable('wishlist/wishlist');
|
75 |
$wishlistItemTable = $this->getResource()->getTable('wishlist/item');
|
84 |
);
|
85 |
|
86 |
$this->_limitByStoreWebsite($select, $website, 'item.store_id');
|
87 |
+
$select->where($this->_createCustomerFilter('list.customer_id'));
|
88 |
$select->limit(1);
|
89 |
|
90 |
return $select;
|
app/code/community/Bronto/Reminder/controllers/Adminhtml/RemindersController.php
CHANGED
@@ -80,6 +80,10 @@ class Bronto_Reminder_Adminhtml_RemindersController extends Mage_Adminhtml_Contr
|
|
80 |
return $this->_redirect('*/*/');
|
81 |
}
|
82 |
|
|
|
|
|
|
|
|
|
83 |
$this->_title($model->getId() ? $model->getName() : $this->__('New Rule'));
|
84 |
|
85 |
// set entered data if was error when we do save
|
@@ -226,7 +230,7 @@ class Bronto_Reminder_Adminhtml_RemindersController extends Mage_Adminhtml_Contr
|
|
226 |
$total = $result['total'];
|
227 |
$success = $result['success'];
|
228 |
$error = $result['error'];
|
229 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(sprintf("Processed %d
|
230 |
} else {
|
231 |
Mage::getSingleton('adminhtml/session')->addError('Reminder rule sending failed.');
|
232 |
}
|
@@ -275,6 +279,19 @@ class Bronto_Reminder_Adminhtml_RemindersController extends Mage_Adminhtml_Contr
|
|
275 |
}
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
/**
|
279 |
* Convert dates in array from localized to internal format
|
280 |
*
|
80 |
return $this->_redirect('*/*/');
|
81 |
}
|
82 |
|
83 |
+
if (!Mage::helper('bronto_reminder')->isAllowSend()) {
|
84 |
+
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('bronto_reminder')->getNotAllowedText());
|
85 |
+
}
|
86 |
+
|
87 |
$this->_title($model->getId() ? $model->getName() : $this->__('New Rule'));
|
88 |
|
89 |
// set entered data if was error when we do save
|
230 |
$total = $result['total'];
|
231 |
$success = $result['success'];
|
232 |
$error = $result['error'];
|
233 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(sprintf("Processed %d Reminders (%d Error / %d Success)", $total, $error, $success));
|
234 |
} else {
|
235 |
Mage::getSingleton('adminhtml/session')->addError('Reminder rule sending failed.');
|
236 |
}
|
279 |
}
|
280 |
}
|
281 |
|
282 |
+
/**
|
283 |
+
* Customer grid ajax action
|
284 |
+
*
|
285 |
+
* @return void
|
286 |
+
*/
|
287 |
+
public function guestGridAction()
|
288 |
+
{
|
289 |
+
if ($this->_initRule('rule_id')) {
|
290 |
+
$block = $this->getLayout()->createBlock('bronto_reminder/adminhtml_reminder_edit_tab_guests');
|
291 |
+
$this->getResponse()->setBody($block->toHtml());
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
/**
|
296 |
* Convert dates in array from localized to internal format
|
297 |
*
|
app/code/community/Bronto/Reminder/controllers/LoadController.php
CHANGED
@@ -17,15 +17,16 @@ class Bronto_Reminder_LoadController extends Mage_Core_Controller_Front_Action
|
|
17 |
$store = $this->_getStoreByCode($storeCode);
|
18 |
$storeId = $store->getId();
|
19 |
Mage::app()->setCurrentStore($storeId);
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
$
|
22 |
-
$quoteId = $this->getRequest()->getParam('id');
|
23 |
-
$ruleId = $this->getRequest()->getParam('rule_id', 0);
|
24 |
-
$messageId = $this->getRequest()->getParam('message_id', 0);
|
25 |
-
|
26 |
-
if (!empty($quoteId)){
|
27 |
$quoteId = Mage::helper('core')->decrypt(base64_decode(urldecode($quoteId)));
|
28 |
-
|
29 |
if (!empty($quoteId)) {
|
30 |
/* @var $quote Mage_Sales_Model_Quote */
|
31 |
$quote = Mage::getModel('sales/quote')
|
@@ -36,14 +37,35 @@ class Bronto_Reminder_LoadController extends Mage_Core_Controller_Front_Action
|
|
36 |
Mage::getSingleton('checkout/session')->setQuoteId($quote->getId());
|
37 |
Mage::getSingleton('checkout/session')->resetCheckout();
|
38 |
}
|
|
|
|
|
39 |
}
|
40 |
}
|
|
|
|
|
|
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
if ($ruleId && $quote) {
|
43 |
$customerId = $quote->getCustomerId();
|
44 |
$customerId = ($customerId) ? $customerId : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
$log = Mage::getModel('bronto_reminder/rule')
|
46 |
-
->getRuleLogItems($ruleId, $customerId, $messageId);
|
47 |
|
48 |
if (!empty($messageId)) {
|
49 |
Mage::getSingleton('checkout/session')->setBrontoMessageId($messageId);
|
@@ -54,12 +76,10 @@ class Bronto_Reminder_LoadController extends Mage_Core_Controller_Front_Action
|
|
54 |
}
|
55 |
}
|
56 |
|
57 |
-
$redirectUrl = Mage::app()->getStore()->getUrl('checkout/cart');
|
58 |
-
|
59 |
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])){
|
60 |
$redirectUrl .= '?' . $_SERVER['QUERY_STRING'];
|
61 |
}
|
62 |
-
|
63 |
$this->_redirectUrl($redirectUrl);
|
64 |
}
|
65 |
|
17 |
$store = $this->_getStoreByCode($storeCode);
|
18 |
$storeId = $store->getId();
|
19 |
Mage::app()->setCurrentStore($storeId);
|
20 |
+
$quote = false;
|
21 |
+
$quoteId = $this->getRequest()->getParam('id');
|
22 |
+
$wishlist = false;
|
23 |
+
$wishlistId = $this->getRequest()->getParam('wishlist_id');
|
24 |
+
$ruleId = $this->getRequest()->getParam('rule_id', 0);
|
25 |
+
$messageId = $this->getRequest()->getParam('message_id', 0);
|
26 |
|
27 |
+
if (!empty($quoteId)) {
|
|
|
|
|
|
|
|
|
|
|
28 |
$quoteId = Mage::helper('core')->decrypt(base64_decode(urldecode($quoteId)));
|
29 |
+
|
30 |
if (!empty($quoteId)) {
|
31 |
/* @var $quote Mage_Sales_Model_Quote */
|
32 |
$quote = Mage::getModel('sales/quote')
|
37 |
Mage::getSingleton('checkout/session')->setQuoteId($quote->getId());
|
38 |
Mage::getSingleton('checkout/session')->resetCheckout();
|
39 |
}
|
40 |
+
|
41 |
+
$redirectUrl = Mage::app()->getStore()->getUrl('checkout/cart');
|
42 |
}
|
43 |
}
|
44 |
+
|
45 |
+
if (!empty($wishlistId)) {
|
46 |
+
$wishlistId = Mage::helper('core')->decrypt(base64_decode(urldecode($wishlistId)));
|
47 |
|
48 |
+
if (!empty($wishlistId)) {
|
49 |
+
/* @var $quote Mage_Wishlist_Model_Wishlist */
|
50 |
+
$wishlist = Mage::getModel('wishlist/wishlist')
|
51 |
+
->setStoreId($storeId)
|
52 |
+
->load($wishlistId);
|
53 |
+
|
54 |
+
$redirectUrl = Mage::app()->getStore()->getUrl('wishlist');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
if ($ruleId && $quote) {
|
59 |
$customerId = $quote->getCustomerId();
|
60 |
$customerId = ($customerId) ? $customerId : 0;
|
61 |
+
} elseif ($ruleId && $wishlist) {
|
62 |
+
$customerId = $wishlist->getCustomerId();
|
63 |
+
$customerId = ($customerId) ? $customerId : 0;
|
64 |
+
}
|
65 |
+
|
66 |
+
if ($customerId) {
|
67 |
$log = Mage::getModel('bronto_reminder/rule')
|
68 |
+
->getRuleLogItems($ruleId, $storeId, $customerId, $messageId);
|
69 |
|
70 |
if (!empty($messageId)) {
|
71 |
Mage::getSingleton('checkout/session')->setBrontoMessageId($messageId);
|
76 |
}
|
77 |
}
|
78 |
|
|
|
|
|
79 |
if (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])){
|
80 |
$redirectUrl .= '?' . $_SERVER['QUERY_STRING'];
|
81 |
}
|
82 |
+
|
83 |
$this->_redirectUrl($redirectUrl);
|
84 |
}
|
85 |
|
app/code/community/Bronto/Reminder/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Reminder>
|
5 |
-
<version>1.4.
|
6 |
</Bronto_Reminder>
|
7 |
</modules>
|
8 |
<global>
|
@@ -92,14 +92,24 @@
|
|
92 |
</bronto_reminder>
|
93 |
</routers>
|
94 |
<events>
|
95 |
-
<
|
96 |
<observers>
|
97 |
-
<
|
98 |
<class>bronto_reminder/observer</class>
|
99 |
-
<method>
|
100 |
-
</
|
101 |
</observers>
|
102 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
</events>
|
104 |
</frontend>
|
105 |
<admin>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Bronto_Reminder>
|
5 |
+
<version>1.4.12</version>
|
6 |
</Bronto_Reminder>
|
7 |
</modules>
|
8 |
<global>
|
92 |
</bronto_reminder>
|
93 |
</routers>
|
94 |
<events>
|
95 |
+
<sales_quote_save_after>
|
96 |
<observers>
|
97 |
+
<bronto_reminder_update_reminder_queue>
|
98 |
<class>bronto_reminder/observer</class>
|
99 |
+
<method>updateReminderQueue</method>
|
100 |
+
</bronto_reminder_update_reminder_queue>
|
101 |
</observers>
|
102 |
+
</sales_quote_save_after>
|
103 |
+
</events>
|
104 |
+
<events>
|
105 |
+
<wishlist_save_after>
|
106 |
+
<observers>
|
107 |
+
<bronto_reminder_update_reminder_queue>
|
108 |
+
<class>bronto_reminder/observer</class>
|
109 |
+
<method>updateReminderQueue</method>
|
110 |
+
</bronto_reminder_update_reminder_queue>
|
111 |
+
</observers>
|
112 |
+
</wishlist_save_after>
|
113 |
</events>
|
114 |
</frontend>
|
115 |
<admin>
|
app/code/community/Bronto/Reminder/etc/system.xml
CHANGED
@@ -21,12 +21,12 @@
|
|
21 |
<settings translate="label">
|
22 |
<label>Settings</label>
|
23 |
<frontend_type>text</frontend_type>
|
|
|
24 |
<sort_order>1</sort_order>
|
25 |
<show_in_default>1</show_in_default>
|
26 |
<show_in_website>1</show_in_website>
|
27 |
<show_in_store>1</show_in_store>
|
28 |
<expanded>1</expanded>
|
29 |
-
<comment><![CDATA[Additional configuration located at: <strong>Promotions › <a href="/admin/reminders/">Bronto Reminder Emails</a></strong><br/><br/>]]></comment>
|
30 |
<fields>
|
31 |
<enabled translate="label">
|
32 |
<label>Enable Module</label>
|
@@ -38,13 +38,23 @@
|
|
38 |
<show_in_website>1</show_in_website>
|
39 |
<show_in_store>1</show_in_store>
|
40 |
</enabled>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<frequency translate="label">
|
42 |
<label>Frequency</label>
|
43 |
<depends><enabled>1</enabled></depends>
|
44 |
<frontend_type>select</frontend_type>
|
45 |
<source_model>bronto_common/system_config_source_cron_frequency</source_model>
|
46 |
<backend_model>bronto_reminder/system_config_backend_cron</backend_model>
|
47 |
-
<sort_order>
|
48 |
<show_in_default>1</show_in_default>
|
49 |
<show_in_website>0</show_in_website>
|
50 |
<show_in_store>0</show_in_store>
|
@@ -55,7 +65,7 @@
|
|
55 |
<depends><frequency>I</frequency></depends>
|
56 |
<frontend_type>select</frontend_type>
|
57 |
<source_model>bronto_common/system_config_source_cron_minutes</source_model>
|
58 |
-
<sort_order>
|
59 |
<show_in_default>1</show_in_default>
|
60 |
<show_in_website>0</show_in_website>
|
61 |
<show_in_store>0</show_in_store>
|
@@ -63,9 +73,10 @@
|
|
63 |
</interval>
|
64 |
<minutes translate="label">
|
65 |
<label>Minute of the Hour</label>
|
|
|
66 |
<depends><frequency>H</frequency></depends>
|
67 |
<frontend_type>text</frontend_type>
|
68 |
-
<sort_order>
|
69 |
<show_in_default>1</show_in_default>
|
70 |
<show_in_website>0</show_in_website>
|
71 |
<show_in_store>0</show_in_store>
|
@@ -75,7 +86,7 @@
|
|
75 |
<label>Start Time</label>
|
76 |
<depends><enabled>1</enabled></depends>
|
77 |
<frontend_type>time</frontend_type>
|
78 |
-
<sort_order>
|
79 |
<show_in_default>1</show_in_default>
|
80 |
<show_in_website>0</show_in_website>
|
81 |
<show_in_store>0</show_in_store>
|
@@ -84,7 +95,7 @@
|
|
84 |
<label>Maximum Emails per Run</label>
|
85 |
<depends><enabled>1</enabled></depends>
|
86 |
<frontend_type>text</frontend_type>
|
87 |
-
<sort_order>
|
88 |
<show_in_default>1</show_in_default>
|
89 |
<show_in_website>1</show_in_website>
|
90 |
<show_in_store>1</show_in_store>
|
@@ -93,7 +104,7 @@
|
|
93 |
<label>Email Send Failure Threshold</label>
|
94 |
<depends><enabled>1</enabled></depends>
|
95 |
<frontend_type>text</frontend_type>
|
96 |
-
<sort_order>
|
97 |
<show_in_default>1</show_in_default>
|
98 |
<show_in_website>1</show_in_website>
|
99 |
<show_in_store>1</show_in_store>
|
21 |
<settings translate="label">
|
22 |
<label>Settings</label>
|
23 |
<frontend_type>text</frontend_type>
|
24 |
+
<frontend_model>bronto_reminder/adminhtml_system_config_settings</frontend_model>
|
25 |
<sort_order>1</sort_order>
|
26 |
<show_in_default>1</show_in_default>
|
27 |
<show_in_website>1</show_in_website>
|
28 |
<show_in_store>1</show_in_store>
|
29 |
<expanded>1</expanded>
|
|
|
30 |
<fields>
|
31 |
<enabled translate="label">
|
32 |
<label>Enable Module</label>
|
38 |
<show_in_website>1</show_in_website>
|
39 |
<show_in_store>1</show_in_store>
|
40 |
</enabled>
|
41 |
+
<allow_send translate="label">
|
42 |
+
<label>Allow Sending Reminders</label>
|
43 |
+
<frontend_type>select</frontend_type>
|
44 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
45 |
+
<sort_order>2</sort_order>
|
46 |
+
<show_in_default>1</show_in_default>
|
47 |
+
<show_in_website>1</show_in_website>
|
48 |
+
<show_in_store>1</show_in_store>
|
49 |
+
<comment>Selecting 'Yes' will allow emails to being sending. 'No' will allow matching customers but will not send emails</comment>
|
50 |
+
</allow_send>
|
51 |
<frequency translate="label">
|
52 |
<label>Frequency</label>
|
53 |
<depends><enabled>1</enabled></depends>
|
54 |
<frontend_type>select</frontend_type>
|
55 |
<source_model>bronto_common/system_config_source_cron_frequency</source_model>
|
56 |
<backend_model>bronto_reminder/system_config_backend_cron</backend_model>
|
57 |
+
<sort_order>3</sort_order>
|
58 |
<show_in_default>1</show_in_default>
|
59 |
<show_in_website>0</show_in_website>
|
60 |
<show_in_store>0</show_in_store>
|
65 |
<depends><frequency>I</frequency></depends>
|
66 |
<frontend_type>select</frontend_type>
|
67 |
<source_model>bronto_common/system_config_source_cron_minutes</source_model>
|
68 |
+
<sort_order>4</sort_order>
|
69 |
<show_in_default>1</show_in_default>
|
70 |
<show_in_website>0</show_in_website>
|
71 |
<show_in_store>0</show_in_store>
|
73 |
</interval>
|
74 |
<minutes translate="label">
|
75 |
<label>Minute of the Hour</label>
|
76 |
+
<depends><enabled>1</enabled></depends>
|
77 |
<depends><frequency>H</frequency></depends>
|
78 |
<frontend_type>text</frontend_type>
|
79 |
+
<sort_order>5</sort_order>
|
80 |
<show_in_default>1</show_in_default>
|
81 |
<show_in_website>0</show_in_website>
|
82 |
<show_in_store>0</show_in_store>
|
86 |
<label>Start Time</label>
|
87 |
<depends><enabled>1</enabled></depends>
|
88 |
<frontend_type>time</frontend_type>
|
89 |
+
<sort_order>6</sort_order>
|
90 |
<show_in_default>1</show_in_default>
|
91 |
<show_in_website>0</show_in_website>
|
92 |
<show_in_store>0</show_in_store>
|
95 |
<label>Maximum Emails per Run</label>
|
96 |
<depends><enabled>1</enabled></depends>
|
97 |
<frontend_type>text</frontend_type>
|
98 |
+
<sort_order>7</sort_order>
|
99 |
<show_in_default>1</show_in_default>
|
100 |
<show_in_website>1</show_in_website>
|
101 |
<show_in_store>1</show_in_store>
|
104 |
<label>Email Send Failure Threshold</label>
|
105 |
<depends><enabled>1</enabled></depends>
|
106 |
<frontend_type>text</frontend_type>
|
107 |
+
<sort_order>8</sort_order>
|
108 |
<show_in_default>1</show_in_default>
|
109 |
<show_in_website>1</show_in_website>
|
110 |
<show_in_store>1</show_in_store>
|
app/code/community/Bronto/Reminder/sql/bronto_reminder_setup/mysql4-upgrade-1.4.11-1.4.12.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
try {
|
9 |
+
$installer->run("
|
10 |
+
TRUNCATE `{$installer->getTable('bronto_reminder/coupon')}`;
|
11 |
+
TRUNCATE `{$installer->getTable('bronto_reminder/log')}`;
|
12 |
+
TRUNCATE `{$installer->getTable('bronto_reminder/website')}`;
|
13 |
+
TRUNCATE `{$installer->getTable('bronto_reminder/message')}`;
|
14 |
+
DELETE FROM `{$installer->getTable('bronto_reminder/rule')}`;
|
15 |
+
|
16 |
+
ALTER TABLE `{$installer->getTable('bronto_reminder/coupon')}`
|
17 |
+
ADD COLUMN `unique_id` VARCHAR(20) NOT NULL AFTER `coupon_id`,
|
18 |
+
ADD COLUMN `store_id` INT(10) UNSIGNED NOT NULL AFTER `unique_id`,
|
19 |
+
ADD COLUMN `visitor_id` int(10) unsigned NOT NULL DEFAULT '0' AFTER `customer_id`,
|
20 |
+
ADD COLUMN `quote_id` int(10) unsigned NOT NULL DEFAULT '0' AFTER `visitor_id`,
|
21 |
+
ADD COLUMN `wishlist_id` int(10) unsigned NOT NULL DEFAULT '0' AFTER `quote_id`,
|
22 |
+
DROP PRIMARY KEY,
|
23 |
+
ADD PRIMARY KEY (`rule_id`,`unique_id`,`store_id`,`customer_id`,`visitor_id`,`quote_id`,`wishlist_id`);
|
24 |
+
|
25 |
+
ALTER TABLE `{$installer->getTable('bronto_reminder/log')}`
|
26 |
+
DROP COLUMN `customer_id` ,
|
27 |
+
ADD COLUMN `unique_id` VARCHAR(20) NOT NULL AFTER `rule_id`,
|
28 |
+
DROP INDEX `IDX_BRONTO_REMINDER_LOG_CUSTOMER`;
|
29 |
+
");
|
30 |
+
} catch (Exception $e) {
|
31 |
+
throw new RuntimeException('Failed Modifying Table: ' . $e->getMessage());
|
32 |
+
}
|
33 |
+
|
34 |
+
$installer->endSetup();
|
app/code/community/Bronto/Roundtrip/Helper/Data.php
CHANGED
@@ -136,7 +136,7 @@ class Bronto_Roundtrip_Helper_Data
|
|
136 |
*/
|
137 |
public function setRoundtripStatus($path, $value, $scope = null, $scopeId = null)
|
138 |
{
|
139 |
-
$scope = (in_array($scope, 'default', 'websites', 'stores')) ? $scope : 'default';
|
140 |
$scopeId = (is_int($scopeId)) ? $scopeId : 0;
|
141 |
|
142 |
return Mage::getSingleton('core/config')
|
136 |
*/
|
137 |
public function setRoundtripStatus($path, $value, $scope = null, $scopeId = null)
|
138 |
{
|
139 |
+
$scope = (in_array($scope, array('default', 'websites', 'stores'))) ? $scope : 'default';
|
140 |
$scopeId = (is_int($scopeId)) ? $scopeId : 0;
|
141 |
|
142 |
return Mage::getSingleton('core/config')
|
app/design/frontend/base/default/layout/bronto/order.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="root">
|
5 |
+
<block type="bronto_order/bta" name="before_body_end" as="before_body_end"/>
|
6 |
+
</reference>
|
7 |
+
</default>
|
8 |
+
</layout>
|
9 |
+
|
lib/Bronto/Api.php
CHANGED
@@ -306,6 +306,16 @@ class Bronto_Api
|
|
306 |
{
|
307 |
return $this->getObject('contact');
|
308 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
/**
|
311 |
* Proxy for intellisense
|
306 |
{
|
307 |
return $this->getObject('contact');
|
308 |
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Proxy for intellisense
|
312 |
+
*
|
313 |
+
* @return Bronto_Api_ContentTag
|
314 |
+
*/
|
315 |
+
public function getContentTagObject()
|
316 |
+
{
|
317 |
+
return $this->getObject('contentTag');
|
318 |
+
}
|
319 |
|
320 |
/**
|
321 |
* Proxy for intellisense
|
lib/Bronto/Api/ContentTag.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @author Jeremy Bobbitt <jeremy.bobbitt@bronto.com>
|
5 |
+
* @copyright 2011-2013 Bronto Software, Inc.
|
6 |
+
* @license http://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
|
7 |
+
*
|
8 |
+
* @link http://community.bronto.com/api/v4/objects/general/contenttagobject
|
9 |
+
*
|
10 |
+
* @method Bronto_Api_ContentTag_Row createRow() createRow(array $data = array())
|
11 |
+
*/
|
12 |
+
class Bronto_Api_ContentTag extends Bronto_Api_Object
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* The object name.
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
protected $_name = 'ContentTag';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
protected $_methods = array(
|
25 |
+
'addContentTags' => 'add',
|
26 |
+
'readContentTags' => 'read',
|
27 |
+
'updateContentTags' => 'update',
|
28 |
+
'deleteContentTags' => 'delete'
|
29 |
+
);
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @param array $filter
|
33 |
+
* @param bool $includeContent
|
34 |
+
* @param int $pageNumber
|
35 |
+
* @return Bronto_Api_Rowset
|
36 |
+
*/
|
37 |
+
public function readAll(array $filter = array(), $includeContent = true, $pageNumber = 1)
|
38 |
+
{
|
39 |
+
$params = array();
|
40 |
+
$params['filter'] = $filter;
|
41 |
+
$params['includeContent'] = (bool) $includeContent;
|
42 |
+
$params['pageNumber'] = (int) $pageNumber;
|
43 |
+
return $this->read($params);
|
44 |
+
}
|
45 |
+
}
|
lib/Bronto/Api/ContentTag/Exception.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* @copyright 2011-2013 Bronto Software, Inc.
|
5 |
+
* @license http://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
|
6 |
+
*/
|
7 |
+
class Bronto_Api_Message_Exception extends Bronto_Api_Exception
|
8 |
+
{
|
9 |
+
const INVALID_CONTENTTAG = 1601; // The content tag specified is invalid.
|
10 |
+
const MISSING_NAME = 1602; // You must specify a name.
|
11 |
+
const NAME_TOO_LONG = 1603; // Name must be 100 characters or less.
|
12 |
+
const INVALID_VALUE = 1604; // Tag value cannot contain another content tag.
|
13 |
+
const ALREADY_EXISTS = 1605; // A content tag with this name already exists.
|
14 |
+
}
|
lib/Bronto/Api/ContentTag/Row.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
*
|
5 |
+
* @copyright 2011-2013 Bronto Software, Inc.
|
6 |
+
* @license http://opensource.org/licenses/OSL-3.0 Open Software License v. 3.0 (OSL-3.0)
|
7 |
+
*
|
8 |
+
* @property-read string $id
|
9 |
+
* @property string $name
|
10 |
+
* @property string value
|
11 |
+
* @method Bronto_Api_ContentTag_Row delete() delete()
|
12 |
+
* @method Bronto_Api_ContentTag getApiObject() getApiObject()
|
13 |
+
*/
|
14 |
+
class Bronto_Api_ContentTag_Row extends Bronto_Api_Row
|
15 |
+
{
|
16 |
+
/**
|
17 |
+
* @return Bronto_Api_ContentTag_Row
|
18 |
+
*/
|
19 |
+
public function read()
|
20 |
+
{
|
21 |
+
if ($this->id) {
|
22 |
+
$params = array('id' => $this->id);
|
23 |
+
} elseif ($this->name) {
|
24 |
+
$params = array(
|
25 |
+
'name' => array(
|
26 |
+
'value' => $this->name,
|
27 |
+
'operator' => 'EqualTo',
|
28 |
+
)
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
parent::_read($params);
|
33 |
+
return $this;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @param bool $upsert
|
38 |
+
* @param bool $refresh
|
39 |
+
* @return Bronto_Api_ContentTag_Row
|
40 |
+
*/
|
41 |
+
public function save($upsert = true, $refresh = false)
|
42 |
+
{
|
43 |
+
if (!$upsert) {
|
44 |
+
parent::_save(false, $refresh);
|
45 |
+
}
|
46 |
+
|
47 |
+
try {
|
48 |
+
parent::_save(true, $refresh);
|
49 |
+
} catch (Bronto_Api_ContentTag_Exception $e) {
|
50 |
+
if ($e->getCode() === Bronto_Api_ContentTag_Exception::MESSAGE_EXISTS) {
|
51 |
+
$this->_refresh();
|
52 |
+
} else {
|
53 |
+
$this->getApi()->throwException($e);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bronto_Extension</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
@@ -55,9 +55,9 @@
|
|
55 |
<p />Bronto Software provides a cloud-based marketing platform for retailers to drive revenue through their email, mobile and social campaigns. The platform is used by over 1000 organizations worldwide, including Party City, Armani Exchange, Timex, Samsonite and Gander Mountain. Bronto is a Gold Magento Industry Partner and the leading self-service email marketing provider to the Internet Retailer Top 1000. Bronto is headquartered in Durham, NC with an office in London, UK. For more information, visit <a href="http://bronto.com">bronto.com</a>.</p></description>
|
56 |
<notes><p />For installation and configuration instructions, as well as a full list of new features and known issues, please review the <a href="http://a.bron.to/magento">Implementation Guide</a>.</notes>
|
57 |
<authors><author><name>Chris Geiss</name><user>BrontoSoftware</user><email>chris.geiss@bronto.com</email></author></authors>
|
58 |
-
<date>2013-
|
59 |
-
<time>
|
60 |
-
<contents><target name="magecommunity"><dir name="Bronto"><dir name="Common"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="587a6b5a525a0d695ca1d1c31ca44fb1"/><file name="Cron.php" hash="1a718ab7d39492ff064618f7507d35ef"/><dir name="Form"><dir name="Field"><file name="Apitoken.php" hash="d8ed503f8d22d96b0ee79f18426bb8a1"/><file name="Hidden.php" hash="18a13153df6dd084840086105f8117cc"/><file name="List.php" hash="48f36e9d06e6bc759e36ebb1128aa513"/></dir><file name="Field.php" hash="bfc0b65b927934ba54bb5225c0fb9247"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="aa0f86b84c97399bdf259935de33dca0"/><file name="Data.php" hash="d71b8a47d17b6096613b9c004eb76bd9"/><file name="DataInterface.php" hash="a6700f3a4a79f6d6468df24f714427a9"/><file name="Field.php" hash="683839cfcd4fd5cd81b0393fc67b019c"/><file name="Message.php" hash="22d6224ab354a6ed7dc13d1e6e0a2fc5"/><file name="Product.php" hash="64202787e5f0c63a38efff387ab3c325"/></dir><dir name="Model"><file name="Api.php" hash="3716948a5e50e621625714a1e3a93263"/><dir name="Email"><dir name="Message"><file name="Filter.php" hash="4668bb03abbb5029980765c0b712fd5c"/><file name="Templatefilter.php" hash="783dcbb689021665f2b7f34f83bb99c2"/></dir><file name="Message.php" hash="17086fba16eed6986c0ab1fafbeffbd6"/></dir><file name="Keysentry.php" hash="fd39d0a0208668723d0c0adb0b31bd67"/><file name="Observer.php" hash="73b02a94aba279c05dd7753ac10fdb75"/><dir name="Resource"><file name="Setup.php" hash="780f5c070cbd9da2f003372ee90a0891"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="b05e28fb0cc0db0377eee68ffc712c10"/><file name="Token.php" hash="18368da2a435855841c8b5e2b10637b1"/></dir><dir name="Source"><dir name="Contact"><file name="Status.php" hash="1bf6c053f8132a36dd6882e0f1faf45f"/></dir><dir name="Cron"><file name="Frequency.php" hash="c6689871a7a8add3dc4b84e4a2ff6f10"/><file name="Minutes.php" hash="be3e3066819785b55a25f22c5bc9392a"/></dir><file name="Field.php" hash="d8a4089180cac8527bb98d831629d25c"/><file name="List.php" hash="69497100fe9f036c442b9d94133c8f4a"/><file name="Message.php" hash="4fb4e4f9deaabe4971bfcdf3e12b0da4"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="02b55ba2804a024740506c4df0ebdd42"/></dir><dir name="Model"><file name="Checkout.php" hash="9716ab2c76558e463f1a105308973b74"/><dir name="Keysentry"><dir name="fixtures"><file name="seed.yaml" hash="3a9b13b2ef5a72bea298be72edba821d"/></dir></dir><file name="Keysentry.php" hash="fe06eff7212d57057ed1ee490238694f"/></dir></dir><dir name="controllers"><file name="LogController.php" hash="d97e8dc3624053d563389b8b19c71c06"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f5792bf262cf83cc193d23c09a17a03f"/><file name="config.xml" hash="41263dadbca9b015cab770431c65b114"/><file name="system.xml" hash="5952ce44c1df3b13c5cb5a709718df2c"/></dir><dir name="sql"><dir name="bronto_common_setup"><file name="mysql4-install-1.7.0.php" hash="c8459d26fdfea2fb9430e8829b3257e1"/></dir></dir></dir><dir name="ConflictChecker"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="9049055c03e261b2452c926d801196a6"/><file name="Conflictchecker.php" hash="c00f929ef55e95597761871674077b10"/></dir></dir></dir><file name="Printer.php" hash="cd8ef4c01028da3d690ce6f5c53d1f61"/></dir><dir name="Helper"><file name="Data.php" hash="0f5c562370c77b6cfe9579dc7fe396d0"/></dir><dir name="Model"><dir name="Config"><file name="Blocks.php" hash="78eb63947ae94be2b1dc9ee42de52152"/><file name="Checker.php" hash="a1a38b9c4a518e0be2e4ea84adab0107"/><file name="ConfigAbstract.php" hash="8bc2be8485543a17338cb953d760c71c"/><file name="ConfigInterface.php" hash="86a788c1b1971828c8f947b42f03baea"/><file name="Datastore.php" hash="d2b37735fe127d831e6055e05b232fb8"/><file name="Helpers.php" hash="3de600b842bf90c53417843e9b4c1946"/><file name="Models.php" hash="0358f506ff4e5820b61b076701f0746d"/><file name="Printer.php" hash="6d2aec31a623b943d3d982c97999be13"/><file name="Resources.php" hash="9f12487e864cd4005c53b72fe02e4cf4"/></dir><dir name="Core"><dir name="Config"><file name="Base.php" hash="b1ecb5cd90e050d1c825beb65e6d888e"/><file name="Element.php" hash="2efb1a1c022cb393ab5718c1f7eafd1f"/></dir><file name="Config.php" hash="29408203a0aa8b7afa84ba16b1416f91"/></dir><dir name="Lib"><dir name="Varien"><dir name="Simplexml"><file name="Config.php" hash="3acbdd7d7c9fa6c346688e5083569596"/><file name="Element.php" hash="f5961e7a41035851cabf7fcd8022a13a"/></dir></dir></dir><dir name="Mysql4"><dir name="Core"><file name="Config.php" hash="36685bb89b45c71cfc447727ce66ea9a"/></dir></dir><dir name="Path"><dir name="Locator"><file name="Array.php" hash="f82c5966dab92ed91a9441a0231e7ace"/><file name="Factory.php" hash="bea2e4a6bea17815a9040341209f4256"/><file name="IteratorAbstract.php" hash="9adccb7c853d80e8d64a0eb8346f3cbc"/><file name="LocatorInterface.php" hash="b3cf0d528296ee0e87e7898da44baa47"/><file name="Stack.php" hash="4524078604b43dffcf57c7a23959ef03"/></dir></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="6b69bd1c0ce0e4c92c1c96436f79e83d"/></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="23de17a20f7a5588bb9761a2d3eb79ae"/></dir><dir name="Model"><dir name="Path"><dir name="Locator"><file name="Array.php" hash="e219f193e027d5c9a5d9cb9d7a27a6ac"/><file name="Factory.php" hash="36ffe1ec656f3f3ba1f99dd743e52c0b"/><file name="Stack.php" hash="29cbf00cd66bc61ee16c740847d9f400"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9d5cab56f52b0d12688c5787e3bfa03f"/><file name="config.xml" hash="0497e6c9bf942db62d01e0595437166b"/><file name="system.xml" hash="6d6b10860c55f815efe815d7ee0c2290"/></dir></dir><dir name="Customer"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5874d9bf1ff106212a348815104c5244"/><file name="Cron.php" hash="77979625bb4656aae7ed808ae9d19c51"/><dir name="Form"><dir name="Fieldset"><dir name="Attributes"><file name="Address.php" hash="d9b871fc6c94bf3cf78966dd00d36b64"/><file name="Customer.php" hash="ad245540adbc149c27d7f19eab62ab03"/></dir><file name="Attributes.php" hash="b5f1b004acd6a691213c82c59d7f65fb"/></dir></dir></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="74d38897533f7b4e67d476dd791a38ee"/><file name="Run.php" hash="e707627c781ea4323d1924fa33094320"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="176b96d3a5a85c4625b9350014fece2f"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="75692260aa13ebd1b312d016f1e55ea2"/></dir><file name="Queue.php" hash="97d19f161a404e1a92e1d4f17301b162"/><file name="Setup.php" hash="615e25c2d8493dcd4301650421c87f08"/></dir><file name="Observer.php" hash="3fe3886635517a7e4b08c317e4c5d57a"/><file name="Queue.php" hash="bb54d7305845f685fc4d5bf8a0e50710"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Brontofield.php" hash="dacabd748e68b2d830c30a839ce79e1f"/><file name="Cron.php" hash="dbcd55d41447d46fded27dfa2e6febb0"/><file name="Newfield.php" hash="d9a66dbc0b932fb80c7c947c3ce29bba"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="20025141111083480c8109d9619598bf"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomerController.php" hash="fd3bf1d27f31d8d3cab6e4432f7a7fbb"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6cc229b440b34da710887aaf96bbcf81"/><file name="config.xml" hash="a7ece4830e5766062bba51b58944afe0"/><file name="system.xml" hash="0e13fc7e0917b98b5d28aa658cd53027"/></dir><dir name="sql"><dir name="bronto_customer_setup"><file name="mysql4-install-1.0.0.php" hash="871c225318588b2804a05751bce45e1f"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="e7986d0b22a92f5df7a3480f80d7b937"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="b95305221a61733ff7617ce9307101c2"/></dir></dir></dir><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="10cb51420b205c100ef46cf59edef05b"/></dir><dir name="Email"><dir name="Log"><dir name="Grid"><dir name="Renderer"><file name="Customer.php" hash="c2530287b293e05508816049586ef5c2"/><file name="Fields.php" hash="6c5d921b6c636329f035381af4c7f028"/></dir></dir><file name="Grid.php" hash="b54cada4029aa45290679e6cf69f8c47"/></dir><file name="Log.php" hash="3fa0b873d262b3d5c6161c1aef33e6ae"/><dir name="Template"><dir name="Edit"><file name="Form.php" hash="804a3fc8d0e773639f8eb2fe3df1ab1f"/></dir><file name="Edit.php" hash="bcc5b9ba9bee92a3e8f33684dd02506f"/><dir name="Grid"><dir name="Renderer"><file name="Message.php" hash="bf56f19c9f4310609fbb9a788768e222"/></dir></dir><file name="Grid.php" hash="05f9642857698519f1b21a3c687abc8a"/></dir><file name="Template.php" hash="b33503babba2480ca840569629dfbb07"/></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="712033409f93712e4a22cf89252d44e4"/><file name="Data.php" hash="e582e103dfe73cb4ab9e6eb675f81309"/><file name="Field.php" hash="e4714e9cc95bdfe4da9a16feb604f44c"/><file name="Message.php" hash="f328dcee7934ddc48d6f4d40afff74cc"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="5d2c4b3ac3120352f8424863ad176dc6"/></dir><file name="Log.php" hash="2740d9cd5073106f58880e57e84ce8ee"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="6de4819537636d3ea7816cb7c6fc250c"/></dir><file name="Log.php" hash="15ffb2c83281c77b5d427ff29abac776"/></dir><file name="Observer.php" hash="0b67950706c21220a4712bc0c279ba00"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Email"><file name="Template.php" hash="ba80e6553c61e731b85c027cd688ca8f"/></dir></dir></dir></dir><dir name="Template"><file name="Import.php" hash="b808d3e5a70dc30e09448b20dd000708"/></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="8a74889c3f24c3053baefca6e7d7eddb"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="11a9aded1841673bdafd4675de78a19e"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="System"><dir name="Email"><file name="LogController.php" hash="386560ba30da12796614db1d0381bb7c"/><file name="TemplateController.php" hash="578112502761e70000ff10ca67502034"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="35a2ffa5e273f87b6d2de172cea4a219"/><file name="config.xml" hash="37e21ee9d0458bd28379446f063457a5"/><file name="system.xml" hash="ea9e30ce8eb25b0b7e840a7933640a27"/></dir><dir name="sql"><dir name="bronto_email_setup"><file name="mysql4-install-1.0.0.php" hash="516265312ede986c1a35a19b9e5bbfea"/><file name="mysql4-install-1.0.2.php" hash="327ac219e947d608fbf9d3209dd03bab"/><file name="mysql4-install-1.0.5.php" hash="327ac219e947d608fbf9d3209dd03bab"/><file name="mysql4-install-1.0.8.php" hash="b572625c1380dfffe3b089275ac1dc7e"/><file name="mysql4-install-1.1.2.php" hash="bf80f7b12eccdad2e0e36a564e18530c"/><file name="mysql4-upgrade-1.0.0-1.0.2.php" hash="1f797c3f909d72219ef5d00017b10554"/><file name="mysql4-upgrade-1.0.2-1.0.5.php" hash="f2c83b65500d9df0fd10c2e6721f2bfe"/><file name="mysql4-upgrade-1.0.5-1.0.8.php" hash="cdbda7aa084e51b9b222c56e548462a6"/><file name="mysql4-upgrade-1.0.8-1.1.1.php" hash="f2c83b65500d9df0fd10c2e6721f2bfe"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="0538afef03b1e21d509593e2ad275c34"/></dir></dir></dir><dir name="Newsletter"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="bc44a52305e7cbe3a41c5f19e6257ede"/><file name="Cron.php" hash="2253dab9a7475df825d4bcb7849cc3e9"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="98efb50dd447e6a60db7c25846ae0432"/><file name="Run.php" hash="49efe1ee4550454366fe5631fa2c6e88"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><file name="Newsletter.php" hash="ed221e46e61f3312a038c022dacf5fd7"/></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="4c1dcd95ea237397ac2ee82090ce32e4"/><file name="Data.php" hash="62e5be8e1326862fee10774654daad15"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="41a203d85e16a660bf20bec8ecf157fd"/></dir><file name="Queue.php" hash="9a890d3fe569edd426ce38afe564dc7a"/></dir><file name="Observer.php" hash="3688d8bfe594cf668dc255eea019ce45"/><file name="Queue.php" hash="89e6276cab088714b555c052172c4989"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="a270f0a31c390383cdabc0021baf3d3c"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="d88d07780bb3ded63c2c35439840dad5"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="NewsletterController.php" hash="fb1b701c2335e82e258ed16d2a5c8975"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="253518e92554bf89fabe7b832a7a562c"/><file name="config.xml" hash="1d0adbc56975d579620dabd02394ff38"/><file name="system.xml" hash="1314e4b54d7c89a75f8ca9b7d02623b8"/></dir><dir name="sql"><dir name="bronto_newsletter_setup"><file name="mysql4-install-1.0.0.php" hash="0f21d5315bbc4c27d0d38f9cf8c99bf3"/><file name="mysql4-install-1.4.0.php" hash="9bd28347f3330b857102900adf702bed"/><file name="mysql4-upgrade-1.4.0-1.4.1.php" hash="7eeba27e7b5480c8b502c3805554e2de"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="32f724b99d88e037ade72c8a9f1e0da7"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="63c728bb0cd7fa83bb5536d4500548f4"/><file name="mysql4-upgrade-1.4.3-1.4.4.php" hash="4f08a427c7706ea0988bcdcca6072218"/></dir></dir></dir><dir name="Order"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="ca80d06fb86b6bf676fc21188d5f2685"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="About.php" hash="126e3166dace48941fccbe2bb4c80264"/><file name="Cron.php" hash="8af3e2efe08150906d837ca2c991aff8"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="9bfbc1f1ffb38389a3a47ca009a24a35"/><file name="Run.php" hash="5b833a216bea22b962f633e33f6a86b8"/></dir></dir></dir><file name="Bta.php" hash="10f7f6f5e5e701dafefe8034095ae11e"/></dir><dir name="Helper"><file name="Data.php" hash="87f5a3a40ce32e8fcb2588ef7971c38d"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="7c6ffc1f53cdb660b97039736a53f911"/></dir><file name="Queue.php" hash="c25aee2c31258eedfd5734bf1f143979"/><file name="Setup.php" hash="b3ccddc52af0695c48cff499ed112901"/></dir><file name="Observer.php" hash="f06d0b34e5dc4d47bc173076403c85bd"/><dir name="Order"><file name="Observer.php" hash="901f9caf696e02ff7f917112c44c0c91"/></dir><file name="Queue.php" hash="bc8ccad1ea2a284d23ac7a0fdc6c3f7a"/><dir name="Quote"><file name="Observer.php" hash="9dc812fa729166fe441e6ef642266cdb"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="96199a296f15518a89fde9384cf5fb0d"/></dir><dir name="Source"><file name="Description.php" hash="67364bc17dc197e4dd2a6e0382c75722"/><file name="Limit.php" hash="789f0e42eaafa65b4970ad107206102c"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="29ce141400ea98642a0c200a721810a8"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OrderController.php" hash="1571c3dab9923178465f009cc052afb7"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0c4a0a1117117613d148157557f2abb3"/><file name="config.xml" hash="a872f39d7af8becb0b47dbae560db5cf"/><file name="system.xml" hash="4103906da8806c3d5bd68493ce984613"/></dir><dir name="sql"><dir name="bronto_order_setup"><file name="mysql4-install-1.0.0.php" hash="81b57488dbc44047db4099c41fdac54e"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="de0e97123c3183c6363c33b1344b76dd"/><file name="mysql4-upgrade-1.1.6-1.1.7.php" hash="fe4f45d4fe4e8d90267d9bb6a6b13b03"/></dir></dir></dir><dir name="PermissionChecker"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5c0990417244c38485b5c9eda45fa80a"/><file name="Permissionchecker.php" hash="9cabf571a4dab49fa26d8ff1b35b0646"/></dir></dir></dir><file name="Printer.php" hash="7f9d480227c8211aa9e2db66ecd34f3f"/></dir><dir name="Helper"><file name="Data.php" hash="4fab093494eb9a793583e2294d2a2489"/></dir><dir name="Model"><dir name="Validator"><file name="Checker.php" hash="2a8259840b7f0e75b52bdcc93adb8922"/><file name="Directory.php" hash="89a0981e5ed7b70446054d9e8f31300e"/><file name="File.php" hash="539342c217889f7fd0f19f3b731bea23"/><dir name="Filter"><file name="PatternIterator.php" hash="9bdc50cda8d18e3335d8fc07fa72f733"/></dir><file name="Group.php" hash="8dc26a97c43fa2bbe58264b3117324a9"/><file name="Owner.php" hash="fc20d838f28c3406d74475fd4dbf33f0"/><file name="Printer.php" hash="e49b843f43f835d35ba838a2b8c7d00d"/><file name="ValidatorAbstract.php" hash="bccd4db6601922c5a632680c226e03c6"/><file name="ValidatorInterface.php" hash="877e881c030573fdbcd344174eceec8a"/></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="672ed6161380fbf88a516377e62031be"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="058c7be44feea32fc5bc646a5632b4f3"/><file name="config.xml" hash="c4df9b0d873371a626029bd25cfe1c41"/><file name="system.xml" hash="f95239748b5ef006a38b1255356c6c65"/></dir></dir><dir name="Reminder"><dir name="Block"><dir name="Adminhtml"><dir name="Promo"><file name="Notice.php" hash="d5991ebe75066fa76f23eb9464619f08"/></dir><dir name="Reminder"><dir name="Edit"><file name="Form.php" hash="779f8effae92303da303c889db9cef65"/><dir name="Tab"><file name="Bronto.php" hash="a4f19c14cddab68e1180723984f10ccb"/><file name="Conditions.php" hash="f3ad1c6438079bf43183825b52fde3f3"/><file name="Customers.php" hash="edbda94b225a5f81e5a1a2ee72ab7e53"/><file name="General.php" hash="8c7ff650f320b57a208ecf825142e877"/></dir><file name="Tabs.php" hash="accefd148ad3cf28d36e890c138078f2"/></dir><file name="Edit.php" hash="a05e23f5249c97ac7965ecf27672d1a6"/><file name="Grid.php" hash="ebbe203d00c8e21ca591b55c48572cdb"/></dir><file name="Reminder.php" hash="82d616907ffc84eed0aa688f218ed7f1"/><dir name="System"><dir name="Config"><file name="About.php" hash="ce52e60802d1b9d251cef6a7c34564ce"/><file name="Cron.php" hash="ba8f69a491407b48ec72eb7351249c98"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Email.php" hash="5d9cbf69ea3bfcbc0f96d9a3dd8f613a"/><file name="Id.php" hash="e221f8f87969c1299a7daf3796dd7bbf"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="a46c741761b5440eda28c9a8ac2df080"/><file name="Data.php" hash="36eff50aafd65ca66f13aa15c5e65beb"/><file name="Message.php" hash="a02936281f98cd990ecd17c32bfada46"/></dir><dir name="Model"><dir name="Condition"><file name="Abstract.php" hash="92b5e50a4e9b39dff50d83f1099db882"/><dir name="Combine"><file name="Abstract.php" hash="ea03be5f19662b5392147b64c1049e2c"/></dir></dir><dir name="Email"><file name="Message.php" hash="fe2f318ef70bd0d7be3de34b77b5ef2d"/></dir><file name="Guest.php" hash="4e220c343693ca30560294f8e4cfc9be"/><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="4fc63d20f3f7a92770dcaebf17bba84e"/></dir><dir name="Guest"><file name="Collection.php" hash="9002af1ece49d28124724db5dd112119"/></dir><file name="Guest.php" hash="e8b815dce460b039053ef224628ad676"/><dir name="Rule"><file name="Collection.php" hash="2969bb11fa9e83523da7b41d834381b4"/></dir><file name="Rule.php" hash="38a1ac22b504900fe3b0d11426c3f7cf"/></dir><file name="Observer.php" hash="fc4471bd9b2aaaaa8eb689b591cce43f"/><dir name="Rule"><dir name="Condition"><dir name="Cart"><file name="Amount.php" hash="8b2a76a43ebe3735556757db407e3409"/><file name="Attributes.php" hash="6bc41aca8c8a7846fae4f894306ffa45"/><file name="Combine.php" hash="add54bf57284e6c48008db605e0df3d4"/><file name="Couponcode.php" hash="f0144e4e5bbf157e2268e3765b46dd24"/><file name="Itemsquantity.php" hash="6c605a49ebe9582f5b57e24085079a6b"/><file name="Sku.php" hash="090610f405b398600e00d33325ec12c4"/><file name="Storeview.php" hash="00262bc083ef7297989056cdf768274e"/><file name="Subcombine.php" hash="b10d46333d76a881654cc6d2a67e6880"/><file name="Subselection.php" hash="8873aa2845c638d6a7658652eec40f0e"/><file name="Totalquantity.php" hash="5edc528cbd0688746a01157595720076"/><file name="Virtual.php" hash="f65e64572c526c6c50e38d1bb9d9a52f"/></dir><file name="Cart.php" hash="399ea955cdabbaf90155b6a929435a50"/><dir name="Combine"><file name="Root.php" hash="4d020e164faa06fb94c01bc2f7c110b4"/></dir><file name="Combine.php" hash="74f9ec5b8560dabad1e303af18f4cff9"/><dir name="Wishlist"><file name="Attributes.php" hash="bb8205a2b00b58f2a092887db5ef8b63"/><file name="Combine.php" hash="b17a452ea9c090bea3cd1b2529171394"/><file name="Quantity.php" hash="6d228a7fbefd393924d9301c16c8e4b2"/><file name="Sharing.php" hash="9b1d05f4062a8bcda277be627a390c1d"/><file name="Storeview.php" hash="5edfdacb3d69379a4a144df29994ae97"/><file name="Subcombine.php" hash="a063b405ed07c454b5dd0b1d71af430f"/><file name="Subselection.php" hash="4640a52371cdb38c3eee73bd8b215b48"/></dir><file name="Wishlist.php" hash="3e19189f6a045df483635abfdd723304"/></dir></dir><file name="Rule.php" hash="2c3a858e05353c216b292451d68d9b85"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="3c9c134aee05b3b32fc64a549a3e7cb3"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="9610717f006248a90f113c699df523a6"/></dir><dir name="Helper"><file name="Contact.php" hash="e348af94ff0f5444e766fc17f3e6c774"/><file name="Data.php" hash="1b8a488f5aa2892bc39a2a3ad6ffd1d8"/><file name="Message.php" hash="4f4cc99f871c3da8ad0c1a35b7ec04df"/></dir><dir name="Model"><file name="Observer.php" hash="6740f1fa9261885c3ace0769c9dbff67"/><file name="Rule.php" hash="eb0d4025dda8b95e65fbd79df7e3d8da"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RemindersController.php" hash="f6854e9616c94294236f0aa3f8d91424"/></dir><file name="LoadController.php" hash="563a01392d2df74bd929d9d9e6de5060"/></dir><dir name="etc"><file name="adminhtml.xml" hash="772c6847e1961a7a56fdbcfbce6aaf91"/><file name="config.xml" hash="89f3b5a4225db5b6296938d56ed000ff"/><file name="system.xml" hash="1505adbe63b17e79af5b965a4e85bbae"/></dir><dir name="sql"><dir name="bronto_reminder_setup"><file name="mysql4-install-1.4.2.php" hash="1372af1369e9608159f5b59af75f367e"/><file name="mysql4-upgrade-1.4.0-1.4.2.php" hash="fefa638ca0ed7c5bc80a1b67e27c8703"/><file name="mysql4-upgrade-1.4.10-1.4.11.php" hash="130a688eb03e4f476308d0d11c32141a"/><file name="mysql4-upgrade-1.4.2-1.4.9.php" hash="4692060e7c938aea129c53619f0b3c19"/><file name="mysql4-upgrade-1.4.9-1.4.10.php" hash="9698883135211d54a3c711fead02c187"/></dir><dir name="reference"><file name="saveMatchedCustomers.sql" hash="c4f32ee8be31f7a652369c148271a6c7"/></dir></dir></dir><dir name="Roundtrip"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="6adab60e3a5a4668fdf5da8d8d33a024"/><file name="Status.php" hash="c623240112f1f15200f918394f736720"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Run.php" hash="f83df57a3248439261ccf9837a5d2ff9"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0170a7af8f6c989c7f4b19cc4dfb8748"/></dir><dir name="Model"><dir name="Contact"><file name="Builder.php" hash="e81e78a7e07a81f5a0ec53990d629a31"/></dir><dir name="Roundtrip"><dir name="Test"><file name="Order.php" hash="04ebcb9f0010cab7952b08014010f721"/></dir></dir><file name="Roundtrip.php" hash="1e07a998085bb9eb367d040c4b171220"/></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="dbe4fb05bff7630d6130f8d458ed1f57"/></dir><dir name="Model"><dir name="Roundtrip"><file name="Contact.php" hash="787fe5d49eba3819e9af030bb80beeaa"/><dir name="Test"><file name="Order.php" hash="5bf175ebba99f97a93fb6755977dbfa0"/></dir></dir><file name="Roundtrip.php" hash="c515d5cf63bdfbdab39e3f23901b4e47"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RoundtripController.php" hash="15d8ce6375063346d47ad832c80fd499"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="56be6bdda5b7652427bbab1e447a0d2e"/><file name="config.xml" hash="b34c9716b4c6fee7a1d8837b8debff65"/><file name="system.xml" hash="901a0736fb1109f9092fc98daa46dde7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bronto_All.xml" hash="5a9c06b6313882589765b9bcf0402bbb"/><file name="Bronto_ConflictChecker.xml" hash="1a7dc00b830ca2cc696e67d94b85be5d"/><file name="Bronto_Customer.xml" hash="a11c20f008ee2eae14baa3b549d5adee"/><file name="Bronto_Email.xml" hash="b7cdca4b15753edcefe8b9e0abb780bd"/><file name="Bronto_Newsletter.xml" hash="2115c5225e02ab5d4e56749cc5eff6ad"/><file name="Bronto_Order.xml" hash="63f1537add6088417945657bec98ffe9"/><file name="Bronto_PermissionChecker.xml" hash="55ff239c291529be2dc05799102d24a1"/><file name="Bronto_Reminder.xml" hash="08503ab78994178b822ef9b0add243f9"/><file name="Bronto_Roundtrip.xml" hash="bd2b89f3254e995904da92f025b6321c"/></dir></target><target name="magelib"><dir name="Bronto"><dir name="Api"><dir name="Account"><file name="Exception.php" hash="1a851457b2a032fb6d149fe9ef111c57"/><file name="Row.php" hash="3ab1e97019ef87bcd464eeaabf652886"/></dir><file name="Account.php" hash="33b9ba8867fe69135391c26f98b5852a"/><dir name="Activity"><file name="Exception.php" hash="3ac1f2caea6465931cbf927f1033ec06"/><file name="Row.php" hash="de166130c57670bf486a783a4501e2d4"/></dir><file name="Activity.php" hash="f5f48488e40507bc108b35c599e4e5a2"/><dir name="ApiToken"><file name="Exception.php" hash="e06d0a4c9469da7333e6a596e9c37c5d"/><file name="Row.php" hash="f3742811cec1cbf0be583296b617dfbd"/></dir><file name="ApiToken.php" hash="65bbd18974bbbf620dc2df23bdeb4469"/><dir name="Contact"><file name="Exception.php" hash="809bdce6db3bb9c72a3173bb08c1b19e"/><file name="Row.php" hash="2e360d131c2abe19e154b5f3795a58f0"/></dir><file name="Contact.php" hash="55bab8398154e96db6b0ca3ed88718e0"/><dir name="Conversion"><file name="Exception.php" hash="73dd991a663b99050428f54fc13fb433"/><file name="Row.php" hash="115d01ea0e0e6ade42fcab76dff71c35"/></dir><file name="Conversion.php" hash="60ec52dcfeda92294d1ab10bb29a486a"/><dir name="Delivery"><file name="Exception.php" hash="003dbb49ea3be65fe35dfa9b7ec743c5"/><file name="Recipient.php" hash="562bdc8d86b92ec293a338fdd7bf928a"/><file name="Row.php" hash="9c6149e74a305f62b9806df5a20e6a00"/></dir><file name="Delivery.php" hash="668dc6493cefe960c7dc8fe1fe87bf08"/><dir name="DeliveryGroup"><file name="Exception.php" hash="9291b2adb576a6781a0d624cc3288453"/><file name="Row.php" hash="29adb1f866cf1d24ef0abac19f95fbd0"/></dir><file name="DeliveryGroup.php" hash="7dd295b65f22e65dff3bf45c4336e985"/><file name="Exception.php" hash="bacb7c782ef7f612edaf3d39c20118ef"/><dir name="Field"><file name="Exception.php" hash="db651b9fa4b5161e3a32af49cc12cc64"/><file name="Predefined.php" hash="15fadb32175098d9ded60550d1748a4a"/><file name="Row.php" hash="6871d05f399a8a9dfa0742952eaa6481"/><file name="TypeGuesser.php" hash="1027ea97675a16cc964aa0d8ba63e642"/></dir><file name="Field.php" hash="32d5876335ec815acb50d3b4e7bf3ccd"/><dir name="List"><file name="Exception.php" hash="0f964fac998c89a0d4d515979bd81b98"/><file name="Row.php" hash="6516df43a1a94beee7b57fae71c27134"/></dir><file name="List.php" hash="ef240fe5e1422479a83291ad30b468ac"/><dir name="Login"><file name="ContactInformation.php" hash="bc1ce7f57c67fa21cd0881d0384a1cac"/><file name="Exception.php" hash="fff7546235b416b7008a9e4bd646fc19"/><file name="Row.php" hash="578553fcbf1941d0eb5890614c57ae91"/></dir><file name="Login.php" hash="a663864b51795799ff1a61528f380c80"/><dir name="Message"><file name="Exception.php" hash="755f7f14cdb234931708968ac0bad4a4"/><file name="Row.php" hash="5732b5550c8c6444790f2f20e626ff08"/></dir><file name="Message.php" hash="cc3c9939757371ad7fd2d297df394621"/><dir name="MessageRule"><file name="Exception.php" hash="b0398ee96ed70c483f38b50f305e82a8"/><file name="Row.php" hash="8e7532184ee265a927a195ac36e5a518"/></dir><file name="MessageRule.php" hash="ae1b3f16683656066a83bcf9f2863710"/><file name="Object.php" hash="19e3a4bcfd9031fa2c576f9c7f2cd27e"/><dir name="Order"><file name="Exception.php" hash="8312e1a1ab46bcf88b72983bb11a6493"/><file name="Product.php" hash="3785f2f460fec6c18c6164176de52449"/><file name="Row.php" hash="1400de022188806bb94e98544c054ef6"/></dir><file name="Order.php" hash="ad690b37bc577879020d10e5ac70ef3d"/><dir name="Row"><file name="Exception.php" hash="4c1a45512e0912644f94a88d4298d3a9"/></dir><file name="Row.php" hash="259418b11987939378747a9c46fae1ae"/><dir name="Rowset"><file name="Exception.php" hash="b5202ed6f61bfe06b90f73c03ca28ffa"/><file name="Iterator.php" hash="9ea7a244b83e7b9318bfe8ed371a149f"/></dir><file name="Rowset.php" hash="3f40382933e2f392b6320fd79db720cd"/><dir name="Segment"><file name="Exception.php" hash="bd5c2302ef222ff55981cc38477a9310"/><file name="Row.php" hash="b840493b8b2c3cb6686de0e5bedfa2ba"/></dir><file name="Segment.php" hash="0cf99babff6169afa427f302c76023dd"/></dir><file name="Api.php" hash="afcccdc4a3f3b594e985c93afe924df8"/><file name="SoapClient.php" hash="c9e56dc7f88d71cfbb98b3476bad5ead"/><dir name="Util"><file name="Colors.php" hash="14313213b3a70c79a56c574523b9b90b"/><file name="CountryCodes.php" hash="4efb9c354d29a901368c46aab40f79d4"/><dir name="Retryer"><file name="FileRetryer.php" hash="bdc72ace54ace32081115442d28cb972"/><file name="RetryerException.php" hash="54b70d7abbc32b55649a193e8e70dcb5"/><file name="RetryerInterface.php" hash="cc57d5a02a55811a13a31ed9beff126f"/></dir><file name="Uuid.php" hash="ba62bdec6488ccb621e0bfd726c6107a"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="bronto"><file name="cron.css" hash="c7260d3aa14b5945ee76c72dbd914efa"/><dir name="images"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="bg_notifications.gif" hash="df73b8aa7e48bb56e0a644245aa3683f"/><file name="logo.jpg" hash="3c6059218195679d99dbb874bdabbd07"/><file name="message_approved.gif" hash="465a056a3ba3d94367f51c3c0b751391"/><file name="message_not_approved.gif" hash="e4f28607f075a105e53fa3113d84bd26"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bronto"><dir name="newsletter"><file name="js.phtml" hash="a01ed75d8aff216f753ac2b13b51a404"/></dir></dir></dir><dir name="layout"><dir name="bronto"><file name="newsletter.xml" hash="b7d4c9b1fb4fabb4255c6df64e98d332"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="bronto"><dir name="common"><file name="about.phtml" hash="f115cbc70309f4e3b14d33cf29bdb274"/><file name="cron.phtml" hash="f1dbdea68c377d7057230697450e16b1"/></dir><dir name="conflictchecker"><file name="errors.phtml" hash="26c9fa4332b8518141de9dab0db0c823"/></dir><dir name="email"><dir name="template"><file name="edit.phtml" hash="35c4f68337a6be7186be1aac0fbe404e"/><file name="list.phtml" hash="cf2503d79273b5a611cde3acde2bb79d"/></dir></dir><dir name="permissionchecker"><file name="errors.phtml" hash="0306e132afed0c88058be67d37dd211c"/></dir><dir name="roundtrip"><file name="status.phtml" hash="8dcb1b72071c00888c8f6ad7b6d18d9b"/></dir></dir></dir><dir name="layout"><dir name="bronto"><file name="email.xml" hash="be77c906770a0d818898a910b03cbe4f"/><file name="reminder.xml" hash="98d835f287cb3aa2ff801f0219f88ccc"/><file name="roundtrip.xml" hash="3da91d3bcb40e1805a80fb2a18ed9cee"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="bronto"><file name="abandoned_cart.html" hash="20b0f55098c0f07bf96da3c5309d9192"/></dir></dir></dir></dir></target></contents>
|
61 |
<compatible/>
|
62 |
<dependencies><required><php><min>5.2.13</min><max>5.5.0</max></php><extension><name>soap</name><min></min><max></max></extension><extension><name>openssl</name><min></min><max></max></extension></required></dependencies>
|
63 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Bronto_Extension</name>
|
4 |
+
<version>2.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
55 |
<p />Bronto Software provides a cloud-based marketing platform for retailers to drive revenue through their email, mobile and social campaigns. The platform is used by over 1000 organizations worldwide, including Party City, Armani Exchange, Timex, Samsonite and Gander Mountain. Bronto is a Gold Magento Industry Partner and the leading self-service email marketing provider to the Internet Retailer Top 1000. Bronto is headquartered in Durham, NC with an office in London, UK. For more information, visit <a href="http://bronto.com">bronto.com</a>.</p></description>
|
56 |
<notes><p />For installation and configuration instructions, as well as a full list of new features and known issues, please review the <a href="http://a.bron.to/magento">Implementation Guide</a>.</notes>
|
57 |
<authors><author><name>Chris Geiss</name><user>BrontoSoftware</user><email>chris.geiss@bronto.com</email></author></authors>
|
58 |
+
<date>2013-06-27</date>
|
59 |
+
<time>20:50:14</time>
|
60 |
+
<contents><target name="magecommunity"><dir name="Bronto"><dir name="Common"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="3350c4d1d1fe695179d6ed9a6d621481"/><file name="Cron.php" hash="1a718ab7d39492ff064618f7507d35ef"/><dir name="Form"><dir name="Field"><file name="Apitoken.php" hash="d8ed503f8d22d96b0ee79f18426bb8a1"/><file name="Hidden.php" hash="18a13153df6dd084840086105f8117cc"/><file name="List.php" hash="48f36e9d06e6bc759e36ebb1128aa513"/></dir><file name="Field.php" hash="bfc0b65b927934ba54bb5225c0fb9247"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="aa0f86b84c97399bdf259935de33dca0"/><file name="Data.php" hash="d71b8a47d17b6096613b9c004eb76bd9"/><file name="DataInterface.php" hash="a6700f3a4a79f6d6468df24f714427a9"/><file name="Field.php" hash="683839cfcd4fd5cd81b0393fc67b019c"/><file name="Message.php" hash="22d6224ab354a6ed7dc13d1e6e0a2fc5"/><file name="Product.php" hash="64202787e5f0c63a38efff387ab3c325"/></dir><dir name="Model"><file name="Api.php" hash="3716948a5e50e621625714a1e3a93263"/><dir name="Email"><dir name="Message"><file name="Filter.php" hash="5758c71217e4e545af31fec29d263576"/><file name="Templatefilter.php" hash="16f44ac2a7d97b27f33a06e59de8ea30"/></dir><file name="Message.php" hash="17086fba16eed6986c0ab1fafbeffbd6"/></dir><file name="Keysentry.php" hash="fd39d0a0208668723d0c0adb0b31bd67"/><file name="Observer.php" hash="73b02a94aba279c05dd7753ac10fdb75"/><dir name="Resource"><file name="Setup.php" hash="780f5c070cbd9da2f003372ee90a0891"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="b05e28fb0cc0db0377eee68ffc712c10"/><file name="Token.php" hash="18368da2a435855841c8b5e2b10637b1"/></dir><dir name="Source"><dir name="Contact"><file name="Status.php" hash="1bf6c053f8132a36dd6882e0f1faf45f"/></dir><dir name="Cron"><file name="Frequency.php" hash="c6689871a7a8add3dc4b84e4a2ff6f10"/><file name="Minutes.php" hash="be3e3066819785b55a25f22c5bc9392a"/></dir><file name="Field.php" hash="d8a4089180cac8527bb98d831629d25c"/><file name="List.php" hash="69497100fe9f036c442b9d94133c8f4a"/><file name="Message.php" hash="4fb4e4f9deaabe4971bfcdf3e12b0da4"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="02b55ba2804a024740506c4df0ebdd42"/></dir><dir name="Model"><file name="Checkout.php" hash="9716ab2c76558e463f1a105308973b74"/><dir name="Keysentry"><dir name="fixtures"><file name="seed.yaml" hash="3a9b13b2ef5a72bea298be72edba821d"/></dir></dir><file name="Keysentry.php" hash="fe06eff7212d57057ed1ee490238694f"/></dir></dir><dir name="controllers"><file name="LogController.php" hash="d97e8dc3624053d563389b8b19c71c06"/></dir><dir name="etc"><file name="adminhtml.xml" hash="f5792bf262cf83cc193d23c09a17a03f"/><file name="config.xml" hash="a43f9baf3251c53a3a696a57b3b8226a"/><file name="system.xml" hash="5952ce44c1df3b13c5cb5a709718df2c"/></dir><dir name="sql"><dir name="bronto_common_setup"><file name="mysql4-install-1.7.0.php" hash="c8459d26fdfea2fb9430e8829b3257e1"/></dir></dir></dir><dir name="ConflictChecker"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="9049055c03e261b2452c926d801196a6"/><file name="Conflictchecker.php" hash="c00f929ef55e95597761871674077b10"/></dir></dir></dir><file name="Printer.php" hash="cd8ef4c01028da3d690ce6f5c53d1f61"/></dir><dir name="Helper"><file name="Data.php" hash="0f5c562370c77b6cfe9579dc7fe396d0"/></dir><dir name="Model"><dir name="Config"><file name="Blocks.php" hash="78eb63947ae94be2b1dc9ee42de52152"/><file name="Checker.php" hash="a1a38b9c4a518e0be2e4ea84adab0107"/><file name="ConfigAbstract.php" hash="8bc2be8485543a17338cb953d760c71c"/><file name="ConfigInterface.php" hash="86a788c1b1971828c8f947b42f03baea"/><file name="Datastore.php" hash="d2b37735fe127d831e6055e05b232fb8"/><file name="Helpers.php" hash="3de600b842bf90c53417843e9b4c1946"/><file name="Models.php" hash="0358f506ff4e5820b61b076701f0746d"/><file name="Printer.php" hash="6d2aec31a623b943d3d982c97999be13"/><file name="Resources.php" hash="9f12487e864cd4005c53b72fe02e4cf4"/></dir><dir name="Core"><dir name="Config"><file name="Base.php" hash="b1ecb5cd90e050d1c825beb65e6d888e"/><file name="Element.php" hash="2efb1a1c022cb393ab5718c1f7eafd1f"/></dir><file name="Config.php" hash="29408203a0aa8b7afa84ba16b1416f91"/></dir><dir name="Lib"><dir name="Varien"><dir name="Simplexml"><file name="Config.php" hash="3acbdd7d7c9fa6c346688e5083569596"/><file name="Element.php" hash="f5961e7a41035851cabf7fcd8022a13a"/></dir></dir></dir><dir name="Mysql4"><dir name="Core"><file name="Config.php" hash="36685bb89b45c71cfc447727ce66ea9a"/></dir></dir><dir name="Path"><dir name="Locator"><file name="Array.php" hash="f82c5966dab92ed91a9441a0231e7ace"/><file name="Factory.php" hash="bea2e4a6bea17815a9040341209f4256"/><file name="IteratorAbstract.php" hash="9adccb7c853d80e8d64a0eb8346f3cbc"/><file name="LocatorInterface.php" hash="b3cf0d528296ee0e87e7898da44baa47"/><file name="Stack.php" hash="4524078604b43dffcf57c7a23959ef03"/></dir></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="6b69bd1c0ce0e4c92c1c96436f79e83d"/></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="23de17a20f7a5588bb9761a2d3eb79ae"/></dir><dir name="Model"><dir name="Path"><dir name="Locator"><file name="Array.php" hash="e219f193e027d5c9a5d9cb9d7a27a6ac"/><file name="Factory.php" hash="36ffe1ec656f3f3ba1f99dd743e52c0b"/><file name="Stack.php" hash="29cbf00cd66bc61ee16c740847d9f400"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9d5cab56f52b0d12688c5787e3bfa03f"/><file name="config.xml" hash="0497e6c9bf942db62d01e0595437166b"/><file name="system.xml" hash="6d6b10860c55f815efe815d7ee0c2290"/></dir></dir><dir name="Customer"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5874d9bf1ff106212a348815104c5244"/><file name="Cron.php" hash="41e36d043441e1e9424186c90bb4807d"/><dir name="Form"><dir name="Fieldset"><dir name="Attributes"><file name="Address.php" hash="383082bb7b45f9b250acea756b2e5758"/><file name="Customer.php" hash="cbbb4c20f3424e4f988c94335ff004c2"/></dir><file name="Attributes.php" hash="80252cc0f3b5a05874245b5507fd7a47"/></dir></dir></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="74d38897533f7b4e67d476dd791a38ee"/><file name="Run.php" hash="e707627c781ea4323d1924fa33094320"/><file name="Sync.php" hash="3475e65cab50bd4b047a58f8b50bc958"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="40ab8eee7df85cfc39e2e35d07843a18"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="c74a251bc694defe14e9033da9bdc77a"/></dir><file name="Queue.php" hash="97d19f161a404e1a92e1d4f17301b162"/><file name="Setup.php" hash="615e25c2d8493dcd4301650421c87f08"/></dir><file name="Observer.php" hash="cb0872283c06f5027dcb1668706111f1"/><file name="Queue.php" hash="0b6b4e2bde336b5052007b3836c0c109"/><dir name="Resource"><file name="Customer.php" hash="9aa5ef7b70c3714cd049c9f2957ceb7c"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Brontofield.php" hash="6de9a1df609e8a7b396f4f80a7e6c764"/><file name="Cron.php" hash="dbcd55d41447d46fded27dfa2e6febb0"/><file name="Newfield.php" hash="d9a66dbc0b932fb80c7c947c3ce29bba"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="20025141111083480c8109d9619598bf"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CustomerController.php" hash="170274d2c7b46834e7c819983fa01156"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="6cc229b440b34da710887aaf96bbcf81"/><file name="config.xml" hash="ff10a2ee4365580e3c9c509a768c23c1"/><file name="system.xml" hash="0e13fc7e0917b98b5d28aa658cd53027"/></dir><dir name="sql"><dir name="bronto_customer_setup"><file name="mysql4-install-1.0.0.php" hash="871c225318588b2804a05751bce45e1f"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="e7986d0b22a92f5df7a3480f80d7b937"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="b95305221a61733ff7617ce9307101c2"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="590cf0b5109bbbb0e745bec806463adc"/></dir></dir></dir><dir name="Email"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="10cb51420b205c100ef46cf59edef05b"/></dir><dir name="Email"><dir name="Log"><dir name="Grid"><dir name="Renderer"><file name="Customer.php" hash="c2530287b293e05508816049586ef5c2"/><file name="Fields.php" hash="6c5d921b6c636329f035381af4c7f028"/></dir></dir><file name="Grid.php" hash="b54cada4029aa45290679e6cf69f8c47"/></dir><file name="Log.php" hash="3fa0b873d262b3d5c6161c1aef33e6ae"/><dir name="Template"><dir name="Edit"><file name="Form.php" hash="804a3fc8d0e773639f8eb2fe3df1ab1f"/></dir><file name="Edit.php" hash="bcc5b9ba9bee92a3e8f33684dd02506f"/><dir name="Grid"><dir name="Renderer"><file name="Message.php" hash="bf56f19c9f4310609fbb9a788768e222"/></dir></dir><file name="Grid.php" hash="8f1381ece5de903d48cbc7ae496028c7"/></dir><file name="Template.php" hash="b33503babba2480ca840569629dfbb07"/></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="712033409f93712e4a22cf89252d44e4"/><file name="Data.php" hash="e582e103dfe73cb4ab9e6eb675f81309"/><file name="Field.php" hash="e4714e9cc95bdfe4da9a16feb604f44c"/><file name="Message.php" hash="f328dcee7934ddc48d6f4d40afff74cc"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="5d2c4b3ac3120352f8424863ad176dc6"/></dir><file name="Log.php" hash="2740d9cd5073106f58880e57e84ce8ee"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="6de4819537636d3ea7816cb7c6fc250c"/></dir><file name="Log.php" hash="15ffb2c83281c77b5d427ff29abac776"/></dir><file name="Observer.php" hash="0b67950706c21220a4712bc0c279ba00"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Email"><file name="Template.php" hash="ba80e6553c61e731b85c027cd688ca8f"/></dir></dir></dir></dir><dir name="Template"><file name="Import.php" hash="f69b3458521bdb2c3bb33aa3d1c28620"/></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="8a74889c3f24c3053baefca6e7d7eddb"/></dir><dir name="Model"><dir name="Email"><file name="Message.php" hash="11a9aded1841673bdafd4675de78a19e"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="System"><dir name="Email"><file name="LogController.php" hash="386560ba30da12796614db1d0381bb7c"/><file name="TemplateController.php" hash="578112502761e70000ff10ca67502034"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="35a2ffa5e273f87b6d2de172cea4a219"/><file name="config.xml" hash="37e21ee9d0458bd28379446f063457a5"/><file name="system.xml" hash="ea9e30ce8eb25b0b7e840a7933640a27"/></dir><dir name="sql"><dir name="bronto_email_setup"><file name="mysql4-install-1.0.0.php" hash="516265312ede986c1a35a19b9e5bbfea"/><file name="mysql4-install-1.0.2.php" hash="327ac219e947d608fbf9d3209dd03bab"/><file name="mysql4-install-1.0.5.php" hash="327ac219e947d608fbf9d3209dd03bab"/><file name="mysql4-install-1.0.8.php" hash="b572625c1380dfffe3b089275ac1dc7e"/><file name="mysql4-install-1.1.2.php" hash="bf80f7b12eccdad2e0e36a564e18530c"/><file name="mysql4-upgrade-1.0.0-1.0.2.php" hash="1f797c3f909d72219ef5d00017b10554"/><file name="mysql4-upgrade-1.0.2-1.0.5.php" hash="f2c83b65500d9df0fd10c2e6721f2bfe"/><file name="mysql4-upgrade-1.0.5-1.0.8.php" hash="cdbda7aa084e51b9b222c56e548462a6"/><file name="mysql4-upgrade-1.0.8-1.1.1.php" hash="f2c83b65500d9df0fd10c2e6721f2bfe"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="0538afef03b1e21d509593e2ad275c34"/></dir></dir></dir><dir name="Newsletter"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="bc44a52305e7cbe3a41c5f19e6257ede"/><file name="Cron.php" hash="2253dab9a7475df825d4bcb7849cc3e9"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="98efb50dd447e6a60db7c25846ae0432"/><file name="Run.php" hash="49efe1ee4550454366fe5631fa2c6e88"/></dir></dir></dir><dir name="Checkout"><dir name="Onepage"><file name="Newsletter.php" hash="ed221e46e61f3312a038c022dacf5fd7"/></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="4c1dcd95ea237397ac2ee82090ce32e4"/><file name="Data.php" hash="62e5be8e1326862fee10774654daad15"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="41a203d85e16a660bf20bec8ecf157fd"/></dir><file name="Queue.php" hash="9a890d3fe569edd426ce38afe564dc7a"/></dir><file name="Observer.php" hash="7bdd91c7ee15183de3aeca1bcabc473e"/><file name="Queue.php" hash="89e6276cab088714b555c052172c4989"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="a270f0a31c390383cdabc0021baf3d3c"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="d88d07780bb3ded63c2c35439840dad5"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="NewsletterController.php" hash="fb1b701c2335e82e258ed16d2a5c8975"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="253518e92554bf89fabe7b832a7a562c"/><file name="config.xml" hash="1d0adbc56975d579620dabd02394ff38"/><file name="system.xml" hash="1314e4b54d7c89a75f8ca9b7d02623b8"/></dir><dir name="sql"><dir name="bronto_newsletter_setup"><file name="mysql4-install-1.0.0.php" hash="0f21d5315bbc4c27d0d38f9cf8c99bf3"/><file name="mysql4-install-1.4.0.php" hash="9bd28347f3330b857102900adf702bed"/><file name="mysql4-upgrade-1.4.0-1.4.1.php" hash="7eeba27e7b5480c8b502c3805554e2de"/><file name="mysql4-upgrade-1.4.1-1.4.2.php" hash="32f724b99d88e037ade72c8a9f1e0da7"/><file name="mysql4-upgrade-1.4.2-1.4.3.php" hash="63c728bb0cd7fa83bb5536d4500548f4"/><file name="mysql4-upgrade-1.4.3-1.4.4.php" hash="4f08a427c7706ea0988bcdcca6072218"/></dir></dir></dir><dir name="Order"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="ca80d06fb86b6bf676fc21188d5f2685"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="About.php" hash="126e3166dace48941fccbe2bb4c80264"/><file name="Cron.php" hash="c6a24643d4c35d557f87e1c51e860ef2"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Reset.php" hash="9bfbc1f1ffb38389a3a47ca009a24a35"/><file name="Run.php" hash="5b833a216bea22b962f633e33f6a86b8"/><file name="Sync.php" hash="ca0171d605d29a49445eaac37f95d1c1"/></dir></dir></dir><file name="Bta.php" hash="8c6a92894134f428e111d0cd0e99c137"/></dir><dir name="Helper"><file name="Data.php" hash="d4c020c5ad5bfee3245562c1c93fa349"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Queue"><file name="Collection.php" hash="f9fc983e670311531b8a260b78b46bc0"/></dir><file name="Queue.php" hash="c25aee2c31258eedfd5734bf1f143979"/><file name="Setup.php" hash="b3ccddc52af0695c48cff499ed112901"/></dir><file name="Observer.php" hash="9e59c3940eccca73c8b4a6a1e774970f"/><dir name="Order"><file name="Observer.php" hash="00fe5ac4fbee213403b60a33be463478"/></dir><file name="Queue.php" hash="aa7971d7f901f1e48e58bd85a44deb18"/><dir name="Quote"><file name="Observer.php" hash="73b67523786745f4ff1712375d757163"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="96199a296f15518a89fde9384cf5fb0d"/></dir><dir name="Source"><file name="Description.php" hash="67364bc17dc197e4dd2a6e0382c75722"/><file name="Limit.php" hash="789f0e42eaafa65b4970ad107206102c"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="29ce141400ea98642a0c200a721810a8"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OrderController.php" hash="af69420af4419a542ac3958ebe7a6956"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0c4a0a1117117613d148157557f2abb3"/><file name="config.xml" hash="28b1b0d6b556a8c25c1e16b604c1614b"/><file name="system.xml" hash="4103906da8806c3d5bd68493ce984613"/></dir><dir name="sql"><dir name="bronto_order_setup"><file name="mysql4-install-1.0.0.php" hash="81b57488dbc44047db4099c41fdac54e"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="de0e97123c3183c6363c33b1344b76dd"/><file name="mysql4-upgrade-1.1.6-1.1.7.php" hash="fe4f45d4fe4e8d90267d9bb6a6b13b03"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="2968eb24ab188a2017e230a2f3770db3"/></dir></dir></dir><dir name="PermissionChecker"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5c0990417244c38485b5c9eda45fa80a"/><file name="Permissionchecker.php" hash="9cabf571a4dab49fa26d8ff1b35b0646"/></dir></dir></dir><file name="Printer.php" hash="7f9d480227c8211aa9e2db66ecd34f3f"/></dir><dir name="Helper"><file name="Data.php" hash="4fab093494eb9a793583e2294d2a2489"/></dir><dir name="Model"><dir name="Validator"><file name="Checker.php" hash="2a8259840b7f0e75b52bdcc93adb8922"/><file name="Directory.php" hash="89a0981e5ed7b70446054d9e8f31300e"/><file name="File.php" hash="539342c217889f7fd0f19f3b731bea23"/><dir name="Filter"><file name="PatternIterator.php" hash="9bdc50cda8d18e3335d8fc07fa72f733"/></dir><file name="Group.php" hash="8dc26a97c43fa2bbe58264b3117324a9"/><file name="Owner.php" hash="fc20d838f28c3406d74475fd4dbf33f0"/><file name="Printer.php" hash="e49b843f43f835d35ba838a2b8c7d00d"/><file name="ValidatorAbstract.php" hash="bccd4db6601922c5a632680c226e03c6"/><file name="ValidatorInterface.php" hash="877e881c030573fdbcd344174eceec8a"/></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="672ed6161380fbf88a516377e62031be"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="058c7be44feea32fc5bc646a5632b4f3"/><file name="config.xml" hash="c4df9b0d873371a626029bd25cfe1c41"/><file name="system.xml" hash="f95239748b5ef006a38b1255356c6c65"/></dir></dir><dir name="Reminder"><dir name="Block"><dir name="Adminhtml"><dir name="Promo"><file name="Notice.php" hash="d5991ebe75066fa76f23eb9464619f08"/></dir><dir name="Reminder"><dir name="Edit"><file name="Form.php" hash="779f8effae92303da303c889db9cef65"/><dir name="Tab"><file name="Bronto.php" hash="a4f19c14cddab68e1180723984f10ccb"/><file name="Conditions.php" hash="f3ad1c6438079bf43183825b52fde3f3"/><file name="Customers.php" hash="c268b9bfe4bcc17b8eb0535660c4bdb2"/><file name="General.php" hash="fa39cbe158b0e7cb7f25f956ef4c8722"/></dir><file name="Tabs.php" hash="accefd148ad3cf28d36e890c138078f2"/></dir><file name="Edit.php" hash="9cec19a303634db7cfd5477da0a9ea48"/><file name="Grid.php" hash="440c1906893c1415db30b32378ee4549"/></dir><file name="Reminder.php" hash="82d616907ffc84eed0aa688f218ed7f1"/><dir name="System"><dir name="Config"><file name="About.php" hash="ce52e60802d1b9d251cef6a7c34564ce"/><file name="Cron.php" hash="ba8f69a491407b48ec72eb7351249c98"/><file name="Settings.php" hash="93194d4c4ec0f2fbb31c281cda6a4242"/></dir></dir><dir name="Widget"><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Email.php" hash="19ba2ef411e12be43a494cb0ca18549d"/><file name="Id.php" hash="1386e8186b0f78c6d7ca2023f5d0a625"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Contact.php" hash="a46c741761b5440eda28c9a8ac2df080"/><file name="Data.php" hash="346eb405e558f5c839864830b655a7a6"/><file name="Message.php" hash="a02936281f98cd990ecd17c32bfada46"/></dir><dir name="Model"><dir name="Condition"><file name="Abstract.php" hash="794cd660444a6e5bc62204e8b8c9a6eb"/><dir name="Combine"><file name="Abstract.php" hash="06a1ba8d580b9776367f6baee23e4735"/></dir></dir><dir name="Email"><file name="Message.php" hash="fe2f318ef70bd0d7be3de34b77b5ef2d"/></dir><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="f129346a23041cf539c0be24c1939b14"/></dir><dir name="Rule"><file name="Collection.php" hash="2969bb11fa9e83523da7b41d834381b4"/></dir><file name="Rule.php" hash="96d735544fd009433a15c998efc31b9c"/></dir><file name="Observer.php" hash="785d0bd3b5fb0f6bb672687ea4b2c79f"/><dir name="Rule"><dir name="Condition"><dir name="Cart"><file name="Amount.php" hash="0a47ca2ab522360229a27a82a08e4ebe"/><file name="Attributes.php" hash="013880cb821a38f9ee17594d0bc489de"/><file name="Combine.php" hash="add54bf57284e6c48008db605e0df3d4"/><file name="Couponcode.php" hash="d34edf42b65b21a6eb693e081d3e1401"/><file name="Itemsquantity.php" hash="2250219894b5a26ee514cbaa85c4934b"/><file name="Sku.php" hash="5abe54695f0e3a5eeb52a2c848bd9e81"/><file name="Storeview.php" hash="c82b01ab4088ba3a228af818ddf85244"/><file name="Subcombine.php" hash="b10d46333d76a881654cc6d2a67e6880"/><file name="Subselection.php" hash="4f300fbc807802056b697cdb298e6051"/><file name="Totalquantity.php" hash="ef7c0057212fbdc4d149294497aac454"/><file name="Virtual.php" hash="1f4d785f18b21269838d07046dc754c0"/></dir><file name="Cart.php" hash="e81ff749394cabba6ba8bccc3fbd1604"/><dir name="Combine"><file name="Root.php" hash="32011789213af7d776d3d8ad2fea2fa3"/></dir><file name="Combine.php" hash="74f9ec5b8560dabad1e303af18f4cff9"/><dir name="Wishlist"><file name="Attributes.php" hash="bb8205a2b00b58f2a092887db5ef8b63"/><file name="Combine.php" hash="b17a452ea9c090bea3cd1b2529171394"/><file name="Quantity.php" hash="4aef19ed0f43745e367243b7a6345749"/><file name="Sharing.php" hash="5ef1b49da3b5deb3500e74376127ba37"/><file name="Storeview.php" hash="f79daf882d9db85dc33b67ac0d754346"/><file name="Subcombine.php" hash="a063b405ed07c454b5dd0b1d71af430f"/><file name="Subselection.php" hash="d61958a79c6a381e8d636189ccea3251"/></dir><file name="Wishlist.php" hash="e5e8b80b87aeb75fe50a30fbe92c834b"/></dir></dir><file name="Rule.php" hash="9cec77c4e1aa125d7f049b9818eb8b78"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="3c9c134aee05b3b32fc64a549a3e7cb3"/></dir></dir></dir></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="9610717f006248a90f113c699df523a6"/></dir><dir name="Helper"><file name="Contact.php" hash="e348af94ff0f5444e766fc17f3e6c774"/><file name="Data.php" hash="1b8a488f5aa2892bc39a2a3ad6ffd1d8"/><file name="Message.php" hash="4f4cc99f871c3da8ad0c1a35b7ec04df"/></dir><dir name="Model"><file name="Observer.php" hash="6740f1fa9261885c3ace0769c9dbff67"/><file name="Rule.php" hash="eb0d4025dda8b95e65fbd79df7e3d8da"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RemindersController.php" hash="f8730cf46da687f80dd64fe3b22852f0"/></dir><file name="LoadController.php" hash="24cea762b00c5992085cf21e395b533d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="772c6847e1961a7a56fdbcfbce6aaf91"/><file name="config.xml" hash="4686cba43225bbcf5f25552a5b082107"/><file name="system.xml" hash="a7a8f8e3dd6559a6e4833d21be5e58be"/></dir><dir name="sql"><dir name="bronto_reminder_setup"><file name="mysql4-install-1.4.2.php" hash="1372af1369e9608159f5b59af75f367e"/><file name="mysql4-upgrade-1.4.0-1.4.2.php" hash="fefa638ca0ed7c5bc80a1b67e27c8703"/><file name="mysql4-upgrade-1.4.10-1.4.11.php" hash="130a688eb03e4f476308d0d11c32141a"/><file name="mysql4-upgrade-1.4.11-1.4.12.php" hash="766c901369f06aaadc8ffde3befb4aaa"/><file name="mysql4-upgrade-1.4.2-1.4.9.php" hash="4692060e7c938aea129c53619f0b3c19"/><file name="mysql4-upgrade-1.4.9-1.4.10.php" hash="9698883135211d54a3c711fead02c187"/></dir><dir name="reference"><file name="saveMatchedCustomers.sql" hash="c4f32ee8be31f7a652369c148271a6c7"/></dir></dir></dir><dir name="Roundtrip"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="6adab60e3a5a4668fdf5da8d8d33a024"/><file name="Status.php" hash="c623240112f1f15200f918394f736720"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Run.php" hash="f83df57a3248439261ccf9837a5d2ff9"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="aff6979277701f2f027bc7ad565c518c"/></dir><dir name="Model"><dir name="Contact"><file name="Builder.php" hash="e81e78a7e07a81f5a0ec53990d629a31"/></dir><dir name="Roundtrip"><dir name="Test"><file name="Order.php" hash="04ebcb9f0010cab7952b08014010f721"/></dir></dir><file name="Roundtrip.php" hash="1e07a998085bb9eb367d040c4b171220"/></dir><dir name="Test"><dir name="Config"><file name="Config.php" hash="dbe4fb05bff7630d6130f8d458ed1f57"/></dir><dir name="Model"><dir name="Roundtrip"><file name="Contact.php" hash="787fe5d49eba3819e9af030bb80beeaa"/><dir name="Test"><file name="Order.php" hash="5bf175ebba99f97a93fb6755977dbfa0"/></dir></dir><file name="Roundtrip.php" hash="c515d5cf63bdfbdab39e3f23901b4e47"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RoundtripController.php" hash="15d8ce6375063346d47ad832c80fd499"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="56be6bdda5b7652427bbab1e447a0d2e"/><file name="config.xml" hash="b34c9716b4c6fee7a1d8837b8debff65"/><file name="system.xml" hash="901a0736fb1109f9092fc98daa46dde7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Bronto_All.xml" hash="5a9c06b6313882589765b9bcf0402bbb"/><file name="Bronto_ConflictChecker.xml" hash="1a7dc00b830ca2cc696e67d94b85be5d"/><file name="Bronto_Customer.xml" hash="a11c20f008ee2eae14baa3b549d5adee"/><file name="Bronto_Email.xml" hash="b7cdca4b15753edcefe8b9e0abb780bd"/><file name="Bronto_Newsletter.xml" hash="2115c5225e02ab5d4e56749cc5eff6ad"/><file name="Bronto_Order.xml" hash="63f1537add6088417945657bec98ffe9"/><file name="Bronto_PermissionChecker.xml" hash="55ff239c291529be2dc05799102d24a1"/><file name="Bronto_Reminder.xml" hash="08503ab78994178b822ef9b0add243f9"/><file name="Bronto_Roundtrip.xml" hash="bd2b89f3254e995904da92f025b6321c"/></dir></target><target name="magelib"><dir name="Bronto"><dir name="Api"><dir name="Account"><file name="Exception.php" hash="1a851457b2a032fb6d149fe9ef111c57"/><file name="Row.php" hash="3ab1e97019ef87bcd464eeaabf652886"/></dir><file name="Account.php" hash="33b9ba8867fe69135391c26f98b5852a"/><dir name="Activity"><file name="Exception.php" hash="3ac1f2caea6465931cbf927f1033ec06"/><file name="Row.php" hash="de166130c57670bf486a783a4501e2d4"/></dir><file name="Activity.php" hash="f5f48488e40507bc108b35c599e4e5a2"/><dir name="ApiToken"><file name="Exception.php" hash="e06d0a4c9469da7333e6a596e9c37c5d"/><file name="Row.php" hash="f3742811cec1cbf0be583296b617dfbd"/></dir><file name="ApiToken.php" hash="65bbd18974bbbf620dc2df23bdeb4469"/><dir name="Contact"><file name="Exception.php" hash="809bdce6db3bb9c72a3173bb08c1b19e"/><file name="Row.php" hash="2e360d131c2abe19e154b5f3795a58f0"/></dir><file name="Contact.php" hash="55bab8398154e96db6b0ca3ed88718e0"/><dir name="ContentTag"><file name="Exception.php" hash="5a8bc58af480a574e8061c62ad5590b4"/><file name="Row.php" hash="e470d8bcd686d42a886e59d5184b5eed"/></dir><file name="ContentTag.php" hash="14f1cbefe1027338d28db301a1c2df3d"/><dir name="Conversion"><file name="Exception.php" hash="73dd991a663b99050428f54fc13fb433"/><file name="Row.php" hash="115d01ea0e0e6ade42fcab76dff71c35"/></dir><file name="Conversion.php" hash="60ec52dcfeda92294d1ab10bb29a486a"/><dir name="Delivery"><file name="Exception.php" hash="003dbb49ea3be65fe35dfa9b7ec743c5"/><file name="Recipient.php" hash="562bdc8d86b92ec293a338fdd7bf928a"/><file name="Row.php" hash="9c6149e74a305f62b9806df5a20e6a00"/></dir><file name="Delivery.php" hash="668dc6493cefe960c7dc8fe1fe87bf08"/><dir name="DeliveryGroup"><file name="Exception.php" hash="9291b2adb576a6781a0d624cc3288453"/><file name="Row.php" hash="29adb1f866cf1d24ef0abac19f95fbd0"/></dir><file name="DeliveryGroup.php" hash="7dd295b65f22e65dff3bf45c4336e985"/><file name="Exception.php" hash="bacb7c782ef7f612edaf3d39c20118ef"/><dir name="Field"><file name="Exception.php" hash="db651b9fa4b5161e3a32af49cc12cc64"/><file name="Predefined.php" hash="15fadb32175098d9ded60550d1748a4a"/><file name="Row.php" hash="6871d05f399a8a9dfa0742952eaa6481"/><file name="TypeGuesser.php" hash="1027ea97675a16cc964aa0d8ba63e642"/></dir><file name="Field.php" hash="32d5876335ec815acb50d3b4e7bf3ccd"/><dir name="List"><file name="Exception.php" hash="0f964fac998c89a0d4d515979bd81b98"/><file name="Row.php" hash="6516df43a1a94beee7b57fae71c27134"/></dir><file name="List.php" hash="ef240fe5e1422479a83291ad30b468ac"/><dir name="Login"><file name="ContactInformation.php" hash="bc1ce7f57c67fa21cd0881d0384a1cac"/><file name="Exception.php" hash="fff7546235b416b7008a9e4bd646fc19"/><file name="Row.php" hash="578553fcbf1941d0eb5890614c57ae91"/></dir><file name="Login.php" hash="a663864b51795799ff1a61528f380c80"/><dir name="Message"><file name="Exception.php" hash="755f7f14cdb234931708968ac0bad4a4"/><file name="Row.php" hash="5732b5550c8c6444790f2f20e626ff08"/></dir><file name="Message.php" hash="cc3c9939757371ad7fd2d297df394621"/><dir name="MessageRule"><file name="Exception.php" hash="b0398ee96ed70c483f38b50f305e82a8"/><file name="Row.php" hash="8e7532184ee265a927a195ac36e5a518"/></dir><file name="MessageRule.php" hash="ae1b3f16683656066a83bcf9f2863710"/><file name="Object.php" hash="19e3a4bcfd9031fa2c576f9c7f2cd27e"/><dir name="Order"><file name="Exception.php" hash="8312e1a1ab46bcf88b72983bb11a6493"/><file name="Product.php" hash="3785f2f460fec6c18c6164176de52449"/><file name="Row.php" hash="1400de022188806bb94e98544c054ef6"/></dir><file name="Order.php" hash="ad690b37bc577879020d10e5ac70ef3d"/><dir name="Row"><file name="Exception.php" hash="4c1a45512e0912644f94a88d4298d3a9"/></dir><file name="Row.php" hash="259418b11987939378747a9c46fae1ae"/><dir name="Rowset"><file name="Exception.php" hash="b5202ed6f61bfe06b90f73c03ca28ffa"/><file name="Iterator.php" hash="9ea7a244b83e7b9318bfe8ed371a149f"/></dir><file name="Rowset.php" hash="3f40382933e2f392b6320fd79db720cd"/><dir name="Segment"><file name="Exception.php" hash="bd5c2302ef222ff55981cc38477a9310"/><file name="Row.php" hash="b840493b8b2c3cb6686de0e5bedfa2ba"/></dir><file name="Segment.php" hash="0cf99babff6169afa427f302c76023dd"/></dir><file name="Api.php" hash="b3e620a235da149281430a92eb2a1a3c"/><file name="SoapClient.php" hash="c9e56dc7f88d71cfbb98b3476bad5ead"/><dir name="Util"><file name="Colors.php" hash="14313213b3a70c79a56c574523b9b90b"/><file name="CountryCodes.php" hash="4efb9c354d29a901368c46aab40f79d4"/><dir name="Retryer"><file name="FileRetryer.php" hash="bdc72ace54ace32081115442d28cb972"/><file name="RetryerException.php" hash="54b70d7abbc32b55649a193e8e70dcb5"/><file name="RetryerInterface.php" hash="cc57d5a02a55811a13a31ed9beff126f"/></dir><file name="Uuid.php" hash="ba62bdec6488ccb621e0bfd726c6107a"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="bronto"><file name="cron.css" hash="c7260d3aa14b5945ee76c72dbd914efa"/><dir name="images"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="bg_notifications.gif" hash="df73b8aa7e48bb56e0a644245aa3683f"/><file name="logo.jpg" hash="3c6059218195679d99dbb874bdabbd07"/><file name="message_approved.gif" hash="465a056a3ba3d94367f51c3c0b751391"/><file name="message_not_approved.gif" hash="e4f28607f075a105e53fa3113d84bd26"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bronto"><dir name="newsletter"><file name="js.phtml" hash="a01ed75d8aff216f753ac2b13b51a404"/></dir></dir></dir><dir name="layout"><dir name="bronto"><file name="newsletter.xml" hash="b7d4c9b1fb4fabb4255c6df64e98d332"/><file name="order.xml" hash="8d2d203b0124e3aead6093c655187b1b"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="bronto"><dir name="common"><file name="about.phtml" hash="f115cbc70309f4e3b14d33cf29bdb274"/><file name="cron.phtml" hash="f1dbdea68c377d7057230697450e16b1"/></dir><dir name="conflictchecker"><file name="errors.phtml" hash="26c9fa4332b8518141de9dab0db0c823"/></dir><dir name="email"><dir name="template"><file name="edit.phtml" hash="35c4f68337a6be7186be1aac0fbe404e"/><file name="list.phtml" hash="cf2503d79273b5a611cde3acde2bb79d"/></dir></dir><dir name="permissionchecker"><file name="errors.phtml" hash="0306e132afed0c88058be67d37dd211c"/></dir><dir name="roundtrip"><file name="status.phtml" hash="8dcb1b72071c00888c8f6ad7b6d18d9b"/></dir></dir></dir><dir name="layout"><dir name="bronto"><file name="email.xml" hash="be77c906770a0d818898a910b03cbe4f"/><file name="reminder.xml" hash="98d835f287cb3aa2ff801f0219f88ccc"/><file name="roundtrip.xml" hash="3da91d3bcb40e1805a80fb2a18ed9cee"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><dir name="bronto"><file name="abandoned_cart.html" hash="20b0f55098c0f07bf96da3c5309d9192"/></dir></dir></dir></dir></target></contents>
|
61 |
<compatible/>
|
62 |
<dependencies><required><php><min>5.2.13</min><max>5.5.0</max></php><extension><name>soap</name><min></min><max></max></extension><extension><name>openssl</name><min></min><max></max></extension></required></dependencies>
|
63 |
</package>
|