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

4.4.5 Default Membership Level

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-23-2012, 05:52 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default 4.4.5 Default Membership Level

I would like to assign a default membership level that is assigned when a customer creates an account. Below is the code that needs to be modified I beleive, but if I change anything in the code to make it hidden with the membership level I would like to use it breaks the page.

{if $config.General.membership_signup eq "Y" and $membership_levels}
<li class="single-field">
{capture name=regfield}
<select name="pending_membershipid" id="pending_membershipid">
{*<option value="">{$lng.lbl_not_member}</option>*}
{foreach from=$membership_levels item=v}
<option value="{$v.membershipid}"{if $userinfo.pending_membershipid eq $v.membershipid} selected="selected"{/if}>{$v.membership}</option>
{/foreach}
</select>
{/capture}
{include file="modules/One_Page_Checkout/opc_form_field.tpl" content=$smarty.capture.regfield name=$lng.lbl_signup_for_membership field='pending_membershipid'}
</li>
{/if}

I tried to use this peice of code and comment out the whole block, but it breaks the page.

<input type="hidden" name="pending_membership" value="Premium" />

Could some one please post the exact code to make this work.

Thank you for your help in advance.

Frank
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
  #2  
Old 04-23-2012, 09:23 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: 4.4.5 Default Membership Level

First of all you have to use the membershipid in the hidden field not the memberhsip name.
Second you can't have smarty comments inside smarty comments; when you comment out the code you have inside it the non-member option commented out as well
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 04-24-2012, 06:21 PM
 
Duramax 6.6L Duramax 6.6L is offline
 

X-Adept
  
Join Date: Dec 2006
Posts: 865
 

Default Re: 4.4.5 Default Membership Level

Thank you Steve for your help!

By commenting out the entire block and using the following code I was able to get the membership level saved as pending.

<input type="hidden" name="pending_membershipid" value="1" />

I have been trying to change the code to save the membership level as the actual membership level with out having to approve it.

Any ideas on how to code that in. I tried adding the following code with no luck.

<input type="hidden" name="membershipid" value="1" />
__________________
Xcart 5.1.6 Building New Store
Xcart4.6.4 Gold Plus
Xcart 4.6.4 Platinum
Smart Template,
Mail Chimp Upgrade
Checkout One (One Page Checkout)
Checkout One X-Payments Connector
Checkout One Deluxe Tools
Call For Price
On Sale Module
Buy Together Module
MAP Price MOD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 12:11 PM.

   

 
X-Cart forums © 2001-2020