Step 3 ...
Change the template file for:
/includes/templates/template_default/templates/tpl_checkout_shipping_default.php
where it reads:
Code:
<div id="defaultSelected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>
to read:
Code:
<?php
// check for customer group where wholesale group = 2
global $db, $cart;
$group_check = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($group_check->fields['customers_group_pricing'] == 2) {
// whole sale for over 500
$over_total = 500;
} else {
// retail sale for over set amount
$over_total = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
}
?>
<div id="defaultSelected"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format($over_total)) . zen_draw_hidden_field('shipping', 'free_free'); ?></div>
Then change the template file for the shipping estimator:
/includes/templates/template_default/templates/tpl_modules_shipping_estimator.php
where it reads:
Code:
<?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)); ?>
to read:
Code:
<?php
// check for customer group where wholesale group = 2
global $db, $cart;
$group_check = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($group_check->fields['customers_group_pricing'] == 2) {
// whole sale for over 500
$over_total = 500;
} else {
// retail sale for over set amount
$over_total = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
}
echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format($over_total));
?>
NOTE: on all of these changes be sure to use your templates and override directories where applicable ...
Wasn't that a fun time to write? Remember us when you are rich and famous!