Skip to content

Ansyori's Blog Posts

Magento: Load Customer Data by Email

this how i did it, load customer array data by email $email = “[email protected]”; $customer = Mage::getModel(“customer/customer”); $customer->setWebsiteId(Mage::app()->getWebsite()->getId()); $customer->loadByEmail($email); /*—print the object array–*/ print_r($customer->getData());

Leave a Comment

jQuery:Animated Scroll Back to Top

this example of jQuery snippet for animated scroll-up <a href=”#”>Back to Top</a> <script> $(document).ready(function(){ $(‘#do-nothing’).click(function(e) { $(‘body,html’).animate({“scrollTop”:0},’slow’); }); }); </script>

Leave a Comment

jQuery: Prevent Href/Hyperlink

This snippet will prevent the default behaviour of a hyperlink <a href=”#”>Go </a> <script> $(document).ready(function(){ $(‘#do-nothing’).click(function(e) { e.preventDefault(); }); }); </script>

Leave a Comment

Magento: Change Currency Thousand Separator from Comma to Dot

for example change indonesian locale currecy format edit file: lib/Zend/Locale/Data/id.xml <currencyFormats> <currencyFormatLength> <currencyFormat> <pattern>¤#.##0,00</pattern> </currencyFormat> </currencyFormatLength> </currencyFormats> Change to <currencyFormats> <currencyFormatLength> <currencyFormat> <pattern>¤#,##0.00</pattern> </currencyFormat> </currencyFormatLength>…

2 Comments

How to Speed up Magento

edit your http://yourmagentourl/.httaccess file ############################################ ## enable apache served files compression ## http://developer.yahoo.com/performance/rules.html#gzip # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems… BrowserMatch…

Leave a Comment

second post

This is my second post…try posting from my android 6 inch phone…haha.. and  I’m surprise wordpress admin already support resposive layout design….haha ….    

Leave a Comment