OpenCart – How Arrays are Used
Last Updated on Tuesday, 12 March 2013 07:45 Written by Joe Stenhouse Saturday, 16 March 2013 12:00
This article is for those that are interested in the programming language PHP and how OpenCart makes good use of arrays, one of many different elements in PHP. Since a huge portion of how data is gathered, saved, and iterated in the Opencart MVC has to do with arrays this is what we will be looking at today.
WHAT IS AN ARRAY?
Learn MoreTaking a Deeper Look at OpenCart’s “Cart”
Last Updated on Friday, 21 December 2012 12:00 Written by Joe Stenhouse Friday, 21 December 2012 12:00
Yes that’s correct, you know that it works but do you know how? Most don’t and to be fair, most don’t need to know nor do they want to know. However for those that are learning the basics of how a shopping cart works then this posting is for you. I will reveal to you everything that happens from the point of pressing ADD TO CART, to viewing items that you have added. This passage will be using code taken from the latest Opencart version 1.5.4.1
Phase One (clicking the add to cart button)
Learn MoreHow to Loop Through an Array in Clip-Bucket with {section}{/section}
Last Updated on Wednesday, 19 September 2012 07:18 Written by Richi González Thursday, 27 September 2012 12:00
Hello,
When you dynamically need to output records from a database inside your Clip-Bucket, by this moment, you may have noticed that Clip-Bucket is powered by Smarty template engine, therefore, you cannot use a while() loop, for example, like you would normally do in native PHP. In this article we will review the use of {section}{/section} to loop through a MySQL records array.
Difficulty level: Medium (if you know how to use loops in PHP, you’ll find it easier)
1. Create the query to retrieve records from your database (in this example I’ll use queries for MySQL, but you can use any database)
Learn More
Recent Comments