View Single Post
  #1  
Old 02-21-2015, 02:48 PM
 
keystone keystone is offline
 

X-Adept
  
Join Date: Jul 2006
Location: USA
Posts: 787
 

Default hiding a shipping option based on user

I have a shipping option "in store pickup" that I only want to show up if a user is a wholesale account.

The id's are as follows

membershipid 2 (wholesale)
shippingid 201 (in store pickup)

I am using altered carts checkout one mod and reboot template. I'm not sure where the shipping methods are pulled from for altered carts checkout page...

I have an IF statement like this...

Code:
{foreach from=$shipping item=s name=sm} {if $s.shippingid eq 201} #if shipping option is in store pickup {if $login ne "" and $userinfo.membershipid eq 2} #if customer is logged in and is wholesale ...shipping method code... {/if} {else} ...shipping method code... {/if} {/foreach}

I have put this if statement in common_files/modules/fast_lane_checkout/shipping_methods.tpl
common_files/modules/one_page_checkout/shipping_methods.tpl
reboot/modules/fast_lane_checkout/shipping_methods.tpl
reboot/modules/one_page_checkout/shipping_methods.tpl

I had this code working in my 4.4.5. site but can't get it to work in my new 4.6.6. site. It looks like it is working when I estimate shipping in the shopping cart but it is hard to tell since you can't see the shipping rates there if you are logged in. I can't get it to work on the checkout page though.

I have also tried switching back and forth between fast lane and one page checkout in the general settings but still no go.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3
mods:
reCaptcha
running on UNIX

www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2
mods:
reCaptcha
cdseo pro
running on UNIX
Reply With Quote