configurableswatches.xml 3.95 KB
Newer Older
John Punzalan's avatar
John Punzalan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     rwd_default
 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<layout version="0.1.0">

    <product_list>
        <reference name="head">
            <action method="addJs" ifconfig="configswatches/general/product_list_price_change">
                <name>varien/product_options.js</name>
            </action>
            <action method="addItem" ifconfig="configswatches/general/product_list_price_change">
                <type>skin_js</type><name>js/configurableswatches/configurable-swatch-prices.js</name>
            </action>
            <action method="addItem"><type>skin_js</type><name>js/configurableswatches/product-media.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/configurableswatches/swatches-list.js</name></action>
        </reference>
        <reference name="product_list.name.after">
            <block type="core/template" name="product_list.swatches" template="configurableswatches/catalog/product/list/swatches.phtml" />
        </reference>
        <reference name="product_list.after">
            <block type="configurableswatches/catalog_media_js_list" name="configurableswatches.media.js.list" />
            <block type="configurableswatches/catalog_product_list_price" name="configurableswatches.price.js.list" />
        </reference>
    </product_list>

    <catalog_category_default>
        <update handle="product_list"/>
    </catalog_category_default>

    <catalog_category_layered>
        <update handle="product_list"/>
    </catalog_category_layered>

    <catalogsearch_result_index>
        <update handle="product_list"/>
    </catalogsearch_result_index>

    <catalogsearch_advanced_result>
        <update handle="product_list"/>
    </catalogsearch_advanced_result>

    <PRODUCT_TYPE_configurable>
        <reference name="head">
            <action method="addItem"><type>skin_js</type><name>js/configurableswatches/product-media.js</name></action>
            <action method="addItem"><type>skin_js</type><name helper="configurableswatches/getSwatchesProductJs"></name></action>
        </reference>
        <reference name="product.info.media">
            <action method="setGalleryFilterHelper"><helper>configurableswatches/productimg</helper></action>
            <action method="setGalleryFilterMethod"><method>filterImageInGallery</method></action>
        </reference>
        <reference name="product.info.media.after">
            <block type="configurableswatches/catalog_media_js_product" name="configurableswatches.media.js.product" />
        </reference>
        <reference name="product.info.options.configurable.renderers">
            <block type="configurableswatches/catalog_product_view_type_configurable_swatches" template="configurableswatches/catalog/product/view/type/options/configurable/swatches.phtml" />
        </reference>
        <reference name="product.info.options.configurable.after">
            <block type="core/template" template="configurableswatches/catalog/product/view/type/configurable/swatch-js.phtml" />
        </reference>
    </PRODUCT_TYPE_configurable>

</layout>