twitchtoo:
Without seeing the code around the Twitch code block it's possible that the placement is incorrect.
Just to check, when it says add line 35/125 you should be adding one blank line, then pasting in the Twitch code block.
Also be sure to check the location of the file you are changing - is it a** stock ZC override** or your template override?
I've added the code to the stock zen cart files. As far as I am aware those folders don't do template over-rides? I have added the code to a blank line just above the code that's on the stated number lines. Thanks
includes/modules/order_total/ot_shipping.php
if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
case 'both':
$pass = true; break;
default:
$pass = false; break;
}
// bof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
if($_SESSION['customers_wholesale'] >= '1') // a wholesale customer
{
$pass = false; // when false - turn this module off
}
// eof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$order->info['shipping_method'] = $this->title;
$order->info['total'] -= $order->info['shipping_cost'];
$order->info['shipping_cost'] = 0;
}
}
$module = (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) ? substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_')) : '';
if (is_object(($order)) && zen_not_null($order->info['shipping_method'])) {
if ($GLOBALS[$module]->tax_class > 0) {
if (!isset($GLOBALS[$module]->tax_basis)) {
$shipping_tax_basis = STORE_SHIPPING_TAX_BASIS;
} else {
$shipping_tax_basis = $GLOBALS[$module]->tax_basis;
}
includes/modules/pages/checkout_shipping/header_php.php
// load all enabled shipping modules
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;
$pass = true;
if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;
switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}
// bof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
if($_SESSION['customers_wholesale'] >= '1') // a wholesale customer
{
$pass = false; // when false - turn this module off
}
// eof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
$free_shipping = false;
if ( ($pass == true) && ($_SESSION['cart']->show_total() >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;
}
} else {
$free_shipping = false;
}
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
if (isset($_SESSION['comments'])) {
$comments = $_SESSION['comments'];
}
// process the selected shipping method