Most of today was spent implementing sorting into the category and
branding pages. Sorting simply involves a dropdown box placed at the
top of the page. When an option is clicked, the products are sorted, as
shown:
There was a problem with how prices were being stored and calculated in
the database, so I spent a few hours making changes to the products
table schema. Product pricing is calculated based on a few factors,
such as
does the product have a sale price? and
does the price include tax?
So... instead of dynamically calculating the price for each product
using PHP I had to make this calculation as a product is added or
edited in the control panel and create a new price field called
prodcalculatedpricing which already factors in the variables mentioned
above.
I also spent a few hours modifying how product options work. You can't
see them on the front end yet but each product can have options, such
as size, color, etc, as well as a bunch of custom fields that can
contain any data you like (such as an ISBN for a book or a model number
for a TV). These product options can be set as compulsory or mandatory,
so you can make sure your customers choose an option when buying a
product or not.
Of course if you ask 10 different people they will want product options
to work 10 different ways, so I've tried to design product options to
appease as many people as possible. I'll post more on product options
as I move onto developing the product pages next week.
The rest of the week I'll be working on the ability to shop by price
and a few other things. I will of course provide you with updates as I
go.