Brian,
Thanks for your suggestions.
We talked about the 'deal_pending' state for an order
So basically I am following the whole order workflow + a new state
event :
event :deal_pending do
transition :to => 'deal_pending', :from => 'complete'
end
after_transition :to => 'complete', :do => :deal_pending!, :if
=> :has_active_deal?
what should happen once a deal is complete and payments are captured ?
Should we switch orders back to a 'complete' or a new state like
'deal_complete' ?
'complete' would eventually process a payment cf
before_transition :to => 'complete' do |order|
begin
order.process_payments!
rescue Core::GatewayError
!!Spree::Config[:allow_checkout_on_gateway_error]
end
end
maybe I can skip this part if I come from 'deal_pending' state?
Thanks,
Stephane.
On Feb 12, 6:27 pm, Brian Quinn <
br...@spreecommerce.com> wrote:
> Yes, adding list_price is sufficient provided everyone pays he same actual price. Using promotions would allow for additional flexibility, for different prices for different sets of users / conditions, albeit at the cost of extra complexity.
>
> --
> Brian Quinn
>
> Co-Founder, CTO
> Spree Commerce, Inc.
http://spreecommerce.com
>
> On Sunday 12 February 2012 at 17:11, Stephane wrote:
>
>
>
>
>
>
>
> > Brian,
>
> > I have been struggling around the cart line item and variant prices.
>
> > I basically want a product to have (like amazon does) :
> > - List Price
> > - Price : real price of the product used in the cart.
>
> > Adding a field like "list_price" column to variant would be enough to
> > reflect a discount instead of having adjustments on the order total.
>
> > What do you think ?
>
> > Stephane.
>
> > On Feb 4, 3:11 am, Stephane <
stephanebou...@gmail.com (
http://gmail.com)> wrote:
> > > Brian,
>
> > > I have been looking through the code about promotions, adjustment and
> > > calculators.
>
> > > Considering a promotion:
> > > - event_name : spree.cart.content_changed
> > > - rules : match a specific product
> > > - action : flat rate per item with amount.
>
> > > Adding the product matching this promotion rules results in an
> > > adjustment on the order total.
>
> > > So this prevents us to reflect the discount in the cart's line_item.
>
> > > How would you proceed ?
>
> > > Thanks,
>
> > > Stephane.
> > > On Feb 2, 2:31 pm, Stephane <
stephanebou...@gmail.com (
http://gmail.com)> wrote:
>
> > > > Sorry for the confusion, minimum quantity is exactly B as you
> > > > explained.
>
> > > > Thanks I will try to follow my previous post.
>
> > > > I will keep this post up to date as I progress.
>
> > > > Stephane.
>
> ...
>
> read more »