View Single Post
  #8  
Old 03-03-2015, 01:24 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: hiding a shipping option based on user

Look in any function file under include/template/plugins directory - these are smarty function which you can call directly from any template, pass to it the shipping methods array and do the check for whatever you need, adjust the array and return it back to the template. That way you make a small change in the template and all the php code you need for this is in your own file so not messing up with the system.

So if the file is function.change_shipping_methods.php you can call it in the template as
{change_shipping_method shipping=$SHIPPING_ARRAY membershipid=$USER_MEMBERSHIPID assign="SHIPPING_ARRAY"}
And then have the code that uses that shipping array which will already be modified.

Now I just mentioned this as one possibility. That doesn't mean it is always the best way to do it. But in this case it may just be the better option...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote