jtmace Posted May 28, 2003 Posted May 28, 2003 I am hacking up oscommerce to be more capable for selling wheels and tires. I am having to add a feature so when looking at product_info.php, there will be a form above the 'Add to cart' button. This form will be so the user can enter their year/make/model of their car to ensure they get a wheel that will fit their car.. and it wont let them submit if it is blank. Im assuming this new information should be stored in the 'ORDERS' table of the database. The new text field is already on the product_info page, and it wont let you submit it until the field is completed. I figured I'd now ask for the communities thoughts on this before i start implementing it. Whats the best way to add a new record to the orders table, and whats the best way to get the form input into the database?? I am using javascript to validate it, so is javascript the way i need to go, or does it need to be handled along with the cart_quantity when it is processed?? Any suggestions would be greatly appreciated. JTMace
guntersammet Posted May 28, 2003 Posted May 28, 2003 Here a few pointers: ->JavaScript is nice for client side checking. But you might want to consider to check on the server side again incase JS is turned of on the client. ->Add the field to the shopping cart and order class. Write it to the DB in the checkout_process.php ->If the info is related to the product, store it in the orders_products table and not in the orders table. HTH Gunter
Recommended Posts
Archived
This topic is now archived and is closed to further replies.