Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Free Shipping Code help


EuroTech

Recommended Posts

I have freeshipping v3.5 i believe. i wanted to be able to show the differece of the cart current cart subtotal and the free shipping amount. SO i want it to say" You have $65 in you cart, spend $5 more and get free shipping". How do I do this? It is similar to what Daggling Carrot Gift mod. Can anyone help?

Link to comment
Share on other sites

I have freeshipping v3.5 i believe. i wanted to be able to show the differece of the cart current cart subtotal and the free shipping amount. SO i want it to say" You have $65 in you cart, spend $5 more and get free shipping". How do I do this? It is similar to what Daggling Carrot Gift mod. Can anyone help?

 

You want to show that on the checkout shipping page as a message or somewhere completely different ?

Link to comment
Share on other sites

On the checkout shipping would be OK, or in the shopping cart before they checkout

 

I asked because on the shopping cart it would require a lot of custom coding, on the checkout shipping page you can do this more easily.

For that edit (catalog)/includes/modules/shipping/freeamount.php

Search for

	function quote($method = '') {
  global $order, $cart, $shipping_weight;

and change to

	function quote($method = '') {
  global $order, $cart, $shipping_weight, $currencies;

Then search for

$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;

and change to

$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR1 . $currencies->format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT - $cart_total)  .  MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR2;

 

In your (catalog)/includes/languages/english/modules/shipping/freeamount.php split the define

define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR', 'blah blah blah');

to

define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR1', 'You are ');
define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR2', ' left from free shipping !');

or something like that.

 

Also you have to set ' Enable Display' to true in your freeamount shipping module.

Link to comment
Share on other sites

I asked because on the shopping cart it would require a lot of custom coding, on the checkout shipping page you can do this more easily.

For that edit (catalog)/includes/modules/shipping/freeamount.php

Search for

	function quote($method = '') {
  global $order, $cart, $shipping_weight;

and change to

	function quote($method = '') {
  global $order, $cart, $shipping_weight, $currencies;

Then search for

$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;

and change to

$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR1 . $currencies->format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT - $cart_total)  .  MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR2;

 

In your (catalog)/includes/languages/english/modules/shipping/freeamount.php split the define

define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR', 'blah blah blah');

to

define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR1', 'You are ');
define('MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR2', ' left from free shipping !');

or something like that.

 

Also you have to set ' Enable Display' to true in your freeamount shipping module.

 

i did as you said and when i have $30 in my cart it says "You are $75.00 left from free shipping !" when free shipping is at75. I want it to tell me the difference. how can i do this?

Link to comment
Share on other sites

i did as you said and when i have $30 in my cart it says "You are $75.00 left from free shipping !" when free shipping is at75. I want it to tell me the difference. how can i do this?

 

If you have Freeamount 3.5 installed you should have the variable $cart_total already. My guess is you have installed an earlier version and so do not have that vairable ready.

Add

	  $cart_total = $cart->show_total();

after

	  global $order, $cart, $shipping_weight, $currencies;

so it looks like

	  global $order, $cart, $shipping_weight, $currencies;

  $cart_total = $cart->show_total();

Link to comment
Share on other sites

If you have Freeamount 3.5 installed you should have the variable $cart_total already. My guess is you have installed an earlier version and so do not have that vairable ready.

Add

	  $cart_total = $cart->show_total();

after

	  global $order, $cart, $shipping_weight, $currencies;

so it looks like

	  global $order, $cart, $shipping_weight, $currencies;

  $cart_total = $cart->show_total();

 

Thanks that worked.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...