[TYPO3-commerce] Basket template not customizable - possible bug?

Ian Solo ian at webian.it
Mon Oct 29 06:06:19 CET 2007


Hi Franz,
yes, it works now, sorry, my mistake.

I was tricked because I was setting a mini-basket (overview) with this TS:
---------------------------------------------------------
lib.minibasket = COA
lib.minibasket {
   20 < plugin.tx_commerce_pi2
   20.defaultCode >
   20.defaultCode = QUICKVIEW
}
---------------------------------------------------------

With this TS, the pi2 correctly uses the default "shoppingcart.tpl" 
template.

While, if I want to use a custom template, I got to add also this line 
in that TS:
---------------------------------------------------------
   20.templateFile = {$templatePathCommerce}basket.tmpl
---------------------------------------------------------

So the correct TS for a mini-basket is:
---------------------------------------------------------
lib.minibasket = COA
lib.minibasket {
   20 < plugin.tx_commerce_pi2
   20.defaultCode >
   20.defaultCode = QUICKVIEW
   20.templateFile = {$templatePathCommerce}basket.tmpl
}
---------------------------------------------------------

I'll add it to the wiki.
Thanks!ian

Franz Koch wrote:
> Hi,
> 
>> I was trying to customize the basket template.
>> So I added these lines in my TS template:
>> -----------------------------------------------
>> plugin.tx_commerce_pi2 {
>>     templateFile = {$templatePathCommerce}basket.tmpl
>> }
>> -----------------------------------------------
>>
>> This should use my file "basket.tmpl" instead of the Commerce file 
>> "shoppingcart.tpl".
>>
>> But it's not working. Commerce still uses "shoppingcart.tpl".
>>
>> In Typoscript object browser it's correct:
>> plugin.tx_commerce_pi2.templateFile = 
>> fileadmin/templates/commerce/basket.tmpl
>>
>> If I use this "technique" for product listing it works and I can use 
>> my custom template.
>>
>> Is this a bug? Or am I making something wrong?
> 
> I can't tell if it's working with the current SVN, but in my version it 
> works like expected. Just have a look in 'class.tx_commerce_pi2.php' and 
> have a look what might be wrong.
> 
> -- 
> Greetings,
> Franz


More information about the TYPO3-project-commerce mailing list