Misc. tweaks per demo launch
This commit is contained in:
parent
950a153342
commit
c633dcc666
|
@ -34,9 +34,13 @@ class WooVersionMixin(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def add_woocommerce_importers(self, importers):
|
def add_woocommerce_importers(self, importers):
|
||||||
|
importers['WooProductExtension'] = WooProductExtensionImporter
|
||||||
importers['WooCacheProduct'] = WooCacheProductImporter
|
importers['WooCacheProduct'] = WooCacheProductImporter
|
||||||
return importers
|
return importers
|
||||||
|
|
||||||
|
|
||||||
|
class WooProductExtensionImporter(base.VersionImporter):
|
||||||
|
host_model_class = model.WooProductExtension
|
||||||
|
|
||||||
class WooCacheProductImporter(base.VersionImporter):
|
class WooCacheProductImporter(base.VersionImporter):
|
||||||
host_model_class = model.WooCacheProduct
|
host_model_class = model.WooCacheProduct
|
||||||
|
|
|
@ -155,7 +155,7 @@ class ProductImporter(FromWooCommerce, rattail_woocommerce_importing.model.Produ
|
||||||
'uuid': uuid,
|
'uuid': uuid,
|
||||||
'woocommerce_id': api_product['id'],
|
'woocommerce_id': api_product['id'],
|
||||||
'item_id': api_product['sku'],
|
'item_id': api_product['sku'],
|
||||||
'description': api_product['name'],
|
'description': api_product['name'].replace('&', '&'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ class ProductImporter(FromRattail, woocommerce_importing.model.ProductImporter):
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': woo_id,
|
'id': woo_id,
|
||||||
'name': product.description,
|
'name': (product.description or '').strip().replace('&', '&') or 'Product',
|
||||||
'sku': product.item_id,
|
'sku': product.item_id,
|
||||||
'regular_price': regular_price,
|
'regular_price': regular_price,
|
||||||
'sale_price': sale_price,
|
'sale_price': sale_price,
|
||||||
|
|
Loading…
Reference in a new issue