Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

improve meta tags

Damian Legawiecef345e2352e7
diff --git a/storefront/app/views/themes/default/spree/shared/_meta_tags.html.erb b/storefront/app/views/themes/default/spree/shared/_meta_tags.html.erb
index edbcb3ad4d..9945dc9366 100644
--- a/storefront/app/views/themes/default/spree/shared/_meta_tags.html.erb
+++ b/storefront/app/views/themes/default/spree/shared/_meta_tags.html.erb
@@ -32,9 +32,9 @@
<meta property="twitter:image" content="<%= image_url %>" />
<% end %>
-<% if @product && @product.price_in(current_currency).present? %>
+<% if @product.present? && @product.price_in(current_currency).present? %>
<meta property="og:price:amount" content="<%= @product.price_in(current_currency).amount.to_s %>">
- <meta property="og:price:currency" content="<%= current_order&.currency || current_store.default_currency %>">
+ <meta property="og:price:currency" content="<%= current_currency %>">
<% end %>
<% if current_store.twitter.present? %>