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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Add Fragment Caching to _json_ld_variant.html.erb (#13020)
Umesh Ravanice4380d73054
diff --git a/storefront/app/views/themes/default/spree/products/_json_ld_variant.html.erb b/storefront/app/views/themes/default/spree/products/_json_ld_variant.html.erbindex c26b011ef8..2ff304e36f 100644--- a/storefront/app/views/themes/default/spree/products/_json_ld_variant.html.erb+++ b/storefront/app/views/themes/default/spree/products/_json_ld_variant.html.erb@@ -1,3 +1,4 @@+<% cache ["json-ld-variant", spree_base_cache_scope, variant.cache_key_with_version] do %>{"@type": "Offer",<% if variant.sku.present? %>@@ -8,3 +9,4 @@"priceCurrency": <%= current_currency.to_json.html_safe %>,"url": <%= spree.product_url(product, variant_id: variant.id, host: current_store.url_or_custom_domain).to_json.html_safe %>}+<% end %>