Recreating PHP's time() function in JavaScript

Recreating PHP’s time() function in JavaScript

PHP’s time() function returns the current unix timestamp. JavaScript doesn’t exactly have the same functionality, but it’s pretty close. Put a different and more understandable way, it returns the current time measured in seconds since the Unix Epoch (00:00:00 UTC on 1 January 1970).

JavaScript has a similar way of getting the time but it’s in milliseconds since the Unix Epoch.

Book Review: Magento Site Performance Optimization

Magento Site Performance Optimization by Mathieu Nayrolles is a handy little primer on the basics of optimizing a server for magento. This little gem covers the basics, doesn’t spend a lot of time on fluff, and moves quickly into optimizing MySQL and covers the basics of using two mysql instances (through replication) one for writing…

Zen Coding

When I first heard of Zen Coding on Sitepoint, I figured it was some other gimmick that might save me about 0.01% of my time each year after I spend five or six hours learning the syntax. Zen Coding works by expanding some abbreviations into properly closed html. The syntax is very simple, and can…

Add A Facebook Like Button

A while ago, Facebook created the Facebook Like Button that works by using an iframe of FBML. The Like button allows you to easily get some free social media coverage with consumers. Many websites and blogs are making use of the Facebook Like button and any other ways possible of sharing on social media networks…

How to Tell What Version of Magento

The easiest way of telling what version of Magento you are running is by viewing file app/Mage.php and looking for a function called getVersionInfo(). The function should look something like the following and be fairly self explanatory to most developers. public static function getVersionInfo() { return array( ‘major’ => ‘1’, ‘minor’ => ‘5’, ‘revision’ =>…

Magento An Introduction

What is Magento? Magento is an open source eCommerce platform with two versions: Magento Community Editon, and Magento Enterprise Edition. Magento is developed by Magento Inc and is built upon PHP, and the Zend Framework. The Magento Community Edition uses the Open Software License (OSL) v3.0 which is sufficient for most online stores. Why use…

How to Add CSS & JavaScript to a Magento CMS Page

Magento is an insanely flexible system that has a lot of potential, but of course with this flexibility comes a lot of learning.

Adding a JavaScript file and a CSS file to a specific CMS page isn’t very difficult. We should always consider adding the JavaScript file or CSS file to the theme if we’re going to use it on more than one specific page.…