Results 1 to 10 of 50

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default Re: Empty Cart Manager [support thread]

    This had me puzzled for a while

    The following code needs to be removed from tpl_shopping_cart_default.php

    PHP Code:
    <?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.

  3. #3
    Join Date
    Sep 2008
    Posts
    9
    Plugin Contributions
    0

    Default Re: Empty Cart Manager [support thread]

    That did it, Steven, thanks so much!

    Jamana

  4. #4
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

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

  5. #5
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

    Default Re: Empty Cart Manager [support thread]

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

  6. #6
    Join Date
    Jan 2008
    Posts
    1,700
    Plugin Contributions
    6

    Default 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:

    Code:
    User-agent: *
    Disallow: *cart_manager*

  7. #7
    Join Date
    Feb 2007
    Posts
    819
    Plugin Contributions
    0

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

    tpl_cart_manager_default

    Code:
    <?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"') . '&nbsp;<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

    Code:
    <?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);
    ?>

 

 

Similar Threads

  1. Link Manager 3.0 Support Thread
    By clydejones in forum Addon Sideboxes
    Replies: 1987
    Last Post: 6 Aug 2021, 02:56 PM
  2. Testimonial Manager Support Thread
    By clydejones in forum All Other Contributions/Addons
    Replies: 1500
    Last Post: 4 Feb 2021, 04:12 PM
  3. Download File Manager Support Thread
    By balihr in forum All Other Contributions/Addons
    Replies: 24
    Last Post: 17 Aug 2017, 10:32 PM
  4. Poll Manager Support Thread
    By boudewijn in forum Addon Sideboxes
    Replies: 148
    Last Post: 27 Jan 2016, 09:53 AM
  5. [Support Thread] Simple Video Manager
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 1 Nov 2008, 02:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg