title: CartThrob vs Store

text:
# Question
Title: CartThrob vs Store
I've worked on many EE eComm websites that have used CartThrob as the main add-on to process payments. I love the flexibility of the tags and how it all integrates within channel entries.

But I recently got alerted to Expresso Store... So I have a few questions.

1. Is there any major differences? (Pros / Cons)
2. Is it as *flexible*? E.g. can you use a Matrix field for product options (Colour etc). Instead of NEEDING to use Stores fieldtypes
3. Whats the support like with Store?

My main reason for this, is I've contact CartThrob previously about custom add-ons (No Reply) and also posted numerous questions on here (And their forum) regarding CartThrob and they don't even get answered (Or it takes days / weeks).

Support is a deal breaker for me, and sadly CartThrob's support is the worst I've come across on any software/service. It's really pushing me away from the product.

# Answer
> 3 votes
Disclaimer: I represent Exp:resso (Store).

---

You're not able to use Matrix for product modifiers but in the vast majority of cases you wouldn't need to. Store's own modifiers matrix is fairly flexible providing a way to name your own modifiers along with optional individual or shared SKUs, optional price adjustments, and individual stock control. At present, the only main disadvantage is that you can't (as of yet) set dimensions and weights on a per modifier basis. The advantage however, is that you get ready-made `{modifiers}{/modifiers}` tags to use with all calculations handled automatically.

In terms of differences, generally you can get up and running much more quickly and easily with Store. In places it follows a convention over configuration approach to strike a nice balance between the time it takes to configure and the level of flexibility you have to build whatever ecommerce solution you need to build. Store (and CartThrob) work in harmony with EE to *extend* it rather than *modify* it meaning that you still have the power and flexibility of EE, custom channels, field groups, relationships, etc whilst adding ecommerce to the mix. All of EE's tags are still available to use as well as those of both shopping carts.

Products themselves are entered as regular channel entries in both Cartthrob and Store where you can use as many Channels as you need to group or divide your products as you choose. You're free to use EE's native categories or third party tagging addons to enhance grouping of products and relationships.

Store takes a different approach to Cartthrob when it comes to order management by keeping orders outside of EE's regular channels and into it's own database tables. This approach is adopted to provide an extra safeguard. Products are intended to be added and edited by users but orders should also be constant. Any accidental editing can quickly denormalise your order information. Instead they are viewed and Managed via Store's menu options. You still have the flexibility to add payments, change statuses, view and export, etc but this is one area where sensible defaults are applied to protect the data in the system.

For the vast majority of cases the combination of Store and EE provides all the flexibility you need to build your online shop exactly as you imagine. You can create product fairly complex product modifiers with their own stock levels and SKUs, use any number of custom fields to your products channel, set handling charges, product dimensions, multiple tax rates, etc. You can set your own shipping methods and rates or use any of the shipping extensions for *live rates* from the major postal services. You're also free to create your own extensions to extend this to use any other shipping company who provide an API to work with. The same applies to payment gateways where OmniPay is used under the hood (you can thank Adrian for that one too. In this case it's not a case of selling the by-products but giving them away for free :) ).

Store 2.0 saw the introduction of Sales and Discounts with many powerful combinations possible. Reports are included but for anything more detailed it's only an SQL query away.

Generally everything is built with extension in mind and for specialist requirements there are a growing number of extension hooks to take advantage of. If you need one which isn't included then drop us a line.

Documentation is good and releases are fast and frequent with new features being added all the time (there's plenty more in the pipeline!). We're always open to requests if you have any suggestions. Feel free to contact us directly, we're always open to feedback. As @JackTheKnife mentioned, we patrol this forum daily so you're free to post here or send us an email.

# Answer
> 1 votes
AD.#1 - Well, both have own pros and cons. Pros of Expresso Store is their documentation and support. Cons - some modules/options available in CartThrob are not available here (weight per SKU, gift registry)

AD.#2 - It is up to what do you mean by "flexibility". I have worked on Magento site and now I'm working on Expresso and Expresso + EE looks more flexible than Magento. Not sure about using Matrix there, but in that case I think you will require to do some customization of Expresso (vide weight per SKU)

AD.#3 - You can post you questions here or directly to them (Store Support) and for both cases they have 24hrs turn around. You don't need to post in both communication channels because they are monitoring both.

---
Tags: expresso-store, cartthrob, add-on, ecommerce, addons
---


# Question
Title: Expression Engine channel content not showing
I am new to expression engine. I have a channel name "news" and I have published some pages. In my template, I have used code as

```
{exp:channel:entries channel="news"}
  <h2>{title}<h2>
  {body}
{/exp:channel:entries}

```

But the output is **I get the page title but the content doesn't shows up and i get `{body}` as it is on the frontend**

Can anyone help me please, where I am doing wrong.

ANy help is really appreciated.

# Answer
> 4 votes
You need to ensure that you have created a Channel Field Group and assigned that to your Channel (News). Then, make sure that you have created at least one field in your Channel Field Group. In this case it would be a Textarea Field Type with a name of `body`.

Then in your Publish/Edit screen for your Channel you'll see your new Body field. Once you enter in some text into this field and save the Entry you should see the results appear in your templates.

---
Tags: channel-entries, channel, pages, page-uri
---


title: Will EE work with php 5.5.10 okay?

text:
# Question
Title: Will EE work with php 5.5.10 okay?
Quick question regarding whether anyone knows of any issues with installing EE on a server running the latest version of php (5.5.10 as I write this)?

# Answer
I'm running EE 2.8.1 on PHP 5.5.10 and I've not noticed any problems so far. You should be safe.
> 1 votes

---
Tags: php, server, compatibility
---


title: Stash and Expresso Store modifiers

text:
# Question
Title: Stash and Expresso Store modifiers
I'm trying to use stash withing Expresso Store modifiers

```
 {exp:stash:set_list name="price_list"}
 {exp:store:product entry_id="{entry_id}" disable_form="yes" disable_javascript="yes"}
    {modifiers}
        {modifier_options}
            {if price_mod_val}{stash:item_price}{price_mod_val}{/stash:item_price}{/if}
        {/modifier_options}
    {/modifiers}
 {/exp:store:product}
{/exp:stash:set_list}

```

but unfortunately I'm getting item\_price as {price\_mod\_val} text instead price value

What kind of tags order suppose to be in that case?

Thanks

# Answer
Thanks to Ian to put me on proper path to solve my issue. Working code below:

```
 {exp:stash:set_list name="price_list" parse_tags="yes" parse_depth="3" parse_conditionals="yes"}
 {exp:store:product entry_id="{entry_id}" disable_form="yes" disable_javascript="yes"}
    {modifiers}
        {modifier_options}
            {if price_mod_val}{stash:item_price}{price_mod_val}{/stash:item_price}{/if}
        {/modifier_options}
    {/modifiers}
 {/exp:store:product}
{/exp:stash:set_list}

```
> 1 votes

---
Tags: expresso-store, stash
---


# Question
Title: Playa or Assets issues with php 5.3.20 and above
Cannot render an Assets tag pair inside a Playa field on a live server using php 5.4.13 EE just cannot recognize from the Playa tag pairs inwards. Using a single tag it works like always.

just to be more clear: *** this doesn't work with php 5.4.10 and above ***

```
{prodotti_correlati_manutenzione dynamic="no"}
                                                    <div class="small-12 medium-4 large-4 column">
                                                        <div class="row">
                                                            <div class="small-12 column">
                                                                <a href="{page_url}">{exp:ce_img:single src="{img_prodotto}" width="200" height="200" crop="yes"}</a>
                                                            </div>
                                                            <div class="small-12 column">
                                                                <a href="{page_url}">{title}</a>
                                                            </div>
                                                        </div>
                                                    </div>
                                                {/prodotti_correlati_manutenzione}

```

*** this doesn't work with php 5.3.20 and above ***

```
{prodotti_correlati_manutenzione dynamic="no"}
                                                <div class="small-12 medium-12 large-12 column">
                                                    <div class="row">
                                                        <div class="small-12 column">
                                                            {img_prodotto}
                                                                <a href="{page_url}">
                                                                    {exp:ce_img:single src="{url}" width="200" height="200" crop="yes"}
                                                                </a>
                                                            {/img_prodotto}
                                                        </div>
                                                        <div class="small-12 column">
                                                            <a href="{page_url}">{title}</a>
                                                        </div>
                                                    </div>
                                                </div>
                                            {/prodotti_correlati_manutenzione}

```

EE 2.7.3 Playa 4.4.5 Assets 2.2.4 Structure 3.3.14 Transcribe 1.6

bye Thanks

# Answer
> 2 votes
We just came across a very similar issue where an Assets tag pair was not being parsed in one environment but was working fine in others while single tags were working fine everywhere. The solution for us turned out to be that we had to bump up the pcre.backtrack\_limit value in the php.ini to 1000000 on the server where the tags weren't being parsed. It looks like that value needs to be set pretty high when there are templates with a lot of nested tags.

---
Tags: assets, playa
---


title: Gwcode categories and entry id

text:
# Question
Title: Gwcode categories and entry id
I don't understand what's happening. I'm using the **gwcode categories** addon to get the category of and entry id, it works well when the entry id is present:

```
   {exp:gwcode_categories group_id="6" entry_id="22" depth="1"}
                   {cat_name}
   {/exp:gwcode_categories}

```

But when i use the **url\_title\_to\_entry\_id** plugin there is a problem:

```
  {exp:gwcode_categories group_id="6"
               entry_id="{exp:url_title_to_entry_id url_title="{segment_2}"}
               parse="inward" depth="1"}

                         {cat_name}

     {/exp:gwcode_categories}

```

The two categories inside the group name (id=6) are displayed instead of the category associated to the entry.

**{exp:url\_title\_to\_entry\_id url\_title="{segment\_2}** used alone display the correct entry id , so i don't understand why all the categories inside the group name are displayed. What could be the problem?

Edited:

**{exp:url\_title\_to\_entry\_id url\_title="{segment\_2}** is not parsing the entry\_id, so all the categories are displayed. How to parse a variable entry id, inside the **gwcode categories**?

# Answer
Not familiar with that plugin but you can try…

IF you're calling the `{exp:channel:entries}` tag, you could simply place it inside that tag and it'll work fine.

If you need to have it outside the {exp:channel:entries} tag you could use Stash to record it like:

```
{exp:stash:set name="catid" parse_tags="yes" type="snippet" trim="yes"} {!-- Save as snippet --}
{exp:url_title_to_entry_id url_title="{segment_2}"}
{/exp:stash:set}

{exp:stash:parse} {!-- Forces to parse after stash:set --}
{exp:gwcode_categories group_id="6"
  entry_id="{catid}"
  parse="inward" depth="1"}
{cat_name}
{/exp:gwcode_categories}
{/exp:stash:parse}

```

This code is off-the-top and may or may not work 'as-is' but the theory is sound ;)
> 1 votes

---
Tags: gwcode-categories, entryid
---


title: Channel Form Matrix File Upload

text:
# Question
Title: Channel Form Matrix File Upload
ExpressionEngine 2.8.1
Matrix 2.5.10

I'm using Channel Form to allow users to update their own entries on our website. I'm using a Matrix field to allow them to upload documents (mostly PDFs). When the form gets submitted the text cell in the Matrix field saves just fine, but the file cell is not being uploaded or saved.

I thought the workflow plugin I was using was hijacking file uploads, but it turns out after uninstalling it that file uploads still did not work.

I did see that a similar sounding issue was fixed in the latest version (which I have installed), but the issue is still occurring for me. This same thing happens on Grid fields as well. I have double-checked File Upload permissions and folder permissions. Regular file uploads work fine (I have another field in the entry that just uploads a single file).

Any suggestions on how to fix this?

**UPDATED**

I updated to 2.8.1 hoping that there was a bug that was fixed. I've found two places where this is considered a bug, but they've been reported as fixed. For me, this is still happening. I wish there were some error log that could point me in the right direction.

# Answer
> 0 votes
The bugs mentioned in my question have been, in fact, fixed. The problem I was having was that any file that wasn't an image was being caught by EE's Apply XSS Filtering to Uploaded Files Setting. This setting is a bit overzealous and refused anything that wasn't an image. Turning this off will allow uploading of PDFs and other files within Grid and Matrix fields.

---
Tags: ee2, matrix, channel-form, grid, 2.7.0
---


# Question
Title: Problem calling a specific channel entry using segment_1 and page module
Ive looked at many Switchee questions here, but can't find out why my channel entry id's aren't being called in an embedded template. Switchee is working (with text for test), but Im obviously making a mistake with how Im calling the channel entries.

```
{exp:switchee variable="{segment_1}" parse="inward"}
{case value="page-one"}
{exp:channel entries channel="assorted_content" disable="member_data|trackbacks|pagination|categories" limit="1" entry_id="49"}
page one body content...
{/exp:channel:entries}
{/case}
{case value="page-two"}
{exp:channel entries channel="assorted_content" disable="member_data|trackbacks|pagination|categories" limit="1" entry_id="42"}
page two body content...
{/exp:channel:entries}
{/case}
{/exp:switchee}

```

I dont see why the entries aren't being parsed. Ive tried with all the content in one page (without using an embedded template) and it works. What's wrong?

# Answer
> 0 votes
Could just be something very simple, try changing segment\_1 to {segment\_1}.

{exp:switchee variable="segment\_1" parse="inward"} means your looking for the word segment\_1 ,

while {exp:switchee variable="{segment\_1}" parse="inward"} tells EE to look for the value in the URL segment 1

# Answer
> 0 votes
It looks like you're not declaring your `{exp:channel:entries}` tag correctly. You have `{exp:channel entries}`. Try removing the white space and inserted a colon.

# Answer
> 0 votes
Solved - at least I have *a workaround* even if it's not the correct solution. I have to wrap the code in the embedded template in {exp:channel entries}{/exp:channel entries} as well as the case calls to entry ids. I didnt realise you had to/could do this.

I have this in the 1st embedded template with the switchee cases:

```
{exp:switchee variable="{segment_1}" parse="inward"}
{case value="page-one"}
{exp:channel:entries entry_id="49"}
   {embed="includes/_page_content"}
    {/exp:channel:entries}
{/case}

{case value="page-two"}
{exp:channel:entries entry_id="42"}
   {embed="includes/_page_content"}
    {/exp:channel:entries}
{/case}
{/exp:switchee}

```

Then I have this in the 2nd embedded template (\_page\_content.html) that calls the page html:

```
{exp:channel:entries channel="assorted_content" disable="member_data|trackbacks|pagination|categories" limit="1"}
{title}
{page_body}
etc...
{/exp:channel:entries}

```

Of course if I needed to call different channels for the entry ids Id specify that in the Switchee template each time.

This is only my first attempt at Switchee - I need to do more complex nested stuff later (in meta open graph conditionals). It might be that the if:else addon would work better for that, I dont know yet.

Thanks for help in keeping me thinking about what was wrong.

---
Tags: switchee
---


# Question
Title: Stash get_list and prefix: variables not rendering
Using EE 273 and stash 252.

As soon as I add a prefix parameter to a `get_list`, stash variables inside the list are not rendering.

**Set\_list part**

```
{!-- Get last 3 news --}
{exp:stash:set_list name="st_latestnews" parse_tags="yes"}

    {exp:channel:entries
        channel="news"
        disable="categories|category_fields|member_data|pagination"
        orderby="date"
        sort="desc"
        limit="3"
        dynamic="no"
    }
        {stash:st_item_title}{title}{/stash:st_item_title}
        {stash:st_item_url}{url_title_path="news_press/news_detail"}{/stash:st_item_url}
        {stash:st_item_date}{entry_date format="%F %j, %Y"}{/stash:st_item_date}
        {stash:st_item_machinedate}{entry_date format="%Y-%m-%d"}{/stash:st_item_machinedate}
        {stash:st_item_img}{news_img}{/stash:st_item_img}
        {stash:st_item_img_caption}{news_img_caption}{/stash:st_item_img_caption}
        {stash:st_item_img_copyright}{news_img_copyright}{/stash:st_item_img_copyright}
        {stash:st_item_summary}{news_summary}{/stash:st_item_summary}
    {/exp:channel:entries}

{/exp:stash:set_list}

```

**Get list without prefix: works (but no\_results does not)**

Everything is rendered fine but no\_results does not work here. Tried adding `parse_conditionals="yes"` and `parse_tags="yes"` but no dice.

```
{!-- display news list --}
{exp:stash:get_list name="st_latestnews"}

    {if count == 1}<ul class="list-compact  grid"><li class="grid__unit  medium-unit-4of12">{/if}
        <article>
            <p class="imgholder"><a href="{st_item_url}">{exp:ce_img:pair src="{st_item_img}" width="600" height="337" crop="yes|center,center" allow_scale_larger="yes"}<img src="{made}" alt="{st_item_img_caption} - © {st_item_img_copyright}" class="fluidimg" />{/exp:ce_img:pair}</a></p>
            <p class="item-meta"><time datetime="{st_item_mdate}">{st_item_date}</time></p>
            <h2 class="item-title  item-title--small"><a href="{st_item_url}">{st_item_title}</a></h2>
            <p>{exp:eehive_hacksaw words="30" append="…"}{st_item_summary}{/exp:eehive_hacksaw}</p>
        </article>
    {if count == total_results}</li></ul>{if:else}</li><li class="grid__unit  medium-unit-4of12">{/if}

    {!-- handling no result --}
    {if no_results}<p>No news found</p>{/if}

{/exp:stash:get_list}

```

**Get list with prefix: variables do not render (but no\_results works)**

With previous versions of Stash, this used to work to get the no\_results tag to behave properly. Here, as soon as I add a prefix parameter, nothing renders, although the list is correctly populated and retrieved in the template debugger.

```
{!-- display news list --}
{exp:stash:get_list name="st_latestnews" prefix="stashprefix"}

    {if count == 1}<ul class="list-compact  grid"><li class="grid__unit  medium-unit-4of12">{/if}
        <article>
            <p class="imgholder"><a href="{st_item_url}">{exp:ce_img:pair src="{st_item_img}" width="600" height="337" crop="yes|center,center" allow_scale_larger="yes"}<img src="{made}" alt="{st_item_img_caption} - © {st_item_img_copyright}" class="fluidimg" />{/exp:ce_img:pair}</a></p>
            <p class="item-meta"><time datetime="{st_item_mdate}">{st_item_date}</time></p>
            <h2 class="item-title  item-title--small"><a href="{st_item_url}">{st_item_title}</a></h2>
            <p>{exp:eehive_hacksaw words="30" append="…"}{st_item_summary}{/exp:eehive_hacksaw}</p>
        </article>
    {if count == total_results}</li></ul>{if:else}</li><li class="grid__unit  medium-unit-4of12">{/if}

    {!-- handling no result --}
    {if stashprefix:no_results}<p>No news found</p>{/if}

{/exp:stash:get_list}

```

Is this a bug or am I missing something obvious here (as it could well be the case) ?

# Answer
> 1 votes
The ever helpful Mark Croxton promptly responded via twitter.

From the changelog:

> Stash 2.4.8: When using the `prefix="x"`, parameter with `get_list`, only prefixed variables will now be parsed by default, unless `require_prefix="no"`

So the correct code for your variables to be parsed without prefix and the no\_result tag to be working is as follows:

```
{!-- display news list --}
{exp:stash:get_list name="st_latestnews" prefix="myprefix" require_prefix="no"}

    {if count == 1}<ul class="list-compact  grid"><li class="grid__unit  medium-unit-4of12">{/if}
        <article>
            <p class="imgholder"><a href="{st_item_url}">{exp:ce_img:pair src="{st_item_img}" width="600" height="337" crop="yes|center,center" allow_scale_larger="yes"}<img src="{made}" alt="{st_item_img_caption} - © {st_item_img_copyright}" class="fluidimg" />{/exp:ce_img:pair}</a></p>
            <p class="item-meta"><time datetime="{st_item_mdate}">{st_item_date}</time></p>
            <h2 class="item-title  item-title--small"><a href="{st_item_url}">{st_item_title}</a></h2>
            <p>{exp:eehive_hacksaw words="30" append="…"}{st_item_summary}{/exp:eehive_hacksaw}</p>
        </article>
    {if count == total_results}</li></ul>{if:else}</li><li class="grid__unit  medium-unit-4of12">{/if}

    {!-- handling no result --}
    {if myprefix:no_results}<p>No news found</p>{/if}

{/exp:stash:get_list}

```

---
Tags: stash
---


# Question
Title: Extension Development - Getting the editing author's ID in entry_submission_end hook
I may just be being thick here - but I can't seem to find this even when debugging the code I am writing.

Here's my scenario:

* I have an extension that does something whenever someone created or updates an entry.
* What I'd like to do is log the user who made edits to an entry

The issue I am running into is when a user (who did not create the original entry) updates an existing entry. I can find the original author's ID in the $meta\['author\_id'\] field, but don't seem to find any reference to the editing author's ID.

Am I missing something, or is this data really not passed to the hook?

Thanks in advance for your help!

MW

# Answer
> 2 votes
To get the logged in member use

```
ee()->session->userdata('member_id')

```

or

```
$this->EE->session->userdata('member_id')

```

---
Tags: members, extension, member-details
---


title: Grunt/Gulp with Expression Engine

text:
# Question
Title: Grunt/Gulp with Expression Engine
I am looking for a good guide/example Grunt being used in a multiuser Expression Engine Environment. I do Understand the gruntfile will not be EE specific, but I am hoping there are some articles that explore and explain any issues regarding using with EE.

# Answer
> 0 votes
Well found what I was looking for... https://gist.github.com/aaronwaldon/8657432 Thanks Aaron!

---
Tags: automation
---


# Question
Title: EE 2.8.1 & CartThrob 2.5: multi_add_to_cart_form not working
Is anyone running EE 2.8.1 and Cartthrob 2.5 getting the multi\_add\_to\_cart\_form to work? It seems to not be posting the values into the cart. I have gotten the one item add\_to\_cart\_form to work and can see cart entries perfectly when using that tag, but the multi\_add\_to\_cart shows nothing when attempting to view the cart. Here is my barebones hardcoded attempt template code:

```
{exp:cartthrob:multi_add_to_cart_form return="shopping_cart"}
     <input type="hidden" name="entry_id[1]" value="105" />
     <input type="hidden" name="entry_id[2]" value="103" />
     <input type="hidden" name="entry_id[3]" value="101" />
     <input type="submit" value="submit" />
{/exp:cartthrob:multi_add_to_cart_form}

```

I've also tried using the multi\_add\_to\_cart\_form nested in a {exp:channel:entries} tag pair, but it also does not seem to be posting the entries into the cart:

```
{exp:cartthrob:multi_add_to_cart_form return="shopping_cart"}
     {exp:channel:entries channel="products" status="Open"}
          <input type="hidden" name="entry_id[{count}]" value="{entry_id}">
     {/exp:channel:entries}
     <input type="submit" value="submit">
{/exp:cartthrob:multi_add_to_cart_form}

```

I'd very much appreciate if anyone with CT 2.5 and EE 2.8.1 could confirm if they can get the multi\_add\_to\_cart tag working at all.

# Answer
Just got a scheduled callback from CartThrob support and it was a simple 5-minute fix. It turns out that the quantity field for each entry\_id is required when using the {exp:cartthrob:multi\_add\_to\_cart\_form} tag pair. In the single {exp:cartthrob:add\_to\_cart\_form} tag no quantity field is necessary, and adding to cart that way defaults the quantity to 1.

So the following code now sends the correct information to the cart:

```
{exp:cartthrob:multi_add_to_cart_form return="shopping_cart"}
     {exp:channel:entries channel="products" status="Open"}
          <input type="hidden" name="entry_id[{count}]" value="{entry_id}">
          <input type="hidden" name="quantity[{count}]" value="{entry_id}">
     {/exp:channel:entries}
     <input type="submit" value="submit">
{/exp:cartthrob:multi_add_to_cart_form}

```
> 0 votes

---
Tags: cartthrob
---


# Question
Title: Social feeds to display on EE driven website
I'm going to move one Wordpress site to EE and they have using social feeds (twitter and facebook, I think multiple sources) displaying on their website.

Are there any addons for EE which can handle that or any suggestions? I have take a look at Data Grab and Feed Parser, but both will require to create own tags or templates to display those feeds.

# Answer
> 2 votes
EE\_Twitter is a good free solution for embedding Tweets via the API (it does not create entries in EE's database).

---
Tags: add-on, facebook, twitter, social
---


# Question
Title: LayerSlider Responsive Slider for ExpressionEngine
Does exists something similar to LayerSlider Responsive WordPress Slider Plugi for EE?

# Answer
Why not just use the non-Wordpress version of that plugin? You would just take the static HTML markup that the plugin uses to build and apply animations and replace them with markup coming from a loop in EE. Similar to that, I've used Royal Slider with EE, as well as ResponsiveSlides.js \- essentially anything that uses HTML, CSS and jQuery for a slider effect can be used with EE - you just have to build your content model to suit whichever you choose.
> 2 votes

# Answer
There isn't an image slider plugin for EE, but you can easily roll your own using something like Cycle - http://jquery.malsup.com/cycle2/ with your images either directly within EE's native content management, using something like Grid or Matrix, or in conjunction with one of the larger photo add-ons for EE like Channel Images or Photo Frame.
> 1 votes

---
Tags: extension
---


# Question
Title: Solspace Tag 4.2.6 Update Broken with EE 2.8.1
I just downloaded the latest update for Solspace Tag 4.2.6 and immediately received the following error:

`Fatal error: Call to undefined method stdClass::userdata() in /projects/myproject/system/expressionengine/libraries/Csrf.php on line 391`

Reverting back to the previous version (4.2.5) resolved the issue. There is something broken in the update.

# Answer
This turned out to be a bug when Tag is used with other addons that add cache variables to the Sessions object before it actually exists.

A workaround for the issue will be in Tag 4.2.7, which we are testing for release.
> 3 votes

---
Tags: solspace, solspace-tag, 2.8
---


# Question
Title: Category group and category ID from that group using Low Seg2Cat
I have code which looks like

```
{exp:channel:entries channel="collection" category_group="5" category="{segment_2_category_id}" url_title="{segment_3}" status="open"}

```

I expect to retrive an entry from the channel named "collection" and with category ID# from category group ID#5, but what I'm getting is an entry (sometimes, it is based on segment\_2) from category group ID#1. It looks like Low Seg2Cat is always pulling first category ID but not related to category group.

Category name/url title from segment\_2 exists in another category group.

Any clue what is going on?

Thanks

# Answer
There is a setting to restrict to Category Groups in Seg2Cat -- see the documentation. Note that, by default, Seg2Cat has this caveat:

> If there are multiple categories with the same url\_title, but in different groups, this extension will only return one of those. So best make sure your category url\_titles are unique, or you select the relevant Category Groups in the settings so they are.

If you have the option of using another plugin, instead of Seg2Cat, you could use Cat2 (also on GitHub). Cat2 allows you to do this:

```
{exp:cat2:id category_url_title="{segment_2}" category_group="5"}

```
> 3 votes

# Answer
It seems the category url title's are not unique. Try making them unique and that should fix your issue as Low Seg2Cat queries the database and find the first match.
> 1 votes

---
Tags: categories, low-seg2cat, category-group
---


# Question
Title: Relationship, Stash and Channel Images outputs same image
I'm working on EE 2.8.1, Stash 2.5.2 and ChannelImages 5.4.15.

I'm new to Stash. In a channel entry with limit 1 if've got the following:

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

            {portfolio_related_home}
                {stash:item_title}{portfolio_related_home:title}{/stash:item_title}
                {stash:item_id}{portfolio_related_home:count}{/stash:item_id}

                {portfolio_related_home:portfolio_images limit="3" prefix="ci"}
                {if ci:count == '1'}
                     {stash:img1{portfolio_related_home:count}}{ci:url:medium}{/stash:img1{portfolio_related_home:count}}
                {/if}
                {if ci:count == '2'}
                    {stash:img2{portfolio_related_home:count}}{ci:url:small}{/stash:img2{portfolio_related_home:count}}
                {/if}
                {if ci:count == '3'}
                    {stash:img3{portfolio_related_home:count}}{ci:url:small}{/stash:img3{portfolio_related_home:count}}
                {/if}
                {/portfolio_related_home:portfolio_images}

            {/portfolio_related_home}
{/exp:stash:set_list}

```

I know that it would be best to use a nested list for the portfolio images. But I only need three images and they need to be parsed in different order per related entry. Portfolio\_related\_home is the relationship field. portfolio\_images is the ChannelImages field.

When I output stash. It almost works. The only thing is that the images per related entry are the same. So I'm getting three images witch are the same. The ci:count works but when I output ci:id or ci:url they keep the same.

```
{exp:stash:get_list name="l_portfolio" }
            <div>
                {if item_id <> '2'}
                    <div class="hp-img-container" ><img src="{img1{item_id}}" />
                    <div class="hp-content"><h4>{item_title}</h4>
                    <p>{item_content}</p>
                    </div>
                    </div>
                    <img src="{img2{item_id}}" />
                    <img src="{img3{item_id}}" />
                {if:else}
                    <img src="{img2{item_id}}" />
                    <img src="{img3{item_id}}" />
                    <div class="hp-img-container" ><img src="{img1{item_id}}" />
                    <div class="hp-content"><h4>{item_title}</h4>
                    <p>{item_content}</p>
                    </div>
                    </div>
                {/if}
            </div>
{/exp:stash:get_list}

```

And the final HTML:

```
    <div>
        /uploads/images/18/img02__small.jpg">
        /uploads/images/18/img02__small.jpg">
        <div class="hp-img-container">/uploads/images/18/img02__large.jpg
        <div class="hp-content"><h4>Title</h4>
        </div>
        </div>

</div>
<div>
        <div class="hp-img-container">/uploads/images/19/img03__large.jpg
        <div class="hp-content"><h4>Title 2</h4>
        </div>
        </div>
        /uploads/images/19/img03__small.jpg
        /uploads/images/19/img03__small.jpg
</div>

```

I must be doing something wrong. Or there must be a better way to do this. I hope someone can help me out?

Tnx

# Answer
> 0 votes
Solved it. Ended up using just stash set instead of set list. I tried a lot of variations but they didn't work. Like: set list for just the images or a nested list. I also noticed that using prefix on Channel Images inside Stash and a Related entry doesn't work. Outside the related entry it works fine with Stash.

This is what worked for me:

```
     {!-- ## Related entry --}
{portfolio_related_home}

        {!-- ## set stash. Don't know if procces end should be there --}
        {exp:stash:set parse_tags="yes" process="end"}

             {!-- ## loop images and set unique stash names --}
            {portfolio_related_home:portfolio_images entry_id="{entry_id}" limit="3"}
            {if image:count == "1"}
                {stash:img_{portfolio_related_home:count}_{image:count}}{image:url:medium}{/stash:img_{portfolio_related_home:count}_{image:count}}
            {if:else}
                {stash:img_{portfolio_related_home:count}_{image:count}}{image:url:small}{/stash:img_{portfolio_related_home:count}_{image:count}}
            {/if}
            {/portfolio_related_home:portfolio_images}
        {/exp:stash:set}

                {if portfolio_related_home:count <> '2'}
                    <div class="hp-img-container" >
                    {exp:stash:get name='img_{portfolio_related_home:count}_1'}
                    <div class="hp-content"><h4>{portfolio_related_home:title}</h4>
                    </div>
                    </div>

                    {exp:stash:get name='img_{portfolio_related_home:count}_2'}
                    {exp:stash:get name='img_{portfolio_related_home:count}_3'}
                {if:else}
                    {exp:stash:get name='img_{portfolio_related_home:count}_2'}
                    {exp:stash:get name='img_{portfolio_related_home:count}_3'}

                    <div class="hp-img-container" >
                    {exp:stash:get name='img_{portfolio_related_home:count}_1'}
                    <div class="hp-content"><h4>{portfolio_related_home:title}</h4>
                    </div>
                    </div>

                {/if}

{/portfolio_related_home}

```

Maybe it could help someone.

Cheers

---
Tags: stash, relationships, channel-images
---


title: How can I duplicate content

text:
# Question
Title: How can I duplicate content
I have two channels product & product\_info. The product and product\_info have a one to many relationship using playa. The product\_info list the product as a parent. Both channels use Matrix fields in the field set.

As a one off event, I need to duplicate a product and all of it's linked product\_info entries for versioning purposes. I would like any suggestions on the best way of achieving this.

My current ideas are: \- Dump out the db into a sql file and manually hunt down all the insert statements i want to duplicate and copy/pasta them after doing some find replace on id's \- Write a script to query certain tables and insert them back in as new records \- try and use something like Datagrab

I am currently pushing forward with the db script but I am finding EE database "design" challenging.

thank you for any suggestions

t

# Answer
> 1 votes
Unless I'm misunderstanding, how about using Cloner? http://devot-ee.com/add-ons/mx-cloner

---
Tags: ee2, duplicate
---


# Question
Title: Expresso Store, automatic member registration fails
I am using the latest version of Expression Engine, Zoo Visitors and Expresso Store 2.

I would like to use the automatic member creation functionality that comes with store 2.

However I'm having some difficulties.

I have the following code in my template (unrelated stuff removed)

```
{exp:store:checkout
    form_class="form-horizontal"
    return="store_example/order/ORDER_HASH"
    error_handling="inline"
    error_delimiters='<span class="help-inline">|</span>'
    payment_method="PayPal_Express"
    register_member="yes"
}

  {field:register_member} <label for="register_member">Register Member Account?</label>

  <div>
    <label for="password">Password</label>
    {field:password}
  </div>

    <div class="form-actions">
        <a href="{path='store_example/checkout2'}" class="btn">Back</a>
        <input type="submit" name="submit" value="Place Order" class="btn btn-success" />
    </div>

{/exp:store:checkout}

```

After completing payment on Paypal I get the following errors, which area presented in the standard ee error screen.

> The form you submitted contained the following errors
>
> ```
> You must submit a username
> You must submit a username
> You must submit an email address
>
> ```
>
> Return to Previous Page

It says in the documentation that the username will use the order\_email field. I have not explicitly requested that a username be entered.

Not sure where I'm going wrong here. Just wondering if Zoo Visitor is impacting on this process.

I'm expecting the user to receive an order confirmation email, and also an email with their account details.

Any help greatly appreciated.

Thanks Dave

# Answer
IF you are using the register a member tags you need to make sure that you have either a username or email address field in your template populated and both a password and a password confirm field.

**Username is the users email address:**

```
{field:register_member} <label for="register_member">Register Member Account?</label>

{!-- if you want people to be able to login with their email address you would the following (this is the approach I prefer) --}
<div>
    <label for="order_email">Email Address</label>
    {field:order_email}{!-- this field is required --}
</div>
<div>
    <label for="password">Password</label>
    {field:password}{!-- this field is required --}
</div>
<div>
    <label for="password_confirm">Confirm Password</label>
    {field:password_confirm}{!-- this field is required --}
</div>

```

**With a custom username:**

```
{field:register_member} <label for="register_member">Register Member Account?</label>

{!-- if you want people to be able to create a unique uername you would do the following --}
<div>
    <label for="order_email">Email Address</label>
    {field:order_email}{!-- this field is required --}
</div>
<div>
    <label for="username">Username</label>
    {field:username}
</div>
<div>
    <label for="password">Password</label>
    {field:password}{!-- this field is required --}
</div>
<div>
    <label for="password_confirm">Confirm Password</label>
    {field:password_confirm}{!-- this field is required --}
</div>

```

From the Exp-resso Documentation:

> Member accounts will be created based on the order\_email, and the email address must not already be used for a member account. After creating the member account, any existing orders tied to that email address will be assigned to the new member.
>
> Member accounts will only be created if a password fields is submitted. In addition, the username and screen\_name fields are optional
> 1 votes

# Answer
It's possible that Zoo Visitor is interfering with Store's member registration functionality, although I don't think we have had any reports of problems with this.

It may be worth testing your templates on a new site, without Zoo Visitor installed, to see if you still get the error.

Alternatively, you could simply add a login/register step to your checkout process, which avoids using Store's member registration functionality entirely.
> 0 votes

---
Tags: expresso-store, zoo-visitor, 2.8
---


# Question
Title: EE Error: "Unable to Load Site Preferences; No Preferences Found"
I'm getting this error and can't understand why. This is for a site that I've reset the hosting to it's default state and have uploaded the site files and database to a basically new installation. It works 100% on the local environment.

I've read the threads here and have checked my permissions on config.php and database.php. I've also triple checked all of the database credentials and I still can't figure out what's going on. The host is saying there is nothing wrong and we can access the DB just fine through phpmyadmin. What else am I missing?

Please help!

# Answer
This is often caused from incorrect DB credentials. If you set debug="2" in your config file, do you get any additional errors?
> 3 votes

---
Tags: database-error
---


title: Stash category ID and entries

text:
# Question
Title: Stash category ID and entries
I have tried to use Cat2 addon to retrieve category ID based on a category group. Later I want to use stashed category ID to retrieve entries form a channel based on a selected category. Code looks like:

```
{exp:stash:set name="catid" parse_tags="yes" parse_depth="3"}
{exp:cat2:id category_url_title="{segment_2}" category_group="5" parse="inward"}
{category_id}
{/exp:cat2:id}
{/exp:stash:set}

CatID#: {exp:stash:get name='catid'}

    {exp:channel:entries channel="collection" category="{exp:stash:get name='catid'}" url_title="{segment_3}" status="open"}
        {title}
        {collection_description}
    {/exp:channel:entries}

```

It displays proper CatID# but I'm not getting any entries. When I "hardcode" that CatID# instead of `{exp:stash:get name='catid'}` I'm able to retrieve related entries.

Any clue what is going on there?

Thanks

# Answer
> 1 votes
Found solution here

> If you need to use a Stash variable that was created within a Channel Entries loop earlier in a template as a parameter in a Channel Entries loop, you can delay the parse order of the second Channel Entries loop such that the variable gets set prior to the loop being executed. For example if you got a list of entry IDs of related entries (from Relationships or Playa) you could put those in the entry\_id parameter and then print out the entries in the correct order. This could be used for categories, statuses, search values, whatever.

Example code:

```
{exp:stash:parse process="end"}
  {exp:channel:entries channel="XXX" fixed_order="{stash:places}" entry_id="{stash:places}" dynamic="no"}
    {title}
  {/exp:channel:entries}
{/exp:stash:parse}

```

---
Tags: stash, categories
---


# Question
Title: Is there a way to disable auto-convert URLs and email addresses into links for custom member fields?
I have created a custom member field, `{Google_Plus_URL}`, where a URL like, *https://plus.google.com/1051794532082275037724* can be entered.

In my template, I reference this field as such:

```
{if Google_Plus_URL}
<p>Connect with <a rel="author" href="{Google_Plus_URL}">{screen_name} on Google+</a></p>
{/if}

```

The end result is, unexpectedly:

```
<p>Connect with <a rel="author" href="<a href="https://plus.google.com/1051794532082275037724">https://plus.google.com/1051794532082275037724</a>">Mike Adamick on Google+</a></p>

```

In researching this issue, I come across the "Automatically turn URLs and email addresses into links" options in relation to channels, but there doesn't appear to be an similar setting for member data. Aside from using a plugin like the one proposed in this similar question, is there a built in solution I'm missing?

I'm using EE v2.5.5

# Answer
As far as I know this is still not possible. Not a great answer, but unfortunately it's hardcoded into the member functionality.
> 2 votes

---
Tags: templates, members, settings
---


title: Pagination: Is this how it works?

text:
# Question
Title: Pagination: Is this how it works?
I'm trying to setup pagination at the bottom of my article template.

What I want to achieve is the following:

To link to the first group of 5 pages, to show links for the next 5 pages and to link to the next group of 5 pages.

The pagination links appear but the numbered links link to pages P14, P28, & P42.

Here is my code:

```
{paginate}
{if {total_pages} > 1}
<nav class="centered" role="toolbar">
<ul class="pagination">
{pagination_links page_padding="5"}
{previous_page}<li><a href="{pagination_url}">«</a></li>{/previous_page}

{page}<li {if current_page}class="active"{/if}><a href="{pagination_url}">{pagination_page_number}</a></li>{/page}

{next_page}<li><a href="{pagination_url}">»</a></li>{/next_page}
{/pagination_links}
</ul>
</nav>
{/if}
{/paginate}

```

Why is it linking to every 14th page?

# Answer
> 3 votes
> Why is it linking to every 14th page?

It's not. I'm willing to bet that your `channel:entries` tag has a `limit` of `14`. The links/url segments indicate *entry* offset, not *page* offset - but they achieve the same end result.

---
Tags: pagination
---


# Question
Title: Expresso Store, required address field based on country
It seems if I require the State of a billing or shipping field, it is required whether or not the selected country has "states". For example, if France is selected, the State dropdown has no options, but the user can't proceed because the State field is required.

What is the best way to correct this?

# Answer
You have to specify on checkout form opening `exp:store:checkout` what is required. Remove state from there and you should be good.
> 1 votes

---
Tags: expresso-store
---


# Question
Title: Better dropdown fieldtype to handle long lists?
Does anyone know of a better fieldtype to handle long lists in a dropdown than the default dropdown list fieldtype?

I need to

* work within Grid
* field must be searchable in front end (via ee or low search)
* be able to add items within the list at times
* handle thousands of items in the list (maybe 5,000 - 20,000)
* hopefully offer an improved way of choosing the item

(I considered using a second channel and a Relationship in the Grid, but the problem is searching isn't a possibility for Relationships in a Grid. That would be ideal in that I can change/add to the items in the second channel, but the search issue is a deal breaker.)

# Answer
> 2 votes
You can use the low\_search\_update\_index hook in Low Search to index relationship fields inside Grid fields - I've done this before.

There's a ready-made extension available which does this for standalone relationship fields ... it doesn't do Grid fields, but it would be easy to modify the query inside the extension to do so.

So, stick with the relationship inside the Grid, since it meets all your other requirements, and the search bit is solvable.

---
Tags: fieldtype, grid, drop-down
---


# Question
Title: Expresso Store - Invalid Payment Method for Manual
Just installed Expresso and getting my feet wet with it. I'm using the default demo store it comes with to walk myself through the entire process and to figure out how to best utilize the software for my client's specific needs.

In particular, the client wants all items on the store to be free and with free shipping unless they want next day delivery (I already have a pretty good grasp on how to handle this). So, this means that I don't want to specify a payment method and use some preconfigured gateway for it- I don't need it.

I read that the best way to handle this is to simply use the "manual" payment method, but all I'm getting are constant errors.

Only code I added to the Checkout3 default template the Store provides you:

```
<select name="payment_method">
                <option value="paypal_express" selected>Paypal</option>
                <option value="manual">Manual</option>
            </select>

            {if error:payment_method}
                    <div class="control-group">
                        <div class="alert alert-error">{error:payment_method}</div>
                    </div>
                {/if}

```

Earlier, I tried specifying the manual payment type without the above code in the checkout tag- same error being flagged.

Other than this, all I've done is comment out the tag that houses the default payment code for the demo, given how I didn't need it.. Or thought I didn't.

# Answer
For the sake of having an answer posted:

The Manual gateway must be enabled in the Store payment methods settings for the Manual gateway to work.
> 4 votes

---
Tags: expresso-store, checkout
---


# Question
Title: Exp:resso registered members not mapped to Zoo Visitors
I know this is question has already been asked, but I just can't get it to work properly.

I have a member field called: member\_billing\_first\_name

In my Exp:resso checkout form I have a field called billing\_first\_name which is mapped to member\_billing\_first\_name in the backend

```
{exp:store:checkout
    form_class="form-horizontal"
    return="store_example/order/ORDER_HASH"
    error_handling="inline"
    error_delimiters='<span class="help-inline">|</span>'
    payment_method="PayPal_Express"
    register_member="yes"
}

<div>
    <label for="billing_first_name">Name</label>
    {field:billing_first_name}
</div>
<div>
    <label for="order_email">Email Address</label>
    {field:order_email}{!-- this field is required --}
</div>
<div>
    <label for="password">Password</label>
    {field:password}{!-- this field is required --}
</div>

{/exp:store:checkout}

```

other html/links removed from example

What am I doing wrong?

I've tried this method, but no joy: Expresso Store 2: not mapping to Zoo Visitors fields on checkout

Thanks in advance

# Answer
> 2 votes
Per the comments in the question you linked to, Store doesn't support mapped member fields during registration with Zoo Visitor (due to ZV not correctly handling member registration hooks).

So your only option is to use the workaround in that thread, or craft your own workaround.

Alternatively, as I mentioned in your last question, you can simply create a login/registration page as step 2 of your checkout (it doesn't have to use the Store tags). That way your customers can create an account, then continue with the checkout. This is the way most websites work anyway.

---
Tags: expresso-store, zoo-visitor, 2.8
---


# Question
Title: Configure WYGWAM to use fonts from Typekit?
I use custom CSS for WYGWAM fields.

I can use @font-face, but what if I want to use fonts via Typekit, is there a way to pull them in?

# Answer
> 5 votes
You can also swap to the very similar addon Wyvern, by BoldMinded, which has Typekit and Google Fonts support built in via the settings screen.

# Answer
> 14 votes
There is a one year old thread on Pixel&Tonic’s support forum.

To use Typekit with Wygwam/CKEditor you have to include two scripts in your `<head>`:

```
<script type="text/javascript" src="//use.typekit.net/XXXXXXXX.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

```

Scott Wise figured out this hack:

> I figured out a rough injection for the time being. In `/themes/third_party/lib/ckeditor/ckeditor.js`, on line 9 there is an array push into the header that defines the CSS (presumably whatever is defined in the `contentsCss` property):
>
> `h.push('');`
>
> I simply added another push() immediately following that (with both scripts I need in one string), and now I've got my scripts into each instance of the iFrame, fully functional!

---

**Update:** It seems that ckeditor.js (Wygwam 2.6.3) has changed since the forum thread.

You can try this:

In ckeditor.js replace

```
else k.push('<link type="text/css" rel=stylesheet href="'+j+'">');

```

with

```
else k.push('<script type="text/javascript" src="//use.typekit.net/XXXXXXXX.js"></script><script type="text/javascript">try{Typekit.load();}catch(e){}</script><link type="text/css" rel=stylesheet href="'+j+'">');

```

(XXXXXXXX = the string from your Typekit embed code)

# Answer
> 4 votes
Instead of modifying CK Editor files which would likely get nuked if you update the add on you are best to make a `customConfig` in the **Editor Configurations**.

Change this and save this out to where you keep your front-end templates.

```
var typkitID = 'XXXXXX';

CKEDITOR.on(
   'instanceReady',
   function(ev) {
      var $script = document.createElement('script'),
         $editor_instance = CKEDITOR.instances[ev.editor.name];

      $script.src = '//use.typekit.com/'+typkitID+'.js';
      $script.onload = function() {
         try{$editor_instance.window.$.Typekit.load();}catch(e){}
      };

      $editor_instance.document.getHead().$.appendChild($script);
   }
);

```

Then in the editor `Modules > WygwamEditor > Configurations > CONFIG-NAME`

You will also need to point the editor to your CSS file and likely use a `bodyClass`.

---
Tags: add-on, css, wygwam
---


title: Log everyone out

text:
# Question
Title: Log everyone out
Does anyone know if it's possible to log everyone out of ExpressionEngine to force everyone to login again on their next visit?

Due to the Heartbleed bug, I have noticed a few other sites/services doing something similar.

# Answer
> 1 votes
Deleting everything in the `exp_sessions` table, and everything under `system/expressionengine/cache` should be sufficient to log out all users.

I'd also recommend changing `$config['encryption_key']` in `system/expressionengine/config/config.php` if you have that set.

# Answer
> 1 votes
I haven't tested this but you could probably start by clearing out the exp\_sessions table.

However, I'm not certain this is going to help with regards to the Heartbleed issue. Has your server been patched? Was it vulnerable? Do you log users in via https?

---
Tags: members
---


# Question
Title: Expresso Checkout conditional (use hook?)
So, at the end of the checkout process (where it becomes an order) I want to fire off an SQL query wrapped inside AJW export (which creates an xml file).

However, within the confines of ExpressionEngine and Expresso respectively how precisely would I do this?

The idea would be:

User hits submit --\> No Errors --\> Turn into order --\> Fire off AJE\SQL XML --\> Redirect user to whatever page.

I'm guessing I'd use a hook or something like this, right?

store\_order\_complete\_start

Any suggestions for how this might be most suitably accomplished? The documentation is kind of thin when it comes to this stuff.

On the other hand, would it be possible for me to put the code in a template and do a 'next' on the checkout tag instead of 'return' so when the user hits "confirm" it takes them to a template with the code, which automatically creates the order and returns them to a page with the hash?

If I'm over thinking this, I'm totally open to any solution that proves to be simpler\superior.

Edit: Have this figured out. Wrapped the PHP\AJE code inside a javascript function and had an even listener tied to the checkout submit button. Seems to be working just fine!

Edit: No, this won't work. Because it hasn't been put into the database by the time this script executes...

# Answer
I think either method would work.

The hook is going to be the more nerdy (read "hard") way to do it. I use the store\_order\_complete\_end hook to trigger code that notifies other systems of the order. Depend ing on how AJW Export is written, you may be able to fire it off from your code in the extension.

The easier approach would be to do it in the template. You can set your return parameter on the checkout tag to `return="cart/confirmation/ORDER_HASH"` (obviously using your template group and name).

On the confirmation template you could just fire off a plugin, which will have access to the hash in the URL to find the order and do whatever DB queries you need done.
> 2 votes

# Answer
I recently made an extension to do this, so I've put it up on GitHub for others to learn from.

https://github.com/expressodev/store\_order\_export

Generally, you want to use the `store_order_complete_end` hook, which runs when an order is marked as "complete" (when payment is successful). From there it is easy to write an extension which generates any XML (or other reporting format) necessary. The example extension should easily be modified to suit your particular needs.
> 2 votes

---
Tags: expresso-store, mysql, hook
---


# Question
Title: Is it possible to return matrix row/column content from a third-party search plugin?
I'm trying to brainstorm the best way to setup a product search functionality on a site in development. I thought maybe I would have one entry per product, then each variation of that product would be in its own Matrix row (columns = item#, color, woodtype, image url, etc.). So if I searched for "Tables" with color "White", woodtype "Pine", I could return the image of that product variation as well as the rest of the variation's row content(Only ever finding the one exact matching result). I'm looking to use a third-party search plugin, so Low Search or SolSpace Super Search. I'm also hoping to eventually return the result via Ajax if one of those plugins makes that easier.

Or maybe each variation variable is a category? Then I could search for "Tables" with "White" set as the color category, "Pine" set as the woodtype category, etc.? Or use Tags?

Any thoughts on the best way to accomplish this would be great. Thanks!

# Answer
> 1 votes
In Low Search, if you want the Matrix data to be searchable via Keywords, you'd have to use the same approach as Super Search: set the columns as "searchable".

However, you can also use Low Search's Field Search filter to target specific Matrix columns, regardless of whether they're marked as searchable or not.

Both searching methods will return the *entry* the Matrix field belongs to. To return just the Matrix row within that entry, you'd have to use its search parameters to pull out specific rows.

# Answer
> 1 votes
If you set your Matrix columns as "searchable", data in the Matrix field get saved in exp\_channel\_data, which Super Search can use in its searches.

You could then search in your Matrix field for the word "Pine", for example, and if there is a match, use regular Matrix tags to pull out the specific row containing "Pine".

---
Tags: matrix, solspace, low-search, supersearch
---


# Question
Title: EEHarbor Transcribe 1.6 and EE 2.8 - error
We're getting the following error when we upgrade to 2.8 and 1.6 transcribe:

```
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /httpdocs/system/expressionengine/third_party/transcribe/mod.transcribe.php on line 9

```

Think it must be due to them require PHP 5.3+ but we're running 5.2.10, anyone able to recommend a fix for this?

# Answer
Turns out our server didn't have the required PHP version for 1.6 of transcribe
> 0 votes

---
Tags: ee2-upgrades, transcribe, eeharbor
---


title: Images disappear from entry

text:
# Question
Title: Images disappear from entry
I've just been contacted by a client who is finding that images are missing from a file field when an already published entry is reopened. Does anyone have an idea why this could be happening?

Edit: The file field is within Matrix 2.2.4, EE is v2.4. Original installation was around two years ago.

# Answer
Upgrading to Matrix 2.5.10 fixed the problem
> 1 votes

---
Tags: matrix, file-field
---


title: filter related entries by category

text:
# Question
Title: filter related entries by category
EE2.7.2

I have a native relationship field 'related\_products' pulling in multiple entries from a products channel. Most products are in 2 top level categories - group\_id 1 and group\_id 2. I want to pass the category\_url\_title in my link.

The code below returns both the categories in the url:

```
{exp:channel:entries channel="featured_products" dynamic="no" limit="1" url_title="featured" status="open" disable="pagination|member_data|category_fields"}
{related_products limit="12"}
    <a href="{site_url}brands/{related_products:categories}{category_url_title}{/related_products:categories}/{related_products:url_title}" title="View product details">LINK</a>
{/related_products}
{/exp:channel:entries}

```

If I add 'related\_products:categories limit="1"' to the code as below, it will return just one category - always from only group\_id 1.

```
{exp:channel:entries channel="featured_products" dynamic="no" limit="1" url_title="featured" status="open" disable="pagination|member_data|category_fields"}
{related_products limit="12"}
    <a href="{site_url}brands/{related_products:categories limit="1"}{category_url_title}{/related_products:categories}/{related_products:url_title}" title="View product details">LINK</a>
{/related_products}
{/exp:channel:entries}

```

I can't seem to find a way to filter the 'related\_products:categories' to show the second group of categories.

Can anyone help?

# Answer
I'm not sure I get what you finally want, but to show the second group of categories try using the show\_group parameter to the categories tag (with the category group id):

```
{related_products:categories show_group="2"}{category_url_title}{/related_products:categories}

```
> 1 votes

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


# Question
Title: If condition for phpstringfun or streng?
I want to find if a string contains a word ot not? It is a pretty simple thing if i want to do it in php.But When it comes to EE you need some plugins to do the job of strpos.

I have two plugins streng and phpstringfun.

But both of them have terrible documentation.

```
{exp:phpstringfun function="strrpos" par1="videos"}Videos/blah/blah{/exp:phpstringfun}

```

or

```
{if "{exp:streeng find='this'}This is a test string{/exp:streeng}"}
match exist
{/if}

```

I get wrong results for both of them.My php stage is input.

# Answer
I ran into trouble with streeng as well on doing just a find in a conditional, but it worked well with find+replace (ee 2.8.1), maybe hit up the developer.

For phpstringfun, in the example you put up you're doing a search for string position that's case sensitive. Try strripos and it should work with your example:

```
{exp:phpstringfun function="strripos" par1="videos"}Videos/blah/blah{/exp:phpstringfun}

```

And for an add-on with more documentation try CE String.
> 1 votes

---
Tags: ee2, ifelse, phpstringfun, string
---


title: Error After Install

text:
# Question
Title: Error After Install
I updated from 2.1.0 to 2.8.1 and afterwards tried to login to the CP, got this error.

"This form has expired. Please refresh and try again."

Made sure there was no folders in the cache but I maybe something is stuck in the db. Not sure and need some help.

Any ideas?

# Answer
Ok so after 5 hours of banging my head on the table and only getting a nasty bump on my forehead I have a fix that was a 1 second fix.

Basically I had to comment out like this //$config\['cookie\_prefix'\] = ''; in config.php

This all started to happen after I moved from a Plesk environment to a Cpanel setup.

Originally I found the follow code from another answer dealing with not being able to login and it worked so I went through and commented out 1 item at a time. Leaving me with the answer and fix, here is that code. I hope it helps save someone else time and aggravation.

`$config['cookie_domain'] = "";
$config['cookie_path'] = "";
$config['cookie_prefix'] = "";
$config['admin_session_type'] = "s";
$config['user_session_type'] = "c";
$config['require_ip_for_login'] = "n";
$config['require_ip_for_posting'] = "n";
$config['secure_forms'] = "n";`
> 7 votes

# Answer
I would recommend against editing the config file. Instead, it appears you need to include the following line in any that is posting

```
<input type="hidden" name="XID" value="{XID_HASH}" />

```

I had the exact same issue when updating from 2.5.2 to 2.8.1. I added that line and all is good. A few simple AJAX POSTs I converted to GETs to also get around this issue.

I found this solution on this thread: http://ellislab.com/forums/viewthread/237658/

---

btw, just found more info. Security changed some more in 2.8 v 2.7. So if you want to disable "secure forms" you'll need to use this in config.php instead of what is posted elsewhere.
```
$config['disable_csrf_protection'] = "y";

```

More info here: http://ellislab.com/blog/entry/sessions-login-modals-and-secure-forms-in-expressionengine-2.8
> 6 votes

---
Tags: ee2-upgrades
---


title: Disable Secure Forms in config.php

text:
# Question
Title: Disable Secure Forms in config.php
I can't log into my control panel and I think the issue is related to "secure forms" being enabled. How do I disable "secure forms" in the EE config file?

# Answer
Add the following into the EE config.php file to disable "secure forms":

```
$config['secure_forms'] = "n";

```
> 3 votes

# Answer
As of 2.8 it's changed slightly... So if you want to disable "secure forms" you'll need to use this in config.php instead of what is posted elsewhere.

```
$config['disable_csrf_protection'] = "y";

```

More info here: http://ellislab.com/blog/entry/sessions-login-modals-and-secure-forms-in-expressionengine-2.8
> 6 votes

---
Tags: config, secureforms
---


title: Many errors showing after 2.8.1 upgrade

text:
# Question
Title: Many errors showing after 2.8.1 upgrade
Just wondering if anyone else has seen lots of error messages appearing at the top of their pages (when logged in) after upgrading to 2.8.1? (I jumped a few versions with this upgrade, so it may affect other versions, too.) Errors such as

```
A PHP Error was encountered
Severity: User Warning
Message: Invalid EE Conditional Variable: {if ""y"}
Filename: libraries/Functions.php
Line Number: 2640

```

and

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

```

and this one multiple times per page:

```
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: category_name
Filename: helpers/segment_helper.php
Line Number: 98

```

I don't know what to do about all this, so any suggestions appreciated.

# Answer
> 3 votes
The first error indicates that some if-statement in your template is wrong. Maybe you have a " sign to much? If this error is on all pages maybe some embeded template has it - if not it can be in a specific template. See this:

```
{if ""y"}

```

The second PHP-error just tells you theres been some output to the browser before the standard output (the template) has been sent. So you can ignore that one for now. It'll disappear when the others are corrected.

For the last error I would go through my template to see how your are using the variable {category\_name} in your templates.

# Answer
> 2 votes
I've been getting the same "Undefined variable: category\_name" since I upgraded to 2.8.1. It only shows up when I'm using Super Search which I figured was needing to be updated to support EE 2.8.1. Super Search ver 2.1.4 was released on April 8 and the error persists after upgrading.

Thankfully, the error only shows when logged in which the client and visitors shouldn't see. When are you specifically seeing this error show? Are you using Super Search?

I'm not using the variable "category\_name" anywhere in my templates. I'm embedding a header and footer into the results template and removing each embed will lower the amount of errors it shows so it's depending on how many templates are used to render the page and 'category\_name' is not used on any of those templates.

If you're using Super Search as well, then I plan to send a request to them (since v2.1.4 didn't fix it), but if it's completely unrelated then the bug should be reported to EE.

---
Tags: upgrade, php-errors
---


title: Playa not displaying assigned entries

text:
# Question
Title: Playa not displaying assigned entries
I have added Playa field to the channel and then assigned entries from another channel to an entry which contains Playa field, but I'm not getting anything from Playa tag.

Code:

```
{exp:channel:entries channel="collection" category="84" url_title="{segment_3}" status="open"}
    {title}<br>
    {collection_description}<br>
    Collection contains:
    <ol>
    {collection_products_list}
    <li>{title}</li>
    {/collection_products_list}
    </ol>
{/exp:channel:entries}

```

For me it looks like `{collection_products_list}` playa tag is not parsed. Any clue?

Thanks

# Answer
Found what was causing issue - custom status of selected entries in the Playa field. Those color dots near entries titles there are representing statuses (green - open, red - close, other colors - custom statuses).

In that case I have included custom statuses to the Playa tag.
> 1 votes

# Answer
If you have custom statuses, and you want to show everything, it will help you to get into the habit of using status="not closed". You could even create a global variable for the default status parameter to use.
> 1 votes

---
Tags: channel-entries, playa
---


# Question
Title: No Head or Footer HTML Loading in CP - v2.8.1
v2.8.1 Build Date: 20140314

Having an issue where the header and footer HTML doesn't load randomly. Sometimes it does, sometimes it doesn't. This happens randomly when navigating the CP control panel. It happens more often when submitting or updating a category under Admin \> Categories \> Create a New Category.

For example, I create a new category and hit the submit button. The next page returns a response of 200 text/html that looks like this and nothing else.

URL looks this: http://mysite.com/myadmin.php?/cp/admin\_content/category\_update?S=dbcc62fcecfde00324b7db8e87cef88b

`{"message_success":"Preference Updated"}`

This happens about 80% time. Sometimes it doesn't.

This is hosted on the Media Temple GS. The system folder is above web root. I never remember seeing a question mark after the admin PHP file followed by a slash. My guess is that the CP urls have changed recently?

Anyone have any ideas on what could be causing this?

**EDIT: This has been fixed. FastCGI enabled on Media Temple's GS was causing this. Switch FastCGI to just CGI. Thanks Alex.**

# Answer
This most likely means that one or several of the files in themes folder is not uploaded correctly. Re-upload themes folder and make sure the path and URL for themes folder are correct in EE preferences.
> 1 votes

---
Tags: ee2, control-panel, 2.8
---


title: Trouble Upgrading from 2.5.2 to 2.8.1

text:
# Question
Title: Trouble Upgrading from 2.5.2 to 2.8.1
Is it possible that there's some kind of issue for anyone upgrading from EE 2.5.2 to 2.8.1? I've tried it several times now, and what happens is the process starts and initially takes EE to 2.5.5, then stops at 2.6.1. The main admin.php file is then stuck on the welcoming upgrade screen, even when deleting the /installer directory.

# Answer
When I've come across similar issues it's been down to the contents of config.php. Check what `$config['app_version'] = '';` is set to. It should match the version of EE that is currently installed when you run the installer (2.5.2 in your case). When it's been set to a different version (sometimes because the config files has been copied across from another installation when setting things up on the new site) I've seen the errors you describe.

Unfortunately they've not been easy to fix once you start getting into that situation as the installer and the current installation start getting confused. In those cases I've found it easier to restore from a backup, double check the settings, and then proceed with the upgrade.

I don't think there should be any particular problem with the upgrade proceedure from 2.5.2 to 2.8.1 however.
> 2 votes

---
Tags: ee2, v2.5.5, 2.8
---


# Question
Title: Solspace Friends: Is there a way to show a list of all friends of certain member?
When viewing a profile (member\_id in segment\_3), can I show all the friends of this person? I seem not to be able to find it in the docs. Thanks a lot for clearing this up for me.

# Answer
> 0 votes
The `{exp:friends:mine}` tag is what you need and you can use `member_id` as a parameter. The member\_id parameter allows you to pass in a segment variable among other means.

The Friends:Mine function itself allows you to display a list of their friends so you just need to output whatever information you need within this tag pair.

---
Tags: solspace-friends
---


title: parent total count playa conditional

text:
# Question
Title: parent total count playa conditional
Hey I am trying to use conditionals with Playa. I can't seem to get the following code to work

```
{if {exp:playa:total_parents channel='listing'} > '0'}
        <section class="listing-cards">
            <div class="gen-wrap">
                <header class="section-header light">
                    <h1>Our Listings</h1>
                    <h2>{title}</h2>
                </header>
              {exp:playa:parents channel="listing" status="not closed" show_expired="no"}
                    {lv_listing_card}
              {/exp:playa:parents}
        </div>
        </div><!--gen-wrap-->
        </section><!--listings-->
        {/if}

```

I don't want to show the .listing-cards section if there are no results. What am I doing wrong?

# Answer
First to make it clear did u use it in {channel:entries} loop if not you should , and if you want to use it outside {channel:entries} loop you must add entry\_id param

I am test your code on my localhost and it's work fine.

I hope this will help you.

Regard's.
> 1 votes

# Answer
I'm not exactly sure on the full context but the problem could very well be the quotation marks around the 0. If you're comparing against a number then you don't need quotation marks as that will convert it to a string and will never match:

```
{if {exp:playa:total_parents channel='listing'} > 0}

```

If that doesn't work then you can probably simplify things a bit as the Playa loop—as with the Channel:Entries loop—will by default output nothing if there are no matches made. Using this as an example:

```
{!-- Parent (The channel with the Playa field) --}
{exp:channel:entries channel="news"}
    <h3>Article Media</h3>
    <ul>
        {exp:playa:children field="article_photos"}

            {if count == 0}
                {!-- Show substitute content --}
            {/if}

            {!-- Otherwise show the child entries --}
            {!-- Default behaviour: Nothing shown if nothing matched --}
            <li><a href="{path={channel_short_name}/{url_title}}">{title}</a></li>

        {/exp:playa:children}
    </ul>
{/exp:channel:entries}

```

So you should be able to use the regular `count` tag to check for the existence of any child entries (related articles).

If you want an alternative way to check for any child entries then you can use:

```
{if "{playa_parent:total_children}" > 0}
  ...
{/if}

```

Where `playa_parent` is the name of your Playa field.
> 1 votes

---
Tags: playa, conditionals, advanced-conditionals
---


# Question
Title: User can't log in using local copy of Chrome
This isn't the usual "I can't log in" issue. A user is trying to log in on her copy of Chrome and cannot. She gets "Invalid username or password" errors every time. She then used Safari and it worked for a day, now it too won't let her log in. The same user account on a different computer works just fine. It applies to logging into the control panel and front end login forms. She says no other websites give login issues.

If that wasn't strange enough, other user accounts WORK!? It is just isolated to her username (her email address).

We cleared all the browsing data in Chrome and looked over the cookies to make sure there were not any for this site. Short of uninstalling Chrome and reinstalling it I'm not sure what else to do.

There are the usual fixes we tried: setting security to session ID or Cookies only, playing with the server's date settings, etc. Nothing worked.

To sum up: logging in with her username/password works on every computer but hers. Logging in on her computer with other usernames and passwords work.

# Answer
> 0 votes
We never were able to figure out what wasn't right. We eventually had to remove Chrome and re-install it. Since then it is working.

# Answer
> 0 votes
Might be a DNS issue - try clearing DNS cache http://www.ihash.eu/2013/10/clear-dns-cache-mac-osx-10-9-mavericks/

---
Tags: login, chrome
---


# Question
Title: Solspace Calendar - output day-by-day list of occurrence start dates
I am really struggling to get the Solspace Calendar Module to do something that seems to me would be a fairly common requirement.

**Use Case**

* I have a travel site which is centered around package tours, and I've created calendar events for each tour's departure schedule.
* Tour departure events are multi-day, and have repeat rules to determine when the subsequent 'occurrences' will be scheduled.
* Typically a given tour could have a range of departures that starts in say, January, and ends in December.

**I need to output the following**

* day-by-day calendar template
* listing tour departures ('occurrences') for each day, for the next month or so.
* I do not want to show multi-day occurrences that **already started** as this is not useful information for someone who wants to join a tour at the point of departure.
* I would prefer not to use in-template conditionals to filter out occurrences that already started, because I'm dealing with a lot of data - over 300 tours with 5-50 occurrences for each - and this will be resource intensive, as well as pretty clumsy.

**What I've tried**

1. **{exp:calendar:cal} template tag** (and all other template tags) - eg:

> {exp:calendar:cal date\_range\_start="tomorrow" pad\_short\_weeks="n" date\_range\_end="1 month" first\_day\_of\_week="1"}
>
> ```
> {display_each_day} output occurrence start dates here {/display_each_day}
>
> ```
>
> {/exp:calendar:cal}

* Fails because it kicks out all occurrences that are **in progress** on the day specified, rather than just the occurrences that **start** on the day specified. So I'm seeing events that started before the date range, but are still in progress. Some tours are as long as 56 days, so results will be way out for a daily departure listing.
2. **Custom Query** \- I was sure this would solve it, but no joy so far.

> SELECT exp\_channel\_titles.title AS t\_title, exp\_channel\_data.entry\_id AS d\_entry\_id FROM exp\_calendar\_events\_occurrences
> LEFT JOIN exp\_calendar\_events ON exp\_calendar\_events\_occurrences.event\_id = exp\_calendar\_events.event\_id LEFT JOIN exp\_channel\_titles ON exp\_calendar\_events\_occurrences.entry\_id = exp\_channel\_titles.entry\_id LEFT JOIN exp\_channel\_data ON exp\_channel\_titles.entry\_id = exp\_channel\_data.entry\_id WHERE exp\_calendar\_events\_occurrences.start\_date = '{date format="%Y%m%d"}' AND exp\_calendar\_events\_occurrences.calendar\_id = '887'

* this fails because the exp\_calendar\_events\_occurrences table does not appear to actually contain ***all occurrences***. I'm guessing event rules are used by the module to output repeat occurrences that do not appear with this approach.

# Answer
`{exp:calendar:cal}` has the following tags that could be used:

* {event\_**start**\_date}, which displays the occurrence's start date.
* {event\_**first**\_date}, which displays the date of the event entry's **first** occurrence.

For example, if you have an event that starts and ends on April 11th, and repeats daily until April 17th, {event\_first\_date} will be April 11, but {event\_start\_date} will display the start date of each looping occurrence (April 11, 12, 13, 14, 15, 16, 17).

In your situation you need to check if {event\_first\_date} isn't *before* the first day of your {exp:calendar:cal} timeframe. For example:

```
{exp:calendar:cal
     date_range_start="2014-04-11"
     date_range_end="2014-04-17"
     pad_short_weeks="n"}
  {display_each_day}
    {events}
       {if '{event_first_date format="%Y-%m-%d"}' >= '2014-04-11'}
           // Show occurrence data
       {/if}
    {/events}
  {/display_each_day}
{/exp:calendar:cal}

```

This will only display the occurrence if the event's **first** occurrence is on or after 2014-04-11. (You can tweak the conditional to check for {event\_**last**\_date} and the last day of your range as well if needed)

You might now think: "*Great! But how to make the "2014-04-11" part dynamic?*"

You can do this by using the `{exp:calendar:date}` tag: http://www.solspace.com/docs/calendar/date/

For example:

```
{exp:calendar:date base_date="today" output_date="today"}{date format="%Y-%m-%d"}{/exp:calendar:date}

```

This would turn the {exp:calendar:cal} above to something like this:

```
{exp:calendar:cal
     date_range_start="today"
     date_range_end="+7 days"
     pad_short_weeks="n"}
  {display_each_day}
    {events}
       {if '{event_first_date format="%Y-%m-%d"}' >= '{exp:calendar:date base_date="today" output_date="today"}{date format="%Y-%m-%d"}{/exp:calendar:date}'}
           // Show occurrence data
       {/if}
    {/events}
  {/display_each_day}
{/exp:calendar:cal}

```
> 1 votes

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


title: file manager doesn't display subfolder

text:
# Question
Title: file manager doesn't display subfolder
Using Expresso I want to insert an image from a sub-folder of the upload directory. But the file manager doesn't display the subfolders, even after to synchronize the files. I tried many settings with no results

# Answer
The default file manager does not allow for browsing of subdirectories. You would need to use something like Assets ( http://devot-ee.com/add-ons/assets ).
> 2 votes

---
Tags: file-uploads, file-manager
---


# Question
Title: Expresso Store DPS/PxPay Response Issues
When using PaymentExpress\_PxPay on my Expresso Store, it all works fine until I get returned from DPS with the below URL.

```
/?ACT=30&H=5c08b9f81972472bd8f0a7691a82388c?result=v5Z1giv_jYce6gai7Ng6XIMCiiGkz5I43snkE6WWVwfMmZMy9iGlWiDp3v4fiv-qYrY9n4YCoX8GC0QnrXLmu95MKZ16QRPLhNgzm7Glv3riSlyGCVNOHGdxSEQLDGxveHs6chn3pdo-osy1ElCqxlvCVBlp7t5P7g7MRsEnUS3tK2sR6tvuCOrkFZJ71reJGDn6jeqEq6LYz20vdeZPF3TtPHPAQaD5hX0_sSJ2fDnMESgsiupFvv5mU4zNoNXL5OlUxR4Z34Jq-ZNyK--NEvcGk8zZHvOkouriaVeeKhhJjCCB8SX64lCeyDgcsfRkofXcx2Qnr4R6qV2qjZkTt2YmdviXQCwxqzKRR5g-ZPTgiZTXn6bu68YE6fzCN94O1K_pFCO4aZ2lN2NR35Ced8eW41LuIkI4VDZYFvXOaG-h7EVETm3XWTARVm-f_rgtyyxwbAi2kJBrfMsp4w59KZx13ACqBRje6-&userid={my DPS user id}

```

Store can't extract the transaction hash out of the get data. (In Module.php, act\_payment\_return()) It looks for the index "H" which you can see below, but that drags "?result" and all the rest with it two as it's not properly. I seem to remember having some strange issues with processing DPS responses in the past when building my own payment processors, but as this is an out of the box product where this is already built I thought I better see if anyone else has had this issue.

EE V2.7.2, Store V2.0.6

# Answer
> 0 votes
I believe this issue has been resolved in Store v2.20. If you upgrade to the current latest version you shouldn't have any problems.

Alternatively if you're using EE 2.7 then set "Process form data in Secure Mode" to "No" in Admin \> Security & Privacy \> Security & Sessions in the control panel.

---
Tags: expresso-store
---


title: Low Seg2Cat not working (empty output)

text:
# Question
Title: Low Seg2Cat not working (empty output)
Hi Low (or anybody else),

I have a similar problem to this one in the old devot-ee-support-forums. When I use Seg2Cat-tags they produce nothing (means: empty output). Template-Debugging returns a lot of pipes in the Snippet-Values ("||||").

In the mentioned thread Low wrote:

> First of all, check if the correct category groups are selected in the extension settings. If the category in the URI belongs to a non-selected category group, then the empty string is correct output.

The category group is selected, the category exists.

> Or else, enable the output profiler and look up the SQL query performed by Seg2Cat, which should look something like “SELECT LOWER(cat\_url\_title) AS cat\_url\_title…”. Then run that query in the SQL manager. If there are results in the SQL manager, but not from the extension itself, then there’s a conflicting extension somewhere, probably. Check which extension use the sessions\_end hook as well and try to disable them to see of that helps.

Now I used the SQL-query, I think it's this one:

```
SELECT `cat_url_title`, `cat_id`, `parent_id`, `group_id`, `cat_name`, `cat_description`, `cat_image`
FROM (`exp_categories`)
WHERE `site_id` =  '1'
AND `cat_url_title` IN ('schule', 'lowseg2cattesttrash', 'deutschunterricht')
AND `group_id` IN ('1')

```

and I get one result (the correct category).

Now my question is if there is any help for me identifying the problematic plugin. I have a lot of plugins installed, mostly commercials which I need (Assets, CE Tweet, FireMail, LowSearch, Rating, Playa, Threaded Comments, Wygwam ...).

I would appreciate any help very much, because it would be a useful delight for me to use Seg2Cat.

Thanks in advance!

# Answer
> 2 votes
Low Seg2Cat currently (v2.8.0) expects lowercase category url titles. If you have any uppercase characters in them, they will not be matched. By default, this should pose no problem, as EE will always lowercase them. But if you're importing them, or manually setting them, they might have uppercase letters in them.

To change all category url titles to lowercase, use this query:

```
UPDATE exp_categories SET cat_url_title = LOWER(cat_url_title);

```

This query will fix the issue in this case.

# Answer
> 0 votes
Low himself was 2 minutes on my server and got it all fixed. The problem was that the category url titles have been containing uppercase-letters. After converting everything to lowercase it all works.

A big thanks to Low for his quick and ultra-competent support!!

---
Tags: low-seg2cat, low
---


title: Cartthrob and PayPal Express Niggles

text:
# Question
Title: Cartthrob and PayPal Express Niggles
Having a few issues with PayPal Express and CT Pro 2.2.9:

1. Upon checking out to PayPal and clicking PayPal's "Cancel and Return to Store" link, the user is taken back to the URL in the checkout form's return parameter. Does PayPal Express not make use of the failed\_redirect parameter?
2. Upon a successful PayPal Express transaction, CT's cart isn't emptied? I have tried this method (http://cartthrob.com/forums/viewthread/7557/), however, the clear cart tag, although in the if authorized conditional, empties the cart on payment failure also.

Many thanks

# Answer
> 1 votes
Re: 2.

My checkout\_form returns to /checkout/clear\_cart. I was having the same issue with the cart not being emptied on a successful transaction, so here is what I used:

```
{exp:cartthrob:submitted_order_info}
        {if segment_2 == "order_status" OR segment_2 == "clear_cart"}
            <div class="store_block order_status">
                    {if authorized}
                        {if segment_2 == "clear_cart"}{embed="_includes/.clear_cart"}{/if}
                        [html removed]
                    {if:elseif processing}
                        [html removed]
                    {if:elseif declined}
                        [html removed]
                    {if:elseif failed}
                        [html removed]
                    {/if}
            </div><!-- /order messages -->
        {/if}
{/exp:cartthrob:submitted_order_info}

```

Then I put my clear\_cart in the \_includes embed template.

```
{exp:cartthrob:clear_cart return="checkout/order_status"}

```

I'm sure you could modify this to work for you too. I cancel transactions on Paypal and returned to the checkout page with the cart keeping my items in it (which is how I wanted it), and when I complete a successful transaction the cart gets cleared and the successful transaction message displays.

# Answer
> 0 votes
I believe I read something about this error in the CT changelog. I might be wrong. Might be worth a look there. Here is a new version out now.

# Answer
> 0 votes
Seems like this issue is back again. I'm running CT v2.4 and when I select PayPal from the available gateways (I have two) I'm directed to PP as expected. If I then select the "Cancel and return to \[Company Name\] Pty Ltd." button I'm redirected back to my site but I receive a success response message and a corresponding order number. Also the item is still available in the cart.

Can reproduce every time.

In the backend the order is displayed but with the "Failed" status defined.

Thanks a mill,

Andy.

---
Tags: cartthrob, paypal
---


title: Cancel order in cartthrob

text:
# Question
Title: Cancel order in cartthrob
is it possible for a customer to cancel an order in cartthrob? E.g. he buys a ticket but recognizes that he does not have time to go to the event. So he wants to cancel his order.

Does anybody has an idea to solve this problem?

# Answer
> 0 votes
Maybe give users acces to your order channel? Show them of course only their own orders, and let them edit or delete. Only problem exists if they have already payed. In that case a mail to the shop owner with all the details? An inbetween option would be a time slot. Delay the actual money withdrawal, giving customers opportunity to cancel/alter the order. After that, no refund possible, unless against some costs.

---
Tags: cartthrob, orders
---


# Question
Title: Nerdery CP Theme - Grid UI Issue with Reordering Rows?
This is a minor issue and there are surely more important questions to be answered.

But I am using the Nerdery CP theme and noticed an issue with the UI of the Grid fieldtype.

When I try to reorder Grid rows (in EE 2.7.3 and 2.8.1), I cannot drag rows between other rows, they just jump to the bottom or top of the set. I made a quick video to demonstrate: http://youtu.be/p8-5OjqnDd0)

If I turn off the Nerdery CP theme, then the reordering seems to work fine (but that's a drag -- so to speak -- because Nerdery looks so much cleaner and less pink).

Alas, the Nerdery devot-ee forum is archived only, so I was wondering if anyone has noticed this issue and possibly resolved it in the override CSS?

# Answer
> 2 votes
there. Thanks for pointing this out. I haven't noticed it in my environments, but I'll take another look. In the mean time if you know the fix you can send a pull request to https://github.com/litzinger/Nerdery-Theme

---
Tags: grid, cp-themes
---


# Question
Title: expressionengine wygwam content (links) break when included in form field
using the EE "email to friend" form, I need to include the contents of a WYGWAM field in a hidden form field. here's what that looks like:

```
<input type="hidden" name="message[]" value="{title}{product_description}" />

```

the {product\_description} field is WYGWAM content and contains links. the quotes in the links (`<a href="..."`) are breaking the formatting of the page because the browser reads the first href=" quote as the closing quote for the hidden field value. it's a quick fix to just change the hidden field attributes to single quotes but then it breaks the formatting if the {product\_description} contains single quotes...

what's the best way to avoid that?

# Answer
> 0 votes
You need to strip all HTML from that content, and convert the quotes to entities. That email is going to be sent as plain text by the Tell-A-Friend form, so you'll need to remove all the HTML anyway.

Take a look at CE String \- worth the small investment. You'd do something like this:

```
{exp:ce_str:ing removehtml htmlentities}{title}{product_description}{/exp:ce_str:ing}

```

Or, enable PHP in your template (on output):

```
<?php echo strip_tags(htmlentities("{title}{product_description}")); ?>

```

---
Tags: ee2, pixelandtonic, wygwam
---


# Question
Title: Expresso Store & Sagepage 3107 BillingsSurname Error
I am guessing this is similar to the question Expresso Store: SagePay Server rejecting missing BillingSurname in some ways, thou the solution on this entry does not apply anymore with Store 2.+

If I hard code in a billings\_name hidden field into the details page before review then the system works else it get this error from SagePay. Currently I have a first/last name setup with the details and this is reflected with in the store fields settings.

Am i missing a configuration ?

# Answer
For expresso 2.3.1 SagePay will return a error of - 3107 BillingsSurname if the card details form is present on the review template. I guess this is because the payment\[card\_name\] is used instead of billings\_first\_name & bilings\_last\_name. Removing or commenting out this form will resolve this issue.

*Thanks Adrian Macneil for the solution*
> 0 votes

---
Tags: expresso-store
---


title: Private link to view closed entry

text:
# Question
Title: Private link to view closed entry
I need to be able to generate private links for entries that aren't visible on the front-end of the website. I guess I could just setup an alternative template that isn't linked within the website structure. The links don't need to be very secure but this still feels a bit half-baked. Has anyone setup something like this before?

# Answer
> 5 votes
If it doesn't need to be particularly secure, create a separate sub-domain, and set up a global variable to show different statuses depending on which sub-domain they're on. If you're using FocusLab Master Config this is simple, otherwise try something like this in your main public index.php file under where it says "CUSTOM CONFIG VALUES":

```
switch($_SERVER["HTTP_HOST"]) {
  case "previews.domain.com" :
    $assign_to_config['site_url'] = 'http://previews.domain.com/';
    $assign_to_config['global_vars']['gv_entry_statuses'] = 'open|Draft';
    break;
  case "www.domain.com" :
  case "domain.com" :
    $assign_to_config['site_url'] = 'http://www.domain.com/';
    $assign_to_config['global_vars']['gv_entry_statuses'] = 'open';
    break;
}

```

Then any time you use a channel entries tag, add the parameter `status="{gv_entry_statuses}"`

You can use this technique to allow editors a quick and simple workflow for creating new content before launching to the live site. Rather than using the 'closed' status you should really create a new custom status for this, such as "draft" or "pending", because it's useful to keep "closed" for stuff that really should never appear anywhere *ever* (but for some reason needs to be kept in the system).

You can also use this technique for quick and dirty forking into separate templates, e.g. you could specify a different folder for tmpl\_file\_basepath using `$assign_to_config['tmpl_file_basepath']` so that the sub-domain displays a completely different version of the site. (Much better to use a proper version-controlled environment with Git deployments, but that can take a while to set up and is not necessary for really small sites.)

---
Tags: channel-entries, links, secure
---


title: Addon - Forget Password Email Hook

text:
# Question
Title: Addon - Forget Password Email Hook
Is there an add-on that can provide a hook to change the forget password email?

# Answer
> 1 votes
You don't need a hook to change the contents of the email for forgotten passwords.

Just go to Design -\> Message Pages -\> Email Notifications

---
Tags: hook, forgot-password
---


# Question
Title: is there a hook when a member resets it's password?
is there a hook when a member uses the forget password feature?

Looking at the hooks documentation, I don't see any hook in there that might do this.

# Answer
> 2 votes
There are no ExpressionEngine hooks for the *forgot password* feature but given that you intention is to override the email being sent when a user forgets their password you mainly just need to change that template. The default styling can be changed in:

Design \> Message Pages \> Email Notifications.

Alternatively Postmaster provides a nice abstraction to work with. It's a commercial addon but is quite versatile. Postmaster provides it's own `send system email` hook to use.

> "This hook will send an email anytime a system email is sent. This hook is great for globally overriding all system emails so you can send them with your preferred service."

This can be used to override any of the default settings and you can even send multiple emails to different recipients if you wanted.

Failing that Custom System Messages is another commercial addon which can do the job as the name suggests. The advantages include the ability to parse other EE template tags and save the *Message Pages* to files on the filesystem (so you don't have to edit via the Control Panel).

Lastly Libraree is another similar commercial addon (and a personal favourite) providing much the same thing in allowing you to save *Speciality Templates* to the filesystem and parse other EE template tags. The advantage with this one is that it also saves snippets and global variables as files too.

> "Plus, it provides the ability to quickly style notification emails into beautiful HTML emails and style all system messages into proper designed templates."

So there are a number of ways to change the default email message templates being sent along with much cleaner ways to edit them. It's all down to preference. :)

---
Tags: hook
---