Forums / Templates, Stylesheets, Page Layout / How to eliminate some sections of a PHP file?

How to eliminate some sections of a PHP file?

Locked

Views: 1,131

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
20 Aug 2006, 3:38 PM
#1
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

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: ' . 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!

20 Aug 2006, 4:41 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

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)

20 Aug 2006, 5:11 PM
#3
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

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

Thank you Kuroi San! You are a magician!

22 Aug 2006, 2:43 AM
#4
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

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!

22 Aug 2006, 2:48 AM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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:

Zen-Venom Get Bitten

22 Aug 2006, 9:56 AM
#6
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

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;

22 Aug 2006, 1:04 PM
#7
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

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

22 Aug 2006, 4:46 PM
#8
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

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

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

Thanks!