Good day
I want to hide the list of shipment address on User maintenance page when the user is adding a new shipping address or when they edit an existing address
I am using VirtueMart 3.2.14 and Joomla version, 3.8.10.
Try this :
$view = vRequest::getCmd('view','');
$task = vRequest::getCmd('task','');
$new = vRequest::getCmd('new','');
if ($view=='user' and $task=='addST') {
if ($new==1) {
// User adding a new ST address, do what yo need to do
}
else {
// User editing a ST address, do what you need to do
}
regards
Jörgen @ Kreativ Fotografi
Thanks, it worked
<?php
/**
*
* Enter address data for the cart, when anonymous users checkout
*
* @package VirtueMart
* @subpackage User
* @author Max Milbers
* @link https://virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: edit_address_addshipto.php 9413 2017-01-04 17:20:58Z Milbo $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>
<fieldset>
<legend>
<?php
/*echo '<span class="userfields_info">'.vmText::_('COM_VIRTUEMART_USER_FORM_SHIPTO_LBL').'</span> ';*/
?>
<?php
$view = vRequest::getCmd('view','');
$task = vRequest::getCmd('task','');
$new = vRequest::getCmd('new','');
if ($view=='user' and $task=='addST') {
echo '';
}
else
{
echo '<fieldset><legend class="userfields_info">Delivery Addresses</legend></fieldset>';
echo $this->lists['shipTo'];
}
?>
</legend>
</fieldset>
You´re welcome :)
Jörgen @ Kreativ Fotografi