View Single Post
  #38  
Old 04-13-2010, 09:36 AM
 
mrerotic mrerotic is offline
 

eXpert
  
Join Date: Feb 2009
Posts: 264
 

Default Re: Ability to select shipping carrier for tracking numbers

Here is an updated version I did to work with 4.2.x

This version does not add another database table field it uses the existing field and updates the order information accordingly.

Open /admin/order.php
Find:
Code:
require $xcart_dir."/include/history_order.php";

Below add:
Code:
# Get Shipping Options for order admin area to update manually (Addon) $adminship = func_query("SELECT * FROM $sql_tbl[shipping] WHERE active='Y' ORDER BY code, shipping DESC"); $smarty->assign("adminshipoptions", $adminship);

Find:
Code:
$query_data = array ( "tracking" => $tracking, "customer_notes" => $customer_notes, "notes" => $notes, "distr_order_update" => $distr_order_update );

Replace with:
Code:
# Get Updated Shipping Id For Admin Area $getshipid = func_query_first_cell("SELECT shippingid FROM $sql_tbl[shipping] WHERE shipping='".$shipcarrier."'"); $query_data = array ( "tracking" => $tracking, "shippingid" => intval($getshipid), "shipping" => $shipcarrier, "customer_notes" => $customer_notes, "notes" => $notes, "distr_order_update" => $distr_order_update );

Create New Template (order_shipping_vendor.tpl)
Save to /skin1/main/order_shipping_vendor.tpl
Code:
{* $Id: order_shipping_vendor.tpl,v 1.4 2004/05/28 12:21:03 max Exp $ *} <select name="{$name}"> <option value=""{if $shipping eq ""} selected="selected"{/if}>Select A Carrier</option> {foreach from=$adminshipoptions item=addship} <option value="{$addship.shipping}"{if $shipping eq $addship.shipping} selected="selected"{/if}>{$addship.shipping}</option> {/foreach} </select>

Open /skin1/main/order_history.tpl
Find:
Code:
{include file="main/order_status.tpl" status=$order.status mode="select" name="status"}

Add After:
Code:
<br /><br /> Shipping Carrier:<br /> {include file="main/order_shipping_vendor.tpl" shipping=$order.shipping|escape mode="select" name="shipcarrier"}

Now login to your admin area and view an order, under the Order Status you will see a new drop down option called "Shipping Carrier" the default selection is what the customer requested as a carrier. You can change this it will update the order to the new carrier.
__________________
x-cart 4.2.3
AlteredCart Smart Search
Auto Featured Products Mod (Personal Mod)
BCSE Product Importer Pro & Drop Shipper Pro
CDSEO Pro
CMS EZRecommends
EE slider login (Personal Mod)
Next Prev Link Mod (Customized)
ShadowBox Detailed Images (Personal Mod)
Shop By Price (Customized)
Social Media (Personal Mod)
Switch Layout View (Personal Mod)
Special Offers
Testimonials (Personal Mod)
Whats New (Customized)
Reply With Quote