[TYPO3-commerce] delivery costs based on total costs

Franz Koch typo.removeformessage at fx-graefix.de
Thu Oct 11 16:12:56 CEST 2007


Hi,

> Thanks for your thoughts. After some testing the code works great... I 
> am trying to implement the value change to the 
> ###DELIVERY_PRICE_GROSS### marker. Am I right when saying that this is 
> filled from the database? After recalculating the delivery price I do an 
> update on the basket like:

I'm not sure - just have a look at pi2-class how the marker get's 
filled. As much as I remember, a basket method is called to calculcate 
the delivery price - so it should be sufficient if you modify the 
delvery-object inside the basket. And use references!!!

> UPDATE tx_commerce_baskets SET price_gross='650', price_net='650' WHERE 
> sid='fc5d56046d' and finished_time = 0 and article_id=18
> 
> Somewhere in the end I think that there is recalculation which is 
> responsible for the denial of the new value. Now the initial value stays 
> 750 instead of the new one 650. Hope that you have any idea on this last 
> point.

don't update the item in the db, but in the basket object, because the 
basket object will overwrite your change at the end of the process. So 
update the delivery article in the basket and everything should be fine.

--
Greetings,
Franz


More information about the TYPO3-project-commerce mailing list