Solution:
Install magento dull image uploader / No flash image uploader extension (Here). This will help to import images.
That’s all, go to admin panel in Magento admin panel and upload and import product successfully.
echo $qtyStock = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri()); //save requested URL for later redirection if(!Mage::getSingleton('customer/session')->isLoggedIn()) { // if not logged in header("Status: 301"); header('Location: '.$this->getUrl('customer/account/login')) ; // send to the login page exit; }
after
echo $this->getChildHtml('auth-redirect')
define('MAGENTO', realpath(dirname(__FILE__))); require_once MAGENTO . '/app/Mage.php'; Mage::app(); $category = Mage::getModel ( 'catalog/category' ); $tree = $category->getTreeModel (); $tree->load (); $ids = $tree->getCollection ()->getAllIds (); if ($ids) { $file = "var/export/catwithid.csv"; file_put_contents($file,"catId, catName\n"); foreach ( $ids as $id ) { $string = $id . ', ' .$category->load($id)->getName() . "\n"; file_put_contents($file,$string,FILE_APPEND); } }Hit Your browser like www.YourDomain.com/categorywithid.php Thats it. You are done. Get the csv file under "var/export/catwithid.csv".
"sku","qty","is_in_stock"
"prod1","100","1"
define('MAGENTO', realpath(dirname(__FILE__))); require_once MAGENTO . '/app/Mage.php'; umask(0); $count = 0; Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $file = fopen(MAGENTO . '/var/import/updateStockLevels.csv', 'r'); while (($line = fgetcsv($file)) !== FALSE) { if ($count == 0) { foreach ($line as $key=>$value) { $cols[$value] = $key; } } $count++; if ($count == 1) continue; #Convert the lines to cols if ($count > 0) { foreach($cols as $col=>$value) { unset(${$col}); ${$col} = $line[$value]; } } // Check if SKU exists $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku); if ( $product ) { $productId = $product->getId(); $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId); $stockItemId = $stockItem->getId(); $stock = array(); if (!$stockItemId) { $stockItem->setData('product_id', $product->getId()); $stockItem->setData('stock_id', 1); } else { $stock = $stockItem->getData(); } foreach($cols as $col=>$value) { $stock[$col] = $line[$value]; } foreach($stock as $field => $value) { $stockItem->setData($field, $value?$value:0); } $stockItem->save(); unset($stockItem); unset($product); } echo " Stock updated $sku"; } fclose($file);
You can set your template to 1column like this:page/2columns-right.phtml
or use "<remove name="right"/>"page/1column.phtml
After making changes dont forget to refresh the cache. That's it. You are done.page/2columns-right.phtml
Here, You no need to search for any template or layout file. This code will do the trick. After making changes dont forget to refresh the cache. That's it. You are done.
Here, You no need to search for any template or layout file. This code will do the trick. After making changes dont forget to refresh the cache. That's it. You are done.
<?php $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product); ?> <?php if($_compareUrl) : ?> <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li> <?php endif; ?>
If you want to remove callout from left sidebar just comment those lines. Suppose you want to show that callout in your right sidebar just change reference name="left" to reference name="right". Likewise you can do it for right sidebar callout.images/media/col_left_callout.jpg Our customer service is available 24/7. Call us at (555) 555-0123. checkout/cart
for instance, use this code to remove the sidebar cart from the product view page.
//if (null === $parentPath) { // $parentPath = $this->getResource()->getCategoryParentPath($category); //} //elseif ($parentPath == '/') { $parentPath = ''; //}