Setting the Default Currency for a User in
$currentCurrency = $this->getCurrentCurrencyCode();
if(!isset($currentCurrency)) $currentCurrency = ‘NA’;
$currencies = array(“GBP”,”USD”,”EUR”);
if(isset($_GET['cy']))
Setting the Default Currency for a User in
$currentCurrency = $this->getCurrentCurrencyCode();
if(!isset($currentCurrency)) $currentCurrency = ‘NA’;
$currencies = array(“GBP”,”USD”,”EUR”);
if(isset($_GET['cy']))
I’m writing an script for exporting Magento products to an XML file. In my PHP script, I have decided to create an class for holding the data of Magento product. In that class which defines all attributes from a product like the editing product screen from back-end
Convert Magento Database to Innodb
ALTER TABLE `admin_assert` ENGINE=InnoDB;
ALTER TABLE `admin_role` ENGINE=InnoDB;
ALTER TABLE `admin_rule` ENGINE=InnoDB;
ALTER TABLE `admin_user` ENGINE=InnoDB;
ALTER TABLE `adminnotification_inbox` ENGINE=InnoDB;
ALTER TABLE `api_assert` ENGINE=InnoDB;
ALTER TABLE `api_role` ENGINE=InnoDB;
ALTER TABLE `api_rule` ENGINE=InnoDB;
ALTER TABLE `api_user` ENGINE=InnoDB;
ALTER TABLE `catalog_category_entity` ENGINE=InnoDB;
ALTER TABLE `catalog_category_entity_datetime` ENGINE=InnoDB;
ALTER TABLE `catalog_category_entity_decimal` ENGINE=InnoDB;
ALTER TABLE `catalog_category_entity_int` ENGINE=InnoDB;
Get CMS Page ID
$pageId = Mage::getBlockSingleton(‘cms/page’)->getPage()->getIdentifier();
How to get product attributes?
<?php echo $_product->getResource()->getAttribute(‘attribute name’)->getFrontend()->getValue($_product) ?>
How to show breadcrumbs in magento?
<?php echo $this->getLayout()->getBlock(“breadcrumbs”)->toHtml(); ?>
How to show Static Blocks?
If you are dealing with magento category i am very sure that you’ll face this problem .Magento category fetching is not an issue its a child play but sorting thse categories is little tricky , so here the is SQL part by which you can sort the categories in alphabetical order
SET @i=0; SET @j=0; DROP TABLE IF EXISTS AAA_NEW_POSITION; CREATE TABLE AAA_NEW_POSITION SELECT e.entity_id AS 'entity_id',