KomplikatedOne Posted October 5, 2011 Share Posted October 5, 2011 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 Quote Link to comment Share on other sites More sharing options...
KomplikatedOne Posted October 5, 2011 Author Share Posted October 5, 2011 (edited) 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 October 5, 2011 by KomplikatedOne Quote Link to comment Share on other sites More sharing options...
KomplikatedOne Posted October 5, 2011 Author Share Posted October 5, 2011 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.