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.

Add /products/ path to Google Merchant feed links (#13487)

Frederik Kragh Nicolajsen0807389f23da
diff --git a/core/app/services/spree/data_feeds/google/required_attributes.rb b/core/app/services/spree/data_feeds/google/required_attributes.rb
index d8700883fa..9a4a4b9a6c 100644
--- a/core/app/services/spree/data_feeds/google/required_attributes.rb
+++ b/core/app/services/spree/data_feeds/google/required_attributes.rb
@@ -12,7 +12,7 @@ module Spree
information['id'] = input[:variant].id
information['title'] = format_title(input[:product], input[:variant])
information['description'] = get_description(input[:product], input[:variant])
- information['link'] = "#{input[:store].url}/#{input[:product].slug}"
+ information['link'] = "#{input[:store].url}/products/#{input[:product].slug}"
information['image_link'] = get_image_link(input[:variant], input[:product])
information['price'] = format_price(input[:variant])
information['availability'] = get_availability(input[:product])
diff --git a/core/spec/services/spree/data_feeds/google/rss_spec.rb b/core/spec/services/spree/data_feeds/google/rss_spec.rb
index ffc7c5d709..7382ff3ae1 100644
--- a/core/spec/services/spree/data_feeds/google/rss_spec.rb
+++ b/core/spec/services/spree/data_feeds/google/rss_spec.rb
@@ -46,7 +46,7 @@ module Spree
end
it 'includes link' do
- expect(result.value[:file]).to include("<g:link>#{store.url}/#{product.slug}</g:link>").once
+ expect(result.value[:file]).to include("<g:link>#{store.url}/products/#{product.slug}</g:link>").once
end
it 'includes image link' do