Version Notes
Retargeting
Download this release
Release Info
| Developer | Retargeting Team |
| Extension | Retargeting_Tracker |
| Version | 1.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/Retargeting/Tracker/Helper/Data.php +29 -0
- app/code/community/Retargeting/Tracker/etc/config.xml +13 -5
- app/code/community/Retargeting/Tracker/etc/system.xml +20 -0
- app/design/frontend/base/default/template/retargeting_tracker/embed.phtml +0 -1
- app/design/frontend/base/default/template/retargeting_tracker/triggers.phtml +67 -62
- package.xml +6 -25
app/code/community/Retargeting/Tracker/Helper/Data.php
CHANGED
|
@@ -9,5 +9,34 @@
|
|
| 9 |
|
| 10 |
class Retargeting_Tracker_Helper_Data extends Mage_Core_Helper_Abstract
|
| 11 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
}
|
| 9 |
|
| 10 |
class Retargeting_Tracker_Helper_Data extends Mage_Core_Helper_Abstract
|
| 11 |
{
|
| 12 |
+
/*
|
| 13 |
+
* Config paths for using throughout the code
|
| 14 |
+
* */
|
| 15 |
+
|
| 16 |
+
const XML_PATH_FACEBOOK = 'retargetingtracker_options/more/facebook';
|
| 17 |
+
const XML_PATH_IMAGECLASS = 'retargetingtracker_options/more/css';
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* Check if FB is ready to use
|
| 21 |
+
*
|
| 22 |
+
* @param mixed $store
|
| 23 |
+
* @return bool
|
| 24 |
+
* */
|
| 25 |
+
|
| 26 |
+
public function isFacebookAvailable($store = null)
|
| 27 |
+
{
|
| 28 |
+
return Mage::getStoreConfigFlag(self::XML_PATH_FACEBOOK, $store);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/*
|
| 32 |
+
* Custom CSS CLASS
|
| 33 |
+
*
|
| 34 |
+
* @param mixed $store
|
| 35 |
+
* @return bool
|
| 36 |
+
* */
|
| 37 |
+
public function getCustomClass($store = null)
|
| 38 |
+
{
|
| 39 |
+
return Mage::getStoreConfig(self::XML_PATH_IMAGECLASS, $store);
|
| 40 |
+
}
|
| 41 |
|
| 42 |
}
|
app/code/community/Retargeting/Tracker/etc/config.xml
CHANGED
|
@@ -11,19 +11,27 @@
|
|
| 11 |
<config>
|
| 12 |
<modules>
|
| 13 |
<Retargeting_Tracker>
|
| 14 |
-
<version>1.0.
|
| 15 |
</Retargeting_Tracker>
|
| 16 |
</modules>
|
| 17 |
<global>
|
| 18 |
<blocks>
|
| 19 |
-
<retargeting_tracker
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
</blocks>
|
| 22 |
<models>
|
| 23 |
-
<retargeting_tracker
|
|
|
|
|
|
|
| 24 |
</models>
|
| 25 |
<helpers>
|
| 26 |
-
<retargeting_tracker
|
|
|
|
|
|
|
| 27 |
</helpers>
|
| 28 |
<!--
|
| 29 |
<resources>
|
| 11 |
<config>
|
| 12 |
<modules>
|
| 13 |
<Retargeting_Tracker>
|
| 14 |
+
<version>1.0.1</version>
|
| 15 |
</Retargeting_Tracker>
|
| 16 |
</modules>
|
| 17 |
<global>
|
| 18 |
<blocks>
|
| 19 |
+
<retargeting_tracker>
|
| 20 |
+
<class>Retargeting_Tracker_Block</class>
|
| 21 |
+
</retargeting_tracker>
|
| 22 |
+
<retargeting_tracker_adminhtml>
|
| 23 |
+
<class>Retargeting_Tracker_Block_Adminhtml</class>
|
| 24 |
+
</retargeting_tracker_adminhtml>
|
| 25 |
</blocks>
|
| 26 |
<models>
|
| 27 |
+
<retargeting_tracker>
|
| 28 |
+
<class>Retargeting_Tracker_Model</class>
|
| 29 |
+
</retargeting_tracker>
|
| 30 |
</models>
|
| 31 |
<helpers>
|
| 32 |
+
<retargeting_tracker>
|
| 33 |
+
<class>Retargeting_Tracker_Helper</class>
|
| 34 |
+
</retargeting_tracker>
|
| 35 |
</helpers>
|
| 36 |
<!--
|
| 37 |
<resources>
|
app/code/community/Retargeting/Tracker/etc/system.xml
CHANGED
|
@@ -78,8 +78,28 @@
|
|
| 78 |
<show_in_website>1</show_in_website>
|
| 79 |
<show_in_store>1</show_in_store>
|
| 80 |
</help_pages>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
</fields>
|
| 82 |
</more>
|
|
|
|
| 83 |
</groups>
|
| 84 |
</retargetingtracker_options>
|
| 85 |
</sections>
|
| 78 |
<show_in_website>1</show_in_website>
|
| 79 |
<show_in_store>1</show_in_store>
|
| 80 |
</help_pages>
|
| 81 |
+
<facebook translate="label">
|
| 82 |
+
<label>Activate Like Facebook Function</label>
|
| 83 |
+
<frontend_type>select</frontend_type>
|
| 84 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 85 |
+
<sort_order>20</sort_order>
|
| 86 |
+
<show_in_default>1</show_in_default>
|
| 87 |
+
<show_in_website>1</show_in_website>
|
| 88 |
+
<show_in_store>1</show_in_store>
|
| 89 |
+
<!--<comment><![CDATA[likeFacebook function]]></comment>-->
|
| 90 |
+
</facebook>
|
| 91 |
+
<css translate="label">
|
| 92 |
+
<label>Custom CSS</label>
|
| 93 |
+
<frontend_type>text</frontend_type>
|
| 94 |
+
<sort_order>30</sort_order>
|
| 95 |
+
<show_in_default>1</show_in_default>
|
| 96 |
+
<show_in_website>1</show_in_website>
|
| 97 |
+
<show_in_store>1</show_in_store>
|
| 98 |
+
<comment><![CDATA[Insert your main product image CSS class]]></comment>
|
| 99 |
+
</css>
|
| 100 |
</fields>
|
| 101 |
</more>
|
| 102 |
+
|
| 103 |
</groups>
|
| 104 |
</retargetingtracker_options>
|
| 105 |
</sections>
|
app/design/frontend/base/default/template/retargeting_tracker/embed.phtml
CHANGED
|
@@ -8,7 +8,6 @@
|
|
| 8 |
*/
|
| 9 |
?>
|
| 10 |
<script type="text/javascript">
|
| 11 |
-
console.log('Retargeting: code embeded!');
|
| 12 |
(function(){
|
| 13 |
var ra = document.createElement("script"); ra.type ="text/javascript"; ra.async = true; ra.src = ("https:" ==
|
| 14 |
document.location.protocol ? "https://" : "http://") + "retargeting-data.eu/" +
|
| 8 |
*/
|
| 9 |
?>
|
| 10 |
<script type="text/javascript">
|
|
|
|
| 11 |
(function(){
|
| 12 |
var ra = document.createElement("script"); ra.type ="text/javascript"; ra.async = true; ra.src = ("https:" ==
|
| 13 |
document.location.protocol ? "https://" : "http://") + "retargeting-data.eu/" +
|
app/design/frontend/base/default/template/retargeting_tracker/triggers.phtml
CHANGED
|
@@ -38,9 +38,7 @@
|
|
| 38 |
*/
|
| 39 |
?>
|
| 40 |
<?php if ( $info = Mage::getSingleton('core/session')->getTriggerSetEmail() ) : ?>
|
| 41 |
-
|
| 42 |
// Trigger setEmail
|
| 43 |
-
|
| 44 |
var _ra = _ra || {};
|
| 45 |
_ra.setEmailInfo = {
|
| 46 |
"email": "<?php echo htmlspecialchars($info['email']); ?>",
|
|
@@ -49,16 +47,11 @@
|
|
| 49 |
"city": "<?php echo htmlspecialchars($info['city']); ?>",
|
| 50 |
"sex": "<?php echo htmlspecialchars($info['sex']); ?>"
|
| 51 |
};
|
| 52 |
-
|
| 53 |
if (_ra.ready !== undefined) {
|
| 54 |
if(typeof _ra.setEmail !== "undefined") _ra.setEmail(_ra.setEmailInfo);
|
| 55 |
}
|
| 56 |
-
|
| 57 |
<?php Mage::getSingleton('core/session')->unsTriggerSetEmail(); ?>
|
| 58 |
<?php endif ?>
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
<?php
|
| 63 |
/*
|
| 64 |
----------------------- Trigger sendCategory -----------------------
|
|
@@ -102,18 +95,12 @@
|
|
| 102 |
}
|
| 103 |
|
| 104 |
<?php endif ?>
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
<?php
|
| 109 |
/*
|
| 110 |
----------------------- Trigger sendBrand -----------------------
|
| 111 |
magento doesn't have core support for brands..
|
| 112 |
*/
|
| 113 |
?>
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
<?php
|
| 118 |
/*
|
| 119 |
----------------------- Trigger sendProduct -----------------------
|
|
@@ -124,6 +111,8 @@
|
|
| 124 |
// Trigger sendProduct
|
| 125 |
|
| 126 |
<?php $_product = Mage::registry('current_product'); ?>
|
|
|
|
|
|
|
| 127 |
<?php
|
| 128 |
$_productUrl = Mage::helper('core/url')->getCurrentUrl();
|
| 129 |
|
|
@@ -168,7 +157,7 @@
|
|
| 168 |
"id": "<?php echo $_product->getId(); ?>",
|
| 169 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 170 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 171 |
-
"img": "<?php echo
|
| 172 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 173 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 174 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
|
@@ -176,15 +165,12 @@
|
|
| 176 |
"category": <?php echo $_category; ?>,
|
| 177 |
"category_breadcrumb": <?php echo $_categoryBreadcrumb; ?>
|
| 178 |
};
|
| 179 |
-
|
| 180 |
if (_ra.ready !== undefined) {
|
| 181 |
if(typeof _ra.sendProduct !== "undefined") _ra.sendProduct(_ra.sendProductInfo);
|
| 182 |
}
|
| 183 |
-
|
| 184 |
<?php endif ?>
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
<?php
|
| 189 |
/*
|
| 190 |
----------------------- Trigger addToCart -----------------------
|
|
@@ -240,7 +226,7 @@
|
|
| 240 |
"id": "<?php echo $_product->getId(); ?>",
|
| 241 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 242 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 243 |
-
"img": "<?php echo
|
| 244 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 245 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 246 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
|
@@ -276,9 +262,6 @@
|
|
| 276 |
|
| 277 |
<?php Mage::getSingleton('core/session')->unsTriggerAddToCart(); ?>
|
| 278 |
<?php endif ?>
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
<?php
|
| 283 |
/*
|
| 284 |
----------------------- Trigger setVariation -----------------------
|
|
@@ -289,8 +272,8 @@
|
|
| 289 |
// Trigger setVariation
|
| 290 |
|
| 291 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 292 |
-
|
| 293 |
-
|
| 294 |
<?php if ( !$_product->isConfigurable() ) : ?>
|
| 295 |
<?php /*is not configurable*/ ?>
|
| 296 |
<?php if ( $_product->getTypeInstance(true)->hasOptions($_product) ) : ?>
|
|
@@ -302,9 +285,6 @@
|
|
| 302 |
|
| 303 |
|
| 304 |
_ra_optElfunc = [];
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
function _ra_grabVariation() {
|
| 309 |
var _ra_vo = {};
|
| 310 |
var _ra_voCode = [];
|
|
@@ -313,7 +293,6 @@
|
|
| 313 |
<?php $optionType = $o->getType(); ?>
|
| 314 |
<?php $optionId = $o->getId(); ?>
|
| 315 |
<?php $optionTitle = $o->getTitle(); ?>
|
| 316 |
-
|
| 317 |
|
| 318 |
<?php if ( $optionType == "area" ) : ?>
|
| 319 |
if ( document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null ) {
|
|
@@ -368,7 +347,6 @@
|
|
| 368 |
_ra_voCode.push(document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").options[document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").selectedIndex].text);
|
| 369 |
}
|
| 370 |
<?php endif ?>
|
| 371 |
-
|
| 372 |
<?php if ( $optionType == "multiple" ) : ?>
|
| 373 |
if ( document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null ) {
|
| 374 |
var _ra_optionValue = [];
|
|
@@ -392,7 +370,6 @@
|
|
| 392 |
_ra_voCode.push(_ra_optionValue.join(', '));
|
| 393 |
}
|
| 394 |
<?php endif ?>
|
| 395 |
-
|
| 396 |
<?php if ( $optionType == "time" ) : ?>
|
| 397 |
if ( document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][minute]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day_part]']") !== null ) {
|
| 398 |
var _ra_optionValue = [];
|
|
@@ -422,15 +399,9 @@
|
|
| 422 |
"code": _ra_voCode.join('-'),
|
| 423 |
"details": _ra_voDetails
|
| 424 |
}
|
| 425 |
-
|
| 426 |
return _ra_vo;
|
| 427 |
}
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
_ra_helper_addLoadEvent(function() {
|
| 433 |
-
|
| 434 |
<?php foreach ( $_product->getOptions() as $o ) : ?>
|
| 435 |
<?php $optionType = $o->getType(); ?>
|
| 436 |
<?php $optionId = $o->getId(); ?>
|
|
@@ -655,6 +626,7 @@
|
|
| 655 |
|
| 656 |
|
| 657 |
<?php endif ?>
|
|
|
|
| 658 |
|
| 659 |
|
| 660 |
|
|
@@ -713,7 +685,7 @@
|
|
| 713 |
"id": "<?php echo $_product->getId(); ?>",
|
| 714 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 715 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 716 |
-
"img": "<?php echo
|
| 717 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 718 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 719 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
|
@@ -759,29 +731,49 @@
|
|
| 759 |
|
| 760 |
// Trigger clickImage
|
| 761 |
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
|
| 767 |
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
|
| 771 |
-
}
|
| 772 |
-
if ( document.getElementsByClassName("zoomLens").length > 0 ) {
|
| 773 |
-
document.getElementsByClassName("zoomLens")[0].onmouseover = _ra_triggerClickImage;
|
| 774 |
-
}
|
| 775 |
-
if ( document.getElementsByClassName("MagicToolboxContainer").length > 0 ) {
|
| 776 |
-
document.getElementsByClassName("MagicZoomBigImageCont")[0].onmouseover = _ra_triggerClickImage;
|
| 777 |
-
}
|
| 778 |
-
if ( document.getElementById("image") !== null ) {
|
| 779 |
-
document.getElementById("image").onclick = _ra_triggerClickImage;
|
| 780 |
-
} else if ( document.querySelector(".product-image img") !== null ) {
|
| 781 |
-
var el = document.querySelector(".product-image img").onclick = _ra_triggerClickImage;
|
| 782 |
-
}
|
| 783 |
-
});
|
| 784 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 785 |
<?php endif ?>
|
| 786 |
|
| 787 |
|
|
@@ -819,7 +811,7 @@
|
|
| 819 |
// Trigger mouseOverPrice
|
| 820 |
|
| 821 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 822 |
-
|
| 823 |
function _ra_triggerMouseOverPrice() {
|
| 824 |
if(typeof _ra.mouseOverPrice !== "undefined") _ra.mouseOverPrice("<?php echo $_product->getId(); ?>", {
|
| 825 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
|
@@ -837,6 +829,7 @@
|
|
| 837 |
});
|
| 838 |
|
| 839 |
<?php endif ?>
|
|
|
|
| 840 |
|
| 841 |
|
| 842 |
|
|
@@ -850,7 +843,7 @@
|
|
| 850 |
// Trigger mouseOverAddToCart
|
| 851 |
|
| 852 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 853 |
-
|
| 854 |
function _ra_triggerMouseOverAddToCart() {
|
| 855 |
if(typeof _ra.mouseOverAddToCart !== "undefined") _ra.mouseOverAddToCart("<?php echo $_product->getId(); ?>");
|
| 856 |
}
|
|
@@ -864,6 +857,7 @@
|
|
| 864 |
});
|
| 865 |
|
| 866 |
<?php endif ?>
|
|
|
|
| 867 |
|
| 868 |
|
| 869 |
|
|
@@ -972,9 +966,20 @@
|
|
| 972 |
|
| 973 |
<?php endif ?>
|
| 974 |
|
| 975 |
-
</script>
|
| 976 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 977 |
|
|
|
|
| 978 |
<?php
|
| 979 |
/*
|
| 980 |
----------------------- Track URL History --------------------------
|
| 38 |
*/
|
| 39 |
?>
|
| 40 |
<?php if ( $info = Mage::getSingleton('core/session')->getTriggerSetEmail() ) : ?>
|
|
|
|
| 41 |
// Trigger setEmail
|
|
|
|
| 42 |
var _ra = _ra || {};
|
| 43 |
_ra.setEmailInfo = {
|
| 44 |
"email": "<?php echo htmlspecialchars($info['email']); ?>",
|
| 47 |
"city": "<?php echo htmlspecialchars($info['city']); ?>",
|
| 48 |
"sex": "<?php echo htmlspecialchars($info['sex']); ?>"
|
| 49 |
};
|
|
|
|
| 50 |
if (_ra.ready !== undefined) {
|
| 51 |
if(typeof _ra.setEmail !== "undefined") _ra.setEmail(_ra.setEmailInfo);
|
| 52 |
}
|
|
|
|
| 53 |
<?php Mage::getSingleton('core/session')->unsTriggerSetEmail(); ?>
|
| 54 |
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
| 55 |
<?php
|
| 56 |
/*
|
| 57 |
----------------------- Trigger sendCategory -----------------------
|
| 95 |
}
|
| 96 |
|
| 97 |
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
| 98 |
<?php
|
| 99 |
/*
|
| 100 |
----------------------- Trigger sendBrand -----------------------
|
| 101 |
magento doesn't have core support for brands..
|
| 102 |
*/
|
| 103 |
?>
|
|
|
|
|
|
|
|
|
|
| 104 |
<?php
|
| 105 |
/*
|
| 106 |
----------------------- Trigger sendProduct -----------------------
|
| 111 |
// Trigger sendProduct
|
| 112 |
|
| 113 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 114 |
+
|
| 115 |
+
<?php if($_product) : ?>
|
| 116 |
<?php
|
| 117 |
$_productUrl = Mage::helper('core/url')->getCurrentUrl();
|
| 118 |
|
| 157 |
"id": "<?php echo $_product->getId(); ?>",
|
| 158 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 159 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 160 |
+
"img": "<?php echo $_product->getThumbnail() != 'no_selection' ? htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'thumbnail')) : htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'image')->resize(500)); ?>",
|
| 161 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 162 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 163 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
| 165 |
"category": <?php echo $_category; ?>,
|
| 166 |
"category_breadcrumb": <?php echo $_categoryBreadcrumb; ?>
|
| 167 |
};
|
| 168 |
+
|
| 169 |
if (_ra.ready !== undefined) {
|
| 170 |
if(typeof _ra.sendProduct !== "undefined") _ra.sendProduct(_ra.sendProductInfo);
|
| 171 |
}
|
| 172 |
+
<?php endif ?>
|
| 173 |
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
| 174 |
<?php
|
| 175 |
/*
|
| 176 |
----------------------- Trigger addToCart -----------------------
|
| 226 |
"id": "<?php echo $_product->getId(); ?>",
|
| 227 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 228 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 229 |
+
"img": "<?php echo $_product->getThumbnail() != 'no_selection' ? htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'thumbnail')) : htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'image')->resize(500)); ?>",
|
| 230 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 231 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 232 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
| 262 |
|
| 263 |
<?php Mage::getSingleton('core/session')->unsTriggerAddToCart(); ?>
|
| 264 |
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
| 265 |
<?php
|
| 266 |
/*
|
| 267 |
----------------------- Trigger setVariation -----------------------
|
| 272 |
// Trigger setVariation
|
| 273 |
|
| 274 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 275 |
+
<?php if ($_product) : ?>
|
| 276 |
+
|
| 277 |
<?php if ( !$_product->isConfigurable() ) : ?>
|
| 278 |
<?php /*is not configurable*/ ?>
|
| 279 |
<?php if ( $_product->getTypeInstance(true)->hasOptions($_product) ) : ?>
|
| 285 |
|
| 286 |
|
| 287 |
_ra_optElfunc = [];
|
|
|
|
|
|
|
|
|
|
| 288 |
function _ra_grabVariation() {
|
| 289 |
var _ra_vo = {};
|
| 290 |
var _ra_voCode = [];
|
| 293 |
<?php $optionType = $o->getType(); ?>
|
| 294 |
<?php $optionId = $o->getId(); ?>
|
| 295 |
<?php $optionTitle = $o->getTitle(); ?>
|
|
|
|
| 296 |
|
| 297 |
<?php if ( $optionType == "area" ) : ?>
|
| 298 |
if ( document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null ) {
|
| 347 |
_ra_voCode.push(document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").options[document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").selectedIndex].text);
|
| 348 |
}
|
| 349 |
<?php endif ?>
|
|
|
|
| 350 |
<?php if ( $optionType == "multiple" ) : ?>
|
| 351 |
if ( document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null ) {
|
| 352 |
var _ra_optionValue = [];
|
| 370 |
_ra_voCode.push(_ra_optionValue.join(', '));
|
| 371 |
}
|
| 372 |
<?php endif ?>
|
|
|
|
| 373 |
<?php if ( $optionType == "time" ) : ?>
|
| 374 |
if ( document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][minute]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day_part]']") !== null ) {
|
| 375 |
var _ra_optionValue = [];
|
| 399 |
"code": _ra_voCode.join('-'),
|
| 400 |
"details": _ra_voDetails
|
| 401 |
}
|
|
|
|
| 402 |
return _ra_vo;
|
| 403 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
_ra_helper_addLoadEvent(function() {
|
|
|
|
| 405 |
<?php foreach ( $_product->getOptions() as $o ) : ?>
|
| 406 |
<?php $optionType = $o->getType(); ?>
|
| 407 |
<?php $optionId = $o->getId(); ?>
|
| 626 |
|
| 627 |
|
| 628 |
<?php endif ?>
|
| 629 |
+
<?php endif ?>
|
| 630 |
|
| 631 |
|
| 632 |
|
| 685 |
"id": "<?php echo $_product->getId(); ?>",
|
| 686 |
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 687 |
"url": "<?php echo htmlspecialchars($_productUrl); ?>",
|
| 688 |
+
"img": "<?php echo $_product->getThumbnail() != 'no_selection' ? htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'thumbnail')) : htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'image')->resize(500)); ?>",
|
| 689 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 690 |
"promo": <?php echo ( Mage::helper('tax')->getPrice($_product, $_product->getPrice()) - Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) > 0 ? Mage::helper('tax')->getPrice($_product, $_product->getFinalPrice()) : 0 ); ?>,
|
| 691 |
"stock": <?php echo $_product->getIsInStock() ?>,
|
| 731 |
|
| 732 |
// Trigger clickImage
|
| 733 |
|
| 734 |
+
<?php
|
| 735 |
+
$_product = Mage::registry('current_product');
|
| 736 |
+
if($_product) :
|
| 737 |
+
?>
|
| 738 |
+
<?php
|
| 739 |
|
| 740 |
+
$customClass = Mage::helper('retargeting_tracker')->getCustomClass();
|
| 741 |
+
if(Mage::helper('retargeting_tracker')->getCustomClass() != "") :
|
| 742 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 743 |
|
| 744 |
+
function _ra_triggerClickImage() {
|
| 745 |
+
if(typeof _ra.clickImage !== "undefined") _ra.clickImage("<?php echo $_product->getId(); ?>");
|
| 746 |
+
}
|
| 747 |
+
_ra_helper_addLoadEvent(function() {
|
| 748 |
+
if ( document.getElementsByClassName("<?php echo $customClass ?>").length > 0 ) {
|
| 749 |
+
document.getElementsByClassName("<?php echo $customClass ?>")[0].onmouseover = _ra_triggerClickImage;
|
| 750 |
+
|
| 751 |
+
}
|
| 752 |
+
});
|
| 753 |
+
//custom css
|
| 754 |
+
<?php else : ?>
|
| 755 |
+
function _ra_triggerClickImage() {
|
| 756 |
+
if(typeof _ra.clickImage !== "undefined") _ra.clickImage("<?php echo $_product->getId(); ?>");
|
| 757 |
+
}
|
| 758 |
+
|
| 759 |
+
_ra_helper_addLoadEvent(function() {
|
| 760 |
+
if ( document.getElementsByClassName("zoomWindow").length > 0 ) {
|
| 761 |
+
document.getElementsByClassName("zoomWindow")[0].onmouseover = _ra_triggerClickImage;
|
| 762 |
+
}
|
| 763 |
+
if ( document.getElementsByClassName("zoomLens").length > 0 ) {
|
| 764 |
+
document.getElementsByClassName("zoomLens")[0].onmouseover = _ra_triggerClickImage;
|
| 765 |
+
}
|
| 766 |
+
if ( document.getElementsByClassName("MagicToolboxContainer").length > 0 ) {
|
| 767 |
+
document.getElementsByClassName("MagicZoomBigImageCont")[0].onmouseover = _ra_triggerClickImage;
|
| 768 |
+
}
|
| 769 |
+
if ( document.getElementById("image") !== null ) {
|
| 770 |
+
document.getElementById("image").onclick = _ra_triggerClickImage;
|
| 771 |
+
} else if ( document.querySelector(".product-image img") !== null ) {
|
| 772 |
+
var el = document.querySelector(".product-image img").onclick = _ra_triggerClickImage;
|
| 773 |
+
}
|
| 774 |
+
});
|
| 775 |
+
<?php endif //customcss?>
|
| 776 |
+
<?php endif //endif product ?>
|
| 777 |
<?php endif ?>
|
| 778 |
|
| 779 |
|
| 811 |
// Trigger mouseOverPrice
|
| 812 |
|
| 813 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 814 |
+
<?php if($_product): ?>
|
| 815 |
function _ra_triggerMouseOverPrice() {
|
| 816 |
if(typeof _ra.mouseOverPrice !== "undefined") _ra.mouseOverPrice("<?php echo $_product->getId(); ?>", {
|
| 817 |
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 829 |
});
|
| 830 |
|
| 831 |
<?php endif ?>
|
| 832 |
+
<?php endif ?>
|
| 833 |
|
| 834 |
|
| 835 |
|
| 843 |
// Trigger mouseOverAddToCart
|
| 844 |
|
| 845 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 846 |
+
<?php if($_product): ?>
|
| 847 |
function _ra_triggerMouseOverAddToCart() {
|
| 848 |
if(typeof _ra.mouseOverAddToCart !== "undefined") _ra.mouseOverAddToCart("<?php echo $_product->getId(); ?>");
|
| 849 |
}
|
| 857 |
});
|
| 858 |
|
| 859 |
<?php endif ?>
|
| 860 |
+
<?php endif ?>
|
| 861 |
|
| 862 |
|
| 863 |
|
| 966 |
|
| 967 |
<?php endif ?>
|
| 968 |
|
|
|
|
| 969 |
|
| 970 |
+
<?php // likeFacebook
|
| 971 |
+
$_product = Mage::registry('current_product');
|
| 972 |
+
if($_product && Mage::helper('retargeting_tracker')->isFacebookAvailable()) :
|
| 973 |
+
?>
|
| 974 |
+
|
| 975 |
+
if (typeof FB != "undefined") {
|
| 976 |
+
FB.Event.subscribe('edge.create', function () {
|
| 977 |
+
_ra.likeFacebook(<?php echo $_product->getId()?>);
|
| 978 |
+
});
|
| 979 |
+
};
|
| 980 |
+
<?php endif; //end like facebook ?>
|
| 981 |
|
| 982 |
+
</script>
|
| 983 |
<?php
|
| 984 |
/*
|
| 985 |
----------------------- Track URL History --------------------------
|
package.xml
CHANGED
|
@@ -1,37 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Retargeting_Tracker</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Retargeting and Marketing Automation. Personalized email content + Personalized live messages + SMS triggers to deliver to your customers the products they want to buy.</summary>
|
| 10 |
-
<description><h2>Retargeting and Marketing Automation</h2>
|
| 11 |
-
<p>Personalized email content + Personalized live messages + SMS triggers to deliver to your customers the products they want to buy.</p>
|
| 12 |
-
<h2>Features</h2>
|
| 13 |
-
<h3><strong>Live Triggers</strong></h3>
|
| 14 |
-
<p> When you have people in our online shop, if you see that someone's showing a lot of interest in one product, wouldn't you offer them a small discount to make sure they buy it? That's what we thought!&nbsp;<br>
|
| 15 |
-
<br>
|
| 16 |
-
With our personalized live triggers that's exactly what you'll do, just that you won't have to lift a finger.</p>
|
| 17 |
-
<p><a href="https://retargeting.biz/live-triggers-marketing" title="Live Triggers">read more about live triggers</a></p>
|
| 18 |
-
<h3><strong>E-mail triggers &amp; reminders</strong></h3>
|
| 19 |
-
<p> We all want to market someone when they're in a buying mood, but it's hard to get the right timing. But we found a secret formula and you'll have access to it through our e-mail marketing software. Someone leaves the site without finishing the order? We got your back!</p>
|
| 20 |
-
<p> Someone browsed the site, found interesting products but didn't press the buy button? We'll remind him about those cool products through a triggered email. And that's not all, we can do so much more with our personalized emails!</p>
|
| 21 |
-
<p><a href="https://retargeting.biz/email-triggers-and-reminders" title="E-mail triggers & reminders">read more about email triggers</a></p>
|
| 22 |
-
<h3><strong>SMS Triggers</strong></h3>
|
| 23 |
-
<p>Nowadays, with everyone checking their phones every 5 minutes, you can't go wrong with this, you're 100% sure that they will see your message. What better way to remind someone that they forgot to finish order a couple of hours ago?</p>
|
| 24 |
-
<p><a href="https://retargeting.biz/sms-triggers" title="SMS Triggers">read more about sms triggers</a></p>
|
| 25 |
-
<h3><strong>Multitesting</strong></h3>
|
| 26 |
-
<p>We love A/B testing so much that we created Multitesting, an improved and limitless version compared to other email marketing softwares.</p>
|
| 27 |
-
<p>You can test as many different versions as you want and you only need one click to add a new one.Did we tell you that you can do this for any trigger, e-mail or live? The perfect&nbsp;<a href="http://en.wikipedia.org/wiki/Marketing_automation" title="marketing automation">marketing automation</a>&nbsp;tool for your online shop!</p>
|
| 28 |
-
<p><strong>Contact</strong></p>
|
| 29 |
-
<p>For help or more info, please contact info@retargeting.biz or visit&nbsp;<a href="http://www.retargeting.biz">retargeting.biz</a>.</p></description>
|
| 30 |
<notes>Retargeting</notes>
|
| 31 |
-
<authors><author><name>
|
| 32 |
-
<date>2015-
|
| 33 |
-
<time>
|
| 34 |
-
<contents><target name="
|
| 35 |
<compatible/>
|
| 36 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 37 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Retargeting_Tracker</name>
|
| 4 |
+
<version>1.0.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Retargeting and Marketing Automation. Personalized email content + Personalized live messages + SMS triggers to deliver to your customers the products they want to buy.</summary>
|
| 10 |
+
<description><h2>Retargeting and Marketing Automation</h2> <p>Personalized email content + Personalized live messages + SMS triggers to deliver to your customers the products they want to buy.</p> <h2>Features</h2> <h3><strong>Live Triggers</strong></h3> <p> When you have people in our online shop, if you see that someone's showing a lot of interest in one product, wouldn't you offer them a small discount to make sure they buy it? That's what we thought!&nbsp;<br> <br> With our personalized live triggers that's exactly what you'll do, just that you won't have to lift a finger.</p> <p><a href="https://retargeting.biz/live-triggers-marketing" title="Live Triggers">read more about live triggers</a></p> <h3><strong>E-mail triggers &amp; reminders</strong></h3> <p> We all want to market someone when they're in a buying mood, but it's hard to get the right timing. But we found a secret formula and you'll have access to it through our e-mail marketing software. Someone leaves the site without finishing the order? We got your back!</p> <p> Someone browsed the site, found interesting products but didn't press the buy button? We'll remind him about those cool products through a triggered email. And that's not all, we can do so much more with our personalized emails!</p> <p><a href="https://retargeting.biz/email-triggers-and-reminders" title="E-mail triggers & reminders">read more about email triggers</a></p> <h3><strong>SMS Triggers</strong></h3> <p>Nowadays, with everyone checking their phones every 5 minutes, you can't go wrong with this, you're 100% sure that they will see your message. What better way to remind someone that they forgot to finish order a couple of hours ago?</p> <p><a href="https://retargeting.biz/sms-triggers" title="SMS Triggers">read more about sms triggers</a></p> <h3><strong>Multitesting</strong></h3> <p>We love A/B testing so much that we created Multitesting, an improved and limitless version compared to other email marketing softwares.</p> <p>You can test as many different versions as you want and you only need one click to add a new one.Did we tell you that you can do this for any trigger, e-mail or live? The perfect&nbsp;<a href="http://en.wikipedia.org/wiki/Marketing_automation" title="marketing automation">marketing automation</a>&nbsp;tool for your online shop!</p> <p><strong>Contact</strong></p> <p>For help or more info, please contact info@retargeting.biz or visit&nbsp;<a href="http://www.retargeting.biz">retargeting.biz</a>.</p></description>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
<notes>Retargeting</notes>
|
| 12 |
+
<authors><author><name>Cosmin Atomei</name><user>retargeting</user><email>info@retargeting.biz</email></author></authors>
|
| 13 |
+
<date>2015-05-08</date>
|
| 14 |
+
<time>05:33:27</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Retargeting"><dir name="Tracker"><dir name="Block"><file name="Embed.php" hash="d114429b378b186d144f75b725bd36c4"/><file name="Triggers.php" hash="fd2f2fad2041280b0d0572ea0e2220de"/></dir><dir name="Helper"><file name="Data.php" hash="6b547d3d67003b8bef48fd4eb8efe23f"/></dir><dir name="Model"><file name="Helppages.php" hash="51305978cda160ad7b3aa8bb8e42d3a5"/><file name="Observer.php" hash="891bb244bf9caa5d5742338cd5697ee8"/></dir><dir name="controllers"><file name="DiscountsController.php" hash="67247a363a19b6e94a33d5edfc568fa8"/><file name="IndexController.php" hash="9cbd5b979859b2014c5ed191d9b5686a"/></dir><dir name="etc"><file name="config.xml" hash="821371b9ce436626f6efa1b5a917ffe1"/><file name="system.xml" hash="67557492fbc0fd0514b0750d5f842f97"/></dir><dir name="sql"><dir name="retargeting_tracker_setup"><file name="mysql4-install-1.0.0.php" hash="6613b3db4b7ec61fe47f9b69591fa0c5"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Retargeting_Tracker.xml" hash="44dbbcea34bc8ed9cc6d744176adb9a6"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="retargeting_tracker.xml" hash="a27cb36a780ee24f3e70aba08599f37e"/></dir><dir name="template"><dir name="retargeting_tracker"><file name="embed.phtml" hash="2a44aee08ed2f5c058b6ea7698afb642"/><file name="triggers.phtml" hash="ccdcdf5efed923567d26ef73d4ccbc2e"/></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
