Show "image not found" placeholder image for products which have none

This commit is contained in:
Lance Edgar 2019-09-24 11:15:44 -05:00
parent c16349d5c3
commit 64f81e3396

View file

@ -903,6 +903,10 @@ class ProductsView(MasterView):
kwargs['image_url'] = pod.get_image_url(self.rattail_config, product.upc)
kwargs['image_path'] = pod.get_image_path(self.rattail_config, product.upc)
# maybe use "image not found" placeholder image
if not kwargs.get('image_url'):
kwargs['image_url'] = self.request.static_url('tailbone:static/img/product.png')
kwargs['costs_label_preferred'] = "Pref."
kwargs['costs_label_vendor'] = "Vendor"
kwargs['costs_label_code'] = "Order Code"