I though it would be as easy as editing the confirm.tpl file and either adding a new 'text' element, and then adding that in the controller file and the language file, etc. Or, just hardcoding it in the confirm.tpl file.
But I can' seem to find what I'm looking for. It's the shipping method that shows near the sub-total and total (see pic). Any suggestions as to where I would find this?
EDIT: if you keep reading you'll see that there is a better option than just changing this text (which I wasn't able to do anyway).
EDIT: there are a couple of small bugs (see here: http://forum.opencart.com/viewtopic.php ... 24#p131094), but the vQmod xml file is functional and useable
Attachments
Checkout-Confirmation-1.jpg (51.4 KiB) Viewed 11192 times
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Marc
OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Sorry. I saw that in your post but...I don't want it to change anywhere else but the spot circled in red

Unfortunately that's not possible the way it's coded, as that text is generated inside a foreach loop. You'd have to remove that loop and "hard-code" all your fields there, but that's probably not the best idea. If, down the road, you were add another field in the checkout process (minimum fee, handling fee, another shipping module, etc.), you'd have to remember to add that field manually, as well.
If you do want to change it, look for this code on confirm.tpl:
Code: Select all
<?php foreach ($totals as $total) { ?>
<tr>
<td align="right"><?php echo $total['title']; ?></td>
<td align="right"><?php echo $total['text']; ?></td>
</tr>
<?php } ?>
OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English
I want the text that's there to stay as is, I just want to add (ex GST), like the Sub-Total. I find the way amounts are displayed can be a bit confusing. My store is set to display prices with tax (as per Australian law), and this works well, but when you start going through the checkout, it can get confusing. Cart shows prices including tax, then shipping selection is including tax, but then checkout confirmation shows everything ex tax, and then it adds on the tax at the end (the invoice/order confirm email sent to customers is the same as checkout confirmation, again a bit confusing).
So, instead of trying to change how OpenCart displays prices in checkout confirmation/invoice email, I've just added the the text (ex GST) to the areas that it's required.
If I do this to "Registered/Insured Postage", it will fix the problem on the checkout confirmation page, but it will add it elsewhere and in some places (ie, checkout shipping), the amount is displayed with tax.
Ideally, I think I would like to change the way prices are displayed in checkout confirm and on the invoice. I might look into the possibility of this). Though it may mess up international orders (which are ex tax).
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Now, trying to get the shipping price to display with tax...

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
It shows with tax on the shipping method page, so hopefully I can find the code to replicate.
Attachments
Checkout-Confirmation-2.jpg (35.45 KiB) Viewed 11172 times
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
http://forum.opencart.com/viewtopic.php?f=31&t=6627
I didn't bother with the admin side of things explained in that thread, but I did change a couple of other catalog controllers/models in order to have the inc GST/tax prices consistent throughout my store.
The only problem I found was that after I had applied the code in that thread, the postage was still showing as ex tax (ex GST) in checkout confirm.
Johnathan (http://www.getclearthinking.com) helped me by directing me to this post that explains how to change the postage price to include GST:
http://forum.opencart.com/viewtopic.php ... =40#p99131
To summarize that post (in Johnathan's words):
For my Australia Post shipping module, $cost turned out to be $postcharge[0], but the code still worked.The first part of that post is just a USPS bug, but start reading from, "The display for taxes is still a bit buggy." It has a suggestion in there for changing the USPS shipping model file, so if you find the same $quote_data array in your shipping model file, the same solution might work. Basically, you need to wrap the $cost variable in $this->tax->calculate(), like so:
and then set the tax_class_id to 0 (so it doesn't calculate tax twice).Code: Select all
$this->tax->calculate($cost, $this->config->get('usps_tax_class_id'))
No guarantee that it'll work, but most of the shipping model files have similar code, so it may fix your problem.
So, this was good, my shipping/postage cost in checkout confirm was now displaying the full, inc GST amount. But, something in the modified code (probably "set the tax_class_id to 0") was causing my "Inc GST" sub-total (Admin->Extensions->Order Totals->Taxes) to only calculate/show tax/GST on the cost of the product, and ignored the tax/GST in the postage amount.
Again, Johnathan (http://www.getclearthinking.com) to the rescue:
What this does is make the "Tax" sub-total not visible anymore. If you just disable "Taxes" in admin, then it doesn't seem to calculate the tax (this is what I found), so hiding it was the next best thing. Just remember that for this bit of code to work, you have to change the word Tax in:I'm not sure of the code that's causing this, but the easiest way around it is to not generate the HTML for that line of the order totals. You should be able to do this (replace "Tax" with whatever the title of that line is):
IN:REPLACE:Code: Select all
/catalog/view/theme/YOURTHEME/template/checkout/confirm.tpl
WITH:Code: Select all
<?php foreach ($totals as $total) { ?> <tr> <td align="right"><?php echo $total['title']; ?></td> <td align="right"><?php echo $total['text']; ?></td> </tr> <?php } ?>
This is only for the confirm page, but you can do the same edit on the /template/checkout/cart.tpl and /template/module/cart.tpl files to erase the line there.Code: Select all
<?php foreach ($totals as $total) { ?> <?php if ($total['title'] != 'Tax:') { ?> <tr> <td align="right"><?php echo $total['title']; ?></td> <td align="right"><?php echo $total['text']; ?></td> </tr> <?php } ?> <?php } ?>
Code: Select all
<?php if ($total['title'] != 'Tax:') { ?>
There is one little bug in all of this though:
if the customer is paying via PayPal (and maybe other gateways), the "Tax" amount is shown again after they are redirected and unfortunately, it's the incorrectly calculated amount mentioned above.
I'm going to live with this for now, because I still have to issue official tax invoices through my accounting software, so the customer will always get an invoice with the correct tax/GST amount on it.
It would be great to have the tax calculate correctly, because I would still like to show customers at checkout confirm how much tax/GST is included in their order, but for now I'm happy...
Thanks to dbstr and Johnathan for their code.
EDIT: this is working with multiple currencies and multiple tax rates (ie. for different geo zones) on my site.
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Will show prices with GST (tax) in checkout_confirm/guest_step_3 and order history.
Haven't been able to get the order_confirm email showing taxes for the individual product prices yet.
Paypal tax bug (see above) still not fixed.
EDIT: see FIRST post for the vQmod xml file!
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
Code: Select all
// dbstr - Get Tax Class Id.
public function getProductTaxClassId($product_id) {
$query = $this->db->query("SELECT tax_class_id FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product_id . "'");
Because, now that I've been using vQmod, I can see an error in my log stating:
These two lines are:Undefined variable: tax_class_id in vqmod/vqcache/vqcache_catalog_model_checkout_order.php on line 294 (and 297)
Code: Select all
'price' => $this->currency->format($this->tax->calculate($product['price'], $tax_class_id['tax_class_id'], $this->config->get('config_tax')), $order_query->row['currency'], $order_query->row['value']),
'total' => $this->currency->format($this->tax->calculate($product['total'], $tax_class_id['tax_class_id'], $this->config->get('config_tax')), $order_query->row['currency'], $order_query->row['value'])
So, just be aware that the vQmod/code changes above are slightly buggy, but do still work in general...
I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1

Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
I'm sure I'm missing something incredibly obvious, but I've been going around in circles...
I have installed vQmod as per the instructions here - http://forum.opencart.com/viewtopic.php?f=23&t=24529 (basically just an upload and instant install). I have then upload the vqmod_catalog_show_ALL_prices_with_GST.xml file to vqmod/xml/ . I have checked www.mysite.com/vqmod/install/ and it says "VQMOD ALREADY INSTALLED!" so I presume it's working fine.
However, I can't see any changes to the checkout confirm page etc?
Thanks for any help

I heart cmd-f, cmd-c, cmd-v, cmd-z + vQmod.
My favourite page...
v1.5.4.1
getting in a pickle with this
installed the vmod, installed all - shows prices with tax ....
the shipping still shows ex vat - i'M A BIT LOST
This is what I want to changehe first part of that post is just a USPS bug, but start reading from, "The display for taxes is still a bit buggy." It has a suggestion in there for changing the USPS shipping model file, so if you find the same $quote_data array in your shipping model file, the same solution might work. Basically, you need to wrap the $cost variable in $this->tax->calculate(), like so:
Code: Select all
$this->tax->calculate($cost, $this->config->get('usps_tax_class_id'))
and then set the tax_class_id to 0 (so it doesn't calculate tax twice).
'text' => $this->currency->format($this->tax->calculate($cost, $this->config->get('parcelforce_48_tax_class_id'), $this->config->get('config_tax')))
);
any help appreciated
That is what I want so I uploaded it to my store /vqmod/xml
But still, it looks like nothing is changed.
It's just confusing for the costumers to see the price without tax and then what the tax is.
I want them to see all prices with tax and then by the checkout the tax line can say "of which tax is" to inform that tax is included.
Attachments
tax.png (195.21 KiB) Viewed 10405 times
in vqmod_catalog_show_ALL_prices_with_GST.xml:
Code: Select all
'value' => $this->cart->getSubTotal(),
Code: Select all
'value' => $sub_total,
Code: Select all
'text' => $this->currency->format($this->cart->getSubTotal()),
Code: Select all
'text' => $this->currency->format($sub_total),
But not my flat rate shipping module. that still shows without tax rate added.
Users browsing this forum: No registered users and 1 guest