Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

X amount till Free Shipping?


barakas

Recommended Posts

I notice that oscommerce has the default ability to have all orders over a certain amount to qualify for free shipping.

 

Is there a contribution that would add text to the effect of

 

"You are only [X amount of money] away from qualifying for free shipping."

 

 

With the amount of money being based on the cart contents of the time.

 

 

It would be a nice device to have to push up the average order amount, anyone know of such a contribution?

Link to comment
Share on other sites

You might get some ideas here:

 

Amount till free shipping

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

thanks for the link Germ, this is the kind of thing I was looking for.

 

burt, I'm well aware this kind of stuff can be coded fairly easily, but I'm not a coder. If everyone should code everything they use, then what would be the point of sharing contributions?

Link to comment
Share on other sites

burt, I'm well aware this kind of stuff can be coded fairly easily, but I'm not a coder. If everyone should code everything they use, then what would be the point of sharing contributions?

 

So, if you can't code, when will you ever share anything? Do you see where your point of view takes you???

 

Anyway, my feelings;

 

If you give a man a fish, he'll have a meal.

If you give a man a fishing rod, he'll have a meal every day.

 

Don't you think it would be nice/helpful to know a little code?

 

That said, I understand completely that 99.9% of the people here will never even look at coding something up from scratch - it's a pity in my opinion.

 

But that's all it is, my opinion.

Link to comment
Share on other sites

  • 2 months later...
But that's all it is, my opinion.

 

That's a nice opinion Burt, I agree with you...

 

Meanwhile, I would like to know if anyone came up with a way to restrict the text based on the country of the user (i.e. if the free shipping w/min amount is only for UK, any other country will not see the text).

 

... just wondering if anyone has already coded this before I go ahead and write it myself (save me time people, come on!)

 

Thanks

Link to comment
Share on other sites

Does anyone know how to add the "x amount until free shipping" to the shopping_cart.php and the checkout_shipping.php files? I have the text displaying fine in the shopping cart box (right column) but would like to display it on the main pages to.

 

Here's the code I have. I've tried adding it to the above files without success:

 

<?php  // BEGIN JS Amount Till Free Shipping
 $free_shipping_mount = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER; 
  if ($cart->count_contents() > 0) {

	  if ($cart->show_total() < $free_shipping_mount) {
			   $info_box_contents[] = array('text' => tep_draw_separator());  
			   $info_box_contents[] = array('align' => 'left',
							   'text' => '<span class="freeship2">' . BOX_SHIPPING_CART_FREE_SHIPPING . $currencies->format($free_shipping_mount) . '</span><br>');
				$info_box_contents[] = array('align' => 'left',
										 'text' =>  '<span class=freeship2>' . BOX_SHIPPING_CART_LEFT_TO_QUALIFY . '</span><br><span class=freeship>' . $currencies->format($free_shipping_mount - $cart->show_total()) . '</span>');							 							 

 } else if ($cart->show_total() > $free_shipping_mount) {
				  $info_box_contents[] = array('text' => tep_draw_separator());   
				  $info_box_contents[] = array('align' => 'left',
										 'text' =>  '<span class=freeship>' . BOX_SHIPPING_CART_QUALIFIES_FREE_SHIPPING . '</span>');							 							 
  }	
 }  
 // END JS Amount Till Free Shipping

?>

Link to comment
Share on other sites

I've been doing a redesign on one of my sites and this is something that I wanted as well.

Its not country specific but it might be a start

 

<?php $freeshipping = 99 - $currencies->format($cart->show_total()); ?>

<?php

if ($currencies->format($cart->show_total()) > '99') {

?>

<span class="font_size_reg">Your order qualifies for FREE Ground Shipping!</span>

<?php } else { ?>

<span class="font_size_reg">Add <font color='#FF6699'>$<?php echo $freeshipping; ?></font> to qualify for FREE Ground Shipping!</span>

<?php } ?>

 

Cheers

Link to comment
Share on other sites

I've been doing a redesign on one of my sites and this is something that I wanted as well.

Its not country specific but it might be a start

 

<?php $freeshipping = 99 - $currencies->format($cart->show_total()); ?>

<?php

if ($currencies->format($cart->show_total()) > '99') {

?>

<span class="font_size_reg">Your order qualifies for FREE Ground Shipping!</span>

<?php } else { ?>

<span class="font_size_reg">Add <font color='#FF6699'>$<?php echo $freeshipping; ?></font> to qualify for FREE Ground Shipping!</span>

<?php } ?>

 

Cheers

 

Great, thanks, I'll try that. Out of interest, is your amount set at $99 - as in the first line? If so, I presume I would set this to whatever my amount is?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...