Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix google_merchant logic. Add fixme with info that get_price doesnt return taxed price

Maciej Korycinskia83c34c46f31
diff --git a/saleor/data_feeds/google_merchant.py b/saleor/data_feeds/google_merchant.py
index 2a65dfa58c..87422fa8ee 100644
--- a/saleor/data_feeds/google_merchant.py
+++ b/saleor/data_feeds/google_merchant.py
@@ -8,6 +8,7 @@ from django.contrib.syndication.views import add_domain
from django.core.files.storage import default_storage
from django.utils.encoding import smart_text
+from ..core.taxes import ZERO_MONEY
from ..discount.models import Sale
from ..product.models import Attribute, AttributeValue, Category, ProductVariant
@@ -124,8 +125,9 @@ def item_tax(item, discounts):
Read more:
https://support.google.com/merchants/answer/6324454
"""
- price = item.get_price(discounts=discounts)
- return "US::%s:y" % price.tax
+ # FIXME get_price never returns taxed price
+ # price = item.get_price(discounts=discounts)
+ return "US::%s:y" % ZERO_MONEY
def item_group_id(item):
@@ -165,12 +167,12 @@ def item_google_product_category(item, category_paths):
def item_price(item):
price = item.get_price(discounts=None)
- return "%s %s" % (price.gross.amount, price.currency)
+ return "%s %s" % (price.amount, price.currency)
def item_sale_price(item, discounts):
sale_price = item.get_price(discounts=discounts)
- return "%s %s" % (sale_price.gross.amount, sale_price.currency)
+ return "%s %s" % (sale_price.amount, sale_price.currency)
def item_attributes(