Problem with CSS/Template on last step of check out before paypal

Started by Tobes, July 25, 2013, 17:00:40 PM

Previous topic - Next topic

Tobes

Hi Virtuemart,

I hope you can help me, on the very last step, as I click confirm order and get redirected to paypal, there is a page on my site which loads incorrectly, no template or css by the looks of things, I dont know why, I have just about managed to get a screen shot, because the page redirects to paypal, and only flashes for 2 or 3 seconds.

I have attached an image, I can pm a link, but dont want a public link for my dev site, have a look at the image, has anyone seen this problem before as your redirected to paypal gateway?

Everything but this very brief redirect is working and looking great, its just this last page of virtuemart on the way to paypal gateway.

Thanks for any help

Tobes

Sorry I forgot to mention:

Joomla 2.5.11
Virtuemart 2.0.20a
I have tested both Virtuemart default theme, and shoplicious theme and same problem with both.


[attachment cleanup by admin]

Tobes

I can see the problem now, its because my joomla installation is in a subdirectory and for some reason Virtuemart is calling half the urls in the code from the root folder and not the sub directory,

anyone know where I could find the culprit code which is pointing half the urls to the wrong folder.

Thanks

Maxim Pishnyak

It was case in my practice.

I copied VM assets (with all css/images/js stuff) folder from standard place in VM to another place. And adjusted place of assets in VM configuration.

Such trick could allow for example to have VM js overrides particularly.
Or for example to have only one alone jquery.js for all web site areas. And it doesn't VM area or not. So it was possible to load at proper row in web page jquery.js. And without 3rd part plugins that could control behavior of jquery script.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Tobes

Hi Max,

Thanks for your help, I tried to move assets but didnt see what to change in configuration?

To be honest, I think the problem is more simple than that, but so far I can not find it, do you know what file deals with javascript:document.checkoutForm.submit();

Because i think somewhere in this file there is a url not defined properly, probably with a / in front of a url pushing everything back to the root folder.

Thanks

Maxim Pishnyak

Check 3rd tab in VM settings - "General Assets URL"

I believe that VM js scripts are responsible for a lot of things in VM. Something like vmprice.js and Company.

Why you can't find in what is a problem?
Quote from: Tobes on July 25, 2013, 17:00:40 PM
the page ... flashes for 2 or 3 seconds.
You have 2-3 seconds to press Ctrl-U (Firefox) to see page source before page starts to reload.
Page source is a very bold evidence of what is happened with VM assets.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Tobes

The page giving me these issues is this one: http://www.mywebsite.com/V5/index.php?option=com_virtuemart&view=cart&task=confirm

I dont see how moving the assets will help because the problem with this page when I check the code, is the urls to the template and css are incorrect.

The urls in the code look like this: <link rel="stylesheet" href="/templates/yoo_venture/css/base.css" />
Instead of looking like this which is correct <link rel="stylesheet" href="V5/templates/yoo_venture/css/base.css" />

I would be very happy if you have any ideas Max.

Thanks




Maxim Pishnyak

It's not VM assets issue as I was thinking. This's a Joomla template issue.

Time to ask for some support from your (lolz yoojoomla i.e.) Joomla template author.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Tobes

Hi Max, thanks for your reply, but no its not as I have tested it with other templates and still the same issue, its definitely VM payment issue.

I had the other problem with PayPal which was also related to the url and subdirectory, I think this is a similar issue and is related some how, but Im not sure how yet.

Maxim Pishnyak

Damn, again this subfolder issue at the end.

Do you have problems if you use standard VM payment?

If not, then use the latest version of Paypal plugin. Or latest version of this plugin download from VM SVN.

If problem still exists post here rows from your paypal.php with the "JURI::root" command.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

PRO

this looks like a php error ending the parsing early

try without template overrides


Tobes

Hi Max and Pro,

Ive already removed the overrides, and tried different templates, every time I get the same issue, I have a funny feeling its something to do with the paypal.php but I could be wrong.

I would really appreciate any more advise.

Thanks

Maxim Pishnyak

Quote from: Maxim Pishnyak on July 27, 2013, 16:13:57 PM
Damn, again this subfolder issue at the end.

Do you have problems if you use standard VM payment?

If not, then use the latest version of Paypal plugin. Or latest version of this plugin download from VM SVN.

If problem still exists post here rows from your paypal.php with the "JURI::root" command.
Follow my instructions pls.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Tobes

Hi Max,

I must apologise I missed that part of your post, thanks for reminding me.

Heres the lines of code you request, starting on line 208:


//"return" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . JRequest::getInt('Itemid')),
"return" => substr(JURI::root(false,''),0,-1) . JROUTE::_( 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . JRequest::getInt('Itemid')),

// Keep this line, needed when testing
//"return" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component'),
"notify_url"       => JROUTE::_ (JURI::root () . '/V5/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component'),
"cancel_return" =>substr(JURI::root(false,''),0,-1). JROUTE::_( 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&Itemid=' . JRequest::getInt('Itemid')),
//"undefined_quantity" => "0",
"ipn_test" => $method->debug,
"rm" => '2', // the buyer's browser is redirected to the return URL by using the POST method, and all payment variables are included
"bn" => "VirtueMart_Cart_PPA",
"image_url" => JURI::root() . $vendor->images[0]->file_url,
"no_shipping" => isset($method->no_shipping) ? $method->no_shipping : 0,
"no_note" => "1");

/*


Thank you kindly for your time Max :)

Toby

p.s you can see the line where I added /V5/ to the url which fixed the return path for the IPN, maybe I should implement Alatak's hack she posted here http://forum.virtuemart.net/index.php?topic=101478.msg396870#msg396870

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

Tobes

Hi Max,

No the standard payment is working fine, I am sent to the confirmation/order page and all css is perfectly intact, so now we know 100% its the paypal.php right.

So Im assuming its something to do with JURI::root

Im only saying this from what you said before and looking up what JURI::root is on google :)

TIA