881

Answer

Solution:

You need to edit these two files, Open controller file:

catalog\controller\account\voucher.php

Find:

$data['voucher_themes'] = $this->model_extension_total_voucher_theme->getVoucherThemes();

Replace with:

    $data['voucher_themes'] = array();
    $results = $this->model_extension_total_voucher_theme->getVoucherThemes();

    $this->load->model('tool/image');
    foreach($results as $result){
        if($result['image']){
            $image = $this->model_tool_image->resize($result['image'], 50, 50);
            // Or use your custom size instead of 50
        } else {
            $image = false;
        }
        $data['voucher_themes'][] = array(
            'voucher_theme_id' => $result['voucher_theme_id'],
            'name' => $result['name'],
            'image' => $image
        );
    }

Then open view file:

catalog\view\theme\{YOUR_THEME}\template\account\voucher.twig

Find:

<input type="radio" name="voucher_theme_id" value="{{ voucher_theme.voucher_theme_id }}" checked="checked" />

and

<input type="radio" name="voucher_theme_id" value="{{ voucher_theme.voucher_theme_id }}" />

Add after them:

{% if voucher_theme.image %}
    <img src="{{ voucher_theme.image }}" alt="{{ voucher_theme.name }}" class="img-thumbnail" />
{% endif %}

Save files and clear your caches (ocmod, vqmod, twig caches).

People are also looking for solutions to the problem: mysql - php quiz having questions and answers in two different resultset

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.