Guest Posted April 6, 2004 Posted April 6, 2004 Hi, I'm just getting started with osCommerce, and I'm definitely liking it so far. The system is great, but the default html not so much. I like to do my designs/layout as table-less as possible, that is, no html tables, but everything is done through CSS. It seems like STS is the best way to get things like I want it to be, but I still have a problem: Boxes. Is it possible (and not too hard) to create a whole new "formula" for how the html code for the boxes is generated. I use a stylesheet that enables me to make a new box with html code like this: <div class="box"> <h2>Header</h2> <ul> <li>A bit of text here</li> <li>A bit more text</li> </ul> </div> Can I use that with osCommerce somehow? I hope I haven't been too unclear :) Thanks, Johan Sahl?n
ashlyn Posted April 6, 2004 Posted April 6, 2004 If you upgrade to at least the Milestone 2.2 version and use the BTS template system, you can have 99% control over the layout (with a bit of finetuning). I just did this site with the BTS templates. I'm completely hooked.. *username:oscommerce password:password to enter* ------------------------------------------------------- I used to be insane, but now I'm just nuts ;)
Guest Posted April 6, 2004 Posted April 6, 2004 Thanks for the tip, I'll try that out. Looks like you can do a lot indeed.
Guest Posted April 6, 2004 Posted April 6, 2004 I've been working on it for a while now, and things are moving forward. I have a big problem with the output for product listings though. I want the html output to look like this: <table class="productList"> <tr class="header"> <td class="name">Product name</td> <td class="price">Price</td> <td class="buy">Buy now</td> </tr> <tr class="row"> <td class="name"><a href="#">Product One</a></td> <td class="price">$199</td> <td class="buy"><a href="#"><img src="images/buy_button.gif" /></a></td> </tr> <tr class="row"> <td class="name"><a href="#">Product Two</a></td> <td class="price">$39</td> <td class="buy"><a href="#"><img src="images/buy_button.gif" /></a></td> </tr> </table> How would I go about changing that? Can I do it with the help of BTS, or will I need to change osC's classes? Because I can't figure out how to change them that much without risking the mutilation of other functions that may use that class.
Guest Posted April 6, 2004 Posted April 6, 2004 Oh, I forgot one thing. Can I alter the output for the category list so that before each category link there's a <li> tag and after each one a </li> tag? Also, it would be great if I could add an icon before the names of subcategories instead of an indent. Thanks.
Guest Posted April 6, 2004 Posted April 6, 2004 Ashyln, When entering you site I got 401 AUTHORISATION REQUIRED. You might want to check the spelling of AUTHORIZATION. I looked for the BTS template system. I found a lot of Basic Template Systems. Which one are you refering to, do you have the contribution #. Thanks Peter
paulm2003 Posted April 6, 2004 Posted April 6, 2004 @Peter Ashlyn ment the Basic Template Structure (not system) url: http://www.oscommerce.com/community/contributions,1263/ @Johan to alter the product listing table(s) you indeed will have to work on the box class there is some work done on the Categories using <li>'s I will PM you a link
Guest Posted April 7, 2004 Posted April 7, 2004 Thanks for confirming Paul, I guess I'll start hacking away and see where I end up :)
Guest Posted April 7, 2004 Posted April 7, 2004 Alright, I've figured out how to get the <tr class="row"> bit in there (by changing includes/modules/product_listing.php), and I was able to remove all the params for the table except the class="productList" bit (in classes/boxes.php), but that's about it... I haven't worked a lot with classes in PHP so the code is a bit hard for me to take in. I would be incredibly grateful if someone could just point me in the right direction so that I'd be able to add the "name", "price" and "buy" class parameters to the correct <td>'s (I need it to set the column widths with css, see my code example above), and maybe also how I can remove product pictures from the listing. I would prefer to have the header <tr> to have it's class set to "header", but it's not something I can't work around in css later if it's not possible. Sorry to bother you more with this, but I'm kind of stuck :) Thanks again.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.