FEusers and OScommerce

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

FEusers and OScommerce

Post by scotch33 »

OK - I have a site that once the users are logged in they have access to the members' BBs and also members' shopping.  I am using OS commerce for my shop and have already got that running with 'members prices' and 'public prices' 

I have an idea that I want to try - a form in my CMSMS members page that, when clicked will go off to the shop and fill in at least some of the fields in the setup account area.  Thus easign the whole process for members. 

So (as something of a database novice) what I wanted to do was this...

In the Frontend users members page - as it loads call the user name, password and other fields of that particular user and add them to hidden fields that I can then send to the appropriate area in OSC to get this process working.

Can anyone help me, or point me to a straightforward place that I can work out how to call the entries from the Dbase I will need  - once I have them I am confident I can get the form and OSC to play.  I have some basic PHP knowledge and know my way around forms etc, but its the extraction of stuff from the database that I have never hed to do b4.

Thanks!

John
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: FEusers and OScommerce

Post by calguy1000 »

You can get the username out of feusers, etc, very easily the properties are all exported to smarty (check the feusers help page).

However, the password is a different story, it uses MD5  one way encryption, so there's no way to get the original password out.
Unless all you want is the MD5 string, in which case that could be added fairly easily I'm sure.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

Re: FEusers and OScommerce

Post by scotch33 »

Ok - cool.  We I've now sat through an explanation of smarty templating so am with you in terms of what it does - however I looked at the help file on the module itself and couldn't see any ref as to the actual syntax on calling individual user elements.

So i've taken a look at the change properties to try to get a feel for the syntax to call the individual user's info and thus have tried

{$nametext}

as a test - which didn't play.  So I thought i'd ask you guys for a syntax example - So for example what is the syntax to call the user name and display it at the top of the page using smarties

then also what is the syntax for any admin defined fields - they are dropping into an array i am guessing? 

Cheers!

Scotch
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: FEusers and OScommerce

Post by calguy1000 »

Well, to see the available variables, you could do this:
  • Add the get_template_vars user defined tag as described here:  http://forum.cmsmadesimple.org/index.ph ... 977.0.html
    [li]Add {cms_module module=CustomContent} to your page
  • Add {cms_module module=FrontEndUsers} somewhere below that
  • Add {get_template_vars} somewhere below that
This will give you a description of all of the smarty variables that are available.

Then you can use each of these variables using smarty syntax, but to simply echo the value
just use {$variablename}

However, I just checked the frontend users module again, and it appears that the only variable being exported at the moment is username, I'll see what I can do about that tonite.  At least to get all of the user information, including properties output.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

Re: FEusers and OScommerce

Post by scotch33 »

Calguy - you are a star.  I'll get the rest running in the mean time. 
scotch33
Dev Team Member
Dev Team Member
Posts: 284
Joined: Tue Feb 14, 2006 9:56 pm

Re: FEusers and OScommerce

Post by scotch33 »

Ok - did all that - thought I would copy,

1.  the code in the page
2.  The result - which at the moment is giving me a load of info, but after it where I have added the tags discussed it isn't returning anything.

1. 

{cms_module module=FrontEndUsers}
{get_template_vars}

{$first_name}
{$surname}
{$membership_number}
{$email}

2. 
Welcome scotch33
Sign out
Change My Settings

Array ( [SCRIPT_NAME] => /~ile01/index.php [app_name] => CMS [count] => 17 [nodelist] => Array ( [0] => stdClass Object ( [id] => 15 [url] => http://212.67.202.8/~ile01/index.php?page=home [accesskey] => 1 [type] => content [tabindex] => [titleattribute] => Home Page, shortcut key=1 [hierarchy] => 1 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Home [target] => [index] => 0 [parent] => [current] => ) [1] => stdClass Object ( [id] => 29 [url] => http://212.67.202.8/~ile01/index.php?page=content_types [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 2 [depth] => 1 [prevdepth] => 1 [haschildren] => 1 [menutext] => About Us [target] => [index] => 1 [parent] => [current] => ) [2] => stdClass Object ( [id] => 51 [url] => http://212.67.202.8/~ile01/index.php?page=news [accesskey] => [type] => newsmodule [tabindex] => [titleattribute] => [hierarchy] => 3 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => News [target] => [index] => 2 [parent] => [current] => ) [3] => stdClass Object ( [id] => 52 [url] => http://212.67.202.8/~ile01/index.php?page=events [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 4 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Events [target] => [index] => 3 [parent] => [current] => ) [4] => stdClass Object ( [id] => 53 [url] => http://212.67.202.8/~ile01/index.php?page=conference [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 5 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Conference [target] => [index] => 4 [parent] => [current] => ) [5] => stdClass Object ( [id] => 50 [url] => http://212.67.202.8/~ile01/index.php?page=education [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 6 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Education [target] => [index] => 5 [parent] => [current] => ) [6] => stdClass Object ( [id] => 39 [url] => http://212.67.202.8/~ile01/index.php?page=membership [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 7 [depth] => 1 [prevdepth] => 1 [haschildren] => 1 [menutext] => Membership [target] => [index] => 6 [parent] => [current] => ) [7] => stdClass Object ( [id] => 33 [url] => http://212.67.202.8/~ile01/index.php?page=members [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 8 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Members Area [target] => [index] => 7 [parent] => [current] => 1 ) [8] => stdClass Object ( [id] => 32 [url] => http://212.67.202.8/~ile01/index.php?page=register [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 9 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Register [target] => [index] => 8 [parent] => [current] => ) [9] => stdClass Object ( [id] => 54 [url] => http://212.67.202.8/~ile01/index.php?page=technical [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 10 [depth] => 1 [prevdepth] => 1 [haschildren] => 1 [menutext] => Technical [target] => [index] => 9 [parent] => [current] => ) [10] => stdClass Object ( [id] => 49 [url] => http://212.67.202.8/~ile01/index.php?page=consultants [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 11 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Consultants [target] => [index] => 10 [parent] => [current] => ) [11] => stdClass Object ( [id] => 59 [url] => http://212.67.202.8/~ile01/catalog/index.php?cPath=21 [accesskey] => [type] => link [tabindex] => [titleattribute] => [hierarchy] => 12 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Shop [target] => [index] => 11 [parent] => [current] => ) [12] => stdClass Object ( [id] => 56 [url] => http://212.67.202.8/~ile01/index.php?pa ... ng_journal [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 13 [depth] => 1 [prevdepth] => 1 [haschildren] => 1 [menutext] => Lighting Journal [target] => [index] => 12 [parent] => [current] => ) [13] => stdClass Object ( [id] => 40 [url] => http://212.67.202.8/~ile01/index.php?page=international [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 14 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => International [target] => [index] => 13 [parent] => [current] => ) [14] => stdClass Object ( [id] => 41 [url] => http://212.67.202.8/~ile01/index.php?page=ile_regions [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 15 [depth] => 1 [prevdepth] => 1 [haschildren] => 1 [menutext] => ILE Regions [target] => [index] => 14 [parent] => [current] => ) [15] => stdClass Object ( [id] => 38 [url] => http://212.67.202.8/~ile01/index.php?page=contact_us [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 16 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Contact Us [target] => [index] => 15 [parent] => [current] => ) [16] => stdClass Object ( [id] => 37 [url] => http://212.67.202.8/~ile01/index.php?page=legal [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 17 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Legal [target] => [index] => 16 [parent] => [current] => ) ) [node] => stdClass Object ( [id] => 37 [url] => http://212.67.202.8/~ile01/index.php?page=legal [accesskey] => [type] => content [tabindex] => [titleattribute] => [hierarchy] => 17 [depth] => 1 [prevdepth] => 1 [haschildren] => [menutext] => Legal [target] => [index] => 16 [parent] => [current] => ) [prompt_loggedin] => Welcome [username] => scotch33 [link_logout] => Sign out [link_changesettings] => Change My Settings )
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: FEusers and OScommerce

Post by calguy1000 »

Yeah, the properties aren't being exported, I'll look at that
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”