[TYPO3-commerce] fix discount amount per user - not discount-groups
Franz Koch
typo.removeformessage at fx-graefix.de
Fri Aug 24 23:38:42 CEST 2007
Hi Ingo,
>> Is there anything I have to be aware of, when I alter the price inside
>> the class 'tx_commerce_article_price' with the hooks 'postpricenet'
>> and 'postpricegross'? Maybe some dependencies I haven't seen so far,
>> something in the checkout-process, the backend-modules or the
>> invoice-generation?
>
> In all projects, I was working with similar issues, those to hooks have
> done everything what I wanted to archive for the frontend. But you also
> should have a look in the basic_basket_class and pi2 when adding such an
> article into the basket. Pi2 and the basket checks if the given price
> uid is valid and changes to a valid prive uid, if it's wrong. It always
> adds the item with the normal priceUID the article has, so a change in
> tx_commerce_article price will not work here. You'll also have to use
> the hook:
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['postartAddUid']
Well - a change in the uid should not be a problem - should it? The
resulting price-object will also make use of those two hooks. And gladly
the only reason why the price could be changed would be a scaled price.
But there the discount should also be applied. I'll try and see what
happens. Thanks so far.
> If you dop have implemented your solution, it would be great if you
> could post here, if those hooks where sufficient for you.
Sure - maybe I pack it as small extension and provide it as
commerce-addon in TER as it could be of general use. Then I could
implement such 'fixed' discounts also by fe_group with an override by
fe_user. And apply discount-flags to products and articles, so that
selected articles can be enabled or disabled for discounts. Might maybe
come handy. But first the job has to be finished and I have to find some
sparetime again (quite busy currently).
--
Greetings,
Franz
More information about the TYPO3-project-commerce
mailing list