Zend Framework – Setting the DocType
Specify the DocType $this->doctype(‘XHTML1_STRICT’); XHTML1_STRICT – XHTML 1.0 Strict XHTML1_TRANSITIONAL – XHTML 1.0 Transitional HTML4_STRICT – HTML 4.01 Strict HTML4_Loose – HTML 4.01 Loose HTML5…
Specify the DocType $this->doctype(‘XHTML1_STRICT’); XHTML1_STRICT – XHTML 1.0 Strict XHTML1_TRANSITIONAL – XHTML 1.0 Transitional HTML4_STRICT – HTML 4.01 Strict HTML4_Loose – HTML 4.01 Loose HTML5…
Script to import newsletter subscribers
Javascript get elemens by name: <html> <head> <script type=”text/javascript”> function getInputValues(varName) { varValues = document.getElementsByName(varName); for (var i = 0; i < varValues.length; i++) {…
Javascript redirect to another page window.location = “redirect url”;
Javascript code to be used when you need a confirmation before leaving a page: <script language=”javascript” type=”text/javascript”> window.onbeforeunload = confirmClose; function confirmClose(){ return “Are you…
MySQL command to view all tables from a database: SHOW TABLES;
MySQL command to view databases from server: SHOW DATABASES;
MySQL command to view user privileges: SHOW GRANTS FOR ‘root’@’localhost’;
Convert variable to boolean var booleanValue = Boolean(variableValue); Converting to String var stringValue = String(variableValue); Converting to Number var numberValue = Number(variableValue); Parsing to Number…
Get customer group Id // Check if costomer is logged in if(Mage::getSingleton(‘customer/session’)->isLoggedIn()) { // Get group Id $groupId = Mage::getSingleton(‘customer/session’)->getCustomerGroupId(); } Get group name: $group…