Portman Posted February 20, 2019 Share Posted February 20, 2019 Hi I am using BS Frozen I have been doing some modifications to an add-on and I have created a new <function> to the code to make the add-on operate in the way I need it to... This has worked fine within the files of the add-on.... Now I want to call that function (located in catalog/includes/module/store/st_addon.php) in catalog/product_info.php... Can I do that? and if so how? Quote Link to comment Share on other sites More sharing options...
Antonio Garcia Posted February 20, 2019 Share Posted February 20, 2019 require('includes/application_top.php'); //<-- you need find this line and insert the code bellow // includes your function file here require('includes/module/store/st_addon.php'); Insert this code in product_info.php file... Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted February 20, 2019 Share Posted February 20, 2019 (edited) Hello Pete @Portman, If you added the function outside the module class as a independant function, it should be available if the module is active on the product_info page. Check if there is a page selection if you have product_info.php included. Then the store module is loaded in template_top.php (supposed it's one of my store module add-ons, it is a modified header_tag module). Therefore the function will not be available before the template_top.php call: require('includes/template_top.php'); If you need the function before, you should opt to include it in includes/functions/general.php instead of adding it to the module. Then it is available everywhere after: require('includes/application_top.php'); Edited February 20, 2019 by raiwa Portman 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
Portman Posted February 21, 2019 Author Share Posted February 21, 2019 thanks @raiwa... that was what I needed to know! Yes I am modifying one of your addons - or at least trying to - at this stage trying to create the ability to hide products from particular wholesale groups Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.