Price calculation

  • Posts: 4
  • Thank you received: 1
4 days 1 hour ago #367142

-- url of the page with the problem -- : jouwnaambord.demodotcom.nl/basisborden/b...bord-wit-aluminium-5
-- HikaShop version -- : 5.3.0
-- Joomla version -- : 5.x

I use the plugin Hikashop - Price Calculations, and I made a calculation but it's not working and I can't figure out what's wrong with it.
This is my calculation:
prnt.sc/YvgRNeYVRx6T

This is my product:
prnt.sc/1J8OSucg5Qrj

De names are the same, Formaat is the only one working (in the back it's formaat_staand_tm40_dibond)

Also, once you have chosen an option and then choose another option where the first option is no longer visible, because it is not an option, you will still get that option as selected.

For example, now I have clicked on decorative caps and then you see the color of the sierdoppen (kleur sierdoppen) in the shopping cart, but I then chose UV coating and that is only possible with blinde bevestiging....

prnt.sc/y0hG71g3TfZ8

The same applies to the price, once you have chosen things, it has added that up and if you then choose something else, the price does not go down anymore. You can see that very well at jouwnaambord.demodotcom.nl/basisborden/b...bord-wit-aluminium-5

prnt.sc/2vk8I6LCiWgT

Also it adds 21% tax at the end of the calculation... I don't want that. I hope someone can help :)

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
3 days 10 hours ago #367145

Hi,

1. The plugin calculates the price without taxes.
Then, HikaShop will add the taxes based on how you configured your product and your tax rules.
So, if you selected a tax category in your product and you have a corresponding tax rule matching in the System>Taxes menu, then the taxes will be added to the calculated price. That's normal.
If you don't want taxes to be calculated, then, like for a product which doesn't rely on this plugin, you just want to not select a tax category in the product settings.

2. The plugin doesn't take into account the "display limited to" setting of custom item fields.
You need to enforce this with conditions.
So for example, if you have a custom field "fieldA" with the values 0 and 10, and a "fieldB" with the values 0 and 5, and that fieldB is limited to display only when fieldA has a value of 0, then you want to configure two formulas:
- first, you want a condition fieldA==0 and a formula {fieldB}
- second, you want a condition fieldA!=0 and a formula {fieldA}

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

  • Posts: 4
  • Thank you received: 1
2 days 4 hours ago #367167

Hi,

Thank you :)

I would like to add taxes, but I already included it in the price I add through the calculation plugin. So all prices I add are including taxes, I don't want the calculator to add taxes by himself...But I can't find that option to choose. In the products I have a price without taxes and a price with taxes.

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
2 days 1 hour ago #367168

Hi,

What you need to understand is that the price calculated by the plugin is handled the same as the price from the product.
And a product only has a price without taxes stored in the database.
The price with taxes is always calculated dynamically based on the tax rules and the price without taxes of the product.
So, the plugin loads the price without taxes of the product, recalculate its price without taxes with the formulas in the plugin and the values selected in the custom fields, and then the taxes are applied.
So, the cleanest would be to change your custom item fields values in order to use the amount without taxes in the "value" input field.
That's what I would recommend. That way, your HikaShop will provide you with the tax amounts for your accounting.
Another option would be to change the "product tax category" setting of products to "none" and change the "price without taxes" of your products to include the taxes (both can be done with a mass action).

That way, either you have taxes calculated dynamically or no tax calculated at all, but it's consistent between the prices entered in the products and the prices entered as values in your custom fields.

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

  • Posts: 4
  • Thank you received: 1
1 day 7 hours ago #367181

Alright thank you!

How do you prevent the price from being added but not taken away when it is no longer selected?
Now the customer chooses an option and the price is added, then he chooses another option and that price is added, but if he changes the first option, making the 2nd option not a possibility, then the price remains.

the option with the red arrow is the only one that adds money to 0 euros that the product itself costs.

prnt.sc/kfSq9c4PuX7t

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

  • Posts: 83824
  • Thank you received: 13571
  • MODERATOR
1 day 4 hours ago #367184

Hi,

I don't know how exactly you reached that result.
However, I believe you're saying that you select an option with a price in one custom field "A", and then, in another custom field "B", you select something which hides the custom field "A". However, the value selected in "A" is still taken into account in the calculated price.
Is that correct ?
The solution is what I explained in point 2 here:
www.hikashop.com/forum/4-how-to/909420-p...culation.html#367145
You need to configure different formulas with different conditions to match with the display restrictions you configured in the custom fields.
Or are we talking about something else ?

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

  • Posts: 4
  • Thank you received: 1
7 hours 48 minutes ago #367203

Yes! That's what i'm talking about. The option isnt even visible anymore and still adding its price.

I'm still figuring out what you mean with different formulas. It's like making a formule for every possible option? I'll give it a try :)
Thanks for you patience haha it's still new for me.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.064 seconds
Powered by Kunena Forum