[TYPO3-commerce] Attributes...

Morten Olesen mo at idefa.dk
Thu Mar 18 08:42:06 CET 2010


Hi Jörg,

Jörg Leshel wrote:
> Hi list,
> 
> I am sitting on a shop with Products with different Attributes which
> should get rendered differently and trigger different behaviour.
> Just wanted to let you take part on some issues I am having at the
> moment with the commerce shop and perhaps getting some clarification.
> 
> 1. As far As I can see from the Code the Attributes part of the shop
> is not completely finished for now. Is that right?
> 

It is finished and being used by quite a few people. That said it is 
also in the process of being refactored to lower it's time complexity.

> 2. There is in class.tx_commerce_pibase.php the part to build the dropdowns.
> The author left as comment "correct like this?"
> I think it's not correct like this.
> 

It's a very old comment that related to a specific part of the code at 
the time.

> For me the behaviour of the dropdowns
> (plugin.tx_commerce_pi1.allArticles=0) should be implemented on server
> side like Dmitry Pikhno did it with jQuery in his extension
> fe_attr_commerce on clientside. So thats chained dropdowns. An
> additional field  in the  product or category / attributes assignment
> is needed to specify the chain for a product or category.
> 

Then feel free to do so in an extension, it's the philosophy that 
commerce should be the foundation on witch you build the specialized 
shop - it's should not force a specific javascript library.

For instance in our shops we typically automatically load the selected 
article via ajax to make sure that any article specific images, test and 
price is rendered correctly - which in turn also makes sure that the 
drop downs again only contain valid choices. This works for us, but wont 
be ideal for everyone.

> If it's not done with chained dropdowns the behaviour shouldn't be
> like its at the moment either. If in the second  (or n) dropdown a
> value is selected which doesn't match an articel regarding the the
> selected value of the first dropdown in the moment the first article
> (off all) is getting chosen as selected and the not possible value of
> the first dropdown is still selected.
> I think in this case the first article which matches the latest
> selected attribute should be marked as selected. That way the
> dropdowns wouldn't display information for the costumer which aren't
> correct -> selected article is first of all articles for the product
> -> shown selection in dropdown shows a combination which does not
> exist.
> 
> 3. I have attributes which have an impact on the price of an article
> and I have atributes which haven't.
> For each possible combination of attributes which have an impact to
> the price I have an article. Creating articles for all possible
> combination of attributes also for those which don't affect the price
> would be way to much effort for maintaining the shop. It's a definte
> no go.
> 

Maybe you should rethink the way you use attributes then, we've only had 
one case where it didn't work; a customer tried to create articles for a 
product that had 3 colours ( each with 50 choices ) and material ( 3 
choices ) which naturally wont work. Since the theese were hand crafted 
the customer would not need stock so it was created using a meta atricle 
that would carry the choices as part of it's meta descriptor.

Of course this solution has the down side that every combination has to 
have the same price, unlike the std. shop solution where you can specify 
the price of each article.


> For the price impacting attributes everything is fine. I am using
> fe_attr_commerce for frontend rendering. Changing values in my chained
> dropdowns results always in displaying a valid article with valid
> select values in the dropdowns.
> 
> Solution for the not price impacting attributes would be to  assign
> those attributes not to the article but to the product with allow
> multiple.

No, just no.

Imagine a shop that sells instruction videos - all of their videos comes 
as one of the following;

- VHS
- DVD
- CD
- Blueray

with your solution I would only have one description, and would not be 
able to put up a little warning next to say blueray, reminding people 
that this needs a special player - or having per article images showing 
off the image quality of the product.

> In my case some of those attributes should get rendered as radio
> selection and some as dropdown.
> 
> As far as I can see it's not implemented or intended to have radio
> buttons or dropdowns on the product layer you can just assing a fix
> attibute without values. Is that correct?
> 

Of course it is not implemented there since it's intended for articles.

> I for myself will adept the code for this project but perhaps it's
> worth thinking of such constellations in further development of the
> shop.
> In my case it makes no sense for my costumer letting him create dozens
> of articles for a hundres of products just to transport a certain
> information which is same for all articles.
> I know you have intended the option "Generate article from" in
> attribute assignment but it's not implemented yet, right?
> Also for "Generate article from" it would make more sense for to
> generate "virtual" articles rather than generate real articles which
> eventually have to get maintained as well.
> 
> 4. I have attributes which impact the price in the way that if they
> are chosen the price of an article is getting higher. It's something
> like a service fee (additional value). This fee is same for all
> products. Creating articles with different prices can't be it again. I
> think the best way would be to integrate a possibility to skale the
> price in the attributes either. (if attribute selected new price =
> price + x).
> 
> 5. I need the possibilty to let an costumer leave a notice regarding
> an certain attribute (depending if he has chosen an option or not).
> This Information should be deposited  in an order (per article)
> Could be considered in future development?
> 

Theese all seems to be specifc to your needs, I suggest you implement 
them as extensions to the shop.

> 
> Anyway enough for now. I have to make this work now ;-)
> 
> regards
> 
> Joerg


More information about the TYPO3-project-commerce mailing list