Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Currency infobox problems


meko6

Recommended Posts

Posted

I'm completely stuck on this one :(

 

I'm trying to place the currency infobox in the footer and each time I change the currency whilts on a product page, it has the same function as clicking the "add to cart" button.

 

It works if the currency infobox is placed in the header and simply changes the currency & prices but as soon as I move it to the footer, I get the add to cart function instead.

 

I have then tried including a stripped down version of the column_right.php but it stops working as soon as I remove the "tell a friend" infobox.

 

below works

 

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
//if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 /*} else {
   include(DIR_WS_BOXES . 'specials.php');*/
 }
/*  require(DIR_WS_BOXES . 'reviews.php');
*/
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
  /* include(DIR_WS_BOXES . 'languages.php');*/
   include(DIR_WS_BOXES . 'currencies.php');
 }
?>

 

but as soon as I reduce the code to this (below) it stops working

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
  /* include(DIR_WS_BOXES . 'languages.php');*/
   include(DIR_WS_BOXES . 'currencies.php');
 }

 

any help would be awesome :D

 

the following is a link to an example: Example

Posted

Look at the HTML source.

 

You're missing a </form> tag:

 

<form name="currencies" action="http://www.YOURSITE.site88.net/catalog/product_info.php" method="get">
</form>
.
.
.
<form name="quick_find" action="advanced_search_result.php" method="get">
</form>
.
.
.
<form name="cart_quantity" action="http://www.YOURSITE.site88.net/catalog/product_info.php/products_id/37/action/add_product" method="post">
.
[b](YOU NEED A [color="#FF0000"]</form>[/color] TAG HERE BEFORE STARTING THE NEXT FORM)[/b]
.
<form name="tell_a_friend" action="http://www.YOURSITE.site88.net/catalog/tell_a_friend.php" method="get"><input type="text" name="to_email_address" size="10">
</form>
.
.
.
<form name="currencies" action="http://www.YOURSITE.site88.net/catalog/product_info.php" method="get">
</form>

You have to close each form before opening the next form or the input goes to the wrong form.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Brilliant!! Thanks for your reply Jim. :D I have found the offending section which is located in product_description.php

 

<td width="111"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

this is a standard method (I checked the OSCommerce online demo which has the same unclosed form). How can I add the <form></form> to this call to make the categories.php work correctly in the footer?

Archived

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

×
×
  • Create New...