Hooks For "editing Profile"-Page

Hi.

What hooks do I need to use in order to post display information at the page where user's can edit their profile information?

Screenshot of page: https://gyazo.com/f9ab3f52c108ae21e4929629b2948bfd

Please check available hooks in the following template:

design/themes/THEME/templates/views/profiles/update.tpl

Unfortunately, the Usergroups tab does not contain hooks

Please check available hooks in the following template:

design/themes/THEME/templates/views/profiles/update.tpl

Unfortunately, the Usergroups tab does not contain hooks

Thank you.

However, my currently selected theme does not have these file directories. How do I work around this? Is this a problem?

Also, I've never done frontend addons before. Is the following directory structure correct?

1: app/addons/ADDON/controllers/frontend/profiles.post.php

2: design/backend/templates/addons/ADDON/hooks/profiles/account_update.post.tpl

You have to create them. If they exist, they will be used.

Suggest you contact a developer that can help you get what you want.

We're happy to help you. Use the Get a quote link in my profile and we'll help you out. Advice is free, work is not.

Thank you.

However, my currently selected theme does not have these file directories. How do I work around this? Is this a problem?

Also, I've never done frontend addons before. Is the following directory structure correct?

1: app/addons/ADDON/controllers/frontend/profiles.post.php

2: design/backend/templates/addons/ADDON/hooks/profiles/account_update.post.tpl

Second path should be

design/themes/THEME/templates/addons/ADDON/hooks/profiles/account_update.post.tpl

Second path should be

design/themes/THEME/templates/addons/ADDON/hooks/profiles/account_update.post.tpl

Hi again,

How do I fetch the user_id when using the frontend management page?

Equivalent RetailEdge ID:

{$custID}

if (!defined('BOOTSTRAP')) { die('Access denied'); }

use Tygh\Registry;

$custID = db_get_field(‘SELECT cust_id FROM ?:users WHERE user_id=?i’, $_REQUEST[‘user_id’]);

if (!empty($custID)) {
Registry::get(‘view’)->assign(‘custID’, $custID);
}

It isn't fetching the cust_id field (this code works for the backend panel where the same thing is done). Is the $_REQUEST parameter wrong?

Hi again,

How do I fetch the user_id when using the frontend management page?

Equivalent RetailEdge ID:

{$custID}

if (!defined('BOOTSTRAP')) { die('Access denied'); }

use Tygh\Registry;

$custID = db_get_field(‘SELECT cust_id FROM ?:users WHERE user_id=?i’, $_REQUEST[‘user_id’]);

if (!empty($custID)) {
Registry::get(‘view’)->assign(‘custID’, $custID);
}

It isn't fetching the cust_id field (this code works for the backend panel where the same thing is done). Is the $_REQUEST parameter wrong?

Eeehm, please dont use this on a production site. This will cause a ton of problems if not done correctly (you allow a person to modify a request and he will be able to get all your users). Instead you should use the session. Tygh::$app['session']['auth']['user_id']

The best thing is to edit the respective smarty template or tell us exactly what you want to change? e.g. display something or do something else?

I believe he has a custom field called cust_id which is only related to user_id by table row. He's NOT trying to get the user_id. But he should still use the $_SESSION['auth']['user_id'] value rather than a request parameter if in the customer area. However, in the backend (admin area) then it will need to be passed as a parameter.

Hi again,

How do I fetch the user_id when using the frontend management page?

It isn't fetching the cust_id field (this code works for the backend panel where the same thing is done). Is the $_REQUEST parameter wrong?

In front-end controllers you can simply use $auth['user_id']