Questions tagged [hook]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
180 views

Manipulate custom order data with CT hook during checkout

I'm using CT. When a customer checks out they are required to select a location for where they want to pickup their order. I would like to save both the location's ID and the location's pickup date to ...
1
vote
2answers
139 views

Hooks when a member is moved to another member group

Is there a hook in ExpressionEngine that triggers when any one member is moved from group to another?
1
vote
2answers
315 views

$this->EE->api_channel_entries->data (via entry_submission_ready hook) not working on front end

I have the following entry_submission_ready method in an extension to update a field's data. This works fine when saving an entry in the control panel, but it doesn't change the field value on the ...
1
vote
1answer
164 views

Change cart subtotal in cartthrob using hook

I've set up the cartthrob_pre_process hook to look something like this: public function cartthrob_pre_process($data) { $data['subtotal'] = 500.00; } It then goes to PayPal, which is the selected ...
1
vote
1answer
158 views

entry_submission_ready Hook Not Working

I have created an extension to manipulate saved data when an entry is saved. I can't get this to work using entry_submission hooks, I cannot find that much information about this online. I believe I ...
2
votes
1answer
116 views

What can I further do to test these Expresso Store hooks that appear to be not happening?

EE 2.7.2 Store 2.0.3 It doesn't look like the hook (store_order_recalculate_end) is happening as advertised. Works fine when adding the first item to the cart. But upon cart update or adding more ...
2
votes
3answers
363 views

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

I'm working on an extension that indexes the content of the entry when publish form is submitted, but I need to know if the entry is a new one or an updated one, and in both case, I need the entry_id (...
1
vote
2answers
152 views

What hook for immediately after user is logged in?

I'm trying to find what hook there is for immediately after the user logged in? I've been looking at sessions_start and sessions_end but I'm not sure how exactly they work and nothing seems to be ...
3
votes
1answer
54 views

Are there hooks I can use to log file downloads

I'm working on a module to log some statistics on downloads from anywhere in the site. My module setup is fine, it installs and creates the necessary tables. Now I want to hook into the events, file ...
1
vote
1answer
81 views

Changing languages in sessions_start hook

I am trying to implement a multilanguage site. I have a hook handler for the hook sessions_start that is supposed to set the language for a page. Here are the lines of code from the hook to change ...
4
votes
1answer
2k views

How to get the logged in member id from PHP / hooks?

Is there a hook-independent way to get the logged in member id inside a hook handler? Something like a function or a global variable?
1
vote
1answer
78 views

What is the best way to modify entry data when submitting and updating entries

I am looking to modify a counter which is a field in a channel when i submit or update an entry. I am looking to count the number of matrix rows and then add that into the input field to act as the ...
1
vote
1answer
28 views

Access segments in hooks

Is it possible to access segment or page information in the hooks? Each hook has different parameters so I can't rely on those to get segment information.
1
vote
1answer
140 views

Extension Development : Redirect on error

I'm developing an extension that uses the member_update_end hook. This extension requires communicating with a 3rd party API, which I can't guarantee will always be active. As a side note, the hook ...
2
votes
1answer
39 views

Cancelling member deletion in member_delete hook handler

I am trying to implement some codein the member_delete hook in EE. But for testing purposes, I just want the hook to trigger but don't go ahead with the actual delete. Is there a way to do this? In ...
0
votes
1answer
136 views

Is it possible for the hook handler of safecracker_submit_entry_start to cancel form submission?

I have a hook handler for safecracker_submit_entry_start that gets some value from a form field and processes it. I want to validate the output of that process. If the output is good, then continue ...
5
votes
1answer
523 views

Multiple Hooks, One Extension

In the documentation the code to add enable extension hooks is like this $data = array( 'class' => __CLASS__, 'method' => 'truncate_this', 'hook' => '...
1
vote
1answer
178 views

Undefined property session in cp_js_end hook

Currently facing the following error in the cp_js_end hook. Undefined property: Javascript::$session it looks like the session class isn`t loading anymore in EE 2.6+ It whas working in older ...
0
votes
4answers
1k views

Get an EE instance without any output

I'm developing payment gateway for the BrilliantRetail and I need to create IPN callback script which will change BR orders statuses and return response data to the IPN-gateway. So I'm trying to find ...
1
vote
1answer
124 views

Filter comments by Entry Author in the Control Panel

I've been looking up the hooks that can be used with the Comment Module. But I don't think there is one I could use to filter the list of comments by entry author in the Control Panel. I'm trying to ...
2
votes
2answers
2k views

What is the best way to start using hooks?

I've used EE for a while now but I'm new to creating extensions or modules. I want to add a functionality where a bunch of email addresses stored in a database get notified when an entry is submitted ...
2
votes
1answer
185 views

How do I set a field value in entry_submission_ready hook handler?

It seems that changing the values of the $data argument variable doesn't change anything. Is there a way to change the value of some channel fields inside the entry_submission_ready hook?
3
votes
1answer
198 views

How do I check if a field value has changed in a entry_submission_ready hook handler?

I am writing an extension for the hook entry_submission_ready I see that it has 3 params(meta, data, autosave). I look at data and I see there is channel data in there and a revision post data ...
6
votes
2answers
216 views

What hook should I use that executes before a channel entries tag is parsed?

Suppose I have a template with a channel entries tag on it. I need to execute an extension method during a hook that runs before the channel entries query takes place. It doesn't matter what ...
2
votes
2answers
253 views

entry_submission_start does not fire as expected

I am trying to use the entry_submission_start hook to be able to check the current settings before the extension updates them. I expected the hook to fire before the entry is submitted, but when I ...
8
votes
2answers
746 views

Add Postmaster hook to my custom plugin

I have a custom plugin that logs into a database each time someone downloads an image. This is achieved through a module installed with my mod files etc. The plugin records the current logged-in ...
3
votes
1answer
174 views

New 'Category' Hook or Action?

When adding/deleting/editing a category in the CP, I would like to send that data to Mailchimp (where I ultimately will have the same categories) How can this be achieved? Using a Action or a Hook? ...
2
votes
1answer
78 views

In EE 2.X what replaces the submit_new_entry_end hook?

I'm working on converting an old 1.X extension over to EE 2.X, but my hook was 'submit_new_entry_end'. I can't seem to find a reference to what hook should replace it. My guess is '...
6
votes
1answer
180 views

template_fetch_template hook $row parameter

I'm considering writing an extension that greatly depends on hooks that are available before and during template parsing. I see in the ExpressionEngine hook documentation that there is a hook called '...
13
votes
2answers
764 views

Testing Extensions / Calling Hooks

I'm about to embark on writing a new extension for the Ecommerce module "Store" though this should relate to any extension hook. I am planning to "hook" into "store_order_complete_end" in order to ...
9
votes
1answer
181 views

Turn off extension in Control Panel

I would like to make sure an extension isn't run, via sessions_end hook, in the control panel. I'm currently doing this like so: if ($this->EE->input->get_post('D') == "cp") { return ...

1
2