[TYPO3-commerce] global discount for articles wanted

robelix roland at robelix.com
Wed Oct 17 11:45:57 CEST 2007


Sascha Egerer wrote:
> Wild Wild Web - Internetservices schrieb:
>> Hello,
>> new to this list I'd like to ask for help or a solution for the 
>> following task:
>>
>> I have different pages with a products list.
>> Each product has two articles - let's say attribute color red and color 
>> blue.
>> Each article has it's own price.
>>
>> Entering a certain page with a product list I would like to give a 
>> discount for all customers
>> of 10% for all articles with attribute color red and 20% for all 
>> articles with attribute color blue.
>> In the product list both the original price and the discount price 
>> should be displayed for each article.
>>
>> Smartest would be if I could define the discount amount by typoscript in 
>> an extension template like:
>> discountArticlesAttribute1 = 10%
>> discountArticlesAttribute2 = 20%
>>
>> Another possibility would be to define the discount amounts and 
>> correlating lists of article IDs like:
>> discount1 = 10%
>> discount1.articleList = 3,5,7,9
>> discount2 = 20%
>> discount2.articleList = 2,4,6,8
>>
>> A third possibility would be to create a second - 10% discount - and 
>> third price - 20% discount - for all articles and manage the prices used 
>> for a certain by typoscript in an extension template like:
>> price2.articleList = 3,5,7,9
>> price3.articleList = 2,4,6,8
>>
>> BUT, I've no clue how to do it... and appreciate all help - paid help 
>> too if neccessary.
>> Thanks.
>>
>> Heiko
> 
> Yes sound's good... So... can somebody hook it in? ;-)
> I've got no time at the moment... To much payed work to do...
> But i think TypoScript is not a good solution for this because it's noch 
> userfriendly for the costumers


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


More information about the TYPO3-project-commerce mailing list