close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Custom Shipping from database

Thread began 3/25/2011 11:41 am by bjgarner241692 | Last modified 3/25/2011 1:21 pm by bjgarner241692 | 1447 views | 6 replies

bjgarner241692

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.

php:
//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,

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...