To help protect our customers from fraud and abuse and to help you establish your trustworthiness to ISPs and email recipients, we do not immediately grant unlimited Amazon SES usage to new users. New users are initially placed in the Amazon SES sandbox. In the sandbox, you have full access to all Amazon SES email-sending Full Article…
Postfix: change sender in sending messages
Postfix: how to change change sender address in sending messages? Here is the answer, it will rewrite old-address to new-address automatically. You can define file to maps old-address to new-address. /etc/postfix/main.cf: smtp_generic_maps = hash:/etc/postfix/generic /etc/postfix/generic: [email protected] [email protected] Don’t forget to postmap /etc/postfix/generic and run postfix reload Upside: You doesn’t need to requeue the message Downside: Full Article…
Minimum number of PHP modules needed to run Magento
The Magento requirements check is a decent script to run to confirm your server meets the requirements (you need to change the opening PHP tag to <?php if your server doesn’t support short open tags), and if you open it is has a list of PHP extensions needed, which it lists as: curl dom gd Full Article…
Magento Fatal error: Class ‘Net_IDNA2’ not found in…..
When you deploy Magento to live server, everything is working fine, except when you save the configuration in back-end the issues occur. If it shows this message “Magento Fatal error: Class ‘Net_IDNA2’ not found in…..” you should not worry about it, because it is not your Magento’s issue, it is the server issue. When you Full Article…
Checking if your data is digit
You can use Javascript to detect the content of the input box is digit or not. Here is the code you can use: if ( (yourcontent+””).match(/^\d+$/) ) { //it’s all digits }
Validate your input, Magento style in front-end
I’m sure most of you will agree that Magento’s front-end validation for form input fields is a nice feature. All it takes is for you to add some CSS classes to the input fields and then upon form submission validation is triggered that outputs, by default, red colored messages that point the possible validation failures Full Article…
Trigger a button click with JavaScript on the Enter key in a text box
Figured this out: <input type=”text” id=”txtSearch” onkeypress=”return searchKeyPress(event);” /> <input type=”button” id=”btnSearch” Value=”Search” onclick=”doSomething();” /> <script> function searchKeyPress(e) { // look for window.event in case event isn’t passed in e = e || window.event; if (e.keyCode == 13) { document.getElementById(‘btnSearch’).click(); return false; } return true; } </script>
Getting selected simple product id in configurable product on client side.
If you need to get id of selected simple product in configurable product on client side you can do it in many different ways. Here is simple function how to achieve that with no code modification, new templates or even modules. Just one Javascript file and layout update. Product.Config.prototype.getIdOfSelectedProduct = function() { var existingProducts = Full Article…
Magento : Get Store Id, website Id, website info
After hours of searching on Google, i find out some ways to get Store and Website info 🙂 Get current store: Mage::app()->getStore(); Get current store Id: Mage::app()->getStore()->getId(); Get current website Id: $storeId = Mage::app()->getStore()->getId(); Mage::getModel(‘core/store’)->load( $storeId )->getWebsiteId(); Get store info by store code: $storeCode = “your_store_code”; Mage::getModel( “core/store” )->load( $storeCode ); Get website info Full Article…
How to remove all the different CSS and JS in skin or js folder by XML
How to remove all the different CSS and JS in skin or js folder? —————————— Here is what you need to do: <reference name=”head”> <!– For a JS in the js folder –> <action method=”removeItem”><type>js</type><name>functions.js</name></action> <!– For a JS in the skin folder –> <action method=”removeItem”><type>skin_js</type><name>functions.js</name></action> <!– For CSS in the skin folder –> <action Full Article…