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
Fix: Replace deprecated Image#plp_url with cdn_image_url variant(:xlarge) (#13678)
Damian Legawiec4a6d51605d1b
diff --git a/spree/core/app/services/spree/data_feeds/google/required_attributes.rb b/spree/core/app/services/spree/data_feeds/google/required_attributes.rbindex d244e5d366..274354c44c 100644--- a/spree/core/app/services/spree/data_feeds/google/required_attributes.rb+++ b/spree/core/app/services/spree/data_feeds/google/required_attributes.rb@@ -41,15 +41,10 @@ module Spreeenddef get_image_link(variant, product)- # try getting image from variant- img = variant.images.first&.plp_url+ image = variant.thumbnail || product.thumbnail+ return if image.nil?- # if no image specified for variant try getting product image- if img.nil?- img = product.images.first&.plp_url- end-- img+ Rails.application.routes.url_helpers.cdn_image_url(image.attachment.variant(:xlarge))enddef format_price(variant)diff --git a/spree/core/spec/services/spree/data_feeds/google/rss_spec.rb b/spree/core/spec/services/spree/data_feeds/google/rss_spec.rbindex e412f8ae8f..ec51ac2211 100644--- a/spree/core/spec/services/spree/data_feeds/google/rss_spec.rb+++ b/spree/core/spec/services/spree/data_feeds/google/rss_spec.rb@@ -54,7 +54,9 @@ module Spreeendit 'includes image link' do- expect(result.value[:file]).to include("<g:image_link>#{variant.images.first.plp_url}</g:image_link>").once+ image = variant.images.first+ expected_url = Rails.application.routes.url_helpers.cdn_image_url(image.attachment.variant(:xlarge))+ expect(result.value[:file]).to include("<g:image_link>#{expected_url}</g:image_link>").onceendit 'includes price' do