到目前为止,我需要在命令中获取cart_Rule的ID,然后尝试使用
$this->context->cart->getCartRules();
但是我没有得到结果
我设法做到了,如下所示:
$regla = $this->context->cart->getCartRules();//returns an array $codigo = $regla[0]["code"];
使用1.7版