Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bitweaver/commerce
Browse files Browse the repository at this point in the history
  • Loading branch information
spiderr committed Jul 31, 2018
2 parents 21f6b4c + 5f3a781 commit ac032fd
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 314 deletions.
580 changes: 284 additions & 296 deletions includes/application_top.php

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions includes/modules/order_total/ot_cod_fee.php
Expand Up @@ -58,12 +58,10 @@ function process() {
if ($cod_zones[$i] == $this->mOrder->delivery['country']['countries_iso_code_2']) {
$cod_cost = $cod_zones[$i + 1];
$cod_country = true;
//print('match' . $i . ': ' . $cod_cost);
break;
} elseif ($cod_zones[$i] == '00') {
$cod_cost = $cod_zones[$i + 1];
$cod_country = true;
//print('match' . $i . ': ' . $cod_cost);
break;
} else {
//print('no match');
Expand All @@ -86,13 +84,13 @@ function process() {
}

$this->mProcessingOutput = array( 'code' => $this->code,
'title' => $this->title . ':',
'title' => $this->title,
'text' => $currencies->format($cod_cost, true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => $cod_cost);
} else {
//Following code should be improved if we can't get the shipping modules disabled, who don't allow COD
// as well as countries who do not have cod
// $this->mProcessingOutput = array('title' => $this->title . ':',
// $this->mProcessingOutput = array('title' => $this->title,
// 'text' => 'No COD for this module.',
// 'value' => '');
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_coupon.php
Expand Up @@ -56,7 +56,7 @@ function process() {
$this->setOrderDeduction( $od_amount['total'], $this->coupon_code );
$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ': ' . $this->coupon_code . ' :',
'title' => $this->title . ': ' . $this->coupon_code,
'text' => '-' . $currencies->format($od_amount['total']),
'value' => $od_amount['total'] );
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_group_pricing.php
Expand Up @@ -50,7 +50,7 @@ function process() {
$this->mOrder->info['deduction'][$this->code] = $this->deduction;
$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ':',
'title' => $this->title,
'text' => '-' . $currencies->format($this->deduction, true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => $this->deduction);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_gv.php
Expand Up @@ -129,7 +129,7 @@ function process() {
$this->setOrderDeduction( $deduction );
$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ':',
'title' => $this->title,
'text' => '-' . $currencies->format($deduction),
'value' => -1 * $deduction);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_loworderfee.php
Expand Up @@ -84,7 +84,7 @@ function process() {

$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ':',
'title' => $this->title,
'text' => $currencies->format(zen_add_tax($low_order_fee, $tax), true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => zen_add_tax($low_order_fee, $tax));
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_shipping.php
Expand Up @@ -87,7 +87,7 @@ function process() {

$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->mOrder->info['shipping_method'] . ':',
'title' => $this->mOrder->info['shipping_method'],
'text' => $currencies->format($this->mOrder->info['shipping_cost'], true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => $this->mOrder->info['shipping_cost']);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_subtotal.php
Expand Up @@ -31,7 +31,7 @@ function process() {

$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ':',
'title' => $this->title,
'text' => $currencies->format($this->mOrder->subtotal, true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => $this->mOrder->subtotal);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_tax.php
Expand Up @@ -34,7 +34,7 @@ function process() {
if ($value > 0 or STORE_TAX_DISPLAY_STATUS == 1) {
$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $key . ':',
'title' => $key,
'text' => $currencies->format($value, true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value']),
'value' => $value);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/order_total/ot_total.php
Expand Up @@ -32,7 +32,7 @@ function process() {
$total = $currencies->roundValue( $this->mOrder->info['total'] - $this->mOrder->getDeductionTotal() );
$this->mProcessingOutput = array( 'code' => $this->code,
'sort_order' => $this->getSortOrder(),
'title' => $this->title . ':',
'title' => $this->title,
'text' => $currencies->format( $total, true, $this->mOrder->info['currency'], $this->mOrder->info['currency_value'] ),
'value' => (float)$total );
}
Expand Down
12 changes: 6 additions & 6 deletions templates/page_checkout_tracking_inc.tpl
Expand Up @@ -28,15 +28,15 @@ gtag('event', '{$eecEvent}', {ldelim}
{section loop=$newOrder->totals name=t}
{if $newOrder->totals[t].class=='ot_coupon'}
{assign var=couponName value=$newOrder->totals[t].title|regex_replace:"/.*: /":''|escape:quotes}
{assign var=couponString value=", 'coupon':'$couponName'"}
{assign var=couponString value="'coupon':'$couponName', "}
{elseif $newOrder->totals[t].class=='ot_gv' && !$couponString}
{assign var=couponString value=', "coupon":"Gift Certificate"'}
{assign var=couponString value='"coupon":"Gift Certificate", '}
{/if}
{/section}
{else}
{assign var=cartItemTrackingHash value=$gBitCustomer->mCart->getTrackingHash()}
{if $smarty.session.dc_redeem_code} {assign var=couponString value=', "coupon":"`$smarty.session.dc_redeem_code`"'}
{elseif $smarty.session.cot_gv} {assign var=couponString value=', "coupon":"Gift Certificate"'} {/if}
{if $smarty.request.dc_redeem_code} {assign var=couponString value="\"coupon\":\"`$smarty.request.dc_redeem_code`\", "}
{elseif $smarty.session.cot_gv} {assign var=couponString value='"coupon":"Gift Certificate", '} {/if}
{/if}
{if $eecEvent=='purchase'}
'transaction_id': '{$newOrder->mOrdersId}',
Expand All @@ -46,6 +46,7 @@ gtag('event', '{$eecEvent}', {ldelim}
'tax': '{$newOrder->getField('tax')}',
{if $gBitAffiliate}{assign var=affiliate value=$gBitAffiliate->getRegistration($gBitUser->mUserId)}{if $affiliate} 'affiliation': '{$affiliate.program_name|escape:'quotes'}', {/if}{/if}
{/if}
{$couponString}
{if $cartItemTrackingHash}
"items": [
{foreach from=$cartItemTrackingHash item=trackingHash}{ldelim}
Expand All @@ -58,11 +59,10 @@ gtag('event', '{$eecEvent}', {ldelim}
{rdelim},{/foreach}
]
{/if}
{$couponString}
{rdelim});
</script>
{/if}
{*$eecStep}{$eecEvent}{$smarty.request|vd}{$smarty.session|vd}{*$trackOrder|vd*}
{*$eecStep}{$eecEvent}{$smarty.request|vd}{$smarty.session|vd}{$newOrder->totals|vd}{$affiliate|vd*}
{/if}
{/if}
{/strip}
Expand Down

0 comments on commit ac032fd

Please sign in to comment.