- Posts: 135
- Thank you received: 5
Checkout display Unit Price and Total price with GST
-- Joomla version -- : 4.1.0
-- PHP version -- : 7.3.27
-- Browser(s) name and version -- : Brave Version 1.20.110 Chromium: 88.0.4324.192 (Official Build) (64-bit)
In the checkout can I show the unit price and then the total price with the tax added to it?
Please Log in or Create an account to join the conversation.
Yes, in the HikaShop configuration, under the Checkout tab, you have your checkout workflow.
There, you have the "cart" view settings. And among them you have the "Price with tax" which allows you to display these two prices either with taxes or without taxes.
Please Log in or Create an account to join the conversation.
Thank you, yes, yes I had the option turned on, that's why I came to you to see if there is another way!
So with it turned off I get the unit price.
When I turn it on, I get the Unit price with Tax, I want the unit price $6.69 and not $7.36 and the total Price $7.36 (incl Tax).
Does this make sense?
Mark
Please Log in or Create an account to join the conversation.
Ok.
So supposing that this setting is turned on, you can edit the file show_block_cart via the menu Display>Views.
There, you can change the code:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
First, beware that your browser search might not be able to search inside the code editor.
So your screenshot doesn't prove that the line of code I'm talking about isn't in the view file.
Please check manually.
If you really don't have it, then it means that you have an old view override of show_block_cart on your website and you would have to delete the override to redo it with the latest version of the view file.
Please Log in or Create an account to join the conversation.
The search function works fine and fines anything inside of the code editor.
This is a new installation of HikaShop Business and there have been no changes edits to any of the display files only have made custom fields.
I have attached the code of the show_block_cart.
So what now?
Regards,
Mark
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please accept my sincere apology for not looking through the file before sending it.
Ok I have modified the file, selected a product with tax to the shopping cart, gone to finalise my order and get a syntax issue.
Please see attached.
Regards,
MSF
Please Log in or Create an account to join the conversation.
The error is not with the code change I provided.
It's with the other line that has been changed.
As you can see in your first screenshot, the variable $onchange has been changed to $on-change and that's why PHP is giving you that error.
This is probably done automatically by a security extension you have installed on your website which does that to prevent potentially hacking attempts. So I would recommend you check with the support of that extension what can be done so that it doesn't interfer with that area of HikaShop. The simplest is to temporarily deactivate that extension when you're changing code in view overrides.
Please Log in or Create an account to join the conversation.
Found it, RSFirewall does a check on updated php files
Great wonderful support as usual.
It works prefect now.
Thank you.
I am sure I will have other questions.
Please Log in or Create an account to join the conversation.
How do I get the subtotal to be the value less tax in the checkout system?
So I have:
Subtotal : $5:57
GST: $0:56
Total: $6:13
Please Log in or Create an account to join the conversation.
Go in the HikaShop configuratoin, and under the Checkout tab, in the settings area of the "cart" view, turn off the "show taxed prices" setting.
Please Log in or Create an account to join the conversation.
Have set as suggested and still didnt work?
See attached
Regards,
MSF
Please Log in or Create an account to join the conversation.
The unit price is without taxes while the total price is with taxes.
That's not possible by default so I suspect that you've made a view override for the show_block_cart view file via the menu Display>Views. And the reason the subtotal doesn't abid to that setting must be linked to that view override.
Try renaming the file templates/YOUR_TEMPLATE/html/com_hikashop/checkout/show_block_cart.php to somehting else via FTP in order to disable it and it should hopefully work.
Please Log in or Create an account to join the conversation.
yes I had changed the show_block_cart as you had suggested, to
Now I get the subtotal, GST, and total correct but now the single product goes back to Unit Price Only.
See attached
Please Log in or Create an account to join the conversation.
Then, instead of having the "show taxed prices" setting turned on and the code I gave before to remove the tax on the price without taxes, you can have that setting turned off, and change the line:
Please Log in or Create an account to join the conversation.
perfect as normal, code works perfectly.
M
Please Log in or Create an account to join the conversation.