Zen Cart Logo
Forums / Basic Configuration / $XX.XX remaining until free shipping, continued

$XX.XX remaining until free shipping, continued

Locked

Views: 5,485

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
9 Jan 2007, 3:11 PM
#1
arcanesanctuary avatar

arcanesanctuary

New Zenner

Join Date:
Nov 2006
Posts:
89
Plugin Contributions:
0

$XX.XX remaining until free shipping, continued


$free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

if ($free_ship_on == 'false') {
$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="alert">' . 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping!' . '</span>';
} else {
$content .= '<span class="alert">' . 'Your order qualifies for Free Shipping!' . '</span>';
}
} else {
$content .= '<span class="alert">' . 'Free Shipping for orders of ' . $currencies->format($free_limit) . ' or more.' . '</span>';
}
}

into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled.

I added this wonderful code that Glock started and Vaicekal improved but i'm having a hard time getting this to work. I installed it as it says and when the cart is empty, it will say what it should but as soon as someone adds something to the cart, this text goes away.

Maybe someone knows what I've done wrong. I have the shipoptions mod installed with what i use for the free shipping threshold, should I also have the other shipping mod installed. Maybe I need to increase the size of the sidebox perhaps. Thank you for any help you can give.

Robert
Arcane Sanctuary

10 Jan 2007, 2:08 AM
#2
arcanesanctuary avatar

arcanesanctuary

New Zenner

Join Date:
Nov 2006
Posts:
89
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

bump please :)

12 Jan 2007, 2:50 AM
#3
arcanesanctuary avatar

arcanesanctuary

New Zenner

Join Date:
Nov 2006
Posts:
89
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Bingo, got it.

Brilliant*

*As said by those cool dudes in the Guiness commercials.

12 Jan 2007, 2:43 PM
#4
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

How does this work. I downloaded the contribution from the downloads section. Is consists of a single file with no instructions or information on how to actually use it.
If anyone has this working and can offer a little insight, I would appreciate it.

Thanks,
Kelly

13 Jan 2007, 3:05 AM
#5
devlyn avatar

devlyn

New Zenner

Join Date:
Jan 2006
Location:
Texas
Posts:
64
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Hi!
I haven't gotten it to work exactly how I want it too, but you will need to change the file name to tpl_shopping_cart.php and upload it to includes/template/custom_template/sideboxes.
I've been trying to get it to show up something besides $50 as the limit. I have it set as $300 in the free shipping options shipping module but it just shows $50.

Does anyone know how to get this to change? See my test site at http://www.oddbodkin.com/shop

Thanks!

Devlyn

sleepless:

How does this work. I downloaded the contribution from the downloads section. Is consists of a single file with no instructions or information on how to actually use it.
If anyone has this working and can offer a little insight, I would appreciate it.

Thanks,
Kelly

13 Jan 2007, 3:57 AM
#6
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Thanks. I'll try it...hopefully I can get it to work.

Thanks again,
Kelly

13 Jan 2007, 4:54 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: $XX.XX remaining until free shipping, continued

devlyn ... your Free Shipping Option freeoptions appears to work on orders of $300 or more ...

Were you able to fix this?

13 Jan 2007, 7:36 AM
#8
devlyn avatar

devlyn

New Zenner

Join Date:
Jan 2006
Location:
Texas
Posts:
64
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

The freeshipping option works just fine by itself. It recognizes that free shipping should only be used for orders over $300.

The problem is getting the "add $?.00" more for free shipping to recognize that I want people to buy $300 worth of stuff, not $50.

Please excuse me if my language is wrong, but I think the problem lies here:

The code keeps calling for a "$free_limit" but when I did a search on that in the admin/developers toolkit, nothing showed up (except for the php file referenced above).

I'm guessing here, obviously, because I'm really an html gal, not php or sql or whatever ;)
The limit "label" that determines whether the shopping cart recognizes the free shipping or not might be useful. Maybe I could replace that label for the "$free_limit" thing label and get it working. Please let me know if I'm way off base.

If that is what I'm looking for, I have no idea where to find it.

btw, this is the mod we are talking about: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=394

Devlyn

13 Jan 2007, 8:51 AM
#9
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: $XX.XX remaining until free shipping, continued

devlyn:

The code keeps calling for a "$free_limit" but when I did a search on that in the admin/developers toolkit, nothing showed up (except for the php file referenced above).Not sure if I understand the problem, but the code says $free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER. And MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER is an ot_shipping setting, defined in admin/modules.php?set=ordertotal .

Free Shipping For Orders Over
Provide free shipping for orders over the set amount.

13 Jan 2007, 5:01 PM
#10
devlyn avatar

devlyn

New Zenner

Join Date:
Jan 2006
Location:
Texas
Posts:
64
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

OMG Paul that did it!!!! I don't know how many times I looked in all the modules looking for a switch. Thank you thank you!!!

Ok, it appears to be working now, and here is what I did:

  1. changed the file name from tmp_shopping_cart.php to tpl_shopping_cart.php and placed it in my includes/template/custom_template/sideboxes folder.

  2. In admin/modules/shipping I enabled the Free Shipping Options - freeshipper mod, set shipping cost to 0 and Total >= to the number I wanted to ship for free at. In my case, $250.

  3. In admin/modules/ordertotal I set my preferences in the Shipping - ot_shipping mod. Make sure that this also reflects free shipping at $250 (or whatever you set in the Free Shipping Options.)

It now appears to be working correctly. It informs the customer that they can qualify for free shipping if they spend $XX, lets them know how much they need to add to their order to get free shipping, and once they hit that amount, the freeshipper takes over and adds the option to checkout and this mod tells them that they qualify for freeshipping.

I hope this helps someone out. It's a cool mod and is available here:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_52&products_id=394

Devlyn

paulm:

Not sure if I understand the problem, but the code says $free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER. And MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER is an ot_shipping setting, defined in admin/modules.php?set=ordertotal .

13 Jan 2007, 5:07 PM
#11
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Do you need to alter the file at all? I tried renaming it and adding it to my template file. It gave me nothing but gibberish in the sidebox column. My bulb must be a bit dim today because I just don't get it. :huh:

Thanks,
Kelly

13 Jan 2007, 5:24 PM
#12
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

I downloaded the file again and all I get is a file with a rar extension.
This is what is in the file:

Rar! ϐs
ô7t h Ô Å
¡;¦ƒ53C includes\templates\template_default\sideboxes\tmp_shopping_cart.php ð
QÍW¼ð«Ñ&iøÉ¹5j˜hÉ‚D†îflV˜; Ö1·²Hf©îú²²íº¶Øp“$ΝèÖ”p·w\®W.®ªüj«•ù»¯Òùqrº©sÀé{YÆÌª»²…º+ª¨AVc¨I#+&á%
¿îÊx
Ió»ngë¹›ÔXXg3JóãpUõw¨Ñý'ñ|»®›N:|$è"ÅGAÀNK_+"¬.Ü€a0Û¡´k bY] ¤x‡yÆx(Péí'ý ØAÂyŒÉB,úã=ΣÇjñšË€>³Mýéô xö›L°§ì¾¸ÛÆnÙU~qÀÀ½¶÷¨äÖwª‹è<osÁ¿ëàõoü£X39þ¦ ~‡oÝ›Ç×<3N\¿d¨ÿ ôÄ…%èª;hhÂmƆÑGxé¨ ÍÞœ¦c¨eg¡^ú‡Á,XJ–Û.ž©BÌÅ™.¢Às+ˆSfê7nØ·kâÏsN¨nò”Cˆ†ÜÓPT{ïÂ+¬ªóÃI²ÉàKþ—–r-,«jÆw¸2Ó
eÂg´!sßiÑçBÃ
*ZtB+^›ç}Æ)º‚
Låi;ÿz}0šÄ)'%•<qQã¸ñâäéÔõ'¶\p“Œo£Ð/%¯¾m=pÏÅâyŠ·x µ“¤”Ûe5ôí‚Z3Vƒ1lñüëlžX
ÚÊvzVÑ
fùå0®*æ€OkËõû*òòصÆ:õn$>ìp£r Ê*wJI‹DÅÈ ðeWùMúŸp´<L«Ð¦íQ7”εÓÁ8Ÿÿ¶×³§ˆsGÙZ ‡òÊÆã_ý‰¿’{øÑ¾¿{)Ѝ‰(ù
]°µøÔ£G#.f†“]ùåG“•/|‘™_ƒRi$lm
„!ÛRôi˜q5»)U•¦¾¸U#f´)û‘76¤€³¿HÜ;;ÁîH?IwkSµbÿc˜åІ¨ªf,â²damñaÉo†õ”Gnàsìi[J*M,v^+ˆ£«Kz›e¸xžU²! /jÊäUÏ24Q_(|ý«¨ò\Ó¯M¿‘…Oíí/oég€«°ÓJ<^ÖO“+q˜gÏ ±Ñ9Û$=N/‡e9j,BªŠw›G‚I
ýY˜ï¨O„,±Iš³ñ»w°tÌüF44•´ñÓΙ}úÞ°¼ÀÏåÞ’¿þ؁çÞ1ˆ^ãî@díÉ?¾]뀳¦…Š›Òlò«+n0¡Ç±R9úóÊêæ –X½nÄO!ç6P¤øñEùH„ªÖ×·{”ÌŽþƒzêVù ¼Ü¾û?N3<þñŸ§«iÁüÞx„=iŽ]/ʳŸh¦ Õêz,®n£ûr+1ž5×**.à®×<6(˜è²›xb”9Ë!iE>åpß³À=jòü^|V,£j¯"'G_–×tj?r‡î²†žŠQ2+:O&Ö¼’@ªX䫯Œ ªlq$:èÜHF,ù9:”¢«Áîû¯_r
¾ÿØCgk&²ká$%[öïW÷D«J¶Œïƒ3ïLïØ\S="êQhýµ%ˆõ
tàR ƒ50- includes\templates\template_default\sideboxes ð üItàH w50# includes\templates\template_default °p³ˆ
ûtà7 l50 includes\templates ð0J"!Ëtà- W50 includes °`µjÄ={ @

13 Jan 2007, 5:29 PM
#13
devlyn avatar

devlyn

New Zenner

Join Date:
Jan 2006
Location:
Texas
Posts:
64
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Hi Kelly,
You need to extract that file into a folder on your computer. Then you'll be able to see the file structure within it.
The default file structure is: includes/templates/template_default/sideboxes/tmp_shopping_cart.php
You will want to change "template_default" to your overrides directory name and tmp_shopping_cart.php to tpl_shopping_cart.php
Then upload to your server.
The other directions will help you get it set up.

sleepless:

I downloaded the file again and all I get is a file with a rar extension.
This is what is in the file:

13 Jan 2007, 5:42 PM
#14
kadesign avatar

kadesign

Totally Zenned

Join Date:
Feb 2005
Location:
New Jersey
Posts:
593
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Hi,

Thanks for the reply. I had to add the code posted in another thread to the sidebox file. It is working just fine now.
I didn't even use the file I downloaded from the contributions section.

Thanks again,
Kelly

21 May 2007, 7:52 PM
#15
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: $XX.XX remaining until free shipping, continued

I took the liberty of adding an update to this modification and submitting it today with the hopes that it will help others.

What I did was...

  1. Changed the name of the frile from tmp_shopping_cart.php to tpl_shopping_cart.php
  2. Added a readme file with install instructions
  3. Changed the upload directory from template_default to "YOUR_CUSTOM_DIRECTORY"

Hope this helps people who may download this FANTASTIC modification in the future! :yes:

24 May 2007, 3:01 AM
#16
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: $XX.XX remaining until free shipping, continued

I'm getting the following issue with this addition:

When freeshipper is enabled, the shopping cart sidebox always says the order qualifies for free shipping even though the checkout procedure and thus freeshipper does not allow the product to be shipped free.

When only ot_shipping is enabled for free shipping, nothing displays in the sidebox even when the order is entitled to free shipping.

When both are enabled, nothing shows in the side box as well.

Please advise.

Edit: My shopping cart is based in Canada and I set the ot_shipping to national.

24 May 2007, 3:14 AM
#17
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: $XX.XX remaining until free shipping, continued

Did you try not enabling any free shipping options?

24 May 2007, 5:23 AM
#18
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: $XX.XX remaining until free shipping, continued

I solved the issue. I had to put ot_shipping free shipping to false. This seemed like it meant enabling free shipping in general and thus I set it to true. Perhaps it should say: enable ALWAYS free shipping - True/False

24 May 2007, 6:22 PM
#19
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: $XX.XX remaining until free shipping, continued

I recommend changing the span class from "alert" to something else like "important" so that it will line up better. Defining your own is probably the best.

25 May 2007, 7:00 PM
#20
zinfandel avatar

zinfandel

Zen Follower

Join Date:
Feb 2007
Location:
NNJ
Posts:
205
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping, continued

Good going **numinix! **

numinix:

I solved the issue. I had to put ot_shipping free shipping to false. This seemed like it meant enabling free shipping in general and thus I set it to true. Perhaps it should say: enable ALWAYS free shipping - True/False

I followed your lead and it started working.

What did you do the get the sidebox to appear on an empty cart?
My sidebox only appears when there is something is in the cart.