Skip to content

Commit

Permalink
Merge branch 'master' of github.com:opencart/opencart
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesallsup committed Sep 27, 2015
2 parents 304bd28 + 8ee6fe7 commit e67c726
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 16 deletions.
4 changes: 1 addition & 3 deletions upload/admin/controller/openbay/amazon_product.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ public function parseTemplateAjax() {
if (empty($field['value'])) {
$template['fields'][$key]['thumb'] = '';
} else {
$img = str_replace(HTTPS_CATALOG . 'image/', '', $field['value']);
$template['fields'][$key]['value'] = $img;
$template['fields'][$key]['thumb'] = $this->model_tool_image->resize($img, 100, 100);
$template['fields'][$key]['thumb'] = $this->model_tool_image->resize(str_replace(HTTPS_CATALOG . 'image/', '', $field['value']), 100, 100);
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions upload/admin/controller/openbay/amazonus_product.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,7 @@ public function parseTemplateAjax() {
if (empty($field['value'])) {
$template['fields'][$key]['thumb'] = '';
} else {
$img = str_replace(HTTPS_CATALOG . 'image/', '', $field['value']);
$template['fields'][$key]['value'] = $img;
$template['fields'][$key]['thumb'] = $this->model_tool_image->resize($img, 100, 100);
$template['fields'][$key]['thumb'] = $this->model_tool_image->resize(str_replace(HTTPS_CATALOG . 'image/', '', $field['value']), 100, 100);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/controller/openbay/ebay.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ public function viewItemLinks() {
'text' => $this->language->get('heading_title'),
);

$data['return'] = $this->url->link('openbay/ebay', 'token=' . $this->session->data['token'], 'SSL');
$data['cancel'] = $this->url->link('openbay/ebay', 'token=' . $this->session->data['token'], 'SSL');
$data['edit_url'] = $this->url->link('openbay/ebay/edit', 'token=' . $this->session->data['token'] . '&product_id=', 'SSL');
$data['validation'] = $this->openbay->ebay->validate();
$data['token'] = $this->session->data['token'];
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/model/openbay/version.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
class ModelOpenbayVersion extends Model {
public function version() {
return (int)2918;
return (int)2936;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<label class="col-sm-2 control-label" for="carrier-id"><?php echo $entry_courier; ?></label>
<div class="col-sm-10">
<select name="carrier_id" id="carrier-id" class="form-control openbay-data">
<?php foreach($carriers as $carrier){ ?>
<option <?php if (isset($order_info['carrier_id']) && $order_info['carrier_id'] == $carrier['description']){ echo ' selected'; } ?>><?php echo $carrier['description']; ?></option>
<?php foreach($couriers as $carrier){ ?>
<option <?php if (isset($order_info['carrier_id']) && $order_info['carrier_id'] == $carrier){ echo ' selected'; } ?>><?php echo $carrier; ?></option>
<?php } ?>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<label class="col-sm-2 control-label" for="carrier-id"><?php echo $entry_courier; ?></label>
<div class="col-sm-10">
<select name="carrier_id" id="carrier-id" class="form-control openbay-data">
<?php foreach($carriers as $carrier){ ?>
<option <?php if (isset($order_info['carrier_id']) && $order_info['carrier_id'] == $carrier['description']){ echo ' selected'; } ?>><?php echo $carrier['description']; ?></option>
<?php foreach($couriers as $carrier){ ?>
<option <?php if (isset($order_info['carrier_id']) && $order_info['carrier_id'] == $carrier){ echo ' selected'; } ?>><?php echo $carrier; ?></option>
<?php } ?>
</select>
</div>
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/openbay/amazon_order.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function decreaseProductQuantity($product_id, $delta, $var = '') {
if ($var == '') {
$this->db->query("UPDATE `" . DB_PREFIX . "product` SET `quantity` = GREATEST(`quantity` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `subtract` = '1'");
} else {
$this->db->query("UPDATE `" . DB_PREFIX . "product_option_relation` SET `stock` = GREATEST(`stock` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `var` = '" . $this->db->escape($var) . "' AND `subtract` = '1'");
$this->db->query("UPDATE `" . DB_PREFIX . "product_option_variant` SET `stock` = GREATEST(`stock` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `sku` = '" . $this->db->escape($var) . "' AND `subtract` = '1'");
}
}

Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/openbay/amazonus_order.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function decreaseProductQuantity($product_id, $delta, $var = '') {
if ($var == '') {
$this->db->query("UPDATE `" . DB_PREFIX . "product` SET `quantity` = GREATEST(`quantity` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `subtract` = '1'");
} else {
$this->db->query("UPDATE `" . DB_PREFIX . "product_option_relation` SET `stock` = GREATEST(`stock` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `var` = '" . $this->db->escape($var) . "' AND `subtract` = '1'");
$this->db->query("UPDATE `" . DB_PREFIX . "product_option_variant` SET `stock` = GREATEST(`stock` - '" . (int)$delta . "', 0) WHERE `product_id` = '" . (int)$product_id . "' AND `sku` = '" . $this->db->escape($var) . "' AND `subtract` = '1'");
}
}

Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/openbay/amazon.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public function parseCategoryTemplate($xml) {
$fields[$index]['unordered_index'] = $index;
}

usort($fields, array('Amazon','compareFields'));
usort($fields, array('openbay\Amazon','compareFields'));

return array(
'category' => $category,
Expand Down
2 changes: 1 addition & 1 deletion upload/system/library/openbay/amazonus.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public function parseCategoryTemplate($xml) {
$fields[$index]['unordered_index'] = $index;
}

usort($fields, array('Amazonus','compareFields'));
usort($fields, array('openbay\Amazonus','compareFields'));

return array(
'category' => $category,
Expand Down

0 comments on commit e67c726

Please sign in to comment.