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/');
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();
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
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
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 ...
1
vote
Unable to load ext.rte.php after updating from V2 to V6
For the time being, the best solution would be manually remove record from exp_extensions DB table.
And of course, report a bug.
1
vote
How can I use stash->parse in my extension
Quick update - having looked at what causes this error, I found that if I call
ee()->TMPL->fetch_addons();
in my extension before I call stash->parse, it works fine without an issue. Hope ...
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 ...
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 ...
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
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(...
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
extension × 132add-on-development × 32
hook × 24
module × 20
expresso-store × 17
add-on × 16
control-panel × 12
plugin × 11
cartthrob × 9
ee2 × 7
channel-entries × 6
members × 5
php × 4
ee3 × 4
expresso × 4
templates × 3
solspace-freeform × 3
matrix × 3
safecracker × 3
channel × 3
email × 3
javascript × 3
shipping × 3
settings × 3
categories × 2