Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Payment
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2011 at 19:41 UTC
Updated:
10 Aug 2017 at 23:03 UTC
Jump to comment: Most recent
Comments
Comment #1
rszrama commentedIt's not possible right now, because we need a special condition to detect the payment method selected in Checkout. I thought there was an issue for this already, but I didn't find it on a quick search so I'll leave this open.
Comment #2
ytsurki would also be interested in this !
may be a condition ?
Comment #3
rszrama commentedJust added this in. Merry Christmas.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/10f0287
Comment #4
ytsurkhere first test results ..,
i worked with version 7.1 - do i have to use all -dev ?
and added the above new code.
i could use the condition in product pricing rules and in the tax rule component.
(i guess the rule component is the right place ?)
but it does not change when updating the paymentmethod on the /review page ..
Comment #5
rszrama commentedYeah, it won't be possible to make it change anything on that AJAX request, but if you have a page after the payment method selection it will be effective then. Also, you don't have to use all -dev, just Commerce until we roll the 1.1 release hopefully later today.
Comment #6
ytsurkwoaw -- keep it going :D
Comment #7
ytsurk.. i dont get it ... :(
could you pls explain me where to set the condition to have the intended behavoir,
that is:
after the submit of the selected paymentmethod on /review,
the rule should be fired > sales tax added, if paymentmethod equals a specific
and then to see the result on /payment, showing the order there ?
- in my opinion, i add the new condition here: admin/config/workflow/rules/components/manage/,
plus adding the action 'After updating an existing commerce line item' here: admin/config/workflow/rules/reaction/manage/
(after trying a lot of combinations)
i get these messages in the dblog:
Comment #8
ytsurkgot it working now ..
just added the condition to the standard SalesTax ReactionRule,
and moved the paymentselection to step 1 in admin/commerce/config/checkout/form
as the standard action - calculate price - is not fired after changing payment-method only ..
Comment #9
brunorios1 commentedMy experience with this feature:
1) i created a new Tax "Payment Method Discount"
admin/commerce/config/taxes/types/add
2) i added a condition "Selected payment method comparison" to this tax type rule
admin/commerce/config/taxes/types/payment-method-discount/rule
Data Selector: commerce-line-item:order
Payment Method: [choose the method that you want to give a discount]
3) i added a reaction "Calculate taxes for a line item" to this tax type rule
admin/config/workflow/rules/reaction/manage/commerce_tax_type_payment_method_discount/add/1/action
Data Selector: commerce-line-item
Tax type: Payment Method Discount
4) I added a new Tax Rate
admin/commerce/config/taxes/rates/add
Evaluate: -.05 (5% discount)
Type: Payment Method Discount
5) I moved the "Payment" pane to the step "Checkout" in the checkout form and the "Shopping cart contents" to the step "Review order"
admin/commerce/config/checkout/form
It's working!
This is the right method?
Thank you very much for this feature!
Comment #11
leramulina commentedThank you! This post helped me!
brunorios1 - Thank you very much!
Comment #12
roxart commentedmaybe here someone can help? :) not sure but shouldnt it also work in pos?
https://drupal.stackexchange.com/questions/243556/why-does-the-selected-...