close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Looping through Ecart

Thread began 11/30/2011 1:02 pm by Base5 Designs | Last modified 11/30/2011 2:19 pm by Base5 Designs | 370 views | 1 replies |

Base5 Designs

Looping through Ecart

Hi here me again,

As well as saving the order details into the order details table, I also want to generate an order summary, as a text string, and have that stored in my summary table in a column called orderDesc.

(I only want this so on my order admin pages i can display the items ordered without having to go to a detail page)

I have a script on my check-out page which i want to generate a string that i can add to a hidden filed in my checkout form (the one where you add the shipping info etc.),
I want to call this and have it inserted with the store summary to database behaviour on my confirm page i have the script as below.

but it does not seem to be creating a the string, i put an echo statement within the loop and that does not output, so i think theres a problem with my loop structure...

php:
<?php // create cart summary data for order summary table


$myCartSummary "";
//WA eCart Show If Start
if (!$eCart1->IsEmpty()){
    
$eCart1->MoveFirst();
    while (!
$eCart1->EOF()){
        
$myCartSummary $eCart1->DisplayInfo("Quantity") . " " $eCart1->DisplayInfo("Name"). " - " $eCart1->DisplayInfo("Price") . "<br>";
        if( 
$eCart1->DisplayInfo("slugDrinkCat") == 'gift-boxes'){
            if( 
$eCart1->DisplayInfo("GiftLabel") != ''){
                
$myCartSummary "Gift Label: " $eCart1->DisplayInfo("GiftLabel") . "<br>";
            }else{
                
$myCartSummary "Gift Label: Blank Gift Label<br>";
            }
        }
        
$eCart1->MoveNext();
    }     
}
$eCart1->MoveFirst();
?>
Sign in to reply to this post

Base5 Designs

Never mind has wrong syntax

was using

php:
$myCartSummary . 'blah'



instaed of

php:
$myCartSummary .= 'blah'
Sign in to reply to this post

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