There is some way to add a parameter to a url I found myself with this script but I still can not understand it
HTML
<select class="form-control js-sort-by" name="sort_by">
<option value="price-ascending">Precio: Menor a Mayor</option>
<option value="price-descending">Precio: Mayor a Menor</option>
<option value="alpha-ascending">A - Z</option>
<option value="alpha-descending">Z - A</option>
<option value="created-descending">Más Nuevo al más Viejo</option>
<option value="created-ascending">Más Viejo al más Nuevo</option>
<option value="best-selling" selected="">Más Vendidos</option>
<input type="submit" value="">
</select>
<script>
$('.js-sort-by').change(function(){
var params = LS.urlParams;
params['sort_by'] = $(this).val();
var sort_params_array = [];
for (var key in params) {
if ($.inArray(key, ['results_only', 'page']) == -1) {
sort_params_array.push(key + '=' + params[key]);
}
}
var sort_params = sort_params_array.join('&');
window.location = window.location.pathname + '?' + sort_params;
});
</script>
my idea would be to change the option that the parameter is added sort_by
midominio.com/categor/?sort_by=created-ascending