Adrian Macneil
  • Member for 9 years, 2 months
  • Last seen more than 2 years ago
Migrating between Development, Staging and Production for a pre-existing ExpressionEngine site
Accepted answer
58 votes

A long time ago I came across a graphic which presented it like this: Code should flow in this direction: Development >> Staging >> Production Content, on the other hand, should flow in the ...

View answer
Add-on Development with Themes and Git
Accepted answer
28 votes

I always lay my add-ons out to match the directory structure of a default ExpressionEngine install. For example, check out Freemember on github. I think this makes it most obvious for customers ...

View answer
What happens to old Non-Commercial Licenses now that EllisLab doesn't sell these anymore?
18 votes

Any existing non-commercial licenses have been automatically upgraded. As stated in their blog post ExpressionEngine License Simplification: Previous license types have been upgraded for free. ...

View answer
How can I manually parse template code from PHP?
Accepted answer
14 votes

I'm not familiar with Widgets, so this may or may not be helpful. If you are writing a plugin, generally you don't need to parse your own template code. Simply call: $variables = array(array('name' =...

View answer
How are we supposed to manage time and respect localization/DST in EE?
13 votes

As Steven said, there is a handy workaround to automatically set the current timezone. Elaborating: Add the following to your config.php file (replacing the America/New_York timezone with one from ...

View answer
Which Twitter plugins are compatible with the new v1.1 API?
Accepted answer
12 votes

This answer is partly based on ExpressionEngine Twitter API v1.1 add-ons. It is a "community wiki" answer, so please feel free to edit it with any extra information available (state sources where ...

View answer
How to create a plugin which returns channel entry data
Accepted answer
11 votes

There are a couple of ways to create plugins which return entry IDs like that. The first, and most obvious, is for your plugin to return a pipe-separated list of entries, which is then passed to a ...

View answer
Expresso Store - Add free shipping when an order's subtotal is over an certain amount?
Accepted answer
10 votes

You didn't mention in the question you were trying to do this in addition to USPS. The answer @MediaGirl gave would be correct if you were using the Default Shipping Plugin, as you can simply create ...

View answer
Conditionally output code every nth entry for Bootstrap grid
10 votes

You should put the closing </row> outside your channel entries tag, to be consistent, and use a switch statement to add the middle rows every third entry: <div class="row"> {exp:...

View answer
How to get the logged in member id from PHP / hooks?
Accepted answer
9 votes

Yip. You're looking for: ee()->session->userdata('member_id'); It's in the session class: http://ellislab.com/expressionengine/user-guide/development/usage/session.html

View answer
How to implement AJAX "add to cart" with Expresso Store?
Accepted answer
9 votes

It's fairly easy to create an AJAX add to cart button using Store. It's no different from any other AJAX form submission. This used to be in our user guide, but SE is a much better place for "how to" ...

View answer
How to manage EE Cache files in Git?
9 votes

The other answers are going about this a slightly convoluted way. You don't need a special .gitignore in each folder, and that makes it hard for other developers to figure out what's going on (or you ...

View answer
Removing part of EE urls with .htaccess or via other methods?
Accepted answer
9 votes

You should do this inside ExpressionEngine rather than trying to do it with messy htaccess rules - far more maintainable and guaranteed to work across servers. I use Freeway which allows you to set ...

View answer
Should I use a channel entry tag pair for quotes?
Accepted answer
8 votes

Yes, a quotes channel is a great idea. We have done something similar to that in countless websites. Sometimes this channel is called "testimonials" or "quotes". This also has the advantage that you ...

View answer
Expresso Store - possible to add 'OUT OF STOCK' to size drop down?
Accepted answer
8 votes

The main problem is that options don't always have a direct mapping to a stock level. For example, if your products have both "Size" and "Color", it doesn't make sense to say "Red is out of stock" - ...

View answer
Plugin help; Cannot redeclare fatal error
Accepted answer
8 votes

You shouldn't be declaring functions inside your __construct() method. Move sliceurl a bit further down, and call it using $this->sliceurl (since it's part of your class): class ...

View answer
Am I able to store my own module settings in an EE table?
Accepted answer
7 votes

Most serious modules I know of create their own settings table. It's not ideal, but EE doesn't really offer any built in solutions for modules. If your module has an extension, as Tom mentioned, you ...

View answer
Displaying category information on a “Single Entry Page”
7 votes

Generally in ExpressionEngine you don't keep the category information in the URL for your single entry page. This is because an entry can belong to more than one category, so you will end up with more ...

View answer
How to add .html to URL's
7 votes

I haven't tested this either, but I'm not sure @adrienne's htaccess will work. I'd do it like this: RewriteEngine on # 301 redirect path.html to just path RewriteCond %{REQUEST_FILENAME} !-d ...

View answer
Outputting Exp-resso Store modifier-options without form-tag
Accepted answer
6 votes

You can access most of the basic variables directly through the "Product Details" fieldtype. For example, assuming you named your field product_details, you can access the price inside your channel ...

View answer
Expresso Store: how do you set a payment method to be selected by default?
Accepted answer
6 votes

Elaborating on what was mentioned in the comments of your lincolnpixel's answer, and to provide an "official" response to why it works this way: The correct way to specify a default is to hard code ...

View answer
Difference $_SERVER['DOCUMENT_ROOT'] on ExpressionEngine and PHP
Accepted answer
6 votes

I would avoid using DOCUMENT_ROOT altogether, to avoid issues between servers. The doc root is specified in your apache config, and depending on your apache setup, isn't always guaranteed to give you ...

View answer
How to import data in EE?
Accepted answer
6 votes

Generally the best option is to use DataGrab. It can import from CSV files, as well as XML and other formats. The field_ft_x column stores the field "type". This is different from the fieldtypes you ...

View answer
Exp:resso's Store apply coupon to category only
Accepted answer
6 votes

There are no existing extensions that I'm aware of that can handle this functionality. Currently promo code discounts are applied to a whole order, not individual items. However, it would certainly ...

View answer
Expresso Store: Getting all products on sale throws PHP error
Accepted answer
5 votes

This is a known issue affecting Store 2.3.1 with PHP 5.3, and will be fixed in the next version. In the meantime, if you need a quick fix, please replace $this->ee with ee() on lines 37 and 38 of ...

View answer
Is there a way to specify where store.js is added to the page?
Accepted answer
5 votes

UPDATE: Store 2 includes the fix mentioned below. It will be an option in the next version. In the meantime, you can fix it by opening mod.store.php, going down to about line 235, and changing this: ...

View answer
Expresso Store: Insert a final confirmation screen AFTER payment interface
Accepted answer
5 votes

Store doesn't support adding a final confirmation page AFTER you have already taken payment. As soon as payment is successful, the order is complete (that is why payment must be on the last page of ...

View answer
Building an add-on that accepts data from a custom front-end URL
Accepted answer
5 votes

It's certainly possible without hacking. Just that the EE documentation isn't particularly helpful on how to handle this sort of thing. Basically, you want to write a Module. Then you need to ...

View answer
Expresso Store - Change order_id start point
Accepted answer
5 votes

Yes, that is the correct way to do it. To clarify this for others, you will need to open up PHPMyAdmin, or any other SQL client which will let you run SQL queries directly. You can also go to Tools > ...

View answer
Store: Can I create shipping zones?
Accepted answer
5 votes

It's not possible to do using the CP. However, it's possible to write a simple shipping plugin, and group your shipping rules for various countries. For example, you could put this into a file named ...

View answer
1
2 3 4 5
14