Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Validation errors everywhere !


Recommended Posts



I am a new user and am setting osCommerce up on my local pc. Installation all good, no problems.




I have noticed that there are many places in Admin and also the shop itself where I can easily create a PHP error page by not filling in data on the page (see below):


So, my question is: do I have to turn the client side validation on somewhere ???


Surely this cant be normal behaviour?


Using Firefox






Admin / Catalog / Add product, leave quantity empty --> the following error:


1264 - Out of range value adjusted for column 'products_quantity' at row 1

insert into products (products_quantity, products_model, products_price, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_date_added) values ('', '', '', null, '', '1', '0', '', now())


Admin / Catalog / Add category, leave sort order empty ---> php error (sort order missing)

Admin / Catalog / Add product, leave weight empty ---> php error (weight missing)

If no manufacturer specified when adding products --> php error (manufacturer missing)


In the shop, if I enter a false CC number on checkout --> php error:

1406 - Data too long for column 'last_page_url' at row 1


update whos_online set customer_id = '2', full_name = 'Sylvie Delaunay', ip_address = '', time_last_click = '1191299887', last_page_url = '/catalog/checkout_payment.php?payment_error=cc&error=The+first+four+digits+of+the+number+entered+are%3A+1112%3Cbr%3EIf+that+number+is+correct%2C+we+do+not+accept+that+type+of+credit+card.%3Cbr%3EIf+it+is+wrong%2C+please+try+again.&cc_owner=Sylvie+Delaunay&cc_expires_month=01&cc_expires_year=07' where session_id = '5gru2tqbuq897k1knjc6fkrqt5'

Link to comment
Share on other sites

Client validation is contained in a file called validations.php. However it is used primarily for client registration. In Admin panel it is assumed that Admin / webmaster would fill all values so perhaps not included. You may add client side validation using javascript and using validations.php to guide you.




Best Regards,

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...