Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can anyone solve this??


antigeek

Recommended Posts

Posted

Hello,

 

basically i just want to add a checkbox to checkout_shipping.php that is verified to display either a "thank you" or "please confirm your address is a business" alert when continue is pressed.

 

I have added to checkout_shipping.php

• A checkbox form with one checkbox....form called checkform .....box called checker

• Javascript function 'Validate2()'

• an onclick connected to the continue button which calls validate2() ......this works if I just have an alert in my JS function

i.e.

function Validate2(){

alert(' thank you');

}

 

here is the code im using.

 

Thanks in advance to whoever comes to my rescue.

 

lines 168-174

function Validate2() {

if(document.checkform == true)

{ alert('thank you'); }

} else if {

(document.checkform == false)

{ alert('Please ensure your delivery address is a business'); }

}

 

 

 

 

my form lines 300 - 307

<form name="checkform" method="post">

<label><br /><br />

<div align="right">

<input name="checker" type="checkbox" class="style2" onCLick="java script:document.checkform.submit();" value="true">

<span class="style2">check this box to confirm the address you have<br>

entered is a business address.</span></div>

</label>

</form>

 

Lines 468-471

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>

<td align="right" class="main" onCLick="MM_callJS('Validate2()')"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

Archived

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

×
×
  • Create New...