spree-contrib / spree_volume_pricing

Spree extension which supports sales volume based pricing (quantity discounts).
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
67 stars 113 forks source link

Partial only ever displays master variant pricing #59

Open jhirbour opened 10 years ago

jhirbour commented 10 years ago

Steps to repeat:

The problem: Strictly a display issue only: clicking the different images of the product changes the product image, but the partial only ever displays the pricing from the master.

As far as I can tell the correct price is used when you click the variant and add to your cart, but it'd be confusing for a user if you had different volume prices per variant but they are only displayed the master one.

Gemfile

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

# spree stuff
gem 'spree', git: 'https://github.com/spree/spree.git', :branch => '2-1-stable'
gem 'spree_paypal_express', :git => 'https://github.com/radar/better_spree_paypal_express.git', :branch => '2-1-stable'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-1-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-1-stable'
gem 'spree_volume_pricing', :git => 'https://github.com/spree/spree_volume_pricing.git', :branch => '2-1-stable'
radar commented 10 years ago

@jhirbour I tried to parse this issue today but I couldn't. Can you show me some screenshots of what is happening? I think that would help me understand.

jhirbour commented 10 years ago

Setup 2 variants with volume pricing:


It seems like there needs to be some javascript in this Gem like the javascript in store/product.js that re-renders the price and pictures