LeeFoster Posted March 15, 2019 Share Posted March 15, 2019 Hello, I have a requirement to only show certain boxes on certain pages I found the below addon and have been working to update it to work with Edge. https://apps.oscommerce.com/1ShVw So far I have got it to show the boxes as required but it is not update-able via admin. oscom-dynamic-template-system BS.zip Quote Link to comment Share on other sites More sharing options...
burt Posted March 15, 2019 Share Posted March 15, 2019 You have two (easy) ways to do it; Set pages per box or Set boxes per page I'd set pages per box as there are less boxes than pages so it would be a lot quicker... You can find an example of this approach in /includes/modules/header_tags/ht_datepicker_jquery.php Or you have a more flexible way (but needs coding from scratch); create a new DB table for storing page/box relationships. And then have a dedicated admin page for setting it up. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 15, 2019 Author Share Posted March 15, 2019 7 minutes ago, burt said: 'd set pages per box as there are less boxes than pages so it would be a lot quicker... You can find an example of this approach in /includes/modules/header_tags/ht_datepicker_jquery.php That's exactly what I was looking for. burt 1 Quote Link to comment Share on other sites More sharing options...
Hotclutch Posted March 15, 2019 Share Posted March 15, 2019 This has been discussed on the forum before: There are other example threads also. Quote Link to comment Share on other sites More sharing options...
burt Posted March 15, 2019 Share Posted March 15, 2019 (edited) 13 minutes ago, LeeFoster said: That's exactly what I was looking for. That piece of code should make sense and is portable to box(es) for 100% sure. It might be practical to move the function into (say) /includes/functions/general.php and then just access that function from the module (rather than having the (basically the same) function in all the box modules). Hope that makes sense. If you do that, and get it working, hit me up with it as it can go into Core. Thx. Edited March 15, 2019 by burt Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted March 15, 2019 Author Share Posted March 15, 2019 7 minutes ago, burt said: That piece of code should make sense and is portable to box(es) for 100% sure. It might be practical to move the function into (say) /includes/functions/general.php and then just access that function from the module (rather than having the (basically the same) function in all the box modules). Hope that makes sense. If you do that, and get it working, hit me up with it as it can go into Core. Thx. Will do burt 1 Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted March 15, 2019 Share Posted March 15, 2019 Hello Lee @LeeFoster, Depending on which pages there are these 2 add-ons: Slim Checkout This is only for checkout pages, shopping-cart to checkout_success) and Modules Control This one has some limitations regarding number of pages and modules. I didn't have an opportunity to fix it yet. 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...
LeeFoster Posted March 15, 2019 Author Share Posted March 15, 2019 3 hours ago, burt said: That piece of code should make sense and is portable to box(es) for 100% sure. It might be practical to move the function into (say) /includes/functions/general.php and then just access that function from the module (rather than having the (basically the same) function in all the box modules). Hope that makes sense. If you do that, and get it working, hit me up with it as it can go into Core. Thx. I think I got it working burt 1 Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted March 15, 2019 Share Posted March 15, 2019 3 hours ago, burt said: Or you have a more flexible way (but needs coding from scratch); create a new DB table for storing page/box relationships. And then have a dedicated admin page for setting it up. Exact this is done here: Modules Control burt 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...
LeeFoster Posted March 16, 2019 Author Share Posted March 16, 2019 Finally got round to updating the boxes to allow them to be shown on specific pages. Also added the functions to general.php in both admin and front end. Just drop this into your existing shop, any installed boxes will need to be re-installed. Next steps are to add a select all option and an page to control all pages from one place. pages_update.zip 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.