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();
}
이 코드는 자홍 오류를 생성합니다.
$_product = Mage::getModel('catalog/product')->load($_item->getProduct());
가되어야한다 :
$_product = Mage::getModel('catalog/product')->load($_item->getProductId());
을 그리고 난 당신이 액세스해야하므로 변수 이름이 'only_registered'되었다고 볼
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
나는 충분한 평판이 없습니다) –