# Question
Title: How can I use a channel entries tag within an orders received email template?
I have a need to pull up related information from a different channel when placing an Expresso Store order. For some reason, this isn't working in my Order Received template. Any idea why not?

```
<h1>A new order has been received!</h1>

<h2>Order ID: {order_id}</h2>

{items}
  {title}
  {modifiers}
    {if modifier_name == "Vehicle ID"}
      <h3>Specs</h3>
      <ul>
        {exp:channel:entries channel="vehicles" entry_id="{modifier_value}" dynamic="no"}
          <li>Front Blade Size: {vehicleFrontBladeSize}</li>
        {/exp:channel:entries}
      </ul>
    {if:else}
      <p>{modifier_name} - {modifier_value}</p>
    {/if}
  {/modifiers}
{/items}

```

The email I receive looks like this...

```
A new order has been received!

Order ID: 2

Metal Frame Wipers
Specs

Front Blade Size: {vehicleFrontBladeSize}

```

# Answer
You need to pass the entry\_id instead of the modifier\_value

Something along the lines of:

```
<h1>A new order has been received!</h1>

<h2>Order ID: {order_id}</h2>

{items}
{exp:channel:entries channel="vehicles" entry_id="{entry_id}" dynamic="no"}
  {title}
  {modifiers}
    {if modifier_name == "Vehicle ID"}
      <h3>Specs</h3>
      <ul>
          <li>Front Blade Size: {vehicleFrontBladeSize}</li>
      </ul>
    {if:else}
      <p>{modifier_name} - {modifier_value}</p>
    {/if}
  {/modifiers}
{/exp:channel:entries}
{/items}

```
> 0 votes

---
Tags: expresso-store
---


title: Renegade Category Defies LowSeg2Cat

text:
# Question
Title: Renegade Category Defies LowSeg2Cat
I am running EE 2.10.1 and LowSeg2Cat 2.8.1/3.0. On this page more than 20 photos from the Ming Tomb category should be showing, however, only one appears.

This is the only category of many that does this. The other category images all display fine.

```
{exp:channel:entries  channel="photos" limit="20" category="{segment_3_category_id}" disable="trackbacks" pagination="bottom"}
<div class="photo_thumb">
<a href="{site_url}photo/image/{url_title}/{segment_3}">
<img class="preview {if photo_orientation == 'vert'} vert{/if}" src="/resources/stock/{photo_name}-tn.jpg" data-fullimg="/resources/stock/{photo_name}-preview.jpg" data-caption="{exp:char_limit total="40"}{photo_caption}{/exp:char_limit}" alt="{title}" />
</a>
</div><!-- end photo_thumb -->

{paginate}
{if "{total_pages}" != 1}
<p id="pages">Page {current_page} of {total_pages}  {pagination_links}</p>
{/if}
{/paginate}
{/exp:channel:entries}

```

Any clues as to why this is not working correctly along with a solution would be greatly appreciated.

# Answer
You have stumbled upon one of the classics in debugging ExpressionEngine. A still common gotcha that even seasoned veterans get bitten by every now and then. A property that makes us wonder: why is this still default behaviour? But why wonder...

Try `dynamic="no"`.
> 2 votes

---
Tags: low-seg2cat
---


# Question
Title: add/publish new field data for existing channel entries
I have and existing channel with existing entries. I added a new custom field, a radio button group, with options YES/NO, with the default option being YES.

The field is now available in the edit entry form but it has no value set until I click an option (YES) and then save the form.

Is there a way to set/publish the default value for all existing entries?

# Answer
You'll have to run a query on the database to set the past entries' values for this new field:

```
UPDATE exp_channel_data SET field_id_XX = 'YES' WHERE field_id_XX == '' AND channel_id = X;

```

Just replace `XX` with the correct `field_id` and `X` with the correct `channel_id`.

And, as with anytime you run a write query on the database, back it up first!
> 1 votes

---
Tags: channel-entries, custom-fields
---


# Question
Title: Super Search with Two loops on the result page
I have a result page where I want to divide the result presentation up in 2 different columns. One pulls out only stuff from channel 1, and the other one from channel 2,3,4 and 5.

I have tried the `allow_repeats="yes"`, but none of the loops show any results.

However, if I remove one of the `{exp:super_search:results}` on the page, it works fine (for the `{exp:super_search:results}` that's still on the page that is.

Can't wrap my head around it \>\_\<.

```
<section id="search">
<section class="container-wide">
    <!-- TOP CONTAINER -->
    <section class="search-article">
        <div class="column--twelve">
            <h5>resultat för sökningen efter</h5>
            <h1>"{super_search_keywords}"</h1>
        </div>

        <!-- VÄNSTER KOLUMN -->
        <div class="column--six-left">
            <div class="divider"><div><span>Produkter</span></div></div>
            <div class="search--result-products">
            <style>mark {background-color:#FFEB4F;}</style>
                {exp:super_search:results channel="produkter" highlight_keywords="mark" allow_repeats="yes"}
                {!-- loop 1 --}
                <div class="produkt">
                    <a href="{title_permalink='produkt'}">
                        {exp:ce_img:pair src="/assets/images/uploads/produkt_images/{produkt_huvudbild}" max="350" crop="yes"}
                            <img src="{made}" />
                        {/exp:ce_img:pair}
                    </a>
                    <h5><a href="{title_permalink='produkt'}">{varumrke}</a></h5>
                    <h2><a href="{title_permalink='produkt'}">{title}</a></h2>
                </div>
                {/exp:super_search:results}
            </div>
            <!--div>
                <div class="show--more"><div class="button"><a href="">Visa fler produkter</a></div></div>
            </div-->
        </div>
        <!-- END VÄNSTER KOLUMN -->

        <!-- HÖGER KOLUMN -->
        <section class="column--six-right">
            <div class="divider"><div><span>Beauty/Varumärke/Utbildningar</span></div></div>
            <div class="search--beauty-holder">
                {exp:super_search:results channel="beauty_k|beauty_l|beauty_li|utbildning|varumarke" highlight_keywords="mark" status="open" allow_repeats="yes"}
                 {!-- loop 2 --}
                {if channel_short_name == "beauty_k"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "beauty_l"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "beauty_li"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='beauty/artikel'}">
                                {exp:ce_img:pair src="{huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{liten_rubrik}</h5><h2><a href="{title_permalink='beauty/artikel'}">{title}</a></h2><p>{kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "utbildning"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='utbildning'}">
                                {exp:ce_img:pair src="{ut_huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{ut_liten_rubrik}</h5><h2><a href="{title_permalink='utbildning'}">{title}</a></h2><p>{ut_kort_beskrivning}</p></div>
                    </div>
                {/if}
                {if channel_short_name == "varumarke"}
                    <div class="single">
                        <div class="bild">
                            <a href="{title_permalink='varumarke'}">
                                {exp:ce_img:pair src="{v_huvudbild}" max="350" crop="yes"}
                                    <img src="{made}" />
                                {/exp:ce_img:pair}
                            </a>
                        </div>
                        <div class="text"><h5>{v_liten_rubrik}</h5><h2><a href="{title_permalink='varumarke'}">{title}</a></h2><p>{v_ingress}</p></div>
                    </div>
                {/if}
                {/exp:super_search:results}
            </div>
            <!--div>
                <div class="show--more"><div class="button"><a href="">Visa mer från beauty</a></div></div>
            </div-->
        </section>
        <!-- END HÖGER KOLUMN -->

    </section>
    <!-- TOP CONTAINER -->
</section>

{embed="site/_banner-vert"}
{embed="site/_recomended"}

```

Any help would be greatly appreciated.

Using EE 2.10.x, so I'm not using the super search 3.0 version.

# Answer
Go to the preferences and turn off caching by setting the Refresh value from 10 minutes to 0 minutes. This solved all my problems (the ones that could be solved that is). So, yeah. That's how simple it was it seems.

Thanks to Mitchell from Solspace for pointing this out.

Also, `allow_repeats=""` should not be in there at all, just so you who are reading this since you had the same problem as I had knows that too.
> 1 votes

# Answer
Try putting one of your SuperSearch loops in a template partial, and embed it.

http://ee2docs.com/templates/embedding.html

That should work just fine.
> 0 votes

---
Tags: solspace, supersearch
---


title: ExpressionEngine and GIT Process

text:
# Question
Title: ExpressionEngine and GIT Process
I'm looking to change my ExpressionEngine development process to integrated GIT for version control.

What is the best place to start?

I work on a PC. I use UniServer for LAMP, Aptana Studio 3 for coding (has GIT integration).

What are the first basic steps I need to put into place?

# Answer
> 21 votes
The first place to start is to get a GitHub or a Bitbucket account.

For new users, I'd recommend Bitbucket for their excellent tutorial: https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101

Follow the tutorial above to setup SSH through Git Bash on your local machine (or setup GitHub's easy-to-pick-up GitHub for Windows if you prefer GitHub) and you should well be on your way.

Also don't forget CodeSchool's free tutorial as well: http://www.codeschool.com/courses/try-git

Lynda.com also has a full course on Git: http://www.lynda.com/Git-tutorials/Git-Essential-Training/100222-2.html

Hope this helps :)

# Answer
> 20 votes
Since you're already familiar with EE, I think step 1 should be to take some time to learn the basics of version control.

There are more good tutorials out there than you can shake a stick at:

And some paid training courses to consider:

When I first started using git, I forced myself to use the command line for a while.

Then once I got familiar enough with the process and terms I started using a git GUI app.

After your initial commit, most of your commits will be in the template files.

If you use snippets heavily, I'd also suggest using an add-on that lets you save snippets as files. Your database is not version controlled, so snippets would have to be edited in the control panel otherwise.

Hope that helps.

# Answer
> 10 votes
One of the key things to remember with ExpressionEngine and GIT is that not all directories should be version controlled.

The core files, third party plugins and your design of course should be - but version controlling the /images/ and /cache/ directory for example is over the top and is a burden on resources (and frankly a waste of time!).

In the past I have run an install of ExpressionEngine that has been the basis of a boilerplate. I would clone this for each site I built and have the third\_party resources and basic channels I constantly use ready to roll in minutes.

I have noticed that the applications on Mac are considerably easier to use than their Windows equivalents. With that said, GitHub's Windows app is quite good.

Instead of GitHub or BitBucket I have used Beanstalk - primarily because it has a neat 'Deploy to FTP' function which speeds up deployment.

I'd be interested to hear the communities best practices in regard to managing one base boilerplate install to keep core files and third\_party files up to date across all sites - if indeed that is possible. And if there are any database considerations with this.

# Answer
> 5 votes
This series of posts is quite helpful, whether you're PC or Mac:

http://www.johnfaulds.com.au/journal/developing-expressionengine-sites-with-mamp-git-tower-and-beanstalk-part-1/

http://www.johnfaulds.com.au/journal/developing-expressionengine-sites-with-mamp-git-tower-and-beanstalk-part-2/

It would be EXTREMELY nice to have a definitive EE/Git 'guide.' Something that documents 'best practices' and proper workflow. It would be a huge benefit to the community at large.

# Answer
> 4 votes
Having just gotten at least my development site up and running with Git I was looking into how to manage all the different parts of an EE project as sub projects (repositories). I was trying to avoid git submodules like the plague because of my past experience with them (Drupal). If you're new to git you're likely to mess something up there down the line. After much research and playing around I wound up using git submodules as the problem wasn't with this aspect of git itself, but with my misunderstanding of the inner workings of git.

I highly recommend first playing around a little with git to get it to help you achieve a few objectives.

Some of them might include:

* Managing EE versions.
* Managing third party add-on versions.
* Managing "forked" add-ons (e.g. on GitHub you can copy someone's git repository verbatim as if it was one of your own and modify it to your heart's content!)
* Managing assets/scripts/libraries/whatever shared between sites
* Flipping between snippet/template code for a development vs. production site.
* Making a quick fix for production site while working on major changes for development without losing anything
* Have a history of all the changes you made whether in your templates or add-ons (this is especially great when code you introduced... also introduced bugs)

Simulate an actual need in EE that isn't being fulfilled, use the resources others provided to get from A to B, try to use command line for the commands. Also have a git GUI client handy if just to see the history. (SourceTree was recently released for Windows, I've been using it on the Mac myself it's been great.)

Once you have a feel for it it will help **immensely** to have a better understanding of the inner workings of Git. For that I *highly* recommend the following:

This will help you understand the nuances of merging, rebasing, having a balanced history. Some important notes... a branch is not actually some kind of record of your project, a branch is just a 40 byte file. A commit is what actually contains metadata if you will of history. Branches and tags are references to commits, commits that are referred to along with their ancestors are the ones that are kept. You can branch away all you want, it is inexpensive. This will also help you understand fast-forward and non-fast-forward. If the commit already exists (ahead of your current work/branch) and you're merging it into your current branch or whatever, all git has to do is point your branch to that commit (fast-forward). If you want to create a new commit altogether, say, for the sake of showing linear history, you could do `git merge --no-ff <commit-ish>`.

After studying those two materials (amongst others, but those provided the bulk) I was a lot more comfortable with tackling EE as a super project with EE, add-ons, sites (snippets, templates, stash templates), and assets as submodules. Once you're there, too, you may want to look into these two Q-A's to set up your `.gitignore` file:

Since you're on Windows you can't use symbolic links to split your add-ons' system vs themes directories. You may want to monitor this thread and see what epocsquadron comes up with:

Personally my site's structure is something like this with heavy usage of symbolic links:

```
/ee2
/sites
/add-ons
/assets

```

Where ee2 is a repo for EE, sites has repos e.g. like `default_site` which contains all aspects of EE that are site-specific such as `templates` and `snippets`, and `assets` are other third party stuff that didn't seem to belong anywhere but warrant sharing/versioning.

(On the subject of `assets`... I also modify my nginx virtual host config for the site to cascade certain urls, e.g. should `/images/` belong to ExpressionEngine? A site like `default_site`? What about `/js/` and `/css/`? For certain folders I don't see why they should have to be in one place, so I figure out which directories share them, have priority, and then use location directives, named location directives with if statements to cascade submodules.)

I haven't had time to look into deployment, continuous integration, etc. My workflow is probably going to be faster with just working in an editor (Coda 2) and uploading from it as I go along.

# Answer
> 3 votes
+1 for Bitbucket & SourceTree

# Answer
> 2 votes
This is more for once you have Git set up and going, but this article really helped me build out a workable development and deployment workflow using branching. http://nvie.com/posts/a-successful-git-branching-model/

Here are some other resources that helped me get GIT set up that I don't think have been mentioned yet

### Resources

# Answer
> 2 votes
Besides all the other answers, I like to add a git "hook" that would do a database dump into a directory inside my repo, then perform a "git add", every time I do a commit.

You can achieve this by creating a file named "pre-commit" inside .git/hooks/ and making executable (not sure how to do that on windows machines).

In my mac (using MAMP) I have the following bash script:

```
#!/bin/bash
DBUSER="root"
DBPASS="root"
DB="db_name"
SCHEMAPATH="DBSchema"

/Applications/MAMP/Library/bin/mysqldump -u $DBUSER -p$DBPASS $DB > $SCHEMAPATH/$DB.sql
git add $SCHEMAPATH/$DB.sql
exit 0

```

Basically, every time I issue a commit, git will run a mysqldump of the DB and stage it before committing. I use this in all my EE projects.

# Answer
> 1 votes
Guess I don't have enough rep yet to post more than 2 links per post so here are another 2 links:

# Answer
> 1 votes
I also like using Beanstalk because of its deploy via FTP feature.

# Answer
> 1 votes
We use this method for deployment. Super easy and a good safety buffer.

http://joemaller.com/990/a-web-focused-git-workflow/

Well worth a look.

Good luck with it - It will change your world once you start using it well.

# Answer
> 1 votes
If you don't want to use GitHub, BitBucket or SourceTree you can set up your own repository on your server. I have one on my Linux server.
For information on how to do this go to the git book: http://git-scm.com/book/en/Git-on-the-Server

# Answer
> 0 votes
I'd recommend Masuga's book "The Guide to ExpressionEngine® Development", (http://eeguidebook.com) it walked me through it perfectly, and I had never used git or bitbucket before reading the book :)

I'd start there.

---
Tags: git
---


# Question
Title: store_product_price doesn't work in certain parts of template
I have a template where `store_product_price` shows the price (and dynamically updates when modifiers are selected) nearer the top of the template, but moved further down it doesn't.

I need to show the price is a floating sidebar, but placed in that part of the HTML it doesn't work.

I've narrowed it down to the point at which it stops working.

This works (and anywhere higher up in the source):

```
</div>
<p><strong>ITEM TOTAL: <span class="store_product_price"></span></strong></p>
</section>
</div>

```

This doesn't (and anywhere lower down):

```
</div>
</section>
<p><strong>ITEM TOTAL: <span class="store_product_price"></span></strong></p>
</div>

```

Changing `section` to `div` doesn't change anything.

Has anyone else experienced anything similar?

# Answer
I believe the code needs to be within our tag as the JS is added dynamically by the tag. So it will not work outside that area.
> 0 votes

---
Tags: expresso-store
---


# Question
Title: Use Expresso tags to show stock sold on front end
A specific user group on my website has the ability to create products on my website. This is all done using `Channel Form` tags. Unregistered guests may purchase these products.

For the user group that creates these products, I need to create a widget that shows how many of their created products have been sold so far. But I am not sure what template tags would best suit my purposes.

**EDIT**

So after looking around the database, I found there are 3 tables necessary to create the query I want

*FIND THE INTERSECTION OF THESE TWO TABLES*

`exp_channel_data` \- to filter the entries to the specific product channel (i.e. `channel_id = 15`). `exp_channel_titles` \- to further filter the product channel entries by author ID (i.e. `author_id = CURRENT_USER`)

*THEN FIND THE SUM OF THE ITEM TOTALS OF THE SUBSEQUENT RESULTS*

`exp_store_order_items` \- this is where I'd presumably use a SQL statement not very dissimilar from the one Justin Long provided me:

```
{if logged_in_member_group == 1}
    {exp:query sql='SELECT SUM(item_qty) as totalSales FROM exp_store_order_items WHERE entry_id = {entry_id}'}
        {totalSales}
    {/exp:query}
{/if}

```

# Answer
> 1 votes
There is not going to be an actual Store tag that you could use to get this. Having said that it should be fairly simple to query the DB for the information that you need. Something along the lines of:

```
{if logged_in_member_group == 1}
    {exp:query sql='SELECT SUM(item_qty) as totalSales FROM exp_store_order_items WHERE entry_id = {entry_id}'}
        {totalSales}
    {/exp:query}
{/if}

```

This assumes the group id of the group you want to have access to it is 1 and the query is placed within the parent channel entries tag as we are using the entry\_id to only show the results for that product. You might need to adjust it to your needs.

---
Tags: expresso-store, ee2, database, mysql
---


# Question
Title: Trigger the member self activation email from custom add-on with member registration
So i have written a custom module to do some stuff, but part of that stuff is to register a new member into EE. All of that is working great, but, it doesn't send the self activation email out (even though EE is configured too).

I have no idea what i'm missing here codewise? From looking through the EE code, it should send the email. I get no errors either.

```
$this->EE->load->model('member_model');
$this->EE->load->helper('security');

$data['username']     = $this->input->post('username');
$data['password']    = do_hash($this->input->post('password'));
$data['email']        = $this->EE->input->post('email');
$data['ip_address']    = $this->EE->input->ip_address();
$data['unique_id']    = random_string('encrypt');
$data['join_date']    = $this->EE->localize->now;
$data['language']     = $this->EE->config->item('deft_lang');
$data['timezone']     = ($this->EE->config->item('default_site_timezone') && $this->EE->config->item('default_site_timezone') != '') ? $this->EE->config->item('default_site_timezone') : $this->EE->config->item('server_timezone');
$data['daylight_savings'] = ($this->EE->config->item('default_site_dst') && $this->EE->config->item('default_site_dst') != '') ? $this->EE->config->item('default_site_dst') : $this->EE->config->item('daylight_savings');
$data['time_format'] = ($this->EE->config->item('time_format') && $this->EE->config->item('time_format') != '') ? $this->EE->config->item('time_format') : 'us';
$data['group_id'] = 1;

if ($this->EE->member_model->get_members('', '', '', $data['username'], '', 'username')->num_rows() > 0)
{
   $this->EE->output->show_user_error('submission', 'Username already exists!!!!');
}

$member_id = $this->EE->member_model->create_member($data);

$this->EE->member_model->delete_member($member_id);

```

# Answer
The email are being sent with help of Email library. In the code you posted, there is no reference for it, therefore no emails go out.

Here is sample code for sending member activation email from one of my add-ons (you might need to modify it to match your needs)

```
if ($this->EE->config->item('req_mbr_activation') == 'email')
{
    $action_id  = $this->EE->functions->fetch_action_id('Member', 'activate_member');

    $name = ($data['screen_name'] != '') ? $data['screen_name'] : $data['username'];

    $board_id = ($this->EE->input->get_post('board_id') !== FALSE && is_numeric($this->EE->input->get_post('board_id'))) ? $this->EE->input->get_post('board_id') : 1;

    $forum_id = ($this->EE->input->get_post('FROM') == 'forum') ? '&r=f&board_id='.$board_id : '';

    $add = ($mailinglist_subscribe !== TRUE) ? '' : '&mailinglist='.$_POST['mailinglist_subscribe'];

    $authcode_data = array('authcode' => $this->EE->functions->random('alnum', 10));

    $swap = array(
        'name'              => $name,
        'activation_url'    => $this->EE->functions->fetch_site_index(0, 0).QUERY_MARKER.'ACT='.$action_id.'&id='.$authcode_data['authcode'].$forum_id.$add,
        'site_name'         => stripslashes($this->EE->config->item('site_name')),
        'site_url'          => $this->EE->config->item('site_url'),
        'username'          => $data['username'],
        'email'             => $data['email'],
        'password'          => $password
     );

    $email_subject = ($this->settings['email_subject']!='')?$this->settings['email_subject']:$this->email_subject;
    $email_template = ($this->settings['email_template']!='')?$this->settings['email_template']:$this->email_template;
    $template_q = $this->EE->functions->fetch_email_template('mbr_activation_instructions');
    $email_tit = $this->_var_swap($email_subject, $swap);
    $email_msg = $this->_var_swap($email_template, $swap);

    // Send email
    $this->EE->load->helper('text');

    $this->EE->load->library('email');
    $this->EE->email->wordwrap = true;
    $this->EE->email->from($this->EE->config->item('webmaster_email'), $this->EE->config->item('webmaster_name'));
    $this->EE->email->to($data['email']);
    $this->EE->email->subject($email_tit);
    $this->EE->email->message(entities_to_ascii($email_msg));
    $this->EE->email->Send();

    $this->EE->db->where('member_id', $member_id);
    $this->EE->db->update('members', $authcode_data);

}

```
> 1 votes

---
Tags: members, module, add-on-development, email
---


# Question
Title: Expressionengine - Freemember Email - invalid link sent
We want the email sent with the reset link, but the link being sent is giving an error: "The form you submitted contained the following errors The password reset token does not appear to be valid. Please check the link you followed."

Link sent: http://XXXXX?ACT=17&id={resetcode}

EE2.10.1 Email sent using Freemember

There is a row in the "exp\_reset\_password" table that has the resetcode exactly matching the one in the email.

Thanks for your help in advance.

FORM CODE:

```
{exp:freemember:forgot_password form:id="forgotPasswordForm" return="profile/forgot_sent"}
    <div class="step" id="step1" data-step="1">
        <div class="pg-lo-header">LOGIN</div>
            <div class="pg-lo-body">
            <strong>Forgot password?</strong><br/><br/>
            <div class="pg-sing-lable">Tell us your email address and we will send you a temporary password.  You can choose a new password when you login.</div>
            <div class="field-wrapper row">
                <input type="email" name="email" id="email" placeholder="Email" class="required" value="{email}"><br />
                {if "{error:email}" != ""}<div class="errorMsg">{email} does not exist.</div>{/if}
            </div>
            <div class="po-popup-btns">
              <a class="btn btn-reset-password" id="close" href="javascript:void(0);">SEND EMAIL</a>
            </div>
        </div>
    </div>
    <div class="step hide" id="step2" data-step="2">
        <div class="pg-lo-header">LOGIN</div>
            <div class="pg-lo-body">
            <strong>Forgot password?</strong><br/><br/>
            <div class="pg-sing-lable">Email Sent.</div>

           <div class="po-popup-btns">
              <a class="btn btn-close" id="close" href="javascript:void(0);">OK</a>
            </div>
        </div>
    </div>
{/exp:freemember:forgot_password}

```

Submit listener:

```
$(".btn-reset-password").live("click",function(e){
        var _form = $(this).closest("form");
        e.preventDefault();
        if (validateForm(_form)) {
            $.ajax({
                url: _form.attr("action"),
                data: _form.serialize(),
                dataType: 'html',
                type: 'POST',
                success: function(resp){
                    console.log(resp);
                    if ($(resp).find("input").length == 0) {
                        //console.log($(resp).find("input"));
                        gotoStep(2);
                    } else {
                        $(".po-popup").html(resp);
                    }
                },
                error: function(){
                    console.log("error submitting");
                }
            });
        } else {
            console.log("error");
        }
    })

```

# Answer
I had the exact same problem. It looks as though EE's native password reset doesn't understand Freemember's reset code.

I was able to fix this issue by creating a template with Freemember's reset password tag and passed the folder and file name to Freemember's forgot\_password tag as a reset parameter.
> 1 votes

---
Tags: freemember, forgot-password
---


title: Editing form options

text:
# Question
Title: Editing form options
I am trying to edit the option names which appear in a drop down in a contact us form. I am really struggling to find where the ability to change this is located.

Attached is a screenshot of what I am talking about... If anyone could please offer some advice or help this would be much appreciated.

thank in advance

# Answer
You need to edit the field in your Control Panel. Log in to your CP and head to your FreeForm modules area.

```
Your Site -> CP Home -> Modules -> Freeform Pro -> Fields

```

Find your select field, and click on the edit button (it's a gear in the Edit column). At the bottom of the page, you have your `Field Options` section. There you can add/edit selections.

https://solspace.com/software/expressionengine/freeform/docs/control\_panel/#fields
> 0 votes

---
Tags: forms
---


# Question
Title: Multiple Site Manager Can't Add Site EE 1.6.8
I need to add two sites to my Multiple Site Manager in Expression Engine 1.6.8. There are 24 microsites already. The first I added, and it looks ok, but I do not get the "Create a New Site" link when I go to "Edit Sites". I'm worried that the database has too many columns or something like that. Any suggestions?

# Answer
> 1 votes
Perhaps you run out of number of available sites for your MSM license. Check that in your purchases section on EllisLab's site.

Not sure though you'll be able to purchase more, as EE1 is not supported officially anymore.

---
Tags: multiple-sites
---


title: How to see if a checkbox is selected?

text:
# Question
Title: How to see if a checkbox is selected?
I'm using P&T Fieldpack (2.1.1), EE 2.9.2 and Matrix 2.6. I have a column in my Matrix field that has 2 checkboxes: "text" and "picture".

If only the "text" checkbox is checked then this works to determine that:

```
{if my_matrix_column == "text"}popup{/if}

```

But if both are checked, that never returns true. So I try this:

```
{if '{my_matrix_column:selected option="text"}'}popup{/if}

```

and that resolves to true every time - even if nothing at all is checked.

So, any ideas on how I can tell if the "text" checkbox is selected no matter if the "picture" checkbox is selected or not?

# Answer
I had the same problem post upgrade from EE 2.8 to 2.10 and found that I needed to change the conditionals as follows to make them work again:

```
{if '{my_checkboxes:selected option="value"}' == '1'}

```
> 2 votes

# Answer
```
{if '{my_matrix_column:selected option="text"}'}popup{/if}

```

This should definitely work, according to the Field Pack docs.

You could also just loop through and do your conditional inside the loop:

```
{my_matrix_column}
    {if option == "text"}popup{/option}
{my_matrix_column}

```
> 1 votes

---
Tags: matrix, pixelandtonic, field-pack, pt-checkboxes
---


# Question
Title: Conditional Check Issue || Is Entry in any of these Categories?
**Scenario**

The issue is that entries are in several categories and can be Featured (a FieldPack pill with yes/no options) but only want certain categories to show the entry.

So I have a `featured_listing_category` `WB Category fieldtype` setup.

I had this worked out but apparently still not working the way expected. I have the following code:

`{if !'{exp:phpstringfun function="strpos" par1="{featured_listing_category}"}{segment_4_category_id}{/exp:phpstringfun}’}`

With `{featured_listing_category}` outputting `399|400` and `{segment_4_category_id}` outputting `372`

I'm trying to test whether `{segment_4_category_id}` is included with `{featured_listing_category}`.

If it helps here is my template snippet:

```
{exp:channel:entries
      channel="listing"
      dynamic="no"
      {if segment_5 ==''} category="{segment_2_category_id}&{segment_4_category_id}"{/if}
      {if segment_5} category="{segment_6_category_id}&{segment_4_category_id}"{/if}
      orderby="level_sort"
      sort="asc"
      search:featured_listing="yes"
      disable="categories|pagination|category_fields|member_data"
    }
{if !'{exp:phpstringfun function="strpos" par1="{segment_4_category_id}"}{featured_listing_category}{/exp:phpstringfun}'}
    <div class="listingItem featuredListing">
      <div class="featuredIcon"></div><!-- /.featuredIcon -->
      <div class="image">
        {if main_image}
        {exp:ce_img:pair src="{main_image}" width="165" height="165" allow_scale_larger="yes" crop="yes|center|center" }<a href="/listing/details/{url_title}"><img src="{made}" width="{w}" height="{h}" alt="" /></a>{/exp:ce_img:pair}
        {/if}
        {if main_image ==''}
        <img src="/uploads/default_listingItemImage.jpg" alt="" />
        {/if}
      </div><!-- /.image -->
      <div class="content">
        <div class="buttonReviews">
          <p><a href="/listing/details/{url_title}/{segment_2}/{segment_4}" class="btn orange">View Listing</a></p>
          <div class="reviews">
            {exp:rating:stats collection="Book Reviews" entry_id="{entry_id}" precision="1"}
              <p>{stars_overall_avg}</p>
              {if rating_no_results}<p><a href="/listing/details/{url_title}/">Rate This Listing</a></p>{/if}
            {/exp:rating:stats}
          </div><!-- /.reviews -->
        </div><!-- /.buttonReviews -->
        <h3><a href="/listing/details/{url_title}">{title}</a></h3>
        {addresses limit="3"}
        <p>{if company_name}{company_name}<br />{/if}{if address1}{address1}{/if} {address2} {if city}<br>{city}, {/if} {if state}{state}{/if} {if phone}<br>Phone: {phone}{/if} {if website_url}<br> <a href="http://{website_url}" target="_blank">{website_url}</a>{/if}</p>
        {if row_count == total_rows && total_rows > 1}
        <p><a href="/listing/details/{url_title}/">See More</a></p>
        {/if}
        {/addresses}
        {if overview}
        <h4>Overview</h4>
        {overview}
        {/if}
      </div><!-- /.content -->
      <div class="clearfix"></div><!-- /.clearfix -->
    </div><!-- /.listingItem -->
    {/if}
    {/exp:channel:entries}

```

# Answer
> 1 votes
```
{if "|{featured_listing_category}|" *= "|{segment_4_category_id}|"}
    {!-- Is Included --}
{if:else}
    {!-- Isn't Included --}
{/if}

```

Outputs as example:

```
{if "|399|400|" contains "|372|"}

```

Pipes required either side to ensure partial cats don't get incorrectly matched, e.g. 399 contains 39.

---
Tags: categories, conditionals, phpstringfun
---


# Question
Title: Edit Categories On Entry With Channel Forms
Is it possible to edit categories against an entry using ExpressionEngine Channel Forms?

The **{selected}** variable doesn't seem to be getting set, so it's always resetting back to the first category in the select drop down.

```
<select name="category[]" id="categories">
   {exp:channel:categories category_group="3"}
   <option value="{category_id}" {selected}>{category_name}</option>
   {/exp:channel:categories}
</select>

```

I'm using EE2.9.0, and no upgrading is not an option. Also, yes I've used Channel Forms before and it's all working aside from this. Thanks!

# Answer
> 1 votes
The documentation would lead me to suggest using the native `{category_menu}` variable pair.

http://ee2docs.com/add-ons/channel/channel\_form/index.html#categories

This is the example from the docs:

```
{category_menu}
    <label for="categories">Categories</label>
    <select name="category[]" id="categories" size="4" multiple="multiple">
        {select_options}
    </select>
{/category_menu}

```

That *should* do it.

---
Tags: safecracker
---


# Question
Title: Channel does not show entries on specific template site
I have a very weird behaviour: One of my channels does not show any entries on one specific template site.

I use the following EE tag:

```
{exp:channel:entries channel="gallery_slider" category="6" limit="1"}test output{/exp}

```

When I use this code in the one specific template, it does not show `test output`. I made sure, that I have content in the channel with the category: I used the tag within another template, where the `test output` is shown as expected.

In the problematic template I use another channel, which is showing its content correctly.

I have no idea what could lead to this behaviour as both templates are nearly identical.

* I don't use the channel within the other channel
* both templates (the working and the non working template) use each two different channels
* In one template the channel `gallery_slider` outputs content
* In one template the channel `gallery_slider` does not output content
* both templates have a url defined via template route manager

**Any ideas, what could lead to the missing content?**

# Answer
Add `dynamic="no"` to your parameters like this

```
{exp:channel:entries channel="gallery_slider" category="6" limit="1" dynamic="no"}
    test output
{/exp:channel:entries}

```

ExpressionEngine tries to determine the `entry_id` or `url_title` by itself, and if that id isn't part of that channel it won't show anything.

Here's a link to the docs.
> 2 votes

---
Tags: channel-entries, templates, template-manager
---


# Question
Title: Is it possible to use gmail as the smtp server for sending e-mail from ExpressionEngine?
Is it possible to use gmail as the smtp server for sending e-mail out from ExpressionEngine? It looks like you need to be able to set a different port and i'm not sure you can do it from the E-mail config page in the EE admin area?

# Answer
With Google's move toward stricter security measures regarding how third-parties connect with their services, there's now another step required to set up ExpressionEngine to send email through Gmail. Beginning to end, here's how to do it.

## Step 1: Allow "Less Secure Apps" to Access Gmail

Sign in to the Gmail (or Gmail-powered Google Apps) account you want to use and open up the "less secure apps" section under My Account.

Turn on access for less secure apps.

## Step 2: Configure ExpressionEngine

In your config.php file, copy over these config items and modify the username and password. Note that the username *must* be the full email address, and the value for `$config['email_newline']` *must* be enclosed in double quotes.

```
$config['mail_protocol'] = 'smtp';
$config['email_newline'] = "\r\n";
$config['email_smtp_crypto'] = 'ssl';
$config['smtp_server'] = 'smtp.gmail.com';
$config['smtp_port'] = '465';
$config['smtp_username'] = 'username@gmail.com';
$config['smtp_password'] = 'xxxxxxxxx';

```

This has been tested thoroughly in ExpressionEngine 2.10.1, though given the availability of config overrides, it should work with EE 2.6+. For older versions, just omit the line for `$config['email_smtp_crypto']` and use `ssl://smtp.gmail.com` as the value for `$config['smtp_server']`.

## Step 3: Test

Make sure it works before you push these changes live. I haven't tested in all possible network configurations or with all possible EE versions. If you find a scenario that requires something different, drop it in the comments.
> 5 votes

# Answer
Pretty sure because of Gmail's forced use of SSL connections this work around is still required in EE 2. I don't remember this being corrected in recent releases of EE v2 but I could be mistaken:

https://expressionengine.com/forums/archive/topic/169641/is-smtp-configuration-for-gmail-possible
> 4 votes

# Answer
I don't know if this will work for you or not, but I was able to set up Google smtp over TLS with a few additions to the config:

```
$env_conf['mail_protocol']    = 'smtp';
$env_conf['smtp_server']      = 'tls://smtp.gmail.com:XXX';    // Use :XXX to set the port number.
$env_conf['smtp_username']    = 'xxx@xxx.xxx';
$env_conf['smtp_password']    = 'xxx';
$env_conf['email_newline']    = "\r\n";
$env_conf['email_crlf']       = "\r\n";
$config['smtp_port'] = "xxx"; //replace with your port number

```

In my particular case I just added the last 3 to a config bootstrap and set up the rest through the cpanel.

Most of this came from this Gist https://gist.github.com/experience/2557044 and the EE hidden config vars docs: http://ellislab.com/expressionengine/user-guide/general/hidden\_configuration\_variables.html#smtp-port

Hopefully that works for someone :)
> 1 votes

---
Tags: smtp, email
---


# Question
Title: Displaying total results of channel entries
I'm trying to get this to display a the total results of a count just once. So if there are 120 results, have it output "120". Instead it shows each line 1,2,3,etc. and count == "1" displays nothing.

```
{if count == 0}
{exp:channel:entries channel="people" search:people_alpha="={segment_3}" orderby="people_lname" sort="asc"}
<h3>{absolute_count}</h3>
{/exp:channel:entries}
{/if}

```

Thanks in advance for any help on this

# Answer
The variable which returns the total amount of entries is `{absolute_results}`, not `{absolute_count}`.

```
{exp:channel:entries channel="people" search:people_alpha="={segment_3}"}
    {if count == 1}
    <h3>{absolute_results}</h3>
    {/if}
{/exp:channel:entries}

```
> 2 votes

# Answer
I can't tell because you didn't post enough code, but it looks like you have a `{exp:channel:entries}` loop inside of another loop, possible another channel loop. This isn't going to fly; the parse order of the templating engine won't render the output you want properly. You need to extract that inner loop and put it in an embed.

http://ee2docs.com/templates/embedding.html

An embed allows your inner loop to be parsed separately from the outer loop.
> 1 votes

---
Tags: ee2, channel-entries, count
---


title: Will add-ons for EE2 work in EE3?

text:
# Question
Title: Will add-ons for EE2 work in EE3?
Searching in 3rd party add-ons, there do not seem to be many that work with Expression Engine 3. In fact, there are almost none that list as compatible. Can I use add-ons listed as compatible with EE 2 in EE 3?

Should I not use EE 3 and instead use EE 2 if I need add-ons?

# Answer
> 2 votes
EE2 add-on's are NOT compatible with EE3. Add-on authors are making the transition, but depending on the complexity of the add-on and the availability of the developer, some will take time.

You can view a list of the current add-ons that are EE3 ready here... https://devot-ee.com/add-ons/filter?&f=ee3

And here is a semi-comprehensive list of other add-ons intentions... https://ellislab.com/blog/entry/expressionengine-3-add-on-developer-update-status

---
Tags: add-on, addons
---


# Question
Title: Searching two title fields with Select fields form with Solspace Super Search
With Solspace Super Search the manual says to use name='title" to search the title field. The issue is the results URL simply favors and outputs only the second select statement so `title=whatevervalue` whereas you want `title=whatevervalue&title=anothervalue`.

How do you deal with searching for two title fields from two different channels?

Thanks in advance for any help on this.

```
<select channel="workplace" name="title" class="Textbox4" >
                    <option value=""> </option>
                    {exp:channel:entries channel="workplace" sort="asc" dynamic="no" orderby="title"}
                    <option value="{url_title}"  >{title}</option>
                    {/exp:channel:entries}
                </select>

                    {exp:channel:entries channel="places" orderby="title" sort="asc" dynamic="no" category="1"}
<option value=""> </option>
                        <option value="{url_title}" >{title}</option>
                    {/exp:channel:entries}
                    </select>
{/exp:super_search:search}

```

# Answer
> 1 votes
Try adding `&&` after your field values:

```
<option value="{title}&&">{title}</option>

```

In Super Search, this can be used to make "AND" searches (eg. title A *AND* B)

Since you want to search more than one title at once, you need your field to allow an *array* of data. You can do this with a select field that accepts multiple values or with checkboxes. Eg:

```
<select name="title[]" multiple="multiple">

```

**Note**: Notice the brackets `[]` next to `title`: this is needed to send an *array* of data instead of a *string* of data. That's just how HTML forms work.

**Note 2**: In your select field, you have the other following issues:

* `channel=""` is not a valid attribute for select fields in HTML.
* If you're searching in *titles*, you need to use `value="{title}"` and not `value="{url_title}"`. If you're searching for a *url\_title* instead, `value="{url_title}"` would be used.
* You're missing an opening `<select>` tag before your second `{exp:channel:entries}` tag pair, if you need two select fields (if you need one select field, you have a closing `</select>` field too many.
* You have a leftover closing `{/exp:super_search:search}` tag in your code. You should remove that (btw, `{exp:super_search:search}` is often not needed in Super Search search forms)

---
Tags: ee2, solspace, supersearch, ee
---


# Question
Title: select orderby_sort option for sorting by store price
This sorts the items correctly but I am failing to pre-select the option they selected using a conditional.

What am I doing wrong?

```
<select name="orderby_sort">
    <option value="">Sort by</option>
    <option value="store:price|asc"{if low_search_store:orderby_sort == "store:price|asc"} selected{/if}>Price (low-high)</option>
    <option value="store:price|desc"{if low_search_store:orderby_sort == "store:price|desc"} selected{/if}>Price (high-low)</option>
</select>

```

# Answer
> 2 votes
The rule is `name="foo" value="bar"` =\> `{low_search_foo} // bar`.

So try `{if low_search_orderby_sort == "store:price|asc"}`.

---
Tags: expresso-store, low-search
---


# Question
Title: Solspace Super Search search_in not searching secondary fields
The search\_in variable doesn't seem to be searching both fields in this select statement. So only results from the primary location are being returned I believed. I checked the entries and they do use the secondary field. The second field is a relationship, is that the issue? Thanks in advance.

```
<select name="work_office[]"  name="search_in" value="work_office|work_office_2" class="Textbox4">
    <option value=""> </option>
                {exp:channel:entries channel="offices" orderby="title" sort="asc" dynamic="no" category="1" }

                    <option value="{title}&&"" >{title}</option>
                {/exp:channel:entries}
                </select>

```

# Answer
I mentioned this privately, but will mention it here again:

`value=""` is not a valid attribute for the `<select>` element in HTML. `value=""` is used with `<option>` elements.

You also have `name=""` twice on your `<select>` element. You should remove one (`search_in`).

About `search_in`, from the Solspace Super Search documentation:

> This parameter allows your users to select which fields they which to search within. **This field is paired up with the keywords field**, and overrides default behaviour of searching within ALL searchable custom fields. Options are: title, custom\_field\_name, all, or a combination of title and any custom\_field\_name's, delimited by pipe character (|).

In other words, this field is often not used in a dropdown field, but rather in a hidden field in the search form, or as a parameter in the results template (the template using `{exp:super_search:results}`). You can use `search_in` if you're using a `keywords` field in your search form. If you're not, and instead are looking to search in a particular custom field (eg. you want to search for a title in a custom field called eg. `work_office`), then use

`<select name="work_office">`

or

`<select name="work_office[]">` (if you want to send an *array* of data)
> 1 votes

---
Tags: ee2, solspace, search
---


title: URL segmentation GoDaddy

text:
# Question
Title: URL segmentation GoDaddy
I have a problem with GoDaddy hosting. It seems that URL segmentation is not working, so I get link like this `http://example.com/?/main/url_title` and I need link like this `http://example.com/main/url_title` because when I share content on FB instead of link `http://example.com/?/main/url_title` , FB through sharer sees this `http://example.com/?%20main%20url_title` because of question mark. I need to solve this problem. Either on GoDaddy somehow or somehow in FB url. Any thoughts?

# Answer
I think I've heard of this issue before, where the host forces query strings.

http://ee2docs.com/urls/remove\_index.php.html#exceptions

Look under that reference and scroll down to the area referencing query string forcing. You apparently need to change this rule in your EE installation root's `.htaccess` file to match this:

```
RewriteRule ^(.*)$ /index.php?/$1 [L]

```

If that doesn't do it, could you expand on your set up (EE version, are you hosting on a sub-domain, other environment attributes that could affect this, etc..)?

**Edit**

Couple of reference answer to check out also:

Hosting EE on GoDaddy.com

Strange hosting questions in regards to godaddy and index,php
> 1 votes

---
Tags: url, query, facebook, godaddy
---


# Question
Title: Limit related entries to specific category
How can I limit related entries to a specific category, while matching the relation on specific category groups?

Obviously this would be the code for it

```
<ul>
{exp:channel:entries related_categories_mode="yes" channel="news" custom_fields="yes" limit="10" category="16" category_group="7|1"  uncategorized_entries="no"}
    <li>
        <a href="/{language_code}/solutions/nieuws/detail/{news_url_title_{language_code}}/{entry_id}">{news_title_{language_code}}</a>
    </li>
{/exp:channel:entries}
</ul>

```

but the category parameter is not supported with using related\_categories\_mode.

EDIT - additional clarification: Category group is used to make sure that only in entries that have the same categories in those groups are presented as related entry.
E.g: the news channel has 5 category groups, but only 2 of them are relevant for the relationship, the others are e.g. audience segment (partner, customer, supplier) or message type (press release, item, blog) In this case only the related entries need to be shown if their audience segment is 'customer' (multiple can be selected)

# Answer
> 0 votes
It can be done, but it is a bit of a hassle... This is what I eventually came up with to tackle this use case:

Same code as above, but with an additional parameter that excludes all entries that are not assigned to the category that is to be shown.

```
<ul>
{exp:channel:entries related_categories_mode="yes" channel="news" custom_fields="yes" limit="10" category_group="7|1" uncategorized_entries="no"
entry_id="not {exp:low_variables:single var='elv_excluded_entry_ids' preparse:target_channel='news' preparse:from_subsite='innoviso'}"}
    <li>
        <a href="/{language_code}/solutions/nieuws/detail/{news_url_title_{language_code}}/{entry_id}">{news_title_{language_code}}</a>
    </li>
{/exp:channel:entries}
</ul>

```

That exclusion is done via a (Early) Low Variable that presents a piped list of Entry IDs to be excluded:

```
{if from_subsite=="innoviso"}
{exp:dandy_cat:entries channel="{target_channel}" category="(17)&(not 16)" dynamic="no"}
{entry_id}|
{/exp:dandy_cat:entries}
{/if}
{if from_subsite=="solutions"}
{exp:dandy_cat:entries channel="{target_channel}" category="(16)&(not 17)" dynamic="no"}
{entry_id}|
{/exp:dandy_cat:entries}
{/if}

```

I still believe there should be an easier way (eg support the category parameter for related\_categories\_mode). If anybody has any better solutions let me know!

---
Tags: categories, related-entries
---


# Question
Title: What's the proper way to alter a form in the control panel? (Using an extension in EE3)
I have looked through the hooks and cannot figure out which hook could provide a way to alter a form in the control panel (e.g. the create/edit member form or publish/edit entry form). I don't want to use the CSS/JS hooks because that's altering it client-side.

Is there a way to either:

1. Grab the output prior to it being sent to the client
2. (even better) Get the objects used to create those forms and alter them?

I also want my extension to be able to be called on every control panel page.

# Answer
> 1 votes
I doubt there is a way to perform that kind of modification using a hook.

What you could do instead (if you need to alter all forms) is modify `_shared/form` View file (but then of couse you'll need to be sure to keep the changes when you update the system)

---
Tags: control-panel, add-on-development, extension, ee3
---


# Question
Title: Expresso-store - order email notification custom email address
**3) Purchase notifications**

Each ‘product’ will have an ‘owner’, this will either be the author of the entry or a custom filed with an associated emails address.

**Question 3:** Can we vary the order notification ‘to’ email address based on this custom fields or the entries Authors email address? For example, if I was the owner example@example.com and someone ‘purchases’ shop item I am the owner of, I would get the the email notification.

# Answer
Nope - the email you set in the email notification setting for each email is fixed.
> 2 votes

---
Tags: expresso-store, notification
---


# Question
Title: Expresso-store selling events - entries or modifiers?
This is a two part question as it relates to the same product type.

We're thinking of using expresso-store for this, but open to other suggestions (CartThrob)?

**1a) Store Product 1 - Events**

One of our products may be an ‘event’. An event might have several possible dates, for this example, lets assume there are three.

The user would select the date they wish to go to said event. Each date would have a limited number of items or stock.

**Question 1a:** Can each event be a single entry with modifiers OR would each date need to be a separate entry?

**1b) Store Product 1 - Events**

Lets assume a Manager needs to buy several tickets for an event for each of their staff.

**Question 1b:** At the point of adding multiple items to their basket, can a user add staff details against each of the purchased items? Ideally we’d need to add email address and First-name, Last-name.

# Answer
Using modifiers on a product is indeed the best way to sell a single event with multiple dates, as each modifier can also have its own inventory.

As for adding something like staff details for ticket purchases, just add one or more "text" modifiers - this allows the purchaser to input free text for each item they add to the cart.
> 2 votes

---
Tags: expresso-store, cartthrob, ee
---


# Question
Title: Login as another Member without the password
Using EE 2.x I had the ability as the Super Admin to click 'Login as Member' link from any member profile in the system and proceed to login as them without actually knowing their password. I've recently upgraded to EE3 and notice that the password is a required field when attempting to login as another Member. Is there anyway to disable that requirement and allow the Super Admin to login as any Member in the system without knowing their password?

Any tips or suggestions would be greatly appreciated, Thanks!

# Answer
> 0 votes
I received a fix from EllisLab support for the blank white page error when using the login as member feature on EE3. If anyone else runs into this try the following:

In system/ee/EllisLab/ExpressionEngine/Controller/Members/Profile/Login.php at line 192 add:

`$url = ee()->input->post('other');`

And change line 199 to read:

`elseif ($redirect == 'other' && ! empty($url))`

# Answer
> 1 votes
You don't have to know the password of the user - EE is asking for your superadmin password, even though you are already logged in. This is just an additional security feature.

---
Tags: member-management
---


title: Module Access Privileges

text:
# Question
Title: Module Access Privileges
I'm experiencing an issue with the module access privileges section on the member groups settings page for a few of my member groups. The issue is several of my groups have "No Modules with Control Panel Access Installed" under the Module Access Privileges section and some of my groups list all my modules and provide yes or no access controls. I'm wanting to grant access to the RSVP module to another member group. In the past I just simply clicked 'yes' next to this module under the module access privileges and everything was fine. So I guess in short how do I enable the list of modules to be displayed for a member group that's currently displaying "No Modules with Control Panel Access Installed"? Any tips or suggestions for resolving this would be greatly appreciated, Thanks!

# Answer
> 0 votes
I ended up solving this with a new member group.

# Answer
> 0 votes
If they aren't set to be able access the control panel, and have their Module privledges turned on, you ain't getting to Albuquerque.

```
Can access the control panel?

```

Must be set to `Yes` before Modules will show up on the Member Group edit page.

```
Can access ADD-ONS: Modules

```

Must be set to `Yes` for them to even see the Modules when they log in.

---
Tags: module
---


# Question
Title: Multiple/dynamic flexsliders for photo gallery
I'd like to run multiple flexsliders on a page, but in JS, there's only a reference to `#carousel` and `#slider` tags. I can use {count} or some other variable next to id to create a unique `id`, but not quite sure how to execute in JS so that this works dynamically no matter how many sliders client loads. Any help is much appreciated.

Here's the EE/HTML template code:

```
{playa_projects var_prefix="playafield"}
    <?php $count = $i++; ?>
    <li><a class="fancybox" href="#inline-<?php echo $count; ?>" title="{playafield:studies_caption}">{playafield:title}</a></li>
    <div id="inline-<?php echo $count; ?>" style="display: none;">
        <div id="slider<?php echo $count; ?>" class="flexslider slider-js">
            <div class="flex-heading">
                <div class="col-md-6">
                    <h2>{playafield:project_name}</h2>
                </div>
                {playafield:studies_outline_block var_prefix="nested_matrix"}
                    {if nested_matrix:content_1}
                        <div class="col-md-2 project-name">
                            <h3>Project Size</h3>
                            {nested_matrix:content_1}
                        </div>
                    {/if}
                    {if nested_matrix:content_2}
                        <div class="col-md-2 project-name">
                            <h3>Project Cost</h3>
                            {nested_matrix:content_2}
                        </div>
                    {/if}
                    {if nested_matrix:content_3}
                        <div class="col-md-2 project-name">
                            <h3>Project Use</h3>
                            {nested_matrix:content_3}
                        </div>
                    {/if}
                {/playafield:studies_outline_block}
            </div>
            <ul class="slides">
                {playafield:studies_image_gallery}
                    <li><img src="{playafield:url}" /></li>
                {/playafield:studies_image_gallery}
            </ul>
        </div>
        <div id="carousel<?php echo $count; ?>" class="flexslider carousel-js">
            <ul class="slides">
                {playafield:studies_image_gallery}
                    <li><img src="{playafield:url}" /></li>
                {/playafield:studies_image_gallery}
            </ul>
        </div>
    </div>
{/playa_projects}

```

Here's the JS:

```
jQuery(document).ready(function() {

    jQuery('.fancybox').fancybox({
        width     : 800,
        height    : 800,
        autoSize   : false,
        autoHeight : true,
        autoResize  : true,
        scrollOutside  : true,
        aspectRatio : false,
        maxWidth  : '90%',
        fitToView    : false,
        scrolling : 'auto',
        prevText: "",
        nextText: "",
        helpers:  {
            title : {
                type : 'inside'
            }
        },

        beforeShow:function(el){

            $(".carousel-js").each(function() {
                var id = this.id;
                var subNav = id.substr(-1);

                jQuery('#' + id).flexslider({
                    animation: "slide",
                    controlNav: false,
                    animationLoop: false,
                    slideshow: false,
                    itemWidth: 210,
                    itemMargin: 5,
                    prevText: "",
                    nextText: "",
                    asNavFor: '#slider' + subNav
                    //move: 2,
                    //startAt: 0,
                });
            });

            $(".slider-js").each(function() {
                var id = this.id;
                var carousel = id.substr(-1);

                jQuery('#' + id).flexslider({
                    animation: "fade",
                    controlNav: false,
                    animationLoop: false,
                    slideshow: false,
                    prevText: "",
                    nextText: "",
                    sync: "#carousel" + carousel,
                    //startAt: 0,
                    start: function(slider){
                      $('body').removeClass('loading');
                    }
                });
            });

            //jQuery.fancybox.inner.resize();
            setTimeout(function(){
                jQuery.fancybox.reposition();
                jQuery.fancybox.inner.resize();
            },300);
        }

    });

});

```

# Answer
> 1 votes
Easy peasy. Just create your unique ID's as you suggested, but give each carousel a common class.

```
$('.carousel').each(function() {

    // this will loop over each carousel
    var this_carousel_id = this.id;

    // do your carousel setup here with your id!

});

```

---
Tags: javascript, jquery, entries, image-galleries
---


# Question
Title: Solspace User: Birthday select dropdown - Registration form
How do you display birthday as select dropdowns for day, month and year.

I tried this but seems like it is of no avail

```
    <fieldset>
    <div><label for="birthday">Date of Birth:</label></div>
    <div class="col_one_third">
        <select class="form-control" id="day" name="bday_d">
            {select_bday_d}
                <option value="{value}" {selected}>{value}</option>
            {/select_bday_d}
        </select>
    </div>

    <div class="col_one_third">
        <select class="form-control" id="month" name="bday_m">
            {select_bday_m}
                <option value="{value}" {selected}>{value}</option>
            {/select_bday_m}
        </select>
    </div>

    <div class="col_one_third col_last">
        <select id="year" class="form-control" name="bday_y">
            {select_bday_y}
                <option value="{value}" {selected}>{value}</option>
            {/select_bday_y}
        </select>
    </div>

    </p>
    <div class="clear"></div>
    </fieldset>

```

# Answer
> 0 votes
In `{exp:user:register}` you can use the same birthday fields that you can use in the `{exp:user:edit}` form. Those fields are `bday_m`, `bday_d` and `bday_y`. You can have a look at the Demo Templates that come with User for an example of those fields when editing your profile in the Demo. You can reuse those fields in a registration form.

Here is the code for those three fields taken from the Demo template for `{exp:user:edit}`

```
<p>
                        <label for="bday_d" style="display:block;">Birthday:</label>
                        <select name="bday_m" id="bday_m" class="form-control" style="width:47%;margin-right:10px;display:inline-block;">
                            <option value="">--</option>
                            <option value="01" {if bday_m == "01"}selected="selected"{/if}>January</option>
                            <option value="02" {if bday_m == "02"}selected="selected"{/if}>February</option>
                            <option value="03" {if bday_m == "03"}selected="selected"{/if}>March</option>
                            <option value="04" {if bday_m == "04"}selected="selected"{/if}>April</option>
                            <option value="05" {if bday_m == "05"}selected="selected"{/if}>May</option>
                            <option value="06" {if bday_m == "06"}selected="selected"{/if}>June</option>
                            <option value="07" {if bday_m == "07"}selected="selected"{/if}>July</option>
                            <option value="08" {if bday_m == "08"}selected="selected"{/if}>August</option>
                            <option value="09" {if bday_m == "09"}selected="selected"{/if}>September</option>
                            <option value="10" {if bday_m == "10"}selected="selected"{/if}>October</option>
                            <option value="11" {if bday_m == "11"}selected="selected"{/if}>November</option>
                            <option value="12" {if bday_m == "12"}selected="selected"{/if}>December</option>
                        </select>

                        <select name="bday_d" id="bday_d" class="form-control" style="width:17%;margin-right:10px;display:inline-block;">
                            <option value="">--</option>
                            <option value="1" {if bday_d == "1"}selected="selected"{/if}>1</option>
                            <option value="2" {if bday_d == "2"}selected="selected"{/if}>2</option>
                            <option value="3" {if bday_d == "3"}selected="selected"{/if}>3</option>
                            <option value="4" {if bday_d == "4"}selected="selected"{/if}>4</option>
                            <option value="5" {if bday_d == "5"}selected="selected"{/if}>5</option>
                            <option value="6" {if bday_d == "6"}selected="selected"{/if}>6</option>
                            <option value="7" {if bday_d == "7"}selected="selected"{/if}>7</option>
                            <option value="8" {if bday_d == "8"}selected="selected"{/if}>8</option>
                            <option value="9" {if bday_d == "9"}selected="selected"{/if}>9</option>
                            <option value="10" {if bday_d == "10"}selected="selected"{/if}>10</option>
                            <option value="11" {if bday_d == "11"}selected="selected"{/if}>11</option>
                            <option value="12" {if bday_d == "12"}selected="selected"{/if}>12</option>
                            <option value="13" {if bday_d == "13"}selected="selected"{/if}>13</option>
                            <option value="14" {if bday_d == "14"}selected="selected"{/if}>14</option>
                            <option value="15" {if bday_d == "15"}selected="selected"{/if}>15</option>
                            <option value="16" {if bday_d == "16"}selected="selected"{/if}>16</option>
                            <option value="17" {if bday_d == "17"}selected="selected"{/if}>17</option>
                            <option value="18" {if bday_d == "18"}selected="selected"{/if}>18</option>
                            <option value="19" {if bday_d == "19"}selected="selected"{/if}>19</option>
                            <option value="20" {if bday_d == "20"}selected="selected"{/if}>20</option>
                            <option value="21" {if bday_d == "21"}selected="selected"{/if}>21</option>
                            <option value="22" {if bday_d == "22"}selected="selected"{/if}>22</option>
                            <option value="23" {if bday_d == "23"}selected="selected"{/if}>23</option>
                            <option value="24" {if bday_d == "24"}selected="selected"{/if}>24</option>
                            <option value="25" {if bday_d == "25"}selected="selected"{/if}>25</option>
                            <option value="26" {if bday_d == "26"}selected="selected"{/if}>26</option>
                            <option value="27" {if bday_d == "27"}selected="selected"{/if}>27</option>
                            <option value="28" {if bday_d == "28"}selected="selected"{/if}>28</option>
                            <option value="29" {if bday_d == "29"}selected="selected"{/if}>29</option>
                            <option value="30" {if bday_d == "30"}selected="selected"{/if}>30</option>
                            <option value="31" {if bday_d == "31"}selected="selected"{/if}>31</option>
                        </select>

                        <select name="bday_y" id="bday_y" class="form-control" style="width:27%;display:inline-block;">
                            <option value="">--</option>
                            <option value="2006" {if bday_y == "2006"}selected="selected"{/if}>2006</option>
                            <option value="2005" {if bday_y == "2005"}selected="selected"{/if}>2005</option>
                            <option value="2004" {if bday_y == "2004"}selected="selected"{/if}>2004</option>
                            <option value="2003" {if bday_y == "2003"}selected="selected"{/if}>2003</option>
                            <option value="2002" {if bday_y == "2002"}selected="selected"{/if}>2002</option>
                            <option value="2001" {if bday_y == "2001"}selected="selected"{/if}>2001</option>
                            <option value="2000" {if bday_y == "2000"}selected="selected"{/if}>2000</option>
                            <option value="1999" {if bday_y == "1999"}selected="selected"{/if}>1999</option>
                            <option value="1998" {if bday_y == "1998"}selected="selected"{/if}>1998</option>
                            <option value="1997" {if bday_y == "1997"}selected="selected"{/if}>1997</option>
                            <option value="1996" {if bday_y == "1996"}selected="selected"{/if}>1996</option>
                            <option value="1995" {if bday_y == "1995"}selected="selected"{/if}>1995</option>
                            <option value="1994" {if bday_y == "1994"}selected="selected"{/if}>1994</option>
                            <option value="1993" {if bday_y == "1993"}selected="selected"{/if}>1993</option>
                            <option value="1992" {if bday_y == "1992"}selected="selected"{/if}>1992</option>
                            <option value="1991" {if bday_y == "1991"}selected="selected"{/if}>1991</option>
                            <option value="1990" {if bday_y == "1990"}selected="selected"{/if}>1990</option>
                            <option value="1989" {if bday_y == "1989"}selected="selected"{/if}>1989</option>
                            <option value="1988" {if bday_y == "1988"}selected="selected"{/if}>1988</option>
                            <option value="1987" {if bday_y == "1987"}selected="selected"{/if}>1987</option>
                            <option value="1986" {if bday_y == "1986"}selected="selected"{/if}>1986</option>
                            <option value="1985" {if bday_y == "1985"}selected="selected"{/if}>1985</option>
                            <option value="1984" {if bday_y == "1984"}selected="selected"{/if}>1984</option>
                            <option value="1983" {if bday_y == "1983"}selected="selected"{/if}>1983</option>
                            <option value="1982" {if bday_y == "1982"}selected="selected"{/if}>1982</option>
                            <option value="1981" {if bday_y == "1981"}selected="selected"{/if}>1981</option>
                            <option value="1980" {if bday_y == "1980"}selected="selected"{/if}>1980</option>
                            <option value="1979" {if bday_y == "1979"}selected="selected"{/if}>1979</option>
                            <option value="1978" {if bday_y == "1978"}selected="selected"{/if}>1978</option>
                            <option value="1977" {if bday_y == "1977"}selected="selected"{/if}>1977</option>
                            <option value="1976" {if bday_y == "1976"}selected="selected"{/if}>1976</option>
                            <option value="1975" {if bday_y == "1975"}selected="selected"{/if}>1975</option>
                            <option value="1974" {if bday_y == "1974"}selected="selected"{/if}>1974</option>
                            <option value="1973" {if bday_y == "1973"}selected="selected"{/if}>1973</option>
                            <option value="1972" {if bday_y == "1972"}selected="selected"{/if}>1972</option>
                            <option value="1971" {if bday_y == "1971"}selected="selected"{/if}>1971</option>
                            <option value="1970" {if bday_y == "1970"}selected="selected"{/if}>1970</option>
                            <option value="1969" {if bday_y == "1969"}selected="selected"{/if}>1969</option>
                            <option value="1968" {if bday_y == "1968"}selected="selected"{/if}>1968</option>
                            <option value="1967" {if bday_y == "1967"}selected="selected"{/if}>1967</option>
                            <option value="1966" {if bday_y == "1966"}selected="selected"{/if}>1966</option>
                            <option value="1965" {if bday_y == "1965"}selected="selected"{/if}>1965</option>
                            <option value="1964" {if bday_y == "1964"}selected="selected"{/if}>1964</option>
                            <option value="1963" {if bday_y == "1963"}selected="selected"{/if}>1963</option>
                            <option value="1962" {if bday_y == "1962"}selected="selected"{/if}>1962</option>
                            <option value="1961" {if bday_y == "1961"}selected="selected"{/if}>1961</option>
                            <option value="1960" {if bday_y == "1960"}selected="selected"{/if}>1960</option>
                            <option value="1959" {if bday_y == "1959"}selected="selected"{/if}>1959</option>
                            <option value="1958" {if bday_y == "1958"}selected="selected"{/if}>1958</option>
                            <option value="1957" {if bday_y == "1957"}selected="selected"{/if}>1957</option>
                            <option value="1956" {if bday_y == "1956"}selected="selected"{/if}>1956</option>
                            <option value="1955" {if bday_y == "1955"}selected="selected"{/if}>1955</option>
                            <option value="1954" {if bday_y == "1954"}selected="selected"{/if}>1954</option>
                            <option value="1953" {if bday_y == "1953"}selected="selected"{/if}>1953</option>
                            <option value="1952" {if bday_y == "1952"}selected="selected"{/if}>1952</option>
                            <option value="1951" {if bday_y == "1951"}selected="selected"{/if}>1951</option>
                            <option value="1950" {if bday_y == "1950"}selected="selected"{/if}>1950</option>
                            <option value="1949" {if bday_y == "1949"}selected="selected"{/if}>1949</option>
                            <option value="1948" {if bday_y == "1948"}selected="selected"{/if}>1948</option>
                            <option value="1947" {if bday_y == "1947"}selected="selected"{/if}>1947</option>
                            <option value="1946" {if bday_y == "1946"}selected="selected"{/if}>1946</option>
                            <option value="1945" {if bday_y == "1945"}selected="selected"{/if}>1945</option>
                            <option value="1944" {if bday_y == "1944"}selected="selected"{/if}>1944</option>
                            <option value="1943" {if bday_y == "1943"}selected="selected"{/if}>1943</option>
                            <option value="1942" {if bday_y == "1942"}selected="selected"{/if}>1942</option>
                            <option value="1941" {if bday_y == "1941"}selected="selected"{/if}>1941</option>
                            <option value="1940" {if bday_y == "1940"}selected="selected"{/if}>1940</option>
                            <option value="1939" {if bday_y == "1939"}selected="selected"{/if}>1939</option>
                            <option value="1938" {if bday_y == "1938"}selected="selected"{/if}>1938</option>
                            <option value="1937" {if bday_y == "1937"}selected="selected"{/if}>1937</option>
                            <option value="1936" {if bday_y == "1936"}selected="selected"{/if}>1936</option>
                            <option value="1935" {if bday_y == "1935"}selected="selected"{/if}>1935</option>
                            <option value="1934" {if bday_y == "1934"}selected="selected"{/if}>1934</option>
                            <option value="1933" {if bday_y == "1933"}selected="selected"{/if}>1933</option>
                            <option value="1932" {if bday_y == "1932"}selected="selected"{/if}>1932</option>
                            <option value="1931" {if bday_y == "1931"}selected="selected"{/if}>1931</option>
                            <option value="1930" {if bday_y == "1930"}selected="selected"{/if}>1930</option>
                            <option value="1929" {if bday_y == "1929"}selected="selected"{/if}>1929</option>
                            <option value="1928" {if bday_y == "1928"}selected="selected"{/if}>1928</option>
                            <option value="1927" {if bday_y == "1927"}selected="selected"{/if}>1927</option>
                            <option value="1926" {if bday_y == "1926"}selected="selected"{/if}>1926</option>
                            <option value="1925" {if bday_y == "1925"}selected="selected"{/if}>1925</option>
                            <option value="1924" {if bday_y == "1924"}selected="selected"{/if}>1924</option>
                            <option value="1923" {if bday_y == "1923"}selected="selected"{/if}>1923</option>
                            <option value="1922" {if bday_y == "1922"}selected="selected"{/if}>1922</option>
                            <option value="1921" {if bday_y == "1921"}selected="selected"{/if}>1921</option>
                            <option value="1920" {if bday_y == "1920"}selected="selected"{/if}>1920</option>
                            <option value="1919" {if bday_y == "1919"}selected="selected"{/if}>1919</option>
                            <option value="1918" {if bday_y == "1918"}selected="selected"{/if}>1918</option>
                            <option value="1917" {if bday_y == "1917"}selected="selected"{/if}>1917</option>
                            <option value="1916" {if bday_y == "1916"}selected="selected"{/if}>1916</option>
                            <option value="1915" {if bday_y == "1915"}selected="selected"{/if}>1915</option>
                            <option value="1914" {if bday_y == "1914"}selected="selected"{/if}>1914</option>
                            <option value="1913" {if bday_y == "1913"}selected="selected"{/if}>1913</option>
                            <option value="1912" {if bday_y == "1912"}selected="selected"{/if}>1912</option>
                            <option value="1911" {if bday_y == "1911"}selected="selected"{/if}>1911</option>
                            <option value="1910" {if bday_y == "1910"}selected="selected"{/if}>1910</option>
                            <option value="1909" {if bday_y == "1909"}selected="selected"{/if}>1909</option>
                            <option value="1908" {if bday_y == "1908"}selected="selected"{/if}>1908</option>
                            <option value="1907" {if bday_y == "1907"}selected="selected"{/if}>1907</option>
                            <option value="1906" {if bday_y == "1906"}selected="selected"{/if}>1906</option>
                            <option value="1905" {if bday_y == "1905"}selected="selected"{/if}>1905</option>
                        </select>
                    </p>

```

---
Tags: members, solspace-user, registration, drop-down
---


# Question
Title: Get Category Details by just URL_TITLE in EE
Is there a way that I can get the Category details in EE by just knowing the category url\_title ?

Channel Category tag doesn't provide that facility : http://ellislab.com/expressionengine/user-guide/add-ons/channel/category\_heading.html

# Answer
> 2 votes
My recommendation would be to look at Cat2 and Low Seg2Cat (if you need to infer category data from a URL segment).

# Answer
> 0 votes
URL Helper is a better/safer way to handle something like this.

# Answer
> -3 votes
May be not the best way to do it, but this is how I did it.

```
{exp:query sql="
SELECT c.cat_name,c.cat_id, c.cat_description
FROM exp_categories c
WHERE c.cat_url_title = '{segment_3}'
AND c.group_id='2'"}

// You can also use categories tag if you want to get custom fields for the category.
//{exp:channel:categories show='{cat_id}' style='linear'}
//<p>
//{category_description}
//</p>
//{/exp:channel:categories}

<p>{cat_description}</p>

{/exp:query}

```

---
Tags: categories, url-title
---


# Question
Title: Expresso-store product modifiers or multiple entries?
**Product 2**

This would be a single product that is either a **download** OR *physical* product. Ideally this would be a single entry as the data remains the same - it’s simply the end product that varies in format and price… so my questions are:

1. **Question 2a - 1:** Can we handle the product ‘type’ with modifiers, is this the best way to manage this?
2. **Question 2a - 2:** If a physical product is chosen is it easy to add postage? (digital download has no postage)
3. **Question 2a - 3:** Depending on the type chosen can we vary the email that is sent to the user?

# Answer
> 0 votes
This is not possible, unless we have free shipping on the physical products. Currently modifiers can not change the postage, so you always have the same shipping amount per entry.

The solution would be multiple entries, then perhaps relate these to a 'parent' that houses the 'shared' details.

---
Tags: expresso-store, modifiers
---


title: php template shows code in {}

text:
# Question
Title: php template shows code in {}
I use php templates when I need to send notification emails to multiple people. Since upgrading to EE 2.10, I have noticed that when I echo the code, before the code that I am echoing, there is a random code in {}, ex. {!-- ra:0000000004854f7300007f40072103c3 --}.

Any idea what this code is and how I can remove it?

I also use php templates to download data/save it to csv. this same random code is always in the first cell of the .csv file.

Any help is appreciated.

Below is a sample of the php template code I am referring too.

```
<?php
            $debug = true; //debug mode: true for on, false for off
            $id = $this->EE->security->xss_clean($this->EE->uri->segment(3, 0));
            if( $id > 0 && is_numeric($id) ) //check if id is numeric and greater than 0
            {
                $this->EE->load->library('email');
                $this->EE->load->helper('text');
                $sql = "SELECT
                        et.title AS TITLE,
                        ed.field_id_6 AS MY_VAR
                        FROM
                        exp_channel_data as ed
                        WHERE ed.entry_id = " . $id . "  LIMIT 1";

            $results = $this->EE->db->query($sql);
            if ($results->num_rows() > 0)
                {
                    $title = $results->row('TITLE');
                    $myVar1 = $results->row('MY_VAR');
                } // END line 29

            if($debug == TRUE)
                {
                    echo "46";
                    echo $title."<br />\n";
                    echo $myVar1."<br />\n";
                }

```

} // END line 5 exit();

?\>

# Answer
> 1 votes
This has to do with the new template parser introduced in EE 2.9.0. What you're seeing is a template annotation, and it's removed from the template late in the parsing process. Since you're manually calling `exit()`, it never gets the chance to do so.

My advice: turn this code into a simple plugin instead. This amount of PHP in a template is always trouble waiting to happen IMHO.

---
Tags: php, template-scripting
---


title: Multi-Site Manager Limits

text:
# Question
Title: Multi-Site Manager Limits
I'm about to rollout a product that could potentially need hundreds of connected EE sites. What is the limits to MSM? I can easily see a few hundred sites but it could be as big as a few thousand.

I have an EE site that has a large number of customizable features based on field types allowing the features to be activated. I would duplicate the site for every new install and customize it based on a specific brand. One instance will be for a large number of business franchises that need their own sites for local SEO purposes as well as offerings.

How can I utilize the EE MSM and not get limited by the database size, columns, etc...?

# Answer
https://ellislab.com/expressionengine/user-guide/msm/additional\_sites.html

The theortical max limit on custom fields (which expands the `channel_data` table horizontally, not vertically) is the maximum number of columns divided by 2 (in EE 2, at least, it uses to columns per custom field) in a MyISAM table.

https://www.percona.com/blog/2013/04/08/understanding-the-maximum-number-of-columns-in-a-mysql-table/

This is your real issue. Everything else basically expands vertically, so the column limit isn't an issue. I would say you can safely get to around 500 to 750 custom fields before hitting the limit, possibly 1000. The issues isn't how many sites (and you'll be paying for licenses for all of them), but how many custom fields. If your limit works out to 750 columns, and each site has 20 fields, your only looking at about 37~38 sites before hitting the wall.

**Edit** as a side note, I've always found it an unfortunate choice for EllisLab to not expand `channel_data` in it's own new table for new sites; InnoDB, for example, has a limit of 4 billion tables in a schema, and 1000 columns in a table. Which one makes more sense to take advantage of?
> 1 votes

---
Tags: multi-site-manager, database
---


# Question
Title: How do I find/make the URL to a PHP page in my extension?
If I have a control panel page and I want to submit it to a PHP page in my extensions' directory, how do I do that? What would the URL be?

Or would I instead make an `ACT` URL? If so, how do I do that on the control panel side of EE?

# Answer
You shouldn't be submitting to PHP file in system folder directly, as the system folder might be located outside of web root and so inaccessible for direct requests.

Instead you need to place those functions inside of a module and post data to `ACT` page, just like you say. The function reference need to be added to `exp_actions` database table (see example in the docs)

Then to get URL to post to you will need code similar to this:

```
$act = ee()->db->select("action_id")->from("actions")->where("class", 'Module_name')->where('method', 'function_name')->get();
$remoteUrl = trim(ee()->config->item('site_url'), '/').'/?ACT='.$act->row('action_id');

```
> 1 votes

---
Tags: add-on, control-panel, add-on-development, extension, act
---


# Question
Title: Count the number of entries with a field value?
I'm wondering if it is possible to show a count of entries with a custom field value.

For example if I have a channel with a custom field that can have a value of either "Y" or "N".

When I show a list of entries in that channel I can easily show the total number of entries, but how would I show the total number of entries along with the total number of entries with my custom field set to "N" and the total number of entries with my custom field set to "Y"?

Something like: All Entries = 12, Y Entries = 4, N Entries = 8

Thanks!

# Answer
> 0 votes
http://ee2docs.com/add-ons/channel/channel\_entries.html#search-field-name

Something like:

```
{exp:channel:entries
    channel="my_channel"
    search:my_field="Y"}

    {absolute_results}

{/exp:channel:entries}

```

Should do it. That should give you the total count of entries with your `my_field` field set to "Y". Just omit the `search` param to get all results; you may have to put a very high `limit` param if you have more than 100 entries as the Channel Entries tag defaults to a limit of 100. If that doesn't work for you, I can craft up a quick `{exp:query}` tag for you that will do that trick.

---
Tags: channel-entries, count
---


title: Profile:Edit with jquery.validate

text:
# Question
Title: Profile:Edit with jquery.validate
Does anyone have jquery.validate working with Profile:Edit?

I have a form set up with jquery validation working using jquery.validate.js, everything working as expected.

As soon as I try to use the {exp:profile:register}{/exp:profile:register} tags the JS stops working.

I've stripped my form down to a single element to try and identify where I am going wrong. If I comment-out the exp:profile:register tags the JS works, but with the tags in-place Profile:edit registration works but no JS.

HTML:

```
{exp:profile:register id="register" return="account"}
<h1>Register</h1>
<legend>Login details</legend>
<form class="form-horizontal" id="signupForm" method="post" action="">
<label for="email">Email </label>
<input id="email" name="email" type="email" class="required form-control">
<input class="btn btn-default" type="submit" value="Register" id="submit">
</form><!-- form -->
{/exp:profile:register}

```

JS:

```
$().ready(function() {
    // validate signup form on keyup and submit
    $("#signupForm").validate({
        rules: {
            email: {
                required: true,
                email: true
            },
        },
        errorPlacement: function(error, element) {
        // Append error within linked label
        $( element )
            .closest( "form" )
                .find( "label[for='" + element.attr( "id" ) + "']" )
                    .append( error );
        },
        errorElement: "span",
        messages: {
            email: "Please enter a valid email address"
        }
    });
});

```

Any help would be massively appreciated.

Cheers

# Answer
> 0 votes
The `profile:register` form extends the `channel:form` tag (docs), and by default the Channel Form includes a copy of jQuery. Sunce your validation is working on a raw form, I assume this means you're already loading jQuery into your template, so the conflicting version of jQuery is likely what's causing the error.

To fix this, add `include_jquery="no"` as a parameter on your `profile:register` tag.

---
Tags: jquery, profile-edit, validation
---


# Question
Title: XML template 500 error with one category group
I"m setting up an xml template on an old site to use for importing to a new site via datagrab. Everything is working fine except when I try to output categories from one specific category group. When I do that the page gives a 500 error.

Here is the relevant part of my template

```
<root>
{exp:channel:entries channel="trips" paginate="bottom" status="Open|Closed" limit="500" dynamic="off"}
    <entry>

        <categories>

        {!-- // causes 500 error on page load not sure why
            <cat_activities>
                {categories show_group="6" backspace="1"}
                    <![CDATA[{category_name}]]>,
                {/categories}
            </cat_activities>
        --}

            <cat_difficulty-class>
                {categories show_group="7" backspace="1"}
                    <![CDATA[{category_name}]]>,
                {/categories}
            </cat_difficulty-class>

        </categories>

    </entry>
{/exp:channel:entries}
</root>

```

I've taken the same code and put it into a test html template and there are no errors and it outputs the categories as expected. See below:

```
{exp:channel:entries channel="trips" paginate="bottom" status="Open|Closed" limit="500" dynamic="off"}

            <cat_activities>
                {categories show_group="6" backspace="1"}
                    {category_name},<br>
                {/categories}
            </cat_activities>

            <cat_difficulty-class>
                {categories show_group="7" backspace="1"}
                    {category_name},<br>
                {/categories}
            </cat_difficulty-class>

{/exp:channel:entries}

```

Any idea on why the xml template is getting a 500 error? As soon as I comment out the one category group the xml template loads correctly.

\***********UPDATE\***************

I also checked that the categories in this category group don't have any special characters or anything that would obviously affect output in either the title or url\_title. Have attached screenshot of categories.

# Answer
Can’t see any problem off hand, but I’d try some of this:

* According to the docs, the backspace parameter counts
as four characters, so change the backspace value to 4.
* Removing the `<br>`
* Removing the backspace parameter
* Ensure that category group is indeed assigned to the ‘trips’ channel
* Try putting group 6 after group 7 and see if the same thing happens
> 2 votes

---
Tags: template-scripting, xml, error-500
---


title: Freemember with EE 3?

text:
# Question
Title: Freemember with EE 3?
I was wondering if anyone was using or had tested Freemember with the new EE 3.x ? I'm working on upgrading some sites and I used this in a few of them. Thanks!

# Answer
Freemember has not been updated to be compatible with EE3 - you'd have to contact DevDemon and ask if they have plans. (It doesn't appear in their EE3 roadmap, and as a free add-on that was Adrian's baby before he sold Expresso Dev to DevDemon, it may not happen.)

But it's open source, so anyone can tackle the conversion ad make a pull request.
> 3 votes

---
Tags: freemember
---


# Question
Title: Cartthob and channel entries. Tag {title}
EE v2.5.5

On the cart page i need to get image title based on its id. Instead tag {title} shows the title of cart item. So high level variable rewrite low level.

```
{exp:cartthrob:cart_items_info}<br>
   {title} // shows cart item title, for example "Product 1"

   {exp:channel:entries channel="images" entry_id="{item_options:image_id}" limit="1"}

      {title} //should show image title, for example - "Image 1", but shows "Product 1"
   {/exp:channel:entries}

{/exp:cartthrob:cart_items_info}

```

How can i solve this?

# Answer
Yes, you're getting variable collision there. You'll need to embed the inner `channel:entries` tag and pass the `entry_id` to the embed:

```
{embed="_embeds/_cart_item_title" entry_id="{item_options:image_id}"}

```

And then in that template:

```
{exp:channel:entries channel="images" entry_id="{embed:entry_id}" limit="1" dynamic="no" disable="member_data|pagination|categories|custom_fields"}
    {title}
{/exp:channel:entries}

```
> 1 votes

---
Tags: channel-entries, cartthrob
---


# Question
Title: Duplicating a site using MSM with Low Variables
I need to be able to duplicate a site as a new MSM site and keep my Low Variables settings, values, titles, descriptions, field types, etc.

Is there a solution. I would hate to have to recreate 80 of these every time I need a new MSM site.

# Answer
As far as I know, there isn't an automated way of doing this for many major third party add-ons.

For example, I recently had to branch out a few channels from a site into its own MSM site. One of the channels had a Matrix field. In that matrix field was an Assets column. Oh boy, was that fun. I had to make a template (pure PHP) that functioned as an import script from the main site to the new MSM site. I learned a bunch along the way; I had to reverse engineer the Assets add-on database schema to get it correct. The benefit is that I now have a solid script for that process.

Sorry, not much of an answer, more of an experience recounting. I will have to do that again for sure (we have a stupidly huge site that we are breaking out to MSM piece by piece), so it was worth getting right.
> 0 votes

---
Tags: multi-site-manager, low-variables, low
---