Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
Magneto add to cart success message

the problem is client wants to fadeout the success message after few seconds by clicking add to cart button. I have made a change in addCartSuccessMessage.phtml file like this:

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var \Magento\Framework\View\Element\Template $block */
?>

<?= $block->escapeHtml(__(
    'You added %1 to your <a href="%2">shopping cart</a>.',
    $block->getData('product_name'),
    $block->getData('cart_url')
), ['a']);

?>
<script type="text/javascript">

    require(['jquery'], function($){
        $(".message.success").fadeOut(7000);

    });
</script>

Now the problem is if i open up the site on mobile the notification shows up only one time and after that no matter how many times i click on add to cart button success message wont show up it shows up again only if i refresh the page

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda