Version Notes
Bug Fixes
Download this release
Release Info
| Developer | Retargeting Team |
| Extension | Retargeting_Tracker |
| Version | 1.3.0 |
| Comparing to | |
| See all releases | |
Code changes from version 1.2.9 to 1.3.0
app/design/frontend/base/default/template/retargeting_tracker/triggers.phtml
CHANGED
|
@@ -39,7 +39,7 @@
|
|
| 39 |
----------------------- Trigger setEmail -----------------------
|
| 40 |
*/
|
| 41 |
?>
|
| 42 |
-
<?php if (
|
| 43 |
// Trigger setEmail
|
| 44 |
var _ra = _ra || {};
|
| 45 |
_ra.setEmailInfo = {
|
|
@@ -61,7 +61,7 @@
|
|
| 61 |
----------------------- Trigger sendCategory -----------------------
|
| 62 |
*/
|
| 63 |
?>
|
| 64 |
-
<?php if (
|
| 65 |
|
| 66 |
// Trigger sendCategory
|
| 67 |
|
|
@@ -77,10 +77,10 @@
|
|
| 77 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 78 |
|
| 79 |
$_categoryBreadcrumb[] = '[{
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
}
|
| 85 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 86 |
}
|
|
@@ -112,13 +112,13 @@
|
|
| 112 |
----------------------- Trigger sendProduct -----------------------
|
| 113 |
*/
|
| 114 |
?>
|
| 115 |
-
<?php if (
|
| 116 |
|
| 117 |
// Trigger sendProduct
|
| 118 |
|
| 119 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 120 |
|
| 121 |
-
<?php if($_product) : ?>
|
| 122 |
<?php
|
| 123 |
$_productUrl = Mage::helper('core/url')->getCurrentUrl();
|
| 124 |
|
|
@@ -144,24 +144,24 @@
|
|
| 144 |
while ($breadcrumbCategory->getLevel() > 2) {
|
| 145 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 146 |
$_categoryBreadcrumb[] = '{
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
}
|
| 152 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 153 |
}
|
| 154 |
$_category = '[{
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
} else {
|
| 160 |
$_category = '[{
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
}
|
| 166 |
?>
|
| 167 |
|
|
@@ -193,12 +193,16 @@
|
|
| 193 |
----------------------- Trigger addToCart -----------------------
|
| 194 |
*/
|
| 195 |
?>
|
| 196 |
-
<?php if (
|
| 197 |
|
| 198 |
// Trigger addToCart
|
| 199 |
|
| 200 |
-
<?php
|
| 201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
// Trigger sendProduct before addToCart
|
| 204 |
|
|
@@ -225,23 +229,45 @@
|
|
| 225 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 226 |
|
| 227 |
$_categoryBreadcrumb[] = '{
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
}
|
| 233 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 234 |
}
|
| 235 |
$_category = '[{
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
} else {
|
| 241 |
$_category = '[{"id": "-1", "name": "no category", "parent": false}]';
|
| 242 |
}
|
| 243 |
?>
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
var _ra = _ra || {};
|
| 246 |
_ra.addToCartInfo = {
|
| 247 |
"product_id": "<?php echo $info['product_id']; ?>",
|
|
@@ -252,7 +278,6 @@
|
|
| 252 |
_ra.addToCart(_ra.addToCartInfo.product_id, _ra.addToCartInfo.quantity, _ra.addToCartInfo.variation);
|
| 253 |
}
|
| 254 |
|
| 255 |
-
|
| 256 |
<?php else : ?>
|
| 257 |
|
| 258 |
var _ra = _ra || {};
|
|
@@ -276,18 +301,18 @@
|
|
| 276 |
/*
|
| 277 |
----------------------- Trigger setVariation -----------------------
|
| 278 |
*/
|
| 279 |
-
if($magentoVersion > "1.4.2.0") :
|
| 280 |
?>
|
| 281 |
-
<?php if (
|
| 282 |
|
| 283 |
// Trigger setVariation
|
| 284 |
|
| 285 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 286 |
<?php if ($_product) : ?>
|
| 287 |
|
| 288 |
-
<?php if (
|
| 289 |
<?php /*is not configurable*/ ?>
|
| 290 |
-
<?php if (
|
| 291 |
|
| 292 |
function _ra_triggerSetVariation() {
|
| 293 |
var _ra_variation = _ra_grabVariation();
|
|
@@ -301,24 +326,24 @@
|
|
| 301 |
var _ra_vo = {};
|
| 302 |
var _ra_voCode = [];
|
| 303 |
var _ra_voDetails = {};
|
| 304 |
-
<?php foreach (
|
| 305 |
<?php $optionType = $o->getType(); ?>
|
| 306 |
<?php $optionId = $o->getId(); ?>
|
| 307 |
<?php $optionTitle = $o->getTitle(); ?>
|
| 308 |
|
| 309 |
-
<?php if (
|
| 310 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 311 |
_ra_voCode.push(document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").value);
|
| 312 |
}
|
| 313 |
<?php endif ?>
|
| 314 |
|
| 315 |
-
<?php if (
|
| 316 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 317 |
_ra_voCode.push(document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").value);
|
| 318 |
}
|
| 319 |
<?php endif ?>
|
| 320 |
|
| 321 |
-
<?php if (
|
| 322 |
if (document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length > 0) {
|
| 323 |
var _ra_optionValue = [];
|
| 324 |
var _ra_arr = document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']");
|
|
@@ -331,7 +356,7 @@
|
|
| 331 |
}
|
| 332 |
<?php endif ?>
|
| 333 |
|
| 334 |
-
<?php if (
|
| 335 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null) {
|
| 336 |
var _ra_optionValue = [];
|
| 337 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").selectedIndex].text);
|
|
@@ -341,7 +366,7 @@
|
|
| 341 |
}
|
| 342 |
<?php endif ?>
|
| 343 |
|
| 344 |
-
<?php if (
|
| 345 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null && 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) {
|
| 346 |
var _ra_optionValue = [];
|
| 347 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").selectedIndex].text);
|
|
@@ -354,12 +379,12 @@
|
|
| 354 |
}
|
| 355 |
<?php endif ?>
|
| 356 |
|
| 357 |
-
<?php if (
|
| 358 |
if (document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").value !== null) {
|
| 359 |
_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);
|
| 360 |
}
|
| 361 |
<?php endif ?>
|
| 362 |
-
<?php if (
|
| 363 |
if (document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null) {
|
| 364 |
var _ra_optionValue = [];
|
| 365 |
var _ra_arr = document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").options;
|
|
@@ -372,7 +397,7 @@
|
|
| 372 |
}
|
| 373 |
<?php endif ?>
|
| 374 |
|
| 375 |
-
<?php if (
|
| 376 |
if (document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length > 0) {
|
| 377 |
var _ra_optionValue = [];
|
| 378 |
var _ra_arr = document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']");
|
|
@@ -384,7 +409,7 @@
|
|
| 384 |
_ra_voCode.push(_ra_optionValue.join(', '));
|
| 385 |
}
|
| 386 |
<?php endif ?>
|
| 387 |
-
<?php if (
|
| 388 |
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) {
|
| 389 |
var _ra_optionValue = [];
|
| 390 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").selectedIndex].text);
|
|
@@ -394,7 +419,7 @@
|
|
| 394 |
}
|
| 395 |
<?php endif ?>
|
| 396 |
|
| 397 |
-
<?php if (
|
| 398 |
if (document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']") !== null) {
|
| 399 |
_ra_voCode.push(document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").value.split(/(\\|\/)/g).pop());
|
| 400 |
}
|
|
@@ -417,11 +442,11 @@
|
|
| 417 |
return _ra_vo;
|
| 418 |
}
|
| 419 |
_ra_helper_addLoadEvent(function () {
|
| 420 |
-
<?php foreach (
|
| 421 |
<?php $optionType = $o->getType(); ?>
|
| 422 |
<?php $optionId = $o->getId(); ?>
|
| 423 |
|
| 424 |
-
<?php if (
|
| 425 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 426 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 427 |
document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
|
@@ -431,7 +456,7 @@
|
|
| 431 |
}
|
| 432 |
<?php endif ?>
|
| 433 |
|
| 434 |
-
<?php if (
|
| 435 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 436 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 437 |
document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
|
@@ -441,7 +466,7 @@
|
|
| 441 |
}
|
| 442 |
<?php endif ?>
|
| 443 |
|
| 444 |
-
<?php if (
|
| 445 |
if (document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length > 0) {
|
| 446 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 447 |
for (var index = 0; index < document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length; index++) {
|
|
@@ -456,7 +481,7 @@
|
|
| 456 |
}
|
| 457 |
<?php endif ?>
|
| 458 |
|
| 459 |
-
<?php if (
|
| 460 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null) {
|
| 461 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 462 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").onchange;
|
|
@@ -477,7 +502,7 @@
|
|
| 477 |
}
|
| 478 |
<?php endif ?>
|
| 479 |
|
| 480 |
-
<?php if (
|
| 481 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null && 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) {
|
| 482 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 483 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").onchange;
|
|
@@ -513,7 +538,7 @@
|
|
| 513 |
}
|
| 514 |
<?php endif ?>
|
| 515 |
|
| 516 |
-
<?php if (
|
| 517 |
if (document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 518 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 519 |
document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
|
@@ -525,7 +550,7 @@
|
|
| 525 |
}
|
| 526 |
<?php endif ?>
|
| 527 |
|
| 528 |
-
<?php if (
|
| 529 |
if (document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null) {
|
| 530 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").onchange;
|
| 531 |
document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").onchange = function () {
|
|
@@ -535,7 +560,7 @@
|
|
| 535 |
}
|
| 536 |
<?php endif ?>
|
| 537 |
|
| 538 |
-
<?php if (
|
| 539 |
if (document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length > 0) {
|
| 540 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 541 |
for (var index = 0; index < document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length; index++) {
|
|
@@ -550,7 +575,7 @@
|
|
| 550 |
}
|
| 551 |
<?php endif ?>
|
| 552 |
|
| 553 |
-
<?php if (
|
| 554 |
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) {
|
| 555 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 556 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").onchange;
|
|
@@ -571,7 +596,7 @@
|
|
| 571 |
}
|
| 572 |
<?php endif ?>
|
| 573 |
|
| 574 |
-
<?php if (
|
| 575 |
if (document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']") !== null) {
|
| 576 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").onchange;
|
| 577 |
document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").onchange = function () {
|
|
@@ -592,7 +617,7 @@
|
|
| 592 |
<?php /*is configurable*/ ?>
|
| 593 |
/*configurable product..*/
|
| 594 |
<?php $_productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product); ?>
|
| 595 |
-
<?php if (
|
| 596 |
|
| 597 |
function _ra_triggerSetVariation() {
|
| 598 |
var _ra_variation = _ra_grabVariation();
|
|
@@ -653,7 +678,7 @@
|
|
| 653 |
|
| 654 |
<?php endif ?>
|
| 655 |
<?php endif ?>
|
| 656 |
-
<?php
|
| 657 |
|
| 658 |
|
| 659 |
<?php
|
|
@@ -661,12 +686,13 @@
|
|
| 661 |
----------------------- Trigger addToWishlist -----------------------
|
| 662 |
*/
|
| 663 |
?>
|
| 664 |
-
<?php if (
|
| 665 |
|
| 666 |
// Trigger addToWishlist
|
| 667 |
|
| 668 |
-
<?php $referral = Mage::getSingleton('core/session')->getReferralController();
|
| 669 |
-
|
|
|
|
| 670 |
|
| 671 |
// Trigger sendProduct before addToWishlist
|
| 672 |
|
|
@@ -693,18 +719,18 @@
|
|
| 693 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 694 |
|
| 695 |
$_categoryBreadcrumb[] = '{
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 699 |
-
|
| 700 |
}
|
| 701 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 702 |
}
|
| 703 |
$_category = '[{
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
} else {
|
| 709 |
$_category = '[{"id": "-1", "name": "no category", "parent": false}]';
|
| 710 |
}
|
|
@@ -743,18 +769,18 @@
|
|
| 743 |
----------------------- Trigger clickImage -----------------------
|
| 744 |
*/
|
| 745 |
?>
|
| 746 |
-
<?php if (
|
| 747 |
|
| 748 |
// Trigger clickImage
|
| 749 |
|
| 750 |
<?php
|
| 751 |
$_product = Mage::registry('current_product');
|
| 752 |
-
if($_product) :
|
| 753 |
?>
|
| 754 |
<?php
|
| 755 |
|
| 756 |
$customClass = Mage::helper('retargeting_tracker')->getCustomClass();
|
| 757 |
-
if(Mage::helper('retargeting_tracker')->getCustomClass() != "") :
|
| 758 |
?>
|
| 759 |
|
| 760 |
function _ra_triggerClickImage() {
|
|
@@ -768,7 +794,7 @@
|
|
| 768 |
}
|
| 769 |
});
|
| 770 |
//custom css
|
| 771 |
-
<?php
|
| 772 |
function _ra_triggerClickImage() {
|
| 773 |
if (typeof _ra.clickImage !== "undefined") {
|
| 774 |
_ra.clickImage("<?php echo $_product->getId(); ?>");
|
|
@@ -792,7 +818,7 @@
|
|
| 792 |
}
|
| 793 |
});
|
| 794 |
<?php endif //customcss?>
|
| 795 |
-
<?php
|
| 796 |
<?php endif ?>
|
| 797 |
|
| 798 |
|
|
@@ -802,7 +828,7 @@
|
|
| 802 |
----------------------- Trigger commentOnProduct -----------------------
|
| 803 |
*/
|
| 804 |
?>
|
| 805 |
-
<?php if (
|
| 806 |
|
| 807 |
// Trigger commentOnProduct
|
| 808 |
|
|
@@ -827,12 +853,12 @@
|
|
| 827 |
----------------------- Trigger mouseOverPrice -----------------------
|
| 828 |
*/
|
| 829 |
?>
|
| 830 |
-
<?php if (
|
| 831 |
|
| 832 |
// Trigger mouseOverPrice
|
| 833 |
|
| 834 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 835 |
-
<?php if($_product): ?>
|
| 836 |
function _ra_triggerMouseOverPrice() {
|
| 837 |
if (typeof _ra.mouseOverPrice !== "undefined") {
|
| 838 |
_ra.mouseOverPrice("<?php echo $_product->getId(); ?>", {
|
|
@@ -861,12 +887,12 @@
|
|
| 861 |
----------------------- Trigger mouseOverAddToCart -----------------------
|
| 862 |
*/
|
| 863 |
?>
|
| 864 |
-
<?php if (
|
| 865 |
|
| 866 |
// Trigger mouseOverAddToCart
|
| 867 |
|
| 868 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 869 |
-
<?php if($_product): ?>
|
| 870 |
function _ra_triggerMouseOverAddToCart() {
|
| 871 |
if (typeof _ra.mouseOverAddToCart !== "undefined") {
|
| 872 |
_ra.mouseOverAddToCart("<?php echo $_product->getId(); ?>");
|
|
@@ -891,7 +917,7 @@
|
|
| 891 |
----------------------- Trigger saveOrder -----------------------
|
| 892 |
*/
|
| 893 |
?>
|
| 894 |
-
<?php if (
|
| 895 |
|
| 896 |
// Trigger saveOrder
|
| 897 |
|
|
@@ -928,7 +954,7 @@
|
|
| 928 |
----------------------- Trigger visitHelpPage -----------------------
|
| 929 |
*/
|
| 930 |
?>
|
| 931 |
-
<?php if (
|
| 932 |
|
| 933 |
<?php
|
| 934 |
$page = Mage::getSingleton('cms/page');
|
|
@@ -936,7 +962,7 @@
|
|
| 936 |
$helpPages = explode(',', $helpPages);
|
| 937 |
?>
|
| 938 |
|
| 939 |
-
<?php if (
|
| 940 |
|
| 941 |
// Trigger visitHelpPage
|
| 942 |
|
|
@@ -970,7 +996,7 @@
|
|
| 970 |
$action = $request->getActionName();
|
| 971 |
?>
|
| 972 |
<?php
|
| 973 |
-
if (
|
| 974 |
) : ?>
|
| 975 |
|
| 976 |
// Trigger checkoutIds
|
|
@@ -993,12 +1019,12 @@
|
|
| 993 |
}
|
| 994 |
}
|
| 995 |
|
| 996 |
-
<?php
|
| 997 |
|
| 998 |
|
| 999 |
<?php // likeFacebook
|
| 1000 |
$_product = Mage::registry('current_product');
|
| 1001 |
-
if($_product && Mage::helper('retargeting_tracker')->isFacebookAvailable()) :
|
| 1002 |
?>
|
| 1003 |
|
| 1004 |
if (typeof FB != "undefined") {
|
|
@@ -1006,12 +1032,12 @@
|
|
| 1006 |
_ra.likeFacebook(<?php echo $_product->getId()?>);
|
| 1007 |
});
|
| 1008 |
}
|
| 1009 |
-
<?php
|
| 1010 |
|
| 1011 |
</script>
|
| 1012 |
<?php
|
| 1013 |
/*
|
| 1014 |
-
|
| 1015 |
*/
|
| 1016 |
?>
|
| 1017 |
<?php
|
| 39 |
----------------------- Trigger setEmail -----------------------
|
| 40 |
*/
|
| 41 |
?>
|
| 42 |
+
<?php if ($info = Mage::getSingleton('core/session')->getTriggerSetEmail()) : ?>
|
| 43 |
// Trigger setEmail
|
| 44 |
var _ra = _ra || {};
|
| 45 |
_ra.setEmailInfo = {
|
| 61 |
----------------------- Trigger sendCategory -----------------------
|
| 62 |
*/
|
| 63 |
?>
|
| 64 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "category") : ?>
|
| 65 |
|
| 66 |
// Trigger sendCategory
|
| 67 |
|
| 77 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 78 |
|
| 79 |
$_categoryBreadcrumb[] = '[{
|
| 80 |
+
"id": "' . $breadcrumbCategory->getId() . '",
|
| 81 |
+
"name": "' . htmlspecialchars($breadcrumbCategory->getName()) . '",
|
| 82 |
+
"parent": ' . ($breadcrumbCategory->getLevel() > 2 ? '"' . $breadcrumbCategory->getParentId() . '"' : 'false') . '
|
| 83 |
+
}]';
|
| 84 |
}
|
| 85 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 86 |
}
|
| 112 |
----------------------- Trigger sendProduct -----------------------
|
| 113 |
*/
|
| 114 |
?>
|
| 115 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "product" && !is_null(Mage::registry('product'))) : ?>
|
| 116 |
|
| 117 |
// Trigger sendProduct
|
| 118 |
|
| 119 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 120 |
|
| 121 |
+
<?php if ($_product) : ?>
|
| 122 |
<?php
|
| 123 |
$_productUrl = Mage::helper('core/url')->getCurrentUrl();
|
| 124 |
|
| 144 |
while ($breadcrumbCategory->getLevel() > 2) {
|
| 145 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 146 |
$_categoryBreadcrumb[] = '{
|
| 147 |
+
"id": "' . $breadcrumbCategory->getId() . '",
|
| 148 |
+
"name": "' . htmlspecialchars($breadcrumbCategory->getName()) . '",
|
| 149 |
+
"parent": ' . ($breadcrumbCategory->getLevel() > 2 ? '"' . $breadcrumbCategory->getParentId() . '"' : 'false') . '
|
| 150 |
+
}';
|
| 151 |
}
|
| 152 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 153 |
}
|
| 154 |
$_category = '[{
|
| 155 |
+
"id": "' . $_category->getId() . '",
|
| 156 |
+
"name": "' . htmlspecialchars($_category->getName()) . '",
|
| 157 |
+
"parent": ' . $_categoryParent . ',
|
| 158 |
+
"breadcrumb" : ' . $_categoryBreadcrumb . '}]';
|
| 159 |
} else {
|
| 160 |
$_category = '[{
|
| 161 |
+
"id": "-1",
|
| 162 |
+
"name": "no category",
|
| 163 |
+
"parent": false
|
| 164 |
+
}]';
|
| 165 |
}
|
| 166 |
?>
|
| 167 |
|
| 193 |
----------------------- Trigger addToCart -----------------------
|
| 194 |
*/
|
| 195 |
?>
|
| 196 |
+
<?php if ($info = Mage::getSingleton('core/session')->getTriggerAddToCart()) : ?>
|
| 197 |
|
| 198 |
// Trigger addToCart
|
| 199 |
|
| 200 |
+
<?php
|
| 201 |
+
|
| 202 |
+
$referral = Mage::getSingleton('core/session')->getReferralController();
|
| 203 |
+
echo "/*" . $referral . "*/"; ?>
|
| 204 |
+
|
| 205 |
+
<?php if ($referral != "product") : ?>
|
| 206 |
|
| 207 |
// Trigger sendProduct before addToCart
|
| 208 |
|
| 229 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 230 |
|
| 231 |
$_categoryBreadcrumb[] = '{
|
| 232 |
+
"id": "' . $breadcrumbCategory->getId() . '",
|
| 233 |
+
"name": "' . htmlspecialchars($breadcrumbCategory->getName()) . '",
|
| 234 |
+
"parent": ' . ($breadcrumbCategory->getLevel() > 2 ? '"' . $breadcrumbCategory->getParentId() . '"' : 'false') . '
|
| 235 |
+
}';
|
| 236 |
}
|
| 237 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 238 |
}
|
| 239 |
$_category = '[{
|
| 240 |
+
"id": "' . $_category->getId() . '",
|
| 241 |
+
"name": "' . htmlspecialchars($_category->getName()) . '",
|
| 242 |
+
"parent": ' . $_categoryParent . ',
|
| 243 |
+
"breadcrumb" : ' . $_categoryBreadcrumb . '}]';
|
| 244 |
} else {
|
| 245 |
$_category = '[{"id": "-1", "name": "no category", "parent": false}]';
|
| 246 |
}
|
| 247 |
?>
|
| 248 |
|
| 249 |
+
var _ra = _ra || {};
|
| 250 |
+
_ra.sendProductInfo = {
|
| 251 |
+
"id": "<?php echo $_product->getId(); ?>",
|
| 252 |
+
"name": "<?php echo htmlspecialchars($_product->getName()); ?>",
|
| 253 |
+
"url": "<?php echo htmlspecialchars(strtok($_productUrl, '?')); ?>",
|
| 254 |
+
"img": "<?php echo htmlspecialchars(Mage::helper('catalog/image')->init($_product, 'image')->resize(500)); ?>",
|
| 255 |
+
"price": <?php echo Mage::helper('tax')->getPrice($_product, $_product->getPrice()); ?>,
|
| 256 |
+
"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); ?>,
|
| 257 |
+
"inventory": {
|
| 258 |
+
"variations": false,
|
| 259 |
+
"stock": <?php echo $_product->getIsInStock() ?>
|
| 260 |
+
},
|
| 261 |
+
"brand": false,
|
| 262 |
+
"category": <?php echo $_category; ?>
|
| 263 |
+
};
|
| 264 |
+
|
| 265 |
+
if (_ra.ready !== undefined) {
|
| 266 |
+
if (typeof _ra.sendProduct !== "undefined") {
|
| 267 |
+
_ra.sendProduct(_ra.sendProductInfo);
|
| 268 |
+
}
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
var _ra = _ra || {};
|
| 272 |
_ra.addToCartInfo = {
|
| 273 |
"product_id": "<?php echo $info['product_id']; ?>",
|
| 278 |
_ra.addToCart(_ra.addToCartInfo.product_id, _ra.addToCartInfo.quantity, _ra.addToCartInfo.variation);
|
| 279 |
}
|
| 280 |
|
|
|
|
| 281 |
<?php else : ?>
|
| 282 |
|
| 283 |
var _ra = _ra || {};
|
| 301 |
/*
|
| 302 |
----------------------- Trigger setVariation -----------------------
|
| 303 |
*/
|
| 304 |
+
if ($magentoVersion > "1.4.2.0") :
|
| 305 |
?>
|
| 306 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "product" && !is_null(Mage::registry('product'))) : ?>
|
| 307 |
|
| 308 |
// Trigger setVariation
|
| 309 |
|
| 310 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 311 |
<?php if ($_product) : ?>
|
| 312 |
|
| 313 |
+
<?php if (!$_product->isConfigurable()) : ?>
|
| 314 |
<?php /*is not configurable*/ ?>
|
| 315 |
+
<?php if ($_product->getTypeInstance(true)->hasOptions($_product)) : ?>
|
| 316 |
|
| 317 |
function _ra_triggerSetVariation() {
|
| 318 |
var _ra_variation = _ra_grabVariation();
|
| 326 |
var _ra_vo = {};
|
| 327 |
var _ra_voCode = [];
|
| 328 |
var _ra_voDetails = {};
|
| 329 |
+
<?php foreach ($_product->getOptions() as $o) : ?>
|
| 330 |
<?php $optionType = $o->getType(); ?>
|
| 331 |
<?php $optionId = $o->getId(); ?>
|
| 332 |
<?php $optionTitle = $o->getTitle(); ?>
|
| 333 |
|
| 334 |
+
<?php if ($optionType == "area") : ?>
|
| 335 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 336 |
_ra_voCode.push(document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").value);
|
| 337 |
}
|
| 338 |
<?php endif ?>
|
| 339 |
|
| 340 |
+
<?php if ($optionType == "field") : ?>
|
| 341 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 342 |
_ra_voCode.push(document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").value);
|
| 343 |
}
|
| 344 |
<?php endif ?>
|
| 345 |
|
| 346 |
+
<?php if ($optionType == "checkbox") : ?>
|
| 347 |
if (document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length > 0) {
|
| 348 |
var _ra_optionValue = [];
|
| 349 |
var _ra_arr = document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']");
|
| 356 |
}
|
| 357 |
<?php endif ?>
|
| 358 |
|
| 359 |
+
<?php if ($optionType == "date") : ?>
|
| 360 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null) {
|
| 361 |
var _ra_optionValue = [];
|
| 362 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").selectedIndex].text);
|
| 366 |
}
|
| 367 |
<?php endif ?>
|
| 368 |
|
| 369 |
+
<?php if ($optionType == "date_time") : ?>
|
| 370 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null && 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) {
|
| 371 |
var _ra_optionValue = [];
|
| 372 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").selectedIndex].text);
|
| 379 |
}
|
| 380 |
<?php endif ?>
|
| 381 |
|
| 382 |
+
<?php if ($optionType == "drop_down") : ?>
|
| 383 |
if (document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").value !== null) {
|
| 384 |
_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);
|
| 385 |
}
|
| 386 |
<?php endif ?>
|
| 387 |
+
<?php if ($optionType == "multiple") : ?>
|
| 388 |
if (document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null) {
|
| 389 |
var _ra_optionValue = [];
|
| 390 |
var _ra_arr = document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").options;
|
| 397 |
}
|
| 398 |
<?php endif ?>
|
| 399 |
|
| 400 |
+
<?php if ($optionType == "radio") : ?>
|
| 401 |
if (document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length > 0) {
|
| 402 |
var _ra_optionValue = [];
|
| 403 |
var _ra_arr = document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']");
|
| 409 |
_ra_voCode.push(_ra_optionValue.join(', '));
|
| 410 |
}
|
| 411 |
<?php endif ?>
|
| 412 |
+
<?php if ($optionType == "time") : ?>
|
| 413 |
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) {
|
| 414 |
var _ra_optionValue = [];
|
| 415 |
_ra_optionValue.push(document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").options[document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").selectedIndex].text);
|
| 419 |
}
|
| 420 |
<?php endif ?>
|
| 421 |
|
| 422 |
+
<?php if ($optionType == "file") : ?>
|
| 423 |
if (document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']") !== null) {
|
| 424 |
_ra_voCode.push(document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").value.split(/(\\|\/)/g).pop());
|
| 425 |
}
|
| 442 |
return _ra_vo;
|
| 443 |
}
|
| 444 |
_ra_helper_addLoadEvent(function () {
|
| 445 |
+
<?php foreach ($_product->getOptions() as $o) : ?>
|
| 446 |
<?php $optionType = $o->getType(); ?>
|
| 447 |
<?php $optionId = $o->getId(); ?>
|
| 448 |
|
| 449 |
+
<?php if ($optionType == "area") : ?>
|
| 450 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 451 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 452 |
document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
| 456 |
}
|
| 457 |
<?php endif ?>
|
| 458 |
|
| 459 |
+
<?php if ($optionType == "field") : ?>
|
| 460 |
if (document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 461 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 462 |
document.querySelector(".product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
| 466 |
}
|
| 467 |
<?php endif ?>
|
| 468 |
|
| 469 |
+
<?php if ($optionType == "checkbox") : ?>
|
| 470 |
if (document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length > 0) {
|
| 471 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 472 |
for (var index = 0; index < document.querySelectorAll("input[type='checkbox'].product-custom-option[name='options[<?php echo $optionId; ?>][]']").length; index++) {
|
| 481 |
}
|
| 482 |
<?php endif ?>
|
| 483 |
|
| 484 |
+
<?php if ($optionType == "date") : ?>
|
| 485 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null) {
|
| 486 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 487 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").onchange;
|
| 502 |
}
|
| 503 |
<?php endif ?>
|
| 504 |
|
| 505 |
+
<?php if ($optionType == "date_time") : ?>
|
| 506 |
if (document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][day]']") !== null && document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][year]']") !== null && 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) {
|
| 507 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 508 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][month]']").onchange;
|
| 538 |
}
|
| 539 |
<?php endif ?>
|
| 540 |
|
| 541 |
+
<?php if ($optionType == "drop_down") : ?>
|
| 542 |
if (document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']") !== null) {
|
| 543 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange;
|
| 544 |
document.querySelector("select.product-custom-option[name='options[<?php echo $optionId; ?>]']").onchange = function () {
|
| 550 |
}
|
| 551 |
<?php endif ?>
|
| 552 |
|
| 553 |
+
<?php if ($optionType == "multiple") : ?>
|
| 554 |
if (document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']") !== null) {
|
| 555 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").onchange;
|
| 556 |
document.querySelector("select.multiselect.product-custom-option[name='options[<?php echo $optionId; ?>][]']").onchange = function () {
|
| 560 |
}
|
| 561 |
<?php endif ?>
|
| 562 |
|
| 563 |
+
<?php if ($optionType == "radio") : ?>
|
| 564 |
if (document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length > 0) {
|
| 565 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 566 |
for (var index = 0; index < document.querySelectorAll("input[type='radio'].product-custom-option[name='options[<?php echo $optionId; ?>]']").length; index++) {
|
| 575 |
}
|
| 576 |
<?php endif ?>
|
| 577 |
|
| 578 |
+
<?php if ($optionType == "time") : ?>
|
| 579 |
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) {
|
| 580 |
_ra_optElfunc[<?php echo $optionId; ?>] = [];
|
| 581 |
_ra_optElfunc[<?php echo $optionId; ?>][0] = document.querySelector(".datetime-picker.product-custom-option[name='options[<?php echo $optionId; ?>][hour]']").onchange;
|
| 596 |
}
|
| 597 |
<?php endif ?>
|
| 598 |
|
| 599 |
+
<?php if ($optionType == "file") : ?>
|
| 600 |
if (document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']") !== null) {
|
| 601 |
_ra_optElfunc[<?php echo $optionId; ?>] = document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").onchange;
|
| 602 |
document.querySelector("input[type='file'].product-custom-option[name='options_<?php echo $optionId; ?>_file']").onchange = function () {
|
| 617 |
<?php /*is configurable*/ ?>
|
| 618 |
/*configurable product..*/
|
| 619 |
<?php $_productAttributeOptions = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product); ?>
|
| 620 |
+
<?php if (count($_productAttributeOptions) > 0) : ?>
|
| 621 |
|
| 622 |
function _ra_triggerSetVariation() {
|
| 623 |
var _ra_variation = _ra_grabVariation();
|
| 678 |
|
| 679 |
<?php endif ?>
|
| 680 |
<?php endif ?>
|
| 681 |
+
<?php endif //magento version ?>
|
| 682 |
|
| 683 |
|
| 684 |
<?php
|
| 686 |
----------------------- Trigger addToWishlist -----------------------
|
| 687 |
*/
|
| 688 |
?>
|
| 689 |
+
<?php if ($info = Mage::getSingleton('core/session')->getTriggerAddToWishlist()) : ?>
|
| 690 |
|
| 691 |
// Trigger addToWishlist
|
| 692 |
|
| 693 |
+
<?php $referral = Mage::getSingleton('core/session')->getReferralController();
|
| 694 |
+
echo "/*" . $referral . "*/"; ?>
|
| 695 |
+
<?php if ($referral != "product") : ?>
|
| 696 |
|
| 697 |
// Trigger sendProduct before addToWishlist
|
| 698 |
|
| 719 |
$breadcrumbCategory = Mage::getModel('catalog/category')->load($breadcrumbCategory->getParentId());
|
| 720 |
|
| 721 |
$_categoryBreadcrumb[] = '{
|
| 722 |
+
"id": "' . $breadcrumbCategory->getId() . '",
|
| 723 |
+
"name": "' . htmlspecialchars($breadcrumbCategory->getName()) . '",
|
| 724 |
+
"parent": ' . ($breadcrumbCategory->getLevel() > 2 ? '"' . $breadcrumbCategory->getParentId() . '"' : 'false') . '
|
| 725 |
+
}';
|
| 726 |
}
|
| 727 |
$_categoryBreadcrumb = '[' . implode(', ', $_categoryBreadcrumb) . ']';
|
| 728 |
}
|
| 729 |
$_category = '[{
|
| 730 |
+
"id": "' . $_category->getId() . '",
|
| 731 |
+
"name": "' . htmlspecialchars($_category->getName()) . '",
|
| 732 |
+
"parent": ' . $_categoryParent . ',
|
| 733 |
+
"breadcrumb" : ' . $_categoryBreadcrumb . '}]';
|
| 734 |
} else {
|
| 735 |
$_category = '[{"id": "-1", "name": "no category", "parent": false}]';
|
| 736 |
}
|
| 769 |
----------------------- Trigger clickImage -----------------------
|
| 770 |
*/
|
| 771 |
?>
|
| 772 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "product" && !is_null(Mage::registry('product'))) : ?>
|
| 773 |
|
| 774 |
// Trigger clickImage
|
| 775 |
|
| 776 |
<?php
|
| 777 |
$_product = Mage::registry('current_product');
|
| 778 |
+
if ($_product) :
|
| 779 |
?>
|
| 780 |
<?php
|
| 781 |
|
| 782 |
$customClass = Mage::helper('retargeting_tracker')->getCustomClass();
|
| 783 |
+
if (Mage::helper('retargeting_tracker')->getCustomClass() != "") :
|
| 784 |
?>
|
| 785 |
|
| 786 |
function _ra_triggerClickImage() {
|
| 794 |
}
|
| 795 |
});
|
| 796 |
//custom css
|
| 797 |
+
<?php else : ?>
|
| 798 |
function _ra_triggerClickImage() {
|
| 799 |
if (typeof _ra.clickImage !== "undefined") {
|
| 800 |
_ra.clickImage("<?php echo $_product->getId(); ?>");
|
| 818 |
}
|
| 819 |
});
|
| 820 |
<?php endif //customcss?>
|
| 821 |
+
<?php endif //endif product ?>
|
| 822 |
<?php endif ?>
|
| 823 |
|
| 824 |
|
| 828 |
----------------------- Trigger commentOnProduct -----------------------
|
| 829 |
*/
|
| 830 |
?>
|
| 831 |
+
<?php if ($info = Mage::getSingleton('core/session')->getTriggerCommentOnProduct()) : ?>
|
| 832 |
|
| 833 |
// Trigger commentOnProduct
|
| 834 |
|
| 853 |
----------------------- Trigger mouseOverPrice -----------------------
|
| 854 |
*/
|
| 855 |
?>
|
| 856 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "product" && !is_null(Mage::registry('product'))) : ?>
|
| 857 |
|
| 858 |
// Trigger mouseOverPrice
|
| 859 |
|
| 860 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 861 |
+
<?php if ($_product) : ?>
|
| 862 |
function _ra_triggerMouseOverPrice() {
|
| 863 |
if (typeof _ra.mouseOverPrice !== "undefined") {
|
| 864 |
_ra.mouseOverPrice("<?php echo $_product->getId(); ?>", {
|
| 887 |
----------------------- Trigger mouseOverAddToCart -----------------------
|
| 888 |
*/
|
| 889 |
?>
|
| 890 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getControllerName() == "product" && !is_null(Mage::registry('product'))) : ?>
|
| 891 |
|
| 892 |
// Trigger mouseOverAddToCart
|
| 893 |
|
| 894 |
<?php $_product = Mage::registry('current_product'); ?>
|
| 895 |
+
<?php if ($_product) : ?>
|
| 896 |
function _ra_triggerMouseOverAddToCart() {
|
| 897 |
if (typeof _ra.mouseOverAddToCart !== "undefined") {
|
| 898 |
_ra.mouseOverAddToCart("<?php echo $_product->getId(); ?>");
|
| 917 |
----------------------- Trigger saveOrder -----------------------
|
| 918 |
*/
|
| 919 |
?>
|
| 920 |
+
<?php if ($info = Mage::getSingleton('core/session')->getTriggerSaveOrder()) : ?>
|
| 921 |
|
| 922 |
// Trigger saveOrder
|
| 923 |
|
| 954 |
----------------------- Trigger visitHelpPage -----------------------
|
| 955 |
*/
|
| 956 |
?>
|
| 957 |
+
<?php if (Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') : ?>
|
| 958 |
|
| 959 |
<?php
|
| 960 |
$page = Mage::getSingleton('cms/page');
|
| 962 |
$helpPages = explode(',', $helpPages);
|
| 963 |
?>
|
| 964 |
|
| 965 |
+
<?php if ($page->getId() && in_array($page->getId(), $helpPages)) : ?>
|
| 966 |
|
| 967 |
// Trigger visitHelpPage
|
| 968 |
|
| 996 |
$action = $request->getActionName();
|
| 997 |
?>
|
| 998 |
<?php
|
| 999 |
+
if (($module == 'checkout' && $controller == 'cart' && $action == 'index') || ($module == 'checkout' && $controller == 'onepage' && $action == 'index') || (Mage::getURL('checkout/onepage') == Mage::helper('core/url')->getCurrentUrl()) || (strrpos(Mage::helper('core/url')->getCurrentUrl(), "/onestepcheckout") !== false)
|
| 1000 |
) : ?>
|
| 1001 |
|
| 1002 |
// Trigger checkoutIds
|
| 1019 |
}
|
| 1020 |
}
|
| 1021 |
|
| 1022 |
+
<?php endif ?>
|
| 1023 |
|
| 1024 |
|
| 1025 |
<?php // likeFacebook
|
| 1026 |
$_product = Mage::registry('current_product');
|
| 1027 |
+
if ($_product && Mage::helper('retargeting_tracker')->isFacebookAvailable()) :
|
| 1028 |
?>
|
| 1029 |
|
| 1030 |
if (typeof FB != "undefined") {
|
| 1032 |
_ra.likeFacebook(<?php echo $_product->getId()?>);
|
| 1033 |
});
|
| 1034 |
}
|
| 1035 |
+
<?php endif; //end like facebook ?>
|
| 1036 |
|
| 1037 |
</script>
|
| 1038 |
<?php
|
| 1039 |
/*
|
| 1040 |
+
----------------------- Track URL History --------------------------
|
| 1041 |
*/
|
| 1042 |
?>
|
| 1043 |
<?php
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Retargeting_Tracker</name>
|
| 4 |
-
<version>1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -27,11 +27,11 @@
|
|
| 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<a href="http://en.wikipedia.org/wiki/Marketing_automation" title="marketing automation">marketing automation</a>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<a href="http://retargeting.biz">retargeting.biz</a>.</p></description>
|
| 30 |
-
<notes>
|
| 31 |
<authors><author><name>Retargeting Team</name><user>retargeting</user><email>info@retargeting.biz</email></author></authors>
|
| 32 |
-
<date>2016-
|
| 33 |
-
<time>
|
| 34 |
-
<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="d41369b1ba2807567dfc857e961b7d2a"/></dir><dir name="controllers"><file name="DiscountsController.php" hash="f1ec0bbd235fcf50551ca5206dfb50e5"/><file name="IndexController.php" hash="9cbd5b979859b2014c5ed191d9b5686a"/><file name="ProductsController.php" hash="f2f556aee8c80f3a77a884792520102a"/></dir><dir name="etc"><file name="config.xml" hash="a307ab9d85f524eea26a6419874b8dba"/><file name="system.xml" hash="914aebddf7b905c7b23aeabdc4dfdcb7"/></dir><dir name="sql"><dir name="retargeting_tracker_setup"><file name="mysql4-install-1.0.0.php" hash="6613b3db4b7ec61fe47f9b69591fa0c5"/><file name="mysql4-install-1.1.0.php" hash="6613b3db4b7ec61fe47f9b69591fa0c5"/></dir></dir></dir></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="85eae33f45d766ec21df700ae96fdb2c"/><file name="triggers.phtml" hash="
|
| 35 |
<compatible/>
|
| 36 |
-
<dependencies><required><php><min>5.2.0</min><max>
|
| 37 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Retargeting_Tracker</name>
|
| 4 |
+
<version>1.3.0</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Open Software License (OSL)</license>
|
| 7 |
<channel>community</channel>
|
| 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<a href="http://en.wikipedia.org/wiki/Marketing_automation" title="marketing automation">marketing automation</a>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<a href="http://retargeting.biz">retargeting.biz</a>.</p></description>
|
| 30 |
+
<notes>Bug Fixes</notes>
|
| 31 |
<authors><author><name>Retargeting Team</name><user>retargeting</user><email>info@retargeting.biz</email></author></authors>
|
| 32 |
+
<date>2016-11-16</date>
|
| 33 |
+
<time>14:33:13</time>
|
| 34 |
+
<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="d41369b1ba2807567dfc857e961b7d2a"/></dir><dir name="controllers"><file name="DiscountsController.php" hash="f1ec0bbd235fcf50551ca5206dfb50e5"/><file name="IndexController.php" hash="9cbd5b979859b2014c5ed191d9b5686a"/><file name="ProductsController.php" hash="f2f556aee8c80f3a77a884792520102a"/></dir><dir name="etc"><file name="config.xml" hash="a307ab9d85f524eea26a6419874b8dba"/><file name="system.xml" hash="914aebddf7b905c7b23aeabdc4dfdcb7"/></dir><dir name="sql"><dir name="retargeting_tracker_setup"><file name="mysql4-install-1.0.0.php" hash="6613b3db4b7ec61fe47f9b69591fa0c5"/><file name="mysql4-install-1.1.0.php" hash="6613b3db4b7ec61fe47f9b69591fa0c5"/></dir></dir></dir></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="85eae33f45d766ec21df700ae96fdb2c"/><file name="triggers.phtml" hash="8301bc699ed3c89d010ca30c15e02599"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Retargeting_Tracker.xml" hash="44dbbcea34bc8ed9cc6d744176adb9a6"/></dir></target><target name="magelib"><dir name="Retargeting"><file name="Retargeting_REST_API_Client.php" hash="fd92942d4feb817768bb8157c01c7138"/></dir></target></contents>
|
| 35 |
<compatible/>
|
| 36 |
+
<dependencies><required><php><min>5.2.0</min><max>7.2.0</max></php></required></dependencies>
|
| 37 |
</package>
|
