close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart error on confirm page phpmailer.php

Thread began 5/14/2019 4:40 pm by lr_leal239405 | Last modified 5/24/2019 4:23 pm by Ray Borduin | 144 views | 31 replies |

lr_leal239405

eCart error on confirm page phpmailer.php

running eCart. (not sure what version it is... I updated in 2014). I got a couple of error messages from the code generated but was able to resolve one. I get

Parse error: syntax error, unexpected end of file, expecting ')' in /home/jvdydf5kad9w/public_html/webassist/email/phpmailer/src/PHPMailer.php on line 3382.

The code I see in that section is:

"
{
// If a MIME type is not specified, try to work it out from the name
if ('' == $type and !empty($name)) {
$type = static::filenameToType($name);
}

// Append to $attachment array
$this->attachment[] = array(
0 => $string,
1 => $name,
2 => $name,
3 => $encoding,
4 => $type,
5 => true, // isStringAttachment
6 => $disposition,
7 => $cid,
);

return true;
}

"

The line is this one : 3 => $encoding,

??

(Also, not sure if you fixed it later, but the error I got earlier was on confirm.php / eCart1_PHP.php was missing quotes on (I think this line $WA_columnTypesStr = "@@ColumnTypeStrParam@@";).

Another was that... even though I told it to use a Paypal Sandobx and entered credentials, it still had the 'Use Sandbox' as 'False' and my credentials didn't make it into the generated code.

Maybe you've fixed those glitches by now but just in case, wanted to let you know.

However I still have the error at top.

Sign in to reply to this post

Ray BorduinWebAssist

I feel like the PHPMailer.php didn't get uploaded properly. Can I get FTP access and a URL to reproduce? The error and code don't match up, so something strange is going on.

Sign in to reply to this post

lr_leal239405

I can't give ftp to the full domain but to the folder. I copied the Webassist and the WaEcart folders in there.

Try the below.

Sign in to reply to this post

Ray BorduinWebAssist

I'd have to have access to a folder with files to reproduce the issue in order to debug it. What version of the WA_Email.php file do you have? Did you try re-uploading it? Access to a different folder with a copy of those files doesn't help me with debugging an issue.

Sign in to reply to this post

lr_leal239405

That is the folder...the Actual folder with the entire shopping cart. The index.php file being the page:

Sign in to reply to this post

Ray BorduinWebAssist

How can I reproduce the error using these files? When I browse to: https://www.converteraccessory.com/eCart/ I get a completely different error.

Sign in to reply to this post

Ray BorduinWebAssist

I went through all of your pages and updated the paths so they pointed to the correct folder.

Then I went through the checkout, but I changed the trigger so the email is sent before the purchase is made.

I got the email and didn't see the error you reported.

I did have to update:
$Email->BodyFile = "webassist/email/templates/wa_receipt3.php";

to:
$Email->BodyFile = "webassist/email/templates/wa_receipt.php";

Since wa_receipt3.php wasn't uploaded to that folder.

Sign in to reply to this post

lr_leal239405

I'm getting different errors now. I see it's generating code that uses mysql instead of mysqli ?


Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/jvdydf5kad9w/public_html/eCart/confirm.php on line 324

Notice: Undefined offset: 1 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 20

Notice: Undefined offset: 1 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 20

Notice: Undefined offset: 2 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 21

Notice: Undefined offset: 2 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 21

Warning: mysql_query() expects parameter 2 to be resource, object given in /home/jvdydf5kad9w/public_html/eCart/confirm.php on line 358

Sign in to reply to this post

Ray BorduinWebAssist

You will need to attach a copy of the pages with the errors. It looks like the FTP information you provided earlier won't let me access them.

Sign in to reply to this post

lr_leal239405

ok. I reverted back to what I had before you had access (cause it got a bit messy when I tried to fix the rest of the errors). I have the same errors mentioned above on the confirm.php page.

I had another one error I got thru that said:

"mysql_select_db() expects parameter 2 to be resource, object given"

I found it's because it's trying to use mysql while my connection file is mysqli. I ran the whole page thru an online converter from mysql to mysqli (object oriented) (it changed line 358 and other references to mysql_) and it got rid of that message on the confirm.php page.

On first test it gave me the checkout_failure.php page that says 'Transaction could not be completed'. On 2nd try (without changing anything), I got the errors above again.

(Also, last night I remembered that it didn't auto create the databases so I downloaded the sql file from your site in order to create the 'orders' and 'orderdetails' pages which I had to rename to 'ecart_orders' and 'ecart_orderdetails' because we already had one that is being used named 'orders'. There's also an existing 'products' page so I have one going called 'eCart_products'. I was wondering why it didn't create them in the first place even though I know I had selected the right option in the checkout wizard process. But this is a side note.

For now I just need it to complete the order with my Paypal credentials (posted below).

These are the errors on the confirm.php page currently:

Notice: Undefined offset: 1 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 20

Notice: Undefined offset: 1 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 20

Notice: Undefined offset: 2 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 21

Notice: Undefined offset: 2 in /home/jvdydf5kad9w/public_html/WA_eCart/WA_eCart_Database_PHP.php on line 21

Notice: Undefined variable: mysqli in /home/jvdydf5kad9w/public_html/eCart/confirm.php on line 358

Notice: Trying to get property of non-object in /home/jvdydf5kad9w/public_html/eCart/confirm.php on line 358


(Oh, and that webassist email template you mentioned is in there).

Sign in to reply to this post
loading

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