Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tell customer how much more to spend to get free shipping


delaen

Recommended Posts

  • 1 month later...
  • Replies 66
  • Created
  • Last Reply

I put the code in the correct places I think, but I can't get it to work I am getting nothing to show up in the cart besides the item then when you go to check out you get an error.

 

Can someone please tell me what is wrong? I think this a great code and a great addition to our store.

 

 

Thank you

Link to comment
Share on other sites

Did you put your code in the shopping_cart.php file in Catalog>includes>languages>english?

 

I think that's the file I put it in

Whether you like it, or don't like it, you better learn to love it.

Link to comment
Share on other sites

I put the codes in the files that delaen stated in his post

 

This code in In includesboxesshopping_cart.php

 

if ($cart->count_contents() > 0) {

$info_box_contents[] = array('text' => tep_draw_separator());

$info_box_contents[] = array('align' => 'right',

'text' => $currencies->format($cart->show_total()));

 

if ($cart->show_total() < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {

$add_to_get_free_shipping = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER - $cart->show_total();

$info_box_contents[] = array('align' => 'right',

'text' => sprintf(BOX_SHOPPING_CART_FREE_SHIPPING, $currencies->format($add_to_get_free_shipping)));

 

}

}

 

This code in In includeslanguagesenglish.php

 

define('BOX_SHOPPING_CART_FREE_SHIPPING', 'Add %s to your order and receive FREE shipping!');

 

If this is not correct can you point me in the right direction, I would really like to put this into our store.

 

Thanks

Link to comment
Share on other sites

I got the free shipping info text to show up but when you go to add a second product to your shopping cart you get the following error

 

Warning: Cannot modify header information - headers already sent by (output started at /home/harbors/public_html/catalog/includes/languages/english.php:333) in /home/harbors/public_html/catalog/includes/functions/general.php on line 29

 

 

Does anyone have any idea what I am doing wrong?

 

 

Do you only put the codes in the following files

 

includesboxesshopping_cart.php

 

includeslanguagesenglish.php

Link to comment
Share on other sites

Are you guys using 2.2MS2? Could this maybe be a problem with the new coding of MS2? If so, could someone update the HOWTO of this tip?

 

I have adde dit just fine to my snapshot of April, but have not yet added it to the new site I am puttign up with MS2. I want to make sure it will work.

 

Thanks,

Priest

Link to comment
Share on other sites

Is there way to mod this so that it offer a different spending limit based on the category you're in and also a different one if it's a combonation?

 

 

Some thing like this ;

 

if customer buys from product cat A they have to spend X dollars to get free shipping.

 

If in cat b spend Y dollars,

 

 

 

Why? I have product lines that are on the average $70-120 dollars per item like telelphone headsets. I want to say to this customer that if they buy a top and an Amp they get free shipping.

 

On the other hand I also have phone systems that are in the $1500+ range. They weigh a lot and I can't assign the same level of discount for free shipping to these items as to the 2 pound/$200 headsets.

 

Corwyn

Link to comment
Share on other sites

Is there way to mod this so that it offer a different spending limit based on the category you're in and also a different one if it's a combonation?

 

 

Some thing like this ;

 

if customer buys from product cat A they have to spend X dollars to get free shipping.

 

If in cat b spend Y dollars,

 

 

 

Why? I have product lines that are on the average $70-120 dollars per item like telelphone headsets. I want to say to this customer that if they buy a top and an Amp they get free shipping.

 

On the other hand I also have phone systems that are in the $1500+ range. They weigh a lot and I can't assign the same level of discount for free shipping to these items as to the 2 pound/$200 headsets.

 

Corwyn

Link to comment
Share on other sites

I think that change would have a lot more to do with the way the free shipping mod works than it would have to do with this. A lot of other people have had the same problem and have posted a bunch of threads about it. You might want to search around on the board and see if anyone else was able to answer your question.

Link to comment
Share on other sites

  • 2 weeks later...

Hey, this sounds like a great feature! But I don't have the Shopping Cart box in my store? so instead I would like to add this feature to my shopping cart PAGE under the total price? So before they checkout they get a notice saying, "Hey, spend another $20 and you get free shipping!"

 

Is this possible, and if so how?

 

Thank you!

Link to comment
Share on other sites

Hey, this sounds like a great feature! But I don't have the Shopping Cart box in my store? so instead I would like to add this feature to my shopping cart PAGE under the total price? So before they checkout they get a notice saying, "Hey, spend another $20 and you get free shipping!"

 

Is this possible, and if so how?

 

Thank you!

 

Add the line to english.php and then wherever you want the line to display, add:

 

if ($cart->show_total() < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {

$add_to_get_free_shipping = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER - $cart->show_total();

echo '<p>' . sprintf(BOX_SHOPPING_CART_FREE_SHIPPING, $currencies->format($add_to_get_free_shipping));

}

 

It worked for someone in product_info.php. I don't see why it wouldn't work on any other page as well. Let me know if it doesn't.

Link to comment
Share on other sites

  • 3 weeks later...

This is a great hack. I have installed it. But when I check out, I want to see my free delivery thingy being on the check out sheet itself at checkout_confirmation.php ... currently, it still charges the customer a delivery fee ...

 

It gets more complicated. It is only free for one delivery option and I have 3 delivery options ...

 

Please help. Thanks!

 

:D

 

Please help. Thanks!

Link to comment
Share on other sites

Well, this doesn't really calculate any shipping costs. It simply reads what value you have in your DB as the "Free Shipping" dollar amount, compares it to what's in the shopping cart, and displays the difference.

 

It sounds like you're having trouble with the actual calculation of the free shipping, which is a completely seperate issue. I think if you do a search you'll probably be able to find an answer though. Sorry I couldn't be of more help.

Link to comment
Share on other sites

This is great mod.

 

thanks delaen!

 

1.

-----------------------------------------------------------------------------------------------

this is for who still using MS1 with Free Shipping w/ Minimum Amount

 

http://www.oscommerce.com/community/contributions,146/page,2

 

 

if ($cart->show_total() < MODULE_SHIPPING_FREECOUNT_AMOUNT) {

$add_to_get_free_shipping = MODULE_SHIPPING_FREECOUNT_AMOUNT - $cart->show_total();

$info_box_contents[] = array('align' => 'center',

'text' => sprintf(BOX_SHOPPING_CART_FREE_SHIPPING, $currencies->format($add_to_get_free_shipping)));

 

}

 

change MODULE_SHIPPING_FREECOUNT_AMOUNT to MODULE_SHIPPING_FREECOUNT_AMOUNT

 

this will works with MS1 with Free Shipping w/ Minimum Amount

----------------------------------------------------------------------------------------------

 

2.

----------------------------------------------------------------------------------------------

since this mod only works only when customer add some items to shopping cart, and this words [ 'Add %s to your order and receive FREE shipping! ] display.

How can i set shopping cart default setting like this?

even customers don't add some items to cart, it still display [ Add %s to your order and receive FREE shipping! ] , that will be good since sometimes customers don';t know your website has free shipping unless they click add to cart button.

 

i tried to change this $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;

 

to this $cart_contents_string .= BOX_SHOPPING_CART_FREE_SHIPPING; but no good.

 

anyone help me?

---------------------------------------------------------------------------------------------

 

3.

----------------------------------------------------------------------------------------------

I set orders over $ 59.99 to receive free shipping, but if orders over $ 59.99, the shopping cart doesn't display anything, so cutomers may not know if he or she already receive free shipping unless they checkout.

so is possible to display this [ Congratulations! You have earned Free Shipping on this order! ] if they order over free shipping amount,

 

is this good for customers?

 

what about using IF ELSE to get this work?

 

we need help!!!

 

---------------------------------------------------------------------------------------------

 

 

sean

thanks

Link to comment
Share on other sites

This is great mod.

 

thanks delaen!

 

1.

-----------------------------------------------------------------------------------------------

this is for who still using MS1 with Free Shipping w/ Minimum Amount

 

http://www.oscommerce.com/community/contributions,146/page,2

 

 

if ($cart->show_total() < MODULE_SHIPPING_FREECOUNT_AMOUNT) {

$add_to_get_free_shipping = MODULE_SHIPPING_FREECOUNT_AMOUNT - $cart->show_total();

$info_box_contents[] = array('align' => 'center',

'text' => sprintf(BOX_SHOPPING_CART_FREE_SHIPPING, $currencies->format($add_to_get_free_shipping)));

 

}

 

change MODULE_SHIPPING_FREECOUNT_AMOUNT to MODULE_SHIPPING_FREECOUNT_AMOUNT

 

this will works with MS1 with Free Shipping w/ Minimum Amount

----------------------------------------------------------------------------------------------

 

2.

----------------------------------------------------------------------------------------------

since this mod only works only when customer add some items to shopping cart, and this words [ 'Add %s to your order and receive FREE shipping! ] display.

How can i set shopping cart default setting like this?

even customers don't add some items to cart, it still display [ Add %s to your order and receive FREE shipping! ] , that will be good since sometimes customers don';t know your website has free shipping unless they click add to cart button.

 

i tried to change this $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;

 

to this $cart_contents_string .= BOX_SHOPPING_CART_FREE_SHIPPING; but no good.

 

anyone help me?

---------------------------------------------------------------------------------------------

 

3.

----------------------------------------------------------------------------------------------

I set orders over $ 59.99 to receive free shipping, but if orders over $ 59.99, the shopping cart doesn't display anything, so cutomers may not know if he or she already receive free shipping unless they checkout.

so is possible to display this [ Congratulations! You have earned Free Shipping on this order! ] if they order over free shipping amount,

 

is this good for customers?

 

what about using IF ELSE to get this work?

 

we need help!!!

 

---------------------------------------------------------------------------------------------

 

 

sean

thanks

All of those are really good ideas. I'm going to implement all of these changes early next week. If I do, I'll post the code.

 

 

And the login code is something I coded. I posted it in this thread: http://www.oscommerce.com/forums/index.php?sho...ic=31021&st=40#

Link to comment
Share on other sites

Hi all,

I just found this interesting thread - I should have found it earlier though! I recently wrote a MS 2 contribution, Shopping Cart Box Enhancement , which includes a "tell customer how much more to spend for free shipping" feature. It takes into account the fact that a shopkeeper can set "free shipping" to "national", "international" or "both", which is an important feature for many shops, as I found out. I just uploaded a new version.

Here's the thread about it, if you're interested:

http://www.oscommerce.com/forums/index.php?act=ST&f=7&t=58263

 

Cheers,

Nils

Link to comment
Share on other sites

Well, I like all these free shipping stuff and in fact it is super cool ...

 

But, I really need this free shipping stuff to work with my shipping costs thingy. Basically, I have 3 modes of delivery and if my customer were to shop > $25 worth of items, the default mode of delivery cost would change from $2.50 to that of $0.00. It would even be better if the amount 2.50 has a line across it to indicate that the delivery charge is cancelled ... Is this difficult to do?

 

Please help. Thanks!

 

~hoping that I made my problem clear for all~

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
×
  • Create New...