[Typo3-shop] price calculations.

Marc Hage mrhage at gmail.com
Wed May 11 02:07:11 CEST 2005


Hello Franz,

>> 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.

Its the first one, one contract, eg. Vodafone 100 min a month, would 
always reduce a phone price with a fixed price.

But there is an other problem: a contract can also be sold without a 
phone, and then the amount with what a phone would be reduced would have 
to be processed and displayed as a negative price indicating a so called 
'cash back' offer. This form of contract deal is called 'sim-only' So 
that is why it would seem logical to set a contract as a separate 
product just as a phone would be. So when you combine phone A with 
contract B that would result in a reduced price and if you take just the 
contract you would receive an amount (as a customer that is). Is this an 
option?

In addition to that: how tt_products works is that the dealer calculates 
the desired sell price and inputs that in the price field.
But with this shop the price entered has to be the purchase price for 
the dealer and than the shop has to calculate, via a calculation 
function or script, the amount that will be displayed in the frontend.

>>> 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?

well in Holland people usually have one contract on there name. So if 
for example a father would like to buy a second phone + contract for his 
son or daughter to use he would just have to pay two separate visits to 
the shop. This is actually a situation that rarely happens. The same 
goes for business customers who would like to buy 10 contracts with 10 
phones. They would just have to give the shop a ring or an email because 
this would mean a big deal for the shop owner and he handles that 
personally. But it would be possible for example for a person to buy a 
phone with contract and an extra phone or whatever so the reduction 
should belong to the total amount. This again points somehow to a 
contract being a separate product with a negative selling price.

> 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.

well that would be an option but I thought of it this way:

one subtree for special offers: just phones, phones with contracts, home 
phones (DECT, like Gigasets from Siemens).
one subtree for phones (without contracts).
one subtree for contracts without phones.
one subtree for a contract and a phone.
and maybe a subtree for special contracts (contract for people who 
already have a contract and want to renew their contract and receive a 
discount so basicly just another contract only with different discount 
from new customers.

> 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
> }

I will have to studie this in practice so give me a little time to 
figure your script out. I just implemented a 1.2.7 version without the 
tables for categories option :) so I'm progressing but...
I am working on the Core API document because my understanding of the 
extension extension :) is not up to level with you guys.

on other thing: 5 networks something like 8 contract-types per network 
so one simple selector box is not going to 'cut it'. But this should be 
do-able I think.

Thanks again,

Marc

ps. if you want an example of how this shop is supposed to work:
all in dutch so click on the word 'abbonnenent' with means contract in Dutch

http://www.gsmeasy.nl/
a little to big so less functionality would be ok.

http://www.startelecom.nl/
ugly site but the meganisme is about what I want to build, but then not 
with proprietary cms ,like this one, but with Typo3.

Yes the Dutch way of doing contract selling with is a little strange 
compared to what the rest of the world does...



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