0

我需要创建一个链接,将用户的购物车更改为过期的购物车。

这是我尝试过的,但它不起作用

<?php
if (!defined('_PS_ADMIN_DIR_'))
    define('_PS_ADMIN_DIR_', (getcwd().'/../../') );//prima del require_once
require_once(dirname(__FILE__).'/../../config/config.inc.php');

...

$this->context->cookie->id_cart = 6;
$this->context->cart = new Cart(6);
$this->context->cookie->write();
$this->context->cookie->update();
Tools::redirect('index.php?controller=order');
4

1 回答 1

0

怎么样: $this->context->cart->id = 6 ?

于 2013-07-06T17:53:13.273 回答