[Typo3-shop] New Features prepared for implementation

Bernie Pfister bernie at pixelsound.com
Wed May 18 08:44:25 CEST 2005


Hi Franz,

thanks for your respond and taking your time to look at my changes.

Please look at http://www.pixelsound.com/generic/index.php?id=209 for an
example (it's my test shop and not fully bug free).

>> Parent/Child Products:
>> Products can be children of another product. Children get displayed in 
>> a table inside the parent product. Eg.
>>
>> ---------------------------------------
>> | Item No  |  Size  |  Price  |  Qty  |
>> ---------------------------------------
>> |   123    |  60cm  |  $44.00 | _____ |
>> ---------------------------------------
>> |   124    |  80cm  |  $65.00 | _____ |
>> ---------------------------------------
>> |   125    | 100cm  |  $88.00 | _____ |
>> ---------------------------------------
>>
>> This allows you to have different prices for different sizes, color 
>> etc. Customers can order different quantities of different variations. 
>> Reseller price and discount still works.
>> ChildDisplay can be turned on or off via constants.
>>
> This solution does not fit into the current version of tt_products.
> For price calculation the following scheme has been introduced:
> pricecalc {
>   10.prod.1 = 4.99
>   10.prod.2 = 8.99
>   10.prod.5 = 19.99
>   20.prod.1 = 6.99
>   20.prod.2 = 13.98
>   20.prod.5 = 29.99
> }
> The second numbers here mean pieces. But this price calculation should 
> be extended to use the weight, color and in your case the size. An 
> additional parameter can give the information which attribute will be 
> taken. I think, that price calculations should be done using TScript and 
> /or functions using the parameters an article can have.

I don't think our two solutions exclude each other.

I am still confident that my solution is a good way (Not to sound too
cocky :-). But with Parents/Children you can define a product as a
variant of a parent with the whole flexibility of a full feature product
(eg give it a second price, discount, different colours, attributes,
weight, making it bulkily, or "requiring special preparation" etc). You
can define it to be an accessory to a parent product. All this without
having to extend the tt_products table.

- Parent Product (item no 123A)
      - Child Product (item no 123B)
      - Child Product (item no 123C)
      - Child Product (item no 123D)


On the 15/5/ Volker wrote: "The maybe most important thing is, that a
shop need products and articles:

The product: Levis 501
The article: Levis 501 green 32/32 "

I think my solution is somewhere towards this.


> 
>> *****
>> Automatic template selection for column display:
>> When defined 2 or more columns for list display, then the template 
>> gets switched automatically.
> 
> 
> What do you mean by switching a template?
If displayBasketColumns = 0 or 1, then the standard
###ITEM_LIST_TEMPLATE### is used (1 column list).

If displayBasketColumns = 2 or more, then
###ITEM_LIST_TEMPLATE_COLUMNS### is used instead.

> 
>> *****
>> Max Height for Images:
>> Now not only the maximum width for images can be defined, but also the 
>> maximum height (List, Single, Basket)
> 
> image IMAGE cObject
> So this cannot be changed in tt_products, or am I wrong?
I meant that I added the maxH property for the Single and the Basket
display. It works great.



> 
>> *****
>> CSS template:
>> The template is currently a mix between the old fashioned way and a 
>> new way using CSS (I only use CSS).
> 
> 
> I do not know enough about CSS. What is the improvement you want to make 
> here?
The intention of CSS is to move as much code as possible from the HTML
into the CSS file (eg colors, fonts, etc). And you want to have
semantically correct code: eg use [h1] - [h6] tags, differentiate
between table header cells [th] and normal cells [td]s or have
accessible navigations with unordered lists.

One of the first things I always do is get rid of the
"bgcolor="###GC2###" and the font tags (I just clear the wrap1 and wrap2
in TypoScript).

Further I change the headers from [td bgcolor="###GC2###] to [th] or
[h3]. I can then define CSS style definitions for the different tags.

This way you get better accessibility for screen readers and search
engines.

It also reduces the HTML code dramatically:

Instead of writing
[td background=#CCCCCC][font face="verdana" size=2 color=black] This is
my Header[/font][/td]

I just write
[th]This is my Header[/th]

I understand that making the templates xhtml compatible would break with
the backwards compatibility. But maybe we can supply an alternative
template? I am happy to suggest one. Or maybe the typo3 accessibility
group has one already.



> 
>> *****
>> Other new features include:
>> - select boxes for color, size and accessory only get displayed if the 
>> field is filled in
> 
> 
> This is already in tt_products 2.0.2. What is your improvement?
Yes, I know, but the select box gets displayed even if there are no
sizes filled in. I added an if statement. Therefore I needed to include
the [select]..[/select] tags in the php code, rather than in the
Template code.

> 
>> - added more constants including Reseller Group ID, 
> 
> use discountGroupName instead of this
But isn't the Discount different to the Reseller (which takes price2)?
Plus the reseller group was hard coded to be Group ID 2. Now it can be
changed via TypoScript constant.

> 
>> Price Number for Resellers
>> and Order By (but I soon found out that the list gets too long)
> 
> already in version 2.0.2
Yes I agree, we don't need to make that configurable, since we only have
2 prices anyway.


> 
>> - company name and URL are inserted into Finalizing templates from 
>> TypoScript
> 
> 
> So you have made Template Markers for the company name and the URLs? 
> That would be a good step forwards.
Yes, ###COMPANY_NAME### and ###SHOP_DOMAIN###. I used it for the
tracking URL and the greetings at the bottom (eg "Kind Regards,
YourCompany"). Unfortunately it doesn't work on the plain text emails yet.

> 
>> - Fixed: Displaying quantities of products that are in basket didn't 
>> work on my installation. I don't know if this was a general problem, 
>> but now it works for me.
> 
> 
> What did you change here?
I changed the line 1650:
$markerArray["###FIELD_QTY###"]=
$this->basketExt[$row["uid"]][$row["size"].";".$row["color"].";".$row["accessory"]] 

?
$this->basketExt[$row["uid"]][$row["size"].";".$row["color"].";".$row["accessory"]] 

: "";

to this:
$markerArray["###FIELD_QTY###"]=
$this->basketExt[$row["uid"]][$basketItem['size'].";".$basketItem['color'].";".$basketItem['accessory']] 

?
$this->basketExt[$row["uid"]][$basketItem['size'].";".$basketItem['color'].";".$basketItem['accessory']] 

: "";

This helped. (sorry for the line breaks)




> 
>> - The display of the child table is hardcoded in the class file. 
>> Should be implemented with templates
> 
> What do you mean with child table?
The list of all children of a product. See
http://www.pixelsound.com/generic/index.php?id=209


> 
>> - Accessories and Memo: I couldn't figure out how this should work
> 
> Accessory: An addition to an article, e.g. the frame for selling paintings
> Memo: a logged in front end user can remember some items
Yes I know, I created a memo page and defined the Memo page ID in
TypoScript, but it keeps telling me the search was empty. I guess I make
a mistake somewhere.

> 
>> - Template needs to be cleaned up
> 
> 
> Yes, the current template needs improvement.
I am happy to improve the templates towards CSS. Once I'm finished I
will suggest one.


Viele Grüsse aus Down Under eines Fernweh-Schweizers...
Bernie





More information about the TYPO3-project-tt-products mailing list