Hi
I need to allow my customer to provide me with 1 additional information when ordering the product.
Basically : I want him to tell me, when chosing his product "I reserve it for that date". This date will be stored in the order table. I need him to have this date selected when chosing the product, therefore I cannot use a contribution allowing the user to select the "delivery date".
My idea :
1. add a "timestamp" field in the product info "cart" form. This field will use a specific format
2. retreive its value to pass it into my shopping_cart
therefore I have to change various functions in the "classes/shopping_cart.php" : I need to be able to retreive the "timestamp" from my product_info.php file, and to insert it into my customer cart
=> this field should be called in the application_top thanks to the POST var :
$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['timestamp'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
=> the add_cart() of classes/shopping_cart.php should have one additional entry field, $timestamp
function add_cart($products_id, $timestamp, $qty = '1', $attributes = '', $notify = true)
[...]
$this->contents[$products_id_string] = array('qty' => $qty);
$this->contents[$products_id_string] = array('timestamp' => $timestamp);
// insert into database
if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_timestamp, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . $timestamp . "', '" . date('Ymd') . "')");
could someone who knows OSCommerce confirm that my understanding is correct ?
Thanks in advance for your help
Kindest Regards
Rosanna

) now, my only problem will be to get the timestamp value, and include it in a new field of the customer cart table, and then in the customer order table (as the timestamp will be associated with the product)
but needed to check if my understanding of the classes/shopping_cart was correct (am a bit new in php development, and it already took me some time to understand when on earth was this code !!