VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: RFreund on January 05, 2012, 03:47:35 AM

Title: Warning 500 - Order Information
Post by: RFreund on January 05, 2012, 03:47:35 AM
When I check my order information as a customer at the top of the page a "Warning - 500" appears.
Why is this? What is this?

Thanks!
Title: Re: Warning 500 - Order Information
Post by: JtouchMobile.com on January 05, 2012, 03:55:27 AM
The same to me with VM 2.0.0 and J 1.7.3
url: index.php?option=com_virtuemart&view=orders&task=details&virtuemart_order_id=24&Itemid=536

Seem that there has issue while import payment plugin, line 83, views/orders/view.html.php

JPluginHelper::importPlugin('vmpayment');

[attachment cleanup by admin]
Title: Re: Warning 500 - Order Information
Post by: RFreund on January 06, 2012, 04:21:53 AM
hmmm... let me know if you figure out the problem, I'm guessing this must be common to all VM2 users then right?
Title: Re: Warning 500 - Order Information
Post by: Elnino on January 06, 2012, 20:47:43 PM
Yup same trouble here!
Title: Re: Warning 500 - Order Information
Post by: adham on January 07, 2012, 00:39:04 AM
I dont have that error, using joomla 1.5.x
Title: Re: Warning 500 - Order Information
Post by: PRO on January 07, 2012, 02:57:26 AM
edit
Title: Re: Warning 500 - Order Information
Post by: JtouchMobile.com on January 07, 2012, 10:16:45 AM
@BanquetTables.pro: Waiting for VM 2.0.1 ;) ?!
Title: Re: Warning 500 - Order Information
Post by: Venkko on January 10, 2012, 20:52:15 PM
I just got my payment pluging installed and I noticed that I have same problem. I am getting warning 500 message when checking order information.

So is there some way to get rid of this message?
Title: Re: Warning 500 - Order Information
Post by: Joomstore on January 17, 2012, 06:28:04 AM
Here's the solution that fixed it for me.

Seems payment methods and shipping methods are stored differently in the database but VM treats them as if they have exactly the same fields.

Locate the following code in administrator/components/com_virtuemart/plugins/vmplugin.php at about line 150


if (VmConfig::isJ15()) {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__plugins AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.id
AND j.element = "'.$this->_name.'"';
} else {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__extensions AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.extension_id
AND j.element = "'.$this->_name.'"';
}



Replace it with this code.

if (VmConfig::isJ15()) {
if(strstr($this->_configTable,"payment")) {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__plugins AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.id
AND vm.payment_element = "'.$this->_name.'"';
} else {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__plugins AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.id
AND j.element = "'.$this->_name.'"';
}
} else {
if(strstr($this->_configTable,"payment")) {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__extensions AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.extension_id
AND vm.payment_element = "'.$this->_name.'"';
} else {
$q = 'SELECT vm.* FROM `'.$this->_configTable.'` AS vm,
#__extensions AS j WHERE vm.`'.$this->_idName.'` = "'.$id.'"
AND vm.'.$this->_psType.'_jplugin_id = j.extension_id
AND j.element = "'.$this->_name.'"';
}
}


If the plugin is a payment plugin it will define a different SQL query than if it was a shipping plugin. I haven't checked it in J1.5 but it works perfectly in J1.7.
Title: Re: Warning 500 - Order Information
Post by: maxi1973 on January 25, 2012, 17:44:28 PM
Unfortunately it doesn't solve the problem i my case. I use Joomla 1.7.3 and virtuemart 2.0.1 updated today. The problem still exist