X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Pre-Login Shipping Calculator (https://forum.x-cart.com/showthread.php?t=6927)

BCSE 05-24-2008 09:11 AM

Re: Pre-Login Shipping Calculator
 
Also note we have updated the module to work with FedexDirect. If you have an old copy feel free to "buy" a new free copy, or email us with your old order # and we'll generate a new download link.

Thanks,

Carrie

sewingkc 05-24-2008 10:59 PM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by BCSE
Also note we have updated the module to work with FedexDirect. If you have an old copy feel free to "buy" a new free copy, or email us with your old order # and we'll generate a new download link.

Thanks,

Carrie





I just wanted to say a Great Thank You to BCSE for updating their pre-login calculator so that it will work with FEDEX direct. Thank you, Thank you! So far it is working very well.

Thanks for putting in the time to get this out for us and for free. Wonderful! :P

ReadytoCover 07-24-2008 07:10 AM

Re: Pre-Login Shipping Calculator
 
For some reason my calculator is doing the following:

http://www.readytocover.com/ship.gif

I had BCSE install it and I just noticed it's doing this so I'll probably open a ticket but I wanted to check to see if it was something I could fix first.

Any thoughts

peggyr 08-01-2008 02:36 PM

Re: Pre-Login Shipping Calculator
 
Hi,

Has anyone gotten the Pre-Login Shipping Calculator mod

http://forum.x-cart.com/showthread.php?t=6927&highlight=shipping+calc

working on 4.1.10 Gold? I had it working on 4.0.17 and my upgraded 4.1.9 cart. I tried to get it working on the 4.1.10 cart manually applying the DIFF file as well as trying to put the mod onto the base 4.1.10 cart.php file. So far, I can't get a good version to migrate to 4.1.10 with.

I do not have fast lane checkout setup yet, so haven't applied the BCSE shipping mod.

Thanks

peggyr 08-02-2008 02:01 PM

Re: Pre-Login Shipping Calculator
 
Update to my last 'question' about this Mod to 4.1.10. I ended up, taking the mod off, upgraded successfully to 4.1.10, then reapplied the mod, and it works like a champ.

fropirate 08-13-2008 12:37 PM

Re: Pre-Login Shipping Calculator
 
I just tried applying this mod to my cart, and it is giving me the no available shipping methods problem. I tried following the instructions in post 276: http://forum.x-cart.com/showpost.php?p=215501&postcount=276

but that did not help. Does anyone have a solution for this?

I only use UPS real time rates.

ReadytoCover 08-13-2008 04:25 PM

Re: Pre-Login Shipping Calculator
 
I was having the same problem so I paid for the installation. I think I went back over and looked and noticed that the files were slightly different than the free one they gave out. Not going to get into any negative assumptions.

I'm still getting that duplicate showing posted above but at least it works. It could just be because of some other mod. Here are my files, double check with yours


shipping_estimator.tpl

Code:

{if not $login}
{if $estimate ne "NO"}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td align="right">
{$lng.txt_enter_zipcode}<br /><br />
<select name='country_estimate'>
{section name=country_idx loop=$countries}
<option value="{$countries[country_idx].country_code}"{if $config.General.default_country eq $countries[country_idx].country_code} selected="selected"{/if}>{$countries[country_idx].country|amp}</option>
{/section}
</select>
<input type="text" name='zip_estimate' size="8" maxlength="6" />
{include file="buttons/button.tpl" button_title=$lng.lbl_calculate_shipping href="javascript: document.cartform.submit()" js_to_href="Y"}
</td></tr>
</table>
{else}
<table cellpadding="1" cellspacing="0" align="right">
{section name=ship_num loop=$shipping}
<tr>
    <td width="5"{if $shipping[ship_num].shippingid eq $cart.shippingid} class="TableHead"{/if}>
<input type="radio" name="shippingid" value="{$shipping[ship_num].shippingid}"{if $shipping[ship_num].shippingid eq $cart.shippingid} checked="checked"{else} onclick="javascript: this.form.submit();"{/if} />
    </td>
<td{if $shipping[ship_num].shippingid eq $cart.shippingid} class="TableHead"{/if} align="left">
{$shipping[ship_num].shipping|trademark:$insert_trademark}
{if $shipping[ship_num].shipping_time ne ""} - {$shipping[ship_num].shipping_time}{/if}
{if $config.Appearance.display_shipping_cost eq "Y" && ($login ne "" || $config.General.apply_default_country eq "Y" || $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$shipping[ship_num].rate}){/if}
    </td>
</tr>
{if $shipping[ship_num].warning ne ''}
<tr>
    <td>&nbsp;</td>
    <td class="SmallText">{$shipping[ship_num].warning}</td>
</tr>
{/if}
{sectionelse}
<tr><td><font class="ErrorMessage">{$lng.lbl_no_shipping_for_location}</font></td></tr>
{/section}
</table>
<br style="clear:both;" />
<div style="align:right;text-align:right;width:100%;padding-top:10px;"><a href="cart.php?zip_estimate=clear">{$lng.txt_click_change_zip}</a></div>
{/if}{/if}
<hr size="1" noshade="noshade" width="100%"/>



shipping_estimator.php

Code:

<?php
if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); }

@include_once $xcart_dir."/include/countries.php";

x_session_register("zipcode_estimate");
x_session_register("default_country_estimate");

if($zip_estimate == "clear"){
      $zipcode_estimate = "";
      func_header_location("cart.php");
}
 
if(!empty($zip_estimate)){
    $zipcode_estimate = $zip_estimate;
    $default_country_estimate= $country_estimate;

    if($mode=="checkout")
        func_header_location("cart.php?mode=checkout");
    else     
        func_header_location("cart.php");
}

if($login != ''){
    $zipcode_estimate = '';
    $default_country_estimate = '';
}

if($zipcode_estimate != ""){
    $config["General"]["default_city"] = '';
    $config["General"]["default_state"] = '';
    $config["General"]["default_country"] = $default_country_estimate;
    $config["General"]["apply_default_country"] = "Y";
    $config["General"]["default_zipcode"] = $zipcode_estimate;
    $smarty->assign("estimate","NO");
}
?>


Try that out and report back

fropirate 08-15-2008 04:57 AM

Re: Pre-Login Shipping Calculator
 
Ok great it seems to be working now! But unfortunately I've noticed another problem. The subtotal on the cart page is not updated to reflect the selected shipping option.

ReadytoCover 08-17-2008 12:38 PM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by fropirate
Ok great it seems to be working now! But unfortunately I've noticed another problem. The subtotal on the cart page is not updated to reflect the selected shipping option.


Yes unfortunately this mod does not adjust that...that would require more coding so you'd want to get a programmer if you need that functionality I believe.

ReadytoCover 08-17-2008 12:39 PM

Re: Pre-Login Shipping Calculator
 
Does anyone know how to make this available to LOGGED in customers?

Many of my logged in customers shipped to different zip codes then their registered one so I would like to use the exact same set up for logged in and non-logged in customers.

chris.barber 08-17-2008 01:00 PM

Re: Pre-Login Shipping Calculator
 
When I installed this mod I had a problem with it showing shipping methods I didn't want it to show, I coded a way around it then about 4 months later when I bought the OPC (I think) the problem occurred again.

This is just a thought but on the General Settings, Shipping Options page, there is a flag called "Enable all shipping methods even if a customer is not logged in:" make sure this is unchecked, see if that helps.

ReadytoCover, I think this code in the shipping_estimator.php file controls whether it shows up or not.

if($login != ''){
$zipcode_estimate = '';
$default_country_estimate = '';

but others may know for definite, but you could try wrapping if($login != '') in {**}, like this {*if($login != '')*} and see what that does for customers who are and aren't logged in.

ReadytoCover 08-18-2008 06:52 AM

Re: Pre-Login Shipping Calculator
 
Thanks Chris, unfortunately didn't work.

So you are using Shipping Estimator w/OPC successfully...and aren't receiving duplicates? Would you be willing to post or PM me your mod_ups.php, shipping_estimator.tpl and shipping estimator.php files?

Do you have a link to your site?

chris.barber 08-18-2008 10:41 AM

Re: Pre-Login Shipping Calculator
 
Oh well worth a try.

Yes, I am using the shipping estimator and I have OPC, the site is http://www.4furryfeet.com, but this is a live site so you will be able to test it up to the point of checkout.

sg_web 09-09-2008 10:17 AM

Re: Pre-Login Shipping Calculator
 
i've just installed the bcse mod - running on 4.1.10 - and keep getting the shipping methods not found error. i've tried all the suggestions posted in the last 10 pages or so but no luck. this is a key requirement for our client so i really need to find a way to get this working. has anyone tried another solution to get the shipping methods to show?

sg_web 09-10-2008 09:18 AM

Re: Pre-Login Shipping Calculator
 
update ... i've dropped the bcse mod altogether and switched over to the mod in post 239. the store is based in the u.s. - still getting shipping methods not found error .... but, it works like a charm for canadian postal codes. no idea why that would be.

considering this mod mentioned in post 271 http://xcartmod.com/cart/home.php. anyone other than swamp-industries given it a try? don't want to sink any money into it without a bit more feedback.

Baxtersoup 09-10-2008 10:01 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by sg_web
update ... i've dropped the bcse mod altogether and switched over to the mod in post 239. the store is based in the u.s. - still getting shipping methods not found error .... but, it works like a charm for canadian postal codes. no idea why that would be.

considering this mod mentioned in post 271 http://xcartmod.com/cart/home.php. anyone other than swamp-industries given it a try? don't want to sink any money into it without a bit more feedback.


Hi Sandi,

Craig from xCartMod.com here. I'm glad you're interested in our shipping mod which is found here: http://www.xcartmod.com/cart/product/display-shipping-cost-at-the-product-details-page.html, you can see it in use on our demo site (www.xcartmod.com/demo) and if you have any questions let me know. We offer full support after the initial sale - so we'll be here if something didn't work as it should.

I can be found on Skype (baxtersoup) or MSN (baxtersoup[at]googlemail.com).

Regards,

Craig

sg_web 09-10-2008 11:11 AM

Re: Pre-Login Shipping Calculator
 
thanks craig - will try to connect with you via skype

ShopCart 09-14-2008 08:57 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by ReadytoCover
For some reason my calculator is doing the following:

http://www.readytocover.com/ship.gif

I had BCSE install it and I just noticed it's doing this so I'll probably open a ticket but I wanted to check to see if it was something I could fix first.

Any thoughts


Did anyone find a solution to the double listing problem? ](*,)

BCSE 09-16-2008 07:19 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by ShopCart
Did anyone find a solution to the double listing problem? ](*,)


I think this is a common install error OR due to having it installed and having One Page checkout installed if I remember right. It's meant for Fast Lane Checkout and I think the One page checkout makes a call to the shipping as well as ours causing it duplicate. We're considering revising it to make it compatible with both.

If you need help and you're using our free module, feel free to email us.

Thanks,
Carrie

starwest 09-17-2008 04:49 PM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by BCSE
I think this is a common install error OR due to having it installed and having One Page checkout installed if I remember right. It's meant for Fast Lane Checkout and I think the One page checkout makes a call to the shipping as well as ours causing it duplicate. We're considering revising it to make it compatible with both.

If you need help and you're using our free module, feel free to email us.

Thanks,
Carrie



I'm using Fast Lane Checkout and after upgrading to v4.1.10 (from v4.1.4) I too have duplicates of all of the UPS methods. I'll retrace all of the installation steps for the shipping calculator, but could it be that something has changed in v4.1.10?

bpuklich 09-20-2008 09:24 AM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by ShopCart
Did anyone find a solution to the double listing problem? ](*,)


I think I've found out why. The One Page Checkout module makes a call to the X-Cart function func_get_shiping_methods_list in the checkout_one_shipping.php file, and merges the results with the $shipping PHP variable. Unfortunately, $shipping already has values at this point (or gets them later - I haven't dug far enough to know yet). So, we get duplicate shipping methods.

You can temporarily test this by commenting out the offending line in the checkout_one_shipping.php file, however I'm sure that will break something else.

I'll probably add a hack to remove the duplicates from the $shipping array in the shipping_estimator.php file that BCSE supplied with their free mod, unless someone else has a better idea (and I'm sure there is, I just haven't dug far enough).

Mudjocky 11-14-2008 05:14 PM

Re: Pre-Login Shipping Calculator
 
I have installed this code and it works great...however: I'd like to get it to not show up if there is only one item in the cart that has 'free shipping' or 'pre set shipping' as it comes up 'no shipping method to your zipcode' and I'm scared the customers may think something is broken. If there is not a way to do this is there a way to put a note on that page describing 'item with free shipping or set shipping surcharges will not function in shipping calculator". ? thank you so much in advance

brianlandis 02-27-2009 02:25 PM

Re: Pre-Login Shipping Calculator
 
Is there any way to tie shipping markups into the shipping estimator? We're running real time shipping for UPS and USPS and we'd like the estimator to reflect an additional $5 for certain methods that are set up within "Shipping markups"

bcam 09-01-2010 07:46 AM

Re: Pre-Login Shipping Calculator
 
I know this is an old thread, but I'm wondering if I can enable both UPS and USPS calculations in this pre-login shipping cost calculator. Currently only UPS shows, while both show in the next checkout page.

starwest 09-01-2010 04:15 PM

Re: Pre-Login Shipping Calculator
 
Quote:

Originally Posted by bcam
I know this is an old thread, but I'm wondering if I can enable both UPS and USPS calculations in this pre-login shipping cost calculator. Currently only UPS shows, while both show in the next checkout page.



Yes, this is possible, and we have it setup on our site. Unfortunately, I'm not sure where the code changes need to be made. Perhaps someone else can chime in with that nugget. If not, any of the recommended developers could probably handle this for you in a few minutes.

jillsybte 11-29-2010 09:16 AM

Re: Pre-Login Shipping Calculator
 
3 Attachment(s)
I have been using the BCSE pre-login shipping calculator with Xcart 4.1.8 for over 3 years. As far as I know, it has always worked correctly. I have never noticed a miscalculation myself or had a customer complain that final shipping charges were higher than those initially estimated.

I did change the estimator to allow for shipping calculations for both logged in and not logged in customers. When logged in, the shipping charges are displayed based on the customer's profile info.

Recently, I made a change to include/func/func.cart.php to allow for a percent shipping discount. I added a parameter called disc_p to the shipping_rates table and added to the shipping calculation in func.cart.php to allow disc_p/100 * shipping cost to be subtracted from the shipping cost. This was several weeks ago and I didn't notice any problems with the shipping estimator at the time. However, last night, I noticed the estimator was giving lower-than-actual rates when the customer is not logged in. For instance, when an item of 3 lbs was in the cart, the initial rates returned were for 1 lb. Refreshing the cart.php page returned the correct rates, and the correct rates showed when logged in.

I have attached the original and modified xcart/skin1/customer/main/shipping_estimator.tpl in case anyone sees an error I have made that could be causing this problem. I have also attached include/shipping_estimator.php, which shows the small bit of code I commented out.

For the disc_p addition, I changed the calculations in func.cart.php to [lines 997-1004]:
Code:

if ($shipping && $total_ship_items > 0) {
  $shipping_cost =
  $shipping[0]["rate"] +
  ($total_weight_shipping * $shipping[0]["weight_rate"]) +
  ($total_ship_items * $shipping[0]["item_rate"]) +
  ($total_shipping * $shipping[0]["rate_p"] / 100);
      $shipping_cost -= ($shipping_cost * ($shipping[0]["disc_p"] / 100));
 }


AND [lines 1007-1018]:
Code:

# Get realtime shipping rates
 #
 $result = func_query_first ("SELECT * FROM $sql_tbl[shipping] WHERE shippingid='$shipping_id' AND code!=''");
 if ($config["Shipping"]["realtime_shipping"]=="Y" && $result && $total_ship_items>0) {
  $shipping_cost = func_real_shipping($shipping_id);
  $customer_zone = func_get_customer_zone_ship($customer_info, $provider,"R");
  $shipping_rt = func_query("SELECT * FROM $sql_tbl[shipping_rates] WHERE shippingid='$shipping_id' $provider_condition AND zoneid='$customer_zone' AND mintotal<='$total_shipping' AND maxtotal>='$total_shipping' AND minweight<='$total_weight_shipping' AND maxweight>='$total_weight_shipping' AND type='R' ORDER BY maxtotal, maxweight");
# Added percent shipping discount to formula
  if ($shipping_rt && $shipping_cost > 0)
  $shipping_cost += $shipping_rt[0]["rate"]+$total_weight_shipping*$shipping_rt[0]["weight_rate"]+$total_ship_items*$shipping_rt[0]["item_rate"]+$total_shipping*$shipping_rt[0]["rate_p"]/100;
  $shipping_cost -= ($shipping_cost*($shipping_rt[0]["disc_p"]/100));
 }


I also use real-time shipping (USPS only) and the BCSE shipping-per-product mod. The disc_p value is 0 for all subtotals below $50. Then it is 100 for USPS Media Mail (so MM orders of $50+ ship free anywhere), and 10 to 70 for other methods and destinations.

I have been staring at this too long and hop that a fresh look by someone may reveal an answer. One solution would seem to be to get the cart.php page to refresh on its own. Is there a good way to do that? Any other suggestions would be appreciated. I like online stores that allow me to preview shipping costs so I would like to continue offering this feature in my store.

I don't like to leave my site link here, but if anyone wants to try the shipping calculator in my store and report his/her results, PM me for the link.

Thanks,
Jill

PS
I did try emptying the shipping_cache table and that didn't help.


All times are GMT -8. The time now is 11:07 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.