Each action at https://github.com/CE-PhoenixCart/Phoen ... ns/catalog has a listener. E.g. copyToConfirmAction
Create customers in admin & assign categories to users
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Create customers in admin & assign categories to users
What about for the actual form insert?ecartz wrote: ↑Wed Jun 22, 2022 12:50 pm Each action at https://github.com/CE-PhoenixCart/Phoen ... ns/catalog has a listener. E.g. copyToConfirmAction
- burt
- Core Team
- Posts: 4560
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Create customers in admin & assign categories to users
Loads of examples in the Supporters Codes.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Create customers in admin & assign categories to users
I'm using injectFormDisplay for the customer one but can't see that I can use this for catalog.php. Will look at other supporters code for examples.
- burt
- Core Team
- Posts: 4560
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Create customers in admin & assign categories to users
Code: Select all
public function listen_productActionSave() {
// whatever you need to do here
}
public function listen_updateProductAction() {
$this->listen_productActionSave();
}
public function listen_insertProductAction() {
$this->listen_productActionSave();
}I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Create customers in admin & assign categories to users
Sorry I wasn't clear, I mean to display the extra input in the new/edit category form. Unless you're saying I can use one of these to do that, in which case I'm going to be very confused.burt wrote: ↑Wed Jun 22, 2022 2:50 pmSee the PRO example of S06E02 as an example.Code: Select all
public function listen_productActionSave() { // whatever you need to do here } public function listen_updateProductAction() { $this->listen_productActionSave(); } public function listen_insertProductAction() { $this->listen_productActionSave(); }
- burt
- Core Team
- Posts: 4560
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 413 times
Re: Create customers in admin & assign categories to users
For the actual form;
injectDataForm
injectLanguageForm
See /admin/includes/actions/catalog/views/new_product.php
You could put your extra things in a new Tab, which is what I like doing.
I am almost certain there are examples of both of these in Supporters Code. I know there is for new tab.
injectDataForm
injectLanguageForm
See /admin/includes/actions/catalog/views/new_product.php
You could put your extra things in a new Tab, which is what I like doing.
I am almost certain there are examples of both of these in Supporters Code. I know there is for new tab.
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Create customers in admin & assign categories to users
For new products I would put it in a new tab, categories don't have tabs though.
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Create customers in admin & assign categories to users
s04e11 - Admin Comments
s09e03 - PI Layout Modules/leadtime
I don't see any examples of injectLanguageForm.
For productTab:
s02e06 - Product Terms
s02e10 - Low Stock and Dashboard
s04e10 - Product Specs
s05e04 - MORE Info Page Extensions
s05e07 - More PI mods
s10e02 - File Uploading
s10e06 - Soft Redirects
For categories, you would add to the infoBox.
s02e10 - Low Stock and Dashboard
s04e11 - Admin Comments
s05e07 - More PI mods
s10e06 - Soft Redirects
Examples not necessarily specific to categories. All are infobox modifications on the catalog page. I think that Admin Comments does something with categories.
-
LeeFoster
- Contributor
- Posts: 263
- Joined: Sun Feb 28, 2021 9:41 pm
- Phoenix Version: v1.0.8.20
- Has thanked: 1 time
- Been thanked: 5 times
Re: Create customers in admin & assign categories to users
This is my hook file so far, unfortunately nothing shows.
I'm hoping to get a little tick button at the bottom below the sort order.
Code: Select all
public function listen_infoBox($parameters) {
global $cInfo;
$contents[] = ['text' => 'Private Category' . '<br>' . (new Tickable('private', ['value' => $cInfo->private, 'class' => 'custom-control-input', 'id' => 'private'], 'checkbox'))->set('value', $cInfo->private)];
}You do not have the required permissions to view the files attached to this post.