Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Missing "Remove" button in the Cart Contents


7 replies to this topic

#1 kkuderko

  • Community Member
  • 4 posts
  • Real Name:Kristof
  • Gender:Male
  • Location:London, UK

Posted 06 December 2010, 14:47

To display "Remove" button next to "Update" button instead of a link, in catalog/shopping_cart.php replace:

      $products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . '&nbsp;&nbsp;&nbsp;or <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product') . '">remove</a>';

with:

      $products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . '&nbsp;&nbsp;or&nbsp;&nbsp;' . tep_draw_button(IMAGE_BUTTON_REMOVE, 'close', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'));


#2 wayne miller

  • Community Member
  • 35 posts
  • Real Name:Wayne Miller

Posted 03 September 2011, 16:41

I have tried this and I do get a button however the button has 'IMAGE_BUTTON_REMOVE' written on it.
How do I define the actual remove button image

#3 germ

  • Community Member
  • 13,586 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 03 September 2011, 20:07

Add to /catalog/includes/languages/english.php

define('IMAGE_BUTTON_REMOVE', 'Remove');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#4 wayne miller

  • Community Member
  • 35 posts
  • Real Name:Wayne Miller

Posted 04 September 2011, 22:43

View Postgerm, on 03 September 2011, 20:07, said:

Add to /catalog/includes/languages/english.php

define('IMAGE_BUTTON_REMOVE', 'Remove');

Thank you , it worked a treat [img]http://forums.oscommerce.com//public/style_emoticons/default/thumbsup.gif[/img]

#5 DmitryZkrz

  • Community Member
  • 2 posts

Posted 21 September 2011, 10:09

Thank you, works fine.

#6 ianhaney

  • Community Member
  • 445 posts
  • Real Name:Ian Haney
  • Gender:Male

Posted 22 October 2011, 09:21

Hi I have done the same above by doing the following steps

in catalog/shopping_cart.php

replace:


$products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . ' or <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product') . '">Remove</a>';


with:
$products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . ' or ' . tep_draw_button(IMAGE_BUTTON_REMOVE, 'close', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'))

Add to /catalog/includes/languages/english.php


define('IMAGE_BUTTON_REMOVE', 'Remove');

but for some reason my remove buttons still shows the following

'IMAGE_BUTTON_REMOVE'

Can someone help me please

Thank you

Ian

#7 sedemik

  • Community Member
  • 30 posts
  • Real Name:Mikko
  • Gender:Male

Posted 11 November 2011, 11:18

View Postianhaney, on 22 October 2011, 09:21, said:


$products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . ' or ' . tep_draw_button(IMAGE_BUTTON_REMOVE, 'close', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'))


Try:
$products_name .= '<br /><br />' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . ' ' . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . ' or ' . tep_draw_button(IMAGE_BUTTON_DELETE, 'trash', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'));

1. IMAGE_BUTTON_REMOVE should be IMAGE_BUTTON_DELETE
2. 'remove' should be 'trash'

Edited by sedemik, 11 November 2011, 11:18.


#8 arivee

  • Community Member
  • 63 posts
  • Real Name:Ari

Posted 15 December 2011, 23:31

thanks KKuderko and Germ

Ari