News:

Support the VirtueMart project and become a member

Main Menu

[TRACKER 2060] VirtueMart and Paypal

Started by alexs, April 25, 2008, 16:35:09 PM

Previous topic - Next topic

Lex

Quote from: solidstatic on April 30, 2008, 20:50:42 PM
I changed the registration from "None" to "silent" and now when I register it brings up someone else's information, (address, name, phone, ...) so that won't work at all.

I'm pretty sure this only happens due to "cookies". If you logout and clear the cache the address from the last person that used the store on that browser doesn't show.

Looking forward the the RE-DIRECT fix. Thanks Soeren.

Lex

One more thing that I think is relevant to this post since it came about while trouble the Paypal redirect issue...

Using "Silent Registration" when you register a user, TWO instances of the same user appear, and when that user places an order, TWO instances of the same order appear? I've attached a picture for you to see. I've got a test installation running where this does not happen. When you delete either one of the instances, they both disappear.

Is this something necessary, or a fluke of some kind. Will affect the person in charge of maintaining the website?

thanks.  ???

[attachment cleanup by admin]

Lex

when do you think the "no re-direction" error will be fixed?

thank you.

Lex

Soren, were you able to fix the Paypal "no-redirect" problem? We would like to consider not requiring a registration at all. So far, re-direct only happens if at least "silent-reg" is activated. If you can't get to this, can you give me some hints as to what script is responsible so I can try to hack it?

Cheers!

Dave Withnall

The latest nightly works fine for me

swatkins

I am haveing the same problems with the no redirect.. I read the above link , used that code and still have the same problem... HELP :)

triaddsn

Am also having the same issue.  A customer ordered today and didn't redirect just went to the Thank You and created a pending order.  Also, silent account creation puts in the information of the last person who filled in info at the site.  I can clear the cookies as mentioned above from my site, but customers will not understand this...any fix for this?

swatkins

I am having the same problem with three different stores. :(  Any idea when this will be addressed?   I really need for no registration to be fixed...

swatkins

Quote from: Soeren on May 02, 2008, 11:05:03 AM
New PayPal Code for VirtueMart 1.1 is posted here:
http://forum.virtuemart.net/index.php?topic=39584.0
Besides, I will fix the no-redirection error.
ciao, Sören

Hi Soren..

Any news on fixing the redirection error? I applied the code you posted and still no redirection...

Thanks for your time and effort..

  Steve

sjdalf

hi,

has this issue been rectified? I can't seem to find anything that indicates it has (including installing the 1.1.1 patch).

So I dabbled with the code and implemented a hack which gets around the problem (though whether my hack has repercussions I don't know).

the first file /components/com_virtuemart/themes/default/templates/pages/checkout.thankyou.tpl.php.

lines 39,40

if( empty($auth['user_id'])) {
   return;

basically, because no user is being registered, $auth['user_id'] is empty, so the condition is called and the return is made. This is a problem, because subsequent code includes the place where the PayPal file is included (including the code that does the redirection). So first I commented out these two lines.

Once this is done, the code that calls the PayPal stuff can be called. However, the PayPal code requires values in an object '$db->f', which you can see.

This object is set in the file /administrator/components/com_virtuemart/html/checkout.thankyou.php. The line where it is set is line 52: $db->query($q). Problem is, the query involved in this call uses $auth["user_id"] on line 50. The result is a query which returns nothing, because $auth["user_id"] is empty. So I just commented out line 50, because I figured the other WHERE statements checks which involve 'order_id' will select the right database entry anyway.

I don't know much about the ins and outs of Virtuemart, so I could be way off. What do other people think?


- Simon

sjdalf

... following on from my previous post

well, my site re-directed to PayPal, but following that, upon return to my site from PayPal, I received the message "Order not found!".

I worked out that this is also because of the object '$auth["user_id"]'.

in the file administrator/components/com_virtuemart/html/checkout.result.php you will see at line 29 the following:

$q .= "#__{vm}_orders.user_id= " . $auth["user_id"] . " ";

comment out this line and remove the 'AND' from line 30 to get

$q .= "#__{vm}_orders.order_id= $order_id ";

this results in a successful return to the order confirmation page with a message notifying you that the order has been placed.



A couple of things though:
1. the order status remains at pending even though the PayPal transaction is successful.
2. If you go to click on the invoice link, you are denied entry because you are not actually a user who is logged in (i.e. this is unregistered mode).


This second point in particular suggests a more fundamental issue with the contradiction between not having users register and having paypal order information reference registered users stuff.


What is happening with regards to the official rectification of this issue?





alek123

Quote from: sjdalf on July 27, 2008, 17:07:12 PM
... following on from my previous post
well, my site re-directed to PayPal, but following that, upon return to my site from PayPal, I received the message "Order not found!".
I worked out that this is also because of the object '$auth["user_id"]'.
in the file administrator/components/com_virtuemart/html/checkout.result.php you will see at line 29 the following:

$q .= "#__{vm}_orders.user_id= " . $auth["user_id"] . " ";
comment out this line and remove the 'AND' from line 30 to get
$q .= "#__{vm}_orders.order_id= $order_id ";
this results in a successful return to the order confirmation page with a message notifying you that the order has been placed.
A couple of things though:
1. the order status remains at pending even though the PayPal transaction is successful.
2. If you go to click on the invoice link, you are denied entry because you are not actually a user who is logged in (i.e. this is unregistered mode).
This second point in particular suggests a more fundamental issue with the contradiction between not having users register and having paypal order information reference registered users stuff.

What is happening with regards to the official rectification of this issue?


TANK YOU!!! This work for me.

Alek