Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

securehosting totals & attibutes


KomplikatedOne

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

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...