Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currency selection in footer.php


Talis

Recommended Posts

Hello,

 

I'm wanting to display the currency selection in my site footer as apposed to in an infobox.

Could any kind soul provide me with the code to insert within my footer (or any other location in the site).

 

Thanks in advance.

Link to comment
Share on other sites

You should search the contributions download area with keywords, most of the time it is easy to find a solution for the issue concerned:

 

Add Links To Footer Bar

 

There will be some modifications to make, such as substituting the information box that the contribution was designed for with the currency one you need.

 

If that is not something for you then why not add clickable direct text links?

 

I wish you success

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Thanks for your reply chooch.

 

I've actually not had any difficulty adding links as stated below to both my header and footer along with images.

I've moved the language selections to my footer without the use of infoboxes but i'm having trouble figuring out the code for the currency choices.

Ultimately i'm looking to use something like Dynamenu to do a stylish dropdown within the footer but first things first.

Link to comment
Share on other sites

I am not familiar with Dynamenu but correct me if I am wrong. You are not adding this code from column_right to your footer?:

 

include(DIR_WS_BOXES . 'currencies.php');

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

That is correct Chooch, I am not adding

 

include(DIR_WS_BOXES . 'currencies.php');

 

This is because of two reasons:

 

1. the infobox ruins the formating of the footer

2. I don not want to modify the infobox functions just to suit this one instance.

 

I simply want to display the dropdown selection without any headings.

Link to comment
Share on other sites

That is correct Chooch, I am not adding

 

include(DIR_WS_BOXES . 'currencies.php');

 

This is because of two reasons:

 

1. the infobox ruins the formating of the footer

2. I don not want to modify the infobox functions just to suit this one instance.

 

I simply want to display the dropdown selection without any headings.

 

Hi,

 

Backup not my code just modified a bit..works for me!

Think the other way round !!!

 

Take away the unnecessary html/ code from your currencies.php that calls the infobox....boxes.php functions.

should the look something like this

<?php

/*

$Id: currencies.php,v 1.16 2003/02/12 20:27:31 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

if (isset($currencies) && is_object($currencies)) {

?>

<!-- currencies //

<tr>

<td>-->

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_CURRENCIES);

 

// new infoBoxHeading($info_box_contents, false, false);

 

reset($currencies->currencies);

$currencies_array = array();

while (list($key, $value) = each($currencies->currencies)) {

$currencies_array[] = array('id' => $key, 'text' => $value['title']);

}

 

$hidden_get_variables = '';

reset($HTTP_GET_VARS);

while (list($key, $value) = each($HTTP_GET_VARS)) {

if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {

$hidden_get_variables .= tep_draw_hidden_field($key, $value);

}

}

 

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get'),

'align' => 'center',

'text' => tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="form_cur"') . $hidden_get_variables . tep_hide_session_id());

//new infoBox($info_box_contents);

?>

<!-- </td>

</tr>

currencies_eof //-->

<?php

}

?>

 

Then try something like this in the footer of course you will have to modify the html to suit your site.

 

<td width="111" align="right"><?php //class="form_cur"

include(DIR_WS_BOXES . 'currencies.php');

echo '<table border="0" cellspacing="0" cellpadding="0" style="margin:45px 0 0 0; height:31px"><tr><td class="text_red" height="14" style="vertical-align:middle">'.BOX_HEADING_CURRENCIES.'</td></tr><tr><td>';

echo ($info_box_contents[0]['form']);

echo ($info_box_contents[0]['text']);

echo "</form></td></tr></table>";?></td>

 

The class BOX_HEADING_CURRENCIES part you should remove if you do not need any headings.

 

John

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...