close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Adding a second item clears the cart?

Thread begun 7/24/2013 8:40 pm by JoelRandy | Last modified 7/26/2013 9:21 am by Jason Byrnes | 1720 views | 5 replies |

JoelRandy

Adding a second item clears the cart?

I have a site that is using Webassist eCart. You will need to be familiar with this for it to work.
Please check it out here
(IT IS LIVE, DO NOT MAKE ANY PURCHASES!!!!)
if you add two or more items to the cart it will clear.
Http://www.noma.net/site/1/join-new.php
You can add the same item multiple times but if you add two different items then reload the page or go to a new page it will clear.
A usual(sample) order would be going to the page above selecting professional, selecting bnoma or bosnoma, then selecting professional local membership. Now it looks good but if you reload the page it will show the cart as empty, or if you go ahead to the checkout page it will be empty.
There seems to be some coding that says clear cart if more than one item is in the cart, please let me know what would cause this to clear the cart.
Thanks,
Randy

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

JoelRandy

private message.

Sign in to reply to this post

Jason ByrnesWebAssist

on your page, try changing the following code:

<?php
//WA eCart Show If Start
if (!$eCart1->IsEmpty()) {
?>


to:
<?php
$eCart1->GetContent();
?>
<?php
//WA eCart Show If Start
if (!$eCart1->IsEmpty()) {
?>


if that doe not fix the problem, see PM.

Sign in to reply to this post

JoelRandy

Thanks Jason, that was not it. I spoke to Ray and he was able to figure it out. I was an issue with the session and a character that my server was having issues with. So we needed to change the coding in the page
WA_eCart_Definition_PHP.php

We changed this

//Session Storage Functions
function Session_SaveCart() {
if (!session_id()) session_start();
$theCartString = "";
for ($n=0; $n<sizeof($this->Items); $n++) {
$countIt = 0;
if ($n!=0) {
$theCartString .= "§";
}
foreach ($this->Items[$n] as $m) {
if ($countIt != 0) $theCartString .= "|WAECART|";
$theCartString .= $m;
$countIt++;
}
}
$_SESSION[$this->CartName."_Items"] = $theCartString;
}

to this

//Session Storage Functions
function Session_SaveCart() {
if (!session_id()) session_start();
$theCartString = "";
for ($n=0; $n<sizeof($this->Items); $n++) {
$countIt = 0;
if ($n!=0) {
$theCartString .= "|WASEP|";
}
foreach ($this->Items[$n] as $m) {
if ($countIt != 0) $theCartString .= "|WAECART|";
$theCartString .= $m;
$countIt++;
}
}
$_SESSION[$this->CartName."_Items"] = $theCartString;
}

The problem was this line and the character "§"
$theCartString .= "§";

Thanks Again.

Sign in to reply to this post

Jason ByrnesWebAssist

Ok, Thanks for the heads up.

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