Revision 371 is a pre-publication revision. (Viewing current revision instead.)

Get related product in same category not use Target Rule Extension

<?php $categoryIds = Mage::registry('product')->getCategoryIds(); ?>
<div class="block block-related">
    <div class="block-title">
        <h2><?php echo $this->__('Related Products') ?></h2>
    </div>
    <div class="block-content">
        <p class="block-subtitle"><?php echo $this->__('Check items to add to the cart or') ?>&nbsp;
            <a href="#" onclick="selectAllRelated(this); return false;"><?php echo $this->__('select all') ?></a>
        </p>
        <ol class="mini-products-list" id="block-related">
            <?php foreach ($categoryIds as $categoryId): ?>
                <?php $category = new Mage_Catalog_Model_Category(); ?>
                <?php $category->load($categoryId); ?>
                <?php $collection = $category->getProductCollection() ?>
                <?php $collection->setPageSize(1); ?>
                <?php $collection->addAttributeToSelect('*'); ?>

                <?php foreach ($collection as $_item): ?>
                    <li class="item">
                        <?php if (!$_item->isComposite() && $_item->isSaleable()): ?>
                            <?php if (!$_item->getRequiredOptions()): ?>
                                <input type="checkbox" class="checkbox related-checkbox"
                                       id="related-checkbox<?php echo $_item->getId() ?>" name="related_products[]"
                                       value="<?php echo $_item->getId() ?>"/>
                            <?php endif; ?>
                        <?php endif; ?>
                        <div class="product">
                            <a href="<?php echo $_item->getProductUrl() ?>"
                               title="<?php echo $this->escapeHtml($_item->getName()) ?>" class="product-image"><img
                                    src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75) ?>"
                                    width="75" height="75"
                                    alt="<?php echo $this->escapeHtml($_item->getName()) ?>"/></a>

                            <div class="product-details">
                                <p class="product-name"><a
                                        href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->escapeHtml($_item->getName()) ?></a>
                                </p>
                                <?php echo $this->getPriceHtml($_item, true, '-related') ?>
                                <?php if ($this->helper('wishlist')->isAllow()) : ?>
                                    <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
                                       class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a>
                                <?php endif; ?>
                            </div>
                        </div>
                    </li>
                <?php endforeach ?>
            <?php endforeach; ?>
        </ol>
        <script type="text/javascript">decorateList('block-related', 'none-recursive')</script>
    </div>
    <script type="text/javascript">
        //<![CDATA[
        $$('.related-checkbox').each(function (elem) {
            Event.observe(elem, 'click', addRelatedToProduct)
        });

        var relatedProductsCheckFlag = false;
        function selectAllRelated(txt) {
            if (relatedProductsCheckFlag == false) {
                $$('.related-checkbox').each(function (elem) {
                    elem.checked = true;
                });
                relatedProductsCheckFlag = true;
                txt.innerHTML = "<?php echo $this->__('unselect all') ?>";
            } else {
                $$('.related-checkbox').each(function (elem) {
                    elem.checked = false;
                });
                relatedProductsCheckFlag = false;
                txt.innerHTML = "<?php echo $this->__('select all') ?>";
            }
            addRelatedToProduct();
        }

        function addRelatedToProduct() {
            var checkboxes = $$('.related-checkbox');
            var values = [];
            for (var i = 0; i < checkboxes.length; i++) {
                if (checkboxes[i].checked) values.push(checkboxes[i].value);
            }
            if ($('related-products-field')) {
                $('related-products-field').value = values.join(',');
            }
        }
        //]]>
    </script>
</div>
<?php //if ($this->getItems()->getSize()): ?>

<?php //endif ?>

Revisions

Revision Differences

July 5, 2014 @ 03:17:18Current Revision
Content
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&lt;?php $categoryIds = Mage::registry( &#039;product&#039;)-&gt; getCategoryIds(); ?&gt;<br /> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&lt;?php $categoryIds = Mage::registry( &#039;product&#039;)-&gt; getCategoryIds(); ?&gt;<br />
Unchanged: &lt;div class=&quot;block block-related&quot;&gt;<br />Unchanged: &lt;div class=&quot;block block-related&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;div class=&quot;block- title&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &lt;div class=&quot;block- title&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;h2&gt;&lt;?php echo $this-&gt;__( &#039;Related Products&#039;) ?&gt;&lt;/h2&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;h2&gt;&lt;?php echo $this-&gt;__( &#039;Related Products&#039;) ?&gt;&lt;/h2&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;/div&gt;<br />Unchanged: &nbsp; &nbsp; &lt;/div&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;div class=&quot;block- content&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &lt;div class=&quot;block- content&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;block- subtitle&quot; &gt;&lt;?php echo $this-&gt;__(&#039;Check items to add to the cart or&#039;) ?&gt;&amp;nbsp;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;block- subtitle&quot; &gt;&lt;?php echo $this-&gt;__(&#039;Check items to add to the cart or&#039;) ?&gt;&amp;nbsp;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; onclick=&quot; selectAllRelated(this); return false;&quot;&gt;&lt;?php echo $this-&gt;__( &#039;select all&#039;) ?&gt;&lt;/a&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;#&quot; onclick=&quot; selectAllRelated(this); return false;&quot;&gt;&lt;?php echo $this-&gt;__( &#039;select all&#039;) ?&gt;&lt;/a&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;ol class=&quot;mini- products-list&quot; id=&quot;block- related&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;ol class=&quot;mini- products-list&quot; id=&quot;block- related&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php foreach ($categoryIds as $categoryId): ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php foreach ($categoryIds as $categoryId): ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $category = new Mage_Catalog_ Model_Category(); ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $category = new Mage_Catalog_ Model_Category(); ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $category-&gt; load($categoryId); ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $category-&gt; load($categoryId); ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection = $category-&gt; getProductCollection() ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection = $category-&gt; getProductCollection() ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection-&gt; setPageSize(1); ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection-&gt; setPageSize(1); ?&gt;<br />
Deleted: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection-&gt; addAttributeToSelect( &#039;*&#039;); ?&gt;</span> Added: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php $collection-&gt; addAttributeToSelect( &#039;*&#039;); ?&gt;</span></span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php foreach ($collection as $_item): ?&gt;<br /> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php foreach ($collection as $_item): ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class=&quot;item&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;li class=&quot;item&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if (!$_item-&gt; isComposite() &amp;&amp; $_item-&gt;isSaleable()): ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if (!$_item-&gt; isComposite() &amp;&amp; $_item-&gt;isSaleable()): ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if (!$_item-&gt; getRequiredOptions()): ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if (!$_item-&gt; getRequiredOptions()): ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;checkbox&quot; class=&quot;checkbox related-checkbox&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;checkbox&quot; class=&quot;checkbox related-checkbox&quot;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id=&quot; related-checkbox&lt;?php echo $_item-&gt;getId() ?&gt;&quot; name=&quot;related_ products[]&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;id=&quot; related-checkbox&lt;?php echo $_item-&gt;getId() ?&gt;&quot; name=&quot;related_ products[]&quot;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;value=&quot;&lt;?php echo $_item-&gt;getId() ?&gt;&quot;/&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;value=&quot;&lt;?php echo $_item-&gt;getId() ?&gt;&quot;/&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;product&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;product&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;&lt;?php echo $_item-&gt;getProductUrl() ?&gt;&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;&lt;?php echo $_item-&gt;getProductUrl() ?&gt;&quot;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;title=&quot;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&quot; class=&quot;product- image&quot;&gt;&lt;img<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;title=&quot;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&quot; class=&quot;product- image&quot;&gt;&lt;img<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src=&quot;&lt;?php echo $this-&gt;helper( &#039;catalog/image&#039; )-&gt;init($_item, &#039;thumbnail&#039; )-&gt;resize(75) ?&gt;&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; src=&quot;&lt;?php echo $this-&gt;helper( &#039;catalog/image&#039; )-&gt;init($_item, &#039;thumbnail&#039; )-&gt;resize(75) ?&gt;&quot;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=&quot;75&quot; height=&quot;75&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width=&quot;75&quot; height=&quot;75&quot;<br />
Deleted: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt=&quot;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&quot;/&gt; &lt;/a&gt;</span> Added: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alt=&quot;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&quot;/&gt; &lt;/a&gt;</span></span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;product- details&quot;&gt;<br /> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;product- details&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;product- name&quot;&gt;&lt;a<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;p class=&quot;product- name&quot;&gt;&lt;a<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; href=&quot;&lt;?php echo $_item-&gt;getProductUrl() ?&gt;&quot;&gt;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&lt;/a&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; href=&quot;&lt;?php echo $_item-&gt;getProductUrl() ?&gt;&quot;&gt;&lt;?php echo $this-&gt;escapeHtml( $_item-&gt;getName()) ?&gt;&lt;/a&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/p&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php echo $this-&gt;getPriceHtml($_item, true, &#039;-related&#039;) ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php echo $this-&gt;getPriceHtml($_item, true, &#039;-related&#039;) ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if ($this-&gt;helper( &#039;wishlist&#039; )-&gt;isAllow()) : ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php if ($this-&gt;helper( &#039;wishlist&#039; )-&gt;isAllow()) : ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;&lt;?php echo $this-&gt;getAddToWishlistUrl($_item) ?&gt;&quot;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;&lt;?php echo $this-&gt;getAddToWishlistUrl($_item) ?&gt;&quot;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;class=&quot; link-wishlist&quot; &gt;&lt;?php echo $this-&gt;__(&#039;Add to Wishlist&#039;) ?&gt;&lt;/a&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;class=&quot; link-wishlist&quot; &gt;&lt;?php echo $this-&gt;__(&#039;Add to Wishlist&#039;) ?&gt;&lt;/a&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endif; ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/li&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endforeach ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endforeach ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endforeach; ?&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?php endforeach; ?&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ol&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;/ol&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;script type=&quot;text/ javascript&quot; &gt;decorateList( &#039;block-related&#039;, &#039;none-recursive&#039; )&lt;/script&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &lt;script type=&quot;text/ javascript&quot; &gt;decorateList( &#039;block-related&#039;, &#039;none-recursive&#039; )&lt;/script&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;/div&gt;<br />Unchanged: &nbsp; &nbsp; &lt;/div&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;script type=&quot;text/ javascript&quot;&gt;<br />Unchanged: &nbsp; &nbsp; &lt;script type=&quot;text/ javascript&quot;&gt;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; //&lt;![CDATA[<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; //&lt;![CDATA[<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Event.observe(elem, &#039;click&#039;, addRelatedToProduct)<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Event.observe(elem, &#039;click&#039;, addRelatedToProduct)<br />
Deleted: &nbsp; &nbsp; &nbsp; &nbsp; });</span> Added: &nbsp; &nbsp; &nbsp; &nbsp; });</span></span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; var relatedProductsCheckFlag = false;<br /> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; var relatedProductsCheckFlag = false;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; function selectAllRelated(txt) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; function selectAllRelated(txt) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (relatedProductsCheckFlag == false) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (relatedProductsCheckFlag == false) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.checked = true;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.checked = true;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; relatedProductsCheckFlag = true;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; relatedProductsCheckFlag = true;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txt.innerHTML = &quot;&lt;?php echo $this-&gt;__( &#039;unselect all&#039;) ?&gt;&quot;;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txt.innerHTML = &quot;&lt;?php echo $this-&gt;__( &#039;unselect all&#039;) ?&gt;&quot;;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $$(&#039;.related- checkbox&#039; ).each(function (elem) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.checked = false;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elem.checked = false;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; relatedProductsCheckFlag = false;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; relatedProductsCheckFlag = false;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txt.innerHTML = &quot;&lt;?php echo $this-&gt;__( &#039;select all&#039;) ?&gt;&quot;;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; txt.innerHTML = &quot;&lt;?php echo $this-&gt;__( &#039;select all&#039;) ?&gt;&quot;;<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addRelatedToProduct();<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addRelatedToProduct();<br />
Deleted: &nbsp; &nbsp; &nbsp; &nbsp; }</span> Added: &nbsp; &nbsp; &nbsp; &nbsp; }</span></span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; function addRelatedToProduct() {<br /> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&nbsp; &nbsp; &nbsp; &nbsp; function addRelatedToProduct() {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var checkboxes = $$(&#039;.related- checkbox&#039;);<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var checkboxes = $$(&#039;.related- checkbox&#039;);<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var values = [];<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var values = [];<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i = 0; i &lt; checkboxes.length; i++) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i = 0; i &lt; checkboxes.length; i++) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (checkboxes[i].checked) values.push(checkboxes[i].value);<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (checkboxes[i].checked) values.push(checkboxes[i].value);<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($(&#039;related- products-field&#039;)) {<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($(&#039;related- products-field&#039;)) {<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#039;related- products-field&#039;).value = values.join(&#039; ,&#039;);<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(&#039;related- products-field&#039;).value = values.join(&#039; ,&#039;);<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; }<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; }<br />
Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; //]]&gt;<br />Unchanged: &nbsp; &nbsp; &nbsp; &nbsp; //]]&gt;<br />
Unchanged: &nbsp; &nbsp; &lt;/script&gt;<br />Unchanged: &nbsp; &nbsp; &lt;/script&gt;<br />
Unchanged: &lt;/div&gt;<br />Unchanged: &lt;/div&gt;<br />
Deleted: &lt;?php //if ($this-&gt;getItems( )-&gt;getSize()): ?&gt;</span> Added: &lt;?php //if ($this-&gt;getItems( )-&gt;getSize()): ?&gt;</span></span>
Unchanged: </p>Unchanged: </p>
Unchanged: <p>Unchanged: <p>
Deleted: <span style="font-family:courier new,courier,monospace">&lt;?php //endif ?&gt;</span> Added: <span style="font-size:11px"><span style="font-family:courier new,courier,monospace">&lt;?php //endif ?&gt;</span></span>
Unchanged: </p>Unchanged: </p>

Note: Spaces may be added to comparison text to allow better line wrapping.

No comments yet.

Leave a Reply