Skip to content

Commit

Permalink
Update order sending
Browse files Browse the repository at this point in the history
  • Loading branch information
datqn7244 committed Apr 17, 2024
1 parent 04feccd commit 50494c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Client/RateCompassClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function getReviews(string $compass_id, string $product_id): array
try {
$response = $this->doRequest('GET', $uri, $options);
} catch (Exception $e) {
$this->logger->error('Error getting Service Point', ['exception' => $e]);
$this->logger->error('Error getting reviews', ['exception' => $e]);

return [
'error' => $e->getMessage(),
Expand Down
10 changes: 5 additions & 5 deletions vg_ratecompass.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ protected function postProcess(): bool
*/
public function hookHeader()
{
// $host = Configuration::get('VG_RATECOMPASS_HOST');
$host = 'http://localhost:8000';
$host = Configuration::get('VG_RATECOMPASS_HOST');
$apikey = Configuration::get('VG_RATECOMPASS_APIKEY');
if (empty($host) || empty($apikey)) {
return;
Expand All @@ -239,7 +238,7 @@ public function hookHeader()
}
Tools::getValue('id_product');
$compass_id = Configuration::get('VG_RATECOMPASS_ID');
$this->context->controller->registerJavascript('ratecompass', $this->_path . '/views/js/embed.js');
$this->context->controller->registerJavascript('ratecompass_embed', $this->_path . '/views/js/embed.js');

Media::addJsDef([
'VG_RATECOMPASS_EMBED_URL' => "$host/api/v1/compasses/$compass_id/script.js",
Expand Down Expand Up @@ -269,10 +268,11 @@ public function hookActionValidateOrder(array $params)
'product_name' => $product->name[(int)$this->context->language->id],
'product_id' => $product->id,
'product_image_url' => $product_image_url,
'product_url' => $product_url
'product_url' => $product_url,
'product_number' => $product->reference
];
}
$this->logger->info('some stuff', [
$this->logger->info('Send new order', [
'customer_first_name' => $customer->firstname,
'customer_last_name' => $customer->lastname,
'customer_email' => $customer->email,
Expand Down

0 comments on commit 50494c2

Please sign in to comment.