VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: welrachid on October 24, 2016, 10:30:11 AM

Title: Dont let users edit/add ST adresses
Post by: welrachid on October 24, 2016, 10:30:11 AM
Hi everyone.
Im trying to figure out how to stop users from being able to edit/add ST adresses. I know i can make a small plugin that always sets BT = ST but, what i want is that the links for editing/adding new addresses are disabled.
I've done a bit of work with CSS but the addresslist in views/cart/view.html.php: renderCompleteAddressList displays the link to editing.
<a href="index.php'
            .'?option=com_virtuemart'
            .'&view=user'
            .'&task=editaddresscart'
            .'&addrtype=BT'

From my understanding its the
echo $this->cart->lists['shipTo']; in default_address.php that prints out that list of possibilities.
My current solution is to in the template override making a
echo strip_tags($this->cart->lists['shipTo'],"<input>");

Is that the way to do it?

Thanks
Title: Re: Dont let users edit/add ST adresses
Post by: Milbo on October 25, 2016, 15:50:56 PM
It could be interesting to provide a config like "allow ST addresses" and if it is disabled, we can disable it in the core.
Title: Re: Dont let users edit/add ST adresses
Post by: welrachid on October 27, 2016, 15:07:22 PM
That would be very nice