Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

302
Visualizações
Prestashop - Display a warning when there's product customization field in order

Is there any easy way to show a warning in the orders admin panel whenever client enters something into a non-required customization field? We've had a functionality like that through an (admittedly convoluted and no longer necessary) product designer module and it looked like this, but we've got rid of it and now when reinstalling the module it doesn't seem to work again - obviously even if it did that would not be ideal.

The code i found in that module:

js

        if ($('#table-order').length && $('#table-order tbody').length
            && typeof tshirtecommerce_orders_url != 'undefined' && tshirtecommerce_orders_url != '') {
            var orders = [];
            $('#table-order tbody tr').each(function() {
                var id_order = $(this).find('input[name="orderBox[]"]').val();
                orders.push(id_order);
            });

            if (orders.length > 0) {
                $.ajax({
                    type: 'post',
                    url: tshirtecommerce_orders_url,
                    data: {'orders': orders},
                    cache: false,
                    dataType: 'json',
                }).done(function (jsons) {
                    $('#table-order tbody tr').each(function() {
                        var id_order = parseInt($(this).find('input[name="orderBox[]"]').val());
                        console.log(jsons[id_order]);
                        if (typeof jsons[id_order] != 'undefined' && parseInt(jsons[id_order]) > 0 && typeof tshirtecommerce_customization_product != 'undefined') {
                            $(this).children().eq(2).append('<br/><span class="tse_customization_text">'+tshirtecommerce_customization_product+'</span>');
                        }
                    });
                });
            }
        }
    }

css

    background-color:#4CAF50;
    display: inline-block;
    color: #fff;
    border-radius: .25em;
    padding: 0 2px;
}

However I'm entirely unsure how to port that functionality.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda