Jump to content
Latest News: (loading..)
Sign in to follow this  
Peper

Order insurance

Recommended Posts

So small glitch that customers are neglecting.

 

I have Shipping insurance installed but for customers that are collecting in store or want to use own courier collection are not disabling shipping insurance option and then they checkout and pay for insurance.

 

On my previous store I had following similar code and worked well to remove insurance for this options in these cases.

So for similar action I'm trying to tell checkout_payment.php that if store collections (spu) or flat rate (flat) but is not working

 

I was trying few other methods but like below shipping insurance is always 0 even when required.

 

Anyone that can give some help on this please?

    <?php
if ($_SESSION['shipping']['id'] == 'spu_spu' || $_SESSION['shipping']['id'] ==  'flat_flat')
{
	
?>
<input type="checkbox" name="choose_insurance" value="0" checked>
<?php
}

  $_SESSION['choose_insurance'] = $_POST[choose_insurance];
  // END Shipping Insurance 3.0 with customer choice
?>

original old store code for checkout_payment.php page:

    <?php
if ($_SESSION['shipping']['id'] == 'spu_spu' || $_SESSION['shipping']['id'] ==  'flat_flat')
{
	
}else{	 
// BEGIN Shipping Insurance 2.0 with customer choice
if (($order->info['total'] >= MODULE_ORDER_TOTAL_INSURANCE_OVER) && (MODULE_ORDER_TOTAL_INSURANCE_STATUS == 'true') && (MODULE_ORDER_TOTAL_INSURANCE_USE == 'true')) {
?>
		<tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
         <td class="main"><b><?php echo TEXT_SHIPPING_INSURANCE_TITLE;
		 ?>
         </b></td>
      </tr>
			<tr>
				<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
					<tr class="infoBoxContents">
						<td class="main" width="100%" align="left"><input type="checkbox" name="choose_insurance" value="1" checked>   <?php echo TEXT_SHIPPING_INSURANCE_CHOICE; ?>  <span class="smallText"><?php echo TEXT_SHIPPING_INSURANCE_DISCLAIMER; ?></span></td>
					</tr>
				</table></td>
			</tr><tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>

<?php
 }
}

// END Shipping Insurance 2.0 with customer choice
?>  

Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×