Author Topic: [TRACKER 2060] VirtueMart and Paypal  (Read 33257 times)

Lex

  • Beginner
  • *
  • Posts: 13
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #15 on: May 23, 2008, 09:00:41 am »
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

  • Beginner
  • *
  • Posts: 13
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #16 on: May 23, 2008, 09:58:38 am »
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

  • Beginner
  • *
  • Posts: 13
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #17 on: May 28, 2008, 04:57:26 am »
when do you think the "no re-direction" error will be fixed?

thank you.

Lex

  • Beginner
  • *
  • Posts: 13
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #18 on: June 17, 2008, 00:42:15 am »
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

  • Beginner
  • *
  • Posts: 47
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #19 on: June 17, 2008, 01:01:46 am »
The latest nightly works fine for me

swatkins

  • Beginner
  • *
  • Posts: 21
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #20 on: June 17, 2008, 03:38:31 am »
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

  • Beginner
  • *
  • Posts: 2
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #21 on: June 17, 2008, 17:56:42 pm »
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

  • Beginner
  • *
  • Posts: 21
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #22 on: June 24, 2008, 06:14:08 am »
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

  • Beginner
  • *
  • Posts: 21
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #23 on: June 24, 2008, 06:21:10 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

  • Beginner
  • *
  • Posts: 2
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #24 on: July 24, 2008, 18:59:36 pm »
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

  • Beginner
  • *
  • Posts: 2
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #25 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?





alek123

  • Beginner
  • *
  • Posts: 1
Re: [TRACKER 2060] VirtueMart and Paypal
« Reply #26 on: September 15, 2008, 14:50:44 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