This post will describe how to create a JavaScript countdown timer using a reusable class. The jQuery library is used in this example because of its popularity, however it is very easy to amend the class to just use pure JavaScript.
To start with, two of the very basic components needed to implement the timer ...
When displaying data within the grid UI component in the Magento 2 admin, there might be some data that is stored by Magento as a decimal and contains trailing zeros. You might want to remove decimals from grid UI component columns to display your data more neatly.
A classic example of this occurring is within ...
Creating a fully functional grid using the data from your database table in the Magento admin is no easy task. In fact, it can become more complicated when you need to join two tables using a UI grid component in Magento 2.
If you added a grid component using the step by step guide, you’ve ...
Magento has a history of not being a good content manager, and therefore many merchants look to WordPress to hold blog posts and other CMS pages. Considering the merchant still wants to use Magento has the ecommerce system, this leads to developers looking at integrating WordPress with Magento 2.
Although this might sound like a ...
WordPress allows you to add and modify custom functionality via the use of plugins. Plugins are used to prevent developers who modifying core code, which may be lost when updating WordPress to a newer version. Note that to create a WordPress plugin requires some experience of the PHP programming language.
To start with, plugins in ...
A common security practice is the moving of the wp-config.php WordPress database configuration file. Moving wp-config.php from the WordPress root up a directory seems to be the most common approach. However, there are arguments for and against doing this.
Let’s assume that you have a single installation of WordPress located in the following directory.
As ...
After installing WordPress for the first time, you might create a new theme that is a child of the default Twenty Seventeen theme. More than likely, you’ll need to remove default WordPress code from the Twenty Seventeen theme within your child theme.
The most obvious code change involves the removal of Proudly powered by WordPress ...
This article will describe the steps involved in the WordPress application flow. The initialisation steps shown below will show how WordPress is bootstrapped, how a database connection is established, how plugins are loaded and more.
As with many PHP applications, the process starts with the index.php file located in the WordPress document root.
Fortunately we’re ...
It’s now easier to add a checkout step in Magento 2 than it ever was in earlier versions of Magento. Magento 2 has reduced the number of checkout from six to two.
Using a combination of JavaScript, Knockout and layout configuration, developers can add an additional step.
To start with, create and enable a custom ...
This post covers the Reading and Writing section of the Input/Output chapter when studying for the Zend PHP 7 Certification.
PHP contains many functions that help read and write files and file resources. The functions return the read data or FALSE on failure.
The file_get_contents() reads the contents of the file into string.
The file() ...