osCmax v2.5 User Manual
Results 1 to 5 of 5

define('BOX_WIDTH', 125)

This is a discussion on define('BOX_WIDTH', 125) within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; Some observations & suggestions ... I have been doing some template customization over the weekend and one of the things ...

      
  1. #1
    srq
    srq is offline
    Member
    Join Date
    Sep 2009
    Posts
    62
    Rep Power
    3


    Default define('BOX_WIDTH', 125)

    Some observations & suggestions ...

    I have been doing some template customization over the weekend and one of the things that I wanted to change is the width of the info boxes. Info box width is defined in catalog/includes/application_top.php.

    Shouldn't this constasnt (BOX_WIDTH) be defined some place in the custom template folder so that if I changed templates using admin, the definition of BOX_WIDTH changes with the template?

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Smile Re: define('BOX_WIDTH', 125)

    srq,

    This is something a lot of people ask questions about so ...

    ... I agree but perhaps the column width should be set within the admin section? Although I would set the left and right column widths seperately ...

    Michael - v2.1 suggestion ... Perhaps Templates should get its own Page under 'Admin' --> 'Configuration' ...

    Default Template Directory
    Template Switching Allowed
    Left Column Width
    Right Column Width
    [Main Content Area Width ??]

    Any thoughts?

    Regards,
    pgmarshall
    _______________________________

  3. #3
    srq
    srq is offline
    Member
    Join Date
    Sep 2009
    Posts
    62
    Rep Power
    3


    Default Re: define('BOX_WIDTH', 125)

    pgm,

    Good idea about having separate left/right column width. However, we need the flexibility to have multiple templates within a catalog each with respactive column widths settings. Configuring column widths under admin will result into one globaly set constants.

    Also, column width (left/right) is different from info box widths. Column widths are hard coded into the table td tags in template/main_page.tpl.php which is fine. Users have the flexibility to define these as they please.

    Also, there may be instance where one may need different sized info boxes any place on the main page. One can deifine a table or div with a specific width and place an info box within that container and let the info box width strech (width=100%) inside the user defined box.

    So, all we have to do is make info box widths 100% and let it fit inside its container box. This way, there is no need for BOX_WIDTH constant. All we need to do is define widths of left/right column and let the info boxes fit inside the columns (with some margins).

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: define('BOX_WIDTH', 125)

    The template system allows you to fully style every aspect of your boxes/columns/structure with css. You can simply code template your to use your own CSS and that will allow you to do whatever you please (completely ignoring the BOX_WIDTH constant if you choose).

    That is the great thing about the template system, you are not locked into one way of doing it. With the new HTML BTS template coming in 2.1 (already released in the forums, and available in 2.1 svn already) osCMax tags are introduced, so you can pre-design your site then simply drop in the osCMax elements where you want them to display in your html page.

    You can convert any design to osCMax in minutes now.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: define('BOX_WIDTH', 125)

    Here is an example of the new template system in action.
    http://php5.oscmax.com/oscmax2.1/catalog/

    I converted this css template to work with osCMax in about 15 minutes. It doesn't use any of the default styling, and I created a new button set for the template too (the 2.1 system is now allowing custom button sets within the template structure so you can run multiple templates without overwriting buttons).

    It is just a proof of concept, so it is not fully tweaked, but you get the idea.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. Define Mainpage
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 07-01-2007, 05:32 PM
  2. Re-Define STORE_NAME
    By jpepper in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 07-22-2005, 10:37 AM
  3. Define Mainpage
    By Chippy in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 03-15-2005, 09:56 AM
  4. variables I can't find in configuration, BOX_WIDTH
    By bumpy in forum osCMax v1.7 Installation
    Replies: 1
    Last Post: 11-24-2004, 05:56 PM
  5. define mainpage
    By jloyzaga in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-19-2004, 10:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •