Post by BinkFour » Sat Apr 21, 2018 1:26 am

OC version: 3.0.2.0
Extension: payments

Question
What is the base assumption for the order total amount in the admin section for adding fees? Is this inclusing all the fees and taxes or the gross amount of the order without the toppings?

Thanks!

New member

Posts

Joined
Mon Jun 10, 2013 1:47 am


Post by straightlight » Sat Apr 21, 2018 1:38 am

The taxes are based on the classes configuration you have set from your OC admin - > systems - > localisation - > tax classes and from your OC admin - > catalog - > products page for each products. The order extension tax module then pulls in those taxes. You can also define tax rules in your OC admin.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by BinkFour » Sat Apr 21, 2018 1:48 am

Thanks for your quick reply.

It however does not answer my intented question

Some context.
I am setting up a payment method that requires a minimum order total amount.

I would like to know what the basic assumption is within open cart. Would this be the lump sum or the sum of the product prices excluding taxes.

New member

Posts

Joined
Mon Jun 10, 2013 1:47 am


Post by straightlight » Sat Apr 21, 2018 2:04 am

I would like to know what the basic assumption is within open cart.
The assumption is by each order total extension module that you decide to install from the OC admin - > extensions - > extensions - > totals(x) . Then, by configuring those assets and configurations for the totals.
Would this be the lump sum or the sum of the product prices excluding taxes.
It does summarize all the totals before outputting the final total during the transaction. The calculated total from the cart also includes the tax during calculation.

system/library/cart/cart.php file:

Code: Select all

public function getTotal() {
		$total = 0;

		foreach ($this->getProducts() as $product) {
			$total += $this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')) * $product['quantity'];
		}

		return $total;
	}
	

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by BinkFour » Sat Apr 21, 2018 2:37 am

Excellent. Thank you for clarifying!

New member

Posts

Joined
Mon Jun 10, 2013 1:47 am

Who is online

Users browsing this forum: No registered users and 410 guests