I have tryed to hack on my own the file tpl_shopping_cart, but there is something wrong in what I do. If I save the hacked file and reload the page, the entire column were the shopping cart is disappears.
I think that the problem I am having is in the syntax, but I do not know nothing about and I am trying to understand.
Thanks for your help
enzo
This is the original code
//Begin free shipping qualifier
$free_ship_on = MODULE_SHIPPING_FREEOPTIONS_STATUS;
if ($free_ship_on == 'True') {
$free_limit = MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN;
if ($_SESSION['cart']->count_contents() > 0) {
$_SESSION['cart']->get_products();
$basket_total = $_SESSION['cart']->show_total();
if ($basket_total < $free_limit) {
$diff_to_free = ($free_limit - $basket_total);
$content .= '<span class="freeoptions">' . '<style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>Aggiungendo prodotti per '. $currencies->format($diff_to_free) .' <style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>avrai diritto alla spedizione gratuita!</b></span></span>' . '</span>';
} else {
$content .= '<span class="freeoptions">' . '<p style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>Complimenti! Hai diritto alla spedizione gratuita!</b></span></span>' . '</span>';
}
} else {
$content .= '<span class="freeshipping">' . 'Spedizione gratuita per ordini di ' . $currencies->format($free_limit) . ' or more.' . '</span>';
}
}
//End of free shipping qualifier
This is the hacked code
//Begin free shipping qualifier
$free_ship_on = MODULE_SHIPPING_FREEOPTIONS_STATUS;
if ($free_ship_on == 'True') {
$free_limit = MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN;
if ($_SESSION['cart']->count_contents() > 0) {
$_SESSION['cart']->get_products();
$basket_total = $_SESSION['cart']->show_total();
if $_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1') {
$content .= '<span class="freeoptions">' . '<p style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>Complimenti! Hai diritto alla spedizione gratuita!</b></span></span>' . '</span>';
{
if ($basket_total < $free_limit) {
$diff_to_free = ($free_limit - $basket_total);
$content .= '<span class="freeoptions">' . '<style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>Aggiungendo prodotti per '. $currencies->format($diff_to_free) .' <style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>avrai diritto alla spedizione gratuita!</b></span></span>' . '</span>';
} else {
$content .= '<span class="freeoptions">' . '<p style="text-align: center; "><span style="font-size: small; "><span style="color: rgb(255, 0, 0); "><b>Complimenti! Hai diritto alla spedizione gratuita!</b></span></span>' . '</span>';
}
} else {
$content .= '<span class="freeshipping">' . 'Spedizione gratuita per ordini di ' . $currencies->format($free_limit) . ' or more.' . '</span>';
}
}
}
//End of free shipping qualifier