VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: antonino78 on October 25, 2014, 12:29:14 PM

Title: please wait while you are redirected to paypal
Post by: antonino78 on October 25, 2014, 12:29:14 PM
hello,
I upgraded VirtueMart 2.6.12
Now I no longer see (please wait while you are redirected to paypal) in the thank you page
Someone in my same problem?
Title: Re: please wait while you are redirected to paypal
Post by: John2400 on October 25, 2014, 13:33:51 PM
Ok I agree that I don't get "please wait" - but I only have to wait about two seconds. Infact it looks a little faster.


Is it really a Problem or just an opinion of difference?







Title: Re: please wait while you are redirected to paypal
Post by: antonino78 on October 25, 2014, 14:30:14 PM
Unfortunately I did not notice the speed difference.
I think this brings the customer to leave the page because there is no reference that leads to paypal.
So I'd like to see the text of pending
Title: Re: please wait while you are redirected to paypal
Post by: GJC Web Design on October 25, 2014, 14:36:11 PM
seems the form should submit as soon as the window is loaded
there is a message but this also doesn't show until the window is loaded which in theory is then immediately submitted
maybe add a delay to the submit?

JFactory::getDocument()->addScriptDeclaration ('

//<![CDATA[
   jQuery(document).ready(function($) {
       jQuery(window).load(function(){
         if(jQuery("#vmPaymentForm")) {
            jQuery("#vmPaymentForm").vm2front("startVmLoading","'.vmText::_('VMPAYMENT_PAYPAL_REDIRECT_MESSAGE', true).'" );
            jQuery("#vmPaymentForm").submit();
         }
      });
   });
//]]>
');
Title: Re: please wait while you are redirected to paypal
Post by: antonino78 on October 25, 2014, 14:49:54 PM
hello GJC,
in which file should put this code?
Title: Re: please wait while you are redirected to paypal
Post by: GJC Web Design on October 25, 2014, 15:14:57 PM
that code is already there (it is what changed for 2.6.12) - file plugins\vmpayment\paypal\paypal\helpers\paypalstd.php ~ line 177
Title: Re: please wait while you are redirected to paypal
Post by: antonino78 on October 25, 2014, 16:15:15 PM
I understand,
I hope you find a solution for this bug  :'(
Title: Re: please wait while you are redirected to paypal
Post by: jenkinhill on October 25, 2014, 16:55:18 PM
I don't think it is a bug, but maybe just personal preference. Also seems quicker to me also without waiting for the wait page.
Title: Re: please wait while you are redirected to paypal
Post by: antonino78 on October 25, 2014, 16:58:49 PM
As already mentioned above, for me it seems faster.
The wait time without notice may send away customers
Title: Re: please wait while you are redirected to paypal
Post by: GJC Web Design on October 25, 2014, 19:12:58 PM
It isn't a bug - it is just coded that way - you could try and show the
jQuery("#vmPaymentForm").vm2front("startVmLoading","'.vmText::_('VMPAYMENT_PAYPAL_REDIRECT_MESSAGE', true).'" );

immediately after the ready function - see if that shows the message

or just add the text to the returned  html so they aren't looking at a blank page (if this is what happens - haven't tried the new .12 Paypal)
Title: Re: please wait while you are redirected to paypal
Post by: maxlatino74 on October 27, 2014, 12:02:58 PM
I too have the same problem, to solve it just overwrite the folder plugins / vmpayment / paypal with the previous version   ;-)
Title: Re: please wait while you are redirected to paypal
Post by: alatak on November 05, 2014, 00:43:25 AM
Hello

Please give me the URL of your website. I will check why.
Do you have that option
configuration > template > Activate Css Styles & Javascripts >Using the VirtueMart CSS
checked ?

if you have unchecked that box, please add this css
.vmLoadingDiv {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 )
    url('../images/vm-preloader.gif')
    50% 50%
    no-repeat;
}

/* When the body has the loading class, we turn
   the scrollbar off with overflow:hidden */
.vmLoading {
    overflow: hidden;
}

/* Anytime the body has the loading class, our
   modal element will be visible */
.vmLoading .vmLoadingDiv {
    display: block;
}


this will display a preloader image that replaces the "please wait while redirecting"
Title: Re: please wait while you are redirected to paypal
Post by: antonino78 on November 05, 2014, 10:29:57 AM
I do not have active Using the VirtueMart CSS
how do I fix it?
VIEW SCREEN

[attachment cleanup by admin]
Title: Re: please wait while you are redirected to paypal
Post by: John2400 on November 05, 2014, 11:00:34 AM
I presume it is the second top one on your list.
Title: Re: please wait while you are redirected to paypal
Post by: maxlatino74 on November 05, 2014, 16:37:59 PM
hi, i have try to checked "Using the VirtueMart CSS" but "please wait while redirecting"  no work , only solutions for me is overwrite the folder plugins / vmpayment / paypal with the previous version  2.6.10
Title: Re: please wait while you are redirected to paypal
Post by: alatak on November 06, 2014, 21:46:56 PM
Hello

Please try this file

The file is to be placed here plugins/vmpayment/paypal/paypal/helpers/paypalstd.php

[attachment cleanup by admin]
Title: Re: please wait while you are redirected to paypal
Post by: seyi on November 08, 2014, 23:31:01 PM
I find that the redirection text is there, it is just at the very bottom left, because the styling for the new messaging system is not loaded.  The styling for vmLoadingDiv is in
www/components/com_virtuemart/assets/css/vmsite-ltr.css

This file is not being loaded.  And also I could not find any css for vmLoadingDivMsg, so made up my own.  The final code I added to the template css:

.vmLoadingDiv {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 )
    url('../../components/com_virtuemart/assets/images/vm-preloader.gif')
    50% 50%
    no-repeat;
}

/* When the body has the loading class, we turn
   the scrollbar off with overflow:hidden */
.vmLoading {
    overflow: hidden;
}

/* Anytime the body has the loading class, our
   modal element will be visible */
.vmLoading .vmLoadingDiv {
    display: block;
}

.vmLoadingDivMsg {
background-color: #d31b1b;
border: 1px solid #CCCCCC;
border-radius: 4px;
display: block;
font-size: 2em;
font-weight: bold;
padding: 10px;
position: absolute;
top: 50px;
left: 50px;

}

Title: Re: please wait while you are redirected to paypal
Post by: Milbo on November 09, 2014, 10:24:50 AM
Did you tested the file?
Title: Re: please wait while you are redirected to paypal
Post by: seyi on November 09, 2014, 22:56:05 PM
Nice, I totally missed that. Did not realize there was a page 2.  Oh well. :)
Title: Re: please wait while you are redirected to paypal
Post by: ettolo on November 10, 2014, 10:32:54 AM
Hi,
after update to 1.6.12 i get this js error at confirm page instead of redirection to paypal

"Method startVmLoading does not exist on Vm2 front jQuery library "

With the paypal plugin file provided by Alatak (thanks) i can see the payapal button but the error is still there and no automatic redirection to paypal

Any idea?
Thank you!
Title: Re: please wait while you are redirected to paypal
Post by: alatak on November 10, 2014, 17:54:22 PM
Hello

Some templates compress the js file. It might be the reason.
You have to delete it, and create a new one.
Title: Re: please wait while you are redirected to paypal
Post by: retizotyo on November 13, 2014, 23:57:39 PM
Quote from: seyi on November 08, 2014, 23:31:01 PM
I find that the redirection text is there, it is just at the very bottom left, because the styling for the new messaging system is not loaded.
...

Exactly the same here!
Is there a way to modify the code to load the text 'Please wait while you are redirected to paypal ' in the main content DIV (for example, right after the Thank you text)?
I have no experience with CDATA and such things  :-\

On my local coding laptop it takes up to 8 seconds to redirect to PayPal Sandbox. During VM is fetching data to post to paypal it looks like the site stopped without spinner gif or message at it's right place...

Any suggestions are welcome!