Guest Posted January 13, 2005 Share Posted January 13, 2005 Has anyone any idea how I would go about changing the info box design? [1] ______________________________________________________________ From what I have read you have to manually change code within non-STS files. If this is the case, whats file(s) need changing? [2] ______________________________________________________________ Is it not possible to pull just the data for each infobox into a box hardcoded within your STS template? For example; could I not creat a fancy box in my STS template and just pull the category list into that? I read through the main STS thread and came across the same question many times but couldnt find any solution/instructions. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2005 Share Posted January 13, 2005 (edited) Hi Kris, If you take a look at http://www.themusicbuilders.com/store then this is a site that I am in the process of designing. As you can see the standard osCommerce look has been completely taken away via using STS. All you do is design your template as you want it to look and then insert the STS variables into the file where you want the information to appear. When the page loads on the internet it will populate with the correct data. If you wish to remove the standard osCommerce 'Categories' header text and other box header texts then this can be done very easily by just commenting out a couple of lines in the correct php file. The lines to comment out for the 'Categories' section would be these shown below : // $info_box_contents[] = array('align' => 'left', 'text' => BOX_HEADING_CATEGORIES); // new infoBoxHeading($info_box_contents, true, false); They will be located near the bottom of the script located in catalog/includes/boxes/categories.php This will get rid of the standard osCommerce table colour and heading. Another site that I am in the process of designing is http://www.helitorque.com/clients/bsr/store N.B. TO ALL PEOPLE VIEWING THIS - Please don't create any user accounts for this store as it will go live in the near future and we need no phony user accounts. Anyway I hope this helps you out a bit. Regards, Mark Bowen Edited January 13, 2005 by Mark Bowen Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2005 Share Posted January 13, 2005 Thanks for your reply Mark. So by commenting out the relevant lines within 'catalog/includes/boxes/categories.php' I can completely remove the surrounding HTML from the Categories info box - is this correct? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2005 Share Posted January 13, 2005 Hi Kris, What this will do is get rid of any osCommerce template styles and just output the content of the 'infoBox' that you need. The rest is then done with STS. All you need to do is to place the STS variable for the catalogue listing which is '$categorybox' minus the quotes and the content will fill the area that you have placed the variable into. If you like you can download the template I am creating for the site I linked to before at : http://www.themusicbuilders.com/store/incl...s_template.html and take a look at what I mean. Note to all readers of this post - Please do not download any of the images pertaining to this design as they are all copyright of the site owner. Hope this helps you out. Regards, Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted January 13, 2005 Share Posted January 13, 2005 OK, I just gave this a try. By editing the includes/boxes/categories.php file I can remove some of the HTML that wraps the content, but not all. It would seem that I will need to edit the includes/classes/boxes.php file in order to do this. However, this will effect ALL boxes including the content area ones (like the product listing box). Thats a shame.... Is there any other way around this? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 Hi Kris, What exactly is it that you need to remove. The two lines I showed above should get rid of most of the HTML for you and then you can do the rest in STS. Did you download the template that I linked to as that will show you most of what I mean. If you have any other probs don't hesitate to ask. Regards, Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 When I removed those tags from 'includes/categories.php' I get his: <table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td class="boxText"><a href="http://xxx.co.uk/index.php?cPath=1">Hardware-></a> (6)<br><a href="http://xxx.co.uk/index.php?cPath=2">Software-></a> (4)<br><a href="http://xxx.co.uk/index.php?cPath=3">DVD Movies-></a> (17)<br></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> It's still wrapped in html producted I believe by 'includes/classes/boxes.php'. All I really want is: <a href="http://xxx.co.uk/index.php?cPath=1">Hardware-></a> (6)<br><a href="http://xxx.co.uk/index.php?cPath=2">Software-></a> (4)<br><a href="http://xxx.co.uk/index.php?cPath=3">DVD Movies-></a> (17)<br> This would be just the list of categories (and subcategories etc). No formatting accept the 'BR' taggs which I can manipulate in the 'categories.php' file. Bear in mind that if I completely edit the 'includes/classes/boxes.php' file this effects ALL boxes... :o Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 (edited) OK, I think I see where your coming from. I can define my own 'infoBox' and 'infoBoxContents' styles to the HTML that wraps the content. This doesnt effect the boxes for product listings etc. that appear in the main content area. So to sum it up: 1. You cant remove all of the wrapping HTML from infoboxes, but you can remove the bit that creates the header box. 2. You can then define your own styles for the remaining HTML. 3. You can then do the same for the boxes that go in the main content area. Edited January 14, 2005 by unitetechnology Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 Hi Kris, Pretty much that's it. I think the code that creates the boxes is standard for all so what I do is just let osCommerce spit out the content for each box using its respective file and then wrap some HTML design around it. If I then need more control over the way that the information is displayed I will then go into each seperate file, such as the categories.php file and change whatever I need to get it looking exactly right. Hope all of this has helped. Regards, Mark Quote Link to comment Share on other sites More sharing options...
Guest Posted January 14, 2005 Share Posted January 14, 2005 Thats great Mark, thanks for your help. Lets hope OSC MS3 allows us more control :-" Quote Link to comment Share on other sites More sharing options...
amx_dk Posted March 30, 2005 Share Posted March 30, 2005 Mark Bowen, you seem to know you way around the (sts) category codes. But is it possible to change the layout of the category list from vertical to horizontal? from: Cd'es Dvd Camcorder Software Hardware to Cd'es | Dvd |Camcorder | Software | Hardware I'm looking for a mod. that does this, but maybe, it could be done by simple changing the basic code. :blink: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.