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

Registered User has a Pre-defined Membership

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-07-2011, 10:34 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Registered User has a Pre-defined Membership

Quote:
Originally Posted by qualiteam
In 4.4.x you should alter "include/register.php" script, find and replace this code:
PHP Code:
foreach ($common_profile_fields as $field) {
 
$profile_values[$field] = isset(${$field}) ? ${$field} : '';
 
}
 
// Store new password 
with this:
PHP Code:
foreach ($common_profile_fields as $field) {
 
$profile_values[$field] = isset(${$field}) ? ${$field} : '';
 
}
 
$profile_values['membershipid'] = ${'pending_membershipid'};
 
// Store new password 

This is almost what I need, but I want anyone who registers to become a Premium member.

In the above solution it shows that the user is assigned the pending membership, but I have now Unchecked the Moderated membership to make registering easier.

I need something like
$profile_values['membershipid'] = 'Premium'};

Im not sure if that is the correct way to do it, but that is essentially what i'm looking to do.

This is for X-Cart 4.4.2 and 4.4.3 (im sure it will be same).

Kindly advise.

Thanks.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #2  
Old 05-13-2011, 03:59 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Registered User has a Pre-defined Membership

I am bumping this thread.

I am still interested in how I can pre-assign a newly registered user to having a premium membership right when they register, so that I don't have to manually do it when they make an account.


Kindly advise and thanks.
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #3  
Old 05-13-2011, 12:12 PM
  cherie's Avatar 
cherie cherie is offline
 

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

Default Re: Registered User has a Pre-defined Membership

Here are some notes for 4.1 that might point you in the right direction:

include/register.php line 514 add:

PHP Code:
if ($current_area != 'A')
    
$profile_values['membershipid'] = '1'
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote

The following user thanks cherie for this useful post:
Sunray Sales (05-15-2011)
  #4  
Old 05-15-2011, 03:50 AM
 
Sunray Sales Sunray Sales is offline
 

Senior Member
  
Join Date: Dec 2010
Posts: 194
 

Default Re: Registered User has a Pre-defined Membership

Quote:
Originally Posted by cherie
Here are some notes for 4.1 that might point you in the right direction:

include/register.php line 514 add:

PHP Code:
if ($current_area != 'A')
$profile_values['membershipid'] = '1'


Thanks so much this worked perfectly!

I had to put this code on line 680, this is where the profile fields are defined.


Thanks again
__________________
4.4.2
www.sunraysales.com
HandsOnWebHosting
Reply With Quote
  #5  
Old 10-24-2011, 10:18 AM
 
jwpenn jwpenn is offline
 

Member
  
Join Date: Jul 2008
Posts: 13
 

Lightbulb Re: Registered User has a Pre-defined Membership

For x-cart version 4.1.9 is there a way to show items based on the membership id in the welcome.tpl

I tried this but it did not work..

HTML Code:
{if $user_account.membershipid eq 9} {$lng.txt_welcomeedge} {else} {$lng.txt_welcome} {/if}
__________________
X-cart Gold
Version 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:06 PM.

   

 
X-Cart forums © 2001-2020