GithubHelp home page GithubHelp logo

vinsol-spree-contrib / spree-loyalty-points Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 46.0 244 KB

This extension adds Loyalty Points for users in Spree.

License: BSD 3-Clause "New" or "Revised" License

Ruby 91.81% JavaScript 3.16% CSS 0.12% HTML 4.91%

spree-loyalty-points's People

Contributors

bansalakhil avatar jatin-baweja avatar mayankvinsol avatar nishant-cyro avatar pikender avatar satish avatar sawangupta92 avatar tanmay3011 avatar

Stargazers

 avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spree-loyalty-points's Issues

Admin can't see users loyalty points balance value or transactions.

When I'm logged in to the backend as a spree admin I can see the settings and payment gateway but I can't see users loyalty point balance value or transactions. If I log in to the storefront as a user I can see the balance and transactions for that particular user. What am I missing?

Running a fresh install of spree version 2.2.stable. I don't see any errors in the logs when I bring up the users account.

1. "Return Authorization": No. of loyalty points credited into User's account are not correct after "Receiving the product.

Steps:

  1. Place an order on front end and pay with the help of LP.
  2. Go to "Orders" page on Admin and click on the Order no.
  3. Mark the order as "Shipped".
  4. Now select "Return Authorization" and create a "New Return Authorization".
  5. Enter "No. of LP" to be credited into the Users account.
  6. Now Edit this "Return Authorization" and click on "Receive".
  7. LP gets credited into the User account automatically.

Bug: No. of LP credited into the User account do not match with the LP mentioned by the Admin. It is crediting less no. of LP into User's account.

Allow combinaison of loyalty point payment and another payment method

First, thanks for this great gem!

Just to share an improvement that could be really useful:

Figure out a customer has 5 loyalty points but the conversion rate of the product he wants to buy is equivalent to 6 loyalty points.
It could be interesting the customer could use its 5 loyalty points and pay the remaining with another payment method (check, cart...)

I don't know if spree allow the use of multiple payment means for the same order...
It would be great to have your point of view on this.

Thanks for your consideration.

Adding a Cron Job

For beginners, it would be nice to explain how to add a cron job for this extension. BTW it is fantastic!

Question

I see you made changes for 2-2. Is this extension ready for 2-2-stable?

superclass mismatch for class Order

How can I work around this error?

/Users/Mike/.rvm/gems/ruby-2.0.0-p353/gems/spree_loyalty_points-1.1.0/app/models/concerns/spree/order/loyalty_points.rb:4:in `module:Spree': superclass mismatch for class Order (TypeError)

app/models/concerns/spree/order/loyalty_points.rb

module Spree
class Order < ActiveRecord::Base
module LoyaltyPoints
extend ActiveSupport::Concern

3. Provide information of LP debited from User's account on Payment page on Admin

Steps:

  1. Place an order from frontend and pay using LP.
  2. Go to Order's detail page on Admin.
  3. "Cancel" the order.
  4. Now go to the "Payment" page.

Bug: There is no information of the LP debited from user account on the basis of this order. Also, a message should be displayed that Admin needs to manually credit LP into User's account.

gem compatibility

gem need to be update it with new rails 5.1.5 , no it's not compatible now with 5.1.5 it's compatible with rails 5.0.6 and lower

Update for Spree 3.0.2?

When can we expect the support the spree 3.0.2?
Is there any quick way to make it comfortable for spree 3.0.2

ArgumentError (wrong number of arguments (given 0, expected 1))

Rails server logged these warnings:

W, [2018-03-27T18:09:54.706656 #23348] WARN -- : Creating scope :loyalty_points_not_awarded. Overwriting existing method Spree::Order.loyalty_points_not_awarded.
W, [2018-03-27T18:09:54.706758 #23348] WARN -- : Creating scope :with_hours_since_payment. Overwriting existing method Spree::Order.with_hours_since_payment.
W, [2018-03-27T18:09:54.706808 #23348] WARN -- : Creating scope :with_uncredited_loyalty_points. Overwriting existing method Spree::Order.with_uncredited_loyalty_points.

I run:
bundle exec rake spree:loyalty_points:award
rake aborted!
ArgumentError: wrong number of arguments (given 0, expected 1)

with spree-loyalty-points/app/models/concerns/spree/order/loyalty_points.rb
Line 15:
create_credit_transaction(loyalty_points_earned)
Line 32:
uncredited_orders.each do |order|
Line 33:
order.award_loyalty_points
Line 40:
user.loyalty_points_credit_transactions.create(source: self, loyalty_points: points)

Traceback (most recent call last):
from app/models/spree/order_decorator.rb:11:in block (2 levels) in <top (required)>
ArgumentError (wrong number of arguments (given 0, expected 1))

Line 11: scope :with_hours_since_payment, ->(num) { where('spree_orders.paid_at < ? ', num.hours.ago) }
from app/models/spree/order_decorator.rb:13:in block (2 levels) in <top (required)>
ArgumentError (wrong number of arguments (given 0, expected 1))

Line 13: scope :with_uncredited_loyalty_points, ->(num) { with_hours_since_payment(num).loyalty_points_not_awarded }

Please confirm this gem does work, or should do something with spree-loyalty-points/app/models/concerns/spree/order/loyalty_points.rb and spree-loyalty-points/app/models/spree/order_decorator.rb

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.