Skip to content

Commit

Permalink
Merge pull request #2 from kabisa/syntax-error-Readme
Browse files Browse the repository at this point in the history
Syntax error readme
  • Loading branch information
timoj authored Feb 28, 2018
2 parents 62f523a + f33512e commit 4ca26a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Wuunder opencart plugin
# Wuunder opencart plugin

Troubles caused by use of other ports than HTTP can be fixed but are not part of the standard implementation.
4 changes: 3 additions & 1 deletion catalog/controller/module/wuunder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ public function webhook()
$order_id = $_REQUEST['order'];
$booking_token = $_REQUEST['token'];
$data = json_decode(file_get_contents('php://input'), true);
if ($data['action'] === "shipment_booked") {
$this->db->query("UPDATE `wuunder_shipment` SET label_id = '" . $this->db->escape($data['shipment']['id']) . "', label_url = '" . $this->db->escape($data['shipment']['label_url']) . "', label_tt_url = '" . $this->db->escape($data['shipment']['track_and_trace_url']) . "' WHERE order_id = " . $order_id . " AND booking_token = '" . $booking_token . "'");
$this->load->model("checkout/order");
$this->model_checkout_order->addOrderHistory($order_id, 3);
}
}
}
}
}
4 changes: 2 additions & 2 deletions vqmod/xml/orders_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<add><![CDATA[
<ul class="wuunder-icons">
<?php if (is_null($order['label_id'])) {
if (is_null($order['booking_url']) || empty($order['booking_url)) { ?>
if (is_null($order['booking_url']) || empty($order['booking_url'])) { ?>
<a href="<?php echo $order['generate_booking_url']; ?>" title="<?php echo $create_label; ?>"><img class="wuunder-icon" src="/admin/view/image/wuunder/create-label.png"/></a>
<?php } else { ?>
<a href="<?php echo $order['booking_url']; ?>" title="<?php echo $create_label; ?>"><img class="wuunder-icon" src="/admin/view/image/wuunder/create-label.png" /></a>
Expand All @@ -30,4 +30,4 @@
]]></add>
</operation>
</file>
</modification>
</modification>

0 comments on commit 4ca26a3

Please sign in to comment.