Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
sapph (Guest)
sapph (Guest)
Hi,
I've had to switch payment systems to Linkpoint Connect from Linkpoint API. Viart's built in support redirects the user to linkpoint, which I don't want to do. In order to process and pass the correct data set, I need to pass the order total without the dollar sign (in other words, when I add {ordertotal} to the form found on the template/order_confirmation.html file, it sends it with the dollar sign, which errors when passed to Linkpoint. I tried to do a string substitute with PHP on the html page (see code below), but the PHP wasn't getting processed. Where and how can I send the order total without the dollar sign? I'm thinking it has to be configured into the order_confirmation.php file but I'm not experienced enough with PHP to figure out how. Any help would be appreciated. Thanks.
 
<?php
$chargetotal= str_replace("{order_total}", "$", "");
echo "<INPUT type=\"hidden\" name=\"chargetotal\" value=\"" & $chargetotal & "\">";
?>
 
Rosanne
 
kellybliss
kellybliss
in case anyone is interested, I finally figured out how to do this.
 
In includes/order_items.php, after this bit of code
$t->set_var("order_total", $currency_left . number_format($order_total * $currency_rate, 2) . $currency_right);
 
add this
$t->set_var("chargetotal", number_format($order_total * $currency_rate, 2));
 
and then you can reference {chargetotal} whereever you need to, in my case on the order_confirmation.html form.