Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spree/product'
- require 'solidus_globalize/fallbacks'
- module Spree
- Product.class_eval do
- # Fix for method not found find_by_slug
- def self.find_by_slug(slug)
- translation = Product::Translation.find_by_slug(slug)
- find(translation.spree_product_id)
- end
- end
- Taxon.class_eval do
- # Fix for method not found find_by_permalink!
- def self.find_by_permalink!(permalink)
- translation = Spree::Taxon::Translation.find_by_permalink!(permalink)
- find(translation.spree_taxon_id)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement