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
PI Module tep_cfg_select_option
-
raiwa
- Certified Developer
- Posts: 1640
- Joined: Sat Dec 21, 2019 8:08 am
- Phoenix Version: 1.1.0.6
- : Buy Me A Beverage
- Has thanked: 70 times
- Been thanked: 152 times
Re: PI Module tep_cfg_select_option
If I we’ll remember, shipping modules are doing this. Have a look into the flat rate module.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Need Help?viewtopic.php?f=10&t=27
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: PI Module tep_cfg_select_option
Code: Select all
Config::select_tax_class(Code: Select all
Tax::fetch_classes- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: PI Module tep_cfg_select_option
Code: Select all
Select('tax_class_id', Tax::fetch_classes())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...
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: PI Module tep_cfg_select_option
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.
Thanks for your help.