News:

Support the VirtueMart project and become a member

Main Menu

modification of calculationh.php

Started by schluff81, April 02, 2013, 22:07:38 PM

Previous topic - Next topic

schluff81

Hi folks,

can anyone give me a hint how to modify the calculationsh.php (administrator -> helpers) so that a "cut in price" is not substracted from the final bill but added ontop?

The aim is to add some kind of "service fee" to each order. I think this could be the best way.

---> Please compare this post in this context: http://forum.virtuemart.net/index.php?topic=114434.0

tanks a lot

Daniel

PRO

no need to hack the core

ALSO: calculation rules can be positive & not just subtract

&&
Plugins can also do this

I have modified a shipping plugin to give NEGATIVE values before, when they normally just add shipping cost.

It's just + or -

schluff81

Hi, I also thought so... BUT: If I use the plus as an operator the entered amount is still substracted from the final price. It looks like it doesn't matter wether I choose plus or minus (cf. attachment). BUG?? (VM 2.0.20b)

You are talking about plugins... Can you same some please?

Daniel

[attachment cleanup by admin]

PRO

I have tested this, and you are right.

ALSO: do you charge shipping?


schluff81

Hi,

yes, I charge schipping... what do you suggest? Please keep in mind that I only want to charge a service fee once (and for some products I don't need a "service fee" at all.

Daniel

K&K media production

Hi,

please try the attached calculationh.php



[attachment cleanup by admin]

schluff81

Quote from: kkmediaproduction on April 04, 2013, 20:39:34 PM
Hi,

please try the attached calculationh.php



That solved the problem!!! Thank you very very much. The only curiosity which now occurs is that vouchers show the wrong prefix (no minus) in the shopping cart...