Clear Cart Button


english 6208

Clear Cart Button

This post adds the “Empty Shopping Cart” button to the shopping cart, which allows you to remove all items from the shopping cart straight away.

Find in: cataog/includes/application_top.php

  }

// include the who's online functions
  require('includes/functions/whos_online.php');
  tep_update_whos_online();

add before

      case 'clear_cart' :     $cart->reset(true);
                              break;

Or in FROSEN Version:

    switch ($_GET['action']) {

// BOL Clear shopping_cart total
      case 'clear_cart' :     
      $cart->reset(true);
      break;
}
// EOL Clear shopping_cart total

Find in: catalog/shopping_cart.php

  <div class="buttonSet">
    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fa fa-angle-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?></div>
  </div>

Note the

tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success');

section, there are versions that are hardcoded and do not support the file variables.

These must be done by directly buying the file

tep_href_link('checkout_shipping.php', '', 'SSL'), 'primary', NULL, 'btn-success');

Change to:

  <div class="buttonSet row">
    <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_CLEAR_CART, 'fa fa-trash', tep_href_link(FILENAME_SHOPPING_CART, 'action=clear_cart', 'NOSSL'), 'secondary', array('params' => 'onclick="return confirm('' . CLEAR_CART . '');"')); ?></div>
    <div class="col-xs-6 text-right"><?php echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'fa fa-angle-right', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary', NULL, 'btn-success'); ?></div>
  </div>

Add in the language file: catalog/includes/languages/english.php

define('IMAGE_BUTTON_CLEAR_CART', 'Clear Cart');
define('CLEAR_CART',' To empty stand of purchases? ');

There are currently no product reviews.
Why your email address?
If necessary, I will contact you to help you with the implementation.
Your email address will not be made public.
Is this post helpful to you?
Information(1)
General information
 Free advertising
Post counter
Current information status:
Categories: 9
Posts: 104
Support pages: 57
Downloads for members: 104
Download counter: 646
Reviews total73
Companies: 34
Support: 32
Information: 7