Logo Search packages:      
Sourcecode: zope-emarket version File versions

def EMarket::MarketItemManager::MarketItemManager::calcPrice (   self,
  theBasketItem 
)

Calculate the price of a single item with the given optionDict....

This is admittedly a kludge... but we needed something quick and easy.
The option dict is a dict of optional features of MarketItems. These
features might affect the price. The "price" attribute of a MarketItem
is a 'base' price. If there is an optional feature, say color we add a
property to the market item called 'colors' and list the possibility.
If this property affects the price 

Definition at line 31 of file MarketItemManager.py.

00031                                       :
        """ Calculate the price of a single item with the given optionDict....

        This is admittedly a kludge... but we needed something quick and easy.
        The option dict is a dict of optional features of MarketItems. These
        features might affect the price. The "price" attribute of a MarketItem
        is a 'base' price. If there is an optional feature, say color we add a
        property to the market item called 'colors' and list the possibility.
        If this property affects the price """

        #
        theItem = self.getItem( theBasketItem.marketItemId )
        if theItem:
            return theItem.price
        else:
            return 0.0

class Dummy:


Generated by  Doxygen 1.6.0   Back to index