diff --git a/src/components/PriceCard.vue b/src/components/PriceCard.vue
index 9989cfa9d3..9e524d5ee9 100644
--- a/src/components/PriceCard.vue
+++ b/src/components/PriceCard.vue
@@ -8,7 +8,7 @@
- {{ product.product_name || price.product_code }}
+ {{ getPriceProductTitle(product, price) }}
{{ product.brands }}
@@ -52,6 +52,16 @@ export default {
let pricePerKilo = (priceValue / productQuantity) * 1000
return `${this.getPriceValueDisplay(pricePerKilo, priceCurrency)} / kg`
},
+ getPriceProductTitle(product, price) {
+ if (product && product.product_name) {
+ return product.product_name
+ } else if (price && price.product_code) {
+ return price.product_code
+ } else if (price && price.category_tag) {
+ return price.category_tag
+ }
+ return 'undefined'
+ },
getPriceLocationTitle(price) {
if (price.location) {
return `${price.location.osm_name}, ${price.location.osm_address_city}`