close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Accessing 'variables' across web pages

Thread began 7/20/2010 4:42 am by ian.schofield406785 | Last modified 7/20/2010 12:49 pm by ian.schofield406785 | 685 views | 2 replies |

ian.schofield406785

Accessing 'variables' across web pages

Hi I'm new to web design so forgive me if this is obvious stuff! I'm looking to display the total number of items currently in the shopping cart and their total price and I want to display this information on each of my web pages.

Currently the ecart summary page includes a total price value but not the total number of items. But I don't even seem to be able to access the total price from other pages.

How do I get these values - do I have to feed them into my database in order to recover them and display them on other web pages - or can I make them variables that I can access from other pages?

Your help would be much appreciated.

Sign in to reply to this post

CraigRBeta Tester

to get you started, the easiest way to do this is go to Insert-->Webassist-->eCart-->Display Manager

From the pop-up. choose the display type 'quick cart'

this will display the number of items and the subtotal from the ecart array.

if you want to dig a bit deeper, look at the code, and you will see that the number of items and the subtotal are as follows, held in a table...

<td class="eC_QuickCartQuantity">Items in cart: <strong><?php echo $cartname->TotalColumn("Quantity"); ?></strong></td>
<td class="eC_QuickCartTotal">Total: <strong><?php echo WA_eCart_DisplayMoney($cartname, $cartname->GrandTotal()); ?></strong></td>

where $cartname is the name of your cart instance.

if that is all you want, you can delete the superfluous button code

Sign in to reply to this post

ian.schofield406785

Accessing 'variables' across web pages

Thanks for your help Craig... I was getting there (slowly) before picking up your reply, but hadn't been able to find the location of the total items variable, so your response was a big help... I've also been hand coding so it's nice to know I can do similar via the ecart Display Manager.

Thanks again...

Ian

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