Add this line to your Wagon site's Gemfile:
group :misc do
gem 'shop_invader', path: '<local version of the ShopInvader gem>'
end
Very important. Use the very last commits of both Wagon and Steam.
And then execute:
$ bundle
Modify the config/site.yml
to include Algolia's settings:
metafields:
algolia:
application_id: '<YOUR ALGOLIA APPLICATION ID>'
api_key: '<YOUR ALGOLIA API KEY>'
public_role: >
[
{ "name": "category", "index": "category", "template_handle": "category" },
{ "name": "product", "index": "public_tax_inc", "template_handle": "product" }
]
Notes:
app/views/pages/templates
folder.Add this line to your Rails app's Gemfile:
gem 'shop_invader', path: '<local version of the ShopInvader gem>'
Inside your config/application.rb
file, add the following lines.
module MyApp
class Application < Rails::Application
...
# Steam
initializer 'station.steam', after: 'steam' do |app|
Locomotive::Steam.configure do |config|
ShopInvader.setup
end
end
...
end
end
If you request the http://mysite.com/url_key
and redirect_url_key
properties.
category
liquid global variable will be available in the liquid template.product
liquid global variable will be available in the liquid template.{% for category in store.category %}
<h2>{{ category.name }}</h2>
{% endfor %}
{% with_scope rating_value.gt: 4.7 %}
{% for product in store.product %}
<h2>{{ product.name }}</h2>
{% endfor %}
{% endwith_scope %}
{% with_scope categories_ids: [category.objectID] %}
{% paginate store.product by 3 %}
{% for product in paginate.collection %}
<h2>{{ product.name }}</h2>
<img src="https://github.com/shopinvader/locomotive-shopinvader/raw/v4.0.x/{{ product.images.first.medium }}" />
{{ product.short_description }}
{% endfor %}
{% endpaginate %}
{% endwith_scope %}
Bug reports and pull requests are welcome on GitHub at https://github.com/did/shop_invader.
The gem is available as open source under the terms of the MIT License.