X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Showing shipping period within the cart. (https://forum.x-cart.com/showthread.php?t=5583)

inebriate 01-04-2007 09:11 PM

Re: Showing shipping period within the cart.
 
i just implemented this a few days ago since it doesnt display when using real time shipping...this mod will pull the shipping time that you define in the admin's shipping method section

in shipping/shipping.php
Code:

foreach($intershipper_rates as $intershipper_rate) {
$ship_time = "";
if (!empty($intershipper_rate["shipping_time"]))
$ship_time = $intershipper_rate["shipping_time"]." ".($intershipper_rate["shipping_time"]>"1" ? "days" : "day");
$result = func_query_first("SELECT *, '$intershipper_rate[rate]' AS rate, '$intershipper_rate[warning]' AS warning, '$ship_time' AS shipping_time FROM $sql_tbl[shipping] WHERE subcode='$intershipper_rate[methodid]' AND active='Y' $weight_condition ORDER BY orderby");
if ($result)
$shipping[] = $result;
}

and replace it with
Code:

foreach($intershipper_rates as $intershipper_rate) {
$ship_time = "";
if (!empty($intershipper_rate["shipping_time"])) {
$ship_time = $intershipper_rate["shipping_time"]." ".($intershipper_rate["shipping_time"]>"1" ? "days" : "day");
$result = func_query_first("SELECT *, '$intershipper_rate[rate]' AS rate, '$intershipper_rate[warning]' AS warning, '$ship_time' AS shipping_time FROM $sql_tbl[shipping] WHERE subcode='$intershipper_rate[methodid]' AND active='Y' $weight_condition ORDER BY orderby");
}
else {
$result = func_query_first("SELECT *, '$intershipper_rate[rate]' AS rate, '$intershipper_rate[warning]' AS warning, shipping_time FROM $sql_tbl[shipping] WHERE subcode='$intershipper_rate[methodid]' AND active='Y' $weight_condition ORDER BY orderby");
}

if ($result)
$shipping[] = $result;
}



then in skin1/customer/main/cart_totals.tpl, find
Code:

<SELECT name="shippingid" onchange="document.cartform.submit()">
{section name=ship_num loop=$shipping}
<OPTION value="{$shipping[ship_num].shippingid}" {if $shipping[ship_num].shippingid eq $cart.shippingid}selected{/if}>{$shipping[ship_num].shipping|trademark:$insert_trademark:"alt"}{if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$shipping[ship_num].rate}){/if}</OPTION>
{/section}
</SELECT>

and replace with
Code:

<SELECT name="shippingid" onchange="document.cartform.submit()">
{section name=ship_num loop=$shipping}
<OPTION value="{$shipping[ship_num].shippingid}" {if $shipping[ship_num].shippingid eq $cart.shippingid}selected{/if}>{$shipping[ship_num].shipping|trademark:$insert_trademark:"alt"}{if $shipping[ship_num].shipping_time ne ""} : {$shipping[ship_num].shipping_time}{/if} {if $config.Appearance.display_shipping_cost eq "Y" and ($login ne "" or $config.General.apply_default_country eq "Y" or $cart.shipping_cost gt 0)} ({include file="currency.tpl" value=$shipping[ship_num].rate}){/if}</OPTION>
{/section}
</SELECT>


david_ygao 01-08-2007 06:03 AM

Re: Showing shipping period within the cart.
 
I do not know how to fix this problem with UPS shipping module since I am not familair with the software language.

UPS technical support told me UPS has changed sth after New Year, and our shopping cart software needs updating.

Tahnks,

david
xcart 4.18 gold

neaisha 01-18-2007 09:59 AM

Re: Showing shipping period within the cart.
 
inebriate,

before i screw something up, i was wondering if this fix works for 4.1.x as well?

neaisha 01-18-2007 10:08 AM

Re: Showing shipping period within the cart.
 
and the survey says...yes :-)

thanks

millsryno 08-26-2007 03:52 PM

Re: Showing shipping period within the cart.
 
This works excellent, just what I was looking for. Thanks!


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

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