Giter VIP home page Giter VIP logo

spree_price_books's Introduction

SpreePriceBooks

Allows flexibility to show different list prices, sale prices, role prices, store prices, and whatever else you can think of.

Installation

Add spree_price_books to your Gemfile:

gem 'spree_price_books', github: 'spree-contrib/spree_price_books'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_price_books:install

Configuration

Once installed you can seed default currency exchange rates via Google's Currency API.

bundle exec rake price_books:currency_rates

Or configure from within the admin panels configuration tab.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

On the first run you may need to create the Postgresql role (ex. createuser -d postgres)

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_price_books/factories'

Credit

http://www.surfdome.com/ for sponsoring the project.

Copyright (c) 2014 Jeff Dutil, released under the New BSD License

spree_price_books's People

Contributors

alepore avatar forvalho avatar jdutil avatar paulo-surfdome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree_price_books's Issues

state machine problems?

Hi!
I'm taking a look at this gem and after adding it to Gemfile i get some errors about the Order state machine, like:

undefined method state_machines' for #Class:0x007ff4931db9f8 undefined method remove_checkout_step' for #<Class:0x007fd812c08dd8>

any idea what's going on? it's pretty strange...
i'm on a almost clean spree 2.4

2-4-stable not populating role price.

I've been trying to implement spree_price_books 2-4-stable into my spree 2.4 using the 2-4-stable branch, but having issues with the price of a line item not reflecting the user's role. I've looked and can't seem to figure out how the price gets set to the right user role's price as the order is populated. I see the currency updater would adjust the pricing, but it only gets called on the order when the order's currency changes (which it never does).

Previously, it appears that the order_contents_decorator.rb would update the pricing of line items as products were added to the order. Now, the chain appears to be that the line_item is created in the add_to_line_item method of OrderContents which then calls before_validation :copy_price to copy the price, but doesn't seem to care about the role.

Any help or guidance would be greatly appreciated. It seems like I'm missing something as the order_contents_decorator was removed and deemed "Irrelevant". If I can figure out how/where in the code it's supposed to set the right price on order population, I can figure out which of my other gems is likely getting in the way.

Thanks in advance for any advice.

Bundler could not find compatible versions for gem spree_core

Hi,

I'm using spree 3.1 and cannot use spree_price_books. It gives me the following error. Are you planning to create a 3-1-stable branch?

Bundler could not find compatible versions for gem "spree_core":
  In snapshot (Gemfile.lock):
    spree_core (= 3.1.3)

  In Gemfile:
    spree was resolved to 3.1.3, which depends on
      spree_core (= 3.1.3)

    spree was resolved to 3.1.3, which depends on
      spree_core (= 3.1.3)

    spree was resolved to 3.1.3, which depends on
      spree_core (= 3.1.3)

    spree was resolved to 3.1.3, which depends on
      spree_core (= 3.1.3)

    spree was resolved to 3.1.3, which depends on
      spree_core (= 3.1.3)

    spree_auth_devise was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0)

    spree_gateway was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0.beta)

    spree_gateway was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0.beta)

    spree_gateway was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0.beta)

    spree_gateway was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0.beta)

    spree_price_books was resolved to 2.3.0.beta, which depends on
      spree_core (~> 2.3.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.