Magento 何时会考虑放弃购物车?那个时间限制在哪里设置的? [英] When does Magento consider a cart to be abandoned? Where's that time limit set?

查看:25
本文介绍了Magento 何时会考虑放弃购物车?那个时间限制在哪里设置的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果保留默认设置,Magento 1.7 在什么情况下会考虑放弃购物车?做出这个决定的代码在哪里?

If left to default settings, what circumstances would have to occur for Magento 1.7 to consider a cart abandoned? Where is the code that makes this determination located?

我知道这可能在引用中的某个地方设置,但我终生找不到它.

I know that this is probably set somewhere in the quote, but I can't find it for the life of me.

我已经用谷歌搜索过,但就像很多 Magento 问题一样,我两手空空.谢谢!

I've done some Googling, but like so many Magento questions I'm left empty handed. Thanks!

推荐答案

您可能知道该设置位于此处:

As you probably know the setting is located here:

管理 => 系统 => 配置 => 销售 => 结帐 => 报价有效期(天)

这会将设置添加到带有路径的数据库(core_config_data 表)中:

This will add the setting to the database (core_config_data table) with path:

结帐/购物车/delete_quote_after

此路径在代码中使用:

app/code/core/Mage/Sales/Model/Observer.php 第 54 行

所以当有人向购物车添加东西时,它会被更新.当客户登录并且他的购物车在那里时,它将被更新.当购物车在过去 30 天内未更新时.它将被删除.

So when someone is adding something to a cart it will be updated. When a customer logs in and his cart is there it will be updated. When a cart is not updated for the last 30 days. It will be removed.

额外信息:

如果你想知道这段代码是什么时候使用的,它是由 magento 的 cronjob 使用的.

In case you wonder when this code is used, It is used by the cronjob of magento.

检查:App/code/core/Mage/Sales/etc/config.xml 1732 行

<crontab>
    <jobs>
        <sales_clean_quotes>
            <schedule>
                <cron_expr>0 0 * * *</cron_expr>
            </schedule>
            <run>
                <model>sales/observer::cleanExpiredQuotes</model>
            </run>
        </sales_clean_quotes>

希望这会有所帮助.

这篇关于Magento 何时会考虑放弃购物车?那个时间限制在哪里设置的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆