I got it to work with a bit of a workaround.
Personally, I think it's a pretty bad hack job, but it does work. There must be a better way.
But, technically, this a working mod!!! Maybe one of you admins could move this post.
More feedback still appreciated.
Here is the working code:
1) Added a new INT() field to the xcart_products table called "ship_time".
2)Modify includes/product_modify.php
Where:
Code:
#
# Update product data
#
$query_data = array(
"product" => $product,
"keywords" => $keywords,
"descr" => $descr,
"fulldescr" => $fulldescr,
"list_price" => $list_price,
"productcode" => $productcode,
"forsale" => $forsale,
"distribution" => $distribution,
"free_shipping" => $free_shipping,
"shipping_freight" => $shipping_freight,
"discount_avail" => $discount_avail,
"min_amount" => $min_amount,
"return_time" => $return_time,
"low_avail_limit" => $low_avail_limit,
"free_tax" => $free_tax,
After add:
Code:
"ship_time" => $ship_time,
3) Modify skin1/admin/product_details.tpl
Where:
Code:
<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[shipping_freight]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">{$lng.lbl_shipping_freight} ({$config.General.currency_symbol})</td>
<td class="ProductDetails">
<input type="text" name="shipping_freight" size="18" value="{$product.shipping_freight|formatprice|default:$zero}" />
</td>
</tr>
After add:
Code:
<tr>
{if $geid ne ''}<td width="15" class="TableSubHead"><input type="checkbox" value="Y" name="fields[ship_time]" /></td>{/if}
<td class="FormButton" nowrap="nowrap">Ship time:</td>
<td class="ProductDetails">
<input type="text" name="ship_time" size="18" value="{if $product.productid eq ""}{$product.ship_time|default:1000}{else}{$product.ship_time}{/if}" />
</td>
</tr>
4)Modified skin1/customer/main/minicart.tpl
Where:
Code:
{if $minicart_total_items > 0}
After add:
Code:
{assign var=ship value=0}
{section name=product loop=$minicart_products}
{if $minicart_products[product].ship_time gt $ship}
{assign var=ship value=$minicart_products[product].ship_time}
{/if}
{/section}
<tr>
<td class="VertMenuItems"><b>Estimated Ship: </b></td>
<td class="VertMenuItems">{$ship} Days(s)</td>
</tr>
5) Modify minicart.php
Where:
Code:
$MINICART["total_items"] = ((!empty($cart["products"]) and is_array($cart["products"]))?count($cart["products"]):0) + ((!empty($cart["giftcerts"]) and is_array($cart["giftcerts"]))?count($cart["giftcerts"]):0);
}
After add:
Code:
require_once ('include/func/func.cart.php');
$minicart_products = func_products_from_scratch($cart["products"], $membershipid, false);
$smarty->assign("minicart_contents", $cart["minicart_products"]);
More feedback would be appreciated.
Thanks,
Scott