X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Registered User has a Pre-defined Membership (https://forum.x-cart.com/showthread.php?t=59243)

Sunray Sales 05-07-2011 10:34 AM

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.

Sunray Sales 05-13-2011 03:59 AM

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.

cherie 05-13-2011 12:12 PM

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'


Sunray Sales 05-15-2011 03:50 AM

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 :)

jwpenn 10-24-2011 10:18 AM

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}



All times are GMT -8. The time now is 02:05 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.