This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $plcsCol = Mage::getModel('catalog/product_link')->getCollection()->addFieldToFilter('link_type_id',Mage_Catalog_Model_Product_Link::LINK_TYPE_CROSSSELL)->addFieldToFilter('product_id',$_product->getId())->getData();//get crosssell product IDs attached to parent product ?> | |
<?php $csIDs = array_column($plcsCol,'linked_product_id');//map cs IDs to array, use array to filter collection by IDs ?> | |
<?php $_crossSellProducts = $_product->getCrossSellProductCollection()->addAttributeToFilter('entity_id', array('in'=>$csIDs))->addAttributeToSelect('*'); //ensures our crosssell collection is limited to ONLY attached crossells of parent.. calling getCrossSellProductCollection without filtering seems to return the ENTIRE product catalog collection.. | |
//replace addAttributeToSelect('*') with whatever fields you need from product flat catalog.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function ($, window) { | |
var intervals = {}; | |
var removeListener = function(selector) { | |
if (intervals[selector]) { | |
window.clearInterval(intervals[selector]); | |
intervals[selector] = null; | |
} |
NewerOlder