Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Extend and Hook - Reviews Writing
Browse files Browse the repository at this point in the history
  • Loading branch information
gburton committed Sep 9, 2020
1 parent f65a335 commit d132682
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ext/modules/content/reviews/write.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
$insert_id = tep_db_insert_id();

tep_db_query("INSERT INTO reviews_description (reviews_id, languages_id, reviews_text) VALUES ('" . (int)$insert_id . "', '" . (int)$_SESSION['languages_id'] . "', '" . tep_db_input($review) . "')");

$OSCOM_Hooks->call('write', 'addNewAction');

$messageStack->add_session('product_action', sprintf(TEXT_REVIEW_RECEIVED, $nickname), 'success');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>

<?php
echo tep_draw_form('review', tep_href_link('ext/modules/content/reviews/write.php', 'action=process&products_id=' . (int)$_GET['products_id'], 'SSL'), 'post', '', true);
echo tep_draw_form('review', tep_href_link('ext/modules/content/reviews/write.php', 'action=process&products_id=' . (int)$_GET['products_id'], 'SSL'), 'post', 'enctype="multipart/form-data"', true);
?>

<div class="alert alert-warning" role="alert">
Expand Down Expand Up @@ -61,6 +61,10 @@
</div>
</div>
</div>

<?php
echo $OSCOM_Hooks->call('write', 'injectFormDisplay');
?>

<div class="buttonSet">
<div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_ADD_REVIEW, 'fas fa-pen', null, 'primary', null, 'btn-success btn-lg btn-block'); ?></div>
Expand Down

0 comments on commit d132682

Please sign in to comment.