Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Custom payment module text help

    Hi

    I want to add custom text where it says "Payment method" during the checkout process, and when the email order confirmation is sent.

    I don't need a payment module at the moment.

    Basically the text that will display is my direct bank transfer details, aka EFT or Electronic Funds Transfer details.

    It is just the account holder name, account number, bank, branch number and code, and that's it.

    Is there a blank template I can use for this, or any other ideas? The Check/money order payment messes up the text formatting and adds unnecessary information.

    Thanks so much for your help

    Kind regards
    S

    *1.3.9*

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Custom payment module text help

    Use the Direct Deposit addon, or customize the code in the check/moneyorder module to your liking.
    .

    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.

  3. #3
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Custom payment module text help

    Quote Originally Posted by DrByte View Post
    Use the Direct Deposit addon, or customize the code in the check/moneyorder module to your liking.
    How can I remove the "Mail your payment to:" module within the Check/Money order payment module?

    What code do I delete here: (I have tried, and it has given me server errors)
    (/includes/languages/english/modules/payment/moneyorder.php)

    PHP 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''Check/Money Order');
      
    define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION''Please make your check or money order 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 we receive payment.');
      
    define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER'"Please make your check or money order 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 we receive payment.');
    ?>


    And here:
    (/includes/modules/payment/moneyorder.php)

    PHP Code:
    <?php
    /**
     * @package money order payment module
     *
     * @package paymentMethod
     * @copyright Copyright 2003-2010 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 15420 2010-02-04 21:27:05Z drbyte $
     */
      
    class moneyorder {
        var 
    $code$title$description$enabled;

    // class constructor
        
    function moneyorder() {
          global 
    $order;

          
    $this->code 'moneyorder';
          
    $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$messageStack;
          if (
    defined('MODULE_PAYMENT_MONEYORDER_STATUS')) {
            
    $messageStack->add_session('MoneyOrder module already installed.''error');
            
    zen_redirect(zen_href_link(FILENAME_MODULES'set=payment&module=moneyorder''NONSSL'));
            return 
    'failed';
          }
          
    $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());");
          
    $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');
        }
      }
    Thanks for your help
    S

  4. #4
    Join Date
    Aug 2009
    Posts
    210
    Plugin Contributions
    1

    Default Re: Custom payment module text help

    If you are trying to remove the language stuff there change it to this.


    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', 'Check/Money Order'); 
      define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION', 'Please make your check or money order 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 we receive payment.'); 
      define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER', "Please make your check or money order payable to:" . "\n\n" . MODULE_PAYMENT_MONEYORDER_PAYTO . 'Your order will not ship until we receive payment.'); 
    ?>

  5. #5
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,705
    Plugin Contributions
    12

    Default Re: Custom payment module text help

    There is NO way you could offer me enough business to put my EFT info out to anyone I am not related to. And, I worry about some cousins as well.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  6. #6
    Join Date
    Sep 2011
    Posts
    226
    Plugin Contributions
    0

    Default Re: Custom payment module text help

    Quote Originally Posted by dbltoe View Post
    There is NO way you could offer me enough business to put my EFT info out to anyone I am not related to. And, I worry about some cousins as well.
    Works differently in South Africa. Most shops have EFT systems.

 

 

Similar Threads

  1. Custom payment text - Please help
    By SethF in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 28 Sep 2011, 08:23 PM
  2. custom payment module help with coupons
    By jouba in forum Addon Payment Modules
    Replies: 2
    Last Post: 20 May 2011, 04:37 PM
  3. Help needed with custom payment module
    By etrader in forum General Questions
    Replies: 1
    Last Post: 2 Dec 2008, 03:51 AM
  4. Custom Payment Module
    By DiZZ in forum General Questions
    Replies: 0
    Last Post: 2 Oct 2007, 05:54 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