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 ...
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 ...
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
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()
{
...
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) {
$...
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/');
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 ...
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->...
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, ...
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/...
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 ...
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 ...
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 ...
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 (...
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
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) ...
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 ...
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 ...
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,...
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 ...
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 ...
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, ...
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,...
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 ...
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["...
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
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
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
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 ...
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