Support

Home Forums Event Espresso Premium Need to find which PHP file to modify for custom calculation using discount code

Need to find which PHP file to modify for custom calculation using discount code

Posted: November 9, 2016 at 11:29 am

Viewing 3 reply threads


jubileequeen

November 9, 2016 at 11:29 am

No. Your statement is not correct. I am saying the calculation for the tax on a voucher sale is wrong.
At regular retail : qty x base price $72.95 + 10.95 surcharge= subtotal x 13% tax = qty * ($10.91 per person + (72.95 +10.95))

If a promo/voucher code:
At the voucher price the HST like anything else based on the sale price in other words the voucher price.
retail price: $72.95
But calculation is voucher price ($42 flat voucher + 10.95 surcharge) x 13% tax + 10.95 surcharge = $6.88 + 10.95 = $17.83


jubileequeen

November 9, 2016 at 11:43 am

No. Your statement is not correct. I am saying the calculation for the tax on a voucher sale is wrong.
At regular retail : qty x base price $72.95 + 10.95 surcharge= subtotal x 13% tax = qty * ($10.91 per person + (72.95 +10.95))

If a promo/voucher code:
At the voucher price the HST like anything else based on the sale price in other words the voucher price.
retail price: $72.95
But calculation is voucher price ($42 flat voucher + 10.95 surcharge) x 13% tax + 10.95 surcharge = $6.88 + 10.95 = $17.83


jubileequeen

November 9, 2016 at 11:44 am

Sorry. I copied and modified content from my client. I am simply looking for direction. I will contract someone to do the custom coding unless you have a solution to solve both scenarios below:

At regular retail : qty x base price $72.95 + 10.95 surcharge= subtotal x 13% tax = qty * ($10.91 per person + (72.95 +10.95))
If a promo/voucher code:
At the voucher price the HST like anything else based on the sale price in other words the voucher price.
retail price: $72.95
But calculation is voucher price ($42 flat voucher + 10.95 surcharge) x 13% tax + 10.95 surcharge = $6.88 + 10.95 = $17.83


Josh

  • Support Staff

November 11, 2016 at 12:29 pm

I’m afraid it’s not clear what the actual problem is you’re looking to solve from the above scenario. If it’s a case where the total isn’t calculating out to what they expect, may I ask what’s the total they are expecting? Have you tried changing the setting in the Promotions > Settings page that changes how Promotions Affect Taxes?


jubileequeen

November 12, 2016 at 5:34 pm

Need to find which PHP file(s) to modify for custom calculation using discount code.

When promotion code is selected and it is flat rate (i.e. $42.00). There are other promotion code values.

The idea is to use the promotion code flat rate value in a way to do a totally different calculation to gather the taxes and surcharge NOT paid by a dealsite such as GROUPON and to apply the voucher from the dealsite to the event the guest wants.

Equation / Values:
The shopping cart calculation or total with taxes calculation are to be:
Without promotion code: Same as it is now

With promotion code =
Group-on dealsite price (voucher): $42.00 (which would be the Promotion module flat rate value)
Mysite Port Fee surcharge = $10.95 (flat rate)
The concept is to use the Promotion Flat amount to develop a custom calculation that does not involve the normal ticket price price.

equation in words: ([(voucher + port fee surcharge)x quantity] x tax) + port fee surcharge

(($42 flat voucher + 10.95 surcharge) x 13% tax) x qty) + 10.95 surcharge = $6.88 + 10.95 = $17.83

Again, I simply need to know which files need to be modified.


Tony

  • Support Staff

November 15, 2016 at 6:58 am

Hi there,

Whilst we are more than happy to point you in the right direction if we can (for example if there is a hook available that will allow you to make the changes you need) we do no provide support for customizations to the core code and so can not provide a list of files you need to alter to make your changes.

If you are a developer (or working with one) you could open up a thread here:

https://github.com/eventespresso/event-espresso-core/issues

With further information and one of the developers may be able to provide more information, however note the developers will likely also not list a bunch of filenames your need to modify but could help point you in the right direction more than we can here.

If there is a location that a hook would be useful we are more than happy to create a ticket to have that included, or if you add one yourself you could open up a pulll request to have it included within core.

Viewing 3 reply threads

The support post ‘Need to find which PHP file to modify for custom calculation using discount code’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso