| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
4.4.5 Default Membership Level | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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 |
|||||||
|
|||
X-Cart forums © 2001-2020
|