Sorting Categories and Price Issues
- By Mitchell Harper
- Published 07/25/2007
- StoreSuite Updates , StoreSuite Features
-
Rating:




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.

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.
Register for Your Beta Invite
Be the first to test drive StoreSuite. Fill out the form below to receive an exclusive beta invite when StoreSuite's ready to test.
Spread The Word
Comments
Comment #1 (Posted by John)
Rating:








Something I see missing, is the option to sort by newest arrivals. This is a pretty standard sorting option I think would be wise to include by default.
Also make sure you get the European VAT right or else the cart will be unusable in the EU if too much focus is spent on US or AU.
Thanks.
[From Mitch: Hi John. You know, I actually thought the same thing about sorting by new products first last night, so I'll be adding that today. Currency is fully configurable from the control panel, and I'm just using USD as a demo currency.]
Also make sure you get the European VAT right or else the cart will be unusable in the EU if too much focus is spent on US or AU.
Thanks.
[From Mitch: Hi John. You know, I actually thought the same thing about sorting by new products first last night, so I'll be adding that today. Currency is fully configurable from the control panel, and I'm just using USD as a demo currency.]
Comment #2 (Posted by Ryc Brownrigg)
Rating:








This looks good. Is there any way to add a ranking based on previous purchases? For example if you know the customer buys a certain brand, if there are multiple items that would be the same in a sort the customers brand could be elevated to the top? A valid recommendation is a powerful tool in ecommerce.
Ryc
[From Mitch: Hi again Ryc. We're going to build in quite a lot of recommendation tools and widgets and we're going to make massive use of personalization data. More on this as we start development on these ideas in a few weeks.]
Ryc
[From Mitch: Hi again Ryc. We're going to build in quite a lot of recommendation tools and widgets and we're going to make massive use of personalization data. More on this as we start development on these ideas in a few weeks.]
Comment #3 (Posted by JC)
Rating:








It's probably safe to provide this link (I'm not affiliated in any way with this company). Take a look at http://www.bvsoftware.com/Solutions/Shopping-Cart-Software/BV-Commerce-5/Technical-Specifications.aspx as an example of features which would be nice to have in your application.
Comment #4 (Posted by Jon Peters)
Rating:








Creating a static price variable that includes tax can be problematic because the tax may or may not apply to the user depending on their location. i.e. Some states/countries may have a tax levied and some may not, so the user may or may not be applicable to tax.
Additionally, most e-commerce stores have multiple pricing levels for wholesalers, etc., where this could also become problematic, as you get multiple modifiers on one price point.
For this reason I would avoid setting a static database variable and instead do a mysql join query based on the price variables and assign a current price variable for sorting.
Additionally, most e-commerce stores have multiple pricing levels for wholesalers, etc., where this could also become problematic, as you get multiple modifiers on one price point.
For this reason I would avoid setting a static database variable and instead do a mysql join query based on the price variables and assign a current price variable for sorting.
Comment #5 (Posted by dheat)
Rating:








Will you have the facility for users to change to different currencies?
