Jump to content
LeeFoster

Only Show Boxes on Selected Pages

Recommended Posts

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.

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Posted (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 by burt

This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites
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 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×