Show "image not found" placeholder image for products which have none
This commit is contained in:
parent
c16349d5c3
commit
64f81e3396
|
@ -903,6 +903,10 @@ class ProductsView(MasterView):
|
||||||
kwargs['image_url'] = pod.get_image_url(self.rattail_config, product.upc)
|
kwargs['image_url'] = pod.get_image_url(self.rattail_config, product.upc)
|
||||||
kwargs['image_path'] = pod.get_image_path(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_preferred'] = "Pref."
|
||||||
kwargs['costs_label_vendor'] = "Vendor"
|
kwargs['costs_label_vendor'] = "Vendor"
|
||||||
kwargs['costs_label_code'] = "Order Code"
|
kwargs['costs_label_code'] = "Order Code"
|
||||||
|
|
Loading…
Reference in a new issue