gerkintrigg Posted July 23, 2012 Share Posted July 23, 2012 I wondered if there's a way to allow users to easily use our shopping cart functionality without allowing them unrestricted access to our database. I run http://www.truro.com - a free business listing website. The boss wants to allow customers to be able to add a shopping cart system to their own site using an easy-to-install code and I have no clue how to go about doing it - I love the way he throws stuff like this at me and expects me to work it out. ) Can anyone point me in a direction that might come close to answering it? I've thought of iframes and web forwarding, but I can see huge problems with all of the above. I suppose the issue will be allowing PHP/MySQL access from a server that might not have that kind of functionality. Quote Link to comment https://forums.phpfreaks.com/topic/266115-shopping-carts-on-other-websites/ Share on other sites More sharing options...
shyam13 Posted July 23, 2012 Share Posted July 23, 2012 The best way to solve this problem, would mainly use MySQL and/or php, and if possible use user authentication. Quote Link to comment https://forums.phpfreaks.com/topic/266115-shopping-carts-on-other-websites/#findComment-1363675 Share on other sites More sharing options...
gerkintrigg Posted July 23, 2012 Author Share Posted July 23, 2012 yeah, but how would we be able to offer a website that is hosted on an HTML-only server this kind of functionality? Quote Link to comment https://forums.phpfreaks.com/topic/266115-shopping-carts-on-other-websites/#findComment-1363679 Share on other sites More sharing options...
xyph Posted July 23, 2012 Share Posted July 23, 2012 HTML-only is a big issue, and forces you to use some form of iFrame solution, or JavaScript solution. JavaScript doesn't play nice with cross-domain interaction (security reasons) though. I don't think it's something you can realistically offer your customers that don't have some sort of server-side scripting language available, and some kind of IT personnel to implement any sort of framework you give them. iFrames won't integrate fluidly into their site, but it would be your only option. I suppose you could use a Flash application to do it as well, but you run into the same issues. You could always host the entire system for them, and have them simply link the customers to their 'shopping cart landing page' hosted on your domain. You can then have some sort of administrative back-end for your customers to add/remove products, check invoices, etc. Regardless, it's going to be a lot of work. 'Giving' them the information isn't an issue. You can give each customer an 'API key' tied to their account, that they can use to authorize any polling against you database (the API key would limit them to their own information only). This is kind of pointless on a static web-page though. Quote Link to comment https://forums.phpfreaks.com/topic/266115-shopping-carts-on-other-websites/#findComment-1363684 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.