Custom Shipping from database
I've setup country and state / province in my db with a shipping premium so that they each have a base rate for orders to that region.
I started with a simple Flat Rate amount to get it working initially. That's all fine.
Now I want to substitute my flat rate of .02 with the value from the db.
//eCart Rule
function WAEC_eCart1_Country() {
$totalShipping = 0;
if (true && ((sizeof($this->Items) > 0) && (isset($_SESSION['eCartCheckoutForm_country'])))) {
$totalShipping += '".$row_shipcountry['ShipPremium']."';//Result
}
return WA_eCart_FormatNumber($totalShipping, $this->ForceDecimalsC, $this->DecimalPlacesC);
}
//eCart Rule
{
This is in eCart1.php
Recordset shipcountry is on confirm.php. Session values and Recordset works fine.
My problem is syntax.
I get:
Parse error: syntax error, unexpected T_STRING in C:\Inetpub\vhosts\drjacknewman.com\httpdocs\2011\WA_eCart\eCart1_PHP.php on line 99
Line 99 is of course the line that includes:
'".$row_shipcountry['ShipPremium']."'
i have also tried <?php echo $row_shipcountry['ShipPremium']; ?> with a similar type of error.
Please help if you can.
Thanks,