Jump to content

Recommended Posts

I have moved the greetings messages to a box that uses the temmplate. For doing that, I had to define a new location for adding, removing or modifying new boxes on the front page and categories pages without touching the index code. It also cleans up a couple of language files and general.php by adding the texts and functions to the boxes.

Doing that, I noticed for now there are 'placeholders' defined for header, footer, porducts page, left and right column, but not for other pages, so I addded a 'boxes_main_page' placeholder into the front page.

Then I started moving new and incoming products modules to a box and found a problem: You can't associate a box to two placeholders at a time so I can't define a module that shows in frot page and categories page at the same time. This is logical for moddules that shows in columns but not for those into the body of the pages.

I figure it can be done reading $PHP_SELF in the box and adding the logic into it, but then the code of the box itself will be more complex, and ordering the boxes would be difficult too because we mix positions. Also that method can not differentiate front page and categories pages (never understood why they are in the same file).

Any opinions/suggestions?

Edited by piernas

Share this post


Link to post
Share on other sites

You need to do a few more tests:

  1. If $categories_id is greater than 0, you are on a category page.
  2. If $_GET['manufacturers_id'] is set and greater than 0, you are on a manufacturer's page
  3. Otherwise you are on the front page.

Look at the module code for 2.3.3.4BS -- some of the modules can select what pages they show on. You should be able to adapt that code to do what you want.

 

I have no idea why three of the pages are in index.php and all of the others are separate. Harald may be the oly person here who remembers that.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Yes I've seen the code inside at least three header tags modules. But I'm also thinking how to do it logically and what implies for each page/module. For example, there would be two What's new modules (one for the columns/footer and other for the page contents. Do you think that's a good idea?

 

Also the main page is a special page and I've not decided yet if putting a placeholder for it or adding a generic content placeholder and check if the page should load the module or not. Probably the second option is more practical so all modules can have a sort order.

 

The other thing I was thinking is to reorder the admin boxes page to see what's actually on each section/page. I'll give it a try, too.

Share this post


Link to post
Share on other sites

The content modules ant the box modules generally have different contents. The New Products content module might show six or eight products where the box module only has room for one. It would be possible to do this with a different template for each use, but the code would be inefficient. I would keep them as two separate modules.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Just finished it, I hope I made everything okay with github.
Next I'll probably make the boxes admin more friendly and graphical.

Share this post


Link to post
Share on other sites

Hi @@burt, will this changes be applied? I have some other thinks like this to do but I'm not sure if you consider these useful to be uploaded.

Share this post


Link to post
Share on other sites

What is the address of your Github @@piernas


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

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

×