KolfKord Posted April 27, 2013 Share Posted April 27, 2013 (edited) 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 May 2, 2013 by KolfKord (see edit history) Link to comment Share on other sites More sharing options...
KolfKord Posted April 27, 2013 Author Share Posted April 27, 2013 Anyone who can help me?... Link to comment Share on other sites More sharing options...
PascalVG Posted April 28, 2013 Share Posted April 28, 2013 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 More sharing options...
PascalVG Posted April 28, 2013 Share Posted April 28, 2013 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 More sharing options...
KolfKord Posted May 2, 2013 Author Share Posted May 2, 2013 Thank you very much! I modified the file. Php as it should actually be and now it works! thanks Link to comment Share on other sites More sharing options...
PascalVG Posted May 2, 2013 Share Posted May 2, 2013 Glad I could help :-) Success with your shop! pascal Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now