WebSite X5Help Center

 
Malcolm P.
Malcolm P.
User

Problems with shopping cart database  en

Author: Malcolm P.
Visited 1842, Followers 1, Shared 0  

I am attempting to convert the shopping cart on an existing site to work with a database in order to keep track of the sales and inventory automatically, but cannot get this to work at all.

I am running an identical version of the existing live site as a testbed for the modifications but on a local Synology NAS server. I have set up the database and have a full set of 'Pass' results in the X5 control panel. However, the available quantity for the item(s) remains at zero and refuses to update, and phpMyAdmin shows no tables in the database, so it appears X5 has not created these and which may be the root cause of the problem. The item itself shows a quantity of (0)+10 in the product list, the latter being the set update quantity, while the site product card shows 'product unavailable' after uploading the site.

The remainder of the site, and other cart items set to either 'No information on product availability' or 'Approximate Quantity', all work perfectly on the local server, so I don't think the problem lies there. I haven't tried this with earlier versions of X5 so can't say whether it's a v14 issue or something else.

Any help or suggestions would be very gratefully appreciated.

Many thanks.

Malcolm

Posted on the
6 ANSWERS
Incomedia
Claudio D.
Incomedia

Hello Malcolm,

Once you have changed the quantity in the program did you export the project online?

You need to use the ftp export functionality to update the quantity online so then the database is created.

The URL in step 1 needs also to be the real one where you are hosting the project.

Many thanks!

Read more
Posted on the from Claudio D.
Malcolm P.
Malcolm P.
User
Author

Hi Claudio,

Thank you for your assistance.

1) Yes, exported online via the X5 ftp export function.

2) I'd originally missed this requirement re. the URL in step 1. Changing this to the local server address has made some progress, in that the item in the Product List now correctly shows the available quantity, with a green dot followed by the updated quantity, and this is also now reflected correctly in the X5 preview for the page. However it still does not update the site on the local server when the project is exported, which continues to show a red X with a 'product unavailable' error for that item.

I am still wondering if the tables in the database are not being created correctly and if this may be the cause of the failure to update the site properly? I have defined the prefix as 'cart' but no tables of that name (or any other) are visible in the database via phpMyAdmin.

Please can you advise further.

Many thanks.

Malcolm

Read more
Posted on the from Malcolm P.
Incomedia
Claudio D.
Incomedia

Hello Malcolm,

It could depend on a setting on the NAS server. I would suggest to make the test on a hosting server since there it works correctly.

Probably the NAS has some settings which are not allowing the function to work as expected on a real hosting server.

Many thanks!

Read more
Posted on the from Claudio D.
Malcolm P.
Malcolm P.
User
Author

Thank you, Claudio. I was hoping to avoid that until I was sure the database version was working correctly, as the shopping cart on that site is actively in use at present for bookings and I can't risk screwing up or losing potential orders that may come in while I'm testing.

The only realistic way of testing safely on the main hosting server would be to upload and trial the new version very late at night and then replace it immediately with the present version if that still doesn't work, but even that is not necessarily 100% safe.

If anyone has any further thoughts on why it might not function on the NAS, I would be grateful. Synology NAS units have their own web hosting facility and are used for just that purpose, and the remainder of the site both works correctly on the NAS and has all green 'Pass' marks on the control panel, so I'm unsure why this function should be the exception.

For what it's worth, the NAS is using PHP Version 5.6.31 and MariaDB 10 for the database, but the latter is said to be highly compatible with MySQL.

Thank you to anyone for any further suggestions.

Malcolm

Read more
Posted on the from Malcolm P.
Incomedia
Claudio D.
Incomedia

Hello Malcolm,

You can also upload the project on a subfolder online to make all the tests while the other website remains visible and these would not interfer.

About the NAS probablt some functions are not active and you would need to change the settings but I would recommend to test it on a subfolder online since then you will be sure all is working since you tested it on the hosting were the website will be then uploaded.

Many thanks!

Read more
Posted on the from Claudio D.
Malcolm P.
Malcolm P.
User
Author

Hi Claudio,

Many thanks for that further suggestion, which I hadn't realised was a option and may indeed be a way to test the new site without risking the old one. I'll look into that with the hosting company ASAP and will update here with any further news when I've finished testing.

Thanks again.

Malcolm

Read more
Posted on the from Malcolm P.