close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add Product and Update Product not working

Thread began 8/06/2013 3:24 pm by massimo173451 | Last modified 8/09/2013 12:00 pm by Ray Borduin | 2078 views | 12 replies |

massimo173451

Add Product and Update Product not working

Hi Jason,

On admin/products_update.php and admin/products_insert.php when push on Update or Insert buttons nothin happens, suppose something wrong in php code. May you help to find this bug??

Sign in to reply to this post

Ray BorduinWebAssist

Sure we can help... please post a url to view the page, any admin credentials necessary to reproduce the problem, and ftp details so we can debug and fix it. Make sure to include sensitive information like usernames and passwords in the private area so that only we can see them.

Sign in to reply to this post
Did this help? Tips are appreciated...

massimo173451

Further info when insert the price the validation show message "insert the price" or "Format not valid".

Sign in to reply to this post

Ray BorduinWebAssist

It wasn't passing the server validation because of the switched decimal format to using commas.

I resolved this by updating the server validation on line 179 from ",." to ".,".

That makes it get by the number validation, but it still doesn't store the value properly in the database... You may be able to resolve that by changing the number format settings in the database itself. If that doesn't work, then you can do a quick replace to put it back into US number format in the php before doing the database update.

Sign in to reply to this post
Did this help? Tips are appreciated...

massimo173451

I have update the Insert page with same code, but in the MySql db the price is declared as VARCHAR is correct??? Now not store correctly the number with comma eg: 10,56 store only 10 no decimal value are stored in db why???

Sign in to reply to this post

Ray BorduinWebAssist

It looks like your database has been updated and that column is set to have zero decimal places... I checked and the column type for the product price field is set to decimal(5,0) which means zero places after the decimal. You'll have to update your database to allow decimal places in the price column.

Sign in to reply to this post
Did this help? Tips are appreciated...

massimo173451

Thank you Ray, I have update the db field from VARCHAR to DECIMAL (5,2) and store now the decimal numbers but not with comma use always the dot why?? Then if I use a digital file [downloadable file photo in my case] and select the image product and choose the file on server the Update button seems not work (for try i have inserted the image flower), in the Product Results list the product is visible but not available for download if purchase it, another suggestion for this case???

Sign in to reply to this post

Ray BorduinWebAssist

I think mysql always stores numers with dots and not commas.... that is because the SQL syntax which uses commas to separate values in sql statements require numbers to never have commas in them. You would have to reformat the number whenever displaying it using the number_format() function.

I'll investigate why the file upload doesn't work.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

It appears to work for me... maybe it was because the number validation was failing since it had a period instead of a comma.

I updated the price with the number_format() function for your reference.

Sign in to reply to this post
Did this help? Tips are appreciated...

massimo173451

Ray the last info what was wrong for upload file ???And thank you for support me until now.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...