Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Checkout
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2012 at 14:14 UTC
Updated:
7 Apr 2014 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rszrama commentedYeah, I'd be up for something like this in core. I don't know the best way to represent it on the order edit form, though. Perhaps the same patch could also address the fact that we need a way to trigger price calculation rules to do things like apply discounts / taxes. I don't suppose your module already does that, too?
Comment #2
klausiHm, currently I'm assuming that the prices are final if the admin triggers the checkout. But you are right, taxes are missing here :-(
Will look into it.
Comment #3
klausiI have introduced a second checkbox now: "Run the pricing rules when the order is saved.". This will execute commerce_cart_order_refresh(), not sure that is the right API function to use.
Code is in the sandbox.
Comment #4
rszrama commentedHmm, I just closed a related issue as duplicate, and the point in there was that there was no way to apply taxes to an order if the Cart module wasn't enabled, since that was the primary point of sell price calculation. I haven't looked at your code yet, but it may be we need some way to support the direct calculation of taxes, too, without relying on the shopping cart refresh.
Comment #5
klausiOk, so what we need:
a) an API function provided by commerce_tax for tax calculation. It takes an order as parameter.
b) a form alter in commerce_tax to add a checkbox "Run the taxation rules when the order is saved" to the order edit form (or similar).
c) a checkbox "Trigger the checkout completed event when the order is saved" at the order edit form. Provided with a form alter from commerce_checkout module.
Correct me if I got something wrong here.
Comment #6
rszrama commentedYou know, it may not need to be so specific to the Tax module. We want to support price calculation outside of the Cart module, but we may do just fine to add an API function to the Order module that calls commerce_product_calculate_sell_price() on each product line item on an order directly outside of a cart refresh. I'd say that if a site has the Cart module enabled, it should all be handled through that, but if the site doesn't then the Order module should make its separate approach available.
Comment #7
klausiIn the meantime I have released commerce_checkout_admin as full module, as we are using it in production. http://drupal.org/project/commerce_checkout_admin
Comment #8
rszrama commentedRelated to #1918978-4: Allow administrators to trigger price calculation on an order, I've rolled a patch that allows you to simulate checkout completion for an order via a local action on the order edit form.
Comment #9
rszrama commentedCommitted with an update function to disable the new feature on existing sites while leaving it enabled for new sites.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/465805b
Comment #11
rszrama commentedComment #13
santerref commented8: 1645252-8.checkout_completion_action.patch queued for re-testing.
Comment #15
rszrama commentedThis has already been committed and closed. Please don't reopen it.