[TYPO3-commerce] global discount for articles wanted

Wild Wild Web - Internetservices mail at wild-wild-web.de
Wed Oct 17 12:18:07 CEST 2007



------------ Original-Nachricht ------------
robelix schrieb am 17.10.2007 11:45 Uhr:
> I wrote aother discount-thing for a customer:
> Registered fe_users get a discount on their first order.
>
> It's not public yet, since it's written for an older and quite heavily
> patched version of commerce, and I had no time to test it on "vanilla"
> so far.
>
> But I can give you a basic idea what I did:
>
> I added a new article-type "discount", a Discount Product in the
> System-Category with a Welcome-Discount-Article that has the new
> article-type. The uid of the type and article, and the percentage of the
> discount has to be set in the ext_conf_template of the extension.
>
> In a couple of Hooks for pi2, pi3 and commerce_pibase I did the
> discount-adding, price-recalculation and displaying stuff.
>
> My thing is far from perfect, but I needed to get it running...
>
>
> I would really like a discount-system - think the additional article
> type is the way to go. Propably something really flexible with custom
> classes - like payment. I'm willing to help, but not enough time to
> build it up alone.
>
>
> Roland
Hi Roland,

sounds pretty. BUT can't really help you AND need it till end of next 
week...

The point why I wanted the discount resp. discount.articleList to be set 
via typoscript is
that in my case the values of the discounts should be dependent of the 
subdomain the product list is called from. :-)
So we could use a condition in TS setup to do it like:

[globalString = IENV:HTTP_HOST=sub1.domain2.de]
  discountArticlesAttribute1 = 10%
  discountArticlesAttribute2 = 20%
[global]

That is at least the idea so far. But I'm open to smarter solutions.

Heiko


More information about the TYPO3-project-commerce mailing list