Skip to content

Commit

Permalink
#2708 - Changes from #2708 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
abrookbanks committed Jun 15, 2022
1 parent d93f0de commit 50e52c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion admin/sources/statistics.index.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
$GLOBALS['smarty']->assign('PAGINATION_BEST', $GLOBALS['db']->pagination($numrows, $per_page, $page, 5, 'page_customers', 'stats_best_customers', ' ', false));
unset($results, $result, $divider);
}

$smarty_data['plugin_tabs'] = array();
foreach ($GLOBALS['hooks']->load('admin.statistics.tabs') as $hook) {
include $hook;
}
Expand Down
10 changes: 5 additions & 5 deletions classes/cart.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ public function discountAdd($code)
}
}
}
if ($coupon['free_shipping_excluded']=='1' && floatval($this->basket['shipping']['value'])==0) {
if ($coupon['free_shipping_excluded']=='1' && (!isset($this->basket['shipping']) || floatval($this->basket['shipping']['value'])==0)) {
// Minimum subtotal for voucher has not been met
$GLOBALS['gui']->setError($GLOBALS['language']->checkout['error_voucher_free_shipping']);
return false;
Expand Down Expand Up @@ -896,7 +896,7 @@ public function get()
$this->basket_data[$hash] = $product;

// Calculate Taxes
$tax_state_id = is_numeric($this->basket[$tax_on]['state_id']) ? $this->basket[$tax_on]['state_id'] : getStateFormat($this->basket[$tax_on]['state_id'], 'name', 'id');
if (isset($this->basket[$tax_on])) $tax_state_id = is_numeric($this->basket[$tax_on]['state_id']) ? $this->basket[$tax_on]['state_id'] : getStateFormat($this->basket[$tax_on]['state_id'], 'name', 'id');

if (isset($tax_state_id)) {
$product_tax = $GLOBALS['tax']->productTax($product['price'], (int)$product['tax_type'], (bool)$product['tax_inclusive'], $tax_state_id);
Expand Down Expand Up @@ -1308,12 +1308,12 @@ private function _applyDiscounts()
}
}

if ($data['shipping'] && $this->basket['shipping']['value']>0) {
if (isset($this->basket['shipping']) && $data['shipping'] && $this->basket['shipping']['value']>0) {
$subtotal += $this->basket['shipping']['value'];
if ($this->basket['shipping']['tax']['amount']>0) {
$tax_total += $this->basket['shipping']['tax']['amount'];
}
} elseif ($this->basket['shipping']['value']>0) {
} elseif (isset($this->basket['shipping']) && $this->basket['shipping']['value']>0) {
$excluded_shipping = $this->basket['shipping'];
}

Expand Down Expand Up @@ -1353,7 +1353,7 @@ private function _applyDiscounts()
}
}

if ($this->basket['shipping']['value']>0) {
if (isset($this->basket['shipping']) && $this->basket['shipping']['value']>0) {
$subtotal += $this->basket['shipping']['value'];
if ($this->basket['shipping']['tax']['amount']>0) {
$tax_total += $this->basket['shipping']['tax']['amount'];
Expand Down
2 changes: 1 addition & 1 deletion includes/lib/smarty/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Smarty extends Smarty_Internal_TemplateBase
* The date format to be used internally
* (accepts date() and strftime())
*/
public static $_DATE_FORMAT = '%b %e, %Y';
public static $_DATE_FORMAT = 'M j, Y';

/**
* Flag denoting if PCRE should run in UTF-8 mode
Expand Down

0 comments on commit 50e52c8

Please sign in to comment.