# Question
Title: Registering for different events, with each event having its own registration questions
I'm attempting to map out and build a fundraising website that would allow for an organisation to set up multiple events during the year. Users would be able to register for these events and get notifications relating to the specific event.

Each event, however, is to have custom questions relating only to that event. For instance, one fun-run type event might ask the user whether they wish to complete the short run or the long run, while another event may ask whether they user is over eighteen years of age.

The way I was originally thinking of creating it was to have a registrants channel (using an add-on like Zoo Visitor or Profile:Edit), an events channel and a third channel that would link the two (with one field relating to the registrant channel and one relating to the events channel). This third channel is required to record the registrant's fundraising for that specific event.

I thought that perhaps I could then add a custom field in this channel for every question possible to be asked, then hide the ones that weren't relevant to the event chosen (through Javascript).

Am I just going about this in the completely wrong way? Is there something simpler that I've missed or perhaps I'm trying to stretch too far with one install of EE. Perhaps I need to move towards having one install for each event (or investigate MSM).

Any help, suggestions or guidance would be appreciated!

# Answer
I would take a look at using an add-on like FreeForm to manage the actual event Registration. You would then be able to use the Form Composer functionality to build a form for each event with the specific questions.

So you would have your Event channel which would have the custom fields that you needed to display info about the event and to that you would add the included FreeForm fieldtype as a field. This would allow you to then select from a dropdown the Form that you built for the specific event. They have a bit of information about doing this in their docs http://www.solspace.com/docs/freeform/channel\_entry\_fieldtype/
> 1 votes

---
Tags: relationships, channel, custom-fields, multiple-channels
---


# Question
Title: Don't display incomplete orders in Control Panel
Is there a way to not show the incomplete orders in the Store control panel? Currently it shows ever cart created, which adds up to quite a bit of not so useful info to delete.

# Answer
Short of modifying the core files to not show incomplete orders your best bet would be to use the Order Status dropdown to change the status to your successful order status which by default is "New".
> 0 votes

---
Tags: expresso-store
---


# Question
Title: Expresso Store, set tax rate at beginning of shopping
I am working on a project where the client would like the customer to select a region before adding to cart. The region has a tax\_rate associated with it but is NOT dependant in IP or where the customer is located. Once of the selections is Dealer which offers a discount. How can I complete this. Please note, this is to be selected before anything else happens.

# Answer
> 0 votes
The only way that this might work is if the user was logged in and has their profile filled out. They would need to have the Country/State/Zip filled out.

Store creates a new session tied to a Cart ID when you add a product to the cart which loads any existing shipping/billing information, clearing the cart kills that session clearing any billing/shipping info.

Your best bet would be to have the user add the first item to the cart and after they have done that you can use the `{exp:store:checkout}` tag pair to collect their Country/State/Zip (which ever you are using to set the tax rates) so that you can calculate the tax rate.

---
Tags: expresso-store
---


# Question
Title: Issue with Channel Images on local setup
We've taken over a site and I've set up a copy on my local setup mostly successfully. The problem I'm having is getting the following PHP errors:

```
Severity: Notice
Message: Undefined property: Channel_images_model::$LOCS
Filename: models/channel_images_model.php
Line Number: 568

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /my/path/to/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 408

```

This is on EE 2.7.2 and Channel Images 5.4.8.

I've looked at permissions - they're all correct. I'm able to get into EE just fine, as well as the Channel Images module. However, if I try to regenerate images, nothing happens.

Not sure what to try next. I've been waiting to hear from DevDemon support for over a week. :/

# Answer
> 1 votes
Easy answer and fix: upgrade to Channel Images 5.4.17.

# Answer
> 3 votes
I was also having this issue and found another way to fix it without updating; open third\_party/channel\_images/models/channel\_images\_model.php and edit line 525:

Make this line

```
$this->LOCS &= $this->session->cache['channel_images']['locations'];
```

Look like this

```
$this->LOCS = $this->session->cache['channel_images']['locations'];
```

Done. Does anyone know if this will break functionality elsewhere? I haven't encountered it if it does.

---
Tags: channel-images, devdemon
---


title: Multiple Stash Sppend Lists

text:
# Question
Title: Multiple Stash Sppend Lists
I have created a module which using curl retrieves and parses data from an external source. I have adapted the code from channel:entries so it outputs the correct values. The method handles the tags and chunks in the same way as it would a category.

```
{exp:sh_dictionary:translate_result dictionary="wordreference"}

    {additional}
        {exp:stash:append_list name="additional_{count}"}
            {stash:sense}{sense}{/stash:sense}
            {stash:pos}{POS}{/stash:pos}
            {stash:translation}{translation}{/stash:translation}
        {/exp:stash:append_list}
    {/additional}

    {compound}
        {exp:stash:append_list name="compound_{count}"}
            {stash:sense}{sense}{/stash:sense}
            {stash:pos}{POS}{/stash:pos}
            {stash:translation}{translation}{/stash:translation}
        {/exp:stash:append_list}
    {/compound}

{/exp:sh_dictionary:translate_result}

```

The problem is if I have just the {additional} chunk I get the result I want. And similarly if I just include the {compound} chunk. But if I include them both I get nothing.

Do I need to clear something before setting up a new list? or maybe it is the way my module parses the data. If I wrap each chunk in its own {exp:sh\_dictionary:translate\_result} it solves the problem but this doesn't feel right as I would need to cache the original curl results.

Thanks

# Answer
> 1 votes
Before Stash gets to do anything, your custom tag should return something like this:

```
    {exp:stash:append_list name="additional_1"}
        {stash:sense}sense1{/stash:sense}
        {stash:pos}pos1{/stash:pos}
        {stash:translation}translation1{/stash:translation}
    {/exp:stash:append_list}

    {exp:stash:append_list name="additional_1"}
        {stash:sense}sense2{/stash:sense}
        {stash:pos}pos2{/stash:pos}
        {stash:translation}translation2{/stash:translation}
    {/exp:stash:append_list}

    {exp:stash:append_list name="additional_1"}
        {stash:sense}sense3{/stash:sense}
        {stash:pos}pos3{/stash:pos}
        {stash:translation}translation3{/stash:translation}
    {/exp:stash:append_list}

    {exp:stash:append_list name="compound_1"}
        {stash:sense}sense1{/stash:sense}
        {stash:pos}POS1{/stash:pos}
        {stash:translation}translation1{/stash:translation}
    {/exp:stash:append_list}

    {exp:stash:append_list name="compound_1"}
        {stash:sense}sense2{/stash:sense}
        {stash:pos}POS2{/stash:pos}
        {stash:translation}translation2{/stash:translation}
    {/exp:stash:append_list}

    {exp:stash:append_list name="compound_1"}
        {stash:sense}sense3{/stash:sense}
        {stash:pos}POS3{/stash:pos}
        {stash:translation}translation3{/stash:translation}
    {/exp:stash:append_list}

```

If you turn on template debugging it will tell you what tags the parser is parsing. Most likely your module isn't properly parsing your two variable pairs and only returning the tagdata for one of the pairs.

In any case, since you are using a custom module, why not just set the list directly from the arrays using Stash's API?

See: https://github.com/croxton/Stash/wiki/Using-stash-methods-in-your-own-add-ons#set-a-list

---
Tags: ee2, stash
---


# Question
Title: Using {freeform:mp_data:FIELD_NAME} to pre-fill another field on multipage form
Using FreeForm Pro. I have a 2 page multipage form set up. On the first page users insert their address details. On the second page of the form I want to have a check box and if the user checks the box the address details from the first page are inserted into the address details on the second page. Similar to when you can choose your billing address to be used as your shipping address.

The problem I'm having is achieving this. I'm using javascript to try and fill the form fields on click (using a similar method to this: http://jsfiddle.net/aDNH7/) but because i'm using the {freeform:field:address\_line\_1\_p2} to create the field rather than hand coding the field, (as i need the data to remain on refresh ie for inline errors), I cant use {freeform:mp\_data:address\_line\_1\_lb} for example to insert into {freeform:field:address\_line\_1\_p2 } as the data value.

Can anyone offer a solution or advice? Many thanks, Ian

# Answer
There might be more than one way around this, but it comes down to javascript and how you set up your elements. First, simply confirming that the data from the previous form page (page 1) can be retrieved using `{freeform:mp_data:MY_FIELD_FROM_PAGE1}`.

On page 2, on your `{freeform:field:MY_FIELD_FOR_PAGE2}` field, you could try the `default_value=""` parameter (see http://www.solspace.com/docs/freeform/form/#freeform\_field\_field\_name) and place `{freeform:mp_data:MY_FIELD_FROM_PAGE1}` as the parameter value. Eg.

```
{freeform:field:MY_FIELD_FOR_PAGE2 default_value="{freeform:mp_data:MY_FIELD_FROM_PAGE1}"}

```

Parse order might get in the way, but it's worth a try. Everything would be in place from the start, and you could also add `attr:disabled="disabled"` to your `{freeform:field:MY_FIELD_FOR_PAGE2}` fields so that they are disabled unless your special checkbox is checked.

---

Another approach could be to store your page 1 data into hidden elements, and copy the data over, using javascript/jQuery, to your page 2 fields after checking your checkbox. What would link both elements could be a matching class name. Eg:

`<input type="hidden" class="origin my_field_from_page1" disabled="disabled" value="{freeform:mp_data:MY_FIELD_FROM_PAGE1}" />
 <input type="text" name="MY_FIELD_FOR_PAGE2" class="target my_field_from_page1" value="" />`

Since both fields have the same class name, javascript/jQuery could take care of copying the value in the `input.origin` field over to the `input.target` (i.e. *take the value of the origin field and copy it to a target field with a matching class of X*). Instead of classes, you could alternatively use data- attributes as well. Many ways for this to work.
> 0 votes

---
Tags: solspace-freeform, solspace, javascript
---


title: Using EE for data relationships admin

text:
# Question
Title: Using EE for data relationships admin
I'm new to EE, and have a project with a lot of database relationships. For example, the company offers a "Service", in certain "Zip Codes".

So I see in EE, I can create channel fields, etc, and create the relationship between a Service and the (many) zip codes to which it applies.

In the admin area, the client would be able to CRUD Zip codes, Services, and map the two appropriately. However, some fields that are default in EE, like "URL", don't make any sense for a "Zip code" entry. It can be ignored, and still works, but not ideal for a non-technical client to use. Also things like Expiration dates, and the other tabbed fields don't make sense.

My question is twofold:

1. Is this appropriate way to use EE, or it is better (though more tedious) to build a custom module to manage "non-content" based entities?
2. Is there a way to customize the "Channel" screen to hide the unnecessary fields and focus the user a bit on what they need to enter?

I'm just trying to get a sense of how to approach this task and how EE was meant to be used.

-Jim

# Answer
> 0 votes
Welcome to EE... I'll start by saying that in my opinion EE is not "meant to be used" in any particular way and is usually flexible enough to do things whichever way you prefer.

As already mentioned, you can use Publish Layouts to hide the URL Title field and Expiration Date etc. If this is not enough you can go off-piste and create your own standalone entry forms on the front end with Channel Form.

However, by the sound of it, maybe using a mapping fieldtype such as http://devot-ee.com/add-ons/google-maps might be better?

If you think it's more appropriate you might want to consider using EE's categories system instead - adding each Zip Code as a category and then assigning each Service entry to the relevant categories. Bear in mind that this reduces your future flexibility a little bit since categories are less powerful than channel entries.

You could also opt for a third party Tagging solution such as Tagger \- again, similar to categories but at a lower level/more free-form kind of organisation.

# Answer
> 0 votes
It seems like you're going to make a channel for zip codes and each entry is a separate zip, so I think what you're looking for is Publish Layouts. Then you can customize the way the entries for that channel display based on member group, hiding fields and tabs that you don't want visible for the client.

---
Tags: relationships
---


# Question
Title: Store email template variables not working
I'm using Expresso Store 1.6.5. and I'm having trouble with the order email templates that get sent out to buyers.

I would like to include variables like {you\_save},{you\_save\_percent},{sale\_price},{promo\_code\_value},{promo\_code\_type} and a few others. Ideally I would also include product photos as well as a link to the products themselves but it's not a huge deal...but for some reason those variables aren't appearing. They are wrapped inside an {items} tag but I still can't get them to show up. I've checked the documentation and it says they should be available. I've also tried wrapping the items tag around an exp:channels tag and still nothing.

Does anyone have a more complex e-mail template with this kind of information? Am I missing something obvious

# Answer
You do not want to wrap order specific tags (promo\_code, order\_total, etc) within the items loop as they won't show up.

To get custom fields in your email templates you will need to pass the entry\_id to a channel entries tag and then have order specific items outside of the items loop

```
{items}
  {exp:channel:entries entry_id="{entry_id}"}
    {custom_image_field} - {price} - {title}
  {/exp:channel:entries}
{/items}

Promo Code: {promo_code}
Order Total: {order_total}

```
> 0 votes

---
Tags: expresso-store, html-email
---


title: Cartthrob Stripe Checkout API

text:
# Question
Title: Cartthrob Stripe Checkout API
I'm new to Cartthrob, what an amazing product. I'd like to incorporate Stripe's Checkout API as a way to have my client's checkout. It's beautiful, and very easy to use - but I can't figure out how to integrate the API into Cartthrob.

Information can be found here: https://stripe.com/docs/checkout

Do you offer support for this?

Thanks, -Nick

# Answer
> 1 votes
CartThrob already has a Stripe Payment Gateway you will want to follow http://cartthrob.com/docs/pages/payments/index.html to enable the Stripe gateway on your site.

You shouldn't need it but if you were interested in developing your own gateway you would want to follow their Payment Gateway Plugin API guidelines.

---
Tags: checkout, stripe
---


# Question
Title: Snippet encoded as utf-8 causes blank text to be inserted above it
I have a snippet used for navigation that causes a "blank" bit of text to be inserted into the rendered DOM when the encoding for the snippet file is set to utf-8 but not when the snippet encoding is set to ANSI.

The template the snippet is in is set to utf-8 and it renders like this in ALL browsers but you can only see the "blank" when using the webdeveloper tools in Chrome (see screenshot)

.

Never seen this before but it is my first site using EE 2.9.2. Have not tested in other versions yet.

Anyone have any ideas?

Details: EE 2.9.2, Bootstrap 3.2.0, SnippetSync 1.1.3

# Answer
Snippet file needs to be set for **UTF-8 without BOM**.

Tested on other verions of EE and got consistent results until the snippet was encoded as UTF-8 without BOM.
> 0 votes

---
Tags: ee2, snippets
---


# Question
Title: Formatting custom date fields within channel entries row hook
In Shortlist the {exp:shortlist:view} tag extends the channel-\>entries() method for it's parsing needs. This works and allows for full custom tag parsing without much extra effort, but runs into issues when formatting extra *date* variables.

In the view loop we provide an extra variable *{entry\_real\_date}* which is the actual date for the entry (vs. the date it was added to a list). The parser never see's our custom variable as a date variable, so ignores any *format* param.

ie :

```
{entry_real_date format="%n %Y"}

```

is never parsed.

In a normal situation where we're applying our own tag parsing, we'd be able do something like :

```
$tagdata = ee()->TMPL->parse_date_variables($tagdata, $dates);

```

but with in the channel-\>entries() usage we can't get access to the raw parsing to do this. The parser does look for custom date variables, but only within the context of *custom fields*, so our dynamically attached variable is never handled.

From digging I can find no way to mark our custom variable as a date variable to enable that format parsing.

Has anyone run into this and handled it?

This is on EE2.8+

# Answer
> 1 votes
My pragmatic solution would be to just enable PHP on output.

---
Tags: templates, add-on-development, date, date-format, parsing
---


title: Download channel fields to csv file?

text:
# Question
Title: Download channel fields to csv file?
We are using Andrew Weaver's DataGrab to upload about 50 fields via a spreadsheet - all works fine (great plugin btw) - what we need though is to somehow do the reverse process: basically take the submitted channel entries, but only ones assigned to the logged in author and output them as a csv?

Andrew has a plugin ‘Export’ but it seems rudimentary and the channel I need to download info on has 50 fields, plus some categories and must be in a category the logged in author is assigned to. Not sure that would do it.

Anyone have ideas or done something similar?

# Answer
Kind of depends on your budget, but in a pinch, Mithra62's "export it" add-on would definitely allow you to handle that.
> 2 votes

---
Tags: csv
---


# Question
Title: How to output a 'parent field' value in a Playa Tag Pair?
I'm really struggling to output a parent field value within a Playa tag pair. I've had to resort to using php in my template to do this. Is there a way I can do this without using php in my template? Thanks.

I had to enable php and do this:

```
<?php $parent_field = {parent_field} ?>
{playa_field}
    <a href="{url_title}">{title} <?php echo $parent_field ?></a>
{/playa_field}

```

As this doesn't output the {parent\_field} content within the tag pair:

```
{playa_field}
    <a href="{url_title}">{title} {parent_field}</a>
{/playa_field}

```

# Answer
Wouldn't you just need to use the playa:parents tag pair instead of the fieldtype tag pair?
> 1 votes

# Answer
I ended up prefixing the Playa fields. The following code allows you to access parent field/s.

```
{playa_field var_prefix="pl"}
    <a href="{pl:url_title}">{pl:title} {parent_field}</a>
{/playa_field}

```
> 0 votes

---
Tags: playa
---


# Question
Title: Sort and Results on Custom Fields (not category)
I'm trying to add a sort / results feature on 2 custom fields which would look similar to what I've started here using categories but using custom fields instead: `http://192.241.255.103/ee272/jdb/joke_list`. The channel is: "jokes" fields are called "joke\_category" (dropdown list) and "rating" (checkbox). Without using a plugin do I have to write a mysql query? If so, would anyone mind giving me a head start here.

# Answer
> 0 votes
You could try using the entries loop's dynamic parameters and sorting that way - it depends on how you're accessing the sort - with a form, with a clickable link with custom segments the URL, or you could potentially get a bit fancy with it using jQuery. The dynamic parameters way be a bit less ideal if you're looking to filter as opposed to just plain sort.

---
Tags: custom-fields, no-results
---


# Question
Title: External URLs are being appended at the end of blog post URLs
I need some help with this as it drives me mad.

Some blog posts have an external URL appended to them: https://www.my-site.com/blog-post/www.external-site.com

I get hundreds of such pages from one single external URL.

Any ideas what might be causing this? It is not happening with all external URLs. Just this one. I've even checked if it was added with the protocol (http://) in front and there aren't any such issues.

# Answer
I assume you mean that you're seeing these in your Analytics reports? This is almost certainly an issue where inside one or more of your posts' content, you have a link to `www.external-site.com`, without the `http://`. I've seen this often.
> 1 votes

---
Tags: url
---


title: GWCode Categories - No Results

text:
# Question
Title: GWCode Categories - No Results
Using GWCode Categories for the first time and it doesn't seem to be working at all. I've installed the plugin (can see it in add-ons / plugins) and running {exp:gwcode\_categories}{/exp:gwcode\_categories} or any other tag doesn't do anything.

I'm running EE 2.7.3 and 1.8.9 for GWCode Categories.

Any ideas?

Thanks

# Answer
> -1 votes
Thanks for the input guys. I'm using MSM and needed to enter site\_id as a parameter into {exp:gwcode\_categories}.

That fixed it :)

# Answer
> 2 votes
Could you send your related code to help you with the GWCode Categories problem?

Are you using only ?

```
{exp:gwcode_categories}{/exp:gwcode_categories}

```

Only using this code will not display nothing. You have to put parameter and code inside to achieve your wish.

```
<ul>
{exp:gwcode_categories entry_id="19" style="linear"}
    <li>{cat_name}</li>
{/exp:gwcode_categories}
</ul>

```

---
Tags: gwcode-categories
---


title: Playa not rendering within a Stash List

text:
# Question
Title: Playa not rendering within a Stash List
The below code works just fine on it’s own, however as soon as I drop it into a stash list and call it later in my template no results are shown. Is this a parse issue?

```
{exp:channel:entries channel="brand" entry_id="108"}
         {exp:playa:children field="brand-category"}
             <p>{count} - Category Name: {title} | Category URL: /products/brand/microsoft/{url_title}</p>
         {/exp:playa:children}
  {/exp:channel:entries}

```

This is how it looks when stashed up:

Call Embed and Display Data:

```
{!-- Set Stash List --}
 {stash:embed name="_common:_data/test-category-list" stash:id="108" process="inline" parse="inwards"}

{!-- Get Stash List --}
 {exp:stash:get_list name="related-category-list"}
 {brand-name}
 {/exp:stash:get_list}

```

Embed File:

```
{exp:stash:set_list name="related-category-list" parse_tags="yes"}

 {exp:channel:entries channel="brand" entry_id="{stash:id}"}
  {exp:playa:children field="brand-category" parse="inward"}
            {stash:brand-name}{title}{/stash:brand-name}
        {/exp:playa:children}
 {/exp:channel:entries}

{/exp:stash:set_list}

```

# Answer
> 0 votes
Resolved it just needed to increase the depth of the list to "2" within the embed. Here is the code if anyone needs it.

Embed File:

```
{exp:stash:set_list name="related-category-list" parse_tags="yes" parse_depth="2"}

    {exp:channel:entries channel="brand" entry_id="{stash:id}"}
        {exp:playa:children field="brand-category"}
            {stash:category-name}{title}{/stash:category-name}
            {stash:category-url}{url_title}{/stash:category-url}
        {/exp:playa:children}
    {/exp:channel:entries}

{/exp:stash:set_list}

```

---
Tags: playa, stash
---


# Question
Title: Disable X-Frame-Options header in Channel Form
I have a site that, by necessity, needs to load into an iFrame on another site. Part of the site is a Channel Form however this page won't load into the iFrame because the X-Frame-Options header is being set. I see the addition of this header was an update in 2.5.

Does anyone know how I can stop this header from being set? I don't think I have any option other than to modify the Core but I can't find where it's being set.

# Answer
I have found where the header is being set...

It's within system/expressionengine/libraries/Cp.php:

```
73          // Make sure all requests to iframe the CP are denied
74:         ee()->output->set_header('X-Frame-Options: SameOrigin');

```
> 1 votes

---
Tags: safecracker, headers
---


# Question
Title: Stash and ce_cache, conditional caching?
I'm trying to cache some templates using ce\_cache and Stash. I can't get this to work, at the moment it's outputting nothing. My simplified 'model' code is something along the lines of:

```
{stash:embed:layouts:default stash:cache_tags="true"}

{exp:channel:entries status="not closed" disable="categories|category_fields|member_data|pagination|trackbacks"}
    {exp:stash:set name="content_full"}
       <h1>{title}</h1>
    {/exp:stash:set}
{/exp:channel:entries}

```

And the embed/view:

```
{if exp:stash:cache_tags}
 {exp:ce_cache:it tags="default"}
{/if}
{lv_head}
<body id="" class="">
    <div id="wrapper-main">
        {if {exp:stash:not_empty name="content_full"}}
            {exp:stash:content_full}
        {/if}
  </div>
{lv_footer}
{if exp:stash:cache_tags}
 {/exp:ce_cache:it}
{/if}

```

# Answer
I can't see how caching the layout is going to help you at all. It's just markup. You need to "cache" the tags that actually generate content and are expensive to run (i.e. the channel entries tag), as well as the rendering of the data (the layout). Therefore you need to wrap the `{exp:ce_cache:it}` tags around everything in the root template.

Also this..

```
{if exp:stash:cache_tags}

```

..is not a valid conditional.

Your stash embed variable can be used in the form `{stash:cache_tag}` and must be evaluated as a string, thus:

```
{if "{stash:cache_tags}" == "true"}

```

More on evaluating stash variables, and the difference between native and snippet variables here: https://github.com/croxton/Stash/wiki/Variables#ifelse-advanced-conditionals
> 1 votes

---
Tags: stash, ce-cache
---


title: Freemember ID number error

text:
# Question
Title: Freemember ID number error
I'm getting the following error using the password reset after following the email link:

> The form you submitted contained the following errors
>
> The ID number you submitted does not appear to be valid. Please check the link you followed.

Is this an EE problem or Freemembe? If Freemember what do I need to do to fix it?

Thanks,

Andrew

# Answer
I fixed this by adding the 'Reset password' tag. Not sure if there is another option.
> 0 votes

---
Tags: freemember
---


title: White line in footer of EE Admin CP

text:
# Question
Title: White line in footer of EE Admin CP
For a while, I seen a white line appear in the footer of my admin (see the screenshot). Can anyone tell me the best way to debug it?

# Answer
> 1 votes
Use a browser inspector and examine the generated source. Chrome's web inspector is ideal for this, just right click the line and select Inspect Element. This may give you a clue as to what is creating it.

---
Tags: admin
---


# Question
Title: If statement not working using a nested relationship field
I am having a bit of trouble with a relationshop field nested inside a grid.

I have the following data structure.

```
|-Products
|--product_where_to_buy (relationship field for partners)

|-Partners
|--partner_retail_urls (grid field)
|----product (relationship field with products)
|----url (url to purchase page)

```

What I want to do is filter the partner retail urls by product but it doesn't work no matter what I try.

This returns all results.

```
{product_where_to_buy status="open|closed"}
    {product_where_to_buy:partner_retail_urls search:product:title="product name"}
        <li><a href="{product_where_to_buy:partner_retail_urls:url}">{product_where_to_buy:title}</li>
    {/product_where_to_buy:partner_retail_urls}
{/product_where_to_buy}

```

This crashes the template parser

```
{product_where_to_buy status="open|closed"}
    {product_where_to_buy:partner_retail_urls}
        {if product_where_to_buy:partner_retail_urls:product:title == "product name"}
        <li><a href="{product_where_to_buy:partner_retail_urls:url}">{product_where_to_buy:title}</li>
        {/if}
    {/product_where_to_buy:partner_retail_urls}
{/product_where_to_buy}

```

Error

```
You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Unexpected ‘href’ (VARIABLE); expected RD in Template “products/index” on line 3.

```

Am I missing something or am i just going about it the wrong way?

# Answer
> -1 votes
It looks as if your code is missing the closing `</a>` tag.

---
Tags: relationships, conditionals, grid
---


# Question
Title: pagination: getting "first" to be the original page when paginate_base is different
I'm new to pagination, but not EE so much. I'm working on a site where the front page is basically short news items, preceded by one "featured" item. I'm limiting to 10 news items per page, so I'm using "paginate\_base" to indicate that for the following pages, I want a different template to be called (first page is "news" with the "featured" item, and following pages are on the template "continued," without the "featured" item).

It's working fine moving into old entries. But when I want to go back, I want the link for the "first" page to go back to the original "news" template, rather than the "continued" template. To try to be more clear, to go back to the template that has the "featured" item, whereas currently "first" takes me back to the "continued" template with the first news items.

Not sure if I'm explaining this clearly; but any thoughts on if I'm approaching this correctly would be appreciated!

# Answer
You might take a look at AB Pagination add-on that would give you much more control over how it's output, as well as pointing back to your original template page for the first page link.
> 2 votes

# Answer
AB Pagination was a bit more than I needed, so I wound up just adding an artificial "home" button on the pagination for the "continued" pages.
> -1 votes

---
Tags: pagination
---


title: EE MSM CE Image path incorrect

text:
# Question
Title: EE MSM CE Image path incorrect
I'm using EE 2.9.0 and CE IMG 2.4.5. The primary site has no issues with CE image and the secondary site works great except the secondary site is writing the images to the default site images directory.

```
// main config.php

$config['ce_image_src_regex'] = array(
'^http://cps.domain.org/' => '/chroot/home/siterootfolder/domain.org/html/cps/',
'^http://devwww.domain.org/' => '/chroot/home/siterootfolder/domain.org/html/devwww/'
);

$config['ce_image_document_root'] = '/chroot/home/siterootfolder/domain.org/html/devwww/';

// root index.php on sub-site
$assign_to_config['global_vars'] = array(); // This array must be associative
$assign_to_config['global_vars']['ce_image_document_root'] = '     /chroot/home/siterootfolder/domain.org/html/cps/';

```

The file path for the images is outputting, however, being written to the default site. I tried every variation of the above with no avail. Another thing worth mentioning is that these sites are hosted at Nexcess. I tried all the documentation for re: Nexcess. Still no luck.

# Answer
> 2 votes
I'm the author of CE Image and looked into troubleshooting this with Jon. We figured out that he had the correct config settings, but that index.php config settings were moved too far down in the index.php file. Moving the files up above the require\_once of the EE Bootstrap file solved the problem.

---
Tags: ee2, multi-site-manager, ce-image
---


# Question
Title: Does DevDemon subscriptions work for non logged in users?
There's nothing to say it won't, but for non-logged in users, nothing is rendered between any of the {subs} tags?

# Answer
Yes you are required to be a member to be a subscriber. The subscription is connect to their membership. In an upcoming version we will add the member creation to the subscription tag.

Brad
> 0 votes

---
Tags: devdemon, subscriptions
---


# Question
Title: P&T Playa update from 4.4.5 to 4.5.1 database error
This has been covered elsewhere for earlier versions but the solution doesn't seem to fix this issue. I'm getting the following error when I update from Playa 4.4.5 to 4.5.1, on EE 2.7.2:

```
A Database Error Occurred
enter preformatted text here`Error Number: 1060

Duplicate column name 'parent_element_id'

ALTER TABLE exp_playa_relationships ADD parent_element_id VARCHAR(255) NULL AFTER parent_var_id

Filename: third_party/playa/ft.playa.php

Line Number: 488

```

# Answer
> 1 votes
I had the same problem, setting the version number to 4.5 in exp\_fieldtypes should solve your problem. I modified the version number inside the EE database, inside this exp\_fieldtypes.

Related answers Playa upgrade error in EE 2.9

---
Tags: playa, pixelandtonic
---


# Question
Title: Get Channel Field Names from Channel Field IDs?
Is there an API that can get Channel Field Names being passed Channel Field IDs? I'm not looking for a third party solution. I can code a solution myself if that's the case.

# Answer
> 3 votes
no, is not such function in Channel Fields API (api\_channel\_fields-\>get\_settings is not worked as expected). So you can do query for now

```
$field_name = ee()->db->select('field_name')->where('field_id', '19')->get('channel_fields', 1);
echo $field_name->row()->field_name;

```

---
Tags: ee2
---


# Question
Title: How to make Freeform forms editable without using the entry_id in the URL
I want to still allow users to edit their freeform entries without being logged in, but I need some security so the entry ID isn't in the URL, or hashed so it's not easily guessed.

How is this possible? Seems it was missed during development but seems short sighted and the nature of forms are usually operated by unregistered members?

# Answer
First, for guests to be able to edit Freeform entries, you need to use the `restrict_edit_to_author="no"` parameter (http://www.solspace.com/docs/freeform/edit/#restrict\_edit\_to\_author) in your `{exp:freeform:edit}` form.

In your initial form, i.e. when using `{exp:freeform:form}` or `{exp:freeform:composer}`, make sure to have created and associated a field (eg. text or hidden) that will contain a random hash value. Let's call it `{my_unique_hash}` in this example.

In your form, make sure you have this field named `my_unique_hash` and have it filled with a hash value. You can create one using PHP, plugins, or other methods. The important thing is that the string is long enough and random enough for users to not be able to easily guess it. In this example, let's use the {csrf\_token} variable which creates this kind of string:

```
<input type="hidden" name="my_unique_hash" value="{csrf_token}" />

```

When the user submits the form, the `my_unique_hash` field value is also saved in the Freeform entry. You can then retrieve the Freeform entry corresponding to the value of this hash by using the `search:my_unique_hash=""` parameter in `{exp:freeform:entries}` (http://www.solspace.com/docs/freeform/entries/#search\_field\_name). Eg:

```
{exp:freeform:entries
     search:my_unique_hash="efd9f395ae6fdc0c9baa83af2c84f973f44948de"
     /* other parameters here */
}

```

You can have the hash in the URL, eg. `http://mysite.com/form/edit/efd9f395ae6fdc0c9baa83af2c84f973f44948de`, and feed the URI segment in `{exp:freeform:entries}`:

```
{exp:freeform:entries
    search:my_unique_hash="{segment_3}"
    /* other parameters here */
}

```

From `{exp:freeform:entries}`, you now have `{freeform:entry_id}`, which you can put in `{exp:freeform:edit}`. The code would look something like this:

```
{exp:freeform:entries
    search:my_unique_hash="{segment_3}"
    /* other parameters */ }

    {exp:freeform:edit
        entry_id="{freeform:entry_id}"
        restrict_edit_to_author="no"
        /* other parameters */ }

      // Your form

    {/exp:freeform:edit}

{/exp:freeform:entries}

```

This will give you an editable form that avoids using the entry\_id in the URL, and replaces it with a much harder-to-guess hash value.
> 2 votes

---
Tags: solspace, security
---


# Question
Title: Adding channel entries to a specific group in Friends
Is it possible to add channel entries to a group and let it respect the privacy settings of that group?

1. In other words: Allow the group creator to create content (channel entry) for a group.
2. If the group is private, then those channel entries respect that
3. If not private, then users can read/comment/interact with that channel entry.

Thanks!

# Answer
> 0 votes
# 1.

If you look at the example in the documentation (http://www.solspace.com/docs/friends/group\_entry\_add/#examples), you can see this dropdown to display groups when using the Group Entry Add form:

```
<select name="friends_group_id[]" multiple="multiple">
   {exp:friends:groups dynamic="off"}
       <option value="{friends_group_id}">{friends_group_title}</option>
   {/exp:friends:groups}
</select>

```

You could limit that list to group owners using the `{friends_group_owner_id}` parameter (http://www.solspace.com/docs/friends/groups/#friends\_group\_owner\_id):

```
<select name="friends_group_id[]" multiple="multiple">
   {exp:friends:groups dynamic="off"}
      {if logged_in_member_id == friends_group_owner_id}
          <option value="{friends_group_id}">{friends_group_title}</option>
      {/if}
   {/exp:friends:groups}
</select>

```

# 2.

The `private=""` parameter in {exp:friends:group\_entries} should allow you to not show entries from a private group. In the docs: http://www.solspace.com/docs/friends/group\_entries/#private

# 3.

See answer for #2. Commenting and interacting (I'm assuming editing?) with entries depends on the code you decide to put inside `{exp:friends:group_entries}`

---
Tags: solspace, solspace-friends
---


title: Action IDs, ACT URLs not working

text:
# Question
Title: Action IDs, ACT URLs not working
I'm using v2.8.1, and I'm having problems with ACT URLs. They don't seem to be working. The issue came up with DevDemon Channel Images, but I think it's related to Action IDs in general, as the logout is not working either. ACT URLs redirect to the homepage.

They work on my local site, which is a mirror of the remote and has the same .htaccess file.

I'm at a loss. I've tried adjusting the htaccess, and removing it, and clearing the cache, all with no luck. I'm hosted at hostgator, here's the htaccess file:

```
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/systemname/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

     AddType text/x-component .htc

```

Has anyone had any similar problems, or an approach for debugging? Thanks in advance for any help.

Update: When I add index.php to the ACT URL, it works... I'm assuming that I can update the HTACCESS file to get this working, but I'm not sure how.

# Answer
Here's the .htaccess line you're looking for:

> RewriteCond %{QUERY\_STRING} !^(ACT=.\*)$ \[NC\]

This is how my typical .htaccess looks like:

```
RewriteEngine On
RewriteBase /

# add the www
RewriteCond %{HTTP_HOST} ^alchemyviral.com
RewriteRule ^(.*)$ http://www.alchemyviral.com/$1 [R=301,L]

# Remove the trailing slash to paths without an extension
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{REQUEST_URI} /$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]

# Removes index.php from ExpressionEngine URLs
RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC]
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

```
> 0 votes

---
Tags: logout, action
---


# Question
Title: If Any Channel Entries tags - webpage unavailable
I've inherited a site from another developer and a very strange hosting setup (moving to a new host as soon as I can get the site working locally). I've finally managed to get the site almost working locally (it works fine live). I can login to the CP and make changes there.

The issue that I am having is with the front end. If there are channel entries tags anywhere on the page either the direct template or an embedded template I get a webpage is not available. It's not even a white page. See screenshot attached.

As soon as I remove/comment out channel entries tags the page loads fine. I've tried template\_debugging, output\_profiler, setting debug = 1 or 2 and nothing outputs anything on the front end to give a clue as to what is going on.

EE 2.7.2.

Any suggestions on how to troubleshoot this?

# Answer
First, disable gzip compression in the config (gzip\_output = 'n'): https://ellislab.com/expressionengine/user-guide/general/system\_configuration\_overrides.html#gzip-output

Then, look at the error that appears when refreshing the page :-)

(of course, $debug must be 1 for the error to show)
> 2 votes

# Answer
Turns out the issue is with a custom built module. Once I disabled that extension everything works fine. NOw trying to fix an addon that has no documentation. Fun.
> -1 votes

---
Tags: channel-entries, debugging, blank-screen
---


title: Freeform 4 - send from email field

text:
# Question
Title: Freeform 4 - send from email field
Is there a way in Solspace Freeform 4 to have the admin notifications sent "from" or "reply-to" the value an email field? That way when the admin receives a notice that a form had been submitted with a question, they can simply hit reply? I have a number of clients that forget to copy/paste the email in the body of the notification.

# Answer
you can use something like "{email}" in the reply-to field
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Can I turn off Discussion Forum Administrator notifications?
I'm set as the Administrator on a client's discussion forum. Certain employees are set as moderators and receive email notifications. I don't want to receive the notifications as the administrator. Any way to turn this off? I searched through the menus and couldn't find anything. Thanks!

# Answer
Are you talking about the "New Topics" / "New Reply" notifications? If so, just don't specify your email in "Admin Notification Preferences" when you "Edit" the forum in question in the CP. See screenshot.
> 0 votes

---
Tags: forum, notification, discussion
---


title: Multiple CartThrob installs on one site

text:
# Question
Title: Multiple CartThrob installs on one site
Is it possible to have more than one installation of CartThrob running on one site?

Reason - I need to have Quotes and Orders stored in different Channels.

Has anyone managed to achieve anything similar?

# Answer
> 0 votes
So in the end, to solve this requirement of having a Quote Basket and a Buy Basket using a single installation of CartThrob, I got Barrett Newton to write a custom extension. It seems to work really well so far..... :-)

# Answer
> 0 votes
Short answer no without using something like MSM.

But CartThrob can easily support multiple channels for products. You can also use categories to help seperate orders from quotes.

---
Tags: cartthrob, ecommerce, shopping-cart, install
---


title: No output on a Playa Low Variable

text:
# Question
Title: No output on a Playa Low Variable
I can't work this out and probably just need another set of eyes.

I have a Low Variable name lv\_book\_slider\_en which is a Playa field looking up a channel with specific category.

There are channel entries assigned to the LV, and the status is open.

When I call the variable as `{lv_book_slider_en}` within my template it spits out:

```
[285] [a-southern-girl-a-small-town-and-the-secret-of-a-good-life] A Southern Girl, a Small Town, and the Secret of a Good Life
[448] [blue-like-jazz-the-movie] Blue Like Jazz: The Movie
[4925] [a_call_to_action] A Call to Action
[5068] [antinomianism] Antinomianism

```

When I try to do:

```
{exp:low_variables:parse var="lv_book_slider_en"}

{title}
                                              {/exp:low_variables:parse}

```

I get nothing.

I've just found as I typed this that Transcribe seems to be the problem. If I disable that, I get output as expected. I know Transcribe builds relationships between language entries.

Unfortunately, right now, Transcribe is a core part of the build so can't really look to move.

Does anyone have insight here?

Thanks, Steven

# Answer
> 2 votes
You could try and use the `playa:children` tag instead of the Parse tag:

```
{exp:playa:children var="lv_book_slider_en"}
    {title}
{/exp:playa:children}

```

# Answer
> 2 votes
Adding to this, I had to put transcribe=“disable” inside of the Playa tag (not the ece loop) to get it to output. Credit goes to EE Harbor.

---
Tags: playa, relationships, low-variables, transcribe
---


# Question
Title: How to write a conditional in template code evaluating the result of a Low Variable containing a conditional?
I have the following line in my template code

```
    <li class="{if node_has_children}has-dropdown{/if}{if node_id == {lv-seg1-taxonomy-node-id}} is-lvl1-active{/if}">

```

The conditional that contains the Low Variable **{if node\_id == {lv-seg1-taxonomy-node-id}} is-lvl1-active{/if}** always returns true despite {node\_id} != {lv-seg1-taxonomy-node-id} when output into the template, and I always get the is-lvl1-active class.

The contents of the LV is:

```
{if segment_1 == 'youth'}41{if:elseif segment_1 == 'open'}42{if:elseif segment_1 == 'competition'}43{if:elseif segment_1 == 'theme'}44{if:elseif segment_1 == 'films'}45{if:elseif segment_1 == 'news'}46{if:else}{/if}

```

The Low Variable is set to early parse. How do I compare its output to a tag in the main template?

# Answer
> 1 votes
If I understand you correctly, the content of the `lv-seg1-taxonomy-node-id` variable is that big `if`-statement. Then you're using the LV as part of another conditional: the one in your first example.

This will not work because of Parse Order.

Your variable is set to parse early, which means the template will change this:

```
{if node_id == {lv-seg1-taxonomy-node-id}}

```

to this:

```
{if node_id == {if segment_1 == 'youth'}41{if:elseif segment_1 == 'open'}42{if:elseif segment_1 == 'competition'}43{if:elseif segment_1 == 'theme'}44{if:elseif segment_1 == 'films'}45{if:elseif segment_1 == 'news'}46{if:else}{/if}}

```

Which is an invalid conditional.

Early parsed vars, like Snippets, **will not evaluate before hitting the template**. Instead, the variable name is replaced by its contents.

You will have to find a different way to set the class name.

---
Tags: low-variables, low
---


# Question
Title: Solspace Super Search - Export Search Log
Is there a way to export the search log from Solspace Super Search's control panel to save as a file? I'd like to be able to save previous results before clearing the log.

# Answer
> 1 votes
I had to do this before and there doesn't seem to be a way from the interface. I did it by going into phpmyadmin and then into the EE database.From here search for the exp\_super\_search\_terms.Once you find the table you can use the export function and export the search terms to CSV or what ever you want.

---
Tags: solspace, supersearch
---


title: Wygwam Ordered List Properties

text:
# Question
Title: Wygwam Ordered List Properties
Is it possible to access the ordered list properties field in Wygwam? It is not there by default and I don't see any options in the Editor Configurations dropdown that would add it.

This is what I am trying to do...

http://devnet.kentico.com/questions/creating-alphabetical-list-in-ckeditor

# Answer
The only way to do it is through an addon from ckeditor . The plugin you want is here

http://ckeditor.com/addon/liststyle

Instructions from the pixel and tonic site on how to add a plugin to Wygwam

http://docs.pixelandtonic.com/wygwam/developers/ckeditor\_plugins.html

It not very clear so here are more detailed instructions

Adding CKEditor Plugins to Wygwam

Thanks Brian
> 1 votes

---
Tags: wygwam, ckeditor
---


# Question
Title: ExpressionEngine control panel shows raw source
this is happening randomly, but when I go to my login page, it sometimes just shows

on other occasions, I tried to view the filemanager but got a page with

```
{"rows":[{"file_id":"686","title":"logo220.png","file_name":"<a href=\"http:\/\/www.xyz.org\/images\/uploads\/emails\/logo220.png\" class=\"less_important_link overlay\" id=\"img_logo220png\" rel=\"#overlay\">logo220.png<\/a>","mime_type":"image\/png","upload_location_name":"emails","upload_date":"2014-10-20 03:43 PM","_actions":"<a href=\"loginURL.php?

```

it doesn't happen all the time so I'm a bit stumped.

does anyone have experience with that?

EDIT: it's happening on a couple of our sites now (on mediatemple's grid service) and sometimes, the login screen just shows "C=login"

# Answer
turns out it was an issue related to the host: media temple offers different versions of PHP and the 'fastCGI' version can cause these issues. I switched to the 'stable' version and the issue disappeared.
> 1 votes

# Answer
Check the integrity of your installation. It is likely that some files in themes folder are missing or corrupt (the best thing is to re-upload the whole of CMS files, making sure to not overwrite configs of course)
> 0 votes

---
Tags: control-panel, ee
---


title: Alternatives to Structure add-on?

text:
# Question
Title: Alternatives to Structure add-on?
I've been using Structure to build EE sites for a long time, but on my biggest site I've run into a recurring Structure bug that they can't seem to reproduce or fix and it looks like I'll have no choice but to redevelop parts of the site using an alternative add-on that's more stable for me needs.

For those interested, here's the catastrophic bug I've been encountering: https://structure.tenderapp.com/discussions/problems/7616-all-entries-in-structure-managed-channel-suddenly-closed-and-all-structure-data-lost/page/1

So, is there a good alternative to Structure that would allow me to easily view managed pages in a nice Structure like page tree, and something that also provides per-page template selection and templategroup/template URL independence?

# Answer
> 2 votes
I also use Structure for a long time but I'm now trying NavEE and I must say it looks great. I follow your problem with Structure for a while now and that's why i am looking for an alternative to Structure.

# Answer
> 2 votes
If you're using Structure mostly for navigation, Taxonomy can be of help: http://devot-ee.com/add-ons/taxonomy

# Answer
> 1 votes
Try the built in Pages module. The UI isn't quite the same as Structure but you can see a tree like layout of the site if you wish. In reality I've found that nobody has really missed Structure's apparent convenience.

# Answer
> 1 votes
We use a combination of Low Reorder and Categories to enable the client to easily place and manage entries where they want in the navigation structure.

In this fairly simple example we have the following fixed top level menu items.

Corporate / Investor Centre / Projects / Contact / Home

Corporate, Investor Center and Projects draw entries from the same channel.

We have corresponding categories attached to the channel - Corporate, Investor Center and Projects.

When the client creates or manages an entry they can check the relevant category, for example "Corporate".

Low Reorder is used so that there is a "set" for each menu item - Corporate, Investor Center and Projects

Each Low Reorder set draws entries from the channel and filters them with entries that have been tagged with the relevant Category.

The client can happily reorder the entries and this is reflected on the front end. It is also easy for them to have an entry appear under a different menu by simply checking a different category when they edit an entry.

# Answer
> 0 votes
For the record, this bug can't be replicated and we haven't experienced such issues with other customers. I wish there was a way for us to get this working for you.

---
Tags: structure, pages, page-uri
---


title: Cartthrob Subscriptions…

text:
# Question
Title: Cartthrob Subscriptions…
I notice Cartthrob has a message up on the site about putting Subscriptions on hold. But the site still has a Buy Now feature on the subscriptions page... Is Subscriptions up and running again?

I want to use Cartthrob for both shop, but very importantly annual subscriptions. Is this not possible currently? (It is a project that needs completed in Aug, so a bit of a rush)

There is no automatic billing or the likes, simple the user subscribes for a year, and is notified when the subscription expires. There will also be products for sale separate to this, hence why I am interested in using Cartthrob.

# Answer
> 1 votes
As someone who has implemented a site using CartThrob & Subscriptions, I'd suggest you find an alternative. It's incredibly buggy and incomplete, and has caused us no end of headaches.

---
Tags: cartthrob, subscriptions
---


# Question
Title: Upgrading from EE1 to EE2 - How do I manage the add-ons part of the process?
I'm trying to updgrade from EE1.7.1 to EE2.9.2 by following the steps outlined in the documentation here https://ellislab.com/expressionengine/user-guide/installation/upgrade\_from\_1.x.html

The process seems straightforward enough, and I have run through it as a test and it seemed to work (except for addons). To my mind the biggest problem that I have is that I have no idea how to tackle this note right at the top of the upgrade page.

`IMPORTANT
Third-party add-ons from version 1.x will not work with ExpressionEngine 2. Please contact each add-on’s author for a 2.x-compatible version before upgrading, or your site may not function properly. The installer will automatically disable all extensions as part of the upgrade process.`

How do I work out exactly what addons I have and who the author of each addon is? And what happens if there isn't a 2.x compatible version available?

Has anyone put together a more detailed how to guide on the upgrade process somewhere?

# Answer
> 1 votes
You should look the at the folder `system/plugins/`, which is where EECMS 1 keeps its plugins, and look for the name of each plugin or a readme file. The best place to look for new versions is devot-ee. Almost all EECMS add-ons can be found there.

The EECMS 2 plugins are separated into 4 categories:

* fieldtypes;
* accessories;
* modules;
* plugins.

All of the them should be saved on the folder `system/expressionengine/third_party`.

Every add-on have its own update process. Probably for a lot of them, it's just to upload its folder and install it on CP.

---
Tags: ee1, upgrade, ee2-upgrades, addons
---


title: Portfolio extension?

text:
# Question
Title: Portfolio extension?
I'm searching EE2 mod for portfolio with categories, images, descriptions and custom fields... Who know EE2 mod like this? I will need to create more categories with sub categories, with description, images, many custom fields (like url, type of work etc...)

# Answer
Yes, the perfect module you want is called ExpressionEngine!

Everything you list is done natively.

New Channel = "Portfolio"

New Category Group called "Portfolio"

Categories as relevant with parents and children

New Field Group containing:

* "Description" - Rich text field (or third-party wysiwyg)
* "Images" - Grid field with columns for image title, alt text, link and file
* "Type of Work" - Rich text field
* "Customer" - Text field
* "URL" - text field or if you want validation a URL fieldtype

etc, etc, etc.

**Update**

Tags - you could use Tagger to select tags on the backend and render them to the frontend. You could use another category group called "tags" that you create categories for. Or a radio select list to choose from in the form of Field Pack

Question is did you want to use the tags for people to search on (so a fieldtype like tagger or FieldPack would be easier), or filter on in the listing - any of these will do the job, although categories may then be easier and more flexible. Either way, there's plenty of ways and options.
> 4 votes

---
Tags: ee2, ee2-upgrades
---


title: Third party Forum Integration

text:
# Question
Title: Third party Forum Integration
Since the EllisLab Discussion Forum addon is not really actively maintained, and basically one needs to buy the Scaffold theme in addition, to make it a bit 2014-ish ($140 total costs), it seems like not the way to future proof a new website.

I was wondering if someone else out there has successfully integrated *any* other forum software successfully? Vanilla, vBulletin, phpBB, basically anything will do.

But I need my members to discuss things, without adding another layer of registration hassles.

Alternatively: if anyone still has a good experience after-all with the current Discussion Forum module anyway, I'd be happy to hear that too.

Any tips or pointers are very welcome!

# Answer
I've never fully understood why EllisLabs opted for building a completely separate module for forums when the structure of ExpressionEngine can be used to create fully bespoke forums.

You have a channel called forums, pre-defined categories for sections of the forum - so mimicking EE's own forums, you have a parent category of "ExpressionEngine 2" and 2 child categories "Community Support" and "Development & Programming". Then using frontend entry forms, allow users to post (either as a visitor or ensure they've logged in first). When a user creates a "new topic", they have to select from your custom form submission a relevant category and it creates an entry. Then anyone wanting to reply, it's a comment.

As the official EE forums, you can display the author, the total views, the total replies and the last reply (comment). The search can be built to only target that channel.

You can set it to automatically email the owner of the topic and obviously when someone replies (comments), they can also subscribe to alerts. You can even allow people to subscribe to a thread (entry).

You can use richer third-party wysiwyg editors, instead of the basic EE one, you can add better image upload, with more controls, you can utilise smiley implementation and much, much more.

All the above inclusive of the original EE license without additional cost. I'm not sure how much extra effort would be involved in doing it this way versus native forum module, but considering the difficulty in customising the forum's appearance and the control you'd get from native entries, the EE template route would win me over every time.

And using this add-on, you could even allow for threaded ~~comments~~ \- sorry topic "replies".
> 4 votes

# Answer
I don't have any personal expirience with those add-ons, but there are bridges for Vanilla and vBulletin
> 1 votes

---
Tags: forum, discussion
---


# Question
Title: Member groups different for subscriptions?
I'm migrating away from CartThrob/Subscriptions because it is essentially defunct (they terminated their Subscriptions product).

We've purchased DevDemon Subscriptions, and I'm starting to implement it. I have a client's website that has a subscription service that offers access to various RSS feeds based on their subscription level.

I like the way the Actions are set up, but there doesn't appear to be a way to change what is done depending on the subscription? For instance, if people subscribe to XXXX, we want to change their member group to one that allows access to a particular RSS feed page.

If they have a subscription to YYYY, we want to change their member group to a DIFFERENT group, which has access to different RSS feeds.

It unfortunately has to be done this way because third party products like iTunes can use the simple http auth to access RSS feeds, and we can set up group-based permissions for them in EE, but they can't load web pages to parse EE tags, etc.

From what I can see in Subscriptions, there's no way for us to do this, correct? All I'd want is the ability to specify a different set of triggers for each subscription.

# Answer
Previous version only allowed you to change to one member group. This has since been changed and plans can have their own action to change to different member groups.
> 0 votes

---
Tags: devdemon, subscriptions
---


title: MX Zip Files Not Working

text:
# Question
Title: MX Zip Files Not Working
I'm using the exp:channel:entries tag to add files to a zip folder, but when I try to download the zip file, I get the following error:

Error : PCLZIP\_ERR\_MISSING\_FILE (-4) : File 'http:/www.domain.com/file\_name.pdf' does not exist

However, if I go to: http:/www.domain.com/file\_name.pdf, the file does exist and is shown.

Any thoughts?

Here are my tags:

```
{exp:zip direct_output="no" filename="project_package.zip" comment="Project Package" remove_path="" add_path=""}
{zip:files}
{exp:channel:entries disable="categories|member_data|pagination" limit="1"}
{project_package}
    [{project_package:project_item}]
{/project_package}
{/exp:channel:entries}
{/zip:files}
{/exp:zip}

```

Thanks in advance!

# Answer
> 1 votes
You need to add absolute paths or relative paths. It will not work with urls.

---
Tags: mx-zip
---


# Question
Title: Adding custom field type to Rating from Solspace
EE 2.9.2 Rating 3.3

I would like to add a custom field type, such as a Wygwam or RTE so that the comments field can have some formating controls. Just the basic ones, bold, italic etc.

Is it possible to add a custom field type to Rating?

Is it possible to add formatting controls to the textarea field?

# Answer
> 0 votes
I assume by "custom field type", you mean *EE Channel Entry Custom Fields*. Since ratings are not channel entries, this isn't possible, since Wygwam, RTE, etc are *Channel Entry* fields, not *Rating* fields.

However, you could add a WYSIWYG to a textarea field in your template manually by loading on of the WYSIWYG plugins available on the net. There are many available, including CKEditor, TinyMCE, and Redactor. Make sure to respect the use license for these plugins as well.

---
Tags: solspace, solspace-rating
---


title: Stash forgetting value

text:
# Question
Title: Stash forgetting value
I have a plugin which is setting the value of a stash variable based on segment URIs.

on my redir/index.html template, I have `{exp:hippo_functions:redir}` and the contents of my function (stripped) is:

```
$params = array(
    'name' => 'delivery_day',
    'scope' => 'user'
);

Stash::set($params,$days['delivery_date']);

ee()->functions->redirect( ee()->functions->create_url($location) );

```

I've checked the value of the the 'delivery\_day' stash immediately after setting it with `Stash::get('delivery_day');` and it's returning the correct value, however on my redirected page - I have a separate function which checks the validity of the date using the same `Stash::get('delivery_day');` call, however this time the value is empty.

Why isn't the value persisting across pages? I presumed it was the scope, which was why I set it to user - but could it be something else?

# Answer
> 1 votes
Thanks to Croxton for the answer... I needed to add `save => 'y'` to the params array.

---
Tags: add-on, stash, plugin
---


# Question
Title: Send email from EE template with file get contents
I’m creating a custom ext. that handles form submission + email sending. When a form or reservation has been made the data is put in EE and 2 emails are being send. One email to the client and one to the admin. Sometimes my sendMail function doesn’t send the body of the first email and I’m getting an empty email. The body of the email is an EE template loaded with file\_get\_contents. When I add sleep(2) (delay execution) before the emails are send it works fine. I have no idea what the problem is.

Maybe I should do this in another way? Hope you guys can help me out.

```
public function template_fetch_template($row)
{
    // -------------------------------------------
    // Get the latest version of $row
    // -------------------------------------------
    if (ee()->extensions->last_call !== FALSE)
    {
        $row = ee()->extensions->last_call;
    }

    if (ee()->uri->segment(1) == "reservation")
    {
        $this->reservation();
    }

    return $row;
}

private function reservation()
{

    static $run;
    if ($run) return;

    if (ee()->uri->segment(1) == "reservation" && ee()->uri->segment(2) != "" && ee()->uri->segment(3) == "")
    {
        if (count($_POST))
        {
            $naam = $_POST["naam"];

            ee()->session->create_new_session(2);
            ee()->session->fetch_session_data();
            ee()->session->fetch_member_data();

            $channel_id = 21;

            ee()->load->library('api');
            ee()->api->instantiate('channel_entries');
            ee()->api->instantiate('channel_fields');

            $data = array(
                'entry_id'=> 0,
                'title'=> $naam,
                'entry_date'    => time(),
                'edit_date'     => time(),
                'member_id'     => 2
            );

            ee()->api_channel_fields->setup_entry_settings($channel_id, $data);
            if (ee()->api_channel_entries->save_entry($data, $channel_id))
            {
                $entry_id = ee()->api_channel_entries->entry_id;

                sleep(2);

                // CLIENT EMAIL
                $this->sendMail("e-mail","client_".$this->res_email_template, $entry_id, “xxx@xxx.be”, "Client Reservatie ". ee()->config->_global_vars['site'] . " " . $entry_id);
                // ADMIN EMAIL
                $this->sendMail("e-mail","admin_".$this->res_email_template, $entry_id, “xxx@xxx.be, "Admin Reservatie ". ee()->config->_global_vars['site']. " " . $entry_id);

                ee()->functions->redirect("/".ee()->uri->segment(1)."/".ee()->uri->segment(2)."/".$entry_id);
            }
        }
    }

    $run = true;
}

private function sendMail($template_group, $template, $entry_id, $to_email, $subject)
{
    $config = Array(
          'protocol' => 'smtp',
          'smtp_host' => 'smtp.priorweb.be',
          'smtp_timeout'=>30,
          'smtp_port' => 587,
          'mailtype' => 'html',
          'charset' => 'utf-8',
          'wordwrap' => FALSE
        );

    ee()->email->clear();
    ee()->load->library('email', $config);
        ee()->load->helper('text');
        ee()->email->mailtype = 'html';
        ee()->email->from(‘xxxx@xxxx.be');
        ee()->email->to($to_email);
        ee()->email->subject($subject);
        ee()->email->message(entities_to_ascii(file_get_contents(ee()->config->site_url().ee()->publisher_lib->lang_code."/".$template_group."/".$template."/".$entry_id, FILE_USE_INCLUDE_PATH)));

        ee()->email->send();

        if ( ! ee()->email->send())
    {
            // Send failed, data was not cleared
            ee()->email->clear();
    }
}

```

/\*****/ EMAIL TEMPLATE SOME HTML WITH THIS TAG

```
{exp:channel:entries channel="reserveer_berichten" limit="1" dynamic="off" entry_id="{segment_3}"}
    {title}
{/exp:channel:entries}

```

# Answer
> 0 votes
Have you considered using existing add-ons?

Freeform allows you to create forms on the frontend that store the submission in the database, has a Control Panel interface and allows for email sending (and customising the templates) to both the customer and admin. You can pass custom values from the form to be included in the email I believe.

Assuming you want to store the form data (reservation) in your own DB table, you can send them to another URL/template as a confirmation and trigger Email from Template, which allows you to send off an email using the content of a template (which could be populated by the form data they'd just entered).

Without actually solving your direct question as to why it works with the sleep and not without, I would express concern about the security of your code - at a basic level you're not checking for the validity of "naam", without reading up, I'm not sure if the API call makes security checks or assumes the data has already been sanitised (so possibly leaving the database open for injection) or more likely will your code allow the form to be used as a bot mailer?

---
Tags: add-on-development, email, extension, parsing
---


title: Content Elements Ordering

text:
# Question
Title: Content Elements Ordering
I can’t seem to figure out how to do this correctly.

I’m using Content Elements as a field and stashing those values as you would typically do in a Stash list. However, when I call that list the sequence of what is being outputted seems to match the sequence in my code and not in the published entry.

Setting the list:

```
{exp:stash:set_list name="h" parse_tags="yes" parse_depth="2"}
  {h}

   {heading}
             {stash:h_header}{value}{/stash:h_header}
         {/heading}

   {wygwam}
       {stash:h_wygwam}{value}{/stash:h_wygwam}
   {/wygwam}

   {assets}
       {files}
        {stash:h_assets}{url}{/stash:h_assets}
        {stash:h_assets_alt}{alt_text}{/stash:h_assets_alt}
       {/files}
   {/assets}

  {/h}
{/exp:stash:set_list}

```

My template:

```
{if segment_1 == "about"}
 <div class="row">
  <div class="small-12 columns">
   {exp:stash:get_list name="h"}
    {count}
    {if h_header != ""}{h_header}{/if}
    {h_wygwam}
    {if h_assets != ""}<img src="{h_assets}"alt="{h_assets_alt}">{/if}
   {/exp:stash:get_list}
  </div>
 </div>

{/if}

```

Based on the above the {h\_header} always gets listed first even though it might not actually be the first entry in the list. Hope this makes sense.

I have a feeling I’m not doing this correctly in Stash and not in Content Elements.

Thanks for the help.

# Answer
> 1 votes
Managed to resolve this with the help from Mark Croxton.

Using a list target each content type with the same variable name. Example below:

```
{exp:stash:set_list name="content-section-1" parse_tags="yes" parse_depth="2"}

  {c}

    {heading}
              {stash:content}{value}{/stash:content}
          {/heading}

    {wygwam}
        {stash:content}{value}{/stash:content}
    {/wygwam}

    {assets}
        {files}
         {stash:content}<img src="{url}" alt="{alt_text}" />{/stash:content}
        {/files}
    {/assets}

  {/c}

{/exp:stash:set_list}

```

---
Tags: stash, content-elements
---


title: Solspace Calendar Archives?

text:
# Question
Title: Solspace Calendar Archives?
Does anyone know if/how I can create a "yearly" archives list with Solspace Calendar? I've tried searching the web and can't find anything that works. I want to only display the years where there are events in the year.

Theoretically, this code should work:

```
{exp:calendar:cal event_id="{embed:ids}" date_range_end="today" show_years="30" dynamic="off"}
  {display_each_year}
    <li>{date format="%Y"} - {year_event_total}</li>
  {/display_each_year}
{/exp:calendar:cal}

```

But when I use this on my page, it only shows a single year (with the year of the `show_years` param), and the `{year_event_total}` tag doesn't seem to be populating correctly.

So for my local test, I have 3 events in my system. One from last year, another coming up next week and another even dated out 1 year in the future. I expect to see:

* 2013 - 1
* 2014 - 1
* 2015 - 1

But I am only getting:

* 1985 - 1

Even though no events are in the system beyond the scope of what I mentioned earlier.

Also, the `{embed:ids}` in my code above is a piped list of ID's related to an entry in another channel using Playa. You can remove that code because it doesn't seem make any difference in the results. But my plan is to use it as a filter.

Any help would be appreciated!

# Answer
This is a confirmed bug. Unfortunately, we don't have an ETA for a fix.

In the meantime, a workaround could be to repeat `{exp:calendar:cal}` individually for each year. The `{exp:calendar:date}` tag can be used to make calculations such as knowing what year is next year, what year is 2 years from now, etc: http://www.solspace.com/docs/calendar/date/
> 0 votes

---
Tags: playa, solspace-calendar, calendar, events
---


# Question
Title: Creating repeat orders in Cartthrob - Tips/Practices
Just wondering if anyone has any experience with creating repeat orders in Cartthrob and cares to share how they achieved this (or any obvious gotchas). I ask because there doesn't appear to be anything in Cartthrob's docs with points to this functionality, so I want to make sure it's actually achievable.

To clarify what I'm trying to achieve: I have products in a number of channels (about 4 channels) which the customer can add to their basket and purchase. If they choose to create an account (or are signed in) they can then view previous orders. What I would like the customer to be able to do is view a previous order and then be able to rebuild their basket from this previous order. From the basket they would be able to do the usual stuff like change the quantity and delete individual items.

# Answer
This is a barebones example, but hopefully it gets you on the right track:

```
<table>
  <caption>My Order History</caption>
  <tbody>
  {exp:channel:entries channel="orders" dynamic="no" author_id="CURRENT_USER"}
    <tr>
      <td>{title}</td>
      <td>{entry_date format="%Y-%m-%d %H:%i:%s"}</td>
      <td>
      {exp:cartthrob:multi_add_to_cart_form return="cart/basket"}
        {exp:cartthrob:order_items order_id="{entry_id}" variable_prefix="item:"}
        <input type="hidden" name="entry_id[{item:row_order}] value="{item:entry_id}" />
        <input type="hidden" name="quantity[{item:row_order}] value="{item:quantity}" />
        {/exp:cartthrob:order_items}

        <input type="submit" value="Repeat this order" />
      {/exp:cartthrob:multi_add_to_cart_form}
      </td>
    </tr>
  {/exp:channel:entries}
  </tbody>
</table>

```
> 3 votes

# Answer
I don't think a plugin is needed for this. You can retrieve the item options from the order itself without a plugin and I think that's maybe the better approach to avoid having to maintain an extra plugin. But maybe I am missing something.

This is a somewhat overcomplicated and not really 100% finished example I am quickly pulling from work in progress. I have two separate channels with complex variation products, but should give the idea - it's a combo display previous order details/re-order items template.

Let me know if it's not clear enough.

I am using stash models of various product details but they should be reasonably obvious.

MODEL:

{exp:channel:entries channel="orders" entry_id="{stash:e_id}"  status="not closed" dynamic="no" parse="inward"}

```
{!-- Order Data - later: change to all one set call --}
{exp:stash:set name="order_title"}{title}{/exp:stash:set}
{exp:stash:set name="order_entry_id"}{entry_id}{/exp:stash:set}
{exp:stash:set name="order_url_title"}{url_title}{/exp:stash:set}
{exp:stash:set name="order_status"}{status}{/exp:stash:set}
{exp:stash:set name="order_vault_id"}{order_vault_id}{/exp:stash:set}
{exp:stash:set name="order_subscription_id"}{order_subscription_id}{/exp:stash:set}
{exp:stash:set name="order_payment_gateway"}{order_payment_gateway}{/exp:stash:set}
{exp:stash:set name="order_ip_address"}{order_ip_address}{/exp:stash:set}
{exp:stash:set name="order_last_four"}{order_last_four}{/exp:stash:set}
{exp:stash:set name="order_transaction_id"}{order_transaction_id}{/exp:stash:set}
{exp:stash:set name="order_billing_last_name"}{order_billing_last_name}{/exp:stash:set}
{exp:stash:set name="order_billing_company"}{order_billing_company}{/exp:stash:set}
{exp:stash:set name="order_billing_country"}{order_billing_country}{/exp:stash:set}
{exp:stash:set name="order_country_code"}{order_country_code}{/exp:stash:set}
{exp:stash:set name="order_shipping_first_name"}{order_shipping_first_name}{/exp:stash:set}
{exp:stash:set name="order_shipping_last_name"}{order_shipping_last_name}{/exp:stash:set}
{exp:stash:set name="order_shipping_address"}{order_shipping_address}{/exp:stash:set}
{exp:stash:set name="order_shipping_address2"}{order_shipping_address2}{/exp:stash:set}
{exp:stash:set name="order_shipping_city"}{order_shipping_city}{/exp:stash:set}
{exp:stash:set name="order_customer_email"}{order_customer_email}{/exp:stash:set}
{exp:stash:set name="order_language"}{order_language}{/exp:stash:set}
{exp:stash:set name="order_full_billing_address"}{order_full_billing_address}{/exp:stash:set}
{exp:stash:set name="order_full_shipping_address"}{order_full_shipping_address}{/exp:stash:set}
{exp:stash:set name="order_billing_first_name"}{order_billing_first_name}{/exp:stash:set}
{exp:stash:set name="order_billing_address"}{order_billing_address}{/exp:stash:set}
{exp:stash:set name="order_billing_address2"}{order_billing_address2}{/exp:stash:set}
{exp:stash:set name="order_customer_phone"}{order_customer_phone}{/exp:stash:set}
{exp:stash:set name="order_discount"}{order_discount}{/exp:stash:set}
{exp:stash:set name="order_customer_full_name"}{order_customer_full_name}{/exp:stash:set}
{exp:stash:set name="order_coupons"}{order_coupons}{/exp:stash:set}
{exp:stash:set name="order_shipping_option"}{order_shipping_option}{/exp:stash:set}
{exp:stash:set name="order_tax"}{order_tax}{/exp:stash:set}
{exp:stash:set name="order_shipping_plus_tax"}{order_shipping_plus_tax}{/exp:stash:set}
{exp:stash:set name="order_shipping"}{order_shipping}{/exp:stash:set}
{exp:stash:set name="order_subtotal_plus_tax"}{order_subtotal_plus_tax}{/exp:stash:set}
{exp:stash:set name="order_subtotal"}{order_subtotal}{/exp:stash:set}
{exp:stash:set name="order_billing_city"}{order_billing_city}{/exp:stash:set}
{exp:stash:set name="order_billing_state"}{order_billing_state}{/exp:stash:set}
{exp:stash:set name="order_billing_zip"}{order_billing_zip}{/exp:stash:set}
{exp:stash:set name="order_total"}{order_total}{/exp:stash:set}
{exp:stash:set name="order_error_message"}{order_error_message}{/exp:stash:set}
{exp:stash:set name="order_shipping_country_code"}{order_shipping_country_code}{/exp:stash:set}
{exp:stash:set name="order_shipping_country"}{order_shipping_country}{/exp:stash:set}
{exp:stash:set name="order_shipping_company"}{order_shipping_company}{/exp:stash:set}
{exp:stash:set name="order_shipping_zip"}{order_shipping_zip}{/exp:stash:set}
{exp:stash:set name="order_shipping_state"}{order_shipping_state}{/exp:stash:set}
{exp:stash:set name="order_authorize_id"}{authorize_id}{/exp:stash:set}
{exp:stash:set name="order_notes"}{order_notes}{/exp:stash:set}

```

{/exp:channel:entries}

{!-- Line Items Data, including the auto responder text! --}
{exp:stash:set_list name="order_items" parse_tags="yes" parse_conditionals="yes" parse_depth="10" debug="yes"}

```
{exp:cartthrob:order_items order_id="{stash:e_id}"}

            {exp:stash:append name="order_item_ids"}{entry_id}|{/exp:stash:append}
            {stash:item_id}{entry_id}{/stash:item_id}
            {stash:item_title}{title}{/stash:item_title}
            {stash:item_quantity}{quantity}{/stash:item_quantity}
            {stash:item_price}{price}{/stash:item_price}
            {stash:item_price_inc}{price_plus_tax}{/stash:item_price_inc}
            {stash:item_price_inc_numeric}{price_plus_tax_numeric}{/stash:item_price_inc_numeric}
            {stash:item_weight}{weight}{/stash:item_weight}
            {stash:item_site_id}{site_id}{/stash:item_site_id}
            {stash:item_channel}{channel}{/stash:item_channel}
            {stash:item_subtotal}{subtotal}{/stash:item_subtotal}
            {stash:item_subtotal_numeric}{subtotal_numeric}{/stash:item_subtotal_numeric}
            {stash:item_subtotal_plus_tax}{subtotal_plus_tax}{/stash:item_subtotal_plus_tax}
            {stash:item_subtotal_plus_tax_numeric}{subtotal_plus_tax_numeric}{/stash:item_subtotal_plus_tax_numeric}

            {item_options}
                 {if "{option_label}"=="Variations"}
                    {stash:item_option_variation_name}{option_name}{/stash:item_option_variation_name}
                    {stash:item_option_variation_value}{option_value}{/stash:item_option_variation_value}
                 {/if}
                 {if "{option_label}"=="Notes"}
                    {stash:item_option_notes}{option_value}{/stash:item_option_notes}
                 {/if}
            {/item_options}

{/exp:cartthrob:order_items}

```

{/exp:stash:set_list}

(there's also a model to get extra product info if needed like pictures etc)

VIEW:

{exp:stash:set name="cart_reorder" type="snippet" parse="no"}

```
{exp:cartthrob:multi_add_to_cart_form return="/cart"}

<table>

    <thead>
        <tr>
            <th></th><th>Qty.</th><th>Item</th><th>Price<th>Subtotal</th><th>Re-Order Qty.</th>
        </tr>
    </thead>

    <tbody>

{!-- this list has all the info from cartthrob order_items--}
{exp:stash:get_list name="order_items" parse_tags="yes" parse_depth="5" sort="desc" orderby="item_price_inc_numeric" sort_type="numeric"}

    <tr>
            {!-- filled by product model, has picture, link etc --}
            {exp:stash:get_list:nested name="extended_product_info" parse_tags="yes" parse_depth="10" debug="yes" match="#{item_id}#" against="product_entry_id" unique="product_entry_id"}

        <td align="center">

            {if product_master_image}
                {exp:ce_img:pair src="{product_master_image}" max="100" crop="no" parse="inward"}
                    <img src="{made_url}" width="{width}" height="{height}">
                {/exp:ce_img:pair}
            {/if}

        </td>
        <td>{item_quantity}</td>
        <td><a href="{exp:stash:get name='relative_url_{urlt}'}">{item_title}</a> ({item_id})<br>

                   {exp:switchee variable="{product_channel_short_name}" parse="inward" debug="yes"}
                        {case value="product_inkjet_paper"}
                            {item_option_variation_name}   <small>({item_option_variation_value})</small>
                        {/case}
                        {case value="service"}
                            {item_option_variation_name}   <small>({item_option_variation_value})</small>
                            <br><br>Notes (which you can change if re-ordering):<br><textarea rows="3" cols="50" name="item_options[{product_entry_id}][cf_service_notes]"  value="">{item_option_notes}</textarea>
                        {/case}
                        {case default="yes"}
                            <small>{product_sku}</small>
                        {/case}
                    {/exp:switchee}
               {exp:switchee variable="{product_channel_short_name}" parse="inward" debug="yes"}

                       {case value="product_package"}
                        <br><br><em>Contents:</em><br><small>

                            {exp:stash:get_list:nest2 name="pkg_items_{item_id}"}
                                {pkg_product_title} <br>
                            {/exp:stash:get_list:nest2}
                            </small>
                        {/case}
                    {/exp:switchee}
        </td>
        <td>
        {item_price_inc}
        </td>
        <td>
        {item_subtotal_plus_tax}
        </td>
        <td align="center">
           {exp:switchee variable="{product_channel_short_name}" parse="inward" debug="yes"}
                {case value="product_inkjet_paper"}
                    <input type="hidden" name="item_options[{count}][cf_paper_variations]" size="2" value="{item_option_variation_value}">
                    {/case}
                {case value="service"}
                    <input type="hidden" name="item_options[{count}][cf_service_variations]" size="2" value="{item_option_variation_value}">
                    {/case}
            {/exp:switchee}
            <input type="hidden" name="entry_id[{count}]" size="2" value="{product_entry_id}">
            <input type="hidden" name="item_options[{count}][channel]" size="2" value="{product_channel_short_name}">
            <span class="qty">
            <input type="text" name="quantity[{count}]" class="qty__field js-qty-field" value="0">
                <button class="qty__btn js-qty-inc">+</button>
                <button class="qty__btn js-qty-dec">-</button>
            </span>
            {!--<input type="text" name="quantity[{product_entry_id}]" size="2" value="0">--}
        </td>
        {/exp:stash:get_list:nested}

    </tr>
{/exp:stash:get_list}

<tr>
    <td></td><td></td><td></td><td>GST</td><td>{stash:order_tax}</td><td><input class="btn" type="submit" value="Add to Cart for Re-Order"></td>
</tr>
<tr>
    <td></td><td></td><td></td><td>Shipping by {stash:order_shipping_option}</td><td>${stash:order_shipping_plus_tax}</td><td></td>
</tr>
<tr>
    <td></td><td></td><td></td><td>Total</td><td>{stash:order_total}</td><td align="center">  </td>
</tr>

</tbody>

</table>

<br><br>

{/exp:cartthrob:multi_add_to_cart_form}

```

{/exp:stash:set}  {!-- cart_reorder --}

..and let me just add one more time - this stack exchange editor component is absolutely awful!!
> 2 votes

# Answer
This should really be added as a comment rather than an answer, but since there isn't enough space...

I've looked at our scenario again; we definitely need the plugin, but this is where different build approaches can perhaps give different requirements later on.

Our products run over a number of channels, so we never know which options will have been selected by a customer in their previous orders.

We have a product option for 'weight' which is set as `{weight}` in our channel.

If we use the native tags, as below...

```
{item_options}
  Name: {option_name}<br>
  Label: {option_label}<br>
  Value: {option_value}<br>
{/item_options}

```

...our output is like this:

```
Name: A4 | 20 sheets
Label: Packs Options
Value: A4-20
Name: 120gsm
Label: Weight (Grammage)
Value: 120gsm

```

The name is the option customers can select in the respective dropdown field. The label is the field label for the template and the value is the customer selected value (which could arguably be the same as the name).

What we actually need to display in the form for a repeat order would be:

```
<input type="hidden" name="item_options[0][packs_options]" value="A4-20">
<input type="hidden" name="item_options[0][weight]" value="120gsm">

```

Using the native tag, we can't access `packs_options` or `weight`, so we created the plugin to loop through all the array keys in the item options. However, in another order (or even the same order) the customer could have totally different type of product, and there are too many options to run an `if` statement or hard code variables on the basis they *might* be used.

```
Array
(
[0] => Array
    (
        [order_id] => 6102
        [0] => Array
            (
                [0] => Array
                    (
                        [row_order] => 0
                        [product_options] => Array
                            (
                                [discount] => 0
                                [packs_options] => A4-20
                                [weight] => 120gsm
                            )
                    )
            )
    )
)

```

We dropped the discount, because the discount on the original order may no longer apply.

Looking at your code example, it looks like you might know which options a customer will have selected at `name="item_options[{count}][cf_paper_variations]"` \- maybe thats the difference between what we both need to achieve?
> 2 votes

---
Tags: cartthrob, orders
---