Jump to content
Sign in to follow this  
KomplikatedOne

securehosting totals & attibutes

Recommended Posts

hello all

 

having some problems with my securehosting payment page.

its essentially working, but i need to make a couple of changes to stop it looking so confusing to customers.

 

- the item totals thoughout my site are configured so they display including the VAT, this is working correctly, but the securehosting payment page shows them excluding VAT. i cannot just add 20% to all values before they are passed over as we also sell childrens items that are not VATable.

i need to either get it pull through the price inc VAT, or add an if clause to the correct place, but struggling to see where its even passing over the unit price?

 

- also the attributes values are not being brought over to the securehositng payment page either, item codes and descriptions are there, but just a blank space where the colour/size should be. the code there looks to be correct (apart from fact its getting data from a table that doesnt contain the actual order yet?)

 

have spent several hours now trying to get my head round this, but not getting very far as

1. cant see how the variables on the securehosting payment page os_template.html are being populated

2. Confused as it appears securehosting.php is getting data from unpopulated order tables?

3. no where in code on securehosting.php is there a unit price code at all, only total item price (price*qty)

 

anyway i am hoping there are a few others out there who use securehosting might be able to point me in right direction

 

thanks

Share this post


Link to post
Share on other sites

ok after a few more hours i have managed to slap something together

have added the following code to the securehosting.php file

 

it does some math on the tax field and adds it to the final total value

 

around line 138

 

	
//new bit to check if tax value exists, if so it adds to the total, otherwise does

$tax = $order->products[$i]['tax'];
$unit_price = $order->products[$i]['final_price'];

$item_tax =  $unit_price * $tax /100 ;
$item_price = $unit_price + $item_tax ;
$item_price = round($item_price,2);
   $prod_total=$item_price*$order->products[$i]['qty'];
// replaced this line with above --- $prod_total=$order->products[$i]['final_price']*$order->products[$i]['qty'];
$this_item.=$this_name.'|'.$item_price.'|'.$order->products[$i]['qty'].'|'.$prod_total.']';
// and replaced this low with above ----- $this_item.=$this_name.'|'.$order->products[$i]['final_price'].'|'.$order->products[$i]['qty'].'|'.$prod_total.']';
$secuitems.=$this_item;

 

now just to work our why attributes are not coming across

Edited by KomplikatedOne

Share this post


Link to post
Share on other sites

ok think it might be a problem with the stock contribution i am using, as doesnt show attributes on the checkout_confirmation.php page either

and thats the only thing i can think of that might effect it

Share this post


Link to post
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
Sign in to follow this  

×