使用洋红色获取结帐购物车属性



>我成功地获得了所有购物车详细信息(即总项目,购物车中的项目等)。

但我只想要购物车中的特定属性。假设我想获得store_id属性,我该如何实现。

public function info($quoteId, $store = null)
    {
        $quote = $this->_getQuote($quoteId, $store);
        $result_attr = $this->_getAttributes($quote, 'quote');
       //this is giving error
        $result_attr->getAttributeText('store_id');
}

如果你在$quote中获取对象

你可以用下面的代码得到

if($quote )
    $store = $quote->getStoreId();

希望这肯定会对您有所帮助。

相关内容