如何访问Magento订单的“ visible_on_front”属性?

| 如何访问Magento订单的“ visible_on_front \”属性? 我已经尝试了以下位:
$order = $this->getOrder();
$order->setStatus(\'processing\');
$order->setData(\'visible_on_front\', 1);
要么
$history = $this->getOrder()->addStatusHistoryComment(\'msg\');
$history->setStatus(\'processing\');
$history->setData(\'state\', \'visible\');
要么
$history = $this->getOrder()->addStatusHistoryComment(\'msg\');
$history->setStatus(\'processing\');
$history->setData(\'visible_on_front\', 1);
提前致谢。     
已邀请:
尝试此操作,看看更改数据后它是否已更改
$order = $this->getOrder();
$order->setStatus(\'processing\');
$order->setVisibleOnFront(1);
print_r($order->getData());
    
我刚刚有这个需要,我这样解决了:
$order->addStatusHistoryComment(<your comment>,<your status>)
      ->setIsVisibleOnFront(1);
当然,您将要使用的订单加载到$ order中。 使用这些,您将在订单详细信息下的用户帐户页面中看到注释。     

要回复问题请先登录注册