Page 1 of 1
PI Module tep_cfg_select_option
Posted: Tue May 10, 2022 7:16 am
by LeeFoster
I'm working on a PI module and was hoping to be able to query the database to get a list of all tax classes to use in tep_cfg_select_option.
Is this possible? has it been done? I'm looking through the existing modules and can't find any examples of it being done.
Thanks in advance
Re: PI Module tep_cfg_select_option
Posted: Tue May 10, 2022 7:19 am
by raiwa
If I we’ll remember, shipping modules are doing this. Have a look into the flat rate module.
Re: PI Module tep_cfg_select_option
Posted: Tue May 10, 2022 7:38 am
by ecartz
or more generally
Along with the four shipping modules, ot_loworderfee uses this.
Re: PI Module tep_cfg_select_option
Posted: Tue May 10, 2022 7:41 am
by burt
Code: Select all
Select('tax_class_id', Tax::fetch_classes())
See
https://github.com/CE-PhoenixCart/Phoen ... l.php#L188
if you click on the words "tep_tax_classes_pull_down", you should be able to see where it used in "References" inside the popup box...
Re: PI Module tep_cfg_select_option
Posted: Tue May 10, 2022 8:50 am
by LeeFoster
Ok so I've got it showing the Tax classes now, just need to make the module appear only when the product has that tax class.
Thanks for your help.