15

I need to show Total with taxes at admin/commerce/orders using Commerce. Here the orders are shown without taxes, how can get to show the total including taxes? I didn't see anything like a Total with taxes in the view fields.

UPDATE 2 I need that the system show the taxes when the order status is Review It seems to me that the taxes are added when the status is Completed. or Pending. See my first capture.

Update 1: I also see that the taxes are not shown in admin/commerce/orders/XX nor in admin/commerce/orders/XX/edit. How am I supposed to see the taxes for the order?? This can't be right.

enter image description here

Capture with PENDING status

enter image description here

11
  • no one for this?
    – chefnelone
    Commented Jul 24, 2014 at 9:15
  • 1
    Just in case you didn't know, the display you see there is based on how the price field displays on the order entity (which can be altered at admin/commerce/config/order/display). It's been a while and I can't remember the right formatter settings to show a price with taxes though (or whether it comes with core Commerce). (Maybe Commerce price by components could help?)
    – Andy
    Commented Jul 25, 2014 at 10:11
  • I can't get it. I enabled commerce_price_components then I select "Price by components" and checked all my Taxes to be include in the price at: admin/commerce/config/order/display. I also did the same for the Total field in the views which generate the Order listing. But the taxes are not added to the base price at admin/commerce/orders. What am I missing here?
    – chefnelone
    Commented Jul 28, 2014 at 9:14
  • I also see that the taxes are not shown in admin/commerce/orders/XX nor in admin/commerce/orders/XX/edit. How am I supposed to see the taxes for the order?? This can't be right.
    – chefnelone
    Commented Jul 28, 2014 at 9:27
  • I don't get at all what this question is about. 1) Which tax rates & tax types do you have on your order? (Sales tax? VAT? Which percentage?) 2) Did you change the inclusiveness of the tax types? 3) If you're using VAT, are you entering prices with or without VAT? 4) Do you not see the tax at all in any component? Sounds like you have no taxes applied at all. Commented Jul 28, 2014 at 13:47

4 Answers 4

2

You can use the Commerce price by components module.

Extension to Drupal commerce that provides a price formatter to enable/disable price components such as discounts or taxes when displaying prices. This gives the admin absolute control over which components should be displayed and which shouldn't. It also provides two Views handlers to display/hide price components in cart totals and order totals. Additionally it has basic rules support that gives to the commerce administrators the ability to do conditions using price components such as discounts or taxes and react accordingly.

Install the module and change the commerce total field of the view with this one.

2
  • This is not the problem, I already have this module enabled. I'll paste my last comment: "@BojanZivanovic I upload a picture in my question. I realized that the problem is that the taxes are added in the order if the order state is COMPLETED or PENDING. But it is not added in the order if the order state is REVIEW. How can I get the taxes added in the REVIEW state? "
    – chefnelone
    Commented Jul 30, 2014 at 17:47
  • I think the problem could be on the calculation taxes rule. Could you check that there is not commerce order status condition in this rule?
    – jorgetutor
    Commented Sep 10, 2014 at 11:25
1

To add the display to a custom block or page design:

  1. Go to "Home » Administration » Store » Configuration » Order settings » Manage display"
  2. Click on the link at the bottom that says "Custom Display Settings"
  3. Enable any custom display mode by clicking the check box beside it. If you have Display Suite, you could also make a new view node. If you go that route, you'll have to make the view mode first, and click the check box beside "Commerce Order" to make sure it's connected to the right part of Drupal.
  4. After you've clicked a check box, click Save.
  5. A button will appear near the tabs at the top of the "Manage Display" screen, and it will be named after whatever display node you created. If this is the first one you activated, there will also be a "Default" button.
  6. Click that button to display the view mode you want.
  7. Drag any unwanted display fields below "Hidden" to take them out of your custom display.
  8. Click "Save" to finalize the display.
  9. Click in the menu beside "Order Total" and pick "Price by components."
  10. A configure button will appear beside the menu. Click that button to expand the list of available components.
  11. Click the check box beside whatever fields you want to display.
  12. Click "Save."

To add the display of sales tax to a view:

  1. Construct or edit a view and click "Add" beside the list of fields.
  2. Click the check box beside "Order Total."
  3. In the field configuration dialog, select "Price by components."
  4. Click the check box beside whatever fields you want to display.
0

Edit the view on the admin/commerce/orders page.

Edit the total field and set the formatter to raw amount then exclude field from display.

Next add the tax field to the view and set it to be excluded and to show raw amount.

Then add a php views field that is provided by Views PHP. Now you can use the replacement keys in the php code and you can do something roughly to the follow.

return commerce_currency_format([tax] + [total], 'USD');

Give this php field the label of Title and you should be all set.

1
  • sorry for late reply. The Tax Field is not available. Not listed in in Add Fields. Do I need to add a RelationShips for this?
    – chefnelone
    Commented Sep 10, 2014 at 9:17
0

There are two places where commerce adds taxes, based on the type of taxation system (vat vs. sales). I think you have activated the 'tax included in this price', but didn't disable the rules that add taxes to the price afterwards. Once you will do that, the tax will be displayed with my price as soon as an item is added to the cart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.