{* * NOTICE OF LICENSE * * This source file is subject to the Open Software License version 3.0 * that is bundled with this package in the file LICENSE.md * It is also available through the world-wide-web at this URL: * https://opensource.org/license/osl-3-0-php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to support@qloapps.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade this module to a newer * versions in the future. If you wish to customize this module for your needs * please refer to https://store.webkul.com/customisation-guidelines for more information. * * @author Webkul IN * @copyright Since 2010 Webkul * @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0 *} {if $languages}
{foreach from=$languages item=language} {assign var=id_lang value=$language.id_lang}
{assign var=seoPreviewTitleDefault value=''} {assign var=seoPreviewDescriptionDefault value=''} {if isset($inputs.name[$id_lang]) && $inputs.name[$id_lang]|trim} {assign var=seoPreviewTitleDefault value=$inputs.name[$id_lang]} {elseif isset($product) && isset($product->name[$id_lang]) && $product->name[$id_lang]|trim} {assign var=seoPreviewTitleDefault value=$product->name[$id_lang]} {elseif isset($inputs.link_rewrite[$id_lang]) && $inputs.link_rewrite[$id_lang]|trim} {assign var=seoPreviewTitleDefault value=$inputs.link_rewrite[$id_lang]} {/if} {if isset($inputs.description_short[$id_lang]) && $inputs.description_short[$id_lang]|trim} {assign var=seoPreviewDescriptionDefault value=$inputs.description_short[$id_lang]|strip_tags} {elseif isset($product) && isset($product->description_short[$id_lang]) && $product->description_short[$id_lang]|trim} {assign var=seoPreviewDescriptionDefault value=$product->description_short[$id_lang]|strip_tags} {/if} {$seoPreviewTitleDefault|escape:'html':'UTF-8'} {$seoPreviewDescriptionDefault|escape:'html':'UTF-8'} {if isset($inputs.meta_title[$id_lang])}
{assign var=seoPreviewTitle value=$inputs.meta_title[$id_lang]|default:''} {if $seoPreviewTitle|trim} {$seoPreviewTitle|escape:'html':'UTF-8'} {else} {$seoPreviewTitleDefault|escape:'html':'UTF-8'} {/if}
{/if} {if isset($inputs.meta_description[$id_lang])}
{assign var=seoPreviewDescription value=$inputs.meta_description[$id_lang]|default:''} {if $seoPreviewDescription|trim} {$seoPreviewDescription|escape:'html':'UTF-8'} {else} {$seoPreviewDescriptionDefault|escape:'html':'UTF-8'} {/if}
{/if}
{/foreach}
{l s='Leaving Meta title or Meta description blank will use the default values in the preview (Name and Short Description).'}
{addJsDef languages=$languages} {/if}