0

Magento cron 在除一个模块之外的所有模块中为我们的站点运行良好。这个模块是谷歌信任的商店。其他 magento 用户也报告了此问题。

我查看了 cron_schedule 表,并且该模块没有待处理的任务。当我手动将这个模块的 cron 任务插入到 cron_schedule 表中时,这个模块完全做了它应该做的事情。那么,这个 cron 任务的模块可能有什么问题呢?这是config.xml。我想一旦我们解决了这个问题,这个模块就很好了。

<?xml version="1.0"?>
<!--
/**
 * Magento Enterprise Edition
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Magento Enterprise Edition License
 * that is bundled with this package in the file LICENSE_EE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.magentocommerce.com/license/enterprise-edition
 * 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_GoogleTrustedStore
 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://www.magentocommerce.com/license/enterprise-edition
 */
-->
<config>
    <modules>
        <Mage_GoogleTrustedStore>
            <version>1.6.0.0</version>
        </Mage_GoogleTrustedStore>
    </modules>
    <global>
        <helpers>
            <googletrustedstore>
                <class>Mage_GoogleTrustedStore_Helper</class>
            </googletrustedstore>
        </helpers>
        <models>
            <googletrustedstore>
                <class>Mage_GoogleTrustedStore_Model</class>
            </googletrustedstore>
        </models>
        <resources>
            <googletrustedstore_setup>
                <setup>
                    <module>Mage_GoogleTrustedStore</module>
                </setup>
            </googletrustedstore_setup>
        </resources>
        <blocks>
            <googletrustedstore>
                <class>Mage_GoogleTrustedStore_Block</class>
            </googletrustedstore>
        </blocks>
        <googletrustedstore>
            <google_group_email>mage-google-trusted-store-news@googlegroups.com</google_group_email>
            <order_cancellation_reasons>
                <BuyerCanceled>Buyer Canceled</BuyerCanceled>
                <MerchantCanceled>Merchant Canceled</MerchantCanceled>
                <DuplicateInvalid>Duplicate Invalid</DuplicateInvalid>
                <FraudFake>Fraud Fake</FraudFake>
            </order_cancellation_reasons>
            <ftp_host>uploads.google.com</ftp_host>
            <carriers>
                <main>
                    <ups>UPS</ups>
                    <fedex>FedEx</fedex>
                    <usps>USPS</usps>
                </main>
                <other>
                    <dhl>DHL</dhl>
                    <dhlint>DHL</dhlint>
                </other>
            </carriers>
        </googletrustedstore>
    </global>
    <default>
        <google>
            <trustedstore>
                <enabled>1</enabled>
                <default_order_cancellation_reason>BuyerCanceled</default_order_cancellation_reason>
                <estimated_ship_date>3</estimated_ship_date>
            </trustedstore>
        </google>
    </default>
    <frontend>
        <layout>
            <updates>
                <googletrustedstore>
                    <file>googletrustedstore.xml</file>
                </googletrustedstore>
            </updates>
        </layout>
        <events>
            <checkout_multishipping_controller_success_action>
                <observers>
                    <googletrustedstore>
                        <type>model</type>
                        <class>googletrustedstore/observer</class>
                        <method>collectMultishippingOrderIds</method>
                    </googletrustedstore>
                </observers>
            </checkout_multishipping_controller_success_action>
        </events>
    </frontend>
    <adminhtml>
        <translate>
            <modules>
                <Mage_GoogleShopping>
                    <files>
                        <default>Mage_GoogleTrustedStore.csv</default>
                    </files>
                </Mage_GoogleShopping>
            </modules>
        </translate>
        <layout>
            <updates>
                <googletrustedstore>
                    <file>googletrustedstore.xml</file>
                </googletrustedstore>
            </updates>
        </layout>
        <events>
            <sales_order_save_before>
                <observers>
                    <googletrustedstore>
                        <type>model</type>
                        <class>googletrustedstore/observer</class>
                        <method>addCancellationReasonToOrder</method>
                    </googletrustedstore>
                </observers>
            </sales_order_save_before>
            <sales_convert_order_to_quote>
                <observers>
                    <googletrustedstore>
                        <type>model</type>
                        <class>googletrustedstore/observer</class>
                        <method>addCancellationReasonToSession</method>
                    </googletrustedstore>
                </observers>
            </sales_convert_order_to_quote>
            <checkout_submit_all_after>
                <observers>
                    <googletrustedstore>
                        <type>model</type>
                        <class>googletrustedstore/observer</class>
                        <method>collectAdminOrderId</method>
                    </googletrustedstore>
                </observers>
            </checkout_submit_all_after>
            <controller_action_predispatch_adminhtml_sales_order_index>
                <observers>
                    <googletrustedstore>
                        <type>model</type>
                        <class>googletrustedstore/observer</class>
                        <method>addOrderGridBlocksRenderingObserver</method>
                    </googletrustedstore>
                </observers>
            </controller_action_predispatch_adminhtml_sales_order_index>
        </events>
    </adminhtml>
    <crontab>
        <jobs>
            <googletrustedstore_generate_feeds>
                <schedule>
                    <cron_expr>0/20 * * * *</cron_expr>
                </schedule>
                <run>
                    <model>googletrustedstore/feeder::generateFeeds</model>
                </run>
            </googletrustedstore_generate_feeds>
            <googletrustedstore_upload_feeds>
                <schedule>
                    <cron_expr>0 2 * * *</cron_expr>
                </schedule>
                <run>
                    <model>googletrustedstore/feeder::uploadFeeds</model>
                </run>
            </googletrustedstore_upload_feeds>
        </jobs>
    </crontab>
</config>
4

1 回答 1

0

我们修补了 Google Trusted Stores 的社区版版本,并在http://www.dcjcooltools.com/blog/magento-extensions/the-nightmare-that-is-google-trusted-stores-for记录了所需的确切修改-magento/

我们解决的特定问题包括 Cron Job 处理不正确(如果我自己这么说的话,这是一个有趣的小错误),即使上传过程不起作用,Feed 文件也会被删除,最后,托运人名称被设置为 Other 而不是 USPS , 联邦快递等等等。

让我知道我们的解决方案是否适合您!

问候, 埃文

于 2013-09-21T03:57:04.037 回答