Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Just in case anybody's been struggling the same as me (but couldn't find on the forum) I've figured out how to add tax onto the shipping filed sent to Protx. (If anybody is using Protx (in the uk?) and have send shopping cart details enabled the code does NOT send any shipping tax information although the final amount charged is actually correct).

 

On the protx_form.php file in includes/modules/payment change the code to the following:

 

		//This module assumes no tax on shipping
	//so added the following code:

	$shiptax = $shipping/100 * tep_get_tax_rate($products[0]['tax_class_id']); //Assuming there will always be one product and at the same tax rate
	$shiptax = number_format($shiptax, 2, '.', '');
	$finalship=$shipping+$shiptax;
	$finalship = number_format($finalship, 2, '.', '');
	//changed next line to
	$shippingStr .= ":Shipping:1:".$shipping.":".$shiptax.":".$finalship.":".$finalship;
	//$shippingStr .= ":Shipping:1:".$shipping.":----:".$shipping.":".$shipping;
	$basketStr = "Basket=".$no_lines;

 

Hope it makes sense. It assumes that there will always be one product in the basket and that the tax associated with that is the same as the tax to be used on shipping.

t o n e u s

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...