Virtuemart 2.0.24 - Backend Shopper Add/Delete Shipment Addresses Bug

Started by kohjacky, October 31, 2013, 19:47:22 PM

Previous topic - Next topic

kohjacky

This is a bugfix that cause the Shipment Addresses tab to not open up when clicking on the "Add Address" link.
I have changed the coding on administrator/components/com_virtuemart/views/user/view.html.php on Line 128. Look for

if(JRequest::getInt('new','0')===1){
and change to
if(JRequest::getInt('new','0')==1){

For the "Delete Address" link on the backend, the function is not working as well. Add below under administrator/components/com_virtuemart/controllers/user.php


function removeAddressST(){
$virtuemart_user_id = JRequest::getVar('virtuemart_user_id');
$virtuemart_userinfo_id = JRequest::getVar('virtuemart_userinfo_id');
$userModel = VmModel::getModel('user');
$userModel->removeAddress($virtuemart_userinfo_id);
$layout = JRequest::getWord('layout','edit');
$this->setRedirect('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]='.$virtuemart_user_id, $msg);
}


And for the frontend "delete address" link to work, under Line 275 of components/com_virtuemart/controllers/user.php. Look for

$userModel->removeAddress();
and change to
$userModel->removeAddress($virtuemart_userinfo_id);