<?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@magentocommerce.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.magentocommerce.com for more information.
 *
 * @category    Mage
 * @package     Mage_GoogleCheckout
 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<config>
    <modules>
        <Mage_GoogleCheckout>
            <version>0.7.4</version>
        </Mage_GoogleCheckout>
    </modules>
    <global>
        <sales>
            <quote>
                <item>
                    <product_attributes>
                        <enable_googlecheckout/>
                    </product_attributes>
                </item>
            </quote>
        </sales>
        <models>
            <googlecheckout>
                <class>Mage_GoogleCheckout_Model</class>
                <resourceModel>googlecheckout_mysql4</resourceModel>
            </googlecheckout>
            <googlecheckout_mysql4>
                <class>Mage_GoogleCheckout_Model_Mysql4</class>
                <entities>
                    <api_debug><table>googlecheckout_api_debug</table></api_debug>
                    <notification><table>googlecheckout_notification</table></notification>
                </entities>
            </googlecheckout_mysql4>
        </models>
        <helpers>
            <googlecheckout>
                <class>Mage_GoogleCheckout_Helper</class>
            </googlecheckout>
        </helpers>
        <resources>
            <googlecheckout_setup>
                <setup>
                    <module>Mage_GoogleCheckout</module>
                    <class>Mage_GoogleCheckout_Model_Mysql4_Setup</class>
                </setup>
            </googlecheckout_setup>
        </resources>
        <blocks>
            <googlecheckout><class>Mage_GoogleCheckout_Block</class></googlecheckout>
        </blocks>
    </global>
<!--
Something like this is to be added to resolve bug #4890
<global>
        <rewrite>
            <googlecheckout>
                <core>
                <from>/^.*?googlecheckout\/api/</from>
                <to>googlecheckout/api</to>
            </googlecheckout>
        </rewrite>
</global>
-->
    <frontend>
        <secure_url>
            <googlecheckout_redirect>/googlecheckout/redirect/</googlecheckout_redirect>
            <googlecheckout_beacon>/googlecheckout/api/beacon/</googlecheckout_beacon>
        </secure_url>
        <translate>
            <modules>
                <Mage_GoogleCheckout>
                    <files>
                        <default>Mage_GoogleCheckout.csv</default>
                    </files>
                </Mage_GoogleCheckout>
            </modules>
        </translate>
        <routers>
            <googlecheckout>
                <use>standard</use>
                <args>
                    <module>Mage_GoogleCheckout</module>
                    <frontName>googlecheckout</frontName>
                </args>
            </googlecheckout>
        </routers>
        <layout>
            <updates>
                <googlecheckout>
                    <file>googlecheckout.xml</file>
                </googlecheckout>
            </updates>
        </layout>
    </frontend>

    <adminhtml>
        <translate>
            <modules>
                <Mage_GoogleCheckout>
                    <files>
                        <default>Mage_GoogleCheckout.csv</default>
                    </files>
                </Mage_GoogleCheckout>
            </modules>
        </translate>
        <events>
            <sales_order_shipment_track_save_after>
                <observers>
                    <googlecheckout>
                        <type>model</type>
                        <class>googlecheckout/observer</class>
                        <method>salesOrderShipmentTrackSaveAfter</method>
                    </googlecheckout>
                </observers>
            </sales_order_shipment_track_save_after>
            <sales_order_shipment_save_after>
                <observers>
                    <googlecheckout>
                        <type>model</type>
                        <class>googlecheckout/observer</class>
                        <method>salesOrderShipmentSaveAfter</method>
                    </googlecheckout>
                </observers>
            </sales_order_shipment_save_after>
        </events>
    </adminhtml>

    <default>
        <carriers>
            <googlecheckout>
                <active>1</active>
                <model>googlecheckout/shipping</model>
            </googlecheckout>
        </carriers>
        <payment>
            <googlecheckout>
                <active>1</active>
                <model>googlecheckout/payment</model>
            </googlecheckout>
        </payment>
        <google>
            <checkout>
                <merchant_id backend_model="adminhtml/system_config_backend_encrypted"/>
                <merchant_key backend_model="adminhtml/system_config_backend_encrypted"/>
                <use_secure_callback_url>0</use_secure_callback_url>
                <disable_default_tax_tables>0</disable_default_tax_tables>
                <hide_cart_contents>1</hide_cart_contents>
                <title>Google Checkout</title>
            </checkout>
            <checkout_shipping_carrier>
                <address_category>COMMERCIAL</address_category>
                <default_price>0</default_price>
                <default_height>10</default_height>
                <default_length>10</default_length>
                <default_width>10</default_width>
            </checkout_shipping_carrier>
            <checkout_shipping_flatrate>
                <sallowspecific_1>0</sallowspecific_1>
                <sallowspecific_2>0</sallowspecific_2>
                <sallowspecific_3>0</sallowspecific_3>
            </checkout_shipping_flatrate>
            <checkout_shipping_virtual>
                <active>1</active>
                <schedule>OPTIMISTIC</schedule>
                <method>email</method>
            </checkout_shipping_virtual>
        </google>
    </default>
</config>
