Home

Saturday, March 29, 2014

Imported products do not show up in frontend

First check this option in Product option
  • are enabled
  • have stock quantity > 0
  • have stock availability = In Stock
  • have visibility = "Catalog, search"
  • have the correct website assigned to them
  • have the right tax class associated with them

Solution 1 : Manage Products > Select All, then select the action Update Attributes and add the products to the correct website(s).
Left side Display this information :  
Products Information
Attributes
Inventory
Websites <-- select this option

And select Main website under the Add Product To Websites 
 

Don't forget to rebuild the indexes.


Solution 2 :
 
<?php
require_once('app/Mage.php');
umask(0);
Mage::app('admin');

$website_ids = array(1, 2); // I'm assuming your website IDs are 1 and 2.

$product_collection = Mage::getModel('catalog/product')->getCollection();
foreach($product_collection as $product) {
    $product->setWebsiteIds($website_ids);
    $product->save();
}
?>
 

Tuesday, March 25, 2014

Format price in the current locale and currency

Unformatted and formatted:
 
$price = $product->getPrice();
$formatted = Mage::helper('core')->currency($price, true, false);

Magento – current store currency details – currency code, currency symbol, currency name

To get the current store currency details eg. Currency code, currency symbol, currency name use the following code.
This code returns the current store currency details.

// store currency code eg. USD, INR
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();

// store currency symbol eg. $ 
$currency_symbol = Mage::app()->getLocale()->currency( $currency_code )->getSymbol();

// store currency name eg. Indian Rupee
$currency_name = Mage::app()->getLocale()->currency( $currency_code )->getName();
This code returns the current store currency details. - See more at: http://www.techdilate.com/code/magento-current-store-currency-details-currency-code-currency-symbol-currency-name/#sthash.hwglkaVw.dpuf
This code returns the current store currency details. - See more at: http://www.techdilate.com/code/magento-current-store-currency-details-currency-code-currency-symbol-currency-name/#sthash.hwglkaVw.dpuf
This code returns the current store currency details. - See more at: http://www.techdilate.com/code/magento-current-store-currency-details-currency-code-currency-symbol-currency-name/#sthash.hwglkaVw.dpuf
rathoddhirendra.blogspot.com-Google pagerank and Worth