Don’t go to the page directly. Instead, use the sample HTML file they provided and click "checkout". You can see it in action here:
http://flamebird.com/assets/components/simplecart-email/
I didn’t modify the javascript other than to change the PHP file it uses, so it is still doing a simple "alert". If you don’t want all the HTML tags to appear in the alert, just change the following in the SimpleCart snippet: $successMsg.htmlspecialchars($message) to $successMsg.strip_tags($message) or even simple $successMsg.
Once you have their sample HTML file working, migrate it to a MODx document. If you have problems after you migrate the HTML and JS, send me the link and I can see what you are doing wrong.
Regarding your other question:
1. To limit the search form and results to certain users, just use MODx resource groups and give the admin group permissions to view them. See the security tutorials:
http://rtfm.modx.com/display/revolution20/Security+Tutorials
2. Make a search form that uses GET to submit the results in the form of: /?chips=1&cake=1&tea=0.
3. Then, copy the Peoples snippet into another snippet called PeopleSearch and modify it to filter using the search terms. The easiest way to gather the search term from the URL is to use the getUrlParam snippet: [[!PeopleSearch? &tpl=`pplUser` &cake=`[[!getUrlParam? &name=`cake` &int=`1`]]` &tea=`[[!getUrlParam? &name=`tea` &int=`1`]]`]].
I don’t have time right now to do a custom PeopleSearch, but here are some pointers:
- To add a parameter into the PeopleSearch snippet, add $cake = $modx->getOption(’cake’,$scriptProperties, ’’);
- The extended fields for users are stored in a single database column, so using the usual $c->where(array()) filter is not going to work. Here is a forum post that gives sample code for searching inside of the extended fields: http://modxcms.com/forums/index.php?topic=51494.0
I haven’t tried this myself, but it may be even easier to just add a filter based on the JSON-storage format of the extended fields. Use phpMyAdmin to verify that your extended fields are in this format, and just add the following andCondition or where filter:
if (!empty($cake)) {
$c->where(array(
'extended:LIKE' => '%"cake","'.$cake.'"%',
));
}