spree-contrib / spree_product_groups Goto Github PK
View Code? Open in Web Editor NEWExtension to Spree featuring Product Groups that were originally part of core prior to 1.1 release.
License: BSD 3-Clause "New" or "Revised" License
Extension to Spree featuring Product Groups that were originally part of core prior to 1.1 release.
License: BSD 3-Clause "New" or "Revised" License
pulled from the 2-0 stable branch of spree and spree_product_zoom
instead of displaying the lightbox when selecting the zoom or product image, the original image path is opened in the current window (displaying the image and nothing else).
Using Rails 4.0.4 with Spree stable 2.2. When I install spree product groups and try to create a group I get an exception stating that group_by_products_id is not a valid method.
I fixed this locally by changing line 125 of file /app/models/spree/product_group.rb to the following:
apply_on(Product.group :id, use_order)
I am not sure if this is what is intended as I am not sure what what product groups is used for. I was investigating various spree plugins to see if I could create dynamic relationships between products for bundles.
When trying add new product get an error:
"undefined method `>' for {}:ActiveSupport::OrderedHash"
def include?(product)
res = apply_on(Product.where(:id => product.id), false)
res.count > 0
end
Whenever I create a new product or clone one or even edit a product, it adds it to any group that has more than one product in it. I am grouping by ID, so it is a very exclusive list. It doesn't add the product's id into my list of id's, but it adds the relationship in the db somehow.
If I edit the group and hit update without changing anything, it will remove the extra products that shouldn't be in there. This is a temporary solution, but it is tedious to go in and save the group every time I change/add a product.
When I combine in_taxons scope with sort by master_price (using spree 1.1.1) I get postgres error:
searcher = Spree::Core::Search::ProductGroupBase.new(:product_group_query =>"in_taxons/Mugs/ascend_by_master_price")
searcher.retrieve_products
# ActiveRecord::StatementInvalid: PG::Error: ERROR: column "spree_variants.price" must appear in the GROUP BY clause or be used in an aggregate function
full log: https://gist.github.com/2858938
You can see this error, when you install fresh spree 1.1.1 shop and try to access url http://localhost:3000/s/in_taxons/Mugs/ascend_by_master_price
Bundler could not find compatible versions for gem "spree_core":
In Gemfile:
spree (>= 0) ruby depends on
spree_core (= 2.1.0.beta) ruby
spree_product_groups (>= 0) ruby depends on
spree_core (2.0.0.rc1)
s.add_dependency 'spree_core', '~> 2.0.0.beta'
Would be nice to have travis ci run specs also.
I was wondering if there was an easy way to include a group of products that you have set up in the admin on an existing page, such as the home page. I was hoping to use this gem to create two different featured sections on my home page. The only way to display a product group that I can see is with pg/product_group_name, and that is using the products/index view.
/cc biow0lf
moved from spree/spree#1232 (comment)
spree 1.0, rails 3.1.3, postgresql, linux x64
When creating products group in admin interface, if name is entered on russian with letter "Ь" (soft sign) with have to be translated (why?) to single quote, for ex. "Обувь (shoes) -> Obuv' " this parameter gets passed directly to postgresql in a form
"e_product_groups" WHERE (permalink LIKE 'Obuv'%') ORDER" etc
that sure throws an error.
In ROR2RU google group user Solenko suppose:
( https://groups.google.com/forum/?fromgroups#!topic/ror2ru/yfGFuZb2B60 )
https://github.com/spree/spree/blob/master/core/lib/spree/core/permalinks.rb#L43
:conditions => "#{field} LIKE '#{permalink_value}%'",
fix
:conditions => ["#{field} LIKE '?'", "#{permalink_value}%"],
BUT I think for the correct translation for permalinks is better to get out from any quotes at all, because of unpredictable manner of appearance of new errors when using quotes and other special symbols in names.
This solved the problem for me:
class String
def to_url
remove_formatting.downcase.gsub(/[ъЪьёЁєЄЇїіІ \'\"\%\.\;\:]+/, '_' ).gsub(/_+/,'_').parameterize
end
end
You can read more about product groups http://guides.spreecommerce.com/scopes_and_groups.html. I cannot find any sort of documentation at all, about the functionality of this gem.
gemfile below:
gem 'spree', github: 'spree/spree', branch: '2-1-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-1-stable'
gem 'spree_multi_slideshow', '~> 1.3.0'
gem 'spree_bootstrap', github: 'jdutil/spree_bootstrap'
error below:
/Users/sturner/.rvm/gems/ruby-1.9.3-p125/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:17:in attr_accessible':
attr_accessibleis extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add
protected_attributesto your Gemfile to use old one. (RuntimeError) from /Users/sturner/.rvm/gems/ruby-1.9.3-p125/bundler/gems/spree_product_groups-5757a07b06c4/app/models/spree/product_group.rb:45:in
class:ProductGroup'
I added the gem 'protected_attributes' to my main spree app, but it caused my controllers to fail? any suggestions?
It would be nice if all organization members had commit access like there is for most extensions.
On a fresh install of Spree 2.1 getting the following error when trying to access Product Groups in admin:
undefined method `relation' for #ActiveRecord::Relation::ActiveRecord_Relation_Spree_Product:0x007fdabb387f00
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.