X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Remove Payment Method (https://forum.x-cart.com/showthread.php?t=16924)

caucus 09-28-2005 10:38 AM

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.


caucus 09-30-2005 09:52 AM

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.

shan 10-02-2005 01:14 PM

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

balinor 10-02-2005 03:13 PM

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.

caucus 10-02-2005 03:14 PM

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. :)

mffowler 11-16-2005 07:12 PM

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

- Mike

ARM 12-28-2005 11:51 AM

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

caucus 12-28-2005 12:05 PM

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.

ARM 12-28-2005 12:08 PM

OK thanks for posting

carpeperdiem 09-21-2006 05:17 PM

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);


All times are GMT -8. The time now is 11:04 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.