1054 SQL error if non numeric data is entered into the post code field checkout.

  • Posts: 165
  • Thank you received: 3
8 years 6 months ago #256335

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.4

Hi, if you enter a non numeric value inside of the post code field during the checkout process such as "28115a" or go to the edit your address section and enter a alpha character it throws a 1054 sql error and says unknown column. This is a problem because then the account for the customer becomes unusable and all they see is this error screen when you log back in until the alpha character is removed. I am guessing this is because this field only allows numeric characters that is why this happens. It is like it corrupts the database.


I wrote some regex syntax for the postcode to prevent this from happening by not allowing these characteristics, but there needs to be a permanent fix to this for this field on a default install of hikashop to where if you type the wrong information in the post code field that is does not mess up the database and make the account unusable for the customer.

I also attached the screenshot of the exact error.

How can this be fixed?

Thanks,

Josh

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26251
  • Thank you received: 4039
  • MODERATOR
8 years 6 months ago #256338

Hi,

You should activate the debug mode in your Joomla global configuration.
And you will see that it is not HikaShop which generate that SQL query.
There is no "hika_zips" tables and nothing in HikaShop related to that ; so it is one of your custom plugin.
But nothing that our support team can help you with.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 165
  • Thank you received: 3
8 years 6 months ago #256437

OK thanks you for the response. I know what is causing this now. There is a custom plugin I had written to change the price based on the zip code in the shopping cart. My guess is this is what has caused the issue. I will contact them and let them know.

Thanks,

Josh

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum