View Single Post
  #1  
Old 05-03-2003, 07:49 PM
 
poboy poboy is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 59
 

Default Anyone Successfully added customer notes to payment_cc.tpl?

I saw some previous posts on how to add customer notes to payment_cc.tpl. When I did this, I previewed it in the customer area. However, when I go to the page from my website, it does not show up. Here are my codes:

payment_cc.tpl
Code:
{* $Id: payment_cc.tpl,v 1.4 2002/12/10 08:57:11 sdg Exp $ *} {if $config.disable_ccinfo eq "N"} <table border=0 cellspacing=0 cellpadding=2> {include file="main/register_ccinfo.tpl"} </table> {else} {$lng.disable_ccinfo_msg} {/if} <table border=0 cellspacing=0 cellpadding=2> <tr valign=middle> <td height=20 colspan=3>Notes<hr size=1 noshade></td> </tr> <tr valign=top> <td>Customer notes:</td> <td><font class=Star>*</font></td> <td nowrap> <textarea cols=45 rows=6 name=Customer_Notes></textarea> </td> </tr> </table>

Here is my payment_cc.php:
Code:
<? /*****************************************************************************\ +-----------------------------------------------------------------------------+ | X-Cart | | Copyright (c) 2001-2002 Ruslan R. Fazliev. All rights reserved. | +-----------------------------------------------------------------------------+ | The Ruslan R. Fazliev forbids, under any circumstances, the unauthorized | | reproduction of software or use of illegally obtained software. Making | | illegal copies of software is prohibited. Individuals who violate copyright | | law and software licensing agreements may be subject to criminal or civil | | action by the owner of the copyright. | | | | 1. It is illegal to copy a software, and install that single program for | | simultaneous use on multiple machines. | | | | 2. Unauthorized copies of software may not be used in any way. This applies | | even though you yourself may not have made the illegal copy. | | | | 3. Purchase of the appropriate number of copies of a software is necessary | | for maintaining legal status. | | | | DISCLAIMER | | | | THIS SOFTWARE IS PROVIDED BY Ruslan R. Fazliev ``AS IS'' AND ANY | | EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | DISCLAIMED. IN NO EVENT SHALL Ruslan R. Fazliev OR ITS | | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | | | The Initial Developer of the Original Code is Ruslan R. Fazliev. | | Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2002 | | Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: payment_cc.php,v 1.24.2.5 2003/02/10 14:43:13 svowl Exp $ # # CC processing payment module # require "../include/payment_method.php"; if ($REQUEST_METHOD=="POST") { $order_details = "Cardholder's name:$card_name\nCard type: $card_type\nCard number: $card_number\nExp. date: $card_expire"; if (empty($config["active_payment_processor"]) && $store_cvv2) $order_details.="\nCVV2: ".$card_cvv2; $order_details.=$ship_to; # # Generate $order_notes # foreach($HTTP_POST_VARS as $key=>$val) if ($key!="payment_method" && $key!="XCARTSESSID" and $val!="") if ($key=="Ship_To_name") $order_details.="Ship to: $val\n"; else $order_details.=str_replace("_"," ",$key)." : $val\n"; # # Only logged users can submit orders # if ($config["active_payment_processor"]) { # # Get active processor's data # $processor_data = func_query_first("select * from $sql_tbl[ccprocessors] where module_name='".addslashes($config[active_payment_processor])."'"); # # Get module parameters # $module_params = func_query_first("select * from $sql_tbl[ccprocessors] where processor='".$processor_data["processor"]."'"); # Put order in table if((!$secure_oid) || ($secure_oid_cost != $cart["total_cost"])) { $orderids = func_place_order("$payment_method (".$processor_data["module_name"].")", "I", ($store_cc) ? $order_details : $ship_to); $secure_oid = $orderids; session_register("secure_oid"); $secure_oid_cost = $cart["total_cost"]; session_register("secure_oid_cost"); } # # This line includes cc_processor's code so that it # executes inside _this_ script # require $processor_data["processor"]; # # This code reports error and inserts order # $order_status = ($bill_error) ? "F" : "P"; func_change_order_status($orderids, $order_status); $_orderids = func_get_urlencoded_orderids ($orderids); session_unregister("secure_oid"); if ($bill_error) { header("Location: ../customer/error_message.php?error=$bill_error&bill_message=".urlencode($bill_message)."&XCARTSESSID=$XCARTSESSID"); exit; } else { # # If successful - Store CC number in database # if ($store_cc) db_query("update $sql_tbl[customers] set card_type='$card_type', card_number='".text_crypt($card_number)."', card_expire='$card_expire' where login='$login' and usertype='$login_type'"); # # Unset cart # $cart=""; header("Location: ../customer/cart.php?mode=order_message&orderids=$_orderids&XCARTSESSID=$XCARTSESSID"); exit; } } else { # # If active_processor is empty do manual processing # $orderids = func_place_order($payment_method." (manual processing)","Q",$order_details); $_orderids = func_get_urlencoded_orderids ($orderids); $cart=""; header("Location: ../customer/cart.php?mode=order_message&orderids=$_orderids&XCARTSESSID=$XCARTSESSID"); } } ?>

Can anyone help, I know Jonny or someone similar to that name was getting help, but I don't know if it ever worked. My customer needs his customers to be able to specify colors of shirts, sizes they need, etc. This should actually be a standard feature. Any help would be appreciated. Thank you.

Chris
Reply With Quote