-
OpenCart: display stock levels in storefront, as numbers or colour icons
As I mentioned here, a military, police and adventure gear store has hired me to set up their online presence and an e-commerce platform for them (not 100% ready yet, but soon!). I had a tough time finding the adequate solution for their needs, because even though OsCommerce is the typical script used by similar stores in the country, I agree with critics regarding its security issues, complex code architecture and too long delays when releasing updates. So I tested other scripts (Zen Cart, Magento, Prestashop, etc.) but definetly, the one which gave me the best overall impression is OpenCart: fast, simple yet powerful and highly customizable, and above all, very well rated by its reviewers. So that was my choice for the project.Two weeks ago, I had no idea OpenCart existed; but today I am pleased to post my first humble contribution as new OpenCart’er: a tutorial on how to customise storefront appearance!
-
AJAX add content to favourites script
It has been a while since I last wrote a post but, as I said, I’d be back again! Not that I have much free time, but I’ll keep posting stuff whenever I’m inspired and have the time to do so
Today’s post is a response to deepali’s comment here. There are lots of ways to achieve the result, and this is just my approach to the issue. The following script allows users to favourite/unfavourite posts, pictures, etc. with AJAX, PHP and MySQL, without reloading the whole page. A clear example of that is Youtube.com, where users can add videos to their favourites with just one mouse click and without reloading the whole content of the page.
-
Performing MySQL queries with the help of AJAX
Back to AJAX! This tutorial is a reply to a question posted in Experts Exchange, and therefore it has a very specific scope. However, taking into consideration it may prove to be useful to many, I decide to share it with you all.What this tutorial explains is how to perform asynchronously MySQL actions with AJAX, using GET variables and an external PHP page. It may sound super-complex, but it is not. As usual, I provide the full code of the script and a working demo which you can see here.
-
Saving multiple selections from drop down list to database
This post will teach you how to process and store multiple selections from a form element into a MySQL database, using PHP. In order to understand how it works, you will need basic knowledge of PHP arrays, because they’re necessary for achieving the results.If you still don’t know what arrays are and how do they work, read Tizag’s array tutorial first.
-
Custom data in EventList frontend event submission form
This is (a quickly written and) the last planned post of the EventList 1.0RC Component for Joomla 1.5 customization series, and in response to Junkah’s request. It explains how to add custom fields in the event submission form; the example below is a text field where the number of available places can be specified. The example only covers the process of saving the submitted number in the database, so that it can be kept for future reference. If you wish to prevent further registration of guests once the number has been reached, then you will have to write some extra code for that purpose, but as I said this is beyond the scope of this post.My apologies for not having all the free time I’d like to, for adding new contents more often and for writing with more details. Back to university, it’s all about priorities. It will be like this for some months, but I will do my best to keep up the knowledge sharing!
-
Checking availability of user name with AJAX

Lately I’ve been writing quite much about AJAX, but it is so useful that I’m sure it is of everyone’s interest!
In this post I will show you – as the post title says – an example script of AJAXed registration form, without recurring to AJAX frameworks (there are already many tutorials about this topic in relation with them). The example omits the synchronous part of the registration and focuses on the user name, which we want to asynchronously check. It doesn’t sound so weird if I say it in other words: check on the fly if the user name the person is typing already exists in the database or not, and take actions depending on whether it does or not (for instance, only allow form submission if name is available).
This is the basis for other types of effects like for instance searching contents and dynamically returning result suggestions, or checking if a specific word exists in the database, etc. but as I mentioned, here the intention is to use it on a registration form.
-
Submit forms with POST method using AJAX
AJAX (Asynchronous JavaScript And XML) is a keystone of Web 2.0 and is very useful in many aspects, because it offers the possibility to change the structure of the page (DOM). For instance, it makes possible sending a form in a website without having to reload the whole page (’asynchronously‘ is the magic word here). The data submitted is processed and may be saved in a database just like classic forms do, but the user can continue browsing during the process.AJAX forms are a must-have for any AJAXed website. They can be used for many, many purposes: for checking whether a username already exists in the database; for seamlessly sending registrations, feedback or comments; or even for creating a shoutbox or chat script.
Read the rest of this entry » -
Retrieving custom data into EventList
This is the second part of the post Adding custom fields to EventList, where I explained how custom data fields can be added to EventList Joomla Component by Schlu. In this post I will cover how to take full advantage from those custom fields by making EventList RC1.0 for Joomla 1.5 retrieve the information submitted through them.As I mentioned in the first part, EventList does not allow (yet) a user-friendly system for adding custom fields, therefore there’s no user-friendly system either to retrieve custom data into EventList. Some modifications to the core files of the component are required for this purpose. The good news is, that it is not as complicate as it might seem at first.
-
Automatically query MySQL and output results with AJAX
This is an extension of the post Refreshing DIV content with AJAX. I recommend you read it at first because you will understand better what the script below is about.What this script does is the following: without having to press any refresh button, and not even reloading the whole page (but a DIV), it retrieves every X seconds the specified data from a MySQL database and displays in the DIV the refreshed contents of it. In other words, it queries the database regularly and updates the output. Read the rest of this entry »
-
Populating a dynamic drop down menu from a MySQL database
This PHP code snippet retrieves the data in a specific column of each row in a MySQL table. The retrieved data is echoed to the DOM and displayed as options of a drop down menu. The options of the drop down menu are dynamic, as they will change automatically every time the information in the database is modified.


