Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Only Show Boxes on Selected Pages


LeeFoster

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.

 

Link to comment
Share on other sites

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
Link to comment
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 

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...