| @@ -1,197 +1,0 @@ | ||
| 1 | -<div class="acym__content acym_area padding-vertical-1 padding-horizontal-2"> | |
| 2 | - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_CONFIGURATION_QUEUE'); ?></div> | |
| 3 | - <div class="grid-x grid-margin-x margin-y"> | |
| 4 | - <div class="cell medium-3"><?php echo acym_translation('ACYM_CONFIGURATION_QUEUE_PROCESSING'); ?></div> | |
| 5 | - <div class="cell medium-9"> | |
| 6 | - <?php | |
| 7 | - $disabledOptions = []; | |
| 8 | - if (!acym_level(ACYM_ESSENTIAL)) { | |
| 9 | - $disabledOptions = [ | |
| 10 | - 'auto' => ['tooltipTxt' => acym_translation('ACYM_PRO_ONLY'), 'disabledClass' => 'acym__disabled'], | |
| 11 | - 'automan' => ['tooltipTxt' => acym_translation('ACYM_PRO_ONLY'), 'disabledClass' => 'acym__disabled'], | |
| 12 | - ]; | |
| 13 | - } | |
| 14 | - echo acym_radio( | |
| 15 | - [ | |
| 16 | - 'auto' => acym_translation('ACYM_CONFIGURATION_QUEUE_AUTOMATIC'), | |
| 17 | - 'automan' => acym_translation('ACYM_CONFIGURATION_QUEUE_AUTOMAN'), | |
| 18 | - 'manual' => acym_translation('ACYM_CONFIGURATION_QUEUE_MANUAL'), | |
| 19 | - ], | |
| 20 | - 'config[queue_type]', | |
| 21 | - $this->config->get('queue_type', 'automan'), | |
| 22 | - [ | |
| 23 | - 'related' => [ | |
| 24 | - 'auto' => 'automatic_only', | |
| 25 | - 'automan' => 'automatic_manual', | |
| 26 | - 'manual' => 'manual_only', | |
| 27 | - ], | |
| 28 | - ], | |
| 29 | - [], | |
| 30 | - false, | |
| 31 | - $disabledOptions | |
| 32 | - ); | |
| 33 | - ?> | |
| 34 | - </div> | |
| 35 | - <div class="cell medium-3 automatic_only automatic_manual"> | |
| 36 | - <?php | |
| 37 | - echo acym_translation('ACYM_AUTO_SEND_PROCESS'); | |
| 38 | - echo acym_info('ACYM_AUTO_SEND_PROCESS_DESC'); | |
| 39 | - ?> | |
| 40 | - </div> | |
| 41 | - <div class="cell medium-9 grid-x automatic_only automatic_manual"> | |
| 42 | - <div class="cell large-9 grid-x margin-y"> | |
| 43 | - <div class="cell"> | |
| 44 | - <?php | |
| 45 | - $cronFrequency = $this->config->get('cron_frequency'); | |
| 46 | - $valueBatch = acym_level(ACYM_ENTERPRISE) ? $this->config->get('queue_batch_auto', 1) : 1; | |
| 47 | - if (!function_exists('curl_multi_exec') && (intval($cronFrequency) < 900 || intval($valueBatch) > 1)) { | |
| 48 | - acym_display(acym_translation('ACYM_MULTI_CURL_DISABLED'), 'error', false); | |
| 49 | - } elseif (empty($cronFrequency) && !empty($this->config->get('active_cron', 0))) { | |
| 50 | - acym_display(acym_translation('ACYM_EMPTY_FREQUENCY'), 'error', false); | |
| 51 | - } | |
| 52 | - | |
| 53 | - $disabledBatch = acym_level(ACYM_ENTERPRISE) ? '' : 'disabled'; | |
| 54 | - $delayTypeAuto = $data['typeDelay']; | |
| 55 | - $delayHtml = '<span data-acym-tooltip="'.acym_translation('ACYM_CRON_TRIGGERED_DESC').'">'.$delayTypeAuto->display( | |
| 56 | - 'config[cron_frequency]', | |
| 57 | - $cronFrequency, | |
| 58 | - 2, | |
| 59 | - '', | |
| 60 | - '', | |
| 61 | - 'auto_sending_input' | |
| 62 | - ).'</span>'; | |
| 63 | - echo acym_translationSprintf( | |
| 64 | - 'ACYM_SEND_X_BATCH_OF_X_EMAILS_EVERY_Y', | |
| 65 | - '<input '.$disabledBatch.' class="intext_input auto_sending_input" type="number" min="1" name="config[queue_batch_auto]" value="'.$valueBatch.'" />', | |
| 66 | - '<input class="intext_input auto_sending_input" type="number" min="1" name="config[queue_nbmail_auto]" value="'.intval( | |
| 67 | - $this->config->get('queue_nbmail_auto') | |
| 68 | - ).'" />', | |
| 69 | - $delayHtml | |
| 70 | - ); | |
| 71 | - echo '<span id="automatic_sending_speed_too_many_batches">'; | |
| 72 | - echo acym_info('ACYM_TOO_MANY_BATCHES', '', '', '', true); | |
| 73 | - echo '</span>'; | |
| 74 | - ?> | |
| 75 | - </div> | |
| 76 | - <div class="cell"> | |
| 77 | - <?php | |
| 78 | - echo acym_translationSprintf( | |
| 79 | - 'ACYM_WAIT_X_SECONDS_BETWEEN_MAILS', | |
| 80 | - '<input class="intext_input auto_sending_input" type="number" min="0" name="config[email_frequency]" value="'.$this->config->get( | |
| 81 | - 'email_frequency', | |
| 82 | - 0 | |
| 83 | - ).'" />' | |
| 84 | - ); | |
| 85 | - ?> | |
| 86 | - </div> | |
| 87 | - </div> | |
| 88 | - </div> | |
| 89 | - <div class="cell medium-3 automatic_only automatic_manual"></div> | |
| 90 | - <div class="cell medium-9 automatic_only automatic_manual margin-bottom-2"> | |
| 91 | - <?php echo acym_translationSprintf('ACYM_SEND_X_EMAILS_PER_HOUR', '<span id="automatic_sending_speed_preview">280</span>'); ?> | |
| 92 | - <span id="automatic_sending_speed_too_much"> | |
| 93 | - <?php echo acym_info(acym_translation('ACYM_ONE_SECOND_PER_EMAIL_WARNING')); ?> | |
| 94 | - </span> | |
| 95 | - <span id="automatic_sending_speed_no_wait"> | |
| 96 | - <?php echo acym_info(acym_translation('ACYM_SEND_FASTER_DECREASE_WAIT')); ?> | |
| 97 | - </span> | |
| 98 | - </div> | |
| 99 | - <div class="cell medium-3 automatic_only automatic_manual"><?php echo acym_translation('ACYM_SEND_RESTRICTIONS'); ?></div> | |
| 100 | - <div class="cell medium-9 grid-x margin-y automatic_only automatic_manual acym_auto_send_time"> | |
| 101 | - <div class="cell"> | |
| 102 | - <?php | |
| 103 | - $hoursFrom = acym_select( | |
| 104 | - $data['listHours'], | |
| 105 | - 'config[queue_send_from_hour]', | |
| 106 | - $this->config->get('queue_send_from_hour', '00'), | |
| 107 | - ['class' => 'intext_select'] | |
| 108 | - ); | |
| 109 | - $minutesFrom = acym_select( | |
| 110 | - $data['listAllMinutes'], | |
| 111 | - 'config[queue_send_from_minute]', | |
| 112 | - $this->config->get('queue_send_from_minute', '00'), | |
| 113 | - ['class' => 'intext_select'] | |
| 114 | - ); | |
| 115 | - $hoursTo = acym_select( | |
| 116 | - $data['listHours'], | |
| 117 | - 'config[queue_send_to_hour]', | |
| 118 | - $this->config->get('queue_send_to_hour', '23'), | |
| 119 | - ['class' => 'intext_select'] | |
| 120 | - ); | |
| 121 | - $minutesTo = acym_select( | |
| 122 | - $data['listAllMinutes'], | |
| 123 | - 'config[queue_send_to_minute]', | |
| 124 | - $this->config->get('queue_send_to_minute', '59'), | |
| 125 | - ['class' => 'intext_select'] | |
| 126 | - ); | |
| 127 | - echo acym_translationSprintf('ACYM_SEND_FROM_TO', $hoursFrom, $minutesFrom, $hoursTo, $minutesTo); | |
| 128 | - ?> | |
| 129 | - </div> | |
| 130 | - <div class="cell grid-x"> | |
| 131 | - <div class="cell shrink margin-right-1"> | |
| 132 | - <?php echo acym_translation('ACYM_DONT_SEND_WEEKEND'); ?> | |
| 133 | - </div> | |
| 134 | - <div class="cell shrink"> | |
| 135 | - <?php echo acym_switch('config[queue_stop_weekend]', $this->config->get('queue_stop_weekend', 0)); ?> | |
| 136 | - </div> | |
| 137 | - <div class="cell auto"></div> | |
| 138 | - </div> | |
| 139 | - </div> | |
| 140 | - <div class="cell medium-3 manual_only automatic_manual"><?php echo acym_translation('ACYM_MANUAL_SEND_PROCESS'); ?></div> | |
| 141 | - <div class="cell medium-9 manual_only automatic_manual"> | |
| 142 | - <?php | |
| 143 | - $delayTypeAuto = $data['typeDelay']; | |
| 144 | - echo acym_translationSprintf( | |
| 145 | - 'ACYM_SEND_X_EMAILS_WAIT_Y_SECONDS', | |
| 146 | - '<input class="intext_input" type="number" min="1" name="config[queue_nbmail]" value="'.intval($this->config->get('queue_nbmail')).'" />', | |
| 147 | - '<input class="intext_input" type="number" min="0" name="config[queue_pause]" value="'.intval($this->config->get('queue_pause')).'" />' | |
| 148 | - ); | |
| 149 | - ?> | |
| 150 | - </div> | |
| 151 | - <div class="cell medium-3"><?php echo '<span>'.acym_translation('ACYM_MAX_NB_TRY').'</span>'.acym_info('ACYM_MAX_NB_TRY_DESC'); ?></div> | |
| 152 | - <div class="cell medium-9"> | |
| 153 | - <?php echo acym_translationSprintf( | |
| 154 | - 'ACYM_CONFIG_TRY', | |
| 155 | - '<input class="intext_input" type="number" min="0" name="config[queue_try]" value="'.intval($this->config->get('queue_try')).'">' | |
| 156 | - ); | |
| 157 | - | |
| 158 | - $failaction = $data['failaction']; | |
| 159 | - echo ' '.acym_translationSprintf('ACYM_CONFIG_TRY_ACTION', $failaction->display('maxtry', $this->config->get('bounce_action_maxtry'))); ?> | |
| 160 | - </div> | |
| 161 | - <div class="cell medium-3"><?php echo acym_translation('ACYM_NUMBER_OF_DAYS_TO_CLEAN_QUEUE').acym_info('ACYM_NUMBER_OF_DAYS_TO_CLEAN_QUEUE_DESC'); ?></div> | |
| 162 | - <div class="cell medium-9 grid-x"> | |
| 163 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 164 | - <?php | |
| 165 | - $queueDelete = $this->config->get('queue_delete_days', 0); | |
| 166 | - if (!acym_level(ACYM_ESSENTIAL)) { | |
| 167 | - $inputContent = '<input type="number" class="intext_input" disabled min="0" name="config[queue_delete_days]" value="'.$queueDelete.'">'; | |
| 168 | - $inputContent = acym_tooltip( | |
| 169 | - [ | |
| 170 | - 'hoveredText' => $inputContent, | |
| 171 | - 'textShownInTooltip' => acym_translation('ACYM_PRO_ONLY'), | |
| 172 | - ] | |
| 173 | - ); | |
| 174 | - } else { | |
| 175 | - $inputContent = '<input type="number" class="intext_input" min="0" name="config[queue_delete_days]" value="'.$queueDelete.'">'; | |
| 176 | - } | |
| 177 | - echo $inputContent; | |
| 178 | - ?> | |
| 179 | - </div> | |
| 180 | - </div> | |
| 181 | - <?php if (acym_level(ACYM_ENTERPRISE)) { ?> | |
| 182 | - <div class="cell medium-3"><?php echo acym_translation('ACYM_SET_FOLLOWUP_PRIORITY').acym_info('ACYM_SET_FOLLOWUP_PRIORITY_DESC'); ?></div> | |
| 183 | - <div class="cell medium-9 grid-x"> | |
| 184 | - <div class="cell medium-6 large-4 xlarge-3 xxlarge-2"> | |
| 185 | - <?php echo acym_switch('config[followup_max_priority]', $this->config->get('followup_max_priority', 0)); ?> | |
| 186 | - </div> | |
| 187 | - </div> | |
| 188 | - <?php } ?> | |
| 189 | - </div> | |
| 190 | -</div> | |
| 191 | -<?php | |
| 192 | -if (!acym_level(ACYM_ESSENTIAL)) { | |
| 193 | - echo '<div class="acym_area"> | |
| 194 | - <div class="acym__title acym__title__secondary">'.acym_translation('ACYM_CRON').'</div>'; | |
| 195 | - include acym_getView('configuration', 'upgrade_license'); | |
| 196 | - echo '</div>'; | |
| 197 | -} | |