News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

HOW TO exclude Shipment fee on calculating Payment fee

Started by victoria_b, October 18, 2016, 13:44:01 PM

Previous topic - Next topic

victoria_b

Hello,
I am using VirtueMart 2.6.18 / Joomla! 2.5.24 and also the plugins "Shipping by Rules for Virtuemart" and "VP One Page Checkout".

So, on my eshop the client pays:

  • For orders that cost LESS than 49 euros...  2€ for shipment AND other 2€ for "Cash on delivery".
  • For orders that cost MORE than 49 euros... 0€ for shipment and 0€ for "Cash on delivery".

So, I have created one (1) shipment method named "Shipping by Courier" (please check the image attached to see the Shipment method Rules. Note that there are also calculations for the weight)
and two (2) Payment methods for each case:

  • Cash on delivery for orders  < 49€  (where I set Minimum Amount=49.00) 
  • Cash on delivery for orders >= 49€ (where I set Maximum Amount=48.99   and  Fee per Transaction=2) 

It works great for all cases (for all order totals) except... :
When a client makes an order that costs e.g. 47.50 euros (amount<49) and he chooses for shipment "Shipping by Courier" the total amount becomes now 49.50 (+2€ for shipment).
So, If now he also chooses for payment "Cash on delivery", well... the payment amount is 0 (because of the new total) , while I want it to be 2 euros (as of the products total).
What I mean in a few words is that... I want the payment amount to be calculated as of the products total and NOT as of the Big Total where the shipment cost is also included.

I hope my english do not confuse you and I also hope of a prompt reply.
Thank you in advance for the help!
Victoria.

GJC Web Design

u don't say what payment method  .. I assume the standard

you need to hack the Checkconditions function .. possibly something as simple as

$amount = ($this->getCartAmount($cart_prices) - 2);

or extract from the cart object the net (no ship fee ) price
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

victoria_b

Thank you GJC for the reply.
Yes I meant the standard payment method.
Could you please give me more details on how to extract the net price?
Which file should I hack?
Thanks agaian
Victoria.

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

victoria_b

Hello again.
Well, I am sending you the file which I have to modify in order to help me out with the code.
So, could you please tell me which line of code I have to change and what to write?
I tried various things but nothing  :-[  and also I do not want to risk it because the site in online.

Thank you in advance!
Victoria.