close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Display number of items in ecart5 on template page?

Thread began 10/26/2010 8:05 am by dbentleyw413369 | Last modified 10/26/2010 11:44 am by dbentleyw413369 | 2226 views | 8 replies |

dbentleyw413369

Display number of items in ecart5 on template page?

Hi, is there a way to display number of items in ecart5 on template page? I use php.
Thank you for your help,

Dave

Sign in to reply to this post

siteontimeBeta Tester

I think this is what you are looking for. This will display the total itemsin the cart:

<?php echo WA_eCart_DisplayNumber($WA_Store_Cart, $WA_Store_Cart->TotalColumn("Quantity")); ?>

Replace WA_Store_Cart with the name of your shopping cart.

Hope that helps!

Sign in to reply to this post

dbentleyw413369

It works!
Thank you very much!

Sign in to reply to this post

siteontimeBeta Tester

Glad to help!

Sign in to reply to this post

dbentleyw413369

Hi,

When I tested more pages, I found that the function of "display number of items in ecart5" worked only for the the page haveing Add To Cart Button. For the pages without the Add to Cart button, error below occured,

My Cart:
Fatal error: Call to undefined function WA_eCart_DisplayNumber() in XXXXX on line 51.

Anybody can help?
Thanks,

Dave

Sign in to reply to this post

siteontimeBeta Tester

Yes - make sure your shopping cart include is at the top of the page.

Should look something like this:

<?php
//WA eCart Include
require_once("WA_eCart/WA_Store_Cart_PHP.php");
?>
<?php
$WA_Store_Cart->GetContent();
?>

Again, replace WA_Store_Cart with you cart name.

You should see this code at the top of the add to cart page. You can copy and paste it to the other pages.

Hope that helps.

Sign in to reply to this post

dbentleyw413369

Hi,


I copied and pasted those codes on the top, but still got the the follwoing warning,

Warning: require_once(../../WA_eCart/ACart_PHP.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\xxxx\xxxxxxx.php on line 3

Fatal error: require_once() [function.require]: Failed opening required '../../WA_eCart/ACart_PHP.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\xxxx\xxxxxxx.php on line 3.

Any suggestion?
Thanks,

Dave

Sign in to reply to this post

siteontimeBeta Tester

Yes - that error means that either the file name is incorrect or the path to the file is incorrect. My guess is it's the path.

From the top menu in Dreamweaver click on Insert, then click on Server-Side Include.

Navigate to the WA_eCart folder and choose file ACart_PHP.php. Double click on the file to insert it into the page. You will want to have your cursor positioned at the line of code where you want this inserted.

This should insert the file with the correct path.

Sign in to reply to this post

dbentleyw413369

You are right. The path is not right.
Thanks a lot for your help.

Dave

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