Alexandre, did you ever find a solution to this? I have been looking into
building a calculator attached to a RushProcessing model that includes
`calculated_adjustments`. However this seems like overkill.

Radar, I understand "You should create an adjustment on the order for the
40% of the order total and apply it to the order." in theory, but in
practice, how in the Order decorator would you add the hook that creates
the adjustment (assuming it can be added at cart, address or delivery
stages) and how would the calculator be associated with that adjustment? Is
there a complete example in some extension? If not, this might make a good
howto...

Thanks,
Sam

On Friday, September 21, 2012 11:14:16 AM UTC-4, Alexandre Grégoire wrote:

Thanks ! I'll look into this today !

Cheers,

- Alexandre
On Thursday, 20 September 2012 17:49:07 UTC-4, Ryan Bigg wrote:

This is exactly the kind of situation that adjustments were made for. You
should create an adjustment on the order for the 40% of the order total and
apply it to the order.

On 21/09/2012, at 6:46, Alexandre Grégoire <alexandre...@gmail.com>
wrote:

I've been asked by a client to add a "Rush order" functionnality to their
Spree app. When a customer chooses that option, it should add 40% to the
price of every line item in their order. It should be simple for a customer
to turn that option on or off.

I've been thinking about how to approach this problem, but I'm kind of
stuck. One solution I thought of relied on a new shipping method with a
custom calculator. I'm already using a custom calculator (with the advanced
calculators extension) for my shipping methods so their price can vary
depending on the number of items in the order. I thought about hacking that
calculator so it also adds 40% of the price of all the items in the order.
But that seems contrived.

Any of you guys would have an idea on how to approach this ?

Cheers,

- Alexandre

--
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/-/7ji7o9v6pzAJ.
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/-/fEMk-j8k3ZsJ.
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

  • Alexandre Grégoire at Jan 11, 2013 at 9:31 pm
    Hi Sam,

    Unfortunately (or fortunately, depending on how you look at it!), my client
    decided not offer that functionnality anymore. So I did not have to
    implement it after all. However, what you describe seems ok to me
    (calculator, RushProcessing model, etc.).

    I would probably integrate this through an input in the cart (within the
    order form so it gets submitted with the form). This would call a getter
    and a setter defined in my Order decorator that would check if the
    adjustment exists and set/remove it depending on what's needed. That way,
    you do not have to override anything in the OrdersController.

    Cheers,

    Alexandre
    On Tuesday, 8 January 2013 10:33:16 UTC-5, sbeam wrote:

    Alexandre, did you ever find a solution to this? I have been looking into
    building a calculator attached to a RushProcessing model that includes
    `calculated_adjustments`. However this seems like overkill.

    Radar, I understand "You should create an adjustment on the order for the
    40% of the order total and apply it to the order." in theory, but in
    practice, how in the Order decorator would you add the hook that creates
    the adjustment (assuming it can be added at cart, address or delivery
    stages) and how would the calculator be associated with that adjustment? Is
    there a complete example in some extension? If not, this might make a good
    howto...

    Thanks,
    Sam

    On Friday, September 21, 2012 11:14:16 AM UTC-4, Alexandre Grégoire wrote:

    Thanks ! I'll look into this today !

    Cheers,

    - Alexandre
    On Thursday, 20 September 2012 17:49:07 UTC-4, Ryan Bigg wrote:

    This is exactly the kind of situation that adjustments were made for.
    You should create an adjustment on the order for the 40% of the order total
    and apply it to the order.

    On 21/09/2012, at 6:46, Alexandre Grégoire <alexandre...@gmail.com>
    wrote:

    I've been asked by a client to add a "Rush order" functionnality to
    their Spree app. When a customer chooses that option, it should add 40% to
    the price of every line item in their order. It should be simple for a
    customer to turn that option on or off.

    I've been thinking about how to approach this problem, but I'm kind of
    stuck. One solution I thought of relied on a new shipping method with a
    custom calculator. I'm already using a custom calculator (with the advanced
    calculators extension) for my shipping methods so their price can vary
    depending on the number of items in the order. I thought about hacking that
    calculator so it also adds 40% of the price of all the items in the order.
    But that seems contrived.

    Any of you guys would have an idea on how to approach this ?

    Cheers,

    - Alexandre

    --
    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/-/7ji7o9v6pzAJ.
    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.
    --

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedJan 8, '13 at 3:33p
activeJan 11, '13 at 9:31p
posts2
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

Sbeam: 1 post Alexandre Grégoire: 1 post

People

Translate

site design / logo © 2022 Grokbase