Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Remove Payment Method

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-28-2005, 10:38 AM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default Remove Payment Method

Hello Group

I am trying to remove the (2Checkout. Version 2) from the Payment Method. from the html invoice

I would like to keep the Credit/Debit Card but delete the (2Checkout. Version 2).

Payment method:
Credit/Debit Card (2Checkout. Version 2)


I did find a post at 12861
http://forum.x-cart.com/viewtopic.php?t=12861&highlight=

I tried it and it did not work

Any suggestions?

Quote:
I figured out a good solution. Here it is:

In /mail/html/order_invoice.tpl change the following

Code:

{$lng.lbl_payment_method}:
{$order.payment_method}


to

Code:

{$lng.lbl_payment_method}:
{$order.payment_method|truncate:18:""}


You can adjust the truncate value as you wish but I found that 18 was a good value because it allows all payment names up to 18 characters long to be fully shown on the email but when a name like Credit Card (AuthorizeNet: AIM) is used it will only show the words 'Credit Card'

Using the truncate command with :"" after it as above will round to the nearest full word so that you will not get partial words listed on your invoice.
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
  #2  
Old 09-30-2005, 09:52 AM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default

Hello Group

I realize the Gurus do not want to psot to much information this is how the so called experts make their money and I do not blame them one bit. More power to them.

I paid my 25 points for this and here is the fix. BTW, it works perfectly. I am posting this because I have received some answer here and I figure I may as well give something back.

Quote:
To solve the problem, you should edit the 'payment/payment_cc.php' script and find the following lines:

# Put order in table
if(empty($secure_oid) || ($secure_oid_cost != $cart["total_cost"])) {
$orderids = func_place_order(stripslashes($payment_method)." (".$module_params["module_name"].(get_cc_in_testmode($module_params)?", in test mode":"").")", "I", $order_details );
$secure_oid = $orderids;
$secure_oid_cost = $cart["total_cost"];
$duplicate = false;
}


Then you should replace

$orderids = func_place_order(stripslashes($payment_method)." (".$module_params["module_name"].(get_cc_in_testmode($module_params)?", in test mode":"").")", "I", $order_details );

with

$orderids = func_place_order(stripslashes($payment_method), "I", $order_details );




I hope I am able to help someone. BTW, make a backup of your original file first and save it to your hard drive in case you have a wrong comma.

It is also a good idea to comment the time of change and who did it. I find it so much easier to go to a page and look at the comments so I know what has been changed.
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
  #3  
Old 10-02-2005, 01:14 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

people dont not post because they think they may earn from it. I would imagine its more that the answer is not on the tip of their tongue.

Im sure this has been answered before here in the forum anyway and you would find it after a good search.

but... if you need a quick answer then you can pay xcart to tell you the answer
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 10-02-2005, 03:13 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

I kind of take offense to that comment Caucus, I never withhold info just to make a buck. In fact, I gladly offer my time and knowledge to countless posts when I could have easily been charging for such information. If I had the answer to your question, I would gladly offer it, but I don't.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-02-2005, 03:14 PM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default

I did a search 3 or 4 times and only found one fix on the matter that did not work.

I am very happy I have the problem solved. I am also very happy to pass the info along. I am also very happy the Guru's are making money off this fourm. I am just all around happy.
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
  #6  
Old 11-16-2005, 07:12 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

love it or leave it. Or at least whine in the right forum...

- Mike
__________________
4.1.9
Reply With Quote
  #7  
Old 12-28-2005, 11:51 AM
 
ARM ARM is offline
 

Member
  
Join Date: Aug 2005
Posts: 23
 

Default

I see no difference on invoce after changing the file.

Does it work on existent invoices or we need to create a new invoice to verify this fix?

Thanks
__________________
ARM
========
X-Cart Gold 4.1.11
X-Aom
X-RMA
X-Offers
Reply With Quote
  #8  
Old 12-28-2005, 12:05 PM
  caucus's Avatar 
caucus caucus is offline
 

eXpert
  
Join Date: Oct 2003
Location: FLorida U.S.A
Posts: 356
 

Default

Hello Arm

Wow, someone actually liked my post with a fix. Thanks

It only works on new invoices. this does work great. The new invoice will not say that you are using 2CO or PayPal. It will say credit card.
__________________
Staying To The Right
But Left of Rush

X-cart Current version: 4.4.2
X-cart Current version: 4.4.1
X-cart Version 4.0.14
X-cart Version 4.1.6
Litecomm Version: 2.2.35
Operating System Linux
PHP Version 5.2.14
Apache/2.2.16 (Unix)
MySQL client version: 5.091
Reply With Quote
  #9  
Old 12-28-2005, 12:08 PM
 
ARM ARM is offline
 

Member
  
Join Date: Aug 2005
Posts: 23
 

Default

OK thanks for posting
__________________
ARM
========
X-Cart Gold 4.1.11
X-Aom
X-RMA
X-Offers
Reply With Quote
  #10  
Old 09-21-2006, 05:17 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Remove Payment Method

If you want this mod to work with 4.1.3, the replacement line will be:

Code:
$orderids = func_place_order(stripslashes($payment_method), "I", $order_details, $customer_notes);
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:21 PM.

   

 
X-Cart forums © 2001-2020