News:

Support the VirtueMart project and become a member

Main Menu

Dont let users edit/add ST adresses

Started by welrachid, October 24, 2016, 10:30:11 AM

Previous topic - Next topic

welrachid

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
Best regards,
Wel

Milbo

It could be interesting to provide a config like "allow ST addresses" and if it is disabled, we can disable it in the core.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

welrachid

Best regards,
Wel