Breaking News
Home / Magento / Magento 1x

Magento 1x

delete duplicate simple product with same attribute from a configurable product in CSV

Import configurable csv to a mysql database table then try to use bellow sql query which give you the duplicate simple product with same attribute values. delete from `table_1` where sku in ( select sku from ( SELECT `sku` FROM `table_1` Group BY `orientatie`,`material`,`papier`,`paginas`,`paper_type_cover`,`veredeling_omslag`,`levertijd`,`aantal` Having COUNT(*) > 1 ) t …

Read More »

Display Position on List page Magento 1x

If you want to display Category product position on list.phtml please add bellow code for test it $catArray = Mage::registry('current_category'); $catId = $catArray['entity_id']; $category = Mage::getModel('catalog/category')->load($catId); $productPositions = Mage::getResourceModel('catalog/category')->getProductsPosition($category); echo $productPositions[$_product->getId()]; Hits: 17

Read More »

How to Filter Products Based on Attribute Value & Attribute set | magento | Magento 1.9 | Codes For Web Developers

You can follow the code : <?php ob_start(); ini_set('max_execution_time', 0); set_time_limit(0); ignore_user_abort(true); require_once '/chroot/home/powerme1/'; Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $_write = Mage::getSingleton('core/resource')->getConnection('core_write'); $_read = Mage::getSingleton('core/resource')->getConnection('core_read'); $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('attribute_set_id',9)->addAttributeToFilter('brand', array('eq' => 1674)); foreach($collection as $_product): $_product = $_product->load($_product->getId()); echo $_product->getSku() . ' >>> ' . $_product->getUpc() .'<br>'; endforeach; echo '<hr />'; $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('attribute_set_id',9)->addAttributeToFilter('brand', array('eq' …

Read More »

Magento 1x: Create a controller & xml layout for the module | Al Mahbub Khan | seller at Fiverr| | Magento 1x - 2x developer

If you don’t know how to create a module then see this link. Create a Folder controllers in inside your module path: app\code\local\Trenza\Orderimage\ . Now create a IndexController.php and add bellow code in here. <?php /* * Copyright (c) 2015 */ class Trenza_Orderimage_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { …

Read More »

Create a new module on magento 1x | How to create a Magento 1.9 Custom Module | Magento 1.9.x: How to create an Extension / Module ? | Al Mahbub Khan | seller at Fiverr| | Magento 1x - 2x developer

Create a magento 1x simple module:  Make sure magento admin panel  system/tools/compilation is disabled. Just need to create a new file on app\etc\modules Trenza_Orderimage.xml <?xml version="1.0"?> <config> <modules> <Trenza_Orderimage> <active>true</active> <codePool>local</codePool> </Trenza_Orderimage> </modules> </config> Here Trenza_Orderimage this is my module identity. Now go to app/code/local/ create a folder Trenza go inside trenza(package …

Read More »