[TYPO3-commerce] Show scaled prices in basket & redirect to previous page after buying article

Andre Dittmar typo3 at hotbytes.de
Wed Nov 7 09:29:33 CET 2007


Good Morning,

> In the basket, you should always see the correctly scaled price - if
> not, something is wrong. It at least works in my installation, and I
> also only use net prices (b2b-shop), but I tweaked quite a lot for a
> better handling of only net prices.

Sadly in my basket I always see the "default-price" (the first  
configured price in the article-definition). I use the marker  
###BASKET_ITEM_PRICENET### which - as far as I can see - will be  
filled in the class.tx_commerce_pi2.php with the method  
makeArticleView().

The price will be received by a get-Method of the  
class.tx_commerce_basket_item.php, getNoScalePriceNet().  
Unfortunately there are only methods to get the non-scaled price? If  
I use the method getPriceNet(), I get the same price.

It seems that I have to use the additionalMarker-hook in  
class.tx_commerce_pi2.php to use a custom marker for that? At the  
moment I can't reproduce what can be wrong, it seems that the current  
version of commerce doesn't support the output of the scaled price  
(related to the current amount of an article) in the basket and  
somewhere else. Is this correct?

If I have to use a hook, your code snippet might be useful for me as  
a footing, thanks for that.


> I'm not aware of such a functionality, but you can use one of the  
> hooks
> for that. But not 'postartAddUid', because not all basket handling is
> finished on that point and the basket isn't stored yet. Maybe you can
> use
> '$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/ 
> class.tx_commerce_pi2.php']['generateBasketMarker']'
> for it - although it causes some overhead because of the marker  
> processing.

Thanks for that hint, I have to try it out...


Thanks again and best regards,
Andre



More information about the TYPO3-project-commerce mailing list