Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2008
    Posts
    5
    Plugin Contributions
    0

    Default Seriously Weird Configuration Setting In Zen Cart?

    I have been playing with the configuration of Zen Cart as part of a project I am working on and have found something really strange in the Payment Modules section of the cart Admin.

    I have changed the details in the two moneyorder.php files controlling the layout and configuration of the moneyorder module but I cannot change the line that reads Enable Check/Money Order Module.



    Well, OK, no problem. - Just go to the Developers Toolkit, find it, and edit it...

    ...except that I cannot find it through Enable Check/Money Order Module

    ...or by simply using check as the search word

    ...or by any other combination of Enable Check/Money Order Module

    ...or by trying the phrase/word combinations in all of the boxes with full search from the drop-down menus...

    So... I checked the database ...and deleted the cache directory ...and restarted the browser...

    NO DICE.

    So is this some kind of secret Zen Cart stuff, a la Microsoft way of doing things, or is something seriously screwed up in my configuration? - v1.3.8a

    Please help if you can because this is making no sense whatsoever. - There has got to be some way of changing that line!

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Seriously Weird Configuration Setting (Bug?) In Zen Cart?

    Works fine for me -

    /includes/languages/english/modules/payment/moneyorder.php

    Line #22 : define('MODULE_PAYMENT_MONEYORDER_TEXT_TITLE', 'Check/Money Order');
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Mar 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Seriously Weird Configuration Setting (Bug?) In Zen Cart?

    Quote Originally Posted by Kim View Post
    Works fine for me -

    /includes/languages/english/modules/payment/moneyorder.php

    Line #22 : define('MODULE_PAYMENT_MONEYORDER_TEXT_TITLE', 'Check/Money Order');
    That's part of the problem. The code from the above file in my setup reads as follows:

    Code:
    <?php
    //
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers                           |
    // |                                                                      |
    // | http://www.zen-cart.com/index.php                                    |
    // |                                                                      |
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    // $Id: moneyorder.php 1969 2005-09-13 06:57:21Z drbyte $
    //
    
      define('MODULE_PAYMENT_MONEYORDER_TEXT_TITLE', 'Cheque or UK Postal Order(s)');
      define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION', 'Please make your cheque or UK postal order(s) payable to:<br />' . MODULE_PAYMENT_MONEYORDER_PAYTO . '<br /><br />Mail your payment to:<br />' . nl2br(STORE_NAME_ADDRESS) . '<br /><br />' . 'Your order will not ship until your payment has been received and cleared.');
      define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER', "Please make your cheque or UK postal order(s) payable to:" . "\n\n" . MODULE_PAYMENT_MONEYORDER_PAYTO . "\n\nMail your payment to:\n" . STORE_NAME_ADDRESS . "\n\n" . 'Your order will not ship until your payment has been received and cleared.');
    ?>

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Seriously Weird Configuration Setting (Bug?) In Zen Cart?

    Quote Originally Posted by GE3K View Post
    ... but I cannot change the line that reads Enable Check/Money Order Module.
    Are you referring to the menu option in the right-hand sidebox when you have the module selected?

    If so, you'll have to change that wording in the moneyorder.php module file, and then "remove" and re-"install" the module by clicking the "remove" and "install" buttons in the admin sidebox in order for the new wording to take effect.

    And, no, it's not a bug or microsoft quirk.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Seriously Weird Configuration Setting In Zen Cart?

    Thanks, but it is still not working. - I removed both of the moneyorder.php files, but somehow the line is just the same after reinstalling them.

    Are there definitely only the two moneyorder.php files containing that line that I am attempting to remove?

    I have also rechecked both files and can confirm that the line does not exist in either of them or has been changed wherever it did occur.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Seriously Weird Configuration Setting (Bug?) In Zen Cart?

    A search through "all files - catalog/admin" for "Enable" gives this:
    Code:
    /includes/modules/payment/moneyorder.php
    
    Line #10 : var $code, $title, $description, $enabled;
    
    Line #21 : $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
    
    Line #36 : if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
    
    Line #51 : $this->enabled = false;
    
    Line #100 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Check/Money Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money Order payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now());");
    
    Line #103 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
    Line 100: ...values ('Enable Check/Money Order Module',...

    This is being put into the database. You can change the value here.


    Did you use the admin > Modules > Payment controls to remove and install the module? That is not the same as deleting and replacing files. The files need to be run to update the database.
    Last edited by gjh42; 23 Mar 2008 at 10:48 PM.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Seriously Weird Configuration Setting In Zen Cart?

    Developers Toolkit, when searching for "money order" in "All files - Catalog only", brings this result:

    /includes/modules/payment/moneyorder.php

    Line #2 : * @package money order payment module

    Line #100 : $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Check/Money Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money Order payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now());");
    1. Download the file,
    2. change the wording as desired,
    3. save and re-upload the file.
    4. Go to Admin->Modules->Payment.
    5. Click on the moneyorder module.
    6. Click on Remove in the sidebar.
    7. Click on Install in the sidebar.
    8. Configure the settings as needed.
    9. Enjoy your new cosmetic wording in your admin area.
    Last edited by DrByte; 23 Mar 2008 at 10:46 PM. Reason: edit: yes, much like Glenn suggested
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Mar 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Seriously Weird Configuration Setting In Zen Cart?

    Thanks Doc, gjh42, Kim... but I changed those values before posting, and that's why this is puzzling the h*** out of me.

    The code below is from the main moneyorder.php, - the one that is being referenced in the Dev. searches:

    Code:
    <?php
    /**
     * @package money order payment module
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: moneyorder.php 4960 2006-11-20 01:46:46Z drbyte $
     */
    
      class moneyorder {
        var $code, $title, $description, $enabled;
    
    // class constructor
        function moneyorder() {
          global $order;
    
          $this->code = 'cheque or postal order(s)';
          $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE;
          if (IS_ADMIN_FLAG === true && (MODULE_PAYMENT_MONEYORDER_PAYTO == 'the Store Owner/Website Name' || MODULE_PAYMENT_MONEYORDER_PAYTO == '')) $this->title .= '<span class="alert"> (not configured - needs pay-to)</span>';
          $this->description = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION;
          $this->sort_order = MODULE_PAYMENT_MONEYORDER_SORT_ORDER;
          $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
    
          if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0) {
            $this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
          }
    
          if (is_object($order)) $this->update_status();
        
          $this->email_footer = MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER;
        }
    
    // class methods
        function update_status() {
          global $order, $db;
    
          if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
              if ($check->fields['zone_id'] < 1) {
                $check_flag = true;
                break;
              } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {
                $check_flag = true;
                break;
              }
              $check->MoveNext();
            }
    
            if ($check_flag == false) {
              $this->enabled = false;
            }
          }
        }
    
        function javascript_validation() {
          return false;
        }
    
        function selection() {
          return array('id' => $this->code,
                       'module' => $this->title);
        }
    
        function pre_confirmation_check() {
          return false;
        }
    
        function confirmation() {
          return array('title' => MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION);
        }
    
        function process_button() {
          return false;
        }
    
        function before_process() {
          return false;
        }
    
        function after_process() {
          return false;
        }
    
        function get_error() {
          return false;
        }
    
        function check() {
          global $db;
          if (!isset($this->_check)) {
            $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_MONEYORDER_STATUS'");
            $this->_check = $check_query->RecordCount();
          }
          return $this->_check;
        }
    
        function install() {
          global $db;
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Cheque or UK Postal Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Cheques or UK Postal Orders?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now());");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Make Payable to:', 'MODULE_PAYMENT_MONEYORDER_PAYTO', 'the Store Owner/Website Name', 'Who should payments be made payable to?', '6', '1', now());");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
          $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
        }
    
        function remove() {
          global $db;
          $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        }
    
        function keys() {
          return array('MODULE_PAYMENT_MONEYORDER_STATUS', 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO');
        }
      }
    ?>
    You can clearly see that the wording has been changed and their is no reference to money order, except where needed by the PHP variables.

    I am going to recheck the database and see if that value has got stuck in there, or something...
    Last edited by GE3K; 23 Mar 2008 at 11:02 PM.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Seriously Weird Configuration Setting In Zen Cart?

    Quote Originally Posted by GE3K View Post
    Code:
    // class constructor
        function moneyorder() {
          global $order;
    
          $this->code = 'cheque or postal order(s)';
    You should put this line back to what it was before, as changing it will mess up other things.

    I gather all you're looking for at this point is a minor cosmetic change for you as the administrator?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Mar 2008
    Posts
    5
    Plugin Contributions
    0

    Default Re: Seriously Weird Configuration Setting In Zen Cart?

    Yes, that's all it was.

    Thank-you again, Doc (and everyone else who tried to help)!

    It doesn't matter how careful you are, there's always some small thing that bites you on the ...

 

 

Similar Threads

  1. Weird Error on zen cart--when logging back in
    By timhersh in forum General Questions
    Replies: 0
    Last Post: 28 Jun 2009, 05:06 AM
  2. Zen Cart Template Configuration.
    By Siena in forum General Questions
    Replies: 4
    Last Post: 2 Nov 2008, 05:08 PM
  3. Zen Cart configuration inquiries
    By karazy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 May 2008, 04:26 AM

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