Short information: I did it by inserting this code:
Code: Select all
if (isset($this->session->data['guest'])) {
$data['needemail'] = $this->session->data['guest']['email']; // Guest user's email
} elseif($this->customer->isLogged()) {
$data['needemail'] = $this->customer->getEmail(); // Customer's email
}
$data['needorderid'] = $this->session->data['order_id'];
between:
Code: Select all
if (isset($this->session->data['order_id'])) {
and:
in /catalog/controller/checkout/success.php
Then I added:
Code: Select all
<!-- BEGIN - EasyReviews Addon | www.shopvote.de -->
<div id="srt-customer-data" style="display:none;">
<span id="srt-customer-email">{{ needemail }}</span>
<span id="srt-customer-reference">{{ needorderid }}</span>
</div>
<!-- END - EasyReviews Addon | www.shopvote.de -->
In /catalog/view/theme/*/template/common/success.twig
And now everything is working fine. If someone wants to create a modification for ShopVote, feel free to use this.
Thanks for all the help. I had to learn many things in understanding the structure of opencart (controller, model, view...).
Cheers,
Chris