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)
-   -   Add RA# to checkout and order info (https://forum.x-cart.com/showthread.php?t=51263)

advantageco 12-11-2009 07:54 AM

Add RA# to checkout and order info
 
I want to add an extra field (an RA#) that will be initially populated from a session variable that will be displayed at checkout, in the customers order info, and definitely stored in the database so it can be referenced via the orders section. I figure it would be easiest to add the field directly to the order table, I just am unable to figure out where in the code I could add something like this in so it does get saved.

advantageco 12-11-2009 01:25 PM

Re: Add RA# to checkout and order info
 
Seems I have solved my own problem to a point, here's what I did:
-Added new field 'ranumber' to 'xcart_order_details' table
-Added new line in func.order.php (711)
Code:

$insert_data = array (
                    'orderid' => $orderid,
                    'productid' => $product['productid'],
                    'product' => addslashes($product['product_orig']),
                    'product_options' => addslashes($product['product_options']),
                    'amount' => $product['amount'],
                    'price' => $product['price'],
                    'provider' => addslashes($product["provider"]),
                    'extra_data' => addslashes(serialize($product["extra_data"])),
                    'productcode' => addslashes($product['productcode']),
                    'ranumber' => '$MYRANUMBER'); //This is the line I added.


Next steps for me is to add the functionality to display the RA# in the cart, invoice, and orders pages which will be a piece of cake after this.


All times are GMT -8. The time now is 01:30 AM.

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