first commit

This commit is contained in:
2025-01-06 20:47:25 +01:00
commit 3bdbd78c2f
25591 changed files with 3586440 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

View File

@@ -0,0 +1,163 @@
{if $criterions_groups_indexed|is_array && $criterions_groups_indexed|sizeof}
{module->_displayTitle text="{l s='Massive add of results pages' mod='pm_advancedsearch4'}"}
{module->_showInfo text="{l s='Select your criteria among the criterion groups and sort them so they can be readable by human' mod='pm_advancedsearch4'}"}
{as4_startForm id="seoMassSearchForm"}
<div id="seoSearchPanelCriteriaTabs" class="massSeo">
<ul>
{foreach from=$criterions_groups_indexed key=criterion_group_key item=criterions_group_indexed}
<li>
<a href="#seoSearchPanelCriteriaTabs-{$criterion_group_key|escape:'htmlall':'UTF-8'}">
{$criterions_group_indexed.name|escape:'htmlall':'UTF-8'}{if empty($criterions_group_indexed.visible)} {l s='(context)' mod='pm_advancedsearch4'}{/if}
</a>
</li>
{/foreach}
</ul>
{foreach from=$criterions_groups_indexed key=criterion_group_key item=criterions_group_indexed}
<div id="seoSearchPanelCriteriaTabs-{$criterion_group_key|escape:'htmlall':'UTF-8'}" class="seoSearchPanelCriteriaTabsContent">
<input type="hidden" name="id_criterion_group" value="{$criterions_group_indexed.id_criterion_group|intval}" style="margin-left:4px;" />
{as4_button text={l s='Check/uncheck all' mod='pm_advancedsearch4'} onclick="enableAllCriterion4MassSeo(this);" icon_class='ui-icon ui-icon-check'}
<br /><br />
<ul class="ui-helper-reset ui-sortable">
{* Range group *}
{if !empty($criterions_group_indexed.range) && $criterions_group_indexed.display_type != 5 && $criterions_group_indexed.display_type != 8}
{foreach from=$criterions_group_indexed.criterions item=criterion}
<li class="ui-state-default massSeoSearchCriterion" id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterion.id_criterion|as4_nofilter}" title="{$criterion.value|escape:'htmlall':'UTF-8'}" onclick="enableCriterion4MassSeo(this);">
<input type="checkbox" name="criteria[{$criterions_group_indexed.id_criterion_group|intval}][]" value="{$criterions_group_indexed.id_criterion_group|intval}_{$criterion.id_criterion|as4_nofilter}" onclick="enableCriterion4MassSeo($(this).parent('li'));" /> &nbsp; {$criterion.value|escape:'htmlall':'UTF-8'}
</li>
{/foreach}
{* Price group *}
{elseif $criterions_group_indexed.criterion_group_type == 'price'}
<li
class="ui-state-default massSeoSearchCriterion massSeoSearchCriterionPrice"
id="criterion_price-{$criterions_group_indexed.price_range.min_price|floatval}~{$criterions_group_indexed.price_range.max_price|floatval}"
title="{l s='From' mod='pm_advancedsearch4'} {$criterions_group_indexed.price_range.min_price|intval} {l s='to' mod='pm_advancedsearch4'} {$default_currency_sign_left|escape:'htmlall':'UTF-8'} {$criterions_group_indexed.price_range.max_price|intval} {$default_currency_sign_right|escape:'htmlall':'UTF-8'}"
onclick="enableCriterion4MassSeo(this);"
style="height:50px"
>
<input type="checkbox" id="massSeoSearchCriterionPriceInput" name="criteria[{$criterions_group_indexed.id_criterion_group|intval}][]" value="{$criterions_group_indexed.id_criterion_group|intval}_{if isset($criterions_group_indexed.price_range.min_price)}{$criterions_group_indexed.price_range.min_price|floatval}~{$criterions_group_indexed.price_range.max_price|floatval}{/if}" onclick="enableCriterion4MassSeo($(this).parent('li'));" /> &nbsp;
{l s='Define price range:' mod='pm_advancedsearch4'}<br /><br />
<div id="PM_ASSeoPriceRange"></div>
<span id="PM_ASPriceRangeValue">
{$criterions_group_indexed.price_range.min_price|intval} - {$default_currency_sign_left|escape:'htmlall':'UTF-8'} {$criterions_group_indexed.price_range.max_price|intval} {$default_currency_sign_right|escape:'htmlall':'UTF-8'}
</span>
<select id="id_currency" name="id_currency" style="float:left;margin-left:10px;width:50px;{if sizeof($currencies) == 1}display:none;{/if}">
{foreach from=$currencies item=currency}
<option value="{$currency.id_currency|intval}"{if $default_currency_id == $currency.id_currency} selected="selected"{/if}>{$currency.sign|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
<script type="text/javascript">
$(document).on('change', '#id_currency', function() {
var id_currency = $(this).val();
$.ajax({
type : "GET",
url : "{$base_config_url|as4_nofilter}&pm_load_function=displaySeoPriceSlider&id_search={$criterions_group_indexed.id_search|intval}&id_criterion_group_linked={$criterions_group_indexed.id_criterion_group_linked|intval}&id_criterion_group={$criterions_group_indexed.id_criterion_group|intval}&id_currency=" + id_currency,
dataType : "script"
});
});
$("#PM_ASSeoPriceRange").slider({
range: true,
min: {$criterions_group_indexed.price_range.min_price|intval},
max: {$criterions_group_indexed.price_range.max_price|intval},
values: [ {$criterions_group_indexed.price_range.min_price|intval}, {$criterions_group_indexed.price_range.max_price|intval} ],
slide: function(event, ui) {
$("#PM_ASPriceRangeValue").html(ui.values[0] + " - " + "{$default_currency_sign_left|escape:'htmlall':'UTF-8'}" + ui.values[1] + "{$default_currency_sign_right|escape:'htmlall':'UTF-8'}");
$(".seoSearchCriterionPriceSortable").attr("id", "criterion_{$criterions_group_indexed.id_criterion_group|intval}_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionPriceSortable").attr("title", "{l s='From' mod='pm_advancedsearch4'} " + ui.values[0] + " {l s='to' mod='pm_advancedsearch4'} " + "{$default_currency_sign_left|escape:'htmlall':'UTF-8'}" + ui.values[1] + "{$default_currency_sign_right|escape:'htmlall':'UTF-8'}");
}
});
</script>
</li>
{* Slider group *}
{elseif $criterions_group_indexed.display_type == 5 || $criterions_group_indexed.display_type == 8}
<li
class="ui-state-default massSeoSearchCriterion seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}"
id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterions_group_indexed.range.min|floatval}~{$criterions_group_indexed.range.max|floatval}"
title="{l s='From' mod='pm_advancedsearch4'} {$criterions_group_indexed.range.min|intval} {l s='to' mod='pm_advancedsearch4'} {$criterions_group_indexed.range.max|intval} ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})"
onclick="enableCriterion4MassSeo(this);"
style="height:50px"
>
<input type="checkbox" id="massSeoSearchCriterionRangeInput{$criterions_group_indexed.id_criterion_group|intval}" name="criteria[{$criterions_group_indexed.id_criterion_group|intval}][]" value="{$criterions_group_indexed.id_criterion_group|intval}_{$criterions_group_indexed.id_criterion_group|intval}_{$criterions_group_indexed.range.min|floatval}~{$criterions_group_indexed.range.max|floatval}" onclick="enableCriterion4MassSeo($( this ).parent('li'));" /> &nbsp;
{l s='Define range:' mod='pm_advancedsearch4'}<br />
<div id="PM_ASSeoRange{$criterions_group_indexed.id_criterion_group|intval}" style="width:30%;margin-left:10px;float:left"></div>
<span id="PM_ASRangeValue{$criterions_group_indexed.id_criterion_group|intval}" style="width:35%;display:block;float:left;font-size:11px;margin-left:10px;">{$criterions_group_indexed.range.min|floatval} - {$criterions_group_indexed.range.max|floatval} ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})</span>
<script type="text/javascript">
$("#PM_ASSeoRange{$criterions_group_indexed.id_criterion_group|intval}").slider({
range: true,
min: {$criterions_group_indexed.range.min|intval},
max: {$criterions_group_indexed.range.max|intval},
values: [ {$criterions_group_indexed.range.min|floatval}, {$criterions_group_indexed.range.max|floatval} ],
slide: function(event, ui) {
$("#PM_ASRangeValue{$criterions_group_indexed.id_criterion_group|intval}" ).html(ui.values[0] + " - " + ui.values[1] + " ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})");
$("#massSeoSearchCriterionRangeInput{$criterions_group_indexed.id_criterion_group|intval}").val('{$criterions_group_indexed.id_criterion_group|intval}' + "_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}" ).attr("id", "criterion_{$criterions_group_indexed.id_criterion_group|intval}_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}" ).attr("title", "{l s='From' mod='pm_advancedsearch4'} " + ui.values[0] + " {l s='to' mod='pm_advancedsearch4'} " + ui.values[1] + " ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})");
}
});
</script>
</li>
{* Classic group *}
{else}
{foreach from=$criterions_group_indexed.criterions item=criterion}
<li class="ui-state-default massSeoSearchCriterion" id="criterion_{$criterion.id_criterion|as4_nofilter}" title="{$criterion.value|escape:'htmlall':'UTF-8'}" onclick="enableCriterion4MassSeo(this);">
<input type="checkbox" name="criteria[{$criterions_group_indexed.id_criterion_group|intval}][]" value="{$criterions_group_indexed.id_criterion_group|intval}_{$criterion.id_criterion|as4_nofilter}" onclick="enableCriterion4MassSeo($(this).parent('li'));" /> &nbsp;
{$criterion.value|escape:'htmlall':'UTF-8'}
</li>
{/foreach}
{/if}
</ul>
</div>
{/foreach}
</div>
<div id="seoMassSearchPanelCriteriaGroupsTabs">
<ul style="width:835px;min-height:50px;" class="ui-helper-reset ui-sortable">
{foreach from=$criterions_groups_indexed key=criterion_group_key item=criterions_group_indexed}
<li class="ui-state-default seoSearchCriterionSortable ui-state-disabled seoSearchCriterionGroupSortable" id="criterion_group_{$criterions_group_indexed.id_criterion_group|intval}" style="display:none;">
<a href="#seoSearchPanelCriteriaTabs-{$criterion_group_key|escape:'htmlall':'UTF-8'}">
{$criterions_group_indexed.name|escape:'htmlall':'UTF-8'}{if empty($criterions_group_indexed.visible)} {l s='(context)' mod='pm_advancedsearch4'}{/if}
</a>
</li>
{/foreach}
</ul>
</div>
<input type="hidden" name="id_search" id="id_search" value="{$id_search|intval}" />
<input type="hidden" name="criteria_groups" id="massSeoSearchCriterionGroupsInput" />
</div>
{include file='../../core/clear.tpl'}
<script type="text/javascript">
var msgMaxCriteriaForMass = {{l s='You can not select more than three groups of criteria' mod='pm_advancedsearch4'}|json_encode};
var msgNoSeoCriterion = {{l s='You must choose at least one criterion to use this option' mod='pm_advancedsearch4'}|json_encode};
{literal}
$(document).ready(function() {
$('select#id_currency').click(function(e) {
e.stopPropagation();
});
$("#seoSearchPanelCriteriaTabs").tabs({cache:false});
$("#seoMassSearchPanelCriteriaGroupsTabs ul").sortable({
items: "li:not(.ui-state-disabled)",
placeholder: "ui-state-highlight seoSearchCriterionSortable",
sort: function() {
$(this).removeClass("ui-state-default");
},
update: function(event, ui) {
massSeoSearchCriteriaGroupUpdate();
}
});
});
{/literal}
</script>
{as4_inputActive obj=false key_active='massSeoSearchCrossLinks' key_db='massSeoSearchCrossLinks' label={l s='Automatically add cross links between the generated pages' mod='pm_advancedsearch4'} defaultvalue=true}
{module->_displaySubmit text="{l s='Generate pages' mod='pm_advancedsearch4'}" name="submitMassSeoSearchForm"}
{include file='../../core/clear.tpl'}
{as4_endForm id="seoMassSearchForm"}
{else}
{module->_showInfo text="{l s='Before adding a new page, please add criteria groups to your search engine' mod='pm_advancedsearch4'}"}
{/if}

View File

@@ -0,0 +1,200 @@
{if $criterions_groups_indexed|is_array && $criterions_groups_indexed|sizeof}
{if !empty($currentSeo->id)}
{module->_displayTitle text="{l s='Edit results page' mod='pm_advancedsearch4'}"}
{else}
{module->_displayTitle text="{l s='Add results page' mod='pm_advancedsearch4'}"}
{/if}
{as4_startForm id="seoSearchForm" obj=$params.obj params=$params}
<div id="seoSearchPanelCriteriaTabs">
<ul>
{foreach from=$criterions_groups_indexed key=criterion_group_key item=criterions_group_indexed}
<li>
<a href="#seoSearchPanelCriteriaTabs-{$criterion_group_key|escape:'htmlall':'UTF-8'}">
{$criterions_group_indexed.name|escape:'htmlall':'UTF-8'}{if empty($criterions_group_indexed.visible)} {l s='(context)' mod='pm_advancedsearch4'}{/if}
</a>
</li>
{/foreach}
</ul>
{foreach from=$criterions_groups_indexed key=criterion_group_key item=criterions_group_indexed}
<div id="seoSearchPanelCriteriaTabs-{$criterion_group_key|escape:'htmlall':'UTF-8'}" class="seoSearchPanelCriteriaTabsContent">
<ul class="ui-helper-reset ui-sortable">
{* Range group *}
{if !empty($criterions_group_indexed.range) && $criterions_group_indexed.display_type != 5 && $criterions_group_indexed.display_type != 8}
{foreach from=$criterions_group_indexed.criterions item=criterion}
<li class="ui-state-default seoSearchCriterionSortable" id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterion.id_criterion|as4_nofilter}" title="{$criterion.value|escape:'htmlall':'UTF-8'}">
{$criterion.value|escape:'htmlall':'UTF-8'}
</li>
{/foreach}
{* Price group *}
{elseif $criterions_group_indexed.criterion_group_type == 'price'}
<li
class="ui-state-default seoSearchCriterionSortable seoSearchCriterionPriceSortable"
id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterions_group_indexed.price_range.min_price|floatval}~{$criterions_group_indexed.price_range.max_price|floatval}"
title="{l s='From' mod='pm_advancedsearch4'} {$criterions_group_indexed.price_range.min_price|intval} {l s='to' mod='pm_advancedsearch4'} {$default_currency_sign_left|escape:'htmlall':'UTF-8'} {$criterions_group_indexed.price_range.max_price|intval} {$default_currency_sign_right|escape:'htmlall':'UTF-8'}"
style="width:50%"
>
{l s='Define price range:' mod='pm_advancedsearch4'}<br />
<div id="PM_ASSeoPriceRange"></div>
<span id="PM_ASPriceRangeValue">
{$criterions_group_indexed.price_range.min_price|intval} - {$default_currency_sign_left|escape:'htmlall':'UTF-8'} {$criterions_group_indexed.price_range.max_price|intval} {$default_currency_sign_right|escape:'htmlall':'UTF-8'}
</span>
<select id="id_currency" name="id_currency" style="float:left;margin-left:10px;width:50px;">
{foreach from=$currencies item=currency}
<option value="{$currency.id_currency|intval}"{if $default_currency_id == $currency.id_currency} selected="selected"{/if}>{$currency.sign|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
<script type="text/javascript">
$(document).on('change', '#id_currency', function() {
var id_currency = $(this).val();
$.ajax({
type : "GET",
url : "{$base_config_url|as4_nofilter}&pm_load_function=displaySeoPriceSlider&id_search={$criterions_group_indexed.id_search|intval}&id_criterion_group_linked={$criterions_group_indexed.id_criterion_group_linked|intval}&id_criterion_group={$criterions_group_indexed.id_criterion_group|intval}&id_currency=" + id_currency,
dataType : "script"
});
});
$("#PM_ASSeoPriceRange").slider({
range: true,
min: {$criterions_group_indexed.price_range.min_price|intval},
max: {$criterions_group_indexed.price_range.max_price|intval},
values: [ {$criterions_group_indexed.price_range.min_price|intval}, {$criterions_group_indexed.price_range.max_price|intval} ],
slide: function(event, ui) {
$("#PM_ASPriceRangeValue").html(ui.values[0] + " - " + "{$default_currency_sign_left|escape:'htmlall':'UTF-8'}" + ui.values[1] + "{$default_currency_sign_right|escape:'htmlall':'UTF-8'}");
$(".seoSearchCriterionPriceSortable").attr("id", "criterion_{$criterions_group_indexed.id_criterion_group|intval}_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionPriceSortable").attr("title", "{l s='From' mod='pm_advancedsearch4'} " + ui.values[0] + " {l s='to' mod='pm_advancedsearch4'} " + "{$default_currency_sign_left|escape:'htmlall':'UTF-8'}" + ui.values[1] + "{$default_currency_sign_right|escape:'htmlall':'UTF-8'}");
}
});
</script>
</li>
{* Slider group *}
{elseif $criterions_group_indexed.display_type == 5 || $criterions_group_indexed.display_type == 8}
<li
class="ui-state-default seoSearchCriterionSortable seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}"
id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterions_group_indexed.range.min|floatval}~{$criterions_group_indexed.range.max|floatval}"
title="{l s='From' mod='pm_advancedsearch4'} {$criterions_group_indexed.range.min|intval} {l s='to' mod='pm_advancedsearch4'} {$criterions_group_indexed.range.max|intval} ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})"
style="width:50%"
>
{l s='Define range:' mod='pm_advancedsearch4'}<br />
<div id="PM_ASSeoRange{$criterions_group_indexed.id_criterion_group|intval}" style="width:30%;margin-left:10px;float:left"></div>
<span id="PM_ASRangeValue{$criterions_group_indexed.id_criterion_group|intval}" style="width:35%;display:block;float:left;font-size:11px;margin-left:10px;">{$criterions_group_indexed.range.min|floatval} - {$criterions_group_indexed.range.max|floatval} ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})</span>
<script type="text/javascript">
$("#PM_ASSeoRange{$criterions_group_indexed.id_criterion_group|intval}").slider({
range: true,
min: {$criterions_group_indexed.range.min|intval},
max: {$criterions_group_indexed.range.max|intval},
values: [ {$criterions_group_indexed.range.min|floatval}, {$criterions_group_indexed.range.max|floatval} ],
slide: function(event, ui) {
$("#PM_ASRangeValue{$criterions_group_indexed.id_criterion_group|intval}").html(ui.values[0] + " - " + ui.values[1] + " ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})");
$(".seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}" ).attr("id", "criterion_{$criterions_group_indexed.id_criterion_group|intval}_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionRangeSortable{$criterions_group_indexed.id_criterion_group|intval}" ).attr("title", "{l s='From' mod='pm_advancedsearch4'} " + ui.values[0] + " {l s='to' mod='pm_advancedsearch4'} " + ui.values[1] + " ({$criterions_group_indexed.range_sign|escape:'htmlall':'UTF-8'})");
}
});
</script>
</li>
{* Classic group *}
{else}
{foreach from=$criterions_group_indexed.criterions item=criterion}
<li class="ui-state-default seoSearchCriterionSortable" id="criterion_{$criterions_group_indexed.id_criterion_group|intval}_{$criterion.id_criterion|as4_nofilter}" title="{$criterion.value|escape:'htmlall':'UTF-8'}">
{$criterion.value|escape:'htmlall':'UTF-8'}
</li>
{/foreach}
{/if}
</ul>
</div>
{/foreach}
</div>
{module->_showInfo text="{l s='Add the criteria of your choice using drag & drop to generate predefined searches.' mod='pm_advancedsearch4'}<br /><br />{l s='You can sort them and automaticaly generate friendly title, meta and URL.' mod='pm_advancedsearch4'}"}
<div id="nbProductsCombinationSeoSearchForm"></div>
<div id="seoSearchPanelCriteriaSelected">
<div class="ui-widget-content" style="padding:10px;">
<ul style="width:835px;float:left;min-height:50px;" class="ui-helper-reset ui-sortable">
{if $criteria|is_array && $criteria|sizeof}
{foreach from=$criteria item=criterion}
<li class="ui-state-default seoSearchCriterionSortable" id="biscriterion_{$criterion|as4_nofilter}" rel="criterion_{$criterion|as4_nofilter}">
<span class="ui-icon ui-icon-close" style="float: left; margin-right: .3em;cursor:pointer;" onclick="removeSelectedSeoCriterion(this);"></span> {$criteria_values[$criterion]|escape:'htmlall':'UTF-8'}
<script type="text/javascript">
$('[id="criterion_{$criterion|as4_nofilter}"]').hide();
</script>
</li>
{/foreach}
{else}
<li class="placeholder">{l s='Drop your criteria here' mod='pm_advancedsearch4'}</li>
{/if}
</ul>
{include file='../../core/clear.tpl'}
</div>
</div>
<script type="text/javascript">
var msgNoSeoCriterion = {{l s='You must choose at least one criteria to use this option' mod='pm_advancedsearch4'}|json_encode};
$(document).ready(function() {
$("#seoSearchPanelCriteriaTabs").tabs({ cache:false });
$(".seoSearchPanelCriteriaTabsContent li").draggable({
appendTo: "body",
helper: "clone"
});
$("#seoSearchPanelCriteriaSelected ul").droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
accept: ":not(.ui-sortable-helper)",
drop: function( event, ui) {
$(this).find(".placeholder").remove();
if (ui.draggable.hasClass("seoSearchCriterionPriceSortable")) {
$('<li class="ui-state-default seoSearchCriterionSortable" id="bis' + ui.draggable.attr("id") + '" rel="' + ui.draggable.attr("id") + '"></li>').html('<span class="ui-icon ui-icon-close" style="float: left; margin-right: .3em;cursor:pointer;" onclick="removeSelectedSeoCriterion(this);"></span> ' + ui.draggable.attr("title")).appendTo(this);
} else {
$('<li class="ui-state-default seoSearchCriterionSortable" id="bis' + ui.draggable.attr("id") + '" rel="' + ui.draggable.attr("id") + '"></li>').html('<span class="ui-icon ui-icon-close" style="float: left; margin-right: .3em;cursor:pointer;" onclick="removeSelectedSeoCriterion(this);"></span> ' + ui.draggable.attr("title")).appendTo(this);
}
ui.draggable.fadeOut("fast");
seoSearchCriteriaUpdate();
}
}).sortable({
items: "li:not(.placeholder)",
placeholder: "ui-state-highlight seoSearchCriterionSortable",
sort: function() {
$(this).removeClass("ui-state-default");
},
update: function(event, ui) {
seoSearchCriteriaUpdate();
}
});
seoSearchCriteriaUpdate();
});
</script>
{as4_button text={l s='Generate title, meta and URL' mod='pm_advancedsearch4'} onclick='fillSeoFields();' icon_class='ui-icon ui-icon-refresh'}
<br /><br />
{include file='../../core/clear.tpl'}
{as4_inputTextLang obj=$params.obj key='meta_title' label={l s='Meta title' mod='pm_advancedsearch4'} size='350px'}
{as4_inputTextLang obj=$params.obj key='meta_description' label={l s='Meta description' mod='pm_advancedsearch4'} size='350px'}
{as4_inputTextLang obj=$params.obj key='meta_keywords' label={l s='Meta keywords' mod='pm_advancedsearch4'} size='350px'}
{as4_inputTextLang obj=$params.obj key='title' label={l s='Title (H1)' mod='pm_advancedsearch4'} size='350px'}
{as4_inputTextLang obj=$params.obj key='seo_url' label={l s='Friendly URL' mod='pm_advancedsearch4'} size='350px' onkeyup='ASStr2url(this);' onchange='ASStr2url(this);'}
{as4_richTextareaLang obj=$params.obj key='description' label={l s='Description (visible on the top of the page)' mod='pm_advancedsearch4'}}
{as4_ajaxSelectMultiple selectedoptions=$cross_links_selected key='cross_links' label={l s='Results pages to link to this page (cross-linking)' mod='pm_advancedsearch4'} remoteurl="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoSearchOptions&id_seo_origin={$params.obj->id}"}
<input type="hidden" name="criteria" id="seoSearchCriteriaInput" />
<input type="hidden" name="id_search" id="id_search" value="{$id_search|intval}" />
{if !empty($currentSeo->id)}
<input type="hidden" name="id_seo" value="{$currentSeo->id|intval}" />
<input type="hidden" name="id_currency" id="posted_id_currency" value="{$currentSeo->id_currency|intval}" />
<script type="text/javascript">
var id_currency = {$currentSeo->id_currency|json_encode};
</script>
{else}
<input type="hidden" name="id_currency" id="posted_id_currency" />
{/if}
<br class="clear" /><br />
<center>
<p class="ui-state-error ui-corner-all" id="errorCombinationSeoSearchForm" style="display:none;padding:10px;">
<strong>{l s='Your criteria combination led to no result, please reorder them before submiting' mod='pm_advancedsearch4'}</strong>
</p>
</center>
{module->_displaySubmit text="{l s='Save' mod='pm_advancedsearch4'}" name="submitSeoSearchForm"}
{as4_endForm id="seoSearchForm"}
{else}
{module->_showInfo text="{l s='Before adding a new page, please add criteria groups to your search engine'}"}
{/if}

View File

@@ -0,0 +1,15 @@
$("#PM_ASSeoPriceRange").slider({
range: true,
min: {$price_range.min_price|intval},
max: {$price_range.max_price|intval},
values: [ {$price_range.min_price|intval}, {$price_range.max_price|intval} ],
slide: function(event, ui) {
$("#PM_ASPriceRangeValue").html(ui.values[0] + "{$currency->getSign('right')|escape:'htmlall':'UTF-8'}" + " - " + ui.values[1] + "{$currency->getSign('right')|escape:'htmlall':'UTF-8'}");
$(".seoSearchCriterionPriceSortable").attr("id", "criterion_{$id_criterion_group|intval}_" + ui.values[0] + "~" + ui.values[1]);
$(".seoSearchCriterionPriceSortable").attr("title", "{l s='From' mod='pm_advancedsearch4'} " + ui.values[0] + "{$currency->getSign('right')|escape:'htmlall':'UTF-8'}" + " {l s='to' mod='pm_advancedsearch4'} " + ui.values[1] + "{$currency->getSign('right')|escape:'htmlall':'UTF-8'}");
}
});
$("#PM_ASPriceRangeValue").html("{displayPrice price=$price_range.min_price|intval currency=$currency} - {displayPrice price=$price_range.max_price|intval currency=$currency}");
$(".seoSearchCriterionPriceSortable").attr("id", "criterion_{$id_criterion_group|intval}_{$price_range.min_price|intval}~{$price_range.max_price|intval}");
$(".seoSearchCriterionPriceSortable").attr("title", "{l s='From' mod='pm_advancedsearch4'} {displayPrice price=$price_range.min_price|intval currency=$currency} {l s='to' mod='pm_advancedsearch4'} {displayPrice price=$price_range.max_price|intval currency=$currency}");
var id_currency = {$currency->id|json_encode};

View File

@@ -0,0 +1,25 @@
{as4_startForm id="seoRegenerateForm"}
{module->_displayTitle text="{l s='Regenerate SEO metas' mod='pm_advancedsearch4'}"}
{module->_showInfo text="{l s='Select the type of data you want to regenerate, then click on “Regenerate“ button' mod='pm_advancedsearch4'}"}
<input type="hidden" name="id_search" id="id_search" value="{$id_search|intval}" />
<div id="buttonSetSeoRegenerate">
<input type="checkbox" name="fields_to_regenerate[]" id="check1" value="meta_title" /> <label for="check1">{l s='Meta title' mod='pm_advancedsearch4'}</label>
<input type="checkbox" name="fields_to_regenerate[]" id="check2" value="meta_description" /> <label for="check2">{l s='Meta description' mod='pm_advancedsearch4'}</label>
<input type="checkbox" name="fields_to_regenerate[]" id="check3" value="meta_keywords" /> <label for="check3">{l s='Meta keywords' mod='pm_advancedsearch4'}</label>
<input type="checkbox" name="fields_to_regenerate[]" id="check4" value="title" /> <label for="check4">{l s='Title (H1)' mod='pm_advancedsearch4'}</label>
<input type="checkbox" name="fields_to_regenerate[]" id="check5" value="seo_url" /> <label for="check5">{l s='Friendly URL' mod='pm_advancedsearch4'}</label>
</div>
{include file='../../core/clear.tpl'}
<br />
{module->_displaySubmit text="{l s='Regenerate' mod='pm_advancedsearch4'}" name="submitSeoRegenerate"}
<script type="text/javascript">
$(document).ready(function(){
$("#buttonSetSeoRegenerate").buttonset();
});
</script>
{as4_startForm id="seoRegenerateForm"}

View File

@@ -0,0 +1,98 @@
{module->_displayTitle text="{l s='Predefined results page (SEO)' mod='pm_advancedsearch4'}"}
{if !empty($rewrite_settings)}
{if !empty($seo_searchs) && $seo_searchs|is_array && $seo_searchs|sizeof}
<div class="seoGsiteMapUrl">
{module->_showInfo text="{l s='The Advanced Search sitemap is located at:' mod='pm_advancedsearch4'} <a target=\"_blank\" href=\"{$sitemap_url}\">{$sitemap_url}</a>"}
</div>
{/if}
{as4_button text={l s='Add a new results page' mod='pm_advancedsearch4'} href="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoSearchForm&class=AdvancedSearchSeoClass&pm_js_callback=closeDialogIframe&id_search={$id_search|intval}" class='open_on_dialog_iframe' rel='980_530_1' icon_class='ui-icon ui-icon-plusthick'}
{as4_button text={l s='Massive add of results pages' mod='pm_advancedsearch4'} href="{$base_config_url|as4_nofilter}&pm_load_function=displayMassSeoSearchForm&pm_js_callback=closeDialogIframe&id_search={$id_search|intval}" class='open_on_dialog_iframe' rel='980_530_1' icon_class='ui-icon ui-icon-plusthick'}
{if !empty($seo_searchs) && $seo_searchs|is_array && $seo_searchs|sizeof}
<hr class="clear" />
{as4_button text={l s='Remove empty results pages' mod='pm_advancedsearch4'} href="{$base_config_url|as4_nofilter}&pm_load_function=processRemoveEmptySeo&id_search={$id_search|intval}" class='ajax_script_load' icon_class='ui-icon ui-icon-trash'}
{as4_button text={l s='Regenerate SEO meta data' mod='pm_advancedsearch4'} href="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoRegenerateForm&id_search={$id_search|intval}" class='open_on_dialog_iframe' rel='700_300' icon_class='ui-icon ui-icon-refresh'}
{as4_button text={l s='List all URLs' mod='pm_advancedsearch4'} href="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoUrlList&id_search={$id_search|intval}" class='open_on_dialog_iframe' rel='980_530_1' icon_class='ui-icon ui-icon-link'}
<table cellspacing="0" cellpadding="0" id="dataTable{$id_search|intval}" style="width:100%;">
<thead>
<tr>
<th width="10"></th>
<th width="50">{l s='Id' mod='pm_advancedsearch4'}</th>
<th style="width:auto">{l s='Title' mod='pm_advancedsearch4'}</th>
<th style="text-align:center;">{l s='Num. products' mod='pm_advancedsearch4'}</th>
<th style="text-align:center;">{l s='Edit' mod='pm_advancedsearch4'}</th>
<th style="text-align:center;">{l s='URL' mod='pm_advancedsearch4'}</th>
<th style="text-align:center;">{l s='Delete' mod='pm_advancedsearch4'}</th>
</tr>
</thead>
<tbody>
{foreach from=$seo_searchs item=seo_search}
<tr>
<td><input type="checkbox" name="seo_group_action[]" value="{$seo_search.id_seo|intval}" /></td>
<td>{$seo_search.id_seo|intval}</td>
<td>{$seo_search.title|escape:'htmlall':'UTF-8'}</td>
<td style="text-align:center;">
<strong{if empty($seo_search.total_products)} style="color: #cc0000"{/if}>{$seo_search.total_products|intval}</strong>
</td>
<td style="text-align:center;">
{as4_button text='' href="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoSearchForm&class=AdvancedSearchSeoClass&pm_js_callback=closeDialogIframe&id_search={$id_search|intval}&id_seo={$seo_search.id_seo|intval}" class='open_on_dialog_iframe' rel='980_530_1' icon_class='ui-icon ui-icon-pencil'}
</td>
<td style="text-align:center;">
{as4_button text='' href="{$base_config_url|as4_nofilter}&pm_load_function=displaySeoUrl&id_search={$id_search|intval}&id_seo={$seo_search.id_seo|intval}" class='open_on_dialog_iframe' rel='980_530_1' icon_class='ui-icon ui-icon-link'}
</td>
<td style="text-align:center;">
{as4_button text='' href="{$base_config_url|as4_nofilter}&pm_load_function=processDeleteSeoSearch&id_search={$id_search|intval}&id_seo={$seo_search.id_seo|intval}" class='ajax_script_load pm_confirm' title={l s='Delete item #%d ?' mod='pm_advancedsearch4' sprintf=$seo_search.id_seo} icon_class='ui-icon ui-icon-trash'}
</td>
</tr>
{/foreach}
</tbody>
</table>
<br />
{as4_button text={l s='Check/uncheck all' mod='pm_advancedsearch4'} onclick="checkAllSeoItems({$id_search|intval});" icon_class='ui-icon ui-icon-check'}
{as4_button text={l s='Delete selected items' mod='pm_advancedsearch4'} onclick="deleteSeoItems({$id_search|intval});" icon_class='ui-icon ui-icon-trash'}
<script type="text/javascript">
$(document).ready(function() {
loadAjaxLink();
var oTable = $('#dataTable{$id_search|intval}').dataTable({
"sDom": 'R<"H"lfr>t<"F"ip<',
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"oLanguage": {
"sLengthMenu": {{l s='Display _MENU_ records per page' mod='pm_advancedsearch4'}|json_encode},
"sZeroRecords": {{l s='Nothing found - sorry' mod='pm_advancedsearch4'}|json_encode},
"sInfo": {{l s='Showing _START_ to _END_ of _TOTAL_ records' mod='pm_advancedsearch4'}|json_encode},
"sInfoEmpty": {{l s='Showing 0 to 0 of 0 records' mod='pm_advancedsearch4'}|json_encode},
"sInfoFiltered": {{l s='(filtered from _MAX_ total records)' mod='pm_advancedsearch4'}|json_encode},
"sPageNext": {{l s='Next' mod='pm_advancedsearch4'}|json_encode},
"sPagePrevious": {{l s='Previous' mod='pm_advancedsearch4'}|json_encode},
"sPageLast": {{l s='Last' mod='pm_advancedsearch4'}|json_encode},
"sPageFirst": {{l s='First' mod='pm_advancedsearch4'}|json_encode},
"sSearch": {{l s='Search' mod='pm_advancedsearch4'}|json_encode},
"sFirst": {{l s='First' mod='pm_advancedsearch4'}|json_encode},
"sPrevious": {{l s='Previous' mod='pm_advancedsearch4'}|json_encode},
"sNext": {{l s='Next' mod='pm_advancedsearch4'}|json_encode},
"sLast": {{l s='Last' mod='pm_advancedsearch4'}|json_encode}
}
});
$(document).on("click", '#dataTable{$id_search|intval} tbody input[type="checkbox"]', function(e) {
e.stopPropagation();
e.stopImmediatePropagation();
});
$(document).on("click", '#dataTable{$id_search|intval} tr td:gt(0)', function(e) {
if ($(this).parent("tr").children("td:first-child").find("input:checked").size() > 0) {
$(this).parent("tr").children("td:first-child").find("input").prop('checked', false);
} else {
$(this).parent("tr").children("td:first-child").find("input").prop('checked', true);
}
});
});
</script>
{/if}
{else}
{module->_showInfo text="{l s='Please enable Friendly URL in order to use this feature' mod='pm_advancedsearch4'}"}
{/if}

View File

@@ -0,0 +1,18 @@
{as4_startForm id="SEOpages"}
{module->_displayTitle text="{l s='URL' mod='pm_advancedsearch4'}"}
{module->_showInfo text="{l s='Use this URL in your slideshows, menus and others. One link per language is available.' mod='pm_advancedsearch4'}"}
<div class="margin-form" style="padding-left:100px;">
{foreach from=$seo_url_by_lang key=id_lang item=seo_url}
<div id="langseo_url_{$id_lang|intval}" class="pmFlag pmFlagLang_{$id_lang|intval}" style="display: {if $id_lang == $default_language}block{else}none{/if}; float: left;">
<input size="130" type="text" name="seo_url_{$id_lang|intval}" onfocus="this.select();" value="{$seo_url|escape:'htmlall':'UTF-8'}" />
</div>
{/foreach}
{$pm_flags|as4_nofilter}
{include file='../../core/clear.tpl'}
</div>
{as4_endForm id="SEOpages"}

View File

@@ -0,0 +1,35 @@
{module->_displayTitle text="{l s='URL list' mod='pm_advancedsearch4'}"}
{if $seo_url_list|is_array && $seo_url_list|sizeof}
{as4_startForm id="SEOURLListForm"}
{module->_showInfo text="{l s='You will find here the list of all the predefined results pages URLs you have created for this search engine. You can use them in your menu, slideshow, footer, blocks, or anywhere you want in your website for Google crawling' mod='pm_advancedsearch4'}"}
<p>{l s='Please select the language:' mod='pm_advancedsearch4'}</p>
{$pm_flags|as4_nofilter}
{include file='../../core/clear.tpl'}
{foreach from=$seo_url_list key=id_lang item=seo_urls}
<div id="langseo_url_{$id_lang|intval}" class="pmFlag pmFlagLang_{$id_lang|intval}" style="display: {if $id_lang == $default_language}block{else}none{/if};">
<h3>{l s='HTML version:' mod='pm_advancedsearch4'}</h3>
{strip}
<textarea rows="10" style="width:100%">
{"<ul>\n"|escape:'htmlall':'UTF-8'}
{foreach from=$seo_urls item=seo_url}
{"\t<li><a"|escape:'htmlall':'UTF-8'} href="{$seo_url.url|as4_nofilter}" title="{$seo_url.title|escape:'htmlall':'UTF-8'}"{">"|escape:'htmlall':'UTF-8'}{$seo_url.title|escape:'htmlall':'UTF-8'}{"</a></li>\n"|escape:'htmlall':'UTF-8'}
{/foreach}
{"</ul>"|escape:'htmlall':'UTF-8'}
</textarea>
{/strip}
<h3>{l s='CSV version:' mod='pm_advancedsearch4'}</h3>
{strip}
<textarea rows="10" style="width:100%">
{foreach from=$seo_urls item=seo_url}"{$seo_url.title|as4_nofilter}";"{$seo_url.url|as4_nofilter}"{"\n"}{/foreach}
</textarea>
{/strip}
</div>
{/foreach}
{as4_startForm id="SEOURLListForm"}
{else}
{module->_showInfo text="{l s='No URL yet' mod='pm_advancedsearch4'}"}
{/if}