Share » Forums » Developer » Datatype to handle product options

Datatype to handle product options

Datatype to handle product options

Monday 01 December 2003 2:00:10 pm - 34 replies

Author Message

Paul Forsyth

Monday 01 December 2003 2:22:19 pm

We should be publishing a few shop contributions on the pubsvn site later this week - possibly next week.

One will be the Worldpay connector that we've mentioned previously (try searching) but had to postpone countless times, sorry. V soon now.

Another will be a 'category' datatype. Rudimentary to begin with but soon to be expanding into an admin management tool.

paul

Alex Jones

Monday 01 December 2003 2:23:34 pm

I agree wholeheartedly Eirik.

At this point I am unable to use the shopping cart as I need the ability to display/store multiple products and variants of a product on a single node. The commerce capabilities of eZ publish aren't as flexibile as the content capabilities sadly. It is great if you are selling CDs, but not great if you are selling a product that offers the customer a choice of options.

But I have a feeling that this wouldn't be an easy change as it would require a major change in how data is stored within the cart.

Someone please correct me if I am wrong.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Monday 01 December 2003 2:24:52 pm

Paul, what would the Category datatype do?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Monday 01 December 2003 2:48:23 pm

We need to look this product problem soon with an upcoming project. We need multi-colour products to be handled properly otherwise the clients will be a little frustrated. But im afraid i dont know enough of the ins-and-outs to say more yet.

The category datatype is a quick workaround to allow us to edit categories per object. Before we used an enum datatype to define categories but soon realised that if wanted to make changes (edits/additions/deletions) we would need to republish every product.

This datatype is a little like the keyword datatype. It has its own table and objects can add and remove categories from a single text box: eg

object 1 => "nature, work, miscellaneous"

which you can edit. The code will add and remove appropiately.

The next stage is to throw in a management screen to show the clients how many products are in each categroy, allow name changing of a category in a simple way. Another table might be required to make this change simple.

Hope this gives you an idea.

Paul

Eirik Alfstad Johansen

Monday 01 December 2003 10:41:19 pm

Wouldn't it be possible to expand the selection datatype into a product option datatype? The differences, as far as I can understand, would be that the product option datatype would be an information collector. It would also need a new field for each option where one could specify how this option would affect the product price if selected (+/- a number or a percentage).

I realize that this would be far from ideal as there would be no easy way to, for instance, remove a specific product option from all products, but it's far better than no product options.

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 02 December 2003 12:32:30 am

Possibly. One our options was to consider the object relation list and have some smart way of relating the objects easily. This would require a special function to choose possible related objects and present them to the user when they are constructing the product.

In this way you could edit your paint pot, and the function would inform you of the colours available for it that you can select.

What do you think?

paul

Eirik Alfstad Johansen

Tuesday 02 December 2003 12:49:50 am

Hi Paul,

That's sounds good, but would it be able to handle the rabate function I'm mentioning. I belive that allowing each option to affect the price by adding or substracting a percentage or a fixed price to the product price is a very important feature of selecting a product option. But how would we know which attribute in the product option class is the one holding information about the rabate?

Would a possible solution be to have a rabate datatype which a rabate field in the product option class was built upon?

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 02 December 2003 1:19:45 am

There are shop views for discounting:

kernel/shop/

----------discountruleedit.php
----------discountgroup.php
----------discountgroupmembershipview.php
----------discountruleedit.php

I wonder if these can be used in a way with the related object list to include rebates and discounts.

As for putting it into its own datatype, that may be good. I think the discount rules incorporate some kind of management - after all they are views. So, for the admin you could set it up to view which products are discounted and by how much. Most products wont be discounted of course (unless you have a general sale on) so the micro-management shouldn't be too hard.

Again, this is hypothetical as i can't test at the moment. But it should be possible.

paul

Alex Jones

Tuesday 02 December 2003 6:35:40 am

This is a great thread so far. The discussion of price changes within the datatype are very important. These can become quite complex as there will be times when a customer may be charged additional shipping for an oversized object - for example a poster that has regular shipping, but if the customer wants it framed they would be charged additional shipping to account for it being so bulky and fragile. Add to that the possibility that you have different materials for the frame which impact the price...

I truly think this is an important step for eZ publish and I am more than happy to help where I can, though I don't have near the expertise on the back-end as Paul and others do.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Sandra Parente

Wednesday 03 December 2003 12:30:23 am

The category datatype is an important improvement, but I would like to point out an everyday problem which I always face.
Suppose you have a company producing footwear or underwear or even computers.
They want to use eZ publish 3 because they need a complete content management system with e-commerce engine inside, but they sell their products to resellers, not to end users.
They want to receive orders from their resellers through their portal, but when they create the product they must be able to manage different variations (sizes, colors, etc.), and let the resellers order inside the same product different variations in different quantities; for instance:

Product n. 00514......Price: 12,00 Eur

Colors:....Black....White.....Red.....Brown
Quantity:...5 .......4...........3..........6

The shopping cart will display:

Total items............Total Cost
......18..................216,00 Eur

I think that in order to build effectively an e-commerce solution with these functions you must be able to construct the sequence : categories-->groups-->products

The variations can be inherited by all the products belonging to the same group, for instance:

Category: Footwear
Group: Woman Shoes
Group Variations Type: Sizes........Values: 36; 37; 38; 40; 41

Then you must link to each value a corresponding quantity field in the product class to be displayed in the shopping cart.

What do you think? Is it possible to do this with eZ publish 3?

Sandra Parente
www.netbliss.it

Bård Farstad

Wednesday 03 December 2003 12:54:50 am

I just want to mention that the option datatype (available since 3.0) handles product options. However this is limited to define one option pr class, which means that you need to define the number of options on the class. When you edit the object you can name the option and add n selectable values. You can also specify additional price for the options.

I think we need an option list datatype which would work like the option datatype, but is able to handle n number of option sets - not only one.

--bård

Documentation: http://ez.no/doc

Alex Jones

Wednesday 03 December 2003 7:00:27 am

Bård, that would be a great start. I believe it would address a lot of the key problems I face. Specifically I need the ability to associate different attributes to an item including, but not limited to:
- Different item numbers
- Different pricing (up or down)
- Increased or reduced shipping costs for a particular item number as well as rebates
- Different materials (sometimes several different sets of materials for different parts of the item)
- Ability of the customer to purchase different quantities of the various options

From the other posts on this thread I believe it would meet the needs of a lot of people, making it much easier for us to use the e-commerce capabilities of eZ publish instead of using/hacking a third-party or custom solution.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Mark Kruse

Friday 05 December 2003 4:56:28 am

Hi!

It would also be nice, if you can give an option more than one name. We have the situation, that each productvariation has its own productnumber.
So we need the following:

Option-name 1 option-name 2 Option-value (price)
1111 blue $4

Regards,

Mark

Roy Viggo Pedersen

Friday 05 December 2003 5:06:12 am

Hi,
Just wanted to add a note on the numbers of option fields to describe a product. If these are physical options you only need one field. In fact, more fields will give you trouble, because then you don't necessarily have an unique product.

Lets say you sell T-shirts and have 2 physical options, size and colour. Sizes are small, medium and large for the white T-shirt, and only large for the black. You can't use two option fields, because someone can select small/black, which you don't have. You can't use JavaScript to update them either, because of the users that turns it off.

It's better (and simpler) to use one option field with the combinations. In my experience I've never needed more than one.

What we really need is a stock field for each combination.

Roy

Mark Kruse

Friday 05 December 2003 5:25:47 am

In my case, the user can't select two things. He shall only select one thing (e.g. black), but I need to list the variant and the variant-product-number in the basket and in the ERP-System behind eZ publish. So the variant has two attributes: the product-number and the price.

Alex Jones

Friday 05 December 2003 6:57:36 am

Roy, we need the flexibility to have multiple options. As Mark pointed out, some of us do need the ability to assign a unique product name and a unique product number. In our case we may actually have a few variants that establish which product number/name combination to add to the cart: size, color, shape of the blade (we sell knives) and handle material could all be options for a single product. A single option field doesn't work, causing us to create several sets of fields for each product on our site to cover all of the possible variations. A new datatype that was flexible enough for us to define the amount and purpose/name of the fields would allow us to meet our needs, without limiting anyone selling products vastly different than ours.

Ultimately eZ publish is a framework, so key elements like e-commerce datatypes shouldn't limit the developer to a certain way of selling or organizing their products. A new flexible datatype will ensure eZ publish works for all.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Paul Forsyth

Friday 05 December 2003 7:18:18 am

It seems clear that we need flexibility for this datatype.

I wonder if it is worth writing down detailed examples of the data this datatype would handle, which would allow people like myself and ez to consider how to address the variations between each method.

Could this be done?

paul

Roy Viggo Pedersen

Friday 05 December 2003 7:22:42 am

I agree. In your case you need several options, price modifiers and not a stock field. In others a stock field is mandatory to run the business, because they can't get orders on products not in stock.

Roy

Alex Jones

Friday 05 December 2003 8:36:06 am

Good idea Paul. Here are some real-world examples that we had to work around. I will try to add more as they come up.

[All Examples]
Required unique fields per variant (displayed in shopping cart and e-mail):
- Item Number
- Item Name
- Item Price
- Item Quantity
- Additional/Reduced Shipping

[Example 1]
Options:
- Size: Small or Large
- Color: Red, Blue or Black
- Blade Style: Plain or Combination

Possible Choices: 12

[Example 2]
Options:
- Type: Fixed or Folding
- Blade Type: Plain or Combination
- Size (Folding version only): Small or Large
- Purchase a combination of one Fixed blade version and one Folding version for a discount

Possible Choices: 14

[Example 3]
Options:
- Size: Small or Large
- Color: Black, Silver, Black with Gold, Silver with Gold
- Blade Style: Combination, Tanto, Wharncliffe

Possible Choices: 24

[Example 4] Sharpening Stones
Options:
- Size: 8" or 10"
- Grit: Extra Fine, Fine, Coarse, Extra Coarse (note, each stone has a different grit on each of the two large sides - so a stone may be Extra Fine/Fine, or Fine/Coarse)
- The ability to purchase a set of two stones (Extra Fine/Fine and Fine/Coarse for example)
- The ability to purchase just the base that holds the stones

Possible Choices: 13

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Eirik Alfstad Johansen

Saturday 06 December 2003 6:20:09 am

Hi guys,

I'm glad I started this thread as there seems to be a real need for better way of handling products. Also, it seems that we are in need of something more than a new datatype or two to handle and manage the more complex product options. I&#8217;ve therefore put together a data model to illustrate what I think would be a better way of handling products and their options, and I would love to hear what you guys have to say about it.

I'm also interested in product examples that this model might be incapable of handling.

[EDIT] - Since the forum is unable to handle the formating of the data model, I've put it in a separate text file availble at http://www.netmaking.no/ezp/datamodel.txt

Product
Contains the name and main price of the product. A product can not be ordered.

Productvarianthead
Contains one or more variants of a product. A productvariant can be ordered and should also contain information about quantity and what affect (if any) it has on the product main price.

Option
Options can be color, size, blade style, and so on.

Alternative
Alternatives are the available alternatives for a specific option. These can be green, red and blue for the option color, and plain and combination for the option blade style.

Productalternative
Productalternatives are the alternatives that apply to the product. For instance, if we have the alternatives red, green, small, large, plain and combination, the productalternatives for a t-shirt might be red, green, small and large while the productalternatives for a knife might be plain and combination.

Productvariantline
The productvariantlines specify the options that apply to a specific productvariant. For instance, the productvariantlines associated with a productvarianthead will specify that the productvariant is green and large. Furthermore, the productvariantlines are linkes to productalternatives to make sure that only valid alternatives for a product are selected.

Sincerly,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu