Open to all! Ask other shopowners for help.
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
Post
by LeeFoster » Tue Jun 28, 2022 6:27 pm
ecartz wrote: ↑ Tue Jun 28, 2022 12:34 pm
Or actually, toss it entirely and do
Code: Select all
public function listen_updateCategoryPrep() {
if (isset($_POST['private'])) {
$GLOBALS['sql_data']['private'] = Text::input($_POST['private']);
}
}That section's hooked between the initialization and the perform.
Running some tests with this code and it's not passing a POST value from the checkbox.
I get the below error
Notice: Undefined index: private in
ecartz
Core Team
Posts: 3084 Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times
Post
by ecartz » Wed Jun 29, 2022 12:36 am
Is the checkbox checked or unchecked? That's the message that I would expect with an unchecked box and without the isset. The isset is specifically to watch for the unchecked case.
Code: Select all
'value' => $GLOBALS['cInfo']->privateis incorrect. That needs to be a constant value (the value when checked), not something that changes. Given the other code, it should be
radhavallabh
Senior Contributor
Posts: 466 Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times
Post
by radhavallabh » Tue Jul 26, 2022 9:49 am
Hi dear;
Were you able to convert this into an addon finally?
It would be very helpful in creating an additional module using this feature....
Please do let me know...
Thank you in advance;
Very Warm Regds./
radhavallabh