6 votes
Accepted

Member Group Tabs throws blank screen after EE upgrade to 2.10

open file /system/expressionengine/third_party/ext.sh_member_group_tabs.php and change line 270: if (APP_VER >= '2.6.0') to if (version_compare(APP_VER, '2.6.0', '>=')) it is also needs to ...
user avatar
  • 131
5 votes
Accepted

Trouble Upgrading from 2.5.5 to 2.8.1 - white screen

Have you checked all of your installed add-ons for updated versions? White screens are also typically a sign of hidden errors, so make sure that display_errors is enabled in your PHP environment, and ...
user avatar
  • 2,255
5 votes
Accepted

before_channel_entry_save hook

This was driving me insane but I've figured it out. You need to edit the $entry object (1st parameter of the function) in order for this to work. You can, however, use the 2nd parameter, $values, for ...
user avatar
4 votes
Accepted

Correct way to share functions/methods between Module and Extension

You should create a library, which is just a PHP class stored in system/expressionengine/third_party/your_addon_name/libraries/. <?php class Your_library { public function do_something() { ...
user avatar
  • 4,002
4 votes
Accepted

With new Routing capabilities in EE 2.8 - Trying to figure out the best solution

I can think of two ways to do this. One is to use Resource Router. Your config would look something like this: $config['resource_router'] = array( ':num' => function($router, $wildcard) { $...
user avatar
  • 4,002
4 votes
Accepted

Clearing the cache via API

ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods ee()->cache->delete('/myaddon/');
user avatar
  • 1,987
3 votes
Accepted

Expresso Store tax hook help?

Yes I don't see any problem with that if it's just for a simple tax adjustment. We don't look to make things deliberately hard. :) You could also look to set it up as an actual tax adjustment if you ...
user avatar
  • 5,407
3 votes
Accepted

Accessing extension settings from plugin throws a PHP warning

Judging from this statement: "The plugin uses the calculation method of the extension", I assume you're doing something like this in your plugin: $ext = new Your_addon_ext(); return $ext->...
user avatar
  • 4,002
3 votes
Accepted

Hook for when viewing single entry

Crelate a plugin containing single function, say, function_name. The plugin will accept member_id of logged in visitor ee()->session->userdata('member_id') and ID of entry being viewed, ...
user avatar
  • 2,831
3 votes
Accepted

Add-on Dev: Extending channel->entries and tagdata

You could create an extension which uses the channel_entries_query_result hook to add your variable to each entry row. That will get parsed along with the native vars. To pass data from your module/...
user avatar
  • 11.3k
3 votes

Gateway Extension Error

You need to tell Store about your new gateway in the ext. file. Use the store_payment_gateways hook and pass in the $gateways array: public function store_payment_gateways($gateways) Then ensure ...
user avatar
  • 5,407
3 votes
Accepted

Structure of an Extension

Extensions are for backend or server side stuff, whereas Modules can interact via the frontend or EE Control Panel. So an Extension captures a hook from another class, but can't capture a form ...
user avatar
  • 5,353
3 votes

Structure of an Extension

It depends on whether the events that trigger the functions trigger a hook. If a button click, form submission, page load etc triggers a hook, then an extension is the right place for your custom ...
user avatar
  • 4,885
3 votes
Accepted

Modules vs Extensions

Extensions are used when you want to take over, modify, or perform extra routines when native first-party methods are executed. For example, performing extra actions after an entry is saved. Modules (...
user avatar
  • 2,255
2 votes
Accepted

With the hook entry_submission_end, is it possible to know if the entry is inserted or updated?

I usually check if entry_id = 0 (for new entry) $this->EE->input->get_post('entry_id') == 0
user avatar
  • 5,781
2 votes
Accepted

Using FreeMember to record interests (categories) to a member profile

I've solved this by forking and modding the FreeMember add on. When passed an array type form field (i.e. where you name the field 'field_name[]' and then have multiple inputs by the same name) ...
user avatar
2 votes
Accepted

EE2 Use Of Action ID's

If I am understanding this correctly what you need to go is create the form that will be displayed this is where you would pass the action id to the form. YEah this won't work in an extension. please ...
user avatar
  • 101
2 votes

EE2 Use Of Action ID's

Usually it is used for making form hidden fields in modules. In your case (for simple form) it is possible better to use {AID:class:method} tag in template: <form method="post"> <input ...
user avatar
  • 5,781
2 votes
Accepted

Expresso Store Hook store_order_complete_end

You might find the EE Extension Development guide useful. Basically, you need to create an extension which handles the store_order_complete_end hook. I'm not sure what you mean by the $data parameter,...
user avatar
2 votes

Synchronise Files programmatically/automatically

Take a look at line 1187 in system/expressionengine/controllers/cp/content_files.php. The function do_sync_files() is called by the synchronize page. This would be in the EE 2.8.1 core files. You ...
user avatar
2 votes

Expresso Store tax hook help?

To use the store_order_taxes hook correctly, you should append a Store\Model\Tax object to the list of existing taxes. That way, Store will automatically make all the necessary adjustments to the ...
user avatar
2 votes
Accepted

Expresso Store: Extension to exclude modifier amounts when calculating tax

A concern would be that whatever you do to adjust price calculation, you have to be sure it's being adjusted in all instances - not just display of a product, but basket addition, basket display, ...
user avatar
  • 5,353
2 votes
Accepted

Unable to modify data with ‘entry_submission_ready’ extension hook

Passing by reference doesn't work when calling extension hooks in EE. If you want to alter the field data inside any of the API Channel Entries hooks, you need to change it directly in the API object,...
user avatar
  • 17.4k
2 votes

Shipping Rates in {shipping_method} Dropdown - Expresso Store

Answering my own question here in case it helps anyone else. This question/answer pointed me in the right direction: Do the Expresso Store shipping methods have to be displayed in a dropdown? The ...
user avatar
  • 23
2 votes
Accepted

Exp:resso Store Add a new Custom Report

It's not a file path, but a class path. In this function: add_location_reports, change: $reports["location_summary"] = "\Expresso_store_add_location_reports_ext\LocationReports"; to: $reports["...
user avatar
  • 5,353
2 votes
Accepted

EE3 Extension not showing up - what am I missing?

Turned out that two things were wrong: In the config.master.php file, $env_config['allow_extensions'] was set to n and should be set to y This is a migration and had some old entries in ...
user avatar
2 votes

Expresso Store custom tax rule

Sorted thanks. The issue here was a typo (store_orders_taxes not store_order_taxes). Pro tip folk - use a different name for your method from the hook you are accessing!
user avatar
2 votes

Custom add-on accessing method from another custom add-on …

I agree with the advice provided by Brian in EECMS Slack. You can do this: require_once PATH_THIRD . 'your_addon/somefile.php' $someFile = new SomeFile(); $someFile->method();
user avatar
  • 1,232
2 votes
Accepted

Is it possible to use an extension in a template like a plugin?

You cannot use ext to call in template as plugin. You must have to create mod.easypost_extention.php file for that. Use this code inside that file. <?php if ( ! defined('BASEPATH')) exit('No ...
user avatar
2 votes
Accepted

Updating hooks from v2 to v4

There were certainly several extension hook changes with the arrival of EE3, possibly with EE4 too, so you may well need to update the naming of the hooks in your addon. You can find a complete list ...
user avatar
  • 3,572

Only top scored, non community-wiki answers of a minimum length are eligible