How to separate custom fields in cart and invoice view?

  • Posts: 61
  • Thank you received: 5
  • Hikashop Business
6 days 11 hours ago #366841

-- HikaShop version -- : 5.1.5
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.4.5

Hi!

I created two custom fields:

a) pfand (i.e. 3.75)
b) pfand tax (i.e. 19 %)

In the checkout (cart) and on the invoice (pdf) I have to separate these two fields. That said - I want to display one field (a) above the total sum (because it is part of the total sum), and the other (b) after the total sum (because it only shows the included tax).

Problem is, if the custom field tax is also listed above the total sum, it will be summarized to the total sum, that's wrong.

Attachments:
Last edit: 6 days 6 hours ago by Rusty.

Please Log in or Create an account to join the conversation.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
5 days 19 hours ago #366856

Hi,

So, if I understand correctly, your issue is that the "Pfand 19% Mxst." value is added to the total, while it shouldn't because its value is already included in the "Pfand" value.
In your cart plugin settings, which you used to add both, you have, for each value a toggle "fee already included". You want to activate that setting for the "Pfand 19% Mxst." formula. That way, it won't be added.

The following user(s) said Thank You: Rusty

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 5
  • Hikashop Business
5 days 18 hours ago #366861

Hi,

nicolas wrote: So, if I understand correctly, your issue is that the "Pfand 19% Mxst." value is added to the total, while it shouldn't because its value is already included in the "Pfand" value.
In your cart plugin settings, which you used to add both, you have, for each value a toggle "fee already included". You want to activate that setting for the "Pfand 19% Mxst." formula. That way, it won't be added.


Okay, that helped - for calculation. Thank you!

But the second thing remains problematic. Now we have a "visual glitch". If you take the order of the values you would summarize it from above to bottom (look at the red text of the image):



But this would result in 12,85 - the wrong total we "fixed" in the plugin. The current total sum (Gesamtsumme) in my screenshot is calculated correct (11,90). But if the tax from the custom field (Pfand 19%) is listed above the total sum it seems wrong (visually). This is the point why I must change the position of this tax to the end of the cart (blue arrow). Otherwise it would make no sense to the customer.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83674
  • Thank you received: 13545
  • MODERATOR
5 days 7 hours ago #366872

Hi,

I understand what you want to do.
However, that's not easy.
This requires modifying the code of each view / email which displays the order information in order to adapt it.
The code modification is not that complex. If you're a developer it's actually relatively easy. I could do it in 5 to 10 minutes for each view.
However, there are 5 emails HikaShop can send for an order, 2 views for the invoice, 1 view for the checkout, 1 view for the cart module, 1 view for the cart details page, 1 view for the order details page. So, that's about 2 hours of work if I do it myself on your website.
And the modification is not the same everywhere so it's not like I can give you a generic instructions set. And if I had to write all the necessary instructions there, it would probably take me a bit more than half a day, plus the back and forth when you make a mistake and I need to spend extra time discussing the issue with you to figure out what you did wrong. So, that's not something I can explain to you here.

I think the best would be that I work for you on this as a custom job. It will cost about 150€. That might sounds like a lot but you won't find anyone else able to do this properly for less. If that's something you want me to do, please go through our contact form to discuss this together.

Otherwise, I can provide 2 different alternatives:
- Instead of activating the "fee already included" setting of the deposit tax fee, you could modify the formula of the deposit fee so that it calculates as the deposit without taxes. That way, you would get:
subtotal
deposit without taxes
taxes on the deposit
total
taxes on the subtotal
and the total would match with subtotal + deposit without taxes + taxes on the deposit
- You could leave the "fee already included" setting of the deposit tax fee activated, but change its label to something like this:
"Pfand 19% Mwst. (already included in the Pfand value above)" or something like that. That way, you make it clearer to the user that they need to disregard this value when summing the values to get the total.

These two alternatives are not exactly what you want but they don't cost anything to implement for you.

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 5
  • Hikashop Business
3 days 12 hours ago #366883

Hi nicolas,

thank you for your offer. I think about it.
In the meantime I had a - maybe - interesting idea. But I will post it here ( www.hikashop.com/forum/orders-management...r-change.html#366884 ) to not confuse this thread.

Cheers
Rusty

Last edit: 3 days 11 hours ago by Rusty.

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum