Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/opencart/opencart
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkerr committed Sep 2, 2015
2 parents 67a69c8 + ae345f2 commit 3a5e767
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions upload/catalog/controller/information/contact.php
Expand Up @@ -89,6 +89,7 @@ public function index() {
$data['store'] = $this->config->get('config_name');
$data['address'] = nl2br($this->config->get('config_address'));
$data['geocode'] = $this->config->get('config_geocode');
$data['geocode_hl'] = $this->config->get('config_language');
$data['telephone'] = $this->config->get('config_telephone');
$data['fax'] = $this->config->get('config_fax');
$data['open'] = nl2br($this->config->get('config_open'));
Expand Down
14 changes: 8 additions & 6 deletions upload/catalog/controller/payment/amazon_login_pay.php
Expand Up @@ -171,6 +171,10 @@ public function confirm() {
}
}

if (!isset($this->session->data['lpa']['shipping_method']) || !isset($this->session->data['lpa']['address'])) {
$this->response->redirect($this->url->link('payment/amazon_login_pay/address', '', 'SSL'));
}

$total_data = array();
$total = 0;
$taxes = $this->cart->getTaxes();
Expand All @@ -180,12 +184,6 @@ public function confirm() {

$sort_order = array();

if (isset($this->session->data['lpa']['shipping_method'])) {
$this->session->data['shipping_method'] = $this->session->data['lpa']['shipping_method'];
} else {
$this->response->redirect($this->url->link('payment/amazon_login_pay/address', '', 'SSL'));
}

$results = $this->model_extension_extension->getExtensions('total');

foreach ($results as $key => $value) {
Expand Down Expand Up @@ -788,6 +786,10 @@ public function setShipping() {
}

$this->session->data['lpa']['shipping_method'] = $this->session->data['lpa']['shipping_methods'][$shipping_method[0]]['quote'][$shipping_method[1]];
$this->session->data['shipping_method'] = $this->session->data['lpa']['shipping_method'];
$this->session->data['shipping_address'] = $this->session->data['lpa']['address'];
$this->session->data['shipping_country_id'] = $this->session->data['lpa']['address']['country_id'];
$this->session->data['shipping_zone_id'] = $this->session->data['lpa']['address']['zone_id'];

$json['redirect'] = $this->url->link('payment/amazon_login_pay/paymentMethod', '', 'SSL');
} else {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/model/payment/amazon_login_pay.php
Expand Up @@ -67,9 +67,9 @@ public function sendOrder($order_id, $total, $currency_code) {
$update_paramter_data['OrderReferenceAttributes.SellerOrderAttributes.SellerOrderId'] = $order_id;
$update_paramter_data['OrderReferenceAttributes.SellerOrderAttributes.StoreName'] = $this->config->get('config_name');
if ($this->config->get('amazon_login_pay_marketplace') == 'us') {
$update_paramter_data['OrderReferenceAttributes.OrderTotal.PlatformId'] = 'A3GK1RS09H3A7D';
$update_paramter_data['OrderReferenceAttributes.PlatformId'] = 'A3GK1RS09H3A7D';
} else {
$update_paramter_data['OrderReferenceAttributes.OrderTotal.PlatformId'] = 'A3EIRX2USI2KJV';
$update_paramter_data['OrderReferenceAttributes.PlatformId'] = 'A3EIRX2USI2KJV';
}

$address_paramter_data['AddressConsentToken'] = $this->session->data['access_token'];
Expand Down
Expand Up @@ -27,7 +27,7 @@
<?php echo $address; ?>
</address>
<?php if ($geocode) { ?>
<a href="https://maps.google.com/maps?q=<?php echo urlencode($geocode); ?>&hl=en&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> <?php echo $button_map; ?></a>
<a href="https://maps.google.com/maps?q=<?php echo urlencode($geocode); ?>&hl=<?php echo $geocode_hl; ?>&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> <?php echo $button_map; ?></a>
<?php } ?>
</div>
<div class="col-sm-3"><strong><?php echo $text_telephone; ?></strong><br>
Expand Down Expand Up @@ -71,7 +71,7 @@
<?php echo $location['address']; ?>
</address>
<?php if ($location['geocode']) { ?>
<a href="https://maps.google.com/maps?q=<?php echo urlencode($location['geocode']); ?>&hl=en&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> <?php echo $button_map; ?></a>
<a href="https://maps.google.com/maps?q=<?php echo urlencode($location['geocode']); ?>&hl=<?php echo $geocode_hl; ?>&t=m&z=15" target="_blank" class="btn btn-info"><i class="fa fa-map-marker"></i> <?php echo $button_map; ?></a>
<?php } ?>
</div>
<div class="col-sm-3"> <strong><?php echo $text_telephone; ?></strong><br>
Expand Down
Expand Up @@ -12,7 +12,7 @@
<?php } ?>
<div style="display: inline-block; width: 400px; height: 185px;" id="readOnlyAddressBookWidgetDiv"></div>
<br>
<?php if($amazon_login_pay_test){ ?>
<?php if(isset($amazon_login_pay_test)){ ?>
<label>Debug Error Code :</label>
<div id="errorCode_wallet"></div>
<br>
Expand Down
@@ -1,4 +1,4 @@
<form target="_blank" action="<?php echo $action; ?>" method="post">
<form action="<?php echo $action; ?>" method="post">
<div class="buttons">
<div class="pull-right">
<input type="submit" value="<?php echo $button_confirm; ?>" class="btn btn-primary" />
Expand Down

0 comments on commit 3a5e767

Please sign in to comment.