Jump to content

[SOLVED] Remove VAT from loyalty points


KolfKord

Recommended Posts

Hello to all,

I'm putting on my ecommerce loyalty points, but ... How do I remove, in addition to shipping charges the VAT?

 

That is, if a product costs: 200 €, I want to get 10 € shipping = 190 € and remove the VAT = € 150.1 I will have to give 1 point for every € 150 then the points are ... But I can not remove the VAT me more and more ...

 

Help ...

Edited by KolfKord (see edit history)
Link to comment
Share on other sites

Hi KolfKord,

 

I didn't set up taxes AND loyalty programmes, so didn't test it, but have a look here:

in file:

/modules/loyalty/LoyaltyModule.php

 

find the function:

 

public static function getCartNbPoints($cart, $newProduct = NULL)

 

Here you can find how they calculate the loyalty points, based on the stuff in your cart.

There is the following line:

 

$total += ($taxesEnabled == PS_TAX_EXC ? $product['price'] : $product['price_wt'])* (int)($product['cart_quantity']);

 

Telling us (for this product X in the cart): add the price (with or without tax) * amount of this product in cart.

 

I can imagine this would work:

 

$total += ($product['price'])* (int)($product['cart_quantity']);

 

Maybe test it out in your environment.

 

My 2 cents,

Pascal

Link to comment
Share on other sites

Another option is just to increase the level of your point earned by adding the tax to it.

 

Say you get 1 point for every 150Euro, just add the tax to it, so 1 point for every 190 Euro (as in your example).

 

Just an idea...

Pascal

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...