Jump to content
valquiria23

Clear Cart Button In Shopping Cart BS

Recommended Posts

Dear @PiLLaO

I am testing your addon Clear Cart Button In Shopping Cart (https://apps.oscommerce.com/hTxnj)

in OsCommerce version 2.3.4.1 BS Edge
But I get the following error:

Error!

Unable to determine connection method on a link!

Known methods: NONSSL SSL

The installation instructions are:

2. You need to add two lines of code into /includes/application_top.php

Around line #418 Find:
---------------------

      case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                  .
                  .
                  .
                              break;

Right after it add these lines:
------------------------------

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

3. Add this line to /shopping_cart.php
======================================

Around line #136 Find:
---------------------

  <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>

Right before it add this line:
-----------------------------

  <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>

4. Add this line to /includes/languages/english.php
===================================================

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

But I get the following error:


Any idea that would be wrong? Maybe this addon needs to be updated?

Saludos

Valqui

 


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Share this post


Link to post
Share on other sites

in this line is a typo error:

<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'),

it should be "NONSSL" instead of "NOSSL"

Share this post


Link to post
Share on other sites

Hola  @PiLLaO

Muy bueno este addon.

Te agradezco si podes actualizarlo en el market ya que el punto 3 de la instalación esta incorrecto.

Con estas instrucciones se obtienen 2 botones de añadir a la cesta.

Las instrucciones del punto 3 deberían ser así :

3. Add this line to /shopping_cart.php
======================================

Around line #136 Find:
---------------------

  <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>

Right before it add this line:
-----------------------------

  <div class="buttonSet row">
    <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_CLEAR_CART, 'fa fa-trash', tep_href_link('shopping_cart.php', 'action=clear_cart', 'NONSSL'), 'secondary', array('params' => 'onclick="return confirm(\'' . CLEAR_CART . '\');"')); ?></div>

  </div>

Saludos

Valqui

 


:heart: Community Oscommerce fan :heart: You'll find the latest osC community version here.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×