[TYPO3-commerce] delivery costs based on total costs

Ralf Merz ralf.merz at heindl.de
Tue Nov 20 18:10:12 CET 2007


Jeroen Visser schrieb:
> Hi all,
> 
> I am searching for a method in which I can say:
> 
>   * total costs to 100,-       =>      delivery costs 5,-
>   * total costs from 100,- to 300,-       =>      delivery costs 4,-
>   * total costs above 300,-       =>      no delivery costs
> 
> Does anyone has some experience with this in commerce?
> 
> Regards,
> Jeroen
> 
Hi Jeroen,

I did it that way:
I have 4 payment articles: debit, credit card, pre-payment and cash on 
delivery. All with price 0€. If basket sum is > 100€, debit is deleted 
from payment box.
I have 5 delivery articles: inland 3,80€, Europe 7,40€, World 12,80€, 
cash on delivery inland 9,80€, inland 0€, cash on delivery inland 0€.
Depending on the basket sum (>150€) I have to use inland 0€ instead of 
inland 3,80 (which is for < 150€).
The ones which are not allowed to choose are not in the dropdown menu.

So the trick is not to change the prices, but having more articles.

In pi2 I use the hooks makeDelivery and makePayment to switch between 
the payment and delivery articles and delete the ones not used from the 
basket.

The code of my file with the the 2 functions is 580 lines long... maybe 
not the best idea to fill the mail here with this.

Maybe I can put the hook as example on the wiki? Don´t know.... Ingo or 
Volker, is this possible? I have no wiki experience, sorry.

-- 
--
Greetings
Ralf Merz

Heindl Internet AG
Tübingen , Germany
ralf.merz at heindl.de


More information about the TYPO3-project-commerce mailing list