Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F802710
in-commerce
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 24, 11:54 PM
Size
37 KB
Mime Type
text/x-diff
Expires
Wed, Feb 26, 11:54 PM (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
575594
Attached To
rMINC Modules.In-Commerce
in-commerce
View Options
Index: branches/5.2.x/units/shipping/shipping_tag_processor.php
===================================================================
--- branches/5.2.x/units/shipping/shipping_tag_processor.php (revision 16150)
+++ branches/5.2.x/units/shipping/shipping_tag_processor.php (revision 16151)
@@ -1,337 +1,338 @@
<?php
/**
* @version $Id$
* @package In-Commerce
* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license Commercial License
* This software is protected by copyright law and international treaties.
* Unauthorized reproduction or unlicensed usage of the code of this program,
* or any portion of it may result in severe civil and criminal penalties,
* and will be prosecuted to the maximum extent possible under the law
* See http://www.in-portal.org/commercial-license for copyright notices and details.
*/
defined('FULL_PATH') or die('restricted access!');
// include globals.php from current folder
kUtil::includeOnce(MODULES_PATH . '/in-commerce/units/pricing/globals.php');
class ShippingTagProcessor extends kDBTagProcessor {
function CostInputSize($params)
{
$object = $this->Application->recallObject( $this->getPrefixSpecial() );
$prec_before_sep = $object->GetDBField('PrecisionBeforeSep');
$prec_after_sep = $object->GetDBField('PrecisionAfterSep');
return $prec_before_sep + $prec_after_sep + 1 + ($prec_before_sep > 3 ? 1:0);
}
function ShowCostsTable($params)
{
$object = $this->Application->recallObject( $this->getPrefixSpecial() );
$zones_object = $this->Application->recallObject('z');
$brackets_object = $this->Application->recallObject('br');
$costs_object = $this->Application->recallObject('sc');
/* @var $costs_object kDBItem */
$main_processor = $this->Application->recallObject('m_TagProcessor');
$zones_sql = 'SELECT * FROM '.$zones_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Name ASC';
$brackets_sql = 'SELECT * FROM '.$brackets_object->TableName.' WHERE ShippingTypeID='.$this->Application->GetVar('s_id').' ORDER BY Start ASC';
$sql = 'SELECT * FROM '.$costs_object->TableName;
$costs_array = $this->Conn->Query($sql, 'ShippingCostId');
$zones = $this->Conn->Query($zones_sql, 'ZoneID');
$brackets = $this->Conn->Query($brackets_sql, 'BracketId');
$oddevenparam['odd'] = 'table-color1';
$oddevenparam['even'] = 'table-color2';
if(!$zones || !$brackets)
{
return '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td>'.$this->Application->Phrase('la_NoZonesOrBrackets').'</td></tr>';
}
uasort($brackets, 'bracket_comp');
if( $this->Application->GetLinkedVar('CostsTableAligment') )
{
$column_items = $brackets;
$column_object =& $brackets_object;
$column_params['header_caption'] = 'bracket_caption';
$column_params['IdField'] = 'BracketId';
$column_params['prefix'] = 'br';
$row_items = $zones;
$row_object =& $zones_object;
$row_params['header_caption'] = 'zone_caption';
$row_params['IdField'] = 'ZoneID';
$row_params['prefix'] = 'z';
}
else
{
$column_items = $zones;
$column_object =& $zones_object;
$column_params['header_caption'] = 'zone_caption';
$column_params['IdField'] = 'ZoneID';
$column_params['prefix'] = 'z';
$row_items = $brackets;
$row_object =& $brackets_object;
$row_params['header_caption'] = 'bracket_caption';
$row_params['IdField'] = 'BracketId';
$row_params['prefix'] = 'br';
}
$costs_table = '<tr class="'.$main_processor->Odd_Even($oddevenparam).'"><td> </td>';
foreach($column_items as $id => $record)
{
$column_object->Load($id);
$head_row_params = $column_params;
$head_row_params['name'] = 'column_header';
$costs_table .= $this->Application->ParseBlock($head_row_params);
}
$costs_table .= '</tr>';
$cost_ids = Array();
foreach($row_items as $id =>$record)
{
$costs_table .= '<tr class="'.$main_processor->Odd_Even($oddevenparam).'">';
$row_object->Load($id);
$head_row_params = $row_params;
$head_row_params['name'] = 'row_header';
$costs_table .= $this->Application->ParseBlock($head_row_params);
foreach($column_items as $col_id => $col_record)
{
$res = false;
foreach($costs_array as $cost_id => $cost_record)
{
if($cost_record[$row_params['IdField']] == $id && $cost_record[$column_params['IdField']] == $col_id)
{
$costs_object->SetDBFieldsFromHash($cost_record);
$res = true;
break;
}
}
if($res == false)
{
$costs_object->Clear();
$sql = 'SELECT MIN(ShippingCostId) FROM '.$costs_object->TableName;
$new_id = $cost_ids ? min( $this->Conn->GetOne($sql) - 1, min($cost_ids) - 1 ) : 0;
$costs_object->SetDBField( 'ShippingCostId', $new_id );
$cost_ids[] = $new_id;
}
$column_object->Load($col_id);
$costs_object->SetID($costs_object->GetDBField('ShippingCostId'));
$cost_cell_params['name'] = 'cost_cell';
$costs_table .= $this->Application->ParseBlock($cost_cell_params);
}
$costs_table .= '</tr>';
}
return $costs_table;
}
function HiddenSelection($params)
{
// $object = $this->getPrefixSpecial();
$zones = $this->Application->GetVar('z');
$brackets = $this->Application->GetVar('br');
$ret = '';
foreach($zones as $id => $record)
{
$ret .= '<input type="hidden" name="z['.$id.'][ZoneID]" value="'.$id.'">'."\n";
}
foreach ($brackets as $id => $record)
{
$ret .= '<input type="hidden" name="br['.$id.'][BracketId]" value="'.$id.'">'."\n";
}
return $ret;
}
function Order_PrintShippingTypes($params)
{
$weight = $this->Application->Parser->GetParam('weight_metric');
$items = $this->Application->Parser->GetParam('items');
$amount = $this->Application->Parser->GetParam('amount');
$selected_id = $this->Application->Parser->GetParam('selected_id');
$package_id = $this->Application->Parser->GetParam('package_num');
// free promo shipping params if applicable, if not then the same as standard
$promo_items = $this->Application->Parser->GetParam('promo_items');
$promo_amount = $this->Application->Parser->GetParam('promo_amount');
$promo_weight = $this->Application->Parser->GetParam('promo_weight_metric');
$user_country_id = $this->Application->Parser->GetParam('user_country_id');
$user_state_id = $this->Application->Parser->GetParam('user_state_id');
$user_zip = $this->Application->Parser->GetParam('user_zip');
$user_city = $this->Application->Parser->GetParam('user_city');
$user_addr1 = $this->Application->Parser->GetParam('user_addr1');
$user_addr2 = $this->Application->Parser->GetParam('user_addr2');
$user_name = $this->Application->Parser->GetParam('user_name');
$limit_types = $this->Application->Parser->GetParam('limit_types');
$this->Application->recallObject('ShippingQuoteEngine'); // TODO: why call this here?
$quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$shipping_quote_params = Array (
'dest_country' => $user_country_id,
'dest_state' => $user_state_id,
'dest_postal' => $user_zip,
'dest_city' => $user_city,
'dest_addr1' => $user_addr1,
'dest_addr2' => $user_addr2,
'dest_name' => $user_name,
'packages' => Array (
Array (
'package_key' => 'package1',
'weight' => $weight,
'weight_unit' => 'KG',
'length' => '',
'width' => '',
'height' => '',
'dim_unit' => 'IN',
'packaging' => 'BOX',
'contents' => 'OTR',
'insurance' => '0'
),
),
'amount' => $amount,
'items' => $items,
'limit_types' => $limit_types,
'promo_params' => Array (
'items' => $promo_items,
'amount' => $promo_amount,
'weight' => $promo_weight,
)
);
$shipping_types = $quote_engine_collector->GetShippingQuotes($shipping_quote_params);
$last_shippings = $this->Application->RecallVar('LastShippings');
if ( $last_shippings ) {
$last_shippings = unserialize($last_shippings);
}
$order_object = $this->Application->recallObject('ord');
/* @var $order_object OrdersItem */
$original_shipping = $order_object->GetDBField('ShippingInfo');
$original_shipping = unserialize($original_shipping);
$shipping_type_keys = array_keys($shipping_types);
if( getArrayValue($original_shipping, $package_id, 'ShippingId') &&
( $this->Application->isAdminUser || in_array( $original_shipping[$package_id]['ShippingId'], $shipping_type_keys ) ) )
{
$original_shipping = $original_shipping[$package_id];
$key = $original_shipping['ShippingId'];
$shipping_types[$key]['TotalCost'] = $this->Application->isAdminUser ? $original_shipping['TotalCost'] : $shipping_types[$key]['TotalCost'];
$shipping_types[$key]['ShippingName'] = $this->Application->isAdminUser ? 'Original: '.$original_shipping['ShippingName'] : $shipping_types[$key]['ShippingName'];
$shipping_types[$key]['ShippingId'] = $key;
$selected_id = $key;
}
$last_shippings[$package_id] = $shipping_types;
- if ( $this->Application->isAdminUser && $key ) {
+
+ if ( $this->Application->isAdminUser && isset($key) && $key ) {
$orig_name = ltrim($last_shippings[$package_id][$key]['ShippingName'], 'Original: ');
$last_shippings[$package_id][$key]['ShippingName'] = $orig_name;
}
$this->Application->StoreVar('LastShippings', serialize($last_shippings));
$o = '';
$def_block_params = Array();
$def_block_params['name'] = $this->SelectParam($params, 'render_as,block');
if ( !count($shipping_types) ) {
$this->Application->SetVar('ItemShipmentsExists', 0);
return '';
}
$lang = $this->Application->recallObject('lang.current');
/* @var $lang LanguagesItem */
foreach ($shipping_types as $shipping_type) {
if ( isset($shipping_type['InsuranceFee']) ) {
$shipping_type['TotalCost'] += $shipping_type['InsuranceFee'];
}
$shipping_type['ShippingFree'] = ($shipping_type['TotalCost'] == 0) ? 1 : 0;
$iso = $this->GetISO($params['currency']);
$amount = $this->ConvertCurrency($shipping_type['TotalCost'], $iso);
$amount = $lang->formatNumber($amount, 2);
$shipping_type['TotalCost'] = $this->AddCurrencySymbol($amount, $iso);
$block_params = array_merge($def_block_params, $shipping_type);
$block_params['selected'] = $shipping_type['ShippingId'] == $selected_id ? 'selected' : '';
if ( isset($params['selected_only']) && $block_params['selected'] == '' ) {
continue;
}
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
function AvailableTypes($params)
{
$quote_engine_collector = $this->Application->recallObject('ShippingQuoteCollector');
/* @var $quote_engine_collector ShippingQuoteCollector */
$types = $quote_engine_collector->GetAvailableShippingTypes();
$o;
foreach ($types as $a_type)
{
$block_params = $a_type;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
protected function ListGroups($params)
{
$object = $this->getObject($params);
/* @var $object kDBItem */
$o = '';
$selected = trim($object->GetDBField('PortalGroups'), ',');
$selected_arr = explode(',', $selected);
$sql = 'SELECT GroupId, Name
FROM ' . TABLE_PREFIX . 'UserGroups
ORDER BY Name';
$all_groups = $this->Conn->Query($sql, 'GroupId');
$mode = array_key_exists('mode', $params) ? $params['mode'] : false;
foreach ($all_groups as $a_group) {
$is_selected = in_array($a_group['GroupId'], $selected_arr);
$continue = $mode == 'selected' ? !$is_selected : $is_selected;
if ( $continue ) {
continue;
}
$block_params = $a_group;
$block_params['name'] = $params['render_as'];
$o .= $this->Application->ParseBlock($block_params);
}
return $o;
}
-}
\ No newline at end of file
+}
Index: branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl (revision 16150)
+++ branches/5.2.x/admin_templates/orders/orders_edit_billing.tpl (revision 16151)
@@ -1,220 +1,216 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_billing" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_shipping', '<inp2:m_phrase label="la_ToolTip_ResetToShipping" escape="1"/>', function() {
submit_event('ord','OnResetToShipping');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
function OpenGWResults(field) {
openSelector('ord', '<inp2:m_Link template="in-commerce/orders/gw_results" pass="m,ord"/>&field=' + field, '', '500x400');
}
</script>
<inp2:m_DefineElement name="inp_gwresults" is_last="" as_label="" currency="" is_last="">
<inp2:m_RenderElement design="form_row" pass_params="1">
<td class="control-cell">
<inp2:m_if check="m_Param" name="display_field"><inp2:m_Param name="display_field"/>: <inp2:Field name="$field" format="$display_field"/></inp2:m_if>
<a href="javascript:OpenGWResults('<inp2:m_param name="field"/>')"><inp2:m_Phrase label="la_Details"/></a>
</td>
</inp2:m_RenderElement>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_OrderBilling"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentType" title="la_fld_PaymentType" onchange="submit_event('ord','OnPreSave');"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="VATIncluded"/>
- <!--<inp2:m_RenderElement name="inp_gwresults" prefix="ord" display_field="score" field="VerificationResult" title="la_fld_VerificationResult" />-->
-
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard" size="20"/>
<inp2:m_RenderElement design="form_row" prefix="ord" field="PaymentCCExpDate" title="la_fld_PaymentCCExpDate">
<td class="control-cell">
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpMonth"/>" id="<inp2:ord_InputName field="PaymentCCExpMonth"/>" value="<inp2:ord_Field field="PaymentCCExpMonth"/>">
/
<input type="text" size="3" maxlength="2" name="<inp2:ord_InputName field="PaymentCCExpYear"/>" id="<inp2:ord_InputName field="PaymentCCExpYear"/>" value="<inp2:ord_Field field="PaymentCCExpYear"/>">
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2" size="5" maxlength="5"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires" size="16"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="ChargeOnNextApprove" title="la_fld_ChargeOnNextApprove"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount" size="20"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate" size="16"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingTo" title="la_fld_BillingTo" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCompany" title="la_fld_BillingCompany" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingPhone" title="la_fld_BillingPhone" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingFax" title="la_fld_BillingFax" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingEmail" title="la_fld_BillingEmail" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress1" title="la_fld_BillingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingAddress2" title="la_fld_BillingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCity" title="la_fld_BillingCity" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingState" title="la_fld_BillingState" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingZip" title="la_fld_BillingZip" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="BillingCountry" title="la_fld_BillingCountry" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentType" title="la_fld_PaymentType"/>
<inp2:m_RenderElement name="inp_edit_checkbox" prefix="ord" field="IsRecurringBilling" title="la_fld_IsRecurringBilling"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="NextCharge" title="la_fld_NextCharge"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VATIncluded"/>
- <inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="VerificationResult" display_field="score" title="la_fld_VerificationResult" />
-
<inp2:m_if check="ord_UsingCreditCard">
<inp2:m_RenderElement name="subsection" title="la_section_CreditCard"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCardType" title="la_fld_PaymentCardType"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_CreditCardNumber"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentNameOnCard" title="la_fld_PaymentNameOnCard"/>
<inp2:m_RenderElement design="form_row" prefix="ord" field="PaymentCCExpDate" title="la_fld_PaymentCCExpDate">
<td class="control-cell">
<inp2:ord_Field field="PaymentCCExpMonth"/> / <inp2:ord_Field field="PaymentCCExpYear"/>
</td>
</inp2:m_RenderElement>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentCVV2" title="la_fld_PaymentCVV2"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentExpires"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentAccount" title="la_fld_PaymentAccount"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="PaymentExpires" title="la_fld_PaymentDate"/>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult1" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult1" title="la_fld_AuthorizationResult" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GWResult2" db="db">
<inp2:m_RenderElement name="inp_gwresults" prefix="ord" field="GWResult2" title="la_fld_CaptureResult" />
</inp2:m_if>
</inp2:m_if>
<inp2:m_if check="ord_Field" name="CouponId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="CouponCode" title="la_fld_CouponCode" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="DiscountTotal" title="la_fld_TotalSavings" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ReturnTotal" title="la_fld_TotalReturns" />
<inp2:m_if check="ord_FieldEquals" name="VAT" value="0.00">
<inp2:m_else />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="AmountWithoutVAT" title="la_fld_SubTotal" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="VAT" title="la_fld_VAT" />
</inp2:m_if>
<inp2:m_if check="ord_Field" name="GiftCertificateId">
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateCode" title="la_fld_GiftCertificateNumber" />
<inp2:m_RenderElement name="inp_label" prefix="ord" field="GiftCertificateDiscount" title="la_fld_GiftCertificateAmountApplied" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="TotalAmount" title="la_fld_TotalAmount" />
<inp2:m_if check="ord_HasOriginalAmount" >
<inp2:m_RenderElement name="inp_label" prefix="ord" field="OriginalAmount" title="la_fld_OriginalAmount" />
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Billing">
<input type="hidden" name="check_billing_address" value="true" />
<inp2:m_if check="ord_UsingCreditCard">
<input type="hidden" name="check_credit_card" value="true" />
</inp2:m_if>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Index: branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl
===================================================================
--- branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (revision 16150)
+++ branches/5.2.x/admin_templates/orders/orders_edit_shipping.tpl (revision 16151)
@@ -1,246 +1,246 @@
<inp2:adm_SetPopupSize width="820" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="ord" section="in-commerce:orders" title_preset="orders_edit_shipping" tab_preset="Default"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<script type="text/javascript">
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('ord','<inp2:ord_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('ord','OnCancelEdit');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep1') );
a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('ord', '<inp2:ord_NextId/>');
}
) );
<inp2:m_if check="ord_OrderEditable">
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('reset_to_user', '<inp2:m_phrase label="la_ToolTip_ResetToUser" escape="1"/>', function() {
submit_event('ord','OnResetToUser');
}
) );
a_toolbar.AddButton( new ToolBarButton('in-commerce:reset_to_billing', '<inp2:m_phrase label="la_ToolTip_ResetToBilling" escape="1"/>', function() {
submit_event('ord','OnResetToBilling');
}
) );
</inp2:m_if>
a_toolbar.Render();
<inp2:m_if check="ord_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
a_toolbar.HideButton('sep2');
<inp2:m_else/>
<inp2:m_if check="ord_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="ord_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="ord" field="Status" db="db"/>
<inp2:ord_SaveWarning name="grid_save_warning"/>
<inp2:m_RenderElement design="form_message" id="sqe_error" style="display: none;" pass_params="1">
</inp2:m_RenderElement>
<inp2:ord_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_OrderShipping"/>
<inp2:m_if check="ord_OrderEditable">
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTo" title="la_fld_ShippingTo" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCompany" title="la_fld_ShippingCompany" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingPhone" title="la_fld_ShippingPhone" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingFax" title="la_fld_ShippingFax" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingEmail" title="la_fld_ShippingEmail" size="20"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress1" title="la_fld_ShippingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingAddress2" title="la_fld_ShippingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCity" title="la_fld_ShippingCity" size="20"/>
<script type="text/javascript">
function update_address()
{
submit_event('ord','OnQuietPreSave');
}
</script>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingState" title="la_fld_ShippingState" size="20" />
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingZip" title="la_fld_ShippingZip" size="10"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="ord" field="ShippingCountry" title="la_fld_ShippingCountry" size="20" />
<inp2:m_DefineElement name="order_option">
<input onclick="submit_event('ord','OnQuietPreSave');" class="simple" type="radio" <inp2:m_param name="checked"/> name="<inp2:InputName field="$field"/>" id="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>" value="<inp2:m_param name="key"/>"><label for="<inp2:InputName field="$field"/>_<inp2:m_param name="key"/>"><inp2:m_phrase label="$option"/></label> <br>
</inp2:m_DefineElement>
<!--## TODO looks like this field is NOT used in Admin - check on implementation of this field here
<inp2:m_RenderElement name="inp_edit_radio" prefix="ord" field="ShippingOption" title="la_fld_ShippingOption" size="20" />
##-->
<inp2:m_DefineElement name="order_shipping_type">
<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_shipment">
<tr class="<inp2:m_odd_even var="shipping_odd_even" odd="table-color1" even="table-color2"/>">
<td style="border-right: 1px solid black"><inp2:m_param name="shipment"/></td>
<td>
<select style="width:230px;" name="<inp2:m_param name="field_name"/>" id="<inp2:m_param name="field_name"/>">
<inp2:ord_PrintShippingTypes block="order_shipping_type" currency="selected"/>
</select>
</td>
</tr>
</inp2:m_DefineElement>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingOptions"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<inp2:ord_PredefinedOptions field="ShippingOption" block="order_option" selected="checked" />
</td>
</tr>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingType"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<table border="0" cellspacing="1" cellpadding="3" width="100%" style="border: 1px solid black; border-collapse: collapse">
<tr class="subsectiontitle" style="border-bottom: 1px solid black">
<td width="25%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_Shipment" /></b></td>
<td width="45%" style="border-right: 1px solid black"><b><inp2:m_Phrase label="lu_ship_ShippingType" /></b></td>
</tr>
<inp2:ord_PrintShippings block="order_shipment" currency="selected"/>
</table>
</td>
</tr>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCost" title="la_fld_ShippingCost" size="10"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="la_fld_InsuranceFee" size="10" currency="selected"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingCustomerAccount" title="la_fld_ShippingCustomerAccount" size="30"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="ord" field="ShippingTracking" title="la_fld_ShippingTracking" style="width: auto;" size="30"/>
<inp2:m_else/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingTo" title="la_fld_ShippingTo" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCompany" title="la_fld_ShippingCompany" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingPhone" title="la_fld_ShippingPhone" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingFax" title="la_fld_ShippingFax" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingEmail" title="la_fld_ShippingEmail" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress1" title="la_fld_ShippingAddress1" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingAddress2" title="la_fld_ShippingAddress2" size="40"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCity" title="la_fld_ShippingCity" size="20"/>
<script type="text/javascript">
function update_address()
{
submit_event('ord','OnQuietPreSave');
}
</script>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCountry" title="la_fld_ShippingCountry" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingState" title="la_fld_ShippingState" size="20"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingZip" title="la_fld_ShippingZip" size="10"/>
<inp2:m_DefineElement name="order_option_label">
<inp2:m_param name="key"/> <inp2:m_phrase label="$option"/>
</inp2:m_DefineElement>
<!--inp2:m_ParseBlock name="inp_edit_radio" prefix="ord" field="ShippingOption" title="la_fld_ShippingOption" size="20"/-->
<inp2:m_DefineElement name="order_shipping_type">
<option <inp2:m_param name="selected"/> value="<inp2:m_param name="ShippingId"/>"><inp2:m_param name="ShippingName"/> (<inp2:m_param name="TotalCost"/>)
</inp2:m_DefineElement>
<inp2:m_DefineElement name="order_shipment_label">
<inp2:m_param name="shipment"/> - <inp2:ord_PrintShippingTypes block="order_shipping_type" currency="selected" selected_only="1"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingOption" title="la_fld_ShippingOptions" size="10"/>
<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
<inp2:m_inc param="tab_index" by="1"/>
<td class="label-cell">
<inp2:m_Phrase label="la_fld_ShippingType"/>:
</td>
<td class="control-mid"> </td>
<td class="control-cell">
<inp2:ord_PrintShippings block="order_shipment_label" currency="selected"/>
</td>
</tr>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="la_fld_ShippingCost" size="10" format="$ %.2f"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCost" title="la_fld_ShippingCost" size="10" currency="selected"/>
- <inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="la_fld_InsuranceFee" size="10" format="$ %.2f"/>
+ <inp2:m_RenderElement name="inp_label" prefix="ord" field="InsuranceFee" title="la_fld_InsuranceFee" size="10" currency="selected"/>
<inp2:m_RenderElement name="inp_label" prefix="ord" field="ShippingCustomerAccount" title="la_fld_ShippingCustomerAccount" size="30"/>
<inp2:m_RenderElement design="form_row" prefix="ord" field="ShippingTracking" title="la_fld_ShippingTracking" size="30">
<td valign="top" class="control-cell">
- <input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field' format='$format'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>"/>
+ <input type="text" name="<inp2:{$prefix}_InputName field='$field'/>" id="<inp2:{$prefix}_InputName field='$field'/>" value="<inp2:{$prefix}_Field field='$field'/>" tabindex="<inp2:m_Get name='tab_index'/>" size="<inp2:m_param name='size'/>"/>
<inp2:m_if check="{$prefix}_USPSLabelFound" field="$field">
<a href="#" onClick="javascript:submit_event('<inp2:m_Param name="prefix"/>', 'OnDownloadLabel'); return false;"><inp2:m_Phrase label="la_ViewLabel"/></a>
</inp2:m_if>
</td>
</inp2:m_RenderElement>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="ord" field="ShippingDate" title="la_fld_ShippingDate"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<input type="hidden" name="to_tab" value="Shipping">
<input type="hidden" name="check_shipping_address" value="true" />
<inp2:m_if check="m_Recall" name="sqe_error">
<script type="text/javascript">
var $error_table = $('#sqe_error');
$('td:first', $error_table).html('<inp2:m_Recall name="sqe_error" js_escape="1"/>');
$error_table.show();
<inp2:m_RemoveVar name="sqe_error"/>
</script>
</inp2:m_if>
-<inp2:m_include t="incs/footer"/>
\ No newline at end of file
+<inp2:m_include t="incs/footer"/>
Event Timeline
Log In to Comment