diff --git a/admin/themes/default/template/controllers/normal_products/seo.tpl b/admin/themes/default/template/controllers/normal_products/seo.tpl index bf43da2a7..0aba3bac9 100644 --- a/admin/themes/default/template/controllers/normal_products/seo.tpl +++ b/admin/themes/default/template/controllers/normal_products/seo.tpl @@ -91,7 +91,7 @@ - {include file="controllers/products/seo_preview.tpl" + {include file="seo_preview.tpl" languages = $languages preview_link = $rewritten_links|default:'' inputs = ['meta_title'=>$product->meta_title ,'meta_description' => $product->meta_description,'link_rewrite' => $product->link_rewrite, 'name' => $product->name, 'description_short' => $product->description_short] diff --git a/admin/themes/default/template/controllers/products/seo.tpl b/admin/themes/default/template/controllers/products/seo.tpl index a10059eaa..f876f66a1 100644 --- a/admin/themes/default/template/controllers/products/seo.tpl +++ b/admin/themes/default/template/controllers/products/seo.tpl @@ -94,7 +94,7 @@ - {include file="controllers/products/seo_preview.tpl" + {include file="seo_preview.tpl" languages = $languages preview_link = $rewritten_links|default:'' inputs = ['meta_title'=>$product->meta_title ,'meta_description' => $product->meta_description,'link_rewrite' => $product->link_rewrite, 'name' => $product->name, 'description_short' => $product->description_short] diff --git a/admin/themes/default/template/controllers/products/seo_preview.tpl b/admin/themes/default/template/controllers/products/seo_preview.tpl deleted file mode 100644 index 62af43bfd..000000000 --- a/admin/themes/default/template/controllers/products/seo_preview.tpl +++ /dev/null @@ -1,297 +0,0 @@ -{* -* 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} - diff --git a/admin/themes/default/template/seo_preview.tpl b/admin/themes/default/template/seo_preview.tpl new file mode 100644 index 000000000..c7bf7964a --- /dev/null +++ b/admin/themes/default/template/seo_preview.tpl @@ -0,0 +1,240 @@ +{* +* 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} + \ No newline at end of file diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl index e08300b79..0188f15a1 100644 --- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl @@ -401,7 +401,7 @@ {/foreach} - {include file="controllers/products/seo_preview.tpl" + {include file="seo_preview.tpl" languages = $languages preview_link = $rewrite_url|default:'' inputs = [