Zen Cart Logo
Forums / All Other Contributions/Addons / Empty Cart Manager [support thread]

Empty Cart Manager [support thread]

Locked

Views: 17,216

Results 21 to 40 of 50
This thread is locked. New replies are disabled.
21 Sep 2008, 3:30 AM
#21
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Empty Cart Manager [support thread]

Could I ask you one question then I will leave you alone.
Since you are own the subject, does both forms when submitted go to the store email or do I have to input that info somewhere for that to happen?
Thank you

21 Sep 2008, 7:01 AM
#22
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

It's automatic :)

I'm trying to figure out where the command is though, so I can change it to send to my customer service email address.

21 Sep 2008, 10:55 AM
#23
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

ScriptJunkie:

I'm trying to figure out where the command is though, so I can change it to send to my customer service email address.

Thanks for helping out with the support :cool:

In includes/modules/pages/cart_manager/header_php.php

Change (line 39):

$send_to_email = EMAIL_FROM;

to:

$send_to_email = "[email protected]";
21 Sep 2008, 11:06 AM
#24
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

@ScriptJunkie

BTW, nice implementation of the contribution :smile:

21 Sep 2008, 8:28 PM
#25
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Hey Steven :)

Thanks for helping out with the support :cool:My pleasure :) It's always nice to get from a place of "I don't know what the heck I'm doing!" to "Hey, I know the answer to that!" It's nice to be able to give back :)

In includes/modules/pages/cart_manager/header_php.php

Change (line 39):

PHP Code: $send_to_email = EMAIL_FROM;
to:

PHP Code:
$send_to_email = "[email protected]"; I thought that was it, but when I tried that before posting to the forum, my page disappeared. Turns out my syntax was wrong. I forgot the " " Thanks for your help!

BTW, nice implementation of the contribution :smile:Thanks! And thanks for the awesome mod! It's really great for finding out what's on the consumer's mind, what stopped them from buying, and providing the opportunity to save the sale, all rolled in to one :)

23 Oct 2008, 4:40 AM
#26
ambermc avatar

ambermc

New Zenner

Join Date:
Jul 2008
Posts:
8
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Has anyone tried this on 1.3.7?

1 Dec 2008, 2:17 AM
#27
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

I installed this and everything worked perfectly (the info form, the response email I received, etc.) EXCEPT that I have noticed that it has completely altered two of my CSS checkout buttons --- the one to 'checkout' and the one to 'update cart'

Any suggestions would be apprecaited because this seems like it would be a wonderful mod to add to my site but i can't leave it with these buttons messed up because customers would not know how to checkout.

My website is: https://www.ZenCrystals.com
running zencart version 1.3.8
with the zencart_zen template
and Empty_Cart_Manager_1.2

Zencart ROCKS:clap:

1 Dec 2008, 4:21 AM
#28
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Empty Cart Manager [support thread]

Craft Magick:

I installed this and everything worked perfectly (the info form, the response email I received, etc.) EXCEPT that I have noticed that it has completely altered two of my CSS checkout buttons --- the one to 'checkout' and the one to 'update cart'

Any suggestions would be apprecaited because this seems like it would be a wonderful mod to add to my site but i can't leave it with these buttons messed up because customers would not know how to checkout.

My website is: https://www.ZenCrystals.com
running zencart version 1.3.8
with the zencart_zen template
and Empty_Cart_Manager_1.2

Zencart ROCKS:clap:
Hi go back and read the thread and you will find how to fix your problem. I had some of the same issues myself. Go back a page you will find how to fix it.

2 Dec 2008, 1:44 AM
#29
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

countrycharm:

Hi go back and read the thread and you will find how to fix your problem. I had some of the same issues myself. Go back a page you will find how to fix it.

Hi Countrycharm,

Thank you for your reply and I feel a bit brain dead but i went back and re-read every word of every post to this thread and could not find any references to the checkout or refresh cart buttons on the cart page.

I really hate to be a bother, but if you could possibly quote the solution in a reply I would be very grateful.

At this point i guess I'm just going to have to uninstall this mod since I cannot risk customers having no way to check out and it's been several days now.

Zencart still ROCKS though :clap:

2 Dec 2008, 2:48 AM
#30
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Craft Magick:

I installed this and everything worked perfectly (the info form, the response email I received, etc.) EXCEPT that I have noticed that it has completely altered two of my CSS checkout buttons --- the one to 'checkout' and the one to 'update cart'

Any suggestions would be apprecaited because this seems like it would be a wonderful mod to add to my site but i can't leave it with these buttons messed up because customers would not know how to checkout.

My website is: https://www.ZenCrystals.com
running zencart version 1.3.8
with the zencart_zen template
and Empty_Cart_Manager_1.2

Zencart ROCKS:clap:

I fixed the buttons and for anyone else that has that issue here is the solution that worked for me...

  1. opened the button_names.php file located at:
    includes/languages/english/button_names.php

  2. found the definition name for the 'checkout button
    (in my case it was BUTTON_IMAGE_CHECKOUT)

  3. opened the tpl_shopping_cart_default.php file located at:
    includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php

  4. changed the definition name for the 'checkout' and 'update' buttons (the two buttons that were messed up in my case) to match the definition name in the button_names.php file.

The names of the buttons are:
BUTTON_IMAGE_CHECKOUT
BUTTON_IMAGE_UPDATE

See below for exactly where I changed them:

<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, CHECKOUT_ALT) . '</a>'; ?></div>



<div class="buttonRow back"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATE, UPDATE_ALT); ?></div>

I have no idea how these two button name definitions got changed during the 'empty cart manager' installation but at least i can now keep the mod and everything is working perfectly!

If you want to see an example of the working mod you can see it on my website at https://www.ZenCrystals.com Just add something to your cart and then delete it...

Thanks for a GREAT mod!

Zencart ROCKS :clap:

14 Dec 2008, 11:05 PM
#31
jamana avatar

jamana

New Zenner

Join Date:
Sep 2008
Posts:
9
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Hi,

I've installed this mod (version 2) and while it works fine (very cool I might add), the shopping_cart page is showing a warning and fatal error below the shopping cart (copied below). I uploaded all the files as they should be uploaded (just uploading includes folder and renamed my custom folder) and the files are all where they're supposed to be. Any ideas? Thanks so much!!

Warning: require(includes/modules/FILENAME_CART_UPSELL.php) [function.require]: failed to open stream: No such file or directory in /home/skystone/public_html/includes/templates/skystone_custom/templates/tpl_shopping_cart_default.php on line 244

Fatal error: require() [function.require]: Failed opening required 'includes/modules/FILENAME_CART_UPSELL.php' (include_path='.:/usr/local/php52/pear') in /home/skystone/public_html/includes/templates/skystone_custom/templates/tpl_shopping_cart_default.php on line 244
jamana

15 Dec 2008, 12:17 AM
#32
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

This had me puzzled for a while :dontgetit

The following code needs to be removed from tpl_shopping_cart_default.php

<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CART_UPSELL)); ?>

I think one of the other contributors of this mod must have uploaded their merged version of the file.

15 Dec 2008, 2:04 PM
#33
jamana avatar

jamana

New Zenner

Join Date:
Sep 2008
Posts:
9
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

That did it, Steven, thanks so much!

Jamana

15 Dec 2008, 3:29 PM
#34
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

Glad the fix worked. It's possible there may be other bits of code that shouldn't be in there. I will take a proper look soon and then upload a new version of the mod.

17 Apr 2009, 7:50 PM
#35
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

another very nice contrib. any plans to add captcha using ttf & gd capability??? :smile:

17 Apr 2009, 8:22 PM
#36
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

Thanks Jason. As I understand it, spiders are not able to follow JavaScript redirects, or if they can they tend not to, so in theory they should never reach the EC Manager's contact page. Have you had a problem with automated spam email from the mod?

You can also add this to your robots.txt file:

User-agent: *
Disallow: *cart_manager*
17 Apr 2009, 8:38 PM
#37
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

no, i actually just found this mod and installed for testing. but i was receiving spam from the zc contact form before i installed captcha...

so it may not be necesary, but if your users find it useful, i have integrated captcha with your empty cart manager.

first install the captcha ttf & gd mod.

then make these modifications to the two files and the empty cart form will use captcha. :bigups:

tpl_cart_manager_default

<?php
/**
 * Empty Cart Manager
 * Version 1.2
 * By Steven300
 * Updates by ultimate_zc
 * @copyright Portions Copyright 2004-2008 Zen Cart Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */

?>

<div class="centerColumn" id="cartManager">

<h1><?php echo HELP_TITLE; ?></h1>

<?php echo zen_draw_form('cart_manager', zen_href_link(FILENAME_CART_MANAGER, 'action=send')); ?>

<?php
  if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>

<br />

<div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div>

<br />

<div class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>

<?php
  } else {
?>

<div id="contactUsNoticeContent" class="content">
<?php
/**
 * require html_define for the contact_us page
 */
  require($define_page);
?>
</div>

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?>

<?php
    if (DISPLAY_EMPTY_CART_MANAGER > 0) {
        if (DISPLAY_EMPTY_CART_MANAGER == 1) {    ?>
            <fieldset id="contactUsForm">
            <legend><?php echo FORM_TITLE; ?></legend>
            <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
            <br class="clearBoth" />
            <label class="inputLabel" for="contactname"><?php echo ENTRY_NAME; ?></label>
            <?php echo zen_draw_input_field('contactname', $name, ' size="40" id="contactname"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
            <br class="clearBoth" />

            <label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL; ?></label>
            <?php echo zen_draw_input_field('email', ($error ? $_POST['email'] : $email), ' size="40" id="email-address"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
            <br class="clearBoth" />
            <label for="enquiry"><?php echo ENTRY_ENQUIRY . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
            <?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>
            </fieldset>
<?php        }    ?>
<?php
        if (DISPLAY_EMPTY_CART_MANAGER == 2) {    ?>
            <?php echo zen_draw_hidden_field('contactname', $name, ' size="40" id="contactname"'); ?>
            <br class="clearBoth" />
            <?php echo zen_draw_hidden_field('email', ($error ? $_POST['email'] : $email), ' size="40" id="email-address"'); ?>
            <br class="clearBoth" />
            <label for="enquiry"><?php echo ENTRY_ENQUIRY; ?></label>
            <?php echo zen_draw_textarea_field('enquiry', '30', '7', '', 'id="enquiry"'); ?>
<?php        }    ?>
<?php     }  ?>

<?php
// BOF Captcha
if(is_object($captcha)) {
?>
<br class="clearBoth" />
<?php echo $captcha->img(); ?>
<?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
<br class="clearBoth" />
<label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
<?php echo $captcha->input_field('captcha', 'id="captcha"') . ' <span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
<br class="clearBoth" />
<?php
}
// BOF Captcha
?>
</fieldset>

<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
<div class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
<?php
  }
?>
</form>
</div>

header_php

<?php
/**
 * Empty Cart Manager
 * Version 1.2
 * By Steven300
 * Updates by ultimate_zc
 * @copyright Portions Copyright 2004-2008 Zen Cart Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */
// BOF Captcha
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

// BOF Captcha
if(CAPTCHA_CONTACT_US != 'false') {
    require(DIR_WS_CLASSES . 'captcha.php');
    $captcha = new captcha();
}
// EOF Captcha
$error = false;
if (isset($_GET['action']) && ($_GET['action'] == 'send')) {
  $name = zen_db_prepare_input($_POST['contactname']);
  $email_address = zen_db_prepare_input($_POST['email']);
  $enquiry = zen_db_prepare_input(strip_tags($_POST['enquiry']));

  $zc_validate_email = zen_validate_email($email_address);
// BOF Captcha
  if (is_object($captcha) && !$captcha->validateCaptchaCode()) {
    $error = true;
    $messageStack->add('contact', ERROR_CAPTCHA);
  }
//  if ($zc_validate_email and !empty($enquiry) and !empty($name)) {
  if ($zc_validate_email and !empty($enquiry) and !empty($name) and !$error) {
// EOF Captcha
    // auto complete when logged in
    if($_SESSION['customer_id']) {
      $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id 
              FROM " . TABLE_CUSTOMERS . " 
              WHERE customers_id = :customersID";
      
      $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
      $check_customer = $db->Execute($sql);
      $customer_email= $check_customer->fields['customers_email_address'];
      $customer_name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
    } else {
      $customer_email = NOT_LOGGED_IN_TEXT;
      $customer_name = NOT_LOGGED_IN_TEXT;
    }

    // Default to EMAIL_FROM and store name
    $send_to_email = EMAIL_FROM;
    $send_to_name =  STORE_NAME;

    // Prepare extra-info details
    $extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email);
    // Prepare Text-only portion of message
    $text_message = OFFICE_FROM . "\t" . $name . "\n" .
    OFFICE_EMAIL . "\t" . $email_address . "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    strip_tags($_POST['enquiry']) .  "\n\n" .
    '------------------------------------------------------' . "\n\n" .
    $extra_info['TEXT'];
    // Prepare HTML-portion of message
    $html_msg['EMAIL_MESSAGE_HTML'] = strip_tags($_POST['enquiry']);
    $html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')';
    $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
    // Send message
    zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');

    zen_redirect(zen_href_link(FILENAME_CART_MANAGER, 'action=success'));
  } else {
    $error = true;
    if (empty($name)) {
      $messageStack->add('contact', ENTRY_EMAIL_NAME_CHECK_ERROR);
    }
    if ($zc_validate_email == false) {
      $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    }
    if (empty($enquiry)) {
      $messageStack->add('contact', ENTRY_EMAIL_CONTENT_CHECK_ERROR);
    }
  }
} // end action==send

    if (DISPLAY_EMPTY_CART_MANAGER > 0) {
        if (DISPLAY_EMPTY_CART_MANAGER == 1) {
            // default email and name if customer is logged in
            if($_SESSION['customer_id']) {
              $sql = "SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id 
                      FROM " . TABLE_CUSTOMERS . " 
                      WHERE customers_id = :customersID";
              
              $sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
              $check_customer = $db->Execute($sql);
              $email= $check_customer->fields['customers_email_address'];
              $name= $check_customer->fields['customers_firstname'] . ' ' . $check_customer->fields['customers_lastname'];
            }
        }
        if (DISPLAY_EMPTY_CART_MANAGER == 2) {
            // default email and name
              $email= DEFAULT_EMAIL;
              $name= DEFAULT_NAME;
        }
     } 

// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_CART_MANAGER, 'false');

$breadcrumb->add(NAVBAR_TITLE);
?>
17 Apr 2009, 8:47 PM
#38
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: Empty Cart Manager [support thread]

Thanks, I'm sure this will be useful for others.

3 Aug 2009, 3:00 PM
#39
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Hi Steven,

Poster Jamana mentioned version 2 of this mod. Where can I find that? A search of "Empty Cart Manager" in the free add ons section only leads me to version 1.2, which I already have installed.

I'm wondering if v2 will fix my issue.

For no apparent reason, this bit of code is now showing up at the top of the redirect page when it hasn't been there in the past. I haven't made any changes since initial install.

 0) {         if (DISPLAY_EMPTY_CART_MANAGER == 1) { ?>   
```Here's the code from the tpl_cart_manager_default.php  file:

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?> <?php if (DISPLAY_EMPTY_CART_MANAGER > 0) { if (DISPLAY_EMPTY_CART_MANAGER == 1) { ?>
        <fieldset id="contactUsForm">
        <legend><?php echo FORM_TITLE; ?></legend>
        <div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div> 
  

if (DISPLAY_EMPTY_CART_MANAGER > 0) {
if (DISPLAY_EMPTY_CART_MANAGER == 1) {


Here's the code from lines 1-7 of the language file:

  1. {
    if (DISPLAY_EMPTY_CART_MANAGER == 1) {
    ?>
<!--bof Help form test-->

<br /><p style="text-align: center;"><font size="2"><span style="font-family: verdana,arial,helvetica,sans-serif;">
Our system has detected an empty cart.


if (DISPLAY_EMPTY_CART_MANAGER >

I have no idea if that's the issue or how it was caused if it is indeed the issue.

Can you please advise? Thanks much!
3 Aug 2009, 3:21 PM
#40
scriptjunkie avatar

scriptjunkie

Totally Zenned

Join Date:
Jul 2008
Posts:
772
Plugin Contributions:
0

Re: Empty Cart Manager [support thread]

Ok, I tried answering my own question by adding what I thought was missing code. All that did of course, was display that code on the redirect page

So, I went back and took out everything before bof Help Form so that now the first few lines of the language file looks like this:

<!--bof Help form test-->
<br /><p style="text-align: center;"><font size="2"><span style="font-family: verdana,arial,helvetica,sans-serif;">
Our system has detected an empty cart.
```This seems to have resolved the issue of the code appearing on the redirect page...but there's another issue of the words "Our system has detected an empty cart" appear twice on the page (once for the help form and once for the improvement form), instead of integrating them seamlessly.

For now, I've put it back the way it was when I first noticed the problem.

Can you please advise? A link to my cart is in my sig