First, let's look at typical instructions from a 2.2 Addon. The following example is shamelessly copied from Jack's excellent EasyMap addon (which already has the instructions for 2.3 and doesn't need this guide.)
Quote
-----------------------------------------------------------------------
3) In includes/boxes/information.php
REPLACE
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
with
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>');
-----------------------------------------------------------------------
3) In includes/boxes/information.php
REPLACE
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
with
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>');
-----------------------------------------------------------------------
Quote
'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>');
'<a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>');
Note that the first part is FILENAME and is in all caps. That's how you know that it's a filename. If you look in catalog/includes/filenames.php you'll find a big list of these. Also note that our example Addon, EasyMap, adds a new definition to this file for FILENAME_EASYMAP. The Addon that you want to install should do something similar.
The next part that we need to look at is also in all caps: BOX_INFORMATION_EASYMAP. This is the part that defines the text. It will have a separate definition for each language in your shop. For example, look in catalog/includes/languages/english.php. You'll see that our example adds a definition for BOX_INFORMATION_EASYMAP in that file. These also have a similar structure to the filenames: The BOX part says that it's part of a box, and the INFORMATION part says that it's part of the Information box.
Now it's time to do something with the information that we've gathered. Let's take a look at the code in the new box at catalog/includes/modules/boxes/bm_information.php. Yes, there's a lot of it, but there is only a small part of that that we need to be concerned with:
Quote
$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
' </div>' .
'</div>';
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
' </div>' .
'</div>';
Quote
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
There's one other little difference that you need to pay attention to: Every line except the last has a <br /> near the end. This is what puts the links on separate lines in the box. so, if we are going to add a new line after this one we need to add that to the end of the line, like so:
Quote
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
We still need to add a new link to the bottom of the list. To keep from messing up those pesky single quotes, just copy the existing last line and paste it in again below the original. Remember that the last line doesn't need that <br /> near the end. So now our file looks like this:
Quote
$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
' </div>' .
'</div>';
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' .
' </div>' .
'</div>';
Quote
$data = '<div class="ui-widget infoBoxContainer">' .
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>' .
' </div>' .
'</div>';
' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' .
' <div class="ui-widget-content infoBoxContents">' .
' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' .
' <a href="' . tep_href_link(FILENAME_EASYMAP) . '">' . BOX_INFORMATION_EASYMAP . '</a>' .
' </div>' .
'</div>';
That's it; you're done. Now the test: Go apply this knowledge to the Addons that you want to use.
Please keep any discussion here related to this Tip. I'm perfectly willing to answer questions if you're unclear about something I've said above, but I won't go off-topic.
Regards
Jim














