I wanted to document what needed to change in case anybody else ever wants to do this. I includes/modules/pages/checkout_confirmation/header_php.php make the following changes: find the following code around line 54:
PHP Code:
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if (!isset($_POST['conditions']) || ($_POST['conditions'] != '1')) {
$messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
}
}
//echo $messageStack->size('checkout_payment');
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
Change it to this:
PHP Code:
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
if ((DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') && ($order->delivery['country']['id'] != 223)) {
if (!isset($_POST['conditions']) || ($_POST['conditions'] != '1')) {
$messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
}
}
Make the following changes to includes/templates/YOUR CUSTOM TEMPLATE FOLDER/templates/tpl_checkout_payment_default.php around line 26 from
PHP Code:
<?php
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
<?php echo zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
<label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
</fieldset>
<?php
}
?>
to:
PHP Code:
if ((DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') && ($order->delivery['country']['id'] != 223)) {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
<div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
<?php echo zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
<label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
</fieldset>
<?php
}
?>
Bookmarks