LeeFoster 219 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 Share this post Link to post Share on other sites
burt 5,612 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. Share this post Link to post Share on other sites
LeeFoster 219 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. 1 burt reacted to this Share this post Link to post Share on other sites
Hotclutch 187 Posted March 15, 2019 This has been discussed on the forum before: There are other example threads also. Share this post Link to post Share on other sites
burt 5,612 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 Share this post Link to post Share on other sites
LeeFoster 219 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 1 burt reacted to this Share this post Link to post Share on other sites
♥raiwa 1,472 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. 1 puggybelle reacted to this About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
LeeFoster 219 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 1 burt reacted to this Share this post Link to post Share on other sites
♥raiwa 1,472 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 1 burt reacted to this About Me: http://forums.oscommerce.com/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 Share this post Link to post Share on other sites
LeeFoster 219 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 Share this post Link to post Share on other sites