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 ...
  • 131
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 ...
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/');
  • 1,987
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, ...
  • 2,846
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["...
  • 5,353
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 ...
  • 23
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!
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 ...
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();
  • 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 ...
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,...
  • 17.4k
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 ...
  • 3,587
1 vote
Accepted

Settings for a module

For modules, you just go ahead and create your own DB table that stores your module settings. So just like you create your modules main table for storing data submitted from your form when you install ...
  • 5,900
1 vote
Accepted

How do you get the parsed html of a page on the back end? (Within an Extension Using PHP)

Just in case someone else is looking for the answer: If after your extension is called you can rebuild the template using the following code function your_function($obj){ $template_group = "...
1 vote

How do you get the parsed html of a page on the back end? (Within an Extension Using PHP)

I believe you use this extension hook: https://docs.expressionengine.com/latest/development/extension_hooks/global/template/index.html#template-post-parse Edit Here is an example of how this could ...
  • 5,900
1 vote
Accepted

How to get data from a hook?

At the end of hook "channel_form_submit_entry_end" it is using the Channel Form Class so $obj->entry['entry_id'] a class property which is not available. Good news is you can use the method $obj->...
1 vote
Accepted

How to send HTML email (in template) from extension?

Yes Brianne, you can pull the body of the template in your extension. To achieve this you need to create separate library for parsing the template into your extension. And by loading that library you ...
1 vote

blank page when saving extension settings

I finally tracked this down and posting my findings here so in case anyone else runs into this issue. I have a custom settings for my extension and in the settings_form.php file there is this line of ...
1 vote
Accepted

Storing Single Option Value in Admin

Set up a Global Variable with the value you need. Then you can access the value from within a template simply by including the Global Variable name (within curly brackets) within your templates - e.g....
  • 3,587
1 vote

Updating an entry field, without updating every field

It certainly is! Here's what you need to do (From the manual) based on your example : ee()->load->library('api'); ee()->api->instantiate('channel_entries'); ee()->api->instantiate(...
  • 2,418
1 vote
Accepted

MSM and bespoke extension

Nope, the extension settings are for the entire control panel across all MSM sites by default (no site_id references). You will have to build in your own site_id references into the setting storage. ...
  • 5,353
1 vote

Exp:resso Store Send Order Emails To Different Email Addresses

Oh it appears it is very straightforward. So in the extension grab the store emails (I'm just getting all for development) then you can set the BCC attribute as per below. $emails = Store\Model\Email:...
  • 185
1 vote
Accepted

Lang text with control panel interface

You can either use built-in Global Variables feature or Low Variables add-on Both will work same way, you'll just place {variable_name} in your templates, without any other special tags, but you may ...
  • 2,846
1 vote
Accepted

How do I find/make the URL to a PHP page in my extension?

You shouldn't be submitting to PHP file in system folder directly, as the system folder might be located outside of web root and so inaccessible for direct requests. Instead you need to place those ...
  • 2,846
1 vote

What's the proper way to alter a form in the control panel? (Using an extension in EE3)

I doubt there is a way to perform that kind of modification using a hook. What you could do instead (if you need to alter all forms) is modify _shared/form View file (but then of couse you'll need to ...
  • 2,846
1 vote

Do something after hook

Well, you are killing the process when you throw a redirect. The redirect() function basically causes a die() affect, ending code termination. You know you can declare a redirect in the template with ...
  • 5,900
1 vote

Installing Extension Ctrl+S Need Help

If you mean this plugin : https://devot-ee.com/add-ons/ctrls I have used this before. the file you get is called ext.ctrl_s.php, and you should install it here /system/expressionengine/third_party/...
  • 2,418
1 vote

Installing Extension Ctrl+S Need Help

All kinds of add-ons should be put on their own folders inside system/expressionengine/third_party/. The info on installing plugins can be useful. Pay attention that the name of the folder should be ...
  • 6,108
1 vote

Member Group Tabs throws blank screen after EE upgrade to 2.10

Thank you Rakesh and Tom. Member Group Tabs is now compatible with EE v2.10.1.
  • 319
1 vote
Accepted

Saving entry with grid field isn’t working

Please note this is UNTESTED but written from the actual code files so should play fair... //load up the grid model for later use ee()->load->model('grid_model'); //first we create our field ...
  • 2,418

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