0

我的 Magento 网上商店有一个大问题。除了下新订单时的最后一步外,它运行良好。特别是如果客户想要订购大量产品。

每个产品都会在结账过程中增加约 5 秒(在客户按下“下订单”按钮之后)。

很多客户一次订购 20 多种产品,所以这对我们来说是个大问题。

该站点托管在 Properhost.net 上。

似乎没有任何帮助,这里有人有某种解决方案吗?

4

1 回答 1

5

this is indeed kind of a solution here, as it involves editing core xml files (it's my understanding there is no way to override those files by a custom module: someone please correct me if I'm wrong), but here it is.
See edit.
Acording to these guys (I haven't try it myself) there are 3 observers that add a lot of execution time in order process. Their solution is to remove/comment those lines:
In app/code/core/Mage/Downloadable/etc/config.xml:

<sales_order_item_save_after>
    <observers>
        <downloadable_observer>
            <class>downloadable/observer</class>
            <method>saveDownloadableOrderItem</method>
        </downloadable_observer>
    </observers>
</sales_order_item_save_after>

And in app/code/core/Mage/Rss/etc/config.xml:

<sales_order_item_save_after>
    <observers>
        <notifystock>
            <class>rss/observer</class>
            <method>salesOrderItemSaveAfterNotifyStock</method>
        </notifystock>
    </observers>
</sales_order_item_save_after>
<sales_order_item_save_after>
    <observers>
        <ordernew>
            <class>rss/observer</class>
            <method>salesOrderItemSaveAfterOrderNew</method>
        </ordernew>
    </observers>
</sales_order_item_save_after>

Maybe you can check if you can go without them and give a try. Remember that at next upgrade those changes will probably be lost.
Hope That Helps
Edit: At inchoo they found a solution to disabled events without editing core files, it won't be difficult to apply it in this case.

于 2011-05-20T17:25:11.660 回答