I had an issue when I was trying to join two tables with one-to-many relationships. If there is a table called STUDENTS SubjectID StudentName ———- ————- 1 Mary 1 John 1 Sam 2 Alaina 2 Edward Result I expected was: SubjectID StudentName ———- ————- 1 Mary, John, Sam 2 Alaina, Edward * Solution: In Full Article…
Magento – Set and unset system messages
You can use this code to clear error message Mage::getSingleton('core/session')->getMessages(true); // The true is for clearing them after loading them You can use the following code show the Magento message //A Success Message Mage::getSingleton('core/session')->addSuccess("Some success message"); //A Error Message Mage::getSingleton('core/session')->addError("Some error message"); //A Info Message (See link below) Mage::getSingleton('core/session')->addNotice("This is just a FYI message…"); //These Full Article…
Error when using REGEXP in mysql
If you face this issue "exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'this version of PCRE is compiled without UTF support at offset 0' from regexp'" It means your web server doesn't support UTF-8. I had the same error after an upgrade from ubuntu 14.04 to 16.04. I'm using Full Article…
CREATING CANADIAN TAX RULES IN MAGENTO
As a business owner and eMerchant operating and selling within Canada, it is important to know what the amount is to charge for sales tax on the goods and services that you offer your customers. This is vital in the online world of eCommerce as the customer base you sell to can also be nationwide. Full Article…
Magento – Get simple product info from configurable product in wishlist page
Here the way to get simple product info from configurable product in wishlist page.
jQuery – Some good practices
1. If you need to add class to the parent of an element has specific. Example: <ul class="parent_element"> <li class="normal_class">First</li> <li class="normal_class child_element_specific_class">Second</li> <li class="normal_class">Third</li> </ul> <ul class="parent_element"> <li class="normal_class">First</li> <li class="normal_class">Second</li> <li class="normal_class">Third</li> </ul> You can do this way to add class to the UL has child with class "child_element_specific_class" jQuery(".parent_element:has(.child_element_specific_class)").addClass("wanted_element"); 2. If Full Article…
Magento – Update admin routers of custom module for patch
I managed to change my custom module to use the Magento new way as recommended with the patch 6788. So I give here as a reference for other. Change to router in the config.xml file: Before: <admin> <routers> <adminhello> <use>admin</use> <args> <module>Pulsestorm_Adminhello</module> <frontName>admin_adminhello</frontName> </args> </adminhello> </routers> </admin> After <admin> <routers> <adminhtml> <args> <modules> <adminhello before="Mage_Adminhtml">Pulsestorm_Adminhello_Adminhtml</adminhello> Full Article…
Magento – Truncate Magento sales_flat_quote* tables
Recently, we have run into a few stores where the sales quote tables have grown beyond all proportion and resulted in the store grinding to a halt. The worst that we have seen so far is a Magento Enterprise installation that had 17 million entries, consuming a huge amount of space and locking dozens of Full Article…
Magento – Access Denied errors after installing SUPEE-6285
After installing the SUPEE-6285 patch on our Magento 1.7.0.2 store the system is showing an "Access Denied" error when attempting to access all custom modules for users who have selective permissions (not all permissions). Screenshot below. ————————————————————————————– Solution: If you use restricted admin accounts, some menus of third party extensions might not work Full Article…
Apache – php files can’t work in SSL mode
When you install SSL, if you face the issue: php files can't work when you enable SSL for your website. This issue doesn't occur in http protocol, it only occurs in https protocol. You can fix this issue by adding this line into your <Directory>…. AddHandler application/x-httpd-php .php Hope it will help you ^^