
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
solidus_product_feed
Advanced tools
An extension that provides an RSS feed for products. Google Merchant Feed attributes are also
implemented. An RSS link is automatically appended to the <head>
tag in the
layouts/spree_application
file.
Add the gem to your Gemfile
:
gem 'solidus_product_feed'
Install the gem:
$ bundle install
You're done! You can now see your RSS feed at /products.rss
.
The feed ships with sensible defaults for your products, but customization is very easy.
You can easily change the feed's headers by putting the following in your Rails initializer:
SolidusProductFeed.configure do |config|
config.title = 'My Awesome Store'
config.link = 'https://www.awesomestore.com'
config.description = 'Find out about new products on https://www.awesomestore.com first!'
config.language = 'en-us'
end
Note that you can also pass a Proc for each of these options. The Proc will be passed the view context as its only argument, so that you can use all your helpers:
SolidusProductFeed.configure do |config|
config.title = -> (view) { view.current_store.name }
config.link = -> (view) { "http://#{view.current_store.url}" }
config.description = -> (view) { "Find out about new products on http://#{view.current_store.url} first!" }
config.language = -> (view) { view.lang_from_store(current_store.language) }
end
If you need to alter the XML schema of a product (e.g. to add/remove a tag), you can do it by
subclassing Spree::FeedProduct
in your app and overriding the schema
method:
module AwesomeStore
class FeedProduct < Spree::FeedProduct
def schema
super.merge('g:brand' => 'Awesome Store Inc.')
end
end
end
Then set your custom class in an initializer:
SolidusProductFeed.configure do |config|
config.feed_product_class = 'AwesomeStore::FeedProduct'
end
If you want to change the value of an existing tag, you can also simply override the corresponding
tag method (link
, price
etc.). Check the source code
for more details.
Be sure to add the rspec-rails
gem to your Gemfile and then create a dummy test app for the specs
to run against.
$ bundle exec rake test app
$ bundle exec rspec spec
FAQs
Unknown package
We found that solidus_product_feed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.