Version Notes
Efficiency improvements
Security fix
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Listrak_Remarketing |
| Version | 1.2.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.9.5 to 1.2.0
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Form.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Tab/Form.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Tabs.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Grid.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes.php +4 -26
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tab/Form/Brand.php +45 -1
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tab/Form/Categories.php +54 -4
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tabs.php +11 -23
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Grid.php +2 -2
- app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Init/Brands.php +0 -68
- app/code/community/Listrak/Remarketing/Block/Conversion/Abstract.php +19 -5
- app/code/community/Listrak/Remarketing/Block/Tracking/Click.php +0 -42
- app/code/community/Listrak/Remarketing/Helper/Product.php +7 -5
- app/code/community/Listrak/Remarketing/Model/Apiextension/Api.php +138 -78
- app/code/community/Listrak/Remarketing/Model/Mysql4/Abandonedcart.php +1 -1
- app/code/community/Listrak/Remarketing/Model/Mysql4/Product/Attribute/Set/Map/Collection.php +1 -1
- app/code/community/Listrak/Remarketing/Model/Mysql4/Session.php +1 -1
- app/code/community/Listrak/Remarketing/controllers/CartController.php +0 -10
- app/code/community/Listrak/Remarketing/controllers/EmailController.php +0 -29
- app/code/community/Listrak/Remarketing/controllers/Remarketing/EmailcaptureController.php +2 -40
- app/code/community/Listrak/Remarketing/controllers/Remarketing/ProductattributesController.php +20 -41
- app/code/community/Listrak/Remarketing/controllers/TroubleshootingController.php +0 -30
- app/code/community/Listrak/Remarketing/etc/config.xml +239 -239
- app/code/community/Listrak/Remarketing/sql/listrak_remarketing_setup/mysql4-upgrade-1.1.9.5-1.2.0.php +102 -0
- app/design/adminhtml/default/default/layout/remarketing.xml +51 -14
- app/design/adminhtml/default/default/template/listrak/remarketing/productattributes/form/categories.phtml +5 -4
- app/design/adminhtml/default/default/template/listrak/remarketing/productattributes/form/initbrands.phtml +1 -1
- app/design/frontend/base/default/layout/remarketing.xml +0 -1
- package.xml +6 -5
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid_Container
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid_Container
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form_Container
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form_Container
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Form.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Form
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Form
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Tab/Form.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Tab_Form
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Tab_Form
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Edit/Tabs.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Tabs
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Tabs
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Edit_Tabs
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Tabs
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Emailcapture/Grid.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Grid
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Emailcapture_Grid
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Container
|
| 20 |
{
|
| 21 |
/**
|
|
@@ -26,28 +26,6 @@ class Listrak_Remarketing_Block_Adminhtml_ProductAttributes
|
|
| 26 |
parent::__construct();
|
| 27 |
$this->_controller = 'adminhtml_productattributes';
|
| 28 |
$this->_removeButton('add');
|
| 29 |
-
|
| 30 |
-
$this->setTemplate('listrak/remarketing/productattributes.phtml');
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
/**
|
| 34 |
-
* Creates the layout in code
|
| 35 |
-
*
|
| 36 |
-
* @return Mage_Core_Block_Abstract
|
| 37 |
-
*/
|
| 38 |
-
public function _prepareLayout()
|
| 39 |
-
{
|
| 40 |
-
$this->setChild(
|
| 41 |
-
'grid',
|
| 42 |
-
$this->getLayout()
|
| 43 |
-
->createBlock('remarketing/adminhtml_productattributes_grid')
|
| 44 |
-
);
|
| 45 |
-
$this->setChild(
|
| 46 |
-
'init_brands',
|
| 47 |
-
$this->getLayout()
|
| 48 |
-
->createBlock('remarketing/adminhtml_productattributes_init_brands')
|
| 49 |
-
);
|
| 50 |
-
return parent::_prepareLayout();
|
| 51 |
}
|
| 52 |
|
| 53 |
/**
|
|
@@ -57,7 +35,7 @@ class Listrak_Remarketing_Block_Adminhtml_ProductAttributes
|
|
| 57 |
*/
|
| 58 |
public function getInitBrandsHtml()
|
| 59 |
{
|
| 60 |
-
return $this->getChildHtml('
|
| 61 |
}
|
| 62 |
|
| 63 |
/**
|
|
@@ -67,7 +45,7 @@ class Listrak_Remarketing_Block_Adminhtml_ProductAttributes
|
|
| 67 |
*/
|
| 68 |
public function getGridHtml()
|
| 69 |
{
|
| 70 |
-
return $this->getChildHtml('
|
| 71 |
}
|
| 72 |
|
| 73 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Productattributes
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Productattributes
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Container
|
| 20 |
{
|
| 21 |
/**
|
| 26 |
parent::__construct();
|
| 27 |
$this->_controller = 'adminhtml_productattributes';
|
| 28 |
$this->_removeButton('add');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
/**
|
| 35 |
*/
|
| 36 |
public function getInitBrandsHtml()
|
| 37 |
{
|
| 38 |
+
return $this->getChildHtml('remarketing_attributes_init');
|
| 39 |
}
|
| 40 |
|
| 41 |
/**
|
| 45 |
*/
|
| 46 |
public function getGridHtml()
|
| 47 |
{
|
| 48 |
+
return $this->getChildHtml('remarketing_attributes_grid');
|
| 49 |
}
|
| 50 |
|
| 51 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form_Container
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form_Container
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tab/Form/Brand.php
CHANGED
|
@@ -17,6 +17,7 @@
|
|
| 17 |
*/
|
| 18 |
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Brand
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
|
|
|
| 20 |
{
|
| 21 |
/**
|
| 22 |
* Prepare form
|
|
@@ -34,7 +35,7 @@ class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Brand
|
|
| 34 |
|
| 35 |
$attributeCodes = array();
|
| 36 |
$attributeCodes[''] = '- No Brand Attribute -';
|
| 37 |
-
foreach (
|
| 38 |
$attributeCodes[$key] = $value;
|
| 39 |
}
|
| 40 |
|
|
@@ -52,5 +53,48 @@ class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Brand
|
|
| 52 |
|
| 53 |
return parent::_prepareForm();
|
| 54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
|
| 17 |
*/
|
| 18 |
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Brand
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Form
|
| 20 |
+
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
| 21 |
{
|
| 22 |
/**
|
| 23 |
* Prepare form
|
| 35 |
|
| 36 |
$attributeCodes = array();
|
| 37 |
$attributeCodes[''] = '- No Brand Attribute -';
|
| 38 |
+
foreach (Mage::registry('productattribute_options') as $key => $value) {
|
| 39 |
$attributeCodes[$key] = $value;
|
| 40 |
}
|
| 41 |
|
| 53 |
|
| 54 |
return parent::_prepareForm();
|
| 55 |
}
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* Return Tab label
|
| 59 |
+
*
|
| 60 |
+
* @return string
|
| 61 |
+
*/
|
| 62 |
+
public function getTabLabel()
|
| 63 |
+
{
|
| 64 |
+
/* @var Listrak_Remarketing_Helper_Data $helper */
|
| 65 |
+
$helper = Mage::helper('remarketing');
|
| 66 |
+
|
| 67 |
+
return $helper->__('Brands');
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* Return Tab title
|
| 72 |
+
*
|
| 73 |
+
* @return string
|
| 74 |
+
*/
|
| 75 |
+
public function getTabTitle()
|
| 76 |
+
{
|
| 77 |
+
return $this->getTabLabel();
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/**
|
| 81 |
+
* Can show tab in tabs
|
| 82 |
+
*
|
| 83 |
+
* @return boolean
|
| 84 |
+
*/
|
| 85 |
+
public function canShowTab()
|
| 86 |
+
{
|
| 87 |
+
return true;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
/**
|
| 91 |
+
* Tab is hidden
|
| 92 |
+
*
|
| 93 |
+
* @return boolean
|
| 94 |
+
*/
|
| 95 |
+
public function isHidden()
|
| 96 |
+
{
|
| 97 |
+
return false;
|
| 98 |
+
}
|
| 99 |
}
|
| 100 |
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tab/Form/Categories.php
CHANGED
|
@@ -17,6 +17,7 @@
|
|
| 17 |
*/
|
| 18 |
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Categories
|
| 19 |
extends Mage_Adminhtml_Block_Widget
|
|
|
|
| 20 |
{
|
| 21 |
/**
|
| 22 |
* Initializes the block
|
|
@@ -24,10 +25,6 @@ class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Catego
|
|
| 24 |
public function __construct()
|
| 25 |
{
|
| 26 |
parent::__construct();
|
| 27 |
-
$this->setTemplate(
|
| 28 |
-
'listrak/remarketing/productattributes/form/categories.phtml'
|
| 29 |
-
);
|
| 30 |
-
|
| 31 |
$this->setModel(Mage::registry('productattribute_data'));
|
| 32 |
}
|
| 33 |
|
|
@@ -86,5 +83,58 @@ class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Catego
|
|
| 86 |
{
|
| 87 |
return $this->getModel()->getSubcategoryAttributeCode();
|
| 88 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
}
|
| 90 |
|
| 17 |
*/
|
| 18 |
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tab_Form_Categories
|
| 19 |
extends Mage_Adminhtml_Block_Widget
|
| 20 |
+
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
| 21 |
{
|
| 22 |
/**
|
| 23 |
* Initializes the block
|
| 25 |
public function __construct()
|
| 26 |
{
|
| 27 |
parent::__construct();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
$this->setModel(Mage::registry('productattribute_data'));
|
| 29 |
}
|
| 30 |
|
| 83 |
{
|
| 84 |
return $this->getModel()->getSubcategoryAttributeCode();
|
| 85 |
}
|
| 86 |
+
|
| 87 |
+
/**
|
| 88 |
+
* Retrieve all attribute options for set
|
| 89 |
+
*
|
| 90 |
+
* @return array
|
| 91 |
+
*/
|
| 92 |
+
public function getAttributeOptions()
|
| 93 |
+
{
|
| 94 |
+
return Mage::registry('productattribute_options');
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
/**
|
| 98 |
+
* Return Tab label
|
| 99 |
+
*
|
| 100 |
+
* @return string
|
| 101 |
+
*/
|
| 102 |
+
public function getTabLabel()
|
| 103 |
+
{
|
| 104 |
+
/* @var Listrak_Remarketing_Helper_Data $helper */
|
| 105 |
+
$helper = Mage::helper('remarketing');
|
| 106 |
+
|
| 107 |
+
return $helper->__('Category and Subcategory');
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
/**
|
| 111 |
+
* Return Tab title
|
| 112 |
+
*
|
| 113 |
+
* @return string
|
| 114 |
+
*/
|
| 115 |
+
public function getTabTitle()
|
| 116 |
+
{
|
| 117 |
+
$this->getTabLabel();
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
/**
|
| 121 |
+
* Can show tab in tabs
|
| 122 |
+
*
|
| 123 |
+
* @return boolean
|
| 124 |
+
*/
|
| 125 |
+
public function canShowTab()
|
| 126 |
+
{
|
| 127 |
+
return true;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
/**
|
| 131 |
+
* Tab is hidden
|
| 132 |
+
*
|
| 133 |
+
* @return boolean
|
| 134 |
+
*/
|
| 135 |
+
public function isHidden()
|
| 136 |
+
{
|
| 137 |
+
return false;
|
| 138 |
+
}
|
| 139 |
}
|
| 140 |
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Edit/Tabs.php
CHANGED
|
@@ -31,42 +31,30 @@ class Listrak_Remarketing_Block_Adminhtml_Productattributes_Edit_Tabs
|
|
| 31 |
}
|
| 32 |
|
| 33 |
/**
|
| 34 |
-
*
|
|
|
|
|
|
|
| 35 |
*
|
| 36 |
* @return Mage_Core_Block_Abstract
|
| 37 |
*/
|
| 38 |
-
|
| 39 |
{
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
->_attributeSetAttributes(
|
| 45 |
-
Mage::registry('productattribute_data')
|
| 46 |
-
->getAttributeSetId()
|
| 47 |
-
);
|
| 48 |
|
| 49 |
$this->addTab(
|
| 50 |
'productattributes_brand',
|
| 51 |
-
|
| 52 |
-
'label' => $helper->__('Brand'),
|
| 53 |
-
'content' => $this->getLayout()->createBlock(
|
| 54 |
-
'remarketing/adminhtml_productattributes_edit_tab_form_brand'
|
| 55 |
-
)->setAttributeOptions($attributeCodes)->toHtml()
|
| 56 |
-
)
|
| 57 |
);
|
| 58 |
|
| 59 |
$this->addTab(
|
| 60 |
'productattributes_categories',
|
| 61 |
-
|
| 62 |
-
'label' => $helper->__('Category and Subcategory'),
|
| 63 |
-
'content' => $this->getLayout()->createBlock(
|
| 64 |
-
'remarketing/adminhtml_productattributes_edit_tab_form_categories'
|
| 65 |
-
)->setAttributeOptions($attributeCodes)->toHtml()
|
| 66 |
-
)
|
| 67 |
);
|
| 68 |
|
| 69 |
-
return parent::
|
| 70 |
}
|
| 71 |
|
| 72 |
/**
|
| 31 |
}
|
| 32 |
|
| 33 |
/**
|
| 34 |
+
* Before HTML output
|
| 35 |
+
*
|
| 36 |
+
* Adds necessary UI elements
|
| 37 |
*
|
| 38 |
* @return Mage_Core_Block_Abstract
|
| 39 |
*/
|
| 40 |
+
protected function _beforeToHtml()
|
| 41 |
{
|
| 42 |
+
Mage::register('productattribute_options',
|
| 43 |
+
$this->_attributeSetAttributes(
|
| 44 |
+
Mage::registry('productattribute_data')->getAttributeSetId()
|
| 45 |
+
));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
$this->addTab(
|
| 48 |
'productattributes_brand',
|
| 49 |
+
'remarketing_attribute_tab_brand'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
);
|
| 51 |
|
| 52 |
$this->addTab(
|
| 53 |
'productattributes_categories',
|
| 54 |
+
'remarketing_attribute_tab_categories'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
);
|
| 56 |
|
| 57 |
+
return parent::_beforeToHtml();
|
| 58 |
}
|
| 59 |
|
| 60 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Grid.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid
|
| 20 |
{
|
| 21 |
/**
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_Block_Adminhtml_Productattributes_Grid
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Grid
|
| 19 |
extends Mage_Adminhtml_Block_Widget_Grid
|
| 20 |
{
|
| 21 |
/**
|
app/code/community/Listrak/Remarketing/Block/Adminhtml/Productattributes/Init/Brands.php
DELETED
|
@@ -1,68 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Listrak Remarketing Magento Extension Ver. 1.1.5
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* @category Listrak
|
| 8 |
-
* @package Listrak_Remarketing
|
| 9 |
-
* @author Listrak Magento Team <magento@listrak.com>
|
| 10 |
-
* @copyright 2013 Listrak Inc
|
| 11 |
-
* @license http://s1.listrakbi.com/licenses/magento.txt License For Customer Use of Listrak Software
|
| 12 |
-
* @link http://www.listrak.com
|
| 13 |
-
*/
|
| 14 |
-
|
| 15 |
-
/**
|
| 16 |
-
* Class Listrak_Remarketing_Block_Adminhtml_Productattributes_Init_Brands
|
| 17 |
-
*/
|
| 18 |
-
class Listrak_Remarketing_Block_Adminhtml_Productattributes_Init_Brands
|
| 19 |
-
extends Mage_Adminhtml_Block_Template
|
| 20 |
-
{
|
| 21 |
-
/**
|
| 22 |
-
* Initialize the block
|
| 23 |
-
*/
|
| 24 |
-
public function __construct()
|
| 25 |
-
{
|
| 26 |
-
parent::__construct();
|
| 27 |
-
$this->setTemplate(
|
| 28 |
-
'listrak/remarketing/productattributes/form/initbrands.phtml'
|
| 29 |
-
);
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
/**
|
| 33 |
-
* Prepare layout
|
| 34 |
-
*
|
| 35 |
-
* @return Mage_Core_Block_Abstract
|
| 36 |
-
*/
|
| 37 |
-
public function _prepareLayout()
|
| 38 |
-
{
|
| 39 |
-
$this->setChild(
|
| 40 |
-
'form',
|
| 41 |
-
$this->getLayout()->createBlock(
|
| 42 |
-
'remarketing/adminhtml_productattributes_init_brands_form'
|
| 43 |
-
)
|
| 44 |
-
);
|
| 45 |
-
return parent::_prepareLayout();
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
/**
|
| 49 |
-
* Get the form HTML
|
| 50 |
-
*
|
| 51 |
-
* @return string
|
| 52 |
-
*/
|
| 53 |
-
public function getFormHtml()
|
| 54 |
-
{
|
| 55 |
-
return $this->getChildHtml('form');
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* Get form elements
|
| 60 |
-
*
|
| 61 |
-
* @return string
|
| 62 |
-
*/
|
| 63 |
-
public function getFormElementsHtml()
|
| 64 |
-
{
|
| 65 |
-
return $this->getChildHtml('form-elements');
|
| 66 |
-
}
|
| 67 |
-
}
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Listrak/Remarketing/Block/Conversion/Abstract.php
CHANGED
|
@@ -98,14 +98,28 @@ class Listrak_Remarketing_Block_Conversion_Abstract
|
|
| 98 |
{
|
| 99 |
// fix the skus before returning the data
|
| 100 |
$result = array();
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
/* @var Mage_Sales_Model_Order_Item $item */
|
| 106 |
foreach ($this->getOrder()->getAllVisibleItems() as $item) {
|
| 107 |
-
|
| 108 |
-
|
|
|
|
|
|
|
| 109 |
|
| 110 |
$result[] = $item;
|
| 111 |
}
|
| 98 |
{
|
| 99 |
// fix the skus before returning the data
|
| 100 |
$result = array();
|
| 101 |
+
|
| 102 |
+
$getSkuForIds = array();
|
| 103 |
+
foreach($this->getOrder()->getAllVisibleItems() as $item) {
|
| 104 |
+
if (Mage_Catalog_Model_Product_Type::TYPE_BUNDLE == $item->getProductType()) {
|
| 105 |
+
$getSkuForIds[] = $item->getProductId();
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
$skusById = array();
|
| 110 |
+
if (sizeof($getSkuForIds) > 0) {
|
| 111 |
+
$skusById = Mage::getModel('catalog/product')->getCollection()
|
| 112 |
+
->addFieldToFilter('entity_id', $getSkuForIds)
|
| 113 |
+
->addAttributeToSelect(array('entity_id', 'sku'))
|
| 114 |
+
->getItems();
|
| 115 |
+
}
|
| 116 |
|
| 117 |
/* @var Mage_Sales_Model_Order_Item $item */
|
| 118 |
foreach ($this->getOrder()->getAllVisibleItems() as $item) {
|
| 119 |
+
if (array_key_exists($item->getProductId(), $skusById)) {
|
| 120 |
+
$product = $skusById[$item->getProductId()];
|
| 121 |
+
$item->setSku($product->getSku());
|
| 122 |
+
}
|
| 123 |
|
| 124 |
$result[] = $item;
|
| 125 |
}
|
app/code/community/Listrak/Remarketing/Block/Tracking/Click.php
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Listrak Remarketing Magento Extension Ver. 1.1.9
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* @category Listrak
|
| 8 |
-
* @package Listrak_Remarketing
|
| 9 |
-
* @author Listrak Magento Team <magento@listrak.com>
|
| 10 |
-
* @copyright 2014 Listrak Inc
|
| 11 |
-
* @license http://s1.listrakbi.com/licenses/magento.txt License For Customer Use of Listrak Software
|
| 12 |
-
* @link http://www.listrak.com
|
| 13 |
-
*/
|
| 14 |
-
|
| 15 |
-
/**
|
| 16 |
-
* Class Listrak_Remarketing_Block_Tracking_Click
|
| 17 |
-
*/
|
| 18 |
-
class Listrak_Remarketing_Block_Tracking_Click
|
| 19 |
-
extends Listrak_Remarketing_Block_Require_Onescript
|
| 20 |
-
{
|
| 21 |
-
/**
|
| 22 |
-
* Render block
|
| 23 |
-
*
|
| 24 |
-
* @return string
|
| 25 |
-
*/
|
| 26 |
-
public function _toHtml()
|
| 27 |
-
{
|
| 28 |
-
try {
|
| 29 |
-
if (!$this->canRender()) {
|
| 30 |
-
return '';
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
$this->addLine("_ltk.Click.Submit();");
|
| 34 |
-
|
| 35 |
-
return parent::_toHtml();
|
| 36 |
-
}
|
| 37 |
-
catch(Exception $e) {
|
| 38 |
-
$this->getLogger()->addException($e);
|
| 39 |
-
return '';
|
| 40 |
-
}
|
| 41 |
-
}
|
| 42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Listrak/Remarketing/Helper/Product.php
CHANGED
|
@@ -743,7 +743,9 @@ class Listrak_Remarketing_Helper_Product
|
|
| 743 |
private function _getFirstPathByPosition(
|
| 744 |
$categoryCollection, $maxLevel, $underPath
|
| 745 |
) {
|
| 746 |
-
|
|
|
|
|
|
|
| 747 |
return $underPath;
|
| 748 |
}
|
| 749 |
|
|
@@ -759,11 +761,11 @@ class Listrak_Remarketing_Helper_Product
|
|
| 759 |
continue;
|
| 760 |
}
|
| 761 |
|
| 762 |
-
if (sizeof($pathIds) >
|
| 763 |
-
&& !in_array($pathIds[
|
| 764 |
) {
|
| 765 |
$isUnderPath = true;
|
| 766 |
-
for ($i = 0; $i <
|
| 767 |
if ($pathIds[$i] != $underPath[$i]) {
|
| 768 |
$isUnderPath = false;
|
| 769 |
break;
|
|
@@ -771,7 +773,7 @@ class Listrak_Remarketing_Helper_Product
|
|
| 771 |
}
|
| 772 |
|
| 773 |
if ($isUnderPath) {
|
| 774 |
-
$nextCategory[] = $pathIds[
|
| 775 |
}
|
| 776 |
}
|
| 777 |
}
|
| 743 |
private function _getFirstPathByPosition(
|
| 744 |
$categoryCollection, $maxLevel, $underPath
|
| 745 |
) {
|
| 746 |
+
$underPathSize = sizeof($underPath);
|
| 747 |
+
|
| 748 |
+
if ($underPathSize >= $maxLevel) {
|
| 749 |
return $underPath;
|
| 750 |
}
|
| 751 |
|
| 761 |
continue;
|
| 762 |
}
|
| 763 |
|
| 764 |
+
if (sizeof($pathIds) > $underPathSize
|
| 765 |
+
&& !in_array($pathIds[$underPathSize], $nextCategory)
|
| 766 |
) {
|
| 767 |
$isUnderPath = true;
|
| 768 |
+
for ($i = 0; $i < $underPathSize; $i++) {
|
| 769 |
if ($pathIds[$i] != $underPath[$i]) {
|
| 770 |
$isUnderPath = false;
|
| 771 |
break;
|
| 773 |
}
|
| 774 |
|
| 775 |
if ($isUnderPath) {
|
| 776 |
+
$nextCategory[] = $pathIds[$underPathSize];
|
| 777 |
}
|
| 778 |
}
|
| 779 |
}
|
app/code/community/Listrak/Remarketing/Model/Apiextension/Api.php
CHANGED
|
@@ -22,6 +22,11 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 22 |
'order' => array('order_id' => 'entity_id')
|
| 23 |
);
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
/**
|
| 26 |
* Retrieve subscriber information
|
| 27 |
*
|
|
@@ -162,12 +167,8 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 162 |
/* @var Listrak_Remarketing_Helper_Data $helper */
|
| 163 |
$helper = Mage::helper('remarketing');
|
| 164 |
|
| 165 |
-
$fields = array('entity_id' => '', 'firstname' => '', 'lastname' => '',
|
| 166 |
-
'email' => '', 'website_id' => '', 'store_id' => '', 'group_id' => '',
|
| 167 |
-
'gender_name' => '', 'dob' => '', 'group_name' => '');
|
| 168 |
-
|
| 169 |
$helper->setGroupNameAndGenderNameForCustomer($customer);
|
| 170 |
-
$result = array_intersect_key($customer->toArray(), $
|
| 171 |
|
| 172 |
$metas = $this->_getCustomerMetas($storeId, $customer);
|
| 173 |
if ($metas) {
|
|
@@ -213,8 +214,6 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 213 |
$helper->requireCoreEnabled();
|
| 214 |
|
| 215 |
try {
|
| 216 |
-
$productsUpdated = array();
|
| 217 |
-
|
| 218 |
/* @var Mage_Sales_Model_Resource_Order_Collection $collection */
|
| 219 |
$collection = Mage::getModel("sales/order")->getCollection();
|
| 220 |
|
|
@@ -248,6 +247,8 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 248 |
}
|
| 249 |
|
| 250 |
$results = array();
|
|
|
|
|
|
|
| 251 |
|
| 252 |
/* @var Mage_Sales_Model_Order $order */
|
| 253 |
foreach ($collection as $order) {
|
|
@@ -277,6 +278,7 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 277 |
|
| 278 |
/* @var Mage_Sales_Model_Resource_Order_Shipment_Collection $shipmentCollection */
|
| 279 |
$shipmentCollection = $order->getShipmentsCollection();
|
|
|
|
| 280 |
|
| 281 |
/* @var Mage_Sales_Model_Order_Shipment $shipment */
|
| 282 |
$shipment = $shipmentCollection->getFirstItem();
|
|
@@ -291,42 +293,14 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 291 |
}
|
| 292 |
}
|
| 293 |
|
| 294 |
-
$quantities = array();
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
$info = $productHelper
|
| 302 |
-
->getProductInformationFromOrderItem(
|
| 303 |
-
$item, array('product')
|
| 304 |
-
);
|
| 305 |
-
|
| 306 |
-
if (!in_array($info->getProductId(), $productsUpdated, true)) {
|
| 307 |
-
/* @var Mage_Catalog_Model_Product $product */
|
| 308 |
-
$product = Mage::getModel('catalog/product')
|
| 309 |
-
->load($info->getProductId());
|
| 310 |
-
if ($product) {
|
| 311 |
-
$quantity = array();
|
| 312 |
-
|
| 313 |
-
$quantity['sku'] = $product->getSku();
|
| 314 |
-
$quantity['in_stock']
|
| 315 |
-
= $product->isAvailable() ? "true" : "false";
|
| 316 |
-
|
| 317 |
-
/* @var Mage_Cataloginventory_Model_Stock_Item $stockItem */
|
| 318 |
-
$stockItem = $product->getStockItem();
|
| 319 |
-
if ($stockItem) {
|
| 320 |
-
$quantity['qty_on_hand'] = $stockItem->getStockQty();
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
$quantities[] = $quantity;
|
| 324 |
-
}
|
| 325 |
-
|
| 326 |
-
$productsUpdated[] = $info->getProductId();
|
| 327 |
}
|
| 328 |
}
|
| 329 |
-
$result['quantities'] = $quantities;
|
| 330 |
|
| 331 |
$results[] = $result;
|
| 332 |
}
|
|
@@ -338,6 +312,82 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 338 |
);
|
| 339 |
}
|
| 340 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 341 |
|
| 342 |
/**
|
| 343 |
* Retrieve orders
|
|
@@ -382,6 +432,24 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 382 |
->setPageSize($perPage)->setCurPage($page)
|
| 383 |
->setOrder('created_at', 'ASC');
|
| 384 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
$results = array();
|
| 386 |
|
| 387 |
/* @var Mage_Sales_Model_Order $order */
|
|
@@ -464,16 +532,13 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 464 |
$result['product'] = array();
|
| 465 |
foreach ($order->getAllVisibleItems() as $item) {
|
| 466 |
$result['product'][]
|
| 467 |
-
= $this->_getOrderItemProductEntity($storeId, $order, $item);
|
| 468 |
}
|
| 469 |
|
| 470 |
if ($order->getCustomerId()) {
|
| 471 |
-
|
| 472 |
-
$customer = Mage::getModel("customer/customer")
|
| 473 |
-
->load($order->getCustomerId());
|
| 474 |
-
if ($customer) {
|
| 475 |
$result['customer']
|
| 476 |
-
= $this->_getCustomerArray($storeId, $
|
| 477 |
}
|
| 478 |
}
|
| 479 |
|
|
@@ -491,14 +556,16 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 491 |
/**
|
| 492 |
* Extract order item information for Magento objects
|
| 493 |
*
|
| 494 |
-
* @param int $storeId
|
| 495 |
-
* @param Mage_Sales_Model_Order $order
|
| 496 |
-
* @param Mage_Sales_Model_Order_Item $item
|
|
|
|
| 497 |
*
|
| 498 |
* @return array
|
| 499 |
*/
|
| 500 |
private function _getOrderItemProductEntity(
|
| 501 |
-
$storeId, Mage_Sales_Model_Order $order, Mage_Sales_Model_Order_Item $item
|
|
|
|
| 502 |
) {
|
| 503 |
/* @var Listrak_Remarketing_Helper_Product $productHelper */
|
| 504 |
$productHelper = Mage::helper('remarketing/product');
|
|
@@ -514,14 +581,11 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 514 |
$product['sku'] = $productModel->getSku();
|
| 515 |
$product['name'] = $productModel->getName();
|
| 516 |
$product['product_price'] = $productModel->getPrice();
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
$stockItem = $productModel->getStockItem();
|
| 523 |
-
if ($stockItem) {
|
| 524 |
-
$product['qty_on_hand'] = $stockItem->getStockQty();
|
| 525 |
}
|
| 526 |
} else {
|
| 527 |
$product['sku'] = $item->getProductOptionByCode('simple_sku')
|
|
@@ -558,7 +622,7 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 558 |
$product['bundle_items'] = array();
|
| 559 |
foreach ($item->getChildrenItems() as $childItem) {
|
| 560 |
$product['bundle_items'][] = $this->_getOrderItemProductEntity(
|
| 561 |
-
$storeId, $order, $childItem
|
| 562 |
);
|
| 563 |
}
|
| 564 |
}
|
|
@@ -724,27 +788,23 @@ class Listrak_Remarketing_Model_Apiextension_Api
|
|
| 724 |
. get_class($productModel) . ','
|
| 725 |
. get_class($productModel->getCollection());
|
| 726 |
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
|
| 730 |
-
|
| 731 |
-
$countQueryText = "select count(*) as c from "
|
| 732 |
-
. $resource->getTableName("listrak/subscriber_update");
|
| 733 |
-
$numSubUpdates = $dbRead->fetchRow($countQueryText);
|
| 734 |
|
| 735 |
if ($helper->trackingTablesExist()) {
|
| 736 |
-
$
|
| 737 |
-
|
| 738 |
-
|
| 739 |
-
$
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
$result["counts"] = $numSessions
|
| 744 |
-
. $numSubUpdates
|
| 745 |
-
. $numClicks
|
| 746 |
} else {
|
| 747 |
-
$result["counts"] = $numSubUpdates
|
| 748 |
}
|
| 749 |
|
| 750 |
$result["modules"] = array();
|
| 22 |
'order' => array('order_id' => 'entity_id')
|
| 23 |
);
|
| 24 |
|
| 25 |
+
private $_customerAttributes = array('entity_id' => '', 'firstname' => '',
|
| 26 |
+
'lastname' => '', 'email' => '', 'website_id' => '', 'store_id' => '',
|
| 27 |
+
'group_id' => '', 'gender_name' => '', 'dob' => '', 'group_name' => '',
|
| 28 |
+
'gender' => '');
|
| 29 |
+
|
| 30 |
/**
|
| 31 |
* Retrieve subscriber information
|
| 32 |
*
|
| 167 |
/* @var Listrak_Remarketing_Helper_Data $helper */
|
| 168 |
$helper = Mage::helper('remarketing');
|
| 169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
$helper->setGroupNameAndGenderNameForCustomer($customer);
|
| 171 |
+
$result = array_intersect_key($customer->toArray(), $this->_customerAttributes);
|
| 172 |
|
| 173 |
$metas = $this->_getCustomerMetas($storeId, $customer);
|
| 174 |
if ($metas) {
|
| 214 |
$helper->requireCoreEnabled();
|
| 215 |
|
| 216 |
try {
|
|
|
|
|
|
|
| 217 |
/* @var Mage_Sales_Model_Resource_Order_Collection $collection */
|
| 218 |
$collection = Mage::getModel("sales/order")->getCollection();
|
| 219 |
|
| 247 |
}
|
| 248 |
|
| 249 |
$results = array();
|
| 250 |
+
|
| 251 |
+
$allQuantities = $this->_getProductQtyInfoForOrders($storeId, $collection);
|
| 252 |
|
| 253 |
/* @var Mage_Sales_Model_Order $order */
|
| 254 |
foreach ($collection as $order) {
|
| 278 |
|
| 279 |
/* @var Mage_Sales_Model_Resource_Order_Shipment_Collection $shipmentCollection */
|
| 280 |
$shipmentCollection = $order->getShipmentsCollection();
|
| 281 |
+
$shipmentCollection->getSelect()->limit(1);
|
| 282 |
|
| 283 |
/* @var Mage_Sales_Model_Order_Shipment $shipment */
|
| 284 |
$shipment = $shipmentCollection->getFirstItem();
|
| 293 |
}
|
| 294 |
}
|
| 295 |
|
| 296 |
+
$result['quantities'] = array();
|
| 297 |
+
$productIds = $this->_getOrderProductIds($order);
|
| 298 |
+
foreach($productIds as $productId) {
|
| 299 |
+
if (array_key_exists($productId, $allQuantities)) {
|
| 300 |
+
$result['quantities'][] = $allQuantities[$productId];
|
| 301 |
+
unset($allQuantities[$productId]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
}
|
| 303 |
}
|
|
|
|
| 304 |
|
| 305 |
$results[] = $result;
|
| 306 |
}
|
| 312 |
);
|
| 313 |
}
|
| 314 |
}
|
| 315 |
+
|
| 316 |
+
/**
|
| 317 |
+
* Retrieve inventory information for all products in all orders
|
| 318 |
+
*
|
| 319 |
+
* @param Mage_Sales_Model_Resource_Order_Collection $collection
|
| 320 |
+
* @return array
|
| 321 |
+
*/
|
| 322 |
+
private function _getProductQtyInfoForOrders($storeId, $collection)
|
| 323 |
+
{
|
| 324 |
+
/* @var Mage_Core_Model_Resource $resource */
|
| 325 |
+
$resource = Mage::getSingleton('core/resource');
|
| 326 |
+
|
| 327 |
+
$productIds = $this->_getAllProductIds($collection);
|
| 328 |
+
|
| 329 |
+
if (sizeof($productIds) == 0) {
|
| 330 |
+
return array();
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
$products = Mage::getModel('catalog/product')
|
| 334 |
+
->getCollection()
|
| 335 |
+
->addStoreFilter($storeId)
|
| 336 |
+
->addFieldToFilter('entity_id', $productIds)
|
| 337 |
+
->addAttributeToSelect('*');
|
| 338 |
+
|
| 339 |
+
Mage::getModel('cataloginventory/stock')
|
| 340 |
+
->addItemsToProducts($products);
|
| 341 |
+
|
| 342 |
+
$result = array();
|
| 343 |
+
foreach($products as $productId => $product) {
|
| 344 |
+
$item = array(
|
| 345 |
+
'sku' => $product->getSku(),
|
| 346 |
+
'in_stock' => $product->isAvailable() ? "true" : "false"
|
| 347 |
+
);
|
| 348 |
+
|
| 349 |
+
/* @var Mage_Cataloginventory_Model_Stock_Item $stockItem */
|
| 350 |
+
$stockItem = $product->getStockItem();
|
| 351 |
+
if ($stockItem) {
|
| 352 |
+
$item['qty_on_hand'] = $stockItem->getStockQty();
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
$result[$productId] = $item;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
return $result;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
/**
|
| 362 |
+
* Retrieve all product IDs for order collection
|
| 363 |
+
*
|
| 364 |
+
* @param Mage_Sales_Model_Resource_Order_Collection $collection
|
| 365 |
+
* @return array
|
| 366 |
+
*/
|
| 367 |
+
private function _getAllProductIds($collection)
|
| 368 |
+
{
|
| 369 |
+
$ids = array();
|
| 370 |
+
foreach($collection as $order) {
|
| 371 |
+
$ids = array_merge($ids, $this->_getOrderProductIds($order));
|
| 372 |
+
}
|
| 373 |
+
return array_unique($ids);
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
/**
|
| 377 |
+
* Retrieve all product IDs in order
|
| 378 |
+
*
|
| 379 |
+
* @param Mage_Sales_Model_Order $order
|
| 380 |
+
* @return array
|
| 381 |
+
*/
|
| 382 |
+
private function _getOrderProductIds($order)
|
| 383 |
+
{
|
| 384 |
+
$ids = array();
|
| 385 |
+
foreach($order->getAllItems() as $item)
|
| 386 |
+
{
|
| 387 |
+
$ids[] = $item->getProductId();
|
| 388 |
+
}
|
| 389 |
+
return $ids;
|
| 390 |
+
}
|
| 391 |
|
| 392 |
/**
|
| 393 |
* Retrieve orders
|
| 432 |
->setPageSize($perPage)->setCurPage($page)
|
| 433 |
->setOrder('created_at', 'ASC');
|
| 434 |
|
| 435 |
+
$customerIds = array();
|
| 436 |
+
foreach ($orders as $order) {
|
| 437 |
+
$customerIds[] = $order->getCustomerId();
|
| 438 |
+
}
|
| 439 |
+
|
| 440 |
+
$customerMap = array();
|
| 441 |
+
if (sizeof($customerIds) > 0) {
|
| 442 |
+
/* @var Mage_Customer_Model_Customer $customers */
|
| 443 |
+
$customers = Mage::getModel('customer/customer')->getCollection();
|
| 444 |
+
$customers
|
| 445 |
+
->addAttributeToSelect(array_keys($this->_customerAttributes))
|
| 446 |
+
->addFieldToFilter('entity_id', $customerIds);
|
| 447 |
+
|
| 448 |
+
$customerMap = $customers->getItems();
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
$stockInfo = $this->_getProductQtyInfoForOrders($storeId, $orders);
|
| 452 |
+
|
| 453 |
$results = array();
|
| 454 |
|
| 455 |
/* @var Mage_Sales_Model_Order $order */
|
| 532 |
$result['product'] = array();
|
| 533 |
foreach ($order->getAllVisibleItems() as $item) {
|
| 534 |
$result['product'][]
|
| 535 |
+
= $this->_getOrderItemProductEntity($storeId, $order, $item, $stockInfo);
|
| 536 |
}
|
| 537 |
|
| 538 |
if ($order->getCustomerId()) {
|
| 539 |
+
if (array_key_exists($order->getCustomerId(), $customerMap)) {
|
|
|
|
|
|
|
|
|
|
| 540 |
$result['customer']
|
| 541 |
+
= $this->_getCustomerArray($storeId, $customerMap[$order->getCustomerId()]);
|
| 542 |
}
|
| 543 |
}
|
| 544 |
|
| 556 |
/**
|
| 557 |
* Extract order item information for Magento objects
|
| 558 |
*
|
| 559 |
+
* @param int $storeId
|
| 560 |
+
* @param Mage_Sales_Model_Order $order
|
| 561 |
+
* @param Mage_Sales_Model_Order_Item $item
|
| 562 |
+
* @param array $stockByProduct
|
| 563 |
*
|
| 564 |
* @return array
|
| 565 |
*/
|
| 566 |
private function _getOrderItemProductEntity(
|
| 567 |
+
$storeId, Mage_Sales_Model_Order $order, Mage_Sales_Model_Order_Item $item,
|
| 568 |
+
$stockByProduct
|
| 569 |
) {
|
| 570 |
/* @var Listrak_Remarketing_Helper_Product $productHelper */
|
| 571 |
$productHelper = Mage::helper('remarketing/product');
|
| 581 |
$product['sku'] = $productModel->getSku();
|
| 582 |
$product['name'] = $productModel->getName();
|
| 583 |
$product['product_price'] = $productModel->getPrice();
|
| 584 |
+
|
| 585 |
+
if (array_key_exists($productModel->getId(), $stockByProduct)) {
|
| 586 |
+
$stock = $stockByProduct[$productModel->getId()];
|
| 587 |
+
$product['in_stock'] = $stock['in_stock'];
|
| 588 |
+
$product['qty_on_hand'] = $stock['qty_on_hand'];
|
|
|
|
|
|
|
|
|
|
| 589 |
}
|
| 590 |
} else {
|
| 591 |
$product['sku'] = $item->getProductOptionByCode('simple_sku')
|
| 622 |
$product['bundle_items'] = array();
|
| 623 |
foreach ($item->getChildrenItems() as $childItem) {
|
| 624 |
$product['bundle_items'][] = $this->_getOrderItemProductEntity(
|
| 625 |
+
$storeId, $order, $childItem, $stockByProduct
|
| 626 |
);
|
| 627 |
}
|
| 628 |
}
|
| 788 |
. get_class($productModel) . ','
|
| 789 |
. get_class($productModel->getCollection());
|
| 790 |
|
| 791 |
+
$numSubUpdates = Mage::getModel("listrak/subscriberupdate")
|
| 792 |
+
->getCollection()
|
| 793 |
+
->getSize();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 794 |
|
| 795 |
if ($helper->trackingTablesExist()) {
|
| 796 |
+
$numSessions = Mage::getModel("listrak/session")
|
| 797 |
+
->getCollection()
|
| 798 |
+
->getSize();
|
| 799 |
+
$numClicks = Mage::getModel("listrak/click")
|
| 800 |
+
->getCollection()
|
| 801 |
+
->getSize();
|
| 802 |
+
|
| 803 |
+
$result["counts"] = $numSessions . ','
|
| 804 |
+
. $numSubUpdates . ','
|
| 805 |
+
. $numClicks;
|
| 806 |
} else {
|
| 807 |
+
$result["counts"] = $numSubUpdates;
|
| 808 |
}
|
| 809 |
|
| 810 |
$result["modules"] = array();
|
app/code/community/Listrak/Remarketing/Model/Mysql4/Abandonedcart.php
CHANGED
|
@@ -35,7 +35,7 @@ class Listrak_Remarketing_Model_Mysql4_Abandonedcart
|
|
| 35 |
*
|
| 36 |
* @return Mage_Core_Model_Resource_Db_Abstract
|
| 37 |
*/
|
| 38 |
-
protected function _afterLoad(
|
| 39 |
{
|
| 40 |
$object->setSession(
|
| 41 |
Mage::getModel("listrak/session")->load($object->getId())
|
| 35 |
*
|
| 36 |
* @return Mage_Core_Model_Resource_Db_Abstract
|
| 37 |
*/
|
| 38 |
+
protected function _afterLoad(Mage_Core_Model_Abstract $object)
|
| 39 |
{
|
| 40 |
$object->setSession(
|
| 41 |
Mage::getModel("listrak/session")->load($object->getId())
|
app/code/community/Listrak/Remarketing/Model/Mysql4/Product/Attribute/Set/Map/Collection.php
CHANGED
|
@@ -44,7 +44,7 @@ class Listrak_Remarketing_Model_Mysql4_Product_Attribute_Set_Map_Collection
|
|
| 44 |
*/
|
| 45 |
public function addMapIdFilter($ids)
|
| 46 |
{
|
| 47 |
-
$this->getSelect()->where('map_id IN ('
|
| 48 |
|
| 49 |
return $this;
|
| 50 |
}
|
| 44 |
*/
|
| 45 |
public function addMapIdFilter($ids)
|
| 46 |
{
|
| 47 |
+
$this->getSelect()->where('map_id IN (?)', $ids);
|
| 48 |
|
| 49 |
return $this;
|
| 50 |
}
|
app/code/community/Listrak/Remarketing/Model/Mysql4/Session.php
CHANGED
|
@@ -43,7 +43,7 @@ class Listrak_Remarketing_Model_Mysql4_Session
|
|
| 43 |
*
|
| 44 |
* @return Listrak_Remarketing_Model_Session
|
| 45 |
*/
|
| 46 |
-
protected function _afterLoad(
|
| 47 |
{
|
| 48 |
if ($object->getCustomerId()) {
|
| 49 |
/* @var Mage_Customer_Model_Customer $customer */
|
| 43 |
*
|
| 44 |
* @return Listrak_Remarketing_Model_Session
|
| 45 |
*/
|
| 46 |
+
protected function _afterLoad(Mage_Core_Model_Abstract $object)
|
| 47 |
{
|
| 48 |
if ($object->getCustomerId()) {
|
| 49 |
/* @var Mage_Customer_Model_Customer $customer */
|
app/code/community/Listrak/Remarketing/controllers/CartController.php
CHANGED
|
@@ -20,16 +20,6 @@ class Listrak_Remarketing_CartController
|
|
| 20 |
{
|
| 21 |
private $_ltkSession = false;
|
| 22 |
|
| 23 |
-
/**
|
| 24 |
-
* Index action
|
| 25 |
-
*
|
| 26 |
-
* @return $this
|
| 27 |
-
*/
|
| 28 |
-
public function indexAction()
|
| 29 |
-
{
|
| 30 |
-
return $this;
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
/**
|
| 34 |
* Reload cart action
|
| 35 |
*
|
| 20 |
{
|
| 21 |
private $_ltkSession = false;
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
/**
|
| 24 |
* Reload cart action
|
| 25 |
*
|
app/code/community/Listrak/Remarketing/controllers/EmailController.php
CHANGED
|
@@ -58,33 +58,4 @@ class Listrak_Remarketing_EmailController
|
|
| 58 |
$logger->addException($e);
|
| 59 |
}
|
| 60 |
}
|
| 61 |
-
|
| 62 |
-
/**
|
| 63 |
-
* FSID action
|
| 64 |
-
*
|
| 65 |
-
* @deprecated This action is not used anywhere, and its use isn't clear
|
| 66 |
-
*
|
| 67 |
-
* @return void
|
| 68 |
-
*/
|
| 69 |
-
public function fsidAction()
|
| 70 |
-
{
|
| 71 |
-
$email = $this->getRequest()->getParam('email');
|
| 72 |
-
|
| 73 |
-
if (!Zend_Validate::is($email, 'EmailAddress')) {
|
| 74 |
-
echo "invalid";
|
| 75 |
-
} else {
|
| 76 |
-
$emailcaptureId = $this->getRequest()->getParam('cid');
|
| 77 |
-
|
| 78 |
-
/* @var Listrak_Remarketing_Model_Session $session */
|
| 79 |
-
$session = Mage::getModel('listrak/session');
|
| 80 |
-
$session->setSessionId($this->getRequest()->getParam('ltksid'));
|
| 81 |
-
|
| 82 |
-
/* @var Listrak_Remarketing_Model_Mysql4_Session $sessionResource */
|
| 83 |
-
$sessionResource = $session->getResource();
|
| 84 |
-
$sessionResource->loadBySessionId($session);
|
| 85 |
-
$sessionResource->insertEmail($session, $email, $emailcaptureId);
|
| 86 |
-
|
| 87 |
-
echo json_encode(array('status' => true));
|
| 88 |
-
}
|
| 89 |
-
}
|
| 90 |
}
|
| 58 |
$logger->addException($e);
|
| 59 |
}
|
| 60 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
}
|
app/code/community/Listrak/Remarketing/controllers/Remarketing/EmailcaptureController.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Controller_Action
|
| 20 |
{
|
| 21 |
/**
|
|
@@ -55,11 +55,6 @@ class Listrak_Remarketing_Remarketing_EmailCaptureController
|
|
| 55 |
{
|
| 56 |
try {
|
| 57 |
$this->_initAction();
|
| 58 |
-
|
| 59 |
-
$this->_addContent(
|
| 60 |
-
$this->getLayout()->createBlock('remarketing/adminhtml_emailcapture')
|
| 61 |
-
);
|
| 62 |
-
|
| 63 |
return $this->renderLayout();
|
| 64 |
} catch (Exception $e) {
|
| 65 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
|
@@ -105,19 +100,6 @@ class Listrak_Remarketing_Remarketing_EmailCaptureController
|
|
| 105 |
);
|
| 106 |
|
| 107 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
| 108 |
-
|
| 109 |
-
$this
|
| 110 |
-
->_addContent(
|
| 111 |
-
$this->getLayout()->createBlock(
|
| 112 |
-
'remarketing/adminhtml_emailcapture_edit'
|
| 113 |
-
)
|
| 114 |
-
)
|
| 115 |
-
->_addLeft(
|
| 116 |
-
$this->getLayout()->createBlock(
|
| 117 |
-
'remarketing/adminhtml_emailcapture_edit_tabs'
|
| 118 |
-
)
|
| 119 |
-
);
|
| 120 |
-
|
| 121 |
return $this->renderLayout();
|
| 122 |
} else {
|
| 123 |
/* @var Mage_Adminhtml_Model_Session $adminSession */
|
|
@@ -241,24 +223,4 @@ class Listrak_Remarketing_Remarketing_EmailCaptureController
|
|
| 241 |
|
| 242 |
return $this->_redirect('*/*/');
|
| 243 |
}
|
| 244 |
-
|
| 245 |
-
/**
|
| 246 |
-
* Grid action
|
| 247 |
-
*
|
| 248 |
-
* Product grid for AJAX request.
|
| 249 |
-
* Sort and filter result for example.
|
| 250 |
-
*
|
| 251 |
-
* @return void
|
| 252 |
-
*/
|
| 253 |
-
public function gridAction()
|
| 254 |
-
{
|
| 255 |
-
$this->loadLayout();
|
| 256 |
-
$this->getResponse()->setBody(
|
| 257 |
-
$this->getLayout()
|
| 258 |
-
->createBlock(
|
| 259 |
-
'importedit/adminhtml_emailcapture_grid'
|
| 260 |
-
)
|
| 261 |
-
->toHtml()
|
| 262 |
-
);
|
| 263 |
-
}
|
| 264 |
}
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_controllers_Remarketing_EmailcaptureController
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Remarketing_EmailcaptureController
|
| 19 |
extends Mage_Adminhtml_Controller_Action
|
| 20 |
{
|
| 21 |
/**
|
| 55 |
{
|
| 56 |
try {
|
| 57 |
$this->_initAction();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
return $this->renderLayout();
|
| 59 |
} catch (Exception $e) {
|
| 60 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
| 100 |
);
|
| 101 |
|
| 102 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
return $this->renderLayout();
|
| 104 |
} else {
|
| 105 |
/* @var Mage_Adminhtml_Model_Session $adminSession */
|
| 223 |
|
| 224 |
return $this->_redirect('*/*/');
|
| 225 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
}
|
app/code/community/Listrak/Remarketing/controllers/Remarketing/ProductattributesController.php
CHANGED
|
@@ -13,9 +13,9 @@
|
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
-
* Class
|
| 17 |
*/
|
| 18 |
-
class
|
| 19 |
extends Mage_Adminhtml_Controller_Action
|
| 20 |
{
|
| 21 |
/**
|
|
@@ -51,8 +51,6 @@ class Listrak_Remarketing_Remarketing_ProductAttributesController
|
|
| 51 |
*/
|
| 52 |
public function indexAction()
|
| 53 |
{
|
| 54 |
-
$this->_initAction();
|
| 55 |
-
|
| 56 |
try {
|
| 57 |
/* @var Listrak_Remarketing_Helper_Product_Attribute_Set_Map $helper */
|
| 58 |
$helper = Mage::helper('remarketing/product_attribute_set_map');
|
|
@@ -71,11 +69,7 @@ class Listrak_Remarketing_Remarketing_ProductAttributesController
|
|
| 71 |
|
| 72 |
Mage::register('productattribute_sets', $sets);
|
| 73 |
|
| 74 |
-
$this->
|
| 75 |
-
$this->getLayout()
|
| 76 |
-
->createBlock('remarketing/adminhtml_productattributes')
|
| 77 |
-
);
|
| 78 |
-
|
| 79 |
return $this->renderLayout();
|
| 80 |
} catch (Exception $e) {
|
| 81 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
|
@@ -104,8 +98,6 @@ class Listrak_Remarketing_Remarketing_ProductAttributesController
|
|
| 104 |
*/
|
| 105 |
public function editAction()
|
| 106 |
{
|
| 107 |
-
$this->_initAction();
|
| 108 |
-
|
| 109 |
try {
|
| 110 |
$mapId = $this->getRequest()->getParam('id');
|
| 111 |
$model = Mage::getModel('listrak/product_attribute_set_map')
|
|
@@ -116,20 +108,8 @@ class Listrak_Remarketing_Remarketing_ProductAttributesController
|
|
| 116 |
|
| 117 |
Mage::register('productattribute_data', $model);
|
| 118 |
|
|
|
|
| 119 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
| 120 |
-
|
| 121 |
-
$this
|
| 122 |
-
->_addContent(
|
| 123 |
-
$this->getLayout()
|
| 124 |
-
->createBlock('remarketing/adminhtml_productattributes_edit')
|
| 125 |
-
)
|
| 126 |
-
->_addLeft(
|
| 127 |
-
$this->getLayout()
|
| 128 |
-
->createBlock(
|
| 129 |
-
'remarketing/adminhtml_productattributes_edit_tabs'
|
| 130 |
-
)
|
| 131 |
-
);
|
| 132 |
-
|
| 133 |
return $this->renderLayout();
|
| 134 |
} catch (Exception $e) {
|
| 135 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
|
@@ -242,26 +222,25 @@ class Listrak_Remarketing_Remarketing_ProductAttributesController
|
|
| 242 |
if ($attributeCode) {
|
| 243 |
/* @var Listrak_Remarketing_Model_Mysql4_Product_Attribute_Set_Map_Collection $sets */
|
| 244 |
$sets = Mage::getModel('listrak/product_attribute_set_map')
|
| 245 |
-
->getCollection()
|
|
|
|
| 246 |
|
| 247 |
/* @var Listrak_Remarketing_Model_Product_Attribute_Set_Map $set */
|
| 248 |
foreach ($sets as $set) {
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
$set->save();
|
| 264 |
-
}
|
| 265 |
}
|
| 266 |
}
|
| 267 |
}
|
| 13 |
*/
|
| 14 |
|
| 15 |
/**
|
| 16 |
+
* Class Listrak_Remarketing_controllers_Remarketing_ProductattributesController
|
| 17 |
*/
|
| 18 |
+
class Listrak_Remarketing_Remarketing_ProductattributesController
|
| 19 |
extends Mage_Adminhtml_Controller_Action
|
| 20 |
{
|
| 21 |
/**
|
| 51 |
*/
|
| 52 |
public function indexAction()
|
| 53 |
{
|
|
|
|
|
|
|
| 54 |
try {
|
| 55 |
/* @var Listrak_Remarketing_Helper_Product_Attribute_Set_Map $helper */
|
| 56 |
$helper = Mage::helper('remarketing/product_attribute_set_map');
|
| 69 |
|
| 70 |
Mage::register('productattribute_sets', $sets);
|
| 71 |
|
| 72 |
+
$this->_initAction();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
return $this->renderLayout();
|
| 74 |
} catch (Exception $e) {
|
| 75 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
| 98 |
*/
|
| 99 |
public function editAction()
|
| 100 |
{
|
|
|
|
|
|
|
| 101 |
try {
|
| 102 |
$mapId = $this->getRequest()->getParam('id');
|
| 103 |
$model = Mage::getModel('listrak/product_attribute_set_map')
|
| 108 |
|
| 109 |
Mage::register('productattribute_data', $model);
|
| 110 |
|
| 111 |
+
$this->_initAction();
|
| 112 |
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
return $this->renderLayout();
|
| 114 |
} catch (Exception $e) {
|
| 115 |
/* @var Listrak_Remarketing_Model_Log $logger */
|
| 222 |
if ($attributeCode) {
|
| 223 |
/* @var Listrak_Remarketing_Model_Mysql4_Product_Attribute_Set_Map_Collection $sets */
|
| 224 |
$sets = Mage::getModel('listrak/product_attribute_set_map')
|
| 225 |
+
->getCollection()
|
| 226 |
+
->addFieldToFilter('brand_attribute_code', array('null' => true));
|
| 227 |
|
| 228 |
/* @var Listrak_Remarketing_Model_Product_Attribute_Set_Map $set */
|
| 229 |
foreach ($sets as $set) {
|
| 230 |
+
/* @var Mage_Catalog_Model_Resource_Product_Attribute_Collection $attrCollection */
|
| 231 |
+
$attrCollection = Mage::getResourceModel(
|
| 232 |
+
'catalog/product_attribute_collection'
|
| 233 |
+
);
|
| 234 |
+
|
| 235 |
+
$attrCount = $attrCollection
|
| 236 |
+
->addVisibleFilter()
|
| 237 |
+
->setAttributeSetFilter($set->getAttributeSetId())
|
| 238 |
+
->setCodeFilter($attributeCode)
|
| 239 |
+
->getSize();
|
| 240 |
+
|
| 241 |
+
if ($attrCount > 0) {
|
| 242 |
+
$set->setBrandAttributeCode($attributeCode);
|
| 243 |
+
$set->save();
|
|
|
|
|
|
|
| 244 |
}
|
| 245 |
}
|
| 246 |
}
|
app/code/community/Listrak/Remarketing/controllers/TroubleshootingController.php
DELETED
|
@@ -1,30 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Listrak Remarketing Magento Extension Ver. 1.0.0
|
| 4 |
-
*
|
| 5 |
-
* PHP version 5
|
| 6 |
-
*
|
| 7 |
-
* @category Listrak
|
| 8 |
-
* @package Listrak_Remarketing
|
| 9 |
-
* @author Listrak Magento Team <magento@listrak.com>
|
| 10 |
-
* @copyright 2011 Listrak Inc
|
| 11 |
-
* @license http://s1.listrakbi.com/licenses/magento.txt License For Customer Use of Listrak Software
|
| 12 |
-
* @link http://www.listrak.com
|
| 13 |
-
*/
|
| 14 |
-
|
| 15 |
-
/**
|
| 16 |
-
* Class Listrak_Remarketing_TroubleshootingController
|
| 17 |
-
*/
|
| 18 |
-
class Listrak_Remarketing_TroubleshootingController
|
| 19 |
-
extends Mage_Core_Controller_Front_Action
|
| 20 |
-
{
|
| 21 |
-
/**
|
| 22 |
-
* Index action
|
| 23 |
-
*
|
| 24 |
-
* @return void
|
| 25 |
-
*/
|
| 26 |
-
public function indexAction()
|
| 27 |
-
{
|
| 28 |
-
|
| 29 |
-
}
|
| 30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Listrak/Remarketing/etc/config.xml
CHANGED
|
@@ -1,240 +1,240 @@
|
|
| 1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Listrak Remarketing Magento Extension Ver. 1.0.0 - Copyright (c) 2011 Listrak, Inc.
|
| 5 |
-
*/
|
| 6 |
-
-->
|
| 7 |
-
<config>
|
| 8 |
-
<modules>
|
| 9 |
-
<Listrak_Remarketing>
|
| 10 |
-
<version>1.
|
| 11 |
-
</Listrak_Remarketing>
|
| 12 |
-
</modules>
|
| 13 |
-
<frontend>
|
| 14 |
-
<routers>
|
| 15 |
-
<listrak_remarketing>
|
| 16 |
-
<use>standard</use>
|
| 17 |
-
<args>
|
| 18 |
-
<module>Listrak_Remarketing</module>
|
| 19 |
-
<frontName>remarketing</frontName>
|
| 20 |
-
</args>
|
| 21 |
-
</listrak_remarketing>
|
| 22 |
-
</routers>
|
| 23 |
-
<layout>
|
| 24 |
-
<updates>
|
| 25 |
-
<remarketing>
|
| 26 |
-
<file>remarketing.xml</file>
|
| 27 |
-
</remarketing>
|
| 28 |
-
</updates>
|
| 29 |
-
</layout>
|
| 30 |
-
<events>
|
| 31 |
-
<controller_action_layout_load_before>
|
| 32 |
-
<observers>
|
| 33 |
-
<listrak_remarketing_observer>
|
| 34 |
-
<type>singleton</type>
|
| 35 |
-
<class>listrak/observer</class>
|
| 36 |
-
<method>trackingInit</method>
|
| 37 |
-
</listrak_remarketing_observer>
|
| 38 |
-
</observers>
|
| 39 |
-
</controller_action_layout_load_before>
|
| 40 |
-
<sales_order_place_after>
|
| 41 |
-
<observers>
|
| 42 |
-
<listrak_remarketing_observer>
|
| 43 |
-
<type>singleton</type>
|
| 44 |
-
<class>listrak/observer</class>
|
| 45 |
-
<method>orderPlaced</method>
|
| 46 |
-
</listrak_remarketing_observer>
|
| 47 |
-
</observers>
|
| 48 |
-
</sales_order_place_after>
|
| 49 |
-
<newsletter_subscriber_save_after>
|
| 50 |
-
<observers>
|
| 51 |
-
<listrak_remarketing_observer>
|
| 52 |
-
<type>singleton</type>
|
| 53 |
-
<class>listrak/observer</class>
|
| 54 |
-
<method>subscriberSaved</method>
|
| 55 |
-
</listrak_remarketing_observer>
|
| 56 |
-
</observers>
|
| 57 |
-
</newsletter_subscriber_save_after>
|
| 58 |
-
<review_save_commit_after>
|
| 59 |
-
<observers>
|
| 60 |
-
<listrak_remarketing_observer>
|
| 61 |
-
<type>singleton</type>
|
| 62 |
-
<class>listrak/observer</class>
|
| 63 |
-
<method>reviewUpdated</method>
|
| 64 |
-
</listrak_remarketing_observer>
|
| 65 |
-
</observers>
|
| 66 |
-
</review_save_commit_after>
|
| 67 |
-
<review_delete_commit_after>
|
| 68 |
-
<observers>
|
| 69 |
-
<listrak_remarketing_observer>
|
| 70 |
-
<type>singleton</type>
|
| 71 |
-
<class>listrak/observer</class>
|
| 72 |
-
<method>reviewDeleted</method>
|
| 73 |
-
</listrak_remarketing_observer>
|
| 74 |
-
</observers>
|
| 75 |
-
</review_delete_commit_after>
|
| 76 |
-
<sales_quote_save_after>
|
| 77 |
-
<observers>
|
| 78 |
-
<listrak_remarketing_observer>
|
| 79 |
-
<type>singleton</type>
|
| 80 |
-
<class>listrak/observer</class>
|
| 81 |
-
<method>cartModified</method>
|
| 82 |
-
</listrak_remarketing_observer>
|
| 83 |
-
</observers>
|
| 84 |
-
</sales_quote_save_after>
|
| 85 |
-
<sales_quote_remove_item>
|
| 86 |
-
<observers>
|
| 87 |
-
<listrak_remarketing_observer>
|
| 88 |
-
<type>singleton</type>
|
| 89 |
-
<class>listrak/observer</class>
|
| 90 |
-
<method>cartModified</method>
|
| 91 |
-
</listrak_remarketing_observer>
|
| 92 |
-
</observers>
|
| 93 |
-
</sales_quote_remove_item>
|
| 94 |
-
<customer_logout>
|
| 95 |
-
<observers>
|
| 96 |
-
<listrak_remarketing_observer>
|
| 97 |
-
<type>singleton</type>
|
| 98 |
-
<class>listrak/observer</class>
|
| 99 |
-
<method>resetCustomerTracking</method>
|
| 100 |
-
</listrak_remarketing_observer>
|
| 101 |
-
</observers>
|
| 102 |
-
</customer_logout>
|
| 103 |
-
</events>
|
| 104 |
-
</frontend>
|
| 105 |
-
<global>
|
| 106 |
-
<models>
|
| 107 |
-
<listrak>
|
| 108 |
-
<class>Listrak_Remarketing_Model</class>
|
| 109 |
-
<resourceModel>listrak_mysql4</resourceModel>
|
| 110 |
-
</listrak>
|
| 111 |
-
<listrak_mysql4>
|
| 112 |
-
<class>Listrak_Remarketing_Model_Mysql4</class>
|
| 113 |
-
<entities>
|
| 114 |
-
<click>
|
| 115 |
-
<table>listrak_remarketing_click</table>
|
| 116 |
-
</click>
|
| 117 |
-
<log>
|
| 118 |
-
<table>listrak_remarketing_log</table>
|
| 119 |
-
</log>
|
| 120 |
-
<session>
|
| 121 |
-
<table>listrak_remarketing_session</table>
|
| 122 |
-
</session>
|
| 123 |
-
<session_email>
|
| 124 |
-
<table>listrak_remarketing_session_email</table>
|
| 125 |
-
</session_email>
|
| 126 |
-
<emailcapture>
|
| 127 |
-
<table>listrak_remarketing_emailcapture</table>
|
| 128 |
-
</emailcapture>
|
| 129 |
-
<subscriber_update>
|
| 130 |
-
<table>listrak_remarketing_subscriber_update</table>
|
| 131 |
-
</subscriber_update>
|
| 132 |
-
<review_update>
|
| 133 |
-
<table>listrak_remarketing_review_update</table>
|
| 134 |
-
</review_update>
|
| 135 |
-
<product_attribute_set_map>
|
| 136 |
-
<table>listrak_remarketing_product_attribute_set_map</table>
|
| 137 |
-
</product_attribute_set_map>
|
| 138 |
-
</entities>
|
| 139 |
-
</listrak_mysql4>
|
| 140 |
-
<newsletter>
|
| 141 |
-
<rewrite>
|
| 142 |
-
<subscriber>Listrak_Remarketing_Model_Subscriber</subscriber>
|
| 143 |
-
</rewrite>
|
| 144 |
-
</newsletter>
|
| 145 |
-
</models>
|
| 146 |
-
<resources>
|
| 147 |
-
<listrak_remarketing_setup>
|
| 148 |
-
<setup>
|
| 149 |
-
<module>Listrak_Remarketing</module>
|
| 150 |
-
</setup>
|
| 151 |
-
<connection>
|
| 152 |
-
<use>core_setup</use>
|
| 153 |
-
</connection>
|
| 154 |
-
</listrak_remarketing_setup>
|
| 155 |
-
<listrak_write>
|
| 156 |
-
<connection>
|
| 157 |
-
<use>core_write</use>
|
| 158 |
-
</connection>
|
| 159 |
-
</listrak_write>
|
| 160 |
-
<listrak_read>
|
| 161 |
-
<connection>
|
| 162 |
-
<use>core_read</use>
|
| 163 |
-
</connection>
|
| 164 |
-
</listrak_read>
|
| 165 |
-
</resources>
|
| 166 |
-
<helpers>
|
| 167 |
-
<remarketing>
|
| 168 |
-
<class>Listrak_Remarketing_Helper</class>
|
| 169 |
-
</remarketing>
|
| 170 |
-
</helpers>
|
| 171 |
-
<blocks>
|
| 172 |
-
<remarketing>
|
| 173 |
-
<class>Listrak_Remarketing_Block</class>
|
| 174 |
-
</remarketing>
|
| 175 |
-
</blocks>
|
| 176 |
-
</global>
|
| 177 |
-
<admin>
|
| 178 |
-
<routers>
|
| 179 |
-
<adminhtml>
|
| 180 |
-
<args>
|
| 181 |
-
<modules>
|
| 182 |
-
<Listrak_Remarketing after="Mage_Adminhtml">Listrak_Remarketing</Listrak_Remarketing>
|
| 183 |
-
</modules>
|
| 184 |
-
</args>
|
| 185 |
-
</adminhtml>
|
| 186 |
-
</routers>
|
| 187 |
-
</admin>
|
| 188 |
-
<adminhtml>
|
| 189 |
-
<layout>
|
| 190 |
-
<updates>
|
| 191 |
-
<remarketing>
|
| 192 |
-
<file>remarketing.xml</file>
|
| 193 |
-
</remarketing>
|
| 194 |
-
</updates>
|
| 195 |
-
</layout>
|
| 196 |
-
<events>
|
| 197 |
-
<review_save_commit_after>
|
| 198 |
-
<observers>
|
| 199 |
-
<listrak_remarketing_observer>
|
| 200 |
-
<type>singleton</type>
|
| 201 |
-
<class>listrak/observer</class>
|
| 202 |
-
<method>reviewUpdated</method>
|
| 203 |
-
</listrak_remarketing_observer>
|
| 204 |
-
</observers>
|
| 205 |
-
</review_save_commit_after>
|
| 206 |
-
<review_delete_commit_after>
|
| 207 |
-
<observers>
|
| 208 |
-
<listrak_remarketing_observer>
|
| 209 |
-
<type>singleton</type>
|
| 210 |
-
<class>listrak/observer</class>
|
| 211 |
-
<method>reviewDeleted</method>
|
| 212 |
-
</listrak_remarketing_observer>
|
| 213 |
-
</observers>
|
| 214 |
-
</review_delete_commit_after>
|
| 215 |
-
</events>
|
| 216 |
-
</adminhtml>
|
| 217 |
-
<default>
|
| 218 |
-
<remarketing>
|
| 219 |
-
<modules>
|
| 220 |
-
<core>1</core>
|
| 221 |
-
<reviews>0</reviews>
|
| 222 |
-
</modules>
|
| 223 |
-
<subscription>
|
| 224 |
-
<signup_success_email>0</signup_success_email>
|
| 225 |
-
<unsubscribe_email>0</unsubscribe_email>
|
| 226 |
-
</subscription>
|
| 227 |
-
<modal>
|
| 228 |
-
<enabled>1</enabled>
|
| 229 |
-
<sca>1</sca>
|
| 230 |
-
<activity>0</activity>
|
| 231 |
-
</modal>
|
| 232 |
-
<productcategories>
|
| 233 |
-
<categories_source>default</categories_source>
|
| 234 |
-
<category_level>3</category_level>
|
| 235 |
-
<product_links>0</product_links>
|
| 236 |
-
<purchasable_visibility>site</purchasable_visibility>
|
| 237 |
-
</productcategories>
|
| 238 |
-
</remarketing>
|
| 239 |
-
</default>
|
| 240 |
</config>
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* Listrak Remarketing Magento Extension Ver. 1.0.0 - Copyright (c) 2011 Listrak, Inc.
|
| 5 |
+
*/
|
| 6 |
+
-->
|
| 7 |
+
<config>
|
| 8 |
+
<modules>
|
| 9 |
+
<Listrak_Remarketing>
|
| 10 |
+
<version>1.2.0</version>
|
| 11 |
+
</Listrak_Remarketing>
|
| 12 |
+
</modules>
|
| 13 |
+
<frontend>
|
| 14 |
+
<routers>
|
| 15 |
+
<listrak_remarketing>
|
| 16 |
+
<use>standard</use>
|
| 17 |
+
<args>
|
| 18 |
+
<module>Listrak_Remarketing</module>
|
| 19 |
+
<frontName>remarketing</frontName>
|
| 20 |
+
</args>
|
| 21 |
+
</listrak_remarketing>
|
| 22 |
+
</routers>
|
| 23 |
+
<layout>
|
| 24 |
+
<updates>
|
| 25 |
+
<remarketing>
|
| 26 |
+
<file>remarketing.xml</file>
|
| 27 |
+
</remarketing>
|
| 28 |
+
</updates>
|
| 29 |
+
</layout>
|
| 30 |
+
<events>
|
| 31 |
+
<controller_action_layout_load_before>
|
| 32 |
+
<observers>
|
| 33 |
+
<listrak_remarketing_observer>
|
| 34 |
+
<type>singleton</type>
|
| 35 |
+
<class>listrak/observer</class>
|
| 36 |
+
<method>trackingInit</method>
|
| 37 |
+
</listrak_remarketing_observer>
|
| 38 |
+
</observers>
|
| 39 |
+
</controller_action_layout_load_before>
|
| 40 |
+
<sales_order_place_after>
|
| 41 |
+
<observers>
|
| 42 |
+
<listrak_remarketing_observer>
|
| 43 |
+
<type>singleton</type>
|
| 44 |
+
<class>listrak/observer</class>
|
| 45 |
+
<method>orderPlaced</method>
|
| 46 |
+
</listrak_remarketing_observer>
|
| 47 |
+
</observers>
|
| 48 |
+
</sales_order_place_after>
|
| 49 |
+
<newsletter_subscriber_save_after>
|
| 50 |
+
<observers>
|
| 51 |
+
<listrak_remarketing_observer>
|
| 52 |
+
<type>singleton</type>
|
| 53 |
+
<class>listrak/observer</class>
|
| 54 |
+
<method>subscriberSaved</method>
|
| 55 |
+
</listrak_remarketing_observer>
|
| 56 |
+
</observers>
|
| 57 |
+
</newsletter_subscriber_save_after>
|
| 58 |
+
<review_save_commit_after>
|
| 59 |
+
<observers>
|
| 60 |
+
<listrak_remarketing_observer>
|
| 61 |
+
<type>singleton</type>
|
| 62 |
+
<class>listrak/observer</class>
|
| 63 |
+
<method>reviewUpdated</method>
|
| 64 |
+
</listrak_remarketing_observer>
|
| 65 |
+
</observers>
|
| 66 |
+
</review_save_commit_after>
|
| 67 |
+
<review_delete_commit_after>
|
| 68 |
+
<observers>
|
| 69 |
+
<listrak_remarketing_observer>
|
| 70 |
+
<type>singleton</type>
|
| 71 |
+
<class>listrak/observer</class>
|
| 72 |
+
<method>reviewDeleted</method>
|
| 73 |
+
</listrak_remarketing_observer>
|
| 74 |
+
</observers>
|
| 75 |
+
</review_delete_commit_after>
|
| 76 |
+
<sales_quote_save_after>
|
| 77 |
+
<observers>
|
| 78 |
+
<listrak_remarketing_observer>
|
| 79 |
+
<type>singleton</type>
|
| 80 |
+
<class>listrak/observer</class>
|
| 81 |
+
<method>cartModified</method>
|
| 82 |
+
</listrak_remarketing_observer>
|
| 83 |
+
</observers>
|
| 84 |
+
</sales_quote_save_after>
|
| 85 |
+
<sales_quote_remove_item>
|
| 86 |
+
<observers>
|
| 87 |
+
<listrak_remarketing_observer>
|
| 88 |
+
<type>singleton</type>
|
| 89 |
+
<class>listrak/observer</class>
|
| 90 |
+
<method>cartModified</method>
|
| 91 |
+
</listrak_remarketing_observer>
|
| 92 |
+
</observers>
|
| 93 |
+
</sales_quote_remove_item>
|
| 94 |
+
<customer_logout>
|
| 95 |
+
<observers>
|
| 96 |
+
<listrak_remarketing_observer>
|
| 97 |
+
<type>singleton</type>
|
| 98 |
+
<class>listrak/observer</class>
|
| 99 |
+
<method>resetCustomerTracking</method>
|
| 100 |
+
</listrak_remarketing_observer>
|
| 101 |
+
</observers>
|
| 102 |
+
</customer_logout>
|
| 103 |
+
</events>
|
| 104 |
+
</frontend>
|
| 105 |
+
<global>
|
| 106 |
+
<models>
|
| 107 |
+
<listrak>
|
| 108 |
+
<class>Listrak_Remarketing_Model</class>
|
| 109 |
+
<resourceModel>listrak_mysql4</resourceModel>
|
| 110 |
+
</listrak>
|
| 111 |
+
<listrak_mysql4>
|
| 112 |
+
<class>Listrak_Remarketing_Model_Mysql4</class>
|
| 113 |
+
<entities>
|
| 114 |
+
<click>
|
| 115 |
+
<table>listrak_remarketing_click</table>
|
| 116 |
+
</click>
|
| 117 |
+
<log>
|
| 118 |
+
<table>listrak_remarketing_log</table>
|
| 119 |
+
</log>
|
| 120 |
+
<session>
|
| 121 |
+
<table>listrak_remarketing_session</table>
|
| 122 |
+
</session>
|
| 123 |
+
<session_email>
|
| 124 |
+
<table>listrak_remarketing_session_email</table>
|
| 125 |
+
</session_email>
|
| 126 |
+
<emailcapture>
|
| 127 |
+
<table>listrak_remarketing_emailcapture</table>
|
| 128 |
+
</emailcapture>
|
| 129 |
+
<subscriber_update>
|
| 130 |
+
<table>listrak_remarketing_subscriber_update</table>
|
| 131 |
+
</subscriber_update>
|
| 132 |
+
<review_update>
|
| 133 |
+
<table>listrak_remarketing_review_update</table>
|
| 134 |
+
</review_update>
|
| 135 |
+
<product_attribute_set_map>
|
| 136 |
+
<table>listrak_remarketing_product_attribute_set_map</table>
|
| 137 |
+
</product_attribute_set_map>
|
| 138 |
+
</entities>
|
| 139 |
+
</listrak_mysql4>
|
| 140 |
+
<newsletter>
|
| 141 |
+
<rewrite>
|
| 142 |
+
<subscriber>Listrak_Remarketing_Model_Subscriber</subscriber>
|
| 143 |
+
</rewrite>
|
| 144 |
+
</newsletter>
|
| 145 |
+
</models>
|
| 146 |
+
<resources>
|
| 147 |
+
<listrak_remarketing_setup>
|
| 148 |
+
<setup>
|
| 149 |
+
<module>Listrak_Remarketing</module>
|
| 150 |
+
</setup>
|
| 151 |
+
<connection>
|
| 152 |
+
<use>core_setup</use>
|
| 153 |
+
</connection>
|
| 154 |
+
</listrak_remarketing_setup>
|
| 155 |
+
<listrak_write>
|
| 156 |
+
<connection>
|
| 157 |
+
<use>core_write</use>
|
| 158 |
+
</connection>
|
| 159 |
+
</listrak_write>
|
| 160 |
+
<listrak_read>
|
| 161 |
+
<connection>
|
| 162 |
+
<use>core_read</use>
|
| 163 |
+
</connection>
|
| 164 |
+
</listrak_read>
|
| 165 |
+
</resources>
|
| 166 |
+
<helpers>
|
| 167 |
+
<remarketing>
|
| 168 |
+
<class>Listrak_Remarketing_Helper</class>
|
| 169 |
+
</remarketing>
|
| 170 |
+
</helpers>
|
| 171 |
+
<blocks>
|
| 172 |
+
<remarketing>
|
| 173 |
+
<class>Listrak_Remarketing_Block</class>
|
| 174 |
+
</remarketing>
|
| 175 |
+
</blocks>
|
| 176 |
+
</global>
|
| 177 |
+
<admin>
|
| 178 |
+
<routers>
|
| 179 |
+
<adminhtml>
|
| 180 |
+
<args>
|
| 181 |
+
<modules>
|
| 182 |
+
<Listrak_Remarketing after="Mage_Adminhtml">Listrak_Remarketing</Listrak_Remarketing>
|
| 183 |
+
</modules>
|
| 184 |
+
</args>
|
| 185 |
+
</adminhtml>
|
| 186 |
+
</routers>
|
| 187 |
+
</admin>
|
| 188 |
+
<adminhtml>
|
| 189 |
+
<layout>
|
| 190 |
+
<updates>
|
| 191 |
+
<remarketing>
|
| 192 |
+
<file>remarketing.xml</file>
|
| 193 |
+
</remarketing>
|
| 194 |
+
</updates>
|
| 195 |
+
</layout>
|
| 196 |
+
<events>
|
| 197 |
+
<review_save_commit_after>
|
| 198 |
+
<observers>
|
| 199 |
+
<listrak_remarketing_observer>
|
| 200 |
+
<type>singleton</type>
|
| 201 |
+
<class>listrak/observer</class>
|
| 202 |
+
<method>reviewUpdated</method>
|
| 203 |
+
</listrak_remarketing_observer>
|
| 204 |
+
</observers>
|
| 205 |
+
</review_save_commit_after>
|
| 206 |
+
<review_delete_commit_after>
|
| 207 |
+
<observers>
|
| 208 |
+
<listrak_remarketing_observer>
|
| 209 |
+
<type>singleton</type>
|
| 210 |
+
<class>listrak/observer</class>
|
| 211 |
+
<method>reviewDeleted</method>
|
| 212 |
+
</listrak_remarketing_observer>
|
| 213 |
+
</observers>
|
| 214 |
+
</review_delete_commit_after>
|
| 215 |
+
</events>
|
| 216 |
+
</adminhtml>
|
| 217 |
+
<default>
|
| 218 |
+
<remarketing>
|
| 219 |
+
<modules>
|
| 220 |
+
<core>1</core>
|
| 221 |
+
<reviews>0</reviews>
|
| 222 |
+
</modules>
|
| 223 |
+
<subscription>
|
| 224 |
+
<signup_success_email>0</signup_success_email>
|
| 225 |
+
<unsubscribe_email>0</unsubscribe_email>
|
| 226 |
+
</subscription>
|
| 227 |
+
<modal>
|
| 228 |
+
<enabled>1</enabled>
|
| 229 |
+
<sca>1</sca>
|
| 230 |
+
<activity>0</activity>
|
| 231 |
+
</modal>
|
| 232 |
+
<productcategories>
|
| 233 |
+
<categories_source>default</categories_source>
|
| 234 |
+
<category_level>3</category_level>
|
| 235 |
+
<product_links>0</product_links>
|
| 236 |
+
<purchasable_visibility>site</purchasable_visibility>
|
| 237 |
+
</productcategories>
|
| 238 |
+
</remarketing>
|
| 239 |
+
</default>
|
| 240 |
</config>
|
app/code/community/Listrak/Remarketing/sql/listrak_remarketing_setup/mysql4-upgrade-1.1.9.5-1.2.0.php
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
*
|
| 4 |
+
* PHP version 5
|
| 5 |
+
*
|
| 6 |
+
* @category Listrak
|
| 7 |
+
* @package Listrak_Remarketing
|
| 8 |
+
* @author Listrak Magento Team <magento@listrak.com>
|
| 9 |
+
* @copyright 2011 Listrak Inc
|
| 10 |
+
* @license http://s1.listrakbi.com/licenses/magento.txt License For Customer Use of Listrak Software
|
| 11 |
+
* @link http://www.listrak.com
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
/* @var Mage_Core_Model_Resource_Setup $installer */
|
| 15 |
+
$installer = $this;
|
| 16 |
+
$installer->startSetup();
|
| 17 |
+
|
| 18 |
+
$installer->run(
|
| 19 |
+
"
|
| 20 |
+
select if (
|
| 21 |
+
exists(
|
| 22 |
+
select distinct index_name from information_schema.statistics
|
| 23 |
+
where table_name = '{$this->getTable('listrak/review_update')}' and index_name = 'review_update_review_id_index'
|
| 24 |
+
)
|
| 25 |
+
,'select ''index review_update_review_id_index exists'' _______;'
|
| 26 |
+
,'create index review_update_review_id_index on {$this->getTable('listrak/review_update')} (review_id)') into @a;
|
| 27 |
+
|
| 28 |
+
PREPARE stmt1 FROM @a;
|
| 29 |
+
EXECUTE stmt1;
|
| 30 |
+
DEALLOCATE PREPARE stmt1;
|
| 31 |
+
|
| 32 |
+
select if (
|
| 33 |
+
exists(
|
| 34 |
+
select distinct index_name from information_schema.statistics
|
| 35 |
+
where table_name = '{$this->getTable('listrak/review_update')}' and index_name = 'review_update_entity_id_index'
|
| 36 |
+
)
|
| 37 |
+
,'select ''index review_update_entity_id_index exists'' _______;'
|
| 38 |
+
,'create index review_update_entity_id_index on {$this->getTable('listrak/review_update')} (entity_id)') into @b;
|
| 39 |
+
|
| 40 |
+
PREPARE stmt2 FROM @b;
|
| 41 |
+
EXECUTE stmt2;
|
| 42 |
+
DEALLOCATE PREPARE stmt2;
|
| 43 |
+
|
| 44 |
+
select if (
|
| 45 |
+
exists(
|
| 46 |
+
select distinct index_name from information_schema.statistics
|
| 47 |
+
where table_name = '{$this->getTable('listrak/review_update')}' and index_name = 'review_update_activity_index'
|
| 48 |
+
)
|
| 49 |
+
,'select ''index review_update_entity_id_index exists'' _______;'
|
| 50 |
+
,'create index review_update_activity_index on {$this->getTable('listrak/review_update')} (activity)') into @c;
|
| 51 |
+
|
| 52 |
+
PREPARE stmt3 FROM @c;
|
| 53 |
+
EXECUTE stmt3;
|
| 54 |
+
DEALLOCATE PREPARE stmt3;
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
select if (
|
| 58 |
+
exists(
|
| 59 |
+
select distinct index_name from information_schema.statistics
|
| 60 |
+
where table_name = '{$this->getTable('listrak/subscriber_update')}' and index_name = 'subscriber_update_subscriber_id_index'
|
| 61 |
+
)
|
| 62 |
+
,'select ''index subscriber_update_subscriber_id_index exists'' _______;'
|
| 63 |
+
,'create index subscriber_update_subscriber_id_index on {$this->getTable('listrak/subscriber_update')} (subscriber_id)') into @e;
|
| 64 |
+
|
| 65 |
+
PREPARE stmt5 FROM @e;
|
| 66 |
+
EXECUTE stmt5;
|
| 67 |
+
DEALLOCATE PREPARE stmt5;
|
| 68 |
+
|
| 69 |
+
select if (
|
| 70 |
+
exists(
|
| 71 |
+
select distinct index_name from information_schema.statistics
|
| 72 |
+
where table_name = '{$this->getTable('listrak/subscriber_update')}' and index_name = 'subscriber_update_updated_at_index'
|
| 73 |
+
)
|
| 74 |
+
,'select ''index subscriber_update_updated_at_index exists'' _______;'
|
| 75 |
+
,'create index subscriber_update_updated_at_index on {$this->getTable('listrak/subscriber_update')} (updated_at)') into @f;
|
| 76 |
+
|
| 77 |
+
PREPARE stmt6 FROM @f;
|
| 78 |
+
EXECUTE stmt6;
|
| 79 |
+
DEALLOCATE PREPARE stmt6;
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
select if (
|
| 83 |
+
exists(
|
| 84 |
+
select distinct index_name from information_schema.statistics
|
| 85 |
+
where table_name = '{$this->getTable('listrak/emailcapture')}' and index_name = 'listrak_remarketing_emailcapture_page_index'
|
| 86 |
+
)
|
| 87 |
+
,'select ''index listrak_remarketing_emailcapture_page_index exists'' _______;'
|
| 88 |
+
,'create index listrak_remarketing_emailcapture_page_index on {$this->getTable('listrak/emailcapture')} (page)') into @g;
|
| 89 |
+
|
| 90 |
+
PREPARE stmt7 FROM @g;
|
| 91 |
+
EXECUTE stmt7;
|
| 92 |
+
DEALLOCATE PREPARE stmt7;
|
| 93 |
+
");
|
| 94 |
+
|
| 95 |
+
try {
|
| 96 |
+
/* @var Listrak_Remarketing_Model_Log $log */
|
| 97 |
+
$log = Mage::getModel("listrak/log");
|
| 98 |
+
$log->addMessage("1.1.9.5-1.2.0 update");
|
| 99 |
+
} catch (Exception $ex) {
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/remarketing.xml
CHANGED
|
@@ -1,15 +1,52 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Listrak Remarketing Magento Extension Ver. 1.0.0 - Copyright (c) 2011 Listrak, Inc.
|
| 5 |
-
*/
|
| 6 |
-
-->
|
| 7 |
-
<layout>
|
| 8 |
-
<default>
|
| 9 |
-
<reference name="notifications">
|
| 10 |
-
<block type="remarketing/adminhtml_notifications"
|
| 11 |
-
name="remarketing_notifications"
|
| 12 |
-
as="remarketing_notifications"/>
|
| 13 |
-
</reference>
|
| 14 |
-
</default>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
</layout>
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* Listrak Remarketing Magento Extension Ver. 1.0.0 - Copyright (c) 2011 Listrak, Inc.
|
| 5 |
+
*/
|
| 6 |
+
-->
|
| 7 |
+
<layout>
|
| 8 |
+
<default>
|
| 9 |
+
<reference name="notifications">
|
| 10 |
+
<block type="remarketing/adminhtml_notifications"
|
| 11 |
+
name="remarketing_notifications"
|
| 12 |
+
as="remarketing_notifications"/>
|
| 13 |
+
</reference>
|
| 14 |
+
</default>
|
| 15 |
+
|
| 16 |
+
<adminhtml_remarketing_emailcapture_index>
|
| 17 |
+
<reference name="content">
|
| 18 |
+
<block type="remarketing/adminhtml_emailcapture" name="remarketing_emailcapture" />
|
| 19 |
+
</reference>
|
| 20 |
+
</adminhtml_remarketing_emailcapture_index>
|
| 21 |
+
<adminhtml_remarketing_emailcapture_edit>
|
| 22 |
+
<reference name="left">
|
| 23 |
+
<block type="remarketing/adminhtml_emailcapture_edit_tabs" name="remarketing_emailcapture_tabs"/>
|
| 24 |
+
</reference>
|
| 25 |
+
<reference name="content">
|
| 26 |
+
<block type="remarketing/adminhtml_emailcapture_edit" name="remarketing_emailcapture_edit" />
|
| 27 |
+
</reference>
|
| 28 |
+
</adminhtml_remarketing_emailcapture_edit>
|
| 29 |
+
|
| 30 |
+
<adminhtml_remarketing_productattributes_index>
|
| 31 |
+
<reference name="content">
|
| 32 |
+
<block type="remarketing/adminhtml_productattributes" name="remarketing_attributes" template="listrak/remarketing/productattributes.phtml">
|
| 33 |
+
<block type="remarketing/adminhtml_productattributes_grid" name="remarketing_attributes_grid" />
|
| 34 |
+
<block type="core/template" name="remarketing_attributes_init" template="listrak/remarketing/productattributes/form/initbrands.phtml">
|
| 35 |
+
<block type="remarketing/adminhtml_productattributes_init_brands_form" name="remarketing_attributes_init_form" />
|
| 36 |
+
</block>
|
| 37 |
+
</block>
|
| 38 |
+
</reference>
|
| 39 |
+
</adminhtml_remarketing_productattributes_index>
|
| 40 |
+
<adminhtml_remarketing_productattributes_edit>
|
| 41 |
+
<reference name="left">
|
| 42 |
+
<block type="remarketing/adminhtml_productattributes_edit_tabs" name="remarketing_attribute_tabs">
|
| 43 |
+
<block type="remarketing/adminhtml_productattributes_edit_tab_form_brand" name="remarketing_attribute_tab_brand" />
|
| 44 |
+
<block type="remarketing/adminhtml_productattributes_edit_tab_form_categories" name="remarketing_attribute_tab_categories"
|
| 45 |
+
template="listrak/remarketing/productattributes/form/categories.phtml" />
|
| 46 |
+
</block>
|
| 47 |
+
</reference>
|
| 48 |
+
<reference name="content">
|
| 49 |
+
<block type="remarketing/adminhtml_productattributes_edit" name="remarketing_attribute_edit" />
|
| 50 |
+
</reference>
|
| 51 |
+
</adminhtml_remarketing_productattributes_edit>
|
| 52 |
</layout>
|
app/design/adminhtml/default/default/template/listrak/remarketing/productattributes/form/categories.phtml
CHANGED
|
@@ -155,17 +155,18 @@
|
|
| 155 |
</table>
|
| 156 |
<script type="text/javascript">
|
| 157 |
//<