1
幫助請在checkbout時獲取magento屬性。我有'only_registered'屬性。我試圖通過此代碼獲取屬性:簽出時獲取magento屬性的問題
$cart = Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
foreach ($cart as $_item){
$_product = Mage::getModel('catalog/product')->load($_item->getProduct());
$registeredonly = $_product->getRegisteredOnly();
}
但此代碼生成magento錯誤。
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1";i:1;s:4723:"#0 /work/www/topps.loc/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
Tnx,Nasaralla! –
很酷,如果它的工作,請給一個投票;):) – Nasaralla
我沒有足夠的聲譽) –