我启用了客人结账但结账后我弹出一条消息,说明我的购物车是空的! :-(产品允许客户购买,我已经检查过了。我无法在prestach的代码中找到负责清空我的购物车的地方。我用JQuery和AJAX来解决这个问题,因为消息没有页面重新加载如何使用firebug或其他调试工具检查购物车对象的实际情况?
我创建了记录器功能,我试图找出购物车何时变空但突然发生。
SharedPreferences
当我将第一个产品添加到购物车时,我会得到以下输出:
controllers\front\OrderOpcController.php
class OrderOpcControllerCore extends ParentOrderController
{
[...]
public function init()
{
parent::init();
[...]
LoggerClass::MyLogger($this->context->cart, __LINE__);
[...]
但是在积极的客人结账后,我收到消息说我的购物车是空的,输出也是空车
Cart Object
(
[id] => 1872
[id_shop_group] => 1
[id_shop] => 1
[id_address_delivery] => 0
[id_address_invoice] => 0
[id_currency] => 1
[id_customer] => 0
[id_guest] => 5446
[id_lang] => 7
[recyclable] => 0
[gift] => 0
[gift_message] =>
[mobile_theme] => 0
[date_add] => 2016-02-06 00:18:59
[secure_key] =>
[id_carrier] => 0
[date_upd] => 2016-02-06 00:19:00
[checkedTos] =>
[pictures] =>
[textFields] =>
[delivery_option] =>
[allow_seperated_package] => 0
[_products:protected] => Array
(
[0] => Array
(
[id_product_attribute] => 31
[id_product] => 22
[cart_quantity] => 1
[id_shop] => 1
[...]
Cart Object
(
[id] =>
[id_shop_group] => 1
[id_shop] => 1
[id_address_delivery] => 0
[id_address_invoice] => 0
[id_currency] => 1
[id_customer] =>
[id_guest] => 0
[id_lang] => 7
[recyclable] => 0
[gift] => 0
[gift_message] =>
[mobile_theme] =>
[date_add] =>
[secure_key] =>
[id_carrier] => 0
[date_upd] =>
[checkedTos] =>
[pictures] =>
[textFields] =>
[delivery_option] =>
[allow_seperated_package] =>
[_products:protected] =>
按钮不会消失,但会显示消息SAVE
。