Free shipping qualifier sidebox
I installed "Shopping Cart Free-Shipping-Qualifier Sidebox Template, " and it works wonderfully. It tells you how much more to add to qualify for free shipping. My problem is, showing the shopping cart in the sidebox reduces my website performance. I want to turn it off, so I want to move the function to my shopping cart page.
I copied and pasted the PHP code into tpl_shopping_cart_default.php in different places, but I can't get it to work. I noticed that variables were different, so I tried to fix it, but I'm not a PHP coder (basically, I don't know what I'm doing). Any help is appreciated!
BTW, the code that's inserted to templates/CUSTOM/sideboxes/tpl_shopping_cart.php is:
PHP Code:
<?php
$free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;
if ($free_ship_on == 'true') {
$free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
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="redtext">' . 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping!' . '</span>';
} else {
$content .= '<span class="redtext">' . 'Your order qualifies for Free Shipping!' . '</span>';
}
} else {
$content .= '<span class="redtext">' . 'Free Shipping on orders over ' . $currencies->format($free_limit) . '!' . '</span>';
}
$content .= '<br class="clearBoth" />';
$content .= '<a href="' . zen_href_link(FILENAME_SHIPPING) . '">' . 'Click here for details.' . '</a>';
}
?>
Re: Free shipping qualifier sidebox
Have you an URL to your site?
I'd be really curious to see how this is slowing down your site ... it is not a very big load on grabbing information ... and just doesn't make sense that it would slow down your site enough to notice ... :unsure:
Re: Free shipping qualifier sidebox
http://www.ktnaturals.com/catalog
It's the whole shopping cart sidebox that's slowing down my site, not the little addition. When I turn off the shopping cart sidebox, it takes a full second less to load my pages. It's not much, but I'm anal like that.:P
I was originally going to post how else I can improve performance since my site seemed slow, and I figured it out by trial & error. Add a whole bunch of stuff into the shopping cart, and you can tell the difference.
Re: Free shipping qualifier sidebox
You don't have enough on your site to have things like this slow you down ...
I'd be speaking to my hosting site about a faster server ...
Re: Free shipping qualifier sidebox
I installed the module in my 1.3.7 - only two files (how difficult is that?). I am unable to get it to display on my site - obviously I am missing something that needs to be configured in admin. If you would advise the correct admin changes that need to be done - would be most appreciated. Thanks
Re: Free shipping qualifier sidebox
I wanted to install this but the zip file has one file in there and does nothing to my site and has no readme etc:cry:
Re: Free shipping qualifier sidebox
While I haven't used this contribution, I did check it out.
You have to rename the file that comes with the contribution
"tmp_shopping_cart.php" to tpl_shopping_cart.php
After renaming the file you should save it to:
includes/templates/YOUR_TEMPLATE/sideboxes/tpl_shopping_cart.php
Upload the file to your server.
This file replaces the default shopping cart sidebox.
Re: Free shipping qualifier sidebox
Thanks - I had already done that. I think this is an issue with the particular template I currently have in place. I tried it on my test server with other templates and it seemed to work.
Re: Free shipping qualifier sidebox
I've installed this and it's working fine except for one thing - I can't change the free shipping level - it's stuck at $50.
I'm using the Free Shipping Options module to set the level at $60, but this shopping cart mod always calculates the free shipping as $50. I've tried changing the amount in the Free Shipping Options module but the shopping cart always calculates the free shipping as $50.
I would really like to use this - does anyone have any idea what's wrong?
Re: Free shipping qualifier sidebox
I ended up inserting my free shipping level amount in the code and it's working great.