Added more checks to avoid notices in debug mode

This commit is contained in:
max-baranikov 2021-08-03 17:30:27 +03:00 committed by GitHub
parent c7d6c6cf32
commit e2616f81b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,11 +144,12 @@
</div> </div>
</div> </div>
<div id="rcrm_tab_catalog"> <div id="rcrm_tab_catalog">
{assign var="showUpdateButton" value=false}
<div class="retail-form__title"> <div class="retail-form__title">
{$catalogTitleName|escape:'htmlall':'UTF-8'} {$catalogTitleName|escape:'htmlall':'UTF-8'}
{if $catalogInfoMultistore|count == 1} {if $catalogInfoMultistore|count == 1}
{assign var='catalogInfo' value=$catalogInfoMultistore[$catalogInfoMultistore|@key] } {assign var='catalogInfo' value=$catalogInfoMultistore[$catalogInfoMultistore|@key] }
<a href="{$url|cat:'/admin/sites/'|escape:'htmlall':'UTF-8'}{if $catalogInfo.siteId}{$catalogInfo.siteId|cat:'/edit#t-catalog'|escape:'htmlall':'UTF-8'}{/if}" <a href="{$url|cat:'/admin/sites/'|escape:'htmlall':'UTF-8'}{if isset($catalogInfo.siteId) and $catalogInfo.siteId}{$catalogInfo.siteId|cat:'/edit#t-catalog'|escape:'htmlall':'UTF-8'}{/if}"
target="_blank" target="_blank"
class="retail-form__title_link">{l s='Manage site settings' mod='retailcrm'}</a> class="retail-form__title_link">{l s='Manage site settings' mod='retailcrm'}</a>
{/if} {/if}
@ -157,12 +158,12 @@
<div class="retail-form__title" style="margin-top: 50px;"> <div class="retail-form__title" style="margin-top: 50px;">
{if $catalogInfoMultistore|count > 1} {if $catalogInfoMultistore|count > 1}
<a href="{$url_post|escape:'htmlall':'UTF-8'}&amp;configure=retailcrm&rcrmtab=rcrm_tab_catalog&setShopContext=s-{$catalogShopId|escape:'htmlall':'UTF-8'}">{$shopsInfo[$catalogShopId].name|escape:'htmlall':'UTF-8'}</a> <a href="{$url_post|escape:'htmlall':'UTF-8'}&amp;configure=retailcrm&rcrmtab=rcrm_tab_catalog&setShopContext=s-{$catalogShopId|escape:'htmlall':'UTF-8'}">{$shopsInfo[$catalogShopId].name|escape:'htmlall':'UTF-8'}</a>
<a href="{$url|cat:'/admin/sites/'|escape:'htmlall':'UTF-8'}{if $catalogInfo.siteId}{$catalogInfo.siteId|cat:'/edit#t-catalog'|escape:'htmlall':'UTF-8'}{/if}" <a href="{$url|cat:'/admin/sites/'|escape:'htmlall':'UTF-8'}{if isset($catalogInfo.siteId) and $catalogInfo.siteId}{$catalogInfo.siteId|cat:'/edit#t-catalog'|escape:'htmlall':'UTF-8'}{/if}"
target="_blank" target="_blank"
class="retail-form__title_link">{l s='Manage site settings' mod='retailcrm'}</a> class="retail-form__title_link">{l s='Manage site settings' mod='retailcrm'}</a>
{/if} {/if}
</div> </div>
{if $catalogInfo and $catalogInfo.lastGenerated} {if $catalogInfo and isset($catalogInfo.lastGenerated) and $catalogInfo.lastGenerated}
{if $catalogInfo.isOutdated } {if $catalogInfo.isOutdated }
<div class="retail-alert retail-alert-danger"> <div class="retail-alert retail-alert-danger">
<div class="retail-alert-text"> <div class="retail-alert-text">
@ -201,16 +202,18 @@
</span> </span>
{l s='passed since last run' mod='retailcrm'} {l s='passed since last run' mod='retailcrm'}
</div> </div>
<div class="retail-form__label"> {if isset($catalogInfo.productsCount) and isset($catalogInfo.offersCount)}
<span style="font-weight: bold; font-size: 1.3em;"> <div class="retail-form__label">
{$catalogInfo.productsCount|default:'---'|escape:'htmlall':'UTF-8'} <span style="font-weight: bold; font-size: 1.3em;">
</span> {$catalogInfo.productsCount|escape:'htmlall':'UTF-8'}
{l s='Products' mod='retailcrm'} </span>
<span style="font-weight: bold; font-size: 1.3em;"> {l s='Products' mod='retailcrm'}
{$catalogInfo.offersCount|default:'---'|escape:'htmlall':'UTF-8'} <span style="font-weight: bold; font-size: 1.3em;">
</span> {$catalogInfo.offersCount|escape:'htmlall':'UTF-8'}
{l s='Offers' mod='retailcrm'} </span>
</div> {l s='Offers' mod='retailcrm'}
</div>
{/if}
</div> </div>
{else} {else}
<div class="retail-alert retail-alert-warning"> <div class="retail-alert retail-alert-warning">