[Typo3-shop] price calculations.

Franz Holzinger franz at fholzinger.com
Tue May 10 19:39:57 CEST 2005


Hello Marc,

>>You can use the accessory function from tt_products 2.0.2 by Jens 
>>Schmietendorf. There you can make a second price for the accessory to your 
>>handy. The accessory is the contract.
> 
> The contract is actualy a whole database table with all sorts of contracts 
> titles and prices and every contract must reduce the base price of a mobile 
> phone (or 'handy') by a different amount. So Vodafone 100 min a month for 1 
> year deduces the price of the Samsung D500 by 200 euro's and T-Mobile 150 
> min a month for one year deduces the price of the phone by 175 euro's and so 
> on. (just examples)
So the question is:
If one contract causes always the same price reduction, then it would be 
easy. You could sell it as a product with a negative price.

But it would be more complicated, if one contract reduces the phone 
price by different amounts depending on the phone.

Answer this question before I continue.


>>You can use the bill or delivery creation for this. Then open the bill 
>>file, print it, sign it and send it.
> 
> In The Netherlands we have 5 companies with who you can sign a contract and 
> so depending on the company the layout of this 'bill' must be changed. 
> T-Mobile contracts require a t-mobile logo above the contract and Vodafone 
> contracts require a vodafone logo (and if the keep bothering me with extra 
> requirements maybe even some extra fields that need to be fild out by the 
> customer).
That is no problem because you can use different templates. At the 
moment only one template will be used for the shop. This can be split 
for the bill and delivery in the program code. But how does this work?
What happens if someone buys a handy from Vodofone and one with a 
T-Mobile contract?
I would say, that you create 1 shop for each provider. For each provider 
you have an own articles folder. You have to enter the same data if each 
provider sells the same mobile.

But maybe the tt_products price calculation should get extended a bit.

pricecalc {
   variant = table  /* The prices are calculated using a database table */
   table = {
      name = contracts_table /* This is the name of the table with the 
prices for contracts */
      id = id_field /* The identifier id field from the contracts table */
      }
   10.prod.1 = 4.99  // Where there is a product with a price 4.99 this 
will cost 4.99 for contract No. 1
   10.prod.2 = 8.99  // costs 8.99 for vendor No. 2 (id_field)
   10.prod.5 = 19.99
   20.prod.1 = 6.99  // Where one products from the article folder costs 
6.99 ...
   20.prod.2 = 13.98
   20.prod.5 = 29.99
}

So this has to be coded. But only the price calculation itself will get 
changed. And the prices are only entered into one article folder. The 
corrections are made in TypoScript for each vendor. This saves some 
work, because only the prices of the mobiles are compared which are 
mostly the same.

>>>I thought it was but the documentation is, or a little too little (not 
> 
> So... you think it still is possible for me to use tt_products to get the 
> job done? Remember I have only been using Typo for half a year now, but I am 
> fairly accustomed to php and programming principles in general (via courses 
> in Java). The problem is that I am not familier with the Typo3 API and I 
> have just begon to explore it.

Yes, I think only small changes to the tt_products extension will be 
necessary. Only the price calculation needs an adoption.



Franz



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