[Typo3-shop] New Features prepared for implementation
Franz Holzinger
franz at fholzinger.com
Fri May 20 23:51:28 CEST 2005
Hello Bernie,
> 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)
>
Where the child products inherits all attributes from the parent which
are set zero (0) in the client.
This is fine. You can create a table named
tt_products_nn_products_products.
uid int(11) UNSIGNED Non auto_increment
pid int(11) UNSIGNED Non 0
tstamp int(11) UNSIGNED Non 0
crdate int(11) UNSIGNED Non 0
cruser_id int(11) UNSIGNED Non 0
uid_local blob BINARY Non
uid_foreign blob BINARY Non
is_reference tinyint(3) UNSIGNED Non 0
sorting int(10) UNSIGNED Non 0
> 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.
This is a good think of course. But now the commerce extension is being
developed. If articles will come into tt_products then the same table as
in commerce should be used for that (tx_commerce_articles).
>>> *****
>>> 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.
>
That is ok. But you must create an additional configurable TScript to
activate that. As default this should be deactivated to remain compatible.
>>> *****
>>> 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.
So you are making this configurable:
listImage < .image
listImage.file.maxW = {$plugin.tt_products.maxW_list}
listImage.file.maxH = {$plugin.tt_products.maxH_list}
listImage.imageLinkWrap >
ok
>>> *****
>>> 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.
It is good to have a CSS template as an alternative. But read also in
this list. There has already someone wanted to do this job. So ask him
first if he will finish this job soon.
This is only a change in the template and not in the code, isn't it?
>>> *****
>>> 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.
This is good.
>>> - 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.
I did never use this. When you make the reseller group for price2
configurable, then please not by the ID number but by the name of the
group as done with discountGroupName. Make is available as
resellerGroupName.
>>> - 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)
So somehow the $row from a call like
$markerArray = $this->getItemMarkerArray
($row,$catTitle,$this->config["limitImage"]);
did not contain the data. But lets find a better solution. The parameter
$row must contain $row["color"]. Can it be that this value was NULL and
therefore resulted in an error?
>>> - 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
But this will be a new feature that a product can have children products
which derive from their parent.
>>> - 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.
Maybe someone else can help here.
>>> - 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.
Well talk to the other person who should have done this job already.
Let's collaborate.
> Viele Grüsse aus Down Under eines Fernweh-Schweizers...
Griazi,
Franz
More information about the TYPO3-project-tt-products
mailing list