Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Tax
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Aug 2011 at 12:39 UTC
Updated:
1 Aug 2013 at 10:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
rszrama commentedWas this from the test involving the anonymous user role condition?
Comment #2
jepster_No.
Comment #3
rszrama commentedAhh! I remember. I was thinking the tax was just missing, not not being displayed. I remember what you're talking about now. : )
(I am going to demote it to major, but we're going to try and address this in the 1.0 BoF real quick.)
Comment #4
rszrama commentedAhh, you know, as it turns out, you can simply do this in Views. Remove the "Line item summary" area handler and add in an "Order total" area handler. There is an ordering problem, though... the order total isn't being rendered into the HTML of the View for some reason while the line item summary is. I can't see what would make the one appear in the proper place and not the other. See attached.
Comment #5
bojanz commentedReverted the changes to the line item summary handler that were done by the "move to views form" patch, and added preprocess code that affects both summary and order total.
Also fixes the problem where the cart block had a views form generated around it for no good reason.
This change requires the latest Views (dereine committed a part of the fix just over an hour ago).
Comment #6
jepster_I've tryed this patch, but I get the following git-error:
noname:commerce jepster$ git apply -v bojanz_cart_tax.patch
fatal: corrupt patch at line 144
I'm in the root of the commerce-folder.
---
Another question: does this patch affect the tax inside of the block-cart? because in germany it's very important, that you display the tax in EVERY cart.
Comment #7
bojanz commentedTry "patch -p1". It doesn't affect tax. I guess you need the Order Total field for that (which this patch makes work)
Comment #8
jepster_When I type this in, my command line freezes..
Comment #9
bojanz commented"patch -p1 < bojanz.patch".
Comment #10
jepster_jepster$ patch -p1 < bojanz_cart_tax.patch patching file modules/line_item/includes/views/handlers/commerce_line_item_handler_area_line_item_summary.inc
patching file modules/order/commerce_order.module
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 143:
Comment #11
bojanz commentedReuploading the same patch. Just tried to get the latest git version of Commerce, patch applies with both git apply and patch -p1. Try redownloading it.
Comment #12
jepster_The patching worked now. I've downloaded it directly, without copying the contents of that file into another file (can't do it different before with google chrome). I've got the actual dev-version of views 3 and runned update.php.
But I still have the same problem. I've the »Commerce Order: Order total« field in the footer of my view already. No tax in my cart. See my screenshot.
Comment #13
jepster_Status changed.
Comment #14
bojanz commentedYou'll have to wait for Ryan's reply for that matter.
My patch actually had no intention of fixing anything tax related. It does two things:
1) Prevent Views Form from getting rendered around the cart block, when that block has no form elements.
2) Allow the Order Total handler to be added, and look the same as the Summary handler (above the buttons, not below).
Ryan told me to post the patch here.
How Order Total and Summary handle taxes is another question.
Comment #15
jepster_I've now looked into the code. Even in the
commerce-line-item-summary.tpl.php
file, theres no entry for tax. So there was not intended to display tax at the carts. But that's a huge problem for european shops. Because the tax must be displayed there. It would be great, if the tax could be displayed like on the checkout-page (screenshot attached).
So the tax-depending code from the checkout-page could be simply moved into the commerce-line-item-summary files.
A question: should the tpl-files be copied out from the commerce module-folder and moved into the theme-folder for themeing?
Comment #16
rszrama commented@jepSter - I think the patch is what you need. The idea is for people who need tax broken out on the Cart form, all you have to do is edit the View, remove the line item summary area handler, and add the Order total area handler. The same could possibly work on the Cart block, too, but you'd likely want to leave the line item summary handler (without displaying the order total in it) to include the View cart / Checkout links.
Comment #17
jepster_Ryan, I don't understand what you mean. I've already posted a screenshot at http://drupal.org/files/issues/Shopping%20cart%20summary%20(Commerce%20Order)%20%7C%20Commerce%20Kickstart.jpg -> here you can definitly see, that I already have the »Order total area handler« in my view.
I found out, that the tax-variable can be setted up in the commerce_line_item_handler_area_line_item_summery.inc file. When I define it in line 127 to the render-function, it goes into the template-file.
Comment #18
rszrama commentedThe only thing I can guess is you didn't save it or something. The output you're showing is only for the Line Item Summary area handler. It could be you replaced it on the wrong View. Once I get home I can edit it and make an export for you to import. I fly soon, though. ; )
Comment #19
jepster_Or please tell me the exact name of the view, I have to edit. Maybe I'm really in the wrong view. :-/
Comment #20
bojanz commentedTime for the patch to get committed, it's been two months.
It will break Commerce on all Views versions older than Aug 28th or so, but that's okay, especially if Views 7.x-3.0-RC2 gets released soon.
Comment #22
bojanz commentedViews has an RC3 release now, so this patch can go in.
Comment #23
rszrama commentedw00t w00t! Just saw that on Twitter. Also means I don't have to add backwards compatibility to a patch Damien integrated earlier. : )
Comment #24
jepster_@ bojanz:
Saw that at #21, that the patch failed testing. So why it should go in? o_O
Comment #25
bojanz commented@24
The point of my comment was that the patch was no longer blocked, since there's now a Views version we can require.
The test fails (exceptions) are actually one single notice which I'm looking into.
Comment #26
jepster_@25
so is this issue now solved?
Comment #27
bojanz commentedCan someone try to reproduce the notice locally?
I've been unable to. Might just be that the test bot is using a wrong views version.
Comment #28
bojanz commented#11: 1256302.patch queued for re-testing.
Comment #30
bojanz commented#11: 1256302.patch queued for re-testing.
The testbot might just hate me. The patch applies normally for me on my local machine.
Comment #32
jepster_So your patch seems to be still buggy.. or may you contact the maintainer of the test-bot?
Comment #33
bojanz commentedHere we go again.
I've renamed the issue to reflect the main goal of this patch. It obviously wasn't showing up in search correctly in its current form, leading to duplicate efforts.
Of course, the additional change in this patch is that it also fixes the positioning of the order total area handler.
That should be noted in the commit message.
edmund.kwok wrote the duplicate patch, so he should be noted as the co-author of this one.
Comment #34
bojanz commentedComment #35
rszrama commentedHappy to finally commit this. Sorry it took so long, jepSter, but better late than never. : )
fwiw, I did test the configuration of changing the cart form View so it uses the order total breakdown instead of the line item summary area handler, and it works as you need it to. Hooray!
Commit: http://drupalcode.org/project/commerce.git/commitdiff/3bc3967
Comment #37
rtrebu commentedHi, I think I have the same symptoms like jepSter. Price components missing on checkout page. Commerce Order: Order total enabled in Shopping cart summary view, but does not display. I know that It worked before, now it doesn't. Any ideas? Thank you four your truble
Comment #37.0
rtrebu commentedEdit