Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default How to eliminate some sections of a PHP file?

    I want to edit out some parts of a PHP file but I am not sure how to go about it without causing the cart to break. I tried a couple of times but each time the cart would stop functioning. Here is the PHP which is part of a shipping module.

    define('MODULE_PAYMENT_MONEYORDER2_TEXT_TITLE', 'Postal Money Transfer - Yubin Furikae'); define('MODULE_PAYMENT_MONEYORDER2_TEXT_DESCRIPTION', 'Company Name:&nbsp;' . MODULE_PAYMENT_MONEYORDER2_PAYTO . '<br /><br />Address to:<br />' . nl2br(STORE_NAME_ADDRESS) . '<br /><br />' . '<p><font color="#ff0000" size="3"><b> Payment Instructions... etc. ........

    I just need to retain the TEXT_TITLE ‘Postal Money Transfer - Yubin Furikae’ .

    The ‘Company Name‘ and the ‘Address to’ fields are not needed as I will include all the relevant info further down in the explanation. If someone could help me out here it would be greatly appreciated.

    Thanks in advance!

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: How to eliminate some sections of a PHP file?

    Edit the two lines to read
    define('MODULE_PAYMENT_MONEYORDER2_TEXT_TITLE', 'Postal Money Transfer');
    define('MODULE_PAYMENT_MONEYORDER2_TEXT_DESCRIPTION', '');
    Where '' is two single quotes, not one double quote.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: How to eliminate some sections of a PHP file?

    Thank you Kuroi San! You are a magician!

  4. #4
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: How to eliminate some sections of a PHP file?

    Hmmm, I have had a slight hitch with this modification...

    The modification appears fine in the shopping cart area, but when a purchase is made, an order confirmation email is sent out to the client and the store.

    At the bottom of the email, under the Payment Method section I can now see: MODULE_PAYMENT_MONEYORDER2_TEXT_EMAIL_FOOTER

    Using the Developers Toolkit in Admin, I found that bit of text in includes/modules/payment/moneyorder2.php but I am not sure what I should do to stop it showing up. I tried deleting it but it broke the cart...

    Thanks in advance!

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: How to eliminate some sections of a PHP file?

    I found that bit of text in includes/modules/payment/moneyorder2.php but I am not sure what I should do to stop it showing up. I tried deleting it but it broke the cart...
    Post the section of code that you have:

  6. #6
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: How to eliminate some sections of a PHP file?

    Thanks for your offer to help... I found the code in public_html/store/includes/modules/payment/moneyorder2.php using the Developers Toolkit...

    Here is the relevant section...


    $this->code = 'moneyorder2';
    $this->title = MODULE_PAYMENT_MONEYORDER2_TEXT_TITLE;
    $this->description = MODULE_PAYMENT_MONEYORDER2_TEXT_DESCRIPTION;
    $this->sort_order = MODULE_PAYMENT_MONEYORDER2_SORT_ORDER;
    $this->enabled = ((MODULE_PAYMENT_MONEYORDER2_STATUS == 'True') ? true : false);

    if ((int)MODULE_PAYMENT_MONEYORDER2_ORDER_STATUS_ID > 0) {
    $this->order_status = MODULE_PAYMENT_MONEYORDER2_ORDER_STATUS_ID;
    }

    if (is_object($order)) $this->update_status();

    $this->email_footer = MODULE_PAYMENT_MONEYORDER2_TEXT_EMAIL_FOOTER;
    }

    // class methods
    function update_status() {
    global $order, $db;

  7. #7
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: How to eliminate some sections of a PHP file?

    MODULE_PAYMENT_MONEYORDER2_TEXT_EMAIL_FOOTER will be defined in includes/languages/english/modules/payment/moneyorder2.php

    looks like you erased it
    Zen cart PCI compliant Hosting

  8. #8
    Join Date
    Apr 2006
    Posts
    359
    Plugin Contributions
    0

    Default Re: How to eliminate some sections of a PHP file?

    Yes, I went back, readjusted it and it is working fine!

    Thanks!

 

 

Similar Threads

  1. can some one give me meta_data.php file pls!
    By what44 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Dec 2007, 04:36 PM
  2. Need to eliminate some white space
    By Stuff4Toys in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 May 2007, 10:45 PM
  3. /index.php not comes: some configure file problem
    By vr4indian in forum Basic Configuration
    Replies: 1
    Last Post: 30 Oct 2006, 03:03 PM
  4. How can i call a php file that does some processing?
    By yawningMonk in forum General Questions
    Replies: 3
    Last Post: 14 Sep 2006, 01:04 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