News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Missing argument 1 for VirtueMartModelUser::removeAddress(), removing ship addr.

Started by WebStuff, October 09, 2013, 14:46:50 PM

Previous topic - Next topic

WebStuff

Joomla! 2.5.14
VM 2.0.24

$virtuemart_userinfo_id is missing from the removeAddress() call in [SITE_ROOT]/components/com_virtuemart/controllers/user.php

function removeAddressST(){

$virtuemart_userinfo_id = JRequest::getVar('virtuemart_userinfo_id');

//Lets do it dirty for now
$userModel = VmModel::getModel('user');
$userModel->removeAddress();

$layout = JRequest::getWord('layout','edit');
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout, $this->useXHTML,$this->useSSL) );
}


I changed it to the following and shipping addresses can now be removed. I don't know if there would be any other 'side-effects' to this.
function removeAddressST(){

$virtuemart_userinfo_id = JRequest::getVar('virtuemart_userinfo_id');

//Lets do it dirty for now
$userModel = VmModel::getModel('user');
$userModel->removeAddress($virtuemart_userinfo_id);

$layout = JRequest::getWord('layout','edit');
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout, $this->useXHTML,$this->useSSL) );
}

alatak