Add additional costs at "Upload your image" field

  • Posts: 43
  • Thank you received: 6
  • Hikashop Multisite
1 month 5 hours ago #354746

Hi Nicolas,

Okay, I get it (I guess ;-)).

I've come a little step further, but I'm not completely there yet. I'm struggling with the formulas, probably because I don't speak boolval and so on. So, I've simplified the choices.

Situation 1:

  • product has 4 custom fields: kaarsjes + ijsfontein2 + bvs + marsroos
  • {cart_product_quantity}*({price}+{kaarsjes}+{ijsfontein2}+{bvs}+{marsroos})
  • this functions well, at least... almost* well
  • ap.lc/N550n

Situation 2:
  • product has 5 custom fields: kaarsjes + ijsfontein2 + bvs + marsroos + uploadafbeelding
  • {cart_product_quantity}*({price}+{kaarsjes}+{ijsfontein2}+{bvs}+{marsroos}+boolval(strlen({uploadafbeelding}))*8.5)
  • this doesn't add the upload file €8,50. Everything else is almost* correct
  • ap.lc/lSRSB
  • here, not only the custom fields are added without VAT, also the product itself shows without VAT at the "Calculated price"

Situation 3:
  • product has 6 custom fields: personen30 + kaarsjes + ijsfontein2 + bvs + marsroos + uploadafbeelding
  • {cart_product_quantity}*({price}*{personen30}+{kaarsjes}+{ijsfontein2}+{bvs}+{marsroos}+boolval(strlen({uploadafbeelding}))*8.5)
  • this doesn't work at all.*. When for instance 30 persons are selected, only €2,90 is displayed
  • ap.lc/cD12t

*Almost: all of the custom item fields have issues with VAT. It seems that when the product is in the shopping basket, an extra 9% VAT is added to the custom fields. I've tried to search into the settings of the VAT, if I have to switch off/on something, but I can't find it.

Conclusion: I've probably messed up the formulas. I'm really very sorry for that...!

So, I'm/we are almost there, I hope (for you!).

Thanks again for your help!

Regards,

Ans

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

  • Posts: 79892
  • Thank you received: 12704
  • MODERATOR
1 month 1 hour ago #354754

Hi,

The taxes will indeed apply on all the values.
So for example, if you have a rule like this:
{cart_product_quantity}*({price}+{field})
Suppose that the quantity is 1 the price without taxes is 10 and the field value is 10, the system will calculate the price without taxes to be: 1 * ( 10 + 10) = 20 and then it will add the tax rate on that €20 price.
So the values you enter in your custom fields need to be the values without taxes.
And it's the same for the 8.5 value. It will be the value without taxes and the taxes will be added on top of it. So you might need to adapt this in your formula.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum