Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

annnn

Користувачі
  
  • Публікації

    160
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем annnn


  1. ocStore 3.0.3.7
    поставил, модуль в админке есть, вроде бы все хорошо, включил в настройках
    но статус в списке модулей не меняется, соответственно на фронте модуль не включается
    шаблон ДЕФОЛТНЫЙ
    в настройках все ок, но в списке статус модуля отключен
    как быть?

    Screenshot_1.png

    Screenshot_2.png

  2. делаю так 

    'attribute_groups' => $this->model_catalog_product->getProductAttributes($product_info['product_id']),
    {% for attribute_group in attribute_groups %}
          {% for attribute in attribute_group.attribute %}
        {% if attribute.attribute_id in [14, 2, 3, 4] %} <!-- тут id атрибутов -->
        <td>{{ attribute.name }}</td><!-- тут название атрибута-->
        <td>{{ attribute.text }}</td><!-- тут текст/описание атрибута -->
          {% endif %}
          {% endfor %}
          {% endfor %}

    ошибки нету, но аттрибуты не выводятся
    что не так?

  3. 06.03.2022 в 11:57, annnn сказал:

    Спасибо большое

     

    теперь другая проблема
    ругается на контроллер, при добавлении в featured.php
     

    'attribute_groups' => $this->model_catalog_product->getProductAttributes($result['product_id']),


    Notice: Undefined variable: result in C:\OpenServer\domains\gipsanit\catalog\controller\extension\module\featured.php on line 60Notice: Trying to access array offset on value of type null in

  4. 06.03.2022 в 07:31, phantom74 сказал:

    Здравствуйте! Помогите разобраться. Запутался в паролях, не мог войти в админку. Нажал "забыли пороль", долго искал нужный эмайл. Нашёл- [email protected]. А как войти в этот ящик, где он находится?

    в базе смените пароль

  5. вот контроллер и twig админки
     

    Скрытый текст
    {{ header }}{{ column_left }} 
    <div id="content">
      <div class="page-header">
        <div class="container-fluid">
          <div class="pull-right">
            <button type="submit" form="form" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
            <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
          <h1>{{ heading_title }}</h1>
          <ul class="breadcrumb">
            {% for breadcrumb in breadcrumbs %} 
            <li><a href="{{ breadcrumb['href'] }}">{{ breadcrumb['text'] }}</a></li>
            {% endfor %} 
          </ul>
        </div>
      </div>
      <div class="container-fluid">
        {% if (error_warning) %} 
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ error_warning }} 
          <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        {% endif %} 
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-pencil"></i> {{ text_edit }}</h3>
          </div>
          <div class="panel-body">
            <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
    		
    		  <div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_status">{{ entry_status }}</label>
    			<div class="col-sm-10">
    				<select name="ts_countdown_timer_status" id="ts_countdown_timer_status" class="form-control">
    					{% if (ts_countdown_timer_status) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    				</select>
    			</div>
    		  </div>
    		  <br>
    		  
              <ul class="nav nav-tabs">
                <li class="active"><a href="#tab-settings" data-toggle="tab">{{ tab_settings[0] }}</a></li>
                <li><a href="#tab-customize" data-toggle="tab">{{ tab_customize }}</a></li>
                <li><a href="#tab-help" data-toggle="tab">{{ tab_help }}</a></li>
              </ul>
    	      <div class="tab-content">
    
    <div class="tab-pane active" id="tab-settings">
    <fieldset>
    	<legend>{{ text_settings_title_1 }}</legend>
    	<ul class="col-md-3 nav nav-pills nav-stacked">
    		{% for pid,position in timer_positions %} 
    		<li {% if (pid == 0) %}class="active"{% endif %}><a href="#tab-settings-{{ position }}" data-toggle="tab">{{ tab_settings[position] }}</a></li>
    		{% endfor %} 
    	</ul>
    	<div class="col-md-9 tab-content" style="border-left:1px solid #ededed;">
    		{% for pid,position in timer_positions %} 
    		<div class="tab-pane {% if (pid == 0) %}active{% endif %}" id="tab-settings-{{ position }}">
    			<div class="form-group" style="padding-top:0;">
    				<div class="pull-right container-fluid">
    					<button type="button" class="btn btn-success" onclick="enableAllSelects('{{ position }}');">{{ button_enable_all }}</button>
    					<button type="button" class="btn btn-danger" onclick="disableAllSelects('{{ position }}');">{{ button_disable_all }}</button>
    				</div>
    				<legend style="border:0; margin:5px 0 0 25px;">{{ tab_settings[position] }}</legend>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}">{{ entry_status }}</label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][status]" id="ts_countdown_timer_{{ position }}" class="form-control">
    					{% if (ts_countdown_timer_settings[position]['status'] is defined and ts_countdown_timer_settings[position]['status']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_title">{{ entry_title_timer }}</label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][title]" id="ts_countdown_timer_{{ position }}_title" class="form-control" onchange="titleTextEnable('{{ position }}');">
    					{% if (ts_countdown_timer_settings[position]['title'] is defined and ts_countdown_timer_settings[position]['title']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_title_text">{{ entry_title_text_timer }}</label>
    				<div class="col-sm-9">
    					{% for language in languages %} 
    					<div class="input-group" style="margin-bottom: 10px;">
    						<span class="input-group-addon"><img src="language/{{ language['code'] }}/{{ language['code'] }}.png" title="{{ language['name'] }}" /></span>
    						<input type="text" name="ts_countdown_timer_settings[{{ position }}][title_text][{{ language['language_id'] }}]" id="ts_countdown_timer_{{ position }}_title_text_{{ language['language_id'] }}" value="{{ ts_countdown_timer_settings[position]['title_text'][language['language_id']] is defined ? ts_countdown_timer_settings[position]['title_text'][language['language_id']] : text_timer_title }}" class="form-control" />
    					</div>
    					{% endfor %} 
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_separator"><span data-toggle="tooltip" title="{{ entry_separator_timer_help }}">{{ entry_separator_timer }}</span></label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][separator]" id="ts_countdown_timer_{{ position }}_separator" class="form-control">
    					{% if (ts_countdown_timer_settings[position]['separator'] is defined and ts_countdown_timer_settings[position]['separator']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_caption"><span data-toggle="tooltip" title="{{ entry_caption_timer_help }}">{{ entry_caption_timer }}</span></label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][caption]" id="ts_countdown_timer_{{ position }}_caption" class="form-control">
    					{% if (ts_countdown_timer_settings[position]['caption'] is defined and ts_countdown_timer_settings[position]['caption']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_days">{{ entry_days_timer }}</label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][days]" id="ts_countdown_timer_{{ position }}_days" class="form-control" onchange="countdaysEnable('{{ position }}');">
    					{% if (ts_countdown_timer_settings[position]['days'] is defined and ts_countdown_timer_settings[position]['days']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_countdays"><span data-toggle="tooltip" title="{{ entry_countdays_timer_help }}">{{ entry_countdays_timer }}</span></label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][countdays]" id="ts_countdown_timer_{{ position }}_countdays" class="form-control">
    					{% if (ts_countdown_timer_settings[position]['countdays'] is defined and ts_countdown_timer_settings[position]['countdays']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    			<div class="form-group">
    				<label class="col-sm-3 control-label" for="ts_countdown_timer_{{ position }}_seconds">{{ entry_sec_timer }}</label>
    				<div class="col-sm-9">
    					<select name="ts_countdown_timer_settings[{{ position }}][seconds]" id="ts_countdown_timer_{{ position }}_seconds" class="form-control">
    					{% if (ts_countdown_timer_settings[position]['seconds'] is defined and ts_countdown_timer_settings[position]['seconds']) %} 
    						<option value="1" selected="selected">{{ text_enabled }}</option>
    						<option value="0">{{ text_disabled }}</option>
    					{% else %} 
    						<option value="1">{{ text_enabled }}</option>
    						<option value="0" selected="selected">{{ text_disabled }}</option>
    					{% endif %} 
    					</select>
    				</div>
    			</div>
    		</div>
    		{% endfor %} 
    	</div>
    </fieldset>
    <br>
    <fieldset>
    	<legend>{{ text_settings_title_2 }}</legend>
    	<div class="form-group">
    		<label class="col-sm-2 control-label" for="ts_countdown_timer_timezone">{{ entry_timezone }}</label>
    		<div class="col-sm-10">
    			<select name="ts_countdown_timer_settings[timezone]" id="ts_countdown_timer_timezone" class="form-control">
    				{% set i = 12 %}{% for i in i..0 %} 
    				<option value="+{{ i }}" {% if (ts_countdown_timer_settings['timezone'] is defined and ts_countdown_timer_settings['timezone'] == i) %}selected="selected"{% endif %}>GMT+{{ i <= 9 ? '0'~i : i }}:00 {% if (i == server_timezone) %} {{ text_timezone_default }} {% endif %}</option>
    				{% endfor %} 
    				{% set i = 1 %}{% for i in i..12 %} 
    				<option value="-{{ i }}" {% if (ts_countdown_timer_settings['timezone'] is defined and ts_countdown_timer_settings['timezone'] == ('-'~i)|number_format) %}selected="selected"{% endif %}>GMT-{{ i <= 9 ? '0'~i : i }}:00 {% if (('-'~i)|number_format == server_timezone) %} {{ text_timezone_default }} {% endif %}</option>
    				{% endfor %} 
    			</select>
    		</div>
    	</div>
    </fieldset>
    <br>
    </div>
    
    <div class="tab-pane" id="tab-customize">
    	<fieldset>
    		<legend>{{ text_customize_title_1 }}</legend>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_title_size">{{ entry_customize_title_size }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[title_size]" id="ts_countdown_timer_customize_title_size" value="{{ ts_countdown_timer_customize['title_size'] is defined ? ts_countdown_timer_customize['title_size'] : '' }}" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_title_style">{{ entry_customize_title_style }}</label>
    			<div class="col-sm-10">
    				<input type="checkbox" name="ts_countdown_timer_customize[title_style][b]" id="ts_countdown_timer_customize_title_style_b" value="1" {{ ts_countdown_timer_customize['title_style']['b'] is defined and ts_countdown_timer_customize['title_style']['b'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_title_style_b" style="font-weight:bold;">{{ entry_tstyle_bold }}</label><br>
    				<input type="checkbox" name="ts_countdown_timer_customize[title_style][i]" id="ts_countdown_timer_customize_title_style_i" value="1" {{ ts_countdown_timer_customize['title_style']['i'] is defined and ts_countdown_timer_customize['title_style']['i'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_title_style_i" style="font-weight:normal;font-style:italic;">{{ entry_tstyle_italic }}</label><br>
    				<input type="checkbox" name="ts_countdown_timer_customize[title_style][u]" id="ts_countdown_timer_customize_title_style_u" value="1" {{ ts_countdown_timer_customize['title_style']['u'] is defined and ts_countdown_timer_customize['title_style']['u'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_title_style_u" style="font-weight:normal;text-decoration:underline;">{{ entry_tstyle_underline }}</label>
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_title_color">{{ entry_customize_title_color }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[title_color]" id="ts_countdown_timer_customize_title_color" value="{{ ts_countdown_timer_customize['title_color'] is defined ? ts_countdown_timer_customize['title_color'] : '' }}" class="form-control" />
    			</div>
    		</div>
    	</fieldset>
    	<br>
    	<fieldset>
    		<legend>{{ text_customize_title_2 }}</legend>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_size">{{ entry_customize_tablet_size }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[tablet_size]" id="ts_countdown_timer_customize_tablet_size" value="{{ ts_countdown_timer_customize['tablet_size'] is defined ? ts_countdown_timer_customize['tablet_size'] : '' }}" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_style">{{ entry_customize_tablet_style }}</label>
    			<div class="col-sm-10">
    				<input type="checkbox" name="ts_countdown_timer_customize[tablet_style][b]" id="ts_countdown_timer_customize_tablet_style_b" value="1" {{ ts_countdown_timer_customize['tablet_style']['b'] is defined and ts_countdown_timer_customize['tablet_style']['b'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_tablet_style_b" style="font-weight:bold;">{{ entry_tstyle_bold }}</label><br>
    				<input type="checkbox" name="ts_countdown_timer_customize[tablet_style][i]" id="ts_countdown_timer_customize_tablet_style_i" value="1" {{ ts_countdown_timer_customize['tablet_style']['i'] is defined and ts_countdown_timer_customize['tablet_style']['i'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_tablet_style_i" style="font-weight:normal;font-style:italic;">{{ entry_tstyle_italic }}</label><br>
    				<input type="checkbox" name="ts_countdown_timer_customize[tablet_style][u]" id="ts_countdown_timer_customize_tablet_style_u" value="1" {{ ts_countdown_timer_customize['tablet_style']['u'] is defined and ts_countdown_timer_customize['tablet_style']['u'] != 0 ? 'checked' : '' }}>&nbsp;<label for="ts_countdown_timer_customize_tablet_style_u" style="font-weight:normal;text-decoration:underline;">{{ entry_tstyle_underline }}</label>
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_color">{{ entry_customize_tablet_color }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[tablet_color]" id="ts_countdown_timer_customize_tablet_color" value="{{ ts_countdown_timer_customize['tablet_color'] is defined ? ts_countdown_timer_customize['tablet_color'] : '' }}" class="form-control" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_separator_color">{{ entry_customize_separator_color }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[separator_color]" id="ts_countdown_timer_customize_separator_color" value="{{ ts_countdown_timer_customize['separator_color'] is defined ? ts_countdown_timer_customize['separator_color'] : '' }}" class="form-control" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_bgexists">{{ entry_customize_tablet_bgexists }}</label>
    			<div class="col-sm-10">
    				<select name="ts_countdown_timer_customize[tablet_bgexists]" id="ts_countdown_timer_customize_tablet_bgexists" class="form-control">
    				{% if (ts_countdown_timer_customize['tablet_bgexists'] is defined and ts_countdown_timer_customize['tablet_bgexists']) %} 
    					<option value="1" selected="selected">{{ text_enabled }}</option>
    					<option value="0">{{ text_disabled }}</option>
    				{% else %} 
    					<option value="1">{{ text_enabled }}</option>
    					<option value="0" selected="selected">{{ text_disabled }}</option>
    				{% endif %} 
    				</select>
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_bgcolor">{{ entry_customize_tablet_bgcolor }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[tablet_bgcolor]" id="ts_countdown_timer_customize_tablet_bgcolor" value="{{ ts_countdown_timer_customize['tablet_bgcolor'] is defined ? ts_countdown_timer_customize['tablet_bgcolor'] : '' }}" class="form-control" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_bggrad">{{ entry_customize_tablet_bggrad }}</label>
    			<div class="col-sm-10">
    				<select name="ts_countdown_timer_customize[tablet_bggrad]" id="ts_countdown_timer_customize_tablet_bggrad" class="form-control">
    				{% if (ts_countdown_timer_customize['tablet_bggrad'] is defined and ts_countdown_timer_customize['tablet_bggrad']) %} 
    					<option value="1" selected="selected">{{ text_enabled }}</option>
    					<option value="0">{{ text_disabled }}</option>
    				{% else %} 
    					<option value="1">{{ text_enabled }}</option>
    					<option value="0" selected="selected">{{ text_disabled }}</option>
    				{% endif %} 
    				</select>
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_brdexists">{{ entry_customize_tablet_brdexists }}</label>
    			<div class="col-sm-10">
    				<select name="ts_countdown_timer_customize[tablet_brdexists]" id="ts_countdown_timer_customize_tablet_brdexists" class="form-control">
    				{% if (ts_countdown_timer_customize['tablet_brdexists'] is defined and ts_countdown_timer_customize['tablet_brdexists']) %} 
    					<option value="1" selected="selected">{{ text_enabled }}</option>
    					<option value="0">{{ text_disabled }}</option>
    				{% else %} 
    					<option value="1">{{ text_enabled }}</option>
    					<option value="0" selected="selected">{{ text_disabled }}</option>
    				{% endif %} 
    				</select>
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_brdcolor">{{ entry_customize_tablet_brdcolor }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[tablet_brdcolor]" id="ts_countdown_timer_customize_tablet_brdcolor" value="{{ ts_countdown_timer_customize['tablet_brdcolor'] is defined ? ts_countdown_timer_customize['tablet_brdcolor'] : '' }}" class="form-control" />
    			</div>
    		</div>
    		<div class="form-group">
    			<label class="col-sm-2 control-label" for="ts_countdown_timer_customize_tablet_brdradius">{{ entry_customize_tablet_brdradius }}</label>
    			<div class="col-sm-10">
    				<input type="text" name="ts_countdown_timer_customize[tablet_brdradius]" id="ts_countdown_timer_customize_tablet_brdradius" value="{{ ts_countdown_timer_customize['tablet_brdradius'] is defined ? ts_countdown_timer_customize['tablet_brdradius'] : '' }}" />
    			</div>
    		</div>
    	<fieldset>
    </div>
    
    <div class="tab-pane" id="tab-help">
    	<div class="form-group">
    		<div class="col-sm-12">
    			 {{ text_help }} 
    		</div>
    	</div>
    	<div class="form-group text-left">
    		<div class="col-sm-12">
    			 {{ text_author }} 
    		</div>
    	</div>
    </div>
    
    		</div>
    		</form>
    	  </div>
    	</div>
      </div>
    </div>
    <link type="text/css" href="view/javascript/tramplin-studio/CountdownTimer/ion-rangeslider/ion.rangeSlider.css" rel="stylesheet" media="screen" />
    <link type="text/css" href="view/javascript/tramplin-studio/CountdownTimer/ion-rangeslider/ion.rangeSlider.skinModern.css" rel="stylesheet" media="screen" />
    <script type="text/javascript" src="view/javascript/tramplin-studio/CountdownTimer/ion-rangeslider/ion.rangeSlider.min.js"></script>
    <link type="text/css" href="view/javascript/tramplin-studio/CountdownTimer/colorpicker/colorpicker.css" rel="stylesheet" media="screen" />
    <script type="text/javascript" src="view/javascript/tramplin-studio/CountdownTimer/colorpicker/colorpicker.js"></script>
    <script type="text/javascript">
    function enableAllSelects(tabId) {
    	$("#tab-settings-"+tabId+" select").each(function(){
    		$(this).find("option").each(function(){
    			if($(this).val()==1) {
    				$(this).prop('selected', true);
    			}
    		});
    	});
    	titleTextEnable(tabId);
    	countdaysEnable(tabId);
    }
    function disableAllSelects(tabId) {
    	$("#tab-settings-"+tabId+" select").each(function(){
    		$(this).find("option").each(function(){
    			if($(this).val()==0) {
    				$(this).prop('selected', true);
    			}
    		});
    	});
    	titleTextEnable(tabId);
    	countdaysEnable(tabId);
    }
    function titleTextEnable(tabId) {
    	{% for language in languages %} 
    	if($("#ts_countdown_timer_"+tabId+"_title").val()!=0) {
    		$("#ts_countdown_timer_"+tabId+"_title_text_{{ language['language_id'] }}").prop('disabled', false);
    	} else {
    		$("#ts_countdown_timer_"+tabId+"_title_text_{{ language['language_id'] }}").prop('disabled', true);
    	}
    	{% endfor %} 
    }
    function countdaysEnable(tabId) {
    	if($("#ts_countdown_timer_"+tabId+"_days").val()==0) {
    		$("#ts_countdown_timer_"+tabId+"_countdays").prop('disabled', false);
    	} else {
    		$("#ts_countdown_timer_"+tabId+"_countdays").prop('disabled', true);
    		$("#ts_countdown_timer_"+tabId+"_countdays option").each(function(){
    			if($(this).val()==0) {
    				$(this).prop('selected', true);
    			}
    		});
    	}
    }
    $(function() {
    	{% for pid,position in timer_positions %} 
    	titleTextEnable('{{ position }}');
    	countdaysEnable('{{ position }}');
    	{% endfor %} 
    });
    $(function() {
    	$("#ts_countdown_timer_customize_title_size").ionRangeSlider({
    		min: 10,
    		max: 20,
    		step: 1,
    		grid: true,
    		grid_num: 10
    	});
    	$("#ts_countdown_timer_customize_tablet_brdradius").ionRangeSlider({
    		min: 0,
    		max: 20,
    		step: 1,
    		grid: true,
    		grid_num: 20
    	});
    	$("#ts_countdown_timer_customize_tablet_size").ionRangeSlider({
    		min: 20,
    		max: 40,
    		step: 2,
    		grid: true,
    		grid_num: 20
    	});
    	$('#ts_countdown_timer_customize_title_color').css('background-color', '{{ ts_countdown_timer_customize['title_color'] }}');
    	$("#ts_countdown_timer_customize_title_color").ColorPicker({
    		color: '{{ ts_countdown_timer_customize['title_color'] }}',
    		onShow: function (colpkr) {
    			$(colpkr).fadeIn(500);
    			return false;
    		},
    		onHide: function (colpkr) {
    			$(colpkr).fadeOut(500);
    			return false;
    		},
    		onChange: function (hsb, hex, rgb) {
    			$('#ts_countdown_timer_customize_title_color').css('background-color', '#' + hex);
    			$("#ts_countdown_timer_customize_title_color").val('#' + hex);
    		}
    	});
    	$('#ts_countdown_timer_customize_tablet_bgcolor').css('background-color', '{{ ts_countdown_timer_customize['tablet_bgcolor'] }}');
    	$("#ts_countdown_timer_customize_tablet_bgcolor").ColorPicker({
    		color: '{{ ts_countdown_timer_customize['tablet_bgcolor'] }}',
    		onShow: function (colpkr) {
    			$(colpkr).fadeIn(500);
    			return false;
    		},
    		onHide: function (colpkr) {
    			$(colpkr).fadeOut(500);
    			return false;
    		},
    		onChange: function (hsb, hex, rgb) {
    			$('#ts_countdown_timer_customize_tablet_bgcolor').css('background-color', '#' + hex);
    			$("#ts_countdown_timer_customize_tablet_bgcolor").val('#' + hex);
    		}
    	});
    	$('#ts_countdown_timer_customize_tablet_brdcolor').css('background-color', '{{ ts_countdown_timer_customize['tablet_brdcolor'] }}');
    	$("#ts_countdown_timer_customize_tablet_brdcolor").ColorPicker({
    		color: '{{ ts_countdown_timer_customize['tablet_brdcolor'] }}',
    		onShow: function (colpkr) {
    			$(colpkr).fadeIn(500);
    			return false;
    		},
    		onHide: function (colpkr) {
    			$(colpkr).fadeOut(500);
    			return false;
    		},
    		onChange: function (hsb, hex, rgb) {
    			$('#ts_countdown_timer_customize_tablet_brdcolor').css('background-color', '#' + hex);
    			$("#ts_countdown_timer_customize_tablet_brdcolor").val('#' + hex);
    		}
    	});
    	$('#ts_countdown_timer_customize_tablet_color').css('background-color', '{{ ts_countdown_timer_customize['tablet_color'] }}');
    	$("#ts_countdown_timer_customize_tablet_color").ColorPicker({
    		color: '{{ ts_countdown_timer_customize['tablet_color'] }}',
    		onShow: function (colpkr) {
    			$(colpkr).fadeIn(500);
    			return false;
    		},
    		onHide: function (colpkr) {
    			$(colpkr).fadeOut(500);
    			return false;
    		},
    		onChange: function (hsb, hex, rgb) {
    			$('#ts_countdown_timer_customize_tablet_color').css('background-color', '#' + hex);
    			$("#ts_countdown_timer_customize_tablet_color").val('#' + hex);
    		}
    	});
    	$('#ts_countdown_timer_customize_separator_color').css('background-color', '{{ ts_countdown_timer_customize['separator_color'] }}');
    	$("#ts_countdown_timer_customize_separator_color").ColorPicker({
    		color: '{{ ts_countdown_timer_customize['separator_color'] }}',
    		onShow: function (colpkr) {
    			$(colpkr).fadeIn(500);
    			return false;
    		},
    		onHide: function (colpkr) {
    			$(colpkr).fadeOut(500);
    			return false;
    		},
    		onChange: function (hsb, hex, rgb) {
    			$('#ts_countdown_timer_customize_separator_color').css('background-color', '#' + hex);
    			$("#ts_countdown_timer_customize_separator_color").val('#' + hex);
    		}
    	});
    });
    </script>
    
    {{ footer }}

     

     

    Скрытый текст
    <?php
    class ControllerExtensionModuleTSCountDownTimer extends Controller {
    	private $error = array();
    
    	public function index() {
    		$extension_path = version_compare(VERSION, '3.0.0', '>=') ? "marketplace" : "extension";
    		$token_var_name = version_compare(VERSION, '3.0.0', '>=') ? "user_token" : "token";
    		
    		$this->load->language('extension/module/ts_countdown_timer');
    
    		$this->document->setTitle($this->language->get('heading_title'));
    
    		$this->load->model('setting/setting');
    
    		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
    			$this->model_setting_setting->editSetting('ts_countdown_timer', $this->request->post);
    
    			$this->session->data['success'] = $this->language->get('text_success');
    
    			$this->response->redirect($this->url->link($extension_path . '/extension', $token_var_name . '=' . $this->session->data[$token_var_name] . '&type=module', true));
    		}
    
    		$data['heading_title'] = $this->language->get('heading_title');
    		
        	$data['text_edit'] = $this->language->get('text_edit');
    		$data['text_enabled'] = $this->language->get('text_enabled');
    		$data['text_disabled'] = $this->language->get('text_disabled');
    		$data['text_settings_title_1'] = $this->language->get('text_settings_title_1');
    		$data['text_settings_title_2'] = $this->language->get('text_settings_title_2');
    		$data['text_customize_title_1'] = $this->language->get('text_customize_title_1');
    		$data['text_customize_title_2'] = $this->language->get('text_customize_title_2');
    		$data['text_timezone_default'] = $this->language->get('text_timezone_default');
    		$data['text_timer_title'] = $this->language->get('text_timer_title');
    
    		$data['tab_settings'] = $this->language->get('tab_settings');
    		$data['tab_customize'] = $this->language->get('tab_customize');
    		$data['tab_help'] = $this->language->get('tab_help');
    
    		$data['entry_customize_title_size'] = $this->language->get('entry_customize_title_size');
    		$data['entry_customize_title_style'] = $this->language->get('entry_customize_title_style');
    		$data['entry_customize_title_color'] = $this->language->get('entry_customize_title_color');
    		$data['entry_customize_tablet_bgexists'] = $this->language->get('entry_customize_tablet_bgexists');
    		$data['entry_customize_tablet_bgcolor'] = $this->language->get('entry_customize_tablet_bgcolor');
    		$data['entry_customize_tablet_bggrad'] = $this->language->get('entry_customize_tablet_bggrad');
    		$data['entry_customize_tablet_brdexists'] = $this->language->get('entry_customize_tablet_brdexists');
    		$data['entry_customize_tablet_brdcolor'] = $this->language->get('entry_customize_tablet_brdcolor');
    		$data['entry_customize_tablet_brdradius'] = $this->language->get('entry_customize_tablet_brdradius');
    		$data['entry_customize_tablet_size'] = $this->language->get('entry_customize_tablet_size');
    		$data['entry_customize_tablet_style'] = $this->language->get('entry_customize_tablet_style');
    		$data['entry_customize_tablet_color'] = $this->language->get('entry_customize_tablet_color');
    		$data['entry_customize_separator_color'] = $this->language->get('entry_customize_separator_color');
    		$data['entry_tstyle_bold'] = $this->language->get('entry_tstyle_bold');
    		$data['entry_tstyle_italic'] = $this->language->get('entry_tstyle_italic');
    		$data['entry_tstyle_underline'] = $this->language->get('entry_tstyle_underline');
    
    		$data['entry_status'] = $this->language->get('entry_status');
    		$data['entry_timezone'] = $this->language->get('entry_timezone');
    		$data['entry_title_timer'] = $this->language->get('entry_title_timer');
    		$data['entry_title_text_timer'] = $this->language->get('entry_title_text_timer');
    		$data['entry_separator_timer'] = $this->language->get('entry_separator_timer');
    		$data['entry_separator_timer_help'] = $this->language->get('entry_separator_timer_help');
    		$data['entry_caption_timer'] = $this->language->get('entry_caption_timer');
    		$data['entry_caption_timer_help'] = $this->language->get('entry_caption_timer_help');
    		$data['entry_countdays_timer'] = $this->language->get('entry_countdays_timer');
    		$data['entry_countdays_timer_help'] = $this->language->get('entry_countdays_timer_help');
    		$data['entry_days_timer'] = $this->language->get('entry_days_timer');
    		$data['entry_sec_timer'] = $this->language->get('entry_sec_timer');
    
    		$data['text_help'] = $this->language->get('text_help');
    		$data['text_author'] = $this->language->get('text_author');
    
    		$data['button_save'] = $this->language->get('button_save');
    		$data['button_cancel'] = $this->language->get('button_cancel');
    		$data['button_enable_all'] = $this->language->get('button_enable_all');
    		$data['button_disable_all'] = $this->language->get('button_disable_all');
    
    
     		if (isset($this->error['warning'])) {
    			$data['error_warning'] = $this->error['warning'];
    		} else {
    			$data['error_warning'] = '';
    		}
    
      		$data['breadcrumbs'] = array();
    
       		$data['breadcrumbs'][] = array(
           		'text'      => $this->language->get('text_home'),
    			'href'      => $this->url->link('common/home', $token_var_name . '=' . $this->session->data[$token_var_name], true),
          		'separator' => false
       		);
    
       		$data['breadcrumbs'][] = array(
           		'text'      => $this->language->get('text_extension'),
    			'href'      => $this->url->link($extension_path . '/extension', $token_var_name . '=' . $this->session->data[$token_var_name] . '&type=module', true),
          		'separator' => ' :: '
       		);
    
       		$data['breadcrumbs'][] = array(
           		'text'      => $this->language->get('heading_title'),
    			'href'      => $this->url->link('extension/module/ts_countdown_timer', $token_var_name . '=' . $this->session->data[$token_var_name], true),
          		'separator' => ' :: '
       		);
    
    		$data['action'] = $this->url->link('extension/module/ts_countdown_timer', $token_var_name . '=' . $this->session->data[$token_var_name], true);
    
    		$data['cancel'] = $this->url->link($extension_path . '/extension', $token_var_name . '=' . $this->session->data[$token_var_name] . '&type=module', true);
    
    
    		$timer_positions = array(
    			'product', 
    			'category', 
    			'manufacturer', 
    			'special', 
    			'search', 
    			'latest', 
    			'bestseller', 
    			'specialmod',
    			'featured', 
    			'related', 
    		);
    		
    		$server_timezone = (int)date('O') / 100;
    		
    		$data['timer_positions'] = $timer_positions;
    		$data['server_timezone'] = $server_timezone;
    		
    		$this->load->model('localisation/language');
    		$data['languages'] = $this->model_localisation_language->getLanguages();
    		
    		
    		if (isset($this->request->post['ts_countdown_timer_status'])) {
    			$data['ts_countdown_timer_status'] = $this->request->post['ts_countdown_timer_status'];
    		} elseif ($this->config->get('ts_countdown_timer_status')) {
    			$data['ts_countdown_timer_status'] = $this->config->get('ts_countdown_timer_status');
    		} else {
    			$data['ts_countdown_timer_status'] = '';
    		}
    		
    		if (isset($this->request->post['ts_countdown_timer_settings'])) {
    			$data['ts_countdown_timer_settings'] = $this->request->post['ts_countdown_timer_settings'];
    		} elseif ($this->config->get('ts_countdown_timer_settings')) {
    			$data['ts_countdown_timer_settings'] = $this->config->get('ts_countdown_timer_settings');
    		} else {
    			$data['ts_countdown_timer_settings'] = array(
    				'timezone'		=> $server_timezone
    			);
    			foreach ($timer_positions as $timer_position) {
    				$data['ts_countdown_timer_settings'][$timer_position] = array(
    					'status'		=> 1,
    					'title'			=> 1,
    					'title_text'	=> array(),
    					'separator'		=> 1,
    					'caption'		=> 1,
    					'days'			=> 1,
    					'countdays'		=> 0,
    					'seconds'		=> 1,
    				);
    			}
    		}
    		
    		if (isset($this->request->post['ts_countdown_timer_customize'])) {
    			$data['ts_countdown_timer_customize'] = $this->request->post['ts_countdown_timer_customize'];
    		} elseif ($this->config->get('ts_countdown_timer_customize')) {
    			$data['ts_countdown_timer_customize'] = $this->config->get('ts_countdown_timer_customize');
    		} else {
    			$data['ts_countdown_timer_customize'] = array(
    				'title_size'		=> 12,
    				'title_style'		=> array(
    					'b' => 0,
    					'i' => 0,
    					'u' => 0
    				),
    				'title_color'		=> '#616161',
    				'tablet_bgexists'	=> 1,
    				'tablet_bgcolor'	=> '#cccccc',
    				'tablet_bggrad'		=> 1,
    				'tablet_brdexists'	=> 1,
    				'tablet_brdcolor'	=> '#919191',
    				'tablet_brdradius'	=> 3,
    				'tablet_size'		=> 28,
    				'tablet_style'		=> array(
    					'b' => 1,
    					'i' => 0,
    					'u' => 0
    				),
    				'tablet_color'		=> '#616161',
    				'separator_color'	=> '#616161'
    			);
    		}
    
    
    
    		$data['header'] = $this->load->controller('common/header');
    		$data['column_left'] = $this->load->controller('common/column_left');
    		$data['footer'] = $this->load->controller('common/footer');
    
    		$this->response->setOutput($this->load->view('extension/module/ts_countdown_timer', $data));
    	}
    
    	private function validate() {
    		if (!$this->user->hasPermission('modify', 'extension/module/ts_countdown_timer')) {
    			$this->error['warning'] = $this->language->get('error_permission');
    		}
    
    		if (!$this->error) {
    			return true;
    		} else {
    			return false;
    		}
    	}
    }

     

     

  6. 06.03.2022 в 09:05, warezinspector сказал:

    Перейдите в Модули/расширения - Модификаторы - TS CountDown Timer там есть вывод кода таймера в шаблон. Я не за компом просто, не могу сказать точно

     

    <?xml version="1.0" encoding="utf-8"?>
    <modification>
        <name>TS CountDown Timer</name>
    	<code>CountDown-Timer-v1-1-by-Tramplin-Studio</code>
    	<version>1.1</version>
    	<author>Tramplin Studio</author>
    	<link>https://tramplin-studio.store/</link>
    
      
    	<file path="catalog/controller/common/header.php">
    		<operation>
    			<search><![CDATA[public function index() {]]></search>
    			<add position="after"><![CDATA[
    			$this->load->model('extension/module/ts_countdown_timer');
    			$data['ts_countdown_timer_customize'] = $this->model_extension_module_ts_countdown_timer->getCustomize();
    			if ($data['ts_countdown_timer_customize']) {
    				$this->document->addStyle('catalog/view/javascript/tramplin-studio/CountdownTimer/CountdownTimer.css');
    				$this->document->addScript('catalog/view/javascript/tramplin-studio/CountdownTimer/jquery.corner.js');
    				$this->document->addScript('catalog/view/javascript/tramplin-studio/CountdownTimer/CountdownTimer.js');
    			}
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/common/header.tpl">
    		<operation>
    			<search><![CDATA[</head>]]></search>
    			<add position="before"><![CDATA[
    			<?php if($ts_countdown_timer_customize) { ?>
    			<script type="text/javascript">var cdtCustomize = JSON.parse('<?php echo $ts_countdown_timer_customize; ?>');</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/common/header.twig">
    		<operation>
    			<search><![CDATA[</head>]]></search>
    			<add position="before"><![CDATA[
    			{% if (ts_countdown_timer_customize) %} 
    			<script type="text/javascript">var cdtCustomize = JSON.parse('{{ ts_countdown_timer_customize }}');</script>
    			{% endif %}
    			]]></add>
    		</operation>
    	</file>
      
      
    
    	<file path="catalog/controller/product/product.php">
    		<operation>
    			<search><![CDATA[if ((float)$product_info['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$product_info['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$data['ts_countdown_timer'] = $this->model_extension_module_ts_countdown_timer->getTimer($this->request->get['product_id'], 'product');
    			} else {
    				$data['ts_countdown_timer'] = false;
    			}
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/product.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<h2><?php echo $special; ?></h2>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($ts_countdown_timer) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-product-<?php echo $product_id; ?>"></div>
    			<script>$("#cdtBlock-product-<?php echo $product_id; ?>").TSCountDownTimer(JSON.parse('<?php echo $ts_countdown_timer; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<h2>{{ special }}</h2>]]></search>
    			<add position="after"><![CDATA[
    			{% if (ts_countdown_timer) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-product-{{ product_id }}"></div>
    			<script>$("#cdtBlock-product-{{ product_id }}").TSCountDownTimer(JSON.parse('{{ ts_countdown_timer }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/product/category.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'category');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/category.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-category-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-category-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-category-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-category-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/product/manufacturer.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'manufacturer');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/manufacturer_info.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-manufacturer-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-manufacturer-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-manufacturer-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-manufacturer-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/product/special.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'special');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/special.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-special-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-special-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-special-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-special-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/product/search.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'search');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/search.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-search-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-search-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-search-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-search-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/extension/module/featured.php">
    		<operation>
    			<search><![CDATA[if ((float)$product_info['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$product_info['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($product_info['product_id'], 'featured');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/extension/module/featured.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-featured-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-featured-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-featured-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-featured-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/extension/module/latest.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'latest');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/extension/module/latest.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-latest-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-latest-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-latest-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-latest-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/extension/module/bestseller.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'bestseller');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/extension/module/bestseller.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-bestseller-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-bestseller-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-bestseller-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-bestseller-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/extension/module/special.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'specialmod');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/extension/module/special.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-specialmod-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-specialmod-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-specialmod-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-specialmod-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    
    
    	<file path="catalog/controller/product/product.php">
    		<operation>
    			<search><![CDATA[if ((float)$result['special']) {]]></search>
    			<add position="before"><![CDATA[
    			if ((float)$result['special']) {
    				$this->load->model('extension/module/ts_countdown_timer');
    				$ts_countdown_timer = $this->model_extension_module_ts_countdown_timer->getTimer($result['product_id'], 'related');
    			} else {
    				$ts_countdown_timer = false;
    			}
    			]]></add>
    		</operation>
    		<operation>
    			<search><![CDATA[=> $special,]]></search>
    			<add position="after"><![CDATA[
    			'ts_countdown_timer' => $ts_countdown_timer,
    			]]></add>
    		</operation>
    	</file>
    	<file path="catalog/view/theme/*/template/product/product.{tpl,twig}">
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new"><?php echo $product['special']; ?></span> <span class="price-old"><?php echo $product['price']; ?></span>]]></search>
    			<add position="after"><![CDATA[
    			<?php if ($product['ts_countdown_timer']) { ?>
    			<div class="TSCountDownTimer" id="cdtBlock-related-<?php echo $product['product_id']; ?>"></div>
    			<script>$("#cdtBlock-related-<?php echo $product['product_id']; ?>").TSCountDownTimer(JSON.parse('<?php echo $product['ts_countdown_timer']; ?>'));</script>
    			<?php } ?>
    			]]></add>
    		</operation>
    		<operation error="skip">
    			<search><![CDATA[<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>]]></search>
    			<add position="after"><![CDATA[
    			{% if (product['ts_countdown_timer']) %} 
    			<div class="TSCountDownTimer" id="cdtBlock-related-{{ product['product_id'] }}"></div>
    			<script>$("#cdtBlock-related-{{ product['product_id'] }}").TSCountDownTimer(JSON.parse('{{ product['ts_countdown_timer'] }}'));</script>
    			{% endif %} 
    			]]></add>
    		</operation>
    	</file>
    
    </modification>



    вот он, только я фигзнает что тут править

  7. 06.03.2022 в 08:30, warezinspector сказал:

    Если сам модуль работает, а статус у модуля Отключен - это нормально, просто в контроллере разработчик не правильно указал название, должно быть module_

    А то что на фронте не работает, нужно адаптировать его

    шаблон полностью дефолтный, по идее должен работать но не работает на фронте

  8. Кто пользовался данным модулем?
    ocStore 3.0.3.7
    поставил, модуль в адмтнке есть, вроде бьы все хорошо, включил в настройках
    но статус в списке модулей не меняется, соответственно на фронте модуль не включается
    мож кто сталкивался с такой проблемой? такое замечал не только в данном модуле
    в настройках все ок, но в списке статус модуля отключен

    Screenshot_1.png

    Screenshot_2.png

  9. Подскажитте пожалуйста
    нашел мануал, но моих знаний не хватает понять как правильно туда втулить

    вот, выделил жирным, что именно не понимаю как вставить

     

    Создаю колонку desc (varchar 255 not null ) в таблице oc_banner_image

    В файле /admin/model/design/banner.php в функцию addBanner добавляю desc = '" .  $this->db->escape($banner_image['desc']) . "'

    В этом же файле в функцию editBanner добавляю этот же код

    В этом же файле в функцию getBannerImages добавил 'desc' => $banner_image['desc']

    Далее в файле /admin/controller/design/banner.php в массив $data['banner_images'] добавил 'desc' => $banner_image['desc']

    Потом на фронте создал нужное поле в файле /admin/view/template/design/banner_form.twig


    вот эти 2 функции, как правильно туда это впихнуть?
     

    public function addBanner($data) {
    		$this->db->query("INSERT INTO " . DB_PREFIX . "banner SET name = '" . $this->db->escape($data['name']) . "', status = '" . (int)$data['status'] . "'");
    
    		$banner_id = $this->db->getLastId();
    
    		if (isset($data['banner_image'])) {
    			foreach ($data['banner_image'] as $language_id => $value) {
    				foreach ($value as $banner_image) {
    					$this->db->query("INSERT INTO " . DB_PREFIX . "banner_image SET banner_id = '" . (int)$banner_id . "', language_id = '" . (int)$language_id . "', title = '" .  $this->db->escape($banner_image['title']) . "', link = '" .  $this->db->escape($banner_image['link']) . "', image = '" .  $this->db->escape($banner_image['image']) . "', sort_order = '" .  (int)$banner_image['sort_order'] . "'");
    				}
    			}
    		}
    
    		return $banner_id;
    	}
    
    
    
    
    
    public function getBannerImages($banner_id) {
    		$banner_image_data = array();
    
    		$banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "' ORDER BY sort_order ASC");
    
    		foreach ($banner_image_query->rows as $banner_image) {
    			$banner_image_data[$banner_image['language_id']][] = array(
    				'title'      => $banner_image['title'],
    				'link'       => $banner_image['link'],
    				'image'      => $banner_image['image'],
    				'sort_order' => $banner_image['sort_order']
    			);
    		}
    
    		return $banner_image_data;
    	}


    Спасибо

  10. нужно было сделать не dropdown а что бы кнопки в ряд шли
    убрал выпадающий список
    теперь нужно активному языку (кнопке) присвоить класс напр. active
    как сделать такое условие?

    {% if languages|length > 1 %}
      <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-language">
          <ul class="langlist">
            {% for language in languages %}
            <li>
              <button class="btn btn-link btn-block language-select" type="button" name="{{ language.code }}">{{ language.name }}</button>
            </li>
            {% endfor %}
          </ul>
        <input type="hidden" name="code" value="" />
        <input type="hidden" name="redirect" value="{{ redirect }}" />
      </form>
    {% endif %}

     

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.