Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL with Javascript on shooping_cart.php


bhbilbao

Recommended Posts

Hello everybody,

 

i need help to implement javascript buttons and maintain the SSL sesion on top when clicking them.

Especially in shooping_cart.php page.

 

Here is the code:

<!-- header_eof //-->

<script language="JavaScript1.2">
function UpdateCartQuantity()
{
 document.cart_quantity.submit();
}

function changeQuantity(i,qty)
{
 document.cart_quantity['qty_'+i].value = Number(document.cart_quantity['qty_'+i].value)+Number(qty);

 if( isNaN(document.cart_quantity['qty_'+i].value) || (Number(document.cart_quantity['qty_'+i].value) <= 0 && !confirm("DELETE?"))) {
   document.cart_quantity['qty_'+i].value = document.cart_quantity['qty_'+i].defaultValue
 }
 else {
   UpdateCartQuantity();
 }
}

function check(checkboxid) {
 if (confirm("BORRAR / DELETE / EZABATU?")) {
   document.getElementById(checkboxid).checked = "checked";   
   UpdateCartQuantity();
 }
 else {
   document.getElementById(checkboxid).checked = false;   
 }
}

</script>
<!-- body //-->

 

and

 

	    $minus_field = '<a href="javascript:check(\'checkbox['.$products[$i]['id'].']\');">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>';
  }
  else
  {
    $minus_field = '<a href="javascript:changeQuantity("'.$products[$i]['id'].'",-1)">'.tep_image(DIR_WS_IMAGES .'minusBtn.gif').'</a>';
  }
  $info_box_contents[$cur_row][] = array('align' => 'center',
										 'params' => 'class="productListing-data" nowrap valign="top"',
										 'text' => $minus_field . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2" onChange="javascript:changeQuantity("'.$products[$i]['id'].'",0);" id="qty_'.$products[$i]['id'].'"').'<a href="javascript:changeQuantity("'.$products[$i]['id'].'", 1)">'.tep_image(DIR_WS_IMAGES .'plusBtn.gif').'</a>'. tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

Thanks in advance.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...