Changeset 622 for modules/trunk/GoogleMerchant/views.py
- Timestamp:
- 02/17/10 15:25:48 (7 months ago)
- Files:
-
- 1 modified
-
modules/trunk/GoogleMerchant/views.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/trunk/GoogleMerchant/views.py
r618 r622 8 8 from djw.core.ProductCatalog.models import Product 9 9 from django.http import Http404 10 # dependense 11 from djw.custom.ProductCatalog_custom.models import customizedProduct 10 12 11 13 # todo: move function to djhdgutils … … 23 25 self._product = product 24 26 self._country = country 27 self._customized_product = customizedProduct.objects.get( 28 product=product) 25 29 super(GProduct, self).__init__(*args, **kwargs) 26 30 … … 33 37 def price(self): 34 38 if settings.PRICE_FOR_COUNTRY: 35 return settings.PRICE_FOR_COUNTRY(self.product, self._country) 39 single_price = settings.PRICE_FOR_COUNTRY(self.product, 40 self._country) 36 41 else: 37 return self.product.price 42 single_price = self.product.price 43 44 min_quantity_price = single_price * self._customized_product\ 45 .minimum_quantity_for_purchase 46 47 return min_quantity_price 38 48 39 49 … … 56 66 google_products = [GProduct(p, country) 57 67 for p in Product.objects.all() 68 if p.get_absolute_url() != '' 58 69 ] 59 70
