Shiny Red Apples

month

October 2005

5 posts

Playing With The Big Boys

Last week was a busy week making final preparations for the presentations in München on Tuesday and Wednesday. With having a booth at the Internet World Messe convention, we also get the opportunity to bring along booth babes so Matthijs will also come along to the event and will be travelling together with me and will be in charge of the booth.

Tomorrow we fly to München and meet up with Henri, Raphael, and Stefan (all German team members) in the evening, and are allowed first to prepare the booth on early Tuesday morning, a few hours before the event officially starts.

Posters for the booth have been made and leaflets are available that outlines the chocolate side of the project.

At the last public meeting in Belgium we handed out t-shirts and this time we’re handing out leaflets - 1,000 to be exact! 8)

Raphael and Stefan have an early start with their presentations, with Raphael being one of the first to give his presentation on the advantages of Open Source based e-commerce solutions over commercial solutions, and Stefan will give his presentation after the coffee break on describing how osCommerce has helped with the success of his e-business ventures.

I’ll be filming the event for a first time and will look at providing a video that can be downloaded. I don’t know when this can be made available due to catching up on work that is put on hold for the week, but will be sure to put something acceptable together within a short period of time.

Matthijs is at this minute finalizing his you’ve recently visited module and will be showcased with the pre MS3 presentation at the booth on Tuesday and Wednesday.

Everything is just about organized with a few last minute items being taken care of in the morning. The feeling is getting more excited and will definitely sky rocket as soon as we’re in the plane and arrive in München.

We’re all looking forward with meeting one another and also looking forward in reporting how the event goes later this week!

Oct 23, 20052 notes
#meetup
New Search Classes

With the template structure implementation now in place, more classes have been introduced to take care of specific tasks. For example, osC_Account now takes care of the account related tasks including logging in and the creation of a user account, osC_AddressBook takes care of the address book related tasks, osC_Product takes care of retrieving all related information to one product, ..

These classes now take care of the heavy duty logic and leave the template page modules contain only the minimum amount of PHP coded needed to form the page properly (mainly while() loops for database result sets).

With these new classes also comes the introduction of a new approach to searching for products and the presentation of the search results, with the new osC_Products and osC_Search classes.

There might be some confusion as to what osC_Product and osC_Products do and may see a name change before MS3 is finalized, however osC_Product takes care of retrieving all information specific to one product (including attributes), and the osC_Products class takes care of retrieving a list of products meeting certain criteria.

For example, the way to retrieve a list of products for a category is now done as:

$osC_Products = new osC_Products($category_id);
$osC_Listing = $osC_Products->execute();

The $osC_Listing variable then holds the database result set, powered ofcourse by our powerful database class, and can be looped through with:

while ($osC_Listing->next()) {
  ...
}

The full potential of the class can be seen with the following example:

$osC_Products = new osC_Products($category_id);
$osC_Products->setManufacturer($manufacturer_id);
$osC_Products->setSortBy($sort, $direction);
$osC_Listing = $osC_Products->execute();

The setManufacturer() call returns all products by the defined manufacturer (and in the defined category passed in the constructor ($category_id)), and the setSortBy() call sets the ordering of the result set.

That is the basics of the osC_Products class and takes care of the minimum amount of work to list products for a certain category.

The new osC_Search class extends on the osC_Products class by allowing the result set to be fine tuned further with the options provided on the advance search page.

The full potential of the osC_Search class can be seen in this example:

$osC_Search = new osC_Search();
$osC_Search->setKeywords($keywords);
$osC_Search->setDateFrom($date_from);
$osC_Search->setDateTo($date_to);
$osC_Search->setPriceFrom($price_from);
$osC_Search->setPriceTo($price_to);
$osC_Search->setCategory($category_id, $recursive);
$osC_Search->setManufacturer($manufacturer_id);
$osC_Search->setSortBy($sort, $direction);
$osC_Listing = $osC_Search->execute();

while ($osC_Listing->next()) {
  ...
}

The wonder behind the osC_Search class is the ability to take advantage of the database features. For the MySQL class it is possible to search with native FULLTEXT functionality. If MySQL > 4.0.1 is used it is also possible to use native boolean features.

That greatly increases the performance when searching is done on a database that contains loads of products.

Here is a peek as to how our template content pages look like with minimum PHP code needed, specifically for the search results page:

<?php echo tep_image(DIR_WS_IMAGES . $osC_Template->getPageImage(), $osC_Template->getPageTitle(), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, 'class="pageIcon"'); ?>

<h1><?php echo $osC_Template->getPageTitle(); ?></h1>

<?php
  $Qlisting = $osC_Search->execute();
  require('includes/modules/product_listing.php');
?>

<div class="submitFormButtons">
  <?php echo '<a href="' . tep_href_link(FILENAME_SEARCH) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?>
</div>

Ok, there’s no secret the formating logic exists in the product_listing.php module file, however that module file is only taking care of the $Qlisting result set and is also shared by the normal product listing view when navigating through the categories.

Where is the rest of the logic? Exclusive sneak peeks to be continued… 8)

Oct 10, 20056 notes
#oscom30
Delivered In 30 Minutes Or Your Money Back!

I just received the final confirmation that everyone had received their osCommerce t-shirts that were sent out after the public meeting in Belgium.

I also received photos of Reza with the osCommerce bear and was told that although she is looking sleepy on the photo, that she found the bear to be great!

I’m glad everyone enjoyed their goods! And thanks to Reza’s parents for sending the photos 8)

Oct 06, 20052 notes
#meetup
My Best Kept Secret To Losing Weight...

.. is to finish off the big entries on your to-do list!

The biggest change to hit MS3 has been completed! The template structure implementation is in!

It was a joy seeing the amount of root files shrink and shrink and shrink from the odd 40 that MS2 had to a maximum of 11 that MS3 will have. That will be cut down to 8 to have:

  • account.php
  • checkout.php
  • download.php
  • index.php
  • info.php
  • products.php
  • redirect.php
  • search.php

Maybe it can be cut down further - that is the joy of it. Simply copy a page module to another group directory, update the links to call the new group file, and thats it! The functionality has been moved to another group with minimal source code changes required.

It could also be moved down to one index.php file, however why mangle the URL up? It certainly doesn’t look nice to call something like

/index.php?module=product_info&products_id=45

it looks much nicer to have

/products.php/45

which can easily be cut down to

/products/45

and even

/products/product_keyword_here

all without using apache rewrite urls, and as explained in earlier blogging entries :-)

Now that this mammoth task is finalized it is easy to merge in the other stuff that have been worked on. To provide an early preview release for testing and preparation purposes (for contribution authors, not for store owners) work on the online installation routine will be done to also get that tested at the same time.

By then the phpDoc API documentation will also be ready, and some KB articles to address the new framework.

So when will MS3 be released? My political answer is (still) aiming to get 2.2 ready in January ;-)

An update to the 2.2 MS2 release is also going to be available in the coming days, and will contain all reported security vulnerabilities and some minor bug fixes. Nothing more as development milestone releases are not maintained. The feedback from the Community Sponsors were positive regarding this update, and further internal testings found some additional minor issues to fix which will be taken care of first.

How can you help in general? Motivate us! We’ve been going through some bad times with some criticism (with some being rightly so) and are in need of TLC to feel loved again :P

Thanks! :D

Oct 05, 20055 notes
#oscom30
select distinct goodies from mysql;

There has recently been a whole bunch of goodies various mysql developers and users have blogged about which I read through Planet MySQL, and thought it would be a nice idea to share these along.

Granted, these are mostly for the newer versions of MySQL (4.1/5.0).

  • DBDesigner4 is now MySQL Workbench
  • Creating users with root privileges, but for limited databases
  • How To Index For Joins
  • MySQL 5.0 Stored Procedures : Getting Started
  • MySQL 5.0 Stored Procedures : Part 2
  • MySQL 5.0 Stored Procedures : Part 3
  • INSERT … ON DUPLICATE KEY UPDATE
  • MySQL 5 Replication
  • MySQL FULLTEXT Indexing and Searching
  • What is the Number Between the Brackets for an Integer Column?
  • MySQ5 and the almighty ARCHIVE Engine
  • Joining Multiple Tables
  • Storing an IP address in a database table

That’s a lot of good reading! But don’t take my wording; read the source, Luke! 8)

Planet MySQL

Oct 04, 20057 notes
#mysql
Next page →
2011 2012
  • January
  • February
  • March
  • April
  • May
  • June
  • July 1
  • August 1
  • September 1
  • October
  • November
  • December
2010 2011 2012
  • January
  • February
  • March 7
  • April 2
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2009 2010 2011
  • January
  • February
  • March
  • April
  • May 1
  • June 1
  • July 2
  • August 3
  • September 1
  • October
  • November 1
  • December 1
2008 2009 2010
  • January
  • February
  • March 4
  • April
  • May
  • June 1
  • July
  • August 2
  • September
  • October
  • November 2
  • December 1
2007 2008 2009
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December
2006 2007 2008
  • January
  • February 3
  • March 2
  • April 1
  • May 1
  • June
  • July 1
  • August 2
  • September 2
  • October
  • November
  • December
2005 2006 2007
  • January 2
  • February 4
  • March 3
  • April 3
  • May 2
  • June
  • July 3
  • August 1
  • September
  • October 1
  • November 3
  • December
2004 2005 2006
  • January 2
  • February 1
  • March 5
  • April 3
  • May 1
  • June 6
  • July 3
  • August 3
  • September 4
  • October 5
  • November 6
  • December 5
2004 2005
  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November 4
  • December