Skip to main content
added 14 characters in body
Source Link
Dhaval Vaghela
  • 1.1k
  • 16
  • 35

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/formYou have to override form.phtml" file in your theme directory and addphtml file

app/design/frontend/vendorname/themename/Magento_Checkout/templates/cart/form.phtml

Add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you want to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml" file in your theme directory and add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you want to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>

You have to override form.phtml file

app/design/frontend/vendorname/themename/Magento_Checkout/templates/cart/form.phtml

Add below code at last

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you want to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>
Post Undeleted by Dhaval Vaghela
deleted 24 characters in body
Source Link
Dhaval Vaghela
  • 1.1k
  • 16
  • 35

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/item/renderer/actions/removeform.phtml" file in your theme directory and add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you wnatwant to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/item/renderer/actions/remove.phtml" file in your theme directory and add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you wnat to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml" file in your theme directory and add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you want to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>
Post Deleted by Dhaval Vaghela
Source Link
Dhaval Vaghela
  • 1.1k
  • 16
  • 35

Please copy "vendor/magento/module-checkout/view/frontend/templates/cart/item/renderer/actions/remove.phtml" file in your theme directory and add below code at last.

<script>
require(['jquery', 'jquery/ui'], function($){ 
        jQuery('.action-delete').click(function(e)
    {
        if(confirm('Do you wnat to remove this product?'))
        {
            return true;
        }
        else
        {
            return false; 
        }
        
    });
 });
</script>