Reputation: 423
{{block type="catalog/product_new" block_id="new.products" template="catalog/product/new.phtml"}}
this the code i added in home page for display new products it show products well but when i chicked for product info page it shows error like with url http://localhost/magento/index.php/samsung.html
There has been an error processing your request
it shows
a:5:{i:0;s:203:"SQLSTATE[42000]: 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:4430:"#0 E:\wamp\www\magento\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 E:\wamp\www\magento\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 E:\wamp\www\magento\lib\Zend\Db\Adapter\Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 E:\wamp\www\magento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `catalog...', Array)
#4 E:\wamp\www\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `catalog...', Array)
#5 E:\wamp\www\magento\lib\Zend\Db\Adapter\Abstract.php(753): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 E:\wamp\www\magento\app\code\core\Mage\Eav\Model\Entity\Abstract.php(943): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 E:\wamp\www\magento\app\code\core\Mage\Catalog\Model\Resource\Abstract.php(698): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Catalog_Model_Category), Object(Mage_Catalog_Model_Category), NULL)
#8 E:\wamp\www\magento\app\code\core\Mage\Core\Model\Abstract.php(225): Mage_Catalog_Model_Resource_Abstract->load(Object(Mage_Catalog_Model_Category), Object(Mage_Catalog_Model_Category), NULL)
#9 E:\wamp\www\magento\app\code\core\Mage\Catalog\Block\Product\List.php(80): Mage_Core_Model_Abstract->load(Object(Mage_Catalog_Model_Category))
#10 E:\wamp\www\magento\app\code\core\Mage\Catalog\Block\Product\List.php(142): Mage_Catalog_Block_Product_List->_getProductCollection()
#11 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(918): Mage_Catalog_Block_Product_List->_beforeToHtml()
#12 E:\wamp\www\magento\app\design\frontend\base\default\template\page\html\header.phtml(149): Mage_Core_Block_Abstract->toHtml()
#13 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(241): include('E:\wamp\www\mag...')
#14 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\base\d...')
#15 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#16 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#17 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#18 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('header', true)
#19 E:\wamp\www\magento\app\design\frontend\base\default\template\page\2columns-right.phtml(42): Mage_Core_Block_Abstract->getChildHtml('header')
#20 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(241): include('E:\wamp\www\mag...')
#21 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(272): Mage_Core_Block_Template->fetchView('frontend\base\d...')
#22 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Template.php(286): Mage_Core_Block_Template->renderView()
#23 E:\wamp\www\magento\app\code\core\Mage\Core\Block\Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#24 E:\wamp\www\magento\app\code\core\Mage\Core\Model\Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#25 E:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(390): Mage_Core_Model_Layout->getOutput()
#26 E:\wamp\www\magento\app\code\core\Mage\Cms\Helper\Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#27 E:\wamp\www\magento\app\code\core\Mage\Cms\Helper\Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#28 E:\wamp\www\magento\app\code\core\Mage\Cms\controllers\IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#29 E:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Cms_IndexController->noRouteAction()
#30 E:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#31 E:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#32 E:\wamp\www\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#33 E:\wamp\www\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#34 E:\wamp\www\magento\index.php(87): Mage::run('', 'store')
#35 {main}";s:3:"url";s:31:"/magento/index.php/samsung.html";s:11:"script_name";s:18:"/magento/index.php";s:4:"skin";s:7:"default";}
Upvotes: 0
Views: 213
Reputation: 7611
Issue was block id block_id="new.products"
block id not a field it should be
name="new.products"
Modify{{block type="catalog/product_new" name="new.products" template="catalog/product/new.phtml"}}
Upvotes: 1