I talked to the client and it turns out the solution above isn't exactly
what they want. The problem with having the gift cards in a blacklist in a
promotion is that as soon as you add a gift card to your order, none of the
other products in the order would have the promotion applied. Ideally, a
5% order discount (for example) wouldn't be applied to the gift cards, but
would be applied to the other products in the order.

Is this possible with the current Spree Promotion system? My guess is that
this is not as simple as adding a new rule or calculator in Promotions.

Thanks,
Brad

On Monday, December 10, 2012 9:44:12 AM UTC-6, bschwarzh wrote:

I think this will work. Thanks much for your code.

Brad

On Friday, December 7, 2012 3:27:18 PM UTC-6, paul damer wrote:

I have done this but haven't had a chance to put together a pull request.
Here is a gist. It is against the 0.7 source so you might have to
update it some to work with 1.1
https://gist.github.com/4236662
Its a pretty small change.
-Paul



On Fri, Dec 7, 2012 at 4:03 PM, Michael Bianco
wrote:
You can specify a whitelist for a promotion, but you can't specify a
blacklist like you are describing. Unfortunately, you'll have to add a
product rule and manually add all the products you want in the
promotion.
This wouldn't be hard to add this in to the promotion system. Take a look at
the product rule, you could basically create a rule which is the opposite.
- Mike

On Thursday, December 6, 2012 6:27:42 PM UTC-5, bschwarzh wrote:

Hello all,

My client wants to exclude Gift Cards from their 5% discount promotion
for
users that place their first order on the site. I've searched around
for a
way to exclude products from promotions and haven't found a solution.
Has
anyone dealt with this kind of issue before? If there isn't a way to
do
this in the admin promotions section I would be open to adding certain
products as excluded in the code (although maybe not the ideal
solution).
I'm using Spree 1.1.3 in Rails 3.2.8.

Thanks,
Brad
--
You received this message because you are subscribed to the Google Groups
"Spree" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/spree-user/-/fu3dvwEvfeUJ.

To post to this group, send email to spree...@googlegroups.com.
To unsubscribe from this group, send email to
spree-user+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/spree-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spree-user/-/8LVJH8bi13sJ.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Search Discussions

  • Brad Schwarzhoff at Dec 13, 2012 at 3:54 pm
    Thanks for the reply Mike.

    Is there an easy way to add all of the products in my system to the
    inclusion rule (there are hundreds of products)? Maybe I would need to
    do this via ruby console?

    Thanks,
    Brad

    On 12/13/2012 9:19 AM, Michael Bianco wrote:
    This isn't possible with the system as is, but if you create an
    exclusion rule whose matching_products returns all products except the
    excluded one, and combine that with the percent per item calculator
    (https://github.com/spree/spree/blob/master/promo/app/models/spree/calculator/percent_per_item.rb)
    you should get what you are looking for.

    - Mike

    On Monday, December 10, 2012 5:08:38 PM UTC-5, bschwarzh wrote:

    I talked to the client and it turns out the solution above isn't
    exactly what they want. The problem with having the gift cards in
    a blacklist in a promotion is that as soon as you add a gift card
    to your order, none of the other products in the order would have
    the promotion applied. Ideally, a 5% order discount (for example)
    wouldn't be applied to the gift cards, but would be applied to the
    other products in the order.

    Is this possible with the current Spree Promotion system? My
    guess is that this is not as simple as adding a new rule or
    calculator in Promotions.

    Thanks,
    Brad


    On Monday, December 10, 2012 9:44:12 AM UTC-6, bschwarzh wrote:

    I think this will work. Thanks much for your code.

    Brad


    On Friday, December 7, 2012 3:27:18 PM UTC-6, paul damer wrote:

    I have done this but haven't had a chance to put together
    a pull request.
    Here is a gist. It is against the 0.7 source so you might
    have to
    update it some to work with 1.1
    https://gist.github.com/4236662
    <https://gist.github.com/4236662>
    Its a pretty small change.
    -Paul



    On Fri, Dec 7, 2012 at 4:03 PM, Michael Bianco
    wrote:
    You can specify a whitelist for a promotion, but you
    can't specify a
    blacklist like you are describing. Unfortunately, you'll
    have to add a
    product rule and manually add all the products you want
    in the promotion.
    This wouldn't be hard to add this in to the promotion
    system. Take a look at
    the product rule, you could basically create a rule
    which is the opposite.
    - Mike


    On Thursday, December 6, 2012 6:27:42 PM UTC-5,
    bschwarzh wrote:
    Hello all,

    My client wants to exclude Gift Cards from their 5%
    discount promotion for
    users that place their first order on the site. I've
    searched around for a
    way to exclude products from promotions and haven't
    found a solution. Has
    anyone dealt with this kind of issue before? If there
    isn't a way to do
    this in the admin promotions section I would be open to
    adding certain
    products as excluded in the code (although maybe not
    the ideal solution).
    I'm using Spree 1.1.3 in Rails 3.2.8.

    Thanks,
    Brad
    --
    You received this message because you are subscribed to
    the Google Groups
    "Spree" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/spree-user/-/fu3dvwEvfeUJ
    <https://groups.google.com/d/msg/spree-user/-/fu3dvwEvfeUJ>.
    To post to this group, send email to
    spree...@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+...@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/spree-user?hl=en
    <http://groups.google.com/group/spree-user?hl=en>.

    --
    You received this message because you are subscribed to the Google
    Groups "Spree" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/spree-user/-/i6LwnIcEjwYJ.
    To post to this group, send email to spree-user@googlegroups.com.
    To unsubscribe from this group, send email to
    spree-user+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/spree-user?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To post to this group, send email to spree-user@googlegroups.com.
    To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedDec 10, '12 at 10:08p
activeDec 13, '12 at 3:54p
posts2
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Brad Schwarzhoff: 2 posts

People

Translate

site design / logo © 2022 Grokbase