I have made a coupon [coupon_code = SWIMFREE]
if category
is swimming equipment
and hobby
is swimming
will be discount by 50%.
and now I have problem about 3 steps checkout. Here's the description ...
- Checkout Cart : to apply to coupon
- First Step : Shipping and Billing Address
- Second Step : Pick your Hobby (has another
sales_flat_quote table
,sales_flat_quote_hobby
) - Final Step : Checkout->Overview
What i wanted is: when the coupon applied and the hobby is swimming, the third step changing the price to price every product, and coupon is still be shown there.
How to intercept the coupon after Hobby step?
Example case step by step:
1. On cart it's already added
- Swim Suit's normal price is 100$ (Swimming Equipment Category)
- Kevlar's normal price is 50$ (Shooting Equipment Category)
- Coupon Applied SWIMFREE, Grand Total is 100$ (because of the Coupon condition)
2. On Shipping&Billing Step
- Shipping and Billing address - Next
3. On Hobby Step
- The Football hobby is checked (radio button) and confirmed
4. On Overview Step then
- Swim Suit's price is 50$ (Swimming Equipment Category)
- Kevlar's price is 50$ (Shooting Equipment Category)
- Coupon Applied SWIMFREE, Grand Total now is 150$ (because the hobby isn't swimming)
i have a lot of products, I've tried to add new attributes, but it's not related with the attribute, because it's on sales_flat_quote_hobby
I've tried to change Sales/Model/Quote/Subtotal.php
to set the all product prices on cart, but it seems useless.
already found the answer by myself:
It is possible to create a customized coupon condition.
this function will be called every step loaded. then checked if return true, then the coupon will be applied, if return false then the coupon won't be applied.
Thank's to All Who Participated. i appreciate it.