[TYPO3-shop] Direct Cost as third shown price

Alexander master_nhg at mail.ru
Thu May 31 16:49:33 CEST 2007


MARCUS!!!!!
you're saved my life)))

THANKS!!!!!

Solution is works!


Alex


Marcus Schwemer пишет:
> Hi Alexander, hi Franz,
> 
> here is the code, that I modified / added to use ###DIRECTCOST### as a
> third price.
> 
> The line numbers are based on the 2.5.2 alpha.
> 
> File "tt_products/static/old_style/setup.txt":
> 
> "directcost" added to 
> - conf.tt_products.ALL.requiredFields and 
> - conf.tt_products.articles.ALL.requiredFields
> 
> - Changed file "tt_products/model/class.tx_ttproducts_article.php"
>                 Line 70: directcost add to $requiredFields
>                 Line 139: "directcost" added to $fieldArray['number']
> 
> - Changed file "tt_products/model/class.tx_ttproducts_product.php"
>                 Line 79: directcost add to $requiredFields
> 
> - Changed file "tt_products/model/class.tx_ttproducts_article_base.php"
>                 after line 179 new marker added ###DIRECTCOST###
> 
>                 $directcost =
> $this->pibase->price->printPrice($this->pibase->price->priceFormat($this->pibase->price->getPrice($row['directcost'],1
> $row['tax'],$this->conf['TAXincluded']), $taxInclExcl));
>                 $markerArray['###DIRECTCOST###'] = $directcost;
> 
> Hope that helps.
> 
> Greets,
> Marcus
> 
> Alexander wrote:
> 
>> It was too fast. After i tried this hack it starts working but it
>> shows only "0", not my price in Direct Cost field
> 
>  
>>
>> Alexander:
>>> Thanks :)
>>>
>>>
>>> Franz Holzinger пишет:
>>>> Hello Alex,
>>>>
>>>>> Franz Holzinger пишет:
>>>>>> Hello Alexander,
>>>>>>
>>>>>>>>> I need to do something. I need to show 3 prices of my products.
>>>>>>>>> I'm using 3 fields - price, price2 and Direct cost. So, I can
>>>>>>>>> modify my template to show price and price2 but Direct cost.
>>>>>>>>> How can i made it?
>>>>>>>>>
>>>>>> For Direct cost you have the marker
>>>>>> ###PRODUCT_DIRECTCOST###
>>>>>>
>>>>>> - Franz
>>>>>>
>>>>> Seems like this marker doesn't work. I tried some variations of
>>>>> this but nothing happens.
>>>> Unfortunately this is missing in the code.
>>>>
>>>> It should be treated like the price:
>>>> Direct cost: ###DIRECTCOST_TAX###
>>>>
>>>> add the following lines to getItemMarkerArray in
>>>> tt_products/model/class.tx_ttproducts_article_base.php
>>>>
>>>> $markerArray['###DIRECTCOST_TAX###'] =
>>>>
> $this->pibase->price->printPrice($this->pibase->price->priceFormat($this->pibase->price->getPrice($row['directcost'],1
> $row['tax'],$this->conf['TAXincluded'])));
>>>> $markerArray['###DIRECTCOST_NO_TAX###'] =
>>>>
> $this->pibase->price->printPrice($this->pibase->price->priceFormat($this->pibase->price->getPrice($row['directcost'],0
> $row['tax'],$this->conf['TAXincluded'])));
>>>>
>>>>
>>>> - Franz
> 


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