Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new box in sts


Guest

Recommended Posts

i asked this on the sts thread but no answer. have tried searching but not gettig the result i need

 

the questions is how do i create a new box? what's the difference in the code with sts compared with the one without sts?

 

i can create a new box in the osc but not sure how with sts as the naming in the template gives me no idea where i should edit to have the box on the columns

 

thanks

Link to comment
Share on other sites

first you have to add something like this in your includes/column_left.php:

 

example comes from a box that i've added:

 

  require(DIR_WS_BOXES . 'featured.php');
 // STS: ADD
 $sts_block_name = 'featuredbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 

 

then in includes/sts_display_output.php around line 220 find:

 

  $template['breadcrumbs'] = $breadcrumb->trail(' » ');

 

and after that you should place your box-heading definition somewhere - which should look like this:

 

  $template['featuredboxheading'] = TABLE_HEADING_FEATURED_PRODUCTS;

 

 

 

then find this code around line 250:

 

/////////////////////////////////////////////
////// Create custom boxes
/////////////////////////////////////////////

 

and after that somewhere place your box definistion which should look like that:

 

  $template['featuredbox'] = strip_unwanted_tags($sts_block['featuredbox'], 'featuredbox');

 

 

finally around line 330 find:

 

  // print column_left stuff

 

there you specify in which column you box should appear - so under column left or column right you place your code:

 

 
 echo $sts_block['featuredbox'];

 

 

 

and thats it for the STS - stuff - then just call $featuredbox in your template and it should be there - but don't forget that you have to have the right box in your includes/boxes/ folder !!!

 

 

;) - hope that helps you out

 

 

PS: the heading must be specified in your language --> like in includes/languages/english.php you must have:

 

define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products');

Link to comment
Share on other sites

  • 2 years 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...