Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Separate shipping charge for Wholesale membership
 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 02-02-2017, 01:34 PM
 
galoadm galoadm is offline
 

Member
  
Join Date: Dec 2013
Posts: 12
 

Default Separate shipping charge for Wholesale membership

I would like to have a regular shipping charge of $6.95 for non-members and a charge of $8.95 for Wholesale members. I only want one charge to display at checkout depending on which membership. I have set up a shipping method for each charge and used the webmaster mode to determine the shippingid's and membershipid's. I edited the One_Page_Checkout/shipping_methods.tpl with the following code:

Code:
{if $userinfo.membershipid eq "2" and $s.shippingid eq 1011} <tr>&nbsp;</tr> {elseif $userinfo.membershipid ne "2" and $s.shippingid eq 1013} <tr>&nbsp;</tr> {else} The Original code {/if}

Just below:

Code:
{foreach from=$shipping item=s name=sm}

This has removed any shipping options from displaying at checkout that do not apply to the particular Membership. The problem I am running into is when the $8.95 option displays for Wholesale customers it is not updating the shipping charge in the Cart Summary which shows $6.95 or preselect the 8.95 shipping option.

Any ideas on how to change the $cart.shippingid from 1011 to 1013 and preselect the $8.95 option when a Wholesale member is checking out?

X-Cart 4.6.0 using One Page Checkout
__________________
X-Cart Gold 4.6.0
X-Cart Mobile
X-Product Notifications
Reply With Quote
  #2  
Old 02-02-2017, 04:27 PM
  cherie's Avatar 
cherie cherie is online now
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,532
 

Default Re: Separate shipping charge for Wholesale membership

Making this change in the tpl is probably going to be more difficult. We added to the following to func_is_shipping_method_allowable() in include/func/func.shipping.php (after globals):
PHP Code:
if (
    (
$customer_info['membershipid'] == && $shippingid == 1013)
    || (
$customer_info['membershipid'] != && $shippingid == 1011)
)
    return 
false
__________________
redli.me | xcarthelp.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
galoadm (02-03-2017)
  #3  
Old 02-03-2017, 07:10 AM
 
galoadm galoadm is offline
 

Member
  
Join Date: Dec 2013
Posts: 12
 

Default Re: Separate shipping charge for Wholesale membership

Thank you Cherie! That worked perfectly.
__________________
X-Cart Gold 4.6.0
X-Cart Mobile
X-Product Notifications
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:45 AM.

   

 
X-Cart forums © 2001-2018