Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Tab ver1.3 + STS templating


spieh

Recommended Posts

My goal is to have basically a 1-row, multiple-column table where I can list each category in its own <TD> tag so i can space them out horizontally across the top of my page instead of all in a small infobox on one of the side columns.

 

Checking the contribution section I found a contribution called Category Tabs ver 1.3 which when I installed it, intially it did nothing. Upon further inspection I discovered that the STS template system was taking precidence over the page. Any changes I made to header.php were not displaying on the page at all because they were not in the Sts_template.html. I edited the sts_display_output.php to disable the STS template so it would load the non-templated data & voila the Category Tabs were there now.

 

So my question would be, how can I get the two Contributions to work in conjunction with eachother?

 

-Dave

Link to comment
Share on other sites

I have cat tabs working with STS. No time now, but I'll post the solution later in case you want to try.

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ

Link to comment
Share on other sites

OK after doing some thinking I believe I have solved the issue:

 

Category Tabs 1.3 adds category_tabs.php to your /includes folder. Well since STS captures the output of php & stores the output into a variable name you have to add a couple lines to any new file you wish to capture the output from.

 

In order to capture the Category Tabs you add

"

// STS: ADD

// Capture text between category_tabs.php and header.php

require(STS_START_CAPTURE);

// STS: EOADD

"

inside of your category_tabs.php file. Adding these lines of code will actually populate the "$headcontent" variable with your tabs info.

 

Now to just modify the CSS to my liking :)

Link to comment
Share on other sites

Hmmm... You did it differently than I did. I added a new "block" to sts_user_code.php:

 

$sts_block_name = 'cat_tabs';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'categories_tab.php');
require(STS_STOP_CAPTURE);
$template['cat_tabs'] = strip_unwanted_tags($sts_block['cat_tabs'], 'cat_tabs');

 

then called it in sts_template.html:

 

<!-- Begin Category Tabs Mod -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="TabsSides">
?<tr class="TabsNavigation"> 
? ?<td align="center" valign="bottom" nowrap class="TabsSides">$cat_tabs</td>
?</tr>
</table>
<!-- End Category Tabs Mod -->

 

I didn't have to change any of the other files to get it to work (except for adding some style changes to make it look like I wanted).

Edited by Mary B.

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ

Link to comment
Share on other sites

  • 7 months later...
I had trouble with those 2 contributions (STS and Category Tabs with Subs) running together back when I started out in osCommerce.

 

Rather than trying to find the solution (which there probably was one) I decided to go with BTS and Category Tabs with Subs.

 

How did you get the category Tabs with Subs contrib. working with BTS? I think I'm looking into this too hard as I can't seem to figure out where to add the header code??

 

Hope you can help

Edited by Nefermet
Link to comment
Share on other sites

  • 10 months later...

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...