Skip to content

Commit

Permalink
Fix for the translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavs committed Jan 5, 2024
1 parent 8c7f563 commit 30fa35e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 3 additions & 1 deletion nuvei_checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -1878,7 +1878,7 @@ public function assignOrderData()
'autoOpenPM' => (bool) Configuration::get('NUVEI_AUTO_EXPAND_PMS'),
'logLevel' => Configuration::get('NUVEI_SDK_LOG_LEVEL'),
'maskCvv' => true,
'i18n' => Configuration::get('NUVEI_SDK_TRANSL'),
'i18n' => json_decode(Configuration::get('NUVEI_SDK_TRANSL'), true),
'theme' => Configuration::get('NUVEI_SDK_THEME'),
'apmWindowType' => Configuration::get('NUVEI_APM_WINDOW_TYPE'),
'apmConfig' => [
Expand All @@ -1895,6 +1895,8 @@ public function assignOrderData()

$sdk_url = $this->getSdkLibUrl();

$this->createLog($checkout_params, 'SDK params.');

$this->context->smarty->assign('nuveiSdkUrl', $sdk_url);
$this->context->smarty->assign('showNuveoOnly', $this->is_rebilling_order);
$this->context->smarty->assign('nuveiSdkParams', json_encode($checkout_params));
Expand Down
13 changes: 3 additions & 10 deletions views/templates/admin/display_forma.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@
<label class="control-label col-lg-3"> {l s='SDK translations' mod='nuvei'}</label>
<div class="col-lg-9">
<textarea name="NUVEI_SDK_TRANSL" rows="5" class="form-control textarea-autosize"placeholder='{
"doNotHonor": "you dont have enough money",
"DECLINE": "declined"
}'></textarea>
"doNotHonor":"you dont have enough money",
"DECLINE":"declined"
}'>{Configuration::get('NUVEI_SDK_TRANSL')}</textarea>

<span class="help-block">{l s='This filed is the only way to translate Checkout SDK strings. Put the translations for all desired languages as shown in the placeholder. For examples' mod='nuvei'} <a href="https://docs.nuvei.com/documentation/accept-payment/simply-connect/ui-customization/#text-and-translation" target="_blank">{l s='check the Documentation.' mod='nuvei'}</a></span>
</div>
Expand Down Expand Up @@ -298,13 +298,6 @@
<option value="1" {if Configuration::get('NUVEI_SAVE_ORDER_AFTER_APM_PAYMENT') eq 1}selected{/if}>{l s='YES (Less secure, better user experience in case of cancel the Order.)' mod='nuvei'}</option>
</select>
</div>
</div>*}

{*<div class="form-group">
<label class="control-label col-lg-3 required">{l s='Apple Pay label' mod='nuvei'}</label>
<div class="col-lg-9">
<input type="text" name="NUVEI_APPLE_PAY_LABEL" value="{Configuration::get('NUVEI_APPLE_PAY_LABEL')}" required="" />
</div>
</div>*}
</div><!-- /.form-wrapper -->

Expand Down

0 comments on commit 30fa35e

Please sign in to comment.