Answer the question
In order to leave comments, you need to log in
Why does the copied value pass, but the entered one does not?
if you enter 1234 by hand in the input field, then the code will not work, the same with letters and with Russian and English.
but if you insert what was displayed before the input field (this code), then everything will go fine.
{if $voucherAllowed}
{if isset($errors_discount) && $errors_discount}
<ul class="alert alert-danger">
{foreach $errors_discount as $k=>$error}
<li>{$error|escape:'html':'UTF-8'}</li>
{/foreach}
</ul>
{/if}
<form action="{if $opc}{$link->getPageLink('order-opc', true)}{else}{$link->getPageLink('order', true)}{/if}" method="post" id="voucher">
<div id='vouch'>
<input type='text' placeholder="{l s='1234'}" id='voucher_number' value="1234">
<input onmouseover="$('#vouch').css('background', '#F49232');" onmouseout="$('#vouch').css('background', '#43B51F');" class="addVaucher" name="submitAddDiscount" type="submit" type="button" value="{l s='OK'}" >
</div>
<fieldset style='display:none'>
<input type="text" class="discount_name form-control" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
<input type="hidden" name="submitDiscount" />
</fieldset>
</form>
{if $displayVouchers}
// вывод того что копирую и все получается
<p id="title" class="title-offers">{l s='Take advantage of our exclusive offers:'}</p>
<div id="display_cart_vouchers">
{foreach $displayVouchers as $voucher}
{if $voucher.code != ''}<span class="voucher_name" data-code="{$voucher.code|escape:'html':'UTF-8'}">{$voucher.code|escape:'html':'UTF-8'}</span> - {/if}{$voucher.name}<br />
{/foreach}
</div>
{/if}
{/if}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question