Misc. tweaks per demo launch

This commit is contained in:
Lance Edgar 2021-01-20 23:14:41 -06:00
parent 950a153342
commit c633dcc666
3 changed files with 6 additions and 2 deletions

View file

@ -34,9 +34,13 @@ class WooVersionMixin(object):
"""
def add_woocommerce_importers(self, importers):
importers['WooProductExtension'] = WooProductExtensionImporter
importers['WooCacheProduct'] = WooCacheProductImporter
return importers
class WooProductExtensionImporter(base.VersionImporter):
host_model_class = model.WooProductExtension
class WooCacheProductImporter(base.VersionImporter):
host_model_class = model.WooCacheProduct

View file

@ -155,7 +155,7 @@ class ProductImporter(FromWooCommerce, rattail_woocommerce_importing.model.Produ
'uuid': uuid,
'woocommerce_id': api_product['id'],
'item_id': api_product['sku'],
'description': api_product['name'],
'description': api_product['name'].replace('&', '&'),
}

View file

@ -125,7 +125,7 @@ class ProductImporter(FromRattail, woocommerce_importing.model.ProductImporter):
return {
'id': woo_id,
'name': product.description,
'name': (product.description or '').strip().replace('&', '&') or 'Product',
'sku': product.item_id,
'regular_price': regular_price,
'sale_price': sale_price,