Saving product with data like this: $ids = array(‘1′,’1′,’2’); $_product->setWebsiteIds($ids); makes error : “SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry …”. To avoid this error,…
$corehelper = Mage::helper(‘core’); $cheapestrate = 0; if($_product->isSaleable()) { $_product = Mage::getModel(‘catalog/product’)->load($_product->getId()); $quote = Mage::getModel(‘sales/quote’); $quote->getShippingAddress()->setCountryId(‘PL’); $addToCartInfo = (array) $_product->getAddToCartInfo(); $request = new Varien_Object($addToCartInfo); if ($_product->getStockItem())…
1. chmod -R 777 lib/PEAR 2. ./pear mage-setup 3. ./pear upgrade -f magento-core/Mage_All_Latest-stable 4. chmod 550 ./mage 5. ./mage mage-setup . 6. If You have…
Simple Configurable Products module from Organic internet is one of better solution for display configurable products. However, Magento 1.7.0.2 not supported it completely. To make…
Sometimes, if you use custom collection with join tables: protected function _prepareCollection() { $collection = Mage::getModel(‘sales/order_item’)->getCollection() ; $collection->getSelect()->join( array(‘sfo’=>’sales_flat_order’),’sfo.entity_id=main_table.order_id’,array(‘sfo.increment_id’, ‘sfo.status’, ‘sfo.shipping_description’, ‘sfo.base_shipping_amount’)); $collection->getSelect()->join( array(‘e’=>’catalog_product_entity’), ‘main_table.sku…
Add in your module config.xml file, in tag: default custom custom default default default Create new catalogs, such like as: app/design/adminhtml/default/custom app/design/adminhtml/default/custom/template app/design/adminhtml/default/custom/layout And do…
Warning: simplexml_load_string(): Entity: line 29: parser error : Opening and ending tag mismatch: customer_account line 15 and layout Add : Mage::log(print_r($filename, true)); in file: app\code\core\Mage\Core\Model\Layout\Update.php…
SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code=’admin’; UPDATE `core_store_group` SET group_id = 0 WHERE name=’Default’; UPDATE `core_website` SET website_id = 0 WHERE…
[root@root]$ pwd /home/mcomerce [root@root]$ ls access-logs etc perl5 public_ftp ssl www cpbackup-exclude.conf mail php.ini public_html tmp [root@root]$ cd public_html/shell [root@root]$ ls abstract.php compiler.php indexer.php log.php…
Location Line Event cron.php 44 default app/code/core/Mage/Adminhtml/Controller/Action.php 151 adminhtml_controller_action_predispatch_start app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php 61 adminhtml_block_html_before app/code/core/Mage/Adminhtml/Block/Report/Grid.php 186 adminhtml_widget_grid_filter_collection app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php 76 adminhtml_cms_page_edit_tab_meta_prepare_form app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php 125 adminhtml_cms_page_edit_tab_design_prepare_form app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php 117 adminhtml_cms_page_edit_tab_main_prepare_form app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php…