Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Creating a new infobox

Quite often people want to add new infoboxes to their store. For example, to add some social media links.

This tutorial will show you how to create a new infobox called “social” for this.

  1. Start by copying the code below and pasting it into a new file which you can save in catalog/includes/boxes/social.php Obviously, you will need to change the urls to be the ones you want to use.
$Id: social.php $

  osCmax e-Commerce

  Copyright 2000 - 2012 osCmax

  Released under the GNU General Public License
<!-- social media //-->
  $corner_top_left = 'rounded';
  $corner_top_right = 'rounded';
  $corner_bottom_left = 'rounded';
  $corner_bottom_right = 'rounded'; 
  $boxContent_attributes = ' align="center"';
  $boxLink = '';
  $box_base_name = 'social';
  $box_id = $box_base_name . 'Box';
  $boxContent = '<a href="http://www.facebook.co.uk/the_rest_of_your_url" target="_blank">' . tep_image(DIR_WS_TEMPLATES . 'images/facebook.png') . '</a>&nbsp;';
  $boxContent .= '<a href="http://www.twitter.co.uk/the_rest_of_your_url" target="_blank">' . tep_image(DIR_WS_TEMPLATES . 'images/twitter.png') . '</a>&nbsp;';
  include (bts_select('boxes', $box_base_name));

  $boxContent_attributes = '';

<!-- social media eof //-->
  1. Add your images for the social media links to catalog/templates/{your_template}/images/ - there are some nice ones here
  2. Now open your admin panel
  3. Open Configuration → Templates → Infoboxes
  4. Click New Infobox
  5. Add the following information:
    1. Filename: social (Or whatever filename you created - spaces are convert to _)
    3. Column: left or right
    4. Sort Order: Whatever you want
    5. Set box as active: true
  6. Now all you need to do is to define your new BOX_HEADING by opening core.php in each of the language folders found in catalog/includes/languages/{your_language}/core.php and add
define('BOX_HEADING_SOCIAL_MEDIA', 'Keep in touch');

And there you have it! Wasn't too hard was it

So what next? Perhaps some individual styling for the different infoboxes? Styling infoboxes

  • Bookmark at
  • Bookmark "Creating a new infobox" at Reddit
  • Bookmark "Creating a new infobox" at Google
  • Bookmark "Creating a new infobox" at Facebook
  • Bookmark "Creating a new infobox" at Twitter
  • Bookmark "Creating a new infobox" at Slashdot
v2.5/creating_a_new_infobox.txt · Last modified: 2012/03/12 14:25 by pgmarshall
You are here: startv2.5creating_a_new_infobox
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0