Page 2 of 2
Posted: Tue Jul 03, 2007 8:54 am
by phpcoder
onion2k wrote:miro_igov wrote:@ onion2k: he wants the items disappear without to interact with the server (page reload).
Yes, I understand that. He's being a bit silly, and is about to start building a
really inaccessible shopping application. Far be it from me to dissuade him though. The worst part of it is that he's in the UK, so he'll potentially be breaking the law (depending on what he's selling and whether there's any other ways to buy it).
[s]M[/s]
I'm not silly thing is [s]u[/s]
you [s]r[/s]
are not understanding what [s]m[/s]
I'm trying to do. Let me tell you why I am trying to do this,. I am developing shopping cart for small organization. THEY DONT HAVE THAT MUSH STOCK AND ALSO IF THEY RAN OUT OF THE STOCK SOME TIME ITS HARD FOR THEM TO RE ORDER THE SAME PRODUCT. AS THAT PRODUCT MIGHT NOT BE AVAILABLE. SO IF THERE IS ONLY ONE PRODUCT LEFT IN THE STOCK AND user1 order that product (added in user1 session) now the stock will show they dont have any more , same time user2 try to get same product and he get the message that product is out of stock. So user2 cant have that product but after say like few time the user1 change his mind and drop that product from his cart, after that the stock is updated and then again the item is back in stock. But the user2 knows that they dont have that item in the stock.
Because of this I wanna drop the item automaticaly from the cart.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
Posted: Tue Jul 03, 2007 9:05 am
by Gente
So why don't like my code?
If you want to be absolutely sure make verification script. Put AJAX request that calls this script every 30 seconds + when the page loads in the header of every page.
What is the problem?
You're saying we don't understand you but don't explaining what's wrong with the proposed code.
Posted: Tue Jul 03, 2007 10:07 am
by onion2k
Before you move forward with an AJAX solution, let me bring a couple of things to your attention:
1. It's estimated that between 5% and 15% of internet users browse with Javascript switched off. That means that approximately 1 in every 10 users will not be running any AJAX code in the website. If AJAX is used for something as critical as stock level management then your site is guaranteed to crash and burn in the first few weeks of it's life.
2. The UK has a lovely little law called the Disability Discrimination Act. This law maintains that any service a business offers must be accessible to disabled users. It applies to shops, hotels, pubs, everything ... including online businesses. If you only sell online, or if the online price is lower than a telephone or store price, a disabled user must reasonably be able to access the service. This means that using features such as AJAX without also creating a non-AJAX version as a back up will technically break the law and leave you open to being sued.
AJAX should always be used as an embellishment and never as a requirement. Create a working website and then enhance it with AJAX features that degrade back to the standard HTML version if a user doesn't have scripting enabled. There's no other option.
Posted: Tue Jul 03, 2007 10:12 am
by Gente
onion2k wrote:Before you move forward with an AJAX solution, let me bring a couple of things to your attention:
1. It's estimated that between 5% and 15% of internet users browse with Javascript switched off. That means that approximately 1 in every 10 users will not be running any AJAX code in the website. If AJAX is used for something as critical as stock level management then your site is guaranteed to crash and burn in the first few weeks of it's life.
2. The UK has a lovely little law called the Disability Discrimination Act. This law maintains that any service a business offers must be accessible to disabled users. It applies to shops, hotels, pubs, everything ... including online businesses. If you only sell online, or if the online price is lower than a telephone or store price, a disabled user must reasonably be able to access the service. This means that using features such as AJAX without also creating a non-AJAX version as a back up will technically break the law and leave you open to being sued.
AJAX should always be used as an embellishment and never as a requirement. Create a working website and then enhance it with AJAX features that degrade back to the standard HTML version if a user doesn't have scripting enabled. There's no other option.
I also think so and don't want to tell that AJAX is primary way in this situation, but seems that idea to put the script in header of php pages wasn't accepted.
Posted: Tue Jul 03, 2007 10:22 am
by phpcoder
Gente wrote:So why don't like my code?
If you want to be absolutely sure make verification script. Put AJAX request that calls this script every 30 seconds + when the page loads in the header of every page.
What is the problem?
You're saying we don't understand you but don't explaining what's wrong with the proposed code.
Thnaks for your help. Really appreciated. If there is any one who can help me in writing ajax so that I can try it.
Thanks
Posted: Tue Jul 03, 2007 10:25 am
by Gente
The last posts of this thread
viewtopic.php?t=69734 can be useful.
Posted: Tue Jul 03, 2007 11:28 am
by RobertGonzalez
It is just an opinion, but I really think you need to build the application without any AJAX at all. Once it works that way, use AJAX as an enhancement, but not as a necessary tool to make your cart run.
In fact, as I often do, code your application with Javascript off and make sure it is usable that way. If you really want to make sure your site is accessible, turn off CSS as well and try to navigate your site. Or better yet, use a screen reader and see if a person with vision impairments can navigate your site.
Again, just suggestions that support what other members have already told you in this thread.