[TYPO3-commerce] Prices for Articles

Georg Schönweger Georg.Schoenweger at gmail.com
Mon Nov 23 11:52:00 CET 2009


Hi Rik,

thx for your reply. I found out that in my case the only function which
fetches the price from DB for the article in the basket is
getActualPriceforScaleUid(). In this function is also a hook so i did it
that way, seems to work fine.

kind regards,
Georg

Rik Willems schrieb:
> Changing article prices can be a tricky thing. I did it for a discount
> extension and that seems to work fine. I believe it is in TER. Contact
> me if you need it.
>
> Greets
>
> Georg Schönweger schreef:
>> Hi,
>>
>> i need to load the prices for an article from another article. So lets
>> say i have the Article[10] and for this article i need to load the
>> prices from Article[1] (for Basket, single View, listView ecc.)
>>
>> So my firts thought was to hook into the base article class where the
>> prices gets loaded. But there are many funtions which fetch and
>> instantiate a price object and i can't hook in all of them. So i think
>> this is not a good way of doing that.
>>
>> Then i thinked to just change the prices in the
>> basket_item(tx_commerce_baskets) when an article is added to the basket.
>> For this i could use the Hook in pi2: postartAddUidSingle. I think the
>> whole price calculation is only done via the basket_items, so i hope
>> there should be no problems. For single View and list View i could just
>> override the markerArray.
>>
>> What do you think would be a good solution?
>>
>> kind regards,
>> Georg Schönweger
> _______________________________________________
> TYPO3-project-commerce mailing list
> TYPO3-project-commerce at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-commerce
>


More information about the TYPO3-project-commerce mailing list