Jump to content
Sign in to follow this  
bmcewan

Purchase Without Account Updated & Admin Functionality

Recommended Posts

For reference: I have installed PWA 0.82

 

I hope someone can assist me with the following which doesn't work correctly with PWA;

for shipping methods I have 4 options: priority, standard, store pickup and, with the approriate amount, free shipping.

All four shipping options are shown when you create an account normally or just login to an existing account. When you choose PWA however the store pickup and free shipping are not shown amongst the shipping methods. I have searched for this for days now but I can't put my finger on it.

What I did find is that the two shipping modules not shown with PWA both have this construction:

   if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_SPU_ZONE > 0) ) {
       $check_flag = false;
       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_SPU_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
       while ($check = tep_db_fetch_array($check_query)) {
         if ($check['zone_id'] < 1) {
           $check_flag = true;
           break;
         } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
           $check_flag = true;
           break;
         }
 }
 
 if ($check_flag == false) {
         $this->enabled = false;
       }
     }
   }

It seems the problem is lying in $order->delivery['zone_id'] which is always zero (while $check['zone_id'] is normally filled) and so the module will not show. What I don't understand is why this is different for PWA as compared to a normal login or after a normal create account ? I have gone through all related files multiple times but I am a bean if I understand where it goes wrong.

 

Thanks in advance !

Share this post


Link to post
Share on other sites
For reference: I have installed PWA 0.82

 

I hope someone can assist me with the following which doesn't work correctly with PWA;

for shipping methods I have 4 options: priority, standard, store pickup and, with the approriate amount, free shipping.

All four shipping options are shown when you create an account normally or just login to an existing account. When you choose PWA however the store pickup and free shipping are not shown amongst the shipping methods. I have searched for this for days now but I can't put my finger on it.

What I did find is that the two shipping modules not shown with PWA both have this construction:

   if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_SPU_ZONE > 0) ) {
       $check_flag = false;
       $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_SPU_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
       while ($check = tep_db_fetch_array($check_query)) {
         if ($check['zone_id'] < 1) {
           $check_flag = true;
           break;
         } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
           $check_flag = true;
           break;
         }
 }
 
 if ($check_flag == false) {
         $this->enabled = false;
       }
     }
   }

It seems the problem is lying in $order->delivery['zone_id'] which is always zero (while $check['zone_id'] is normally filled) and so the module will not show. What I don't understand is why this is different for PWA as compared to a normal login or after a normal create account ? I have gone through all related files multiple times but I am a bean if I understand where it goes wrong.

 

Thanks in advance !

 

For what it's worth, I have that exact same code in my SPU file and the Pick Up option shows under PWA.

Share this post


Link to post
Share on other sites

I only have a flat shipping fee and my wish is that when the customer clicks on the purchase without account button, he should be transferred directly to my ikobo's payment page. Is this possible? If yes then how? Please help me.

Edited by OnlineStore

Share this post


Link to post
Share on other sites
For what it's worth, I have that exact same code in my SPU file and the Pick Up option shows under PWA.

 

Baddog,

 

First, thanks for your reply ! It is strange then indeed unless you have Admin->Confgurtation->Customer Details->State set to true ?!

When I switch that to true both shipping methods do show up but I don't want the state be visible to customers as I have no use for it.

The difference stays with State set to false for PWA and normal create account/login. Somehow, somewhere there is a difference with the handling of zone ID with PWA and the normal osC procedure.

I hope you will see in a brilliant flash why this is so !

 

Kind regards,

Howard

Share this post


Link to post
Share on other sites
Erin, if you have find a solution for this, please let me know.

 

// Fredrik

Hi Fredrik,

Not good news, sorry. I finally removed the print button on the checkout success page, because of this. Nothing more irritating than a web page that does not function properly.... In case you did not follow all the rest of the talks on this subject...

 

As I understand it, the customer must have a running session that matches the order they are requesting, at the time the printout is requested, or they will be sent to the login page.

This is a security measure put in place to keep somebody from entering various order numbers and finding out all the info on those orders.

With PWA, the session has to be destroyed when the order is completed.

Since the "session" is destroyed when they hit that page, they cannot view any order.

The only idea I saw was to have the session destroyed upon clicking the continue button, but that is not a good idea either, because what if they don't click continue, but choose another of the various links on the page? No session destroy.

 

Apparently, there is no way to time the session destroy, so that it can wait 5 or 10 minutes, either. That would be the ideal, plenty of time to print an order.

 

I am at a loss, just learning php and have had a few issues with PWA, although I feel it is a great contribution. I would just like to get these two to work together, if possible.

 

Anyway, Fredrik, if you have any thoughts or come up with a solution, please post here, as I think there are quite a few of us with the print order contribution that need a solution.

 

Peace,

Erin :)

Share this post


Link to post
Share on other sites

Hi Everyone,

On another note:

I also had problems with people who had previously set up accounts trying to use the PWA and getting a 404 page saying the email address was already set up with an account (file) couldn't be found. A very strange error and I could not solve the problem.

 

Since I couldn't correct the error, I finally made a second login page and had a customer (with a previous account set up) sent to this page where they would see a message and asked to log in. I only add this here, because I have seen some others had the same problem and wanted to share my solution. Not ideal, but it worked for me.

 

What I would really like to do, is bypass the email check altogether and let anyone who wants to use the PWA do so.

 

If anyone knows how to allow a person, that has already created an account, to use PWA, I would love to see their solution. Sometimes a customer might want to just checkout, for one reason or another, and it would be nice if they could just do that.

 

I understand that they would not have access to their order information and would post that on the PWA, but would this cause any other problems I should be aware of?

 

Thanks, for any help on this!

 

Peace,

Erin :)

Share this post


Link to post
Share on other sites
Hi Everyone,

On another note:

I also had problems with people who had previously set up accounts trying to use the PWA and getting a 404 page saying the email address was already set up with an account (file) couldn't be found. A very strange error and I could not solve the problem.

 

Since I couldn't correct the error, I finally made a second login page and had a customer (with a previous account set up) sent to this page where they would see a message and asked to log in. I only add this here, because I have seen some others had the same problem and wanted to share my solution. Not ideal, but it worked for me.

 

What I would really like to do, is bypass the email check altogether and let anyone who wants to use the PWA do so.

 

If anyone knows how to allow a person, that has already created an account, to use PWA, I would love to see their solution.  Sometimes a customer might want to just checkout, for one reason or another, and it would be nice if they could just do that.

 

I understand that they would not have access to their order information and would post that on the PWA, but would this cause any other problems I should be aware of?

 

Thanks, for any help on this!

 

Peace,

Erin :)

 

Erin,

 

You shouldn't have gotten a 404 error when someone tries PWA while already registered with the same email, name and last name ! There should simply be an error text noting that an account already exists and you should be able to rectify that from there. It is difficult to say why you got that 404, maybe you did some other changes or missed something when installing PWA.

As it is you only get that message if email, name and last name exactly match. It is no problem to go PWA if you change the name and/or lastname while using a registered email adress.

Maybe it is an idea to just note that to a customer in case it occurs. I don't see any side effects if a registered customer wants to do PWA with a different name. He can not view that particular order but all the rest should be te same when he logs in normally.

 

Kind regards,

Howard

Share this post


Link to post
Share on other sites

I don't know if anyone is having similar problems - I hope not.

 

I've recently installed the latest pwa version.

 

When I and two or three others are logged into my website simultaneously, we can see each other's orders in the shopping cart. Not only that but if one of us is logged in, its possible for someone else to access the account details by clicking on My Account.

 

Can anyone suggest a reason for this, or where I need to start looking to resolve this? I would really appreciate some help with this as I'm obviously worried about the security issues.

 

Many thanks in advance

Share this post


Link to post
Share on other sites

Wow, this could happen if those different sessions are treated as one. I will go and try on my website immediately. If it's true, this issue must be solved asap ...

Share this post


Link to post
Share on other sites
Wow, this could happen if those different sessions are treated as one. I will go and try on my website immediately. If it's true, this issue must be solved asap ...

 

Ouch, confirmed :(

When the second PWA customer creates his account he will get also what a previous PWA customer has into his basket. Not good.

Share this post


Link to post
Share on other sites
Ouch, confirmed  :(

When the second PWA customer creates his account he will get also what a previous PWA customer has into his basket. Not good.

 

In reply to myself; I thought it would be good to test with cookies disabled and it seems more to be a cookie problem. With sessions only the problem does not occur so now I wonder what will happen on different computers around the world where people have cookies enabled and/or disabled ?! If it is a local cookie problem then the problem shouldn't arise very easily.

Share this post


Link to post
Share on other sites
In reply to myself; I thought it would be good to test with cookies disabled and it seems more to be a cookie problem. With sessions only the problem does not occur so now I wonder what will happen on different computers around the world where people have cookies enabled and/or disabled ?! If it is a local cookie problem then the problem shouldn't arise very easily.

 

Well I'm sorry to hear that this is a general problem and not just something I have 'broken' as was my first concern.

 

I'm not sure how this can be a problem relating to cookies though, when information is being shared between users on different computers around the globe? What makes you think it's cookie related?

Share this post


Link to post
Share on other sites
Well I'm sorry to hear that this is a general problem and not just something I have 'broken' as was my first concern.

 

I'm not sure how this can be a problem relating to cookies though, when information is being shared between users on different computers around the globe? What makes you think it's cookie related?

 

Because it doesn't happen when I disable cookies in my two browsers I was testing this with. When cookies are allowed the products from one cart go to another for PWA users. I wouldn't know any other explanation for this ?

I can't test on different computers so if it happens only because I use two different sessions on one computer it doesn't mean the same will happen when working on different computers. In the last case there shouldn't be a problem.

Share this post


Link to post
Share on other sites
Because it doesn't happen when I disable cookies in my two browsers I was testing this with. When cookies are allowed the products from one cart go to another for PWA users. I wouldn't know any other explanation for this ?

I can't test on different computers so if it happens only because I use two different sessions on one computer it doesn't mean the same will happen when working on different computers. In the last case there shouldn't be a problem.

 

I had two friends in completely different locations(countries) to myself login to my website. We were able to view cart contents/account information belonging to each other when on the site at the same time. It seems to happen intermittently rather than all the time and while one of us might see anothers account details, another might not see anything other than their own order.

 

I'm not a php wizz so I have no explanations, I hope someone is able to help resolve this.

Share this post


Link to post
Share on other sites
I had two friends in completely different locations(countries) to myself login to my website. We were able to view cart contents/account information belonging to each other when on the site at the same time. It seems to happen intermittently rather than all the time and while one of us might see anothers account details, another might not see anything other than their own order.

 

I'm not a php wizz so I have no explanations, I hope someone is able to help resolve this.

 

Did you check if this only happened while being you all PWA users or also with normal logins ? Might be interesting to know if there is any difference and if it is solely PWA.....

Share this post


Link to post
Share on other sites
Did you check if this only happened while being you all PWA users or also with normal logins ? Might be interesting to know if there is any difference and if it is solely PWA.....

 

I tried this with pwa enabled and disabled in the admin. Both had the same results. I haven't tried this on the site where pwa isn't installed at all.

Share this post


Link to post
Share on other sites
I tried this with pwa enabled and disabled in the admin. Both had the same results. I haven't tried this on the site where pwa isn't installed at all.

 

Which could lead to the conclusion it is not PWA but something with the configuration of your site and/or server ?! If possible you should do some testing with the site where no PWA is involved at all before jumping into conclusions. I can't imagine it is something with osC itself otherwise there would have been messages all over for a long time.

Share this post


Link to post
Share on other sites
I can't imagine it is something with osC itself otherwise there would have been messages all over for a long time.

 

 

I was thinking along the same lines. It'll take me a while to get a previous version of the site without pwa going again, then I'll do some testing. I'll report back with the results.

 

In the meantime, if anyone else is able to test their site with simultaneous users it would be interesting to hear if anyone experiences problems with users being able to see each other's info.

Share this post


Link to post
Share on other sites

Just a quick update. I've checked another site that I have, which is completely separate, which also has pwa installed. Again simultaneous users can see each other's information.

 

Both sites were generated completely separately and have different contributions installed and I have not copied anything from one site to the other. The contributions were loaded from the instructions both times.

 

Another site which is oscommerce, without pwa, does not experience any such problems. Can I conclude that this is something to do with pwa?

Share this post


Link to post
Share on other sites
Just a quick update. I've checked another site that I have, which is completely separate, which also has pwa installed. Again simultaneous users can see each other's information.

 

Both sites were generated completely separately and have different contributions installed and I have not copied anything from one site to the other. The contributions were loaded from the instructions both times.

 

Another site which is oscommerce, without pwa, does not experience any such problems. Can I conclude that this is something to do with pwa?

 

Interesting ! I can't test myself until tomorrow morning with different locations and computers but I will then and see what happens. It is a bit frightening that it even seems to happen with PWA turned of through the admin if I read your previous remarks well.

Share this post


Link to post
Share on other sites
Interesting ! I can't test myself until tomorrow morning with different locations and computers but I will then and see what happens. It is a bit frightening that it even seems to happen with PWA turned of through the admin if I read your previous remarks well.

 

Yes, it happens when pwa is disabled in the admin. Thanks for checking this, I will wait to see what your results are.

Share this post


Link to post
Share on other sites
Erin,

 

You shouldn't have gotten a 404 error when someone tries PWA while already registered with the same email, name and last name ! There should simply be an error text noting that an account already exists and you should be able to rectify that from there. It is difficult to say why you got that 404, maybe you did some other changes or missed something when installing PWA.

As it is you only get that message if email, name and last name exactly match. It is no problem to go PWA if you change the name and/or lastname while using a registered email adress.

Maybe it is an idea to just note that to a customer in case it occurs. I don't see any side effects if a registered customer wants to do PWA with a different name. He can not view that particular order but all the rest should be te same when he logs in normally.

 

Kind regards,

Howard

 

Hi Howard,

Thanks, for the feedback!

Yes, I saw the code that checks for failure and redirects, but it did not seem to work for me. It gave some error text, but rather than the actual text it gave something akin to /catalog/this+email+address+is+already+registered+.....php file cannot be found.

 

It is probably something to do with changes made by another contribution or my bad comparing. I have several contributions installed and went over it several times. After 3 days of dinking around, I finally opted to refer to an alternate login, if the account was registered, showing an error message very similar to the contribution's.

 

About allowing registered accounts to PWA....If I remove the checking for account information, that should allow anyone to PWA, is that correct? Is there any reason why I shouldn't?

 

Then, I could just mention that if they checkout this way, account/order information will not be available to them online.

I just hate to lose business, because somebody "thinks" it is too much trouble to log in or look for their info.

 

Thanks, for your help!

 

Peace,

Erin :)

Share this post


Link to post
Share on other sites
Yes, it happens when pwa is disabled in the admin. Thanks for checking this, I will wait to see what your results are.

 

Just finished the test and can only say there is indeed a big problem with PWA accounts. When logged in normally there is no problem but when 2 customers act as PWA the second one going to the checkout will find the products from the first one in his basket also. If there are even more simultaineously PWA users I guess the last one going to checkout is in for a BIG surprise if the rest hasn't moved on already.

I'll probably leave it as it is right now as I would hate missing this feature and the chances (for my kind of stock) are small this will occur. Meanwhile I hope we, and especially the maken(s) of this contrib who will know much more of the ins and outs, can find a solid solution for this behaviour.

 

So far I have found three rather big problems with PWA 0.82:

1) The issue we are talking about right now with customer carts combining spontaineously

2) Missing shipment methods when you have Customer Details->State set to false in your admin

3) No way of getting rid of the PWA account when a customer decides not to go straight through all checkout steps (he can not change his mind after he has already done the steps for creating a PWA account unless he waits until the session is finished)

 

I have solved 3) by reinstating the logoff option for PWA customers also. This also meant I had to change the logoff module because 'under the hood' the next customer on the same computer would still be PWA although he/she logged in normally (which maybe could also happen with different computers but I couldn't test that).

Share this post


Link to post
Share on other sites
Just a quick update. I've checked another site that I have, which is completely separate, which also has pwa installed. Again simultaneous users can see each other's information.

 

Both sites were generated completely separately and have different contributions installed and I have not copied anything from one site to the other. The contributions were loaded from the instructions both times.

 

Another site which is oscommerce, without pwa, does not experience any such problems. Can I conclude that this is something to do with pwa?

If you hve PWA installed but turned off (set to false), does it still happen? Is is safe to assume that all a user can see is another user's cart contents (not name, address, etc.)?

Share this post


Link to post
Share on other sites
If you hve PWA installed but turned off (set to false), does it still happen?  Is is safe to assume that all a user can see is another user's cart contents (not name, address, etc.)?

 

No it is not safe to assume anything, my tests showed that a user can not only see the name, address but change the details, certainly with PWA turned on.

 

When I tested this with PWA turned off in the admin, I believe the results were exactly the same but I want to recheck this just to be sure. Certainly, users saw each other's cart contents in this case also (i.e. with PWA switched off in the admin). I can't check re access to users details now with PWA off as I'm on my way out, but will return with the results later today.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×