Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Abandoned Carts


Guest

Recommended Posts

  • Replies 211
  • Created
  • Last Reply

Top Posters In This Topic

Wow this is a great add on.

 

One problem though:

When i send the emails they arrive as one big text chunk.

No line breaks like that:

 

mystore.com ------------------------------------------------------  First off, we would like to thank you for having purchased from mystore.com in the past. Secondly, we noticed in your recent visit to mystore.com that you placed the following item(s) in your shopping cart, but didn't complete the transaction with us. Cart Contents: xxxx xxxxx xxxx xxxx We are always interested in knowing what happened and if there was a reason you decided not to purchase with mystore.com at this time. If you could be so kind as to let us know if you had any issues or concerns we would like to address them as getting this feedback from you and others is how we can help make your experience at mystore.com better. Again, thank you for your time and consideration in helping us make mystore.com a better place. xxxx mystore.com http://www.mystore.com/catalog/

 

How do i make to look normal with line breaks?

I copied the whole file from this thread.

 

thank you.

Link to comment
Share on other sites

the scart.php file should have the \n's in it that create linebreaks in the ascii text messages that it sends. I would have to look at the code you are using to see if it looks right, but the code that was provided initially uses \n's to break the text up into nice paragraphs

 

  if (mysql_num_rows($cquery) < 1) {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILE
NAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_NEWCUST, $mline) . "\
n". $_POST['message'];
 } else {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILE
NAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_CUST, $mline . "\n". 
$_POST['message']);
 }

 

is what builds and sends the e-mail.

 

Inside the /languages/english/scart.php the code should look like:

 

define('EMAIL_TEXT_NEWCUST', "\n\n".'Thank you for stopping by Education 4 Kids 
and considering us for your purchase. We noticed that in your visit to our store
that you placed the following item(s) in your shopping cart, but did not comple
te the transaction with us. ' . "\n\n" . 'Cart Contents:'."\n\n".'%s' . "\n\n" .
'We are always interested in knowing what happened and if there was a reason th
at you decided to not purchase with Education 4 Kids at this time. If you could 
be so kind as to let us know if you had any issues or concerns, we would like to
address them as getting this feedback from you and others is how we can help ma
ke your experience at Education 4 Kids better. '."\n\n". 'Again, thank you for y
our time and consideration in helping us make Education 4 Kids a better place.'.
"\n\n".'JM Ivler'."\n".'Education 4 Kids ' . "\n". 'http://edushop.edu4kids.com/
' . "\n");

 

Note again the \n's create forced line breaks when they get sent.

Link to comment
Share on other sites

The Code im using is:

if (mysql_num_rows($cquery) < 1) {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILENAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_CUST, $mline) . "\n" . $_POST['message'];
 } else {
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . tep_catalog_href_link(FILENAME_CATALOG_LOGIN, '', 'SSL') . "\n" . sprintf(EMAIL_TEXT_CUST, $mline) . "\n" . $_POST['message'];
 }
$custname = $inrec['fname']." ".$inrec['lname'];
tep_mail($custname, $inrec['email'], EMAIL_TEXT_SUBJECT, $email, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
 $mline = "";
tep_db_query("insert into " . TABLE_SCART . " (customers_id, dateadded ) values ('" . $cid . "', '" . seadate('0') . "')");
 
echo $cline;
 $cline = "";
}
}

 

but when i look on the text in my web mail it seems fine.

Only in the outlook it looks like a chunk

 

thank you for your help,

Felix

Link to comment
Share on other sites

In the directions it says the following:

 

// add the following code to your /admin/includes/languages/english.php

 

define('BOX_REPORTS_UNSOLD_CARTS', 'Unsold Carts');

 

// add the following line to /admin/includes/application_top.php

 

define('FILENAME_UNSOLD_CARTS', 'unsold_carts.php');

 

//add the next line to /admin/includes/boxes/reports.php

 

'<a href="' . tep_href_link(FILENAME_UNSOLD_CARTS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_UNSOLD_CARTS . '</a><br>' .

 

WHERE do i add these lines? I think that might be contributing to my errors!!

 

Naomi

Link to comment
Share on other sites

This is becoming painful....

 

Okay... lets make it simple.

 

There is unsold_carts. This was version 1.0 of the concept and it was posted here in this thread as a report. Then one of the other members of the community was kind enough to pack the whole thing up and submit it as a contribution under reports.

 

There is scart. This is the growth of the reporting tool into a sales tool. This has not been packed up into a contribution, but all the code components are lying about in this thread. It requires:

 

1) scart.php (the main program to be placed in the admin area)

2) scart.php (the language file to be placed in /includes/languages/english/)

3) a "readme" that tells what has to be added to admin/includes/application_top.php and the SQL to create the new table

4) scart-report.php (to go in the admin area. this reports on what you sent out, and what was converted after you sent it out)

 

unsold_carts had a redme file that explained how to tie the code to your admin navigation. scart doesn't have that at all.

 

Now, as I don't zip (I'm a tar.gz type guy) I will be more than happy to see someone else with skills in that area pull the scart together as a contribution... but it should be made clear that scart 2.0 is an outgrowth of unsold_carts and that the author recomends replacing the unsold_carts with scart. as unsold_carts is *just a reporting tool* and scart is a *reporting and sales tool*.

 

So, if you currently want the latest version... all the code is in this thread. Work this topic backwards to pick up the most current version of each file. The only thing you won't get is the "code" to link these scart applications to your admin navigation.

 

Now, did that clear it up, or confuse the issue more? B)

Link to comment
Share on other sites

Please help.

Can someone tell me where is my mistake?

 

On my web mail i get the email notice correct with line breaks but when i open it in my outlook it looks like a big text chunk - no line breaks at all.

 

Other emails i get from the site are ok on the outlook. Just the Scarts emails looks like that.

 

Thank you for the help.

 

Felix.

Link to comment
Share on other sites

Hi

 

I am willing to tie all this up into a contribution if you can send me all the files required.....

 

PM me and we can sort something out

Link to comment
Share on other sites

Hi all,

 

I'm with catgirl.........I just want the report tool.

I followed instructions found in "11/04/2003 - 1.3 Unsold Carts Report"

 

I get "parse error on line 93 of unsold_carts.php"

 

Any help would be appreciated.

 

Here is the general area of line 93:

 

//     echo " ~~ ".$curcus." == ".$inrec['cid']." ~~ " .$inrec['fname']." ~~ ";
   if ($curcus != $inrec['cid']) {
// output line
     $cline .= "<tr><td><b>Final Price: </b>".$tprice."</td></tr></table></td></tr>"
;
     if ($curcus != "") echo $cline;
// set new cline and curcus
     $curcus = $inrec['cid'];
     $tprice = 0;
     $cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080><a href='" . tep_href_link('mail.php', 'selected_box=tools&customer=' $inrec['email'], '') . "'>" .$inrec['email']."</a><br> ".$inrec['phone']."</td><td><table>";
   }
// empty the shopping cart

 

Thanks in advance!

 

Wendy

 

PS....I did not install any of the earlier entries to that contribution, just the one download called "11/04/2003 - 1.3 Unsold Carts Report"

 

edited to add a link to the contribution: http://www.oscommerce.com/community/contributions,1598

Edited by its2cheap
Link to comment
Share on other sites

Also installed the !.3 release. If I attempt to access from the URL I get the same parse error in the same line. If I try to access the reports menu I get a parse error on the line that calls the report. So what is wrong with the coding on line 93? Since I don't know php I don't know if the strange order of html table tags is the culprit or not.

 

 

 

Thanks

Ron

If we knew it all we wouldn't be here would we?

Link to comment
Share on other sites

Thank you, I am happily using the version on the front page with selected days to look back. It gives me the info that I desire and how much easier can it get than plug-n-play. Thank you for taking the time, it is a very useful tool.

Link to comment
Share on other sites

reseanable , tell me if im wrong but i got the same error or parsing in line 93 and it has nothing to do with :

 

Find:

CODE 

if ($selected_box == 'reports') {

  $contents[] = array('text'  => 

 

and immediately after it insert:

 

CODE 

'<a href="' . tep_href_link(FILENAME_UNSOLD_CARTS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_UNSOLD_CARTS . '</a><br>' .

MS2

Link to comment
Share on other sites

here is the line 93 in 1.3 not working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
   

 

and the 1.2 working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
   

MS2

Link to comment
Share on other sites

here is the line 93 in 1.3 not working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
? ?

 

and the 1.2 working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
? ?

azer,

I'm not a programmer so I tend to follow instructions instead of asking why. I got the parse error when I had inserted your quoted lines at the end of the list. When I followed the instructions and inserted the line in the right place the error went away.

 

As an aside - all my files are named abandoned_carts not acarts or scarts....and the reports work as indicated though I am not positive I have made all the mods listed in all the posts.

 

 

 

 

 

Regards,

Ron

If we knew it all we wouldn't be here would we?

Link to comment
Share on other sites

As an aside - all my files are named abandoned_carts not acarts or scarts....and the reports work as indicated though I am not positive I have made all the mods listed in all the posts.

One last time.

 

abandoned_carts

- 1.0 version: written by me. Basic abandoned cart report.

- 1.X version(s): written by others - seems a defect crept into it in version 1.3

 

scarts

- 1.0 version: written by me. Extends the report to a sales tool. Uses the basic report as a base, but adds the ability to send selected people e-mail. Includes a report on how well you have been able to turn those you contacted into sales.

 

abandoned_carts was turned into a formal contribution.

scarts code is currently spread through this thread and has not been turned into a contribution yet.

 

These are two different tools (although they started with the same base).

Link to comment
Share on other sites

Hi Could someone please just provide a link to this contribution, I have looked through the contributions lists and can't find it.

 

I want the all singing al dancing version please.

 

Cheers

Steve

Met00 just said:

 

scarts code is currently spread through this thread and has not been turned into a contribution yet.
Link to comment
Share on other sites

I've got it working and I get already feedback from my customers. (thumbs up smiley)

 

I noticed a few things:

- fonts, the customer name and totals are "default" New Times roman. I tried to change them but i wasn't succesful.

- scart_report is not working correctly. I have 53 records examined, and one "testorder" is succesfully recoverd. suddenly i see myself a lot of times in the scart_report.

Link to comment
Share on other sites

here is the line 93 in 1.3 not working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
? ?

 

and the 1.2 working :

 

$cline = "<tr><td valign=top colspan=2><hr size=1 color=000080></td></tr><tr><td valign=top>".$inrec['fname']." ".$inrec['lname']." <br><font size=2 color=000080>".$inrec['email']."<br> ".$inrec['phone']."</td><td><table>";
? ?

These 2 lines are both the same so why does it not work

 

I get parsing error on line 93 of the file unsold_carts.php which is the line quoted here.

 

further up this post someone has posted the line 93 from the reports.php file which has nothing to do with the parse error on unsold_carts.php

 

Moving the 4 lines round in reports.php only moves the positon of the link in the box.

 

several people have the parse error on line 93 of unsold_carts.php so how did you get it to work????

 

Cheers

 

Steve

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...