1
checkbout中にmagento属性を取得するのに役立ちます。私は 'only_registered'属性を持っています。このコードで属性を取得しようとしています:チェックアウト中にマゼンタ属性を取得する際に問題が発生する
$cart = Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
foreach ($cart as $_item){
$_product = Mage::getModel('catalog/product')->load($_item->getProduct());
$registeredonly = $_product->getRegisteredOnly();
}
このコードは、マジェントエラーを生成します。
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
私は十分な評判がありません) –