Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 11-19-2003 15:42:17

sgreiner
Member
Registered: 07-26-2003
Posts: 78

Delete Icon In Shopping Cart

In addition to having the Quantity field in the cart which allows you to modify how many items you would like of each product, I would also like to have an icon (garbage can) which, when a customer clicks on it, it will delete that specific item.


(1) Create a new routine in ./cgi-bin/library/modules/ste_cart.pl named 'ste_cart_delete_proc' by adding the following code to the TOP of the file:

Code:

#######################################################################
# Ste Cart Delete Proc                                                #
#######################################################################

sub ste_cart_delete_proc {

&initialize_sub_add('ste_cart_delete_proc');

if ($fd_ref ne "") {

$calc_cart_id = "$fd_ref";
$calc_cart_id =~ s/^C\-//gs;
$dbins_cart_id = database_quote('cart',$calc_cart_id);

$sql_statement = "

DELETE FROM cart
WHERE cart_id=$dbins_cart_id

";

&database_call('cart','DELETE',$sql_statement);

} ######### End of if statement.

$fd_pg = "ste_cart";

$print_message_id = "61";

&initialize_sub_remove('ste_cart_delete_proc');

#########
######### Because this is a process routine, we move the 
######### initialize_sub_remove call before the exec call.
#########

&initialize_sub_require('ste_exec');
&ste_exec;

} ######### End of subroutine.

(2) Under HTML Pages & Elements | Manage Site Elements, edit the element named 'Shopping Cart - Contents - Update'. Replace the element with this code (put your image tag in place of 'PUT_YOUR_DELETE_IMAGE_TAG_HERE'):

Code:

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">PUT_YOUR_DELETE_IMAGE_TAG_HERE</A>

</TD>

</TR>

(3) Under HTML Pages & Elements | Manage Site Elements, edit the element 'Shopping Cart - Header - Update' using the following code:

Code:

<CENTER>

<FORM METHOD="POST" ACTION="(CGIVAR)common_url_form(/CGIVAR)">

(CGIVAR)common_hidden_fields(/CGIVAR)
<INPUT TYPE="HIDDEN" NAME="pg" VALUE="ste_cart_update_proc">

<TABLE WIDTH="(CGIVAR)html_cart_table_size(/CGIVAR)" COLS="4" CELLPADDING="10" CELLSPACING="3">

<TR BGCOLOR="(CGIVAR)html_pri_tablerow_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Item</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Price</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><NOBR><B>Quantity</B> <FONT COLOR="(CGIVAR)html_notnull_font_color(/CGIVAR)"><B>(CGIVAR)html_notnull_character(/CGIVAR)</B></FONT></NOBR></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Delete</B></FONT></TD>

</TR>

You can see this mod by visiting my website:   My site is not near completion, but you can add stuff to your cart and see it in action. Instead of a trash can icon, I just used the word remove.


Scott

Offline

 

#2 11-25-2003 14:27:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Delete Icon In Shopping Cart

Thanks for the post - cool mod.


Nick Hendler

Offline

 

#3 11-25-2003 15:03:34

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: Delete Icon In Shopping Cart

sgreiner,11/19/2003 03:42:17 PM wrote:

In addition to having the Quantity field in the cart which allows you to modify how many items you would like of each product, I would also like to have an icon (garbage can) which, when a customer clicks on it, it will delete that specific item.


(1) Create a new routine in ./cgi-bin/library/modules/ste_cart.pl named 'ste_cart_delete_proc' by adding the following code to the TOP of the file:

Code:

#######################################################################
# Ste Cart Delete Proc                                                #
#######################################################################

sub ste_cart_delete_proc {

&initialize_sub_add('ste_cart_delete_proc');

if ($fd_ref ne "") {

$calc_cart_id = "$fd_ref";
$calc_cart_id =~ s/^C\-//gs;
$dbins_cart_id = database_quote('cart',$calc_cart_id);

$sql_statement = "

DELETE FROM cart
WHERE cart_id=$dbins_cart_id

";

&database_call('cart','DELETE',$sql_statement);

} ######### End of if statement.

$fd_pg = "ste_cart";

$print_message_id = "61";

&initialize_sub_remove('ste_cart_delete_proc');

#########
######### Because this is a process routine, we move the 
######### initialize_sub_remove call before the exec call.
#########

&initialize_sub_require('ste_exec');
&ste_exec;

} ######### End of subroutine.

(2) Under HTML Pages & Elements | Manage Site Elements, edit the element named 'Shopping Cart - Contents - Update'. Replace the element with this code (put your image tag in place of 'PUT_YOUR_DELETE_IMAGE_TAG_HERE'):

Code:

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">PUT_YOUR_DELETE_IMAGE_TAG_HERE</A>

</TD>

</TR>

(3) Under HTML Pages & Elements | Manage Site Elements, edit the element 'Shopping Cart - Header - Update' using the following code:

Code:

<CENTER>

<FORM METHOD="POST" ACTION="(CGIVAR)common_url_form(/CGIVAR)">

(CGIVAR)common_hidden_fields(/CGIVAR)
<INPUT TYPE="HIDDEN" NAME="pg" VALUE="ste_cart_update_proc">

<TABLE WIDTH="(CGIVAR)html_cart_table_size(/CGIVAR)" COLS="4" CELLPADDING="10" CELLSPACING="3">

<TR BGCOLOR="(CGIVAR)html_pri_tablerow_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Item</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Price</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><NOBR><B>Quantity</B> <FONT COLOR="(CGIVAR)html_notnull_font_color(/CGIVAR)"><B>(CGIVAR)html_notnull_character(/CGIVAR)</B></FONT></NOBR></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Delete</B></FONT></TD>

</TR>

You can see this mod by visiting my website:   My site is not near completion, but you can add stuff to your cart and see it in action. Instead of a trash can icon, I just used the word remove.

Excellent idea!!! I'm assuming if you have a trashcan image you can use as opposed to the word remove?

Also, if you delete the last item of your cart it brings you to a screen that says "Your shopping cart is currently empty. Visit this page after adding items to your shopping cart."

Could there be a button on that page to "continue shopping" that would take you back to the last item viewed? or something of that nature?  Right now you must go to storefront, a category, or something and kind of start over if you clear your cart.

If you put an item in your cart and then delete it, I'd like to go back perhaps?


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#4 11-25-2003 23:05:09

sgreiner
Member
Registered: 07-26-2003
Posts: 78

Re: Delete Icon In Shopping Cart

Yes you can use any image instead of the word remove. I just did it that way because I did not feel like making an image. I will be placing a trash can icon there at some point.

As for the part about the message you see after you empty the cart "Your shopping cart is currently empty. Visit this page after adding items to your shopping cart." That is the way the cart works "out of the box". I am sure something can be done, but I have not worked on a mod for that. I actually don't like that either, so I will look to change that at some point in the future.

I also don't like what happens when you login to your account, then submit the info for verification, and it takes you to a page that says "Thank you for logging in and updating your customer account. When using this site, if your information is not already pre-populated for you, you can login using our customer accounts service and retrieve your information." This is worse then the empty cart page.
Has anyone out there did anything to change theirs?


Scott

Offline

 

#5 11-26-2003 04:06:41

mattv
Member
From: Hermosa Beach, California
Registered: 08-01-2003
Posts: 68
Website

Re: Delete Icon In Shopping Cart

Excellent Mod!  This feature makes CCP tremendously more usable.  Thanks!

Offline

 

#6 11-26-2003 09:52:23

superhero2000
Member
From: Harrisburg, PA
Registered: 03-26-2003
Posts: 1025
Website

Re: Delete Icon In Shopping Cart

The messages can be changed either in the HTML Site Elements or in the System Messages. There is no special MOD required to do this.  For instance:


As for the part about the message you see after you empty the cart "Your shopping cart is currently empty. Visit this page after adding items to your shopping cart." That is the way the cart works "out of the box". I am sure something can be done, but I have not worked on a mod for that.


Go to HTML Pages and Elements > Manage Site Elements > Update Shopping Cart - No Items - Update


Vinh
VQC Designs, LLC


Offline

 

#7 11-26-2003 22:11:58

DaveNET
Member
Registered: 11-23-2003
Posts: 15

Re: Delete Icon In Shopping Cart

Hi Everyone,

I just installed this hack. It wasn't too hard, and I also made a delete icon. If you want to see it in action, visit , a site that I'm working hard to finish this weekend.

David

Offline

 

#8 11-27-2003 11:55:14

superhero2000
Member
From: Harrisburg, PA
Registered: 03-26-2003
Posts: 1025
Website

Re: Delete Icon In Shopping Cart

Update your bottom row so it spans all 4 columns.  Under Manage HTML Pages and Elements > manage Site Elements > Update Shopping Cart - Footer - Update and Shop

Change the colspan to 4.  This will make your columns uniform. 


Vinh
VQC Designs, LLC


Offline

 

#9 11-27-2003 12:34:52

DaveNET
Member
Registered: 11-23-2003
Posts: 15

Re: Delete Icon In Shopping Cart

Thanks for the tip. I've done that and it looks better.

David

Offline

 

#10 04-07-2004 09:20:19

cjm
Member
Registered: 02-19-2004
Posts: 89

Re: Delete Icon In Shopping Cart

HI

Iam trying to apply the delete button in the cart page all is ok there is a extra colum saying Delete (done by changing Shopping Cart - Header - Update)

Also add the extra delete prog in ste_cart.pl.(at the top like instructed)

But I cant seem to add the image or button (trash can symbol) here is my element for that part (Shopping Cart - Contents - Update)

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/button/submit_delete.gif WIDTH="12" HEIGHT="12" BORDER="0"></A>

</TD>

</TR>

Is it some thing wrong in the image path (or tag)? Thing it must be because that is the only thing you have to change, the other two scripts are just a mater of copy and paste.

Thanks for your help

Clive

Sorry about posting this in two times thought is was posting to the support forum and when I looked it was not there so done it again then realised it was posting here Sorry

Offline

 

#11 05-08-2004 04:34:55

Aircut
Member
Registered: 09-22-2003
Posts: 235
Website

Re: Delete Icon In Shopping Cart

sgreiner,11/19/2003 03:42:17 PM wrote:

In addition to having the Quantity field in the cart which allows you to modify how many items you would like of each product, I would also like to have an icon (garbage can) which, when a customer clicks on it, it will delete that specific item.


(1) Create a new routine in ./cgi-bin/library/modules/ste_cart.pl named 'ste_cart_delete_proc' by adding the following code to the TOP of the file:

Code:

#######################################################################
# Ste Cart Delete Proc                                                #
#######################################################################

sub ste_cart_delete_proc {

&initialize_sub_add('ste_cart_delete_proc');

if ($fd_ref ne "") {

$calc_cart_id = "$fd_ref";
$calc_cart_id =~ s/^C\-//gs;
$dbins_cart_id = database_quote('cart',$calc_cart_id);

$sql_statement = "

DELETE FROM cart
WHERE cart_id=$dbins_cart_id

";

&database_call('cart','DELETE',$sql_statement);

} ######### End of if statement.

$fd_pg = "ste_cart";

$print_message_id = "61";

&initialize_sub_remove('ste_cart_delete_proc');

#########
######### Because this is a process routine, we move the 
######### initialize_sub_remove call before the exec call.
#########

&initialize_sub_require('ste_exec');
&ste_exec;

} ######### End of subroutine.

(2) Under HTML Pages & Elements | Manage Site Elements, edit the element named 'Shopping Cart - Contents - Update'. Replace the element with this code (put your image tag in place of 'PUT_YOUR_DELETE_IMAGE_TAG_HERE'):

Code:

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">PUT_YOUR_DELETE_IMAGE_TAG_HERE</A>

</TD>

</TR>

(3) Under HTML Pages & Elements | Manage Site Elements, edit the element 'Shopping Cart - Header - Update' using the following code:

Code:

<CENTER>

<FORM METHOD="POST" ACTION="(CGIVAR)common_url_form(/CGIVAR)">

(CGIVAR)common_hidden_fields(/CGIVAR)
<INPUT TYPE="HIDDEN" NAME="pg" VALUE="ste_cart_update_proc">

<TABLE WIDTH="(CGIVAR)html_cart_table_size(/CGIVAR)" COLS="4" CELLPADDING="10" CELLSPACING="3">

<TR BGCOLOR="(CGIVAR)html_pri_tablerow_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Item</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Price</B></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><NOBR><B>Quantity</B> <FONT COLOR="(CGIVAR)html_notnull_font_color(/CGIVAR)"><B>(CGIVAR)html_notnull_character(/CGIVAR)</B></FONT></NOBR></FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)"><B>Delete</B></FONT></TD>

</TR>

You can see this mod by visiting my website:   My site is not near completion, but you can add stuff to your cart and see it in action. Instead of a trash can icon, I just used the word remove.

the fourth step should be adjusting the table appearence.

in Element ste_cart_footu_display_lines

replace

<TD VALIGN="TOP" COLSPAN="3">

with

<TD VALIGN="TOP" COLSPAN="4">

Offline

 

#12 05-08-2004 17:19:37

Todd
Member
From: Kitty Hawk, NC
Registered: 04-01-2003
Posts: 553
Website

Re: Delete Icon In Shopping Cart

This is an awesome mod.  I checked out the example given at  and love it!

Maybe Nick can work this into CCP6 as a regular feature?! hint, hint....


there's more than one way to...



Offline

 

#13 05-08-2004 18:06:19

Brains
Member
Registered: 08-22-2003
Posts: 200

Re: Delete Icon In Shopping Cart

I'm sure there's lots of independent MODS out there. Maybe a list of sites would be nice so that users can see what can be done with the bare bones CCP. I've been working with the cart heavily for a month or so...I've used many others...but CCP allows the most functionality and easy modification.

BRAINS


International Award Winning Professional Web Design
MySQL Database Design, PHP
UK Hosting on Dedicated Servers
As featured in the Financial Times, ISP World and others.

Offline

 

#14 05-18-2004 18:16:39

Todd
Member
From: Kitty Hawk, NC
Registered: 04-01-2003
Posts: 553
Website

Re: Delete Icon In Shopping Cart

cjm,04/07/2004 09:20:19 AM wrote:

HI

Iam trying to apply the delete button in the cart page all is ok there is a extra colum saying Delete (done by changing Shopping Cart - Header - Update)

Also add the extra delete prog in ste_cart.pl.(at the top like instructed)

But I cant seem to add the image or button (trash can symbol) here is my element for that part (Shopping Cart - Contents - Update)

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</FONT></TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</TD>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/button/submit_delete.gif WIDTH="12" HEIGHT="12" BORDER="0"></A>

</TD>

</TR>

Is it some thing wrong in the image path (or tag)? Thing it must be because that is the only thing you have to change, the other two scripts are just a mater of copy and paste.

Thanks for your help

Clive

Sorry about posting this in two times thought is was posting to the support forum and when I looked it was not there so done it again then realised it was posting here Sorry

Hello CJM,

You have only one small thing missing.

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/button/submit_delete.gif WIDTH="12" HEIGHT="12" BORDER="0"></A>

You forgot the closing quotes on your images path.

Change

"(CGIVAR)images_path(/CGIVAR)/button/submit_delete.gif

to

"(CGIVAR)images_path(/CGIVAR)/button/submit_delete.gif"

I know you just overlooked this.  I make the same mistake all the time.


In addition.  I wanted to post my code for the

page.

This is using both 'delete' text and an image.



<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">Delete <IMG SRC="(CGIVAR)images_path(/CGIVAR)/store/trashcan2.gif"  WIDTH="14" HEIGHT="18" BORDER="0" align="absmiddle"></a>

</td>

</tr>


there's more than one way to...



Offline

 

#15 05-21-2004 07:29:00

Todd
Member
From: Kitty Hawk, NC
Registered: 04-01-2003
Posts: 553
Website

Re: Delete Icon In Shopping Cart

I made a couple of changes to the above code for cosmetic reasons.  The final code for the  Element that I am using is...



<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">Remove</a> <A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/store/trashcan2.gif"  WIDTH="14" HEIGHT="18" BORDER="0" align="absmiddle"></a>

</td>

</tr>

You can see this is action at .


there's more than one way to...



Offline

 

#16 05-21-2004 09:49:59

scoutch
Banned
Registered: 07-03-2003
Posts: 3167

Re: Delete Icon In Shopping Cart

I have tested your add to cart button and it returns an error :

Line : 115
Char : 16
Error : ' Elements(...)' is null or no an object
Code : 0
URL :

You might also want to correct the :  link

to simply read as :



or

(if this one is not in common_url command).

In addition to say that I have tried your remove link and it takes a couple of clicks to remove the item from the cart. It stays idle. However, the link itself is a great idea.


______________________________________________

THIS USER HAS BEEN BANNED FROM THIS FORUM.

If this post contains any language related to
code samples, advice, etc., please read this
entire thread before making a decision to use
this post as a basis for any change to your
software installation.
______________________________________________

Offline

 

#17 05-21-2004 09:59:49

Todd
Member
From: Kitty Hawk, NC
Registered: 04-01-2003
Posts: 553
Website

Re: Delete Icon In Shopping Cart

scoutch,05/21/2004 09:49:59 AM wrote:

You might also want to correct the :  link

to simply read as :



or

(if this one is not in common_url command).

In addition to say that I have tried your remove link and it takes a couple of clicks to remove the item from the cart. It stays idle. However, the link itself is a great idea.

On the contrary, it works fine.

The ?pg or &pg will return errors.

The proper way of doing it is ?&pg.

If your receiving errors... I have no idea why.  Perhaps you have javascript disabled?

The remove link does work on the first click.

I have tested the site in many browsers and many computers including Windows, Mac, and Linux.


there's more than one way to...



Offline

 

#18 05-21-2004 10:05:09

scoutch
Banned
Registered: 07-03-2003
Posts: 3167

Re: Delete Icon In Shopping Cart



Perhaps you have javascript disabled?

Nothing has been modified regarding Javascript toward my web browser. However, I might have an explination. Does your site involves : Popup loadings ?


______________________________________________

THIS USER HAS BEEN BANNED FROM THIS FORUM.

If this post contains any language related to
code samples, advice, etc., please read this
entire thread before making a decision to use
this post as a basis for any change to your
software installation.
______________________________________________

Offline

 

#19 05-21-2004 10:58:25

BlossomPink
Member
From: Cumbria, UK.
Registered: 03-19-2004
Posts: 225
Website

Re: Delete Icon In Shopping Cart

Hi

Iv'e tried and tried to get this mod to work.  But it won't work for me.  Just like the other post I can't get the image to show or the even the word delete in the cart section.  I can make the header appear and make the footer cover 4 cells but the delete image doesn't work not even if I use a word instead.  I even tried the full url to my image, but no joy.

BlossomPink


BlossomPink

~*~*~*~*~*~*~*~*~*~*~*~

~*~*~*~*~*~*~*~*~*~*~*~

Offline

 

#20 06-14-2004 10:53:28

DigMar
Member
From: United States
Registered: 05-25-2004
Posts: 71
Website

Re: Delete Icon In Shopping Cart

Hello,

I have been trying to get the delete button to work properly. We have added all the code listed in this thread, but can not get the button to appear. Below I have pasted my code from the Shopping Cart - Contents - Update page.

<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">
<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</font></td>
<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</font></td>
<TD VALIGN="TOP" ALIGN="RIGHT">
<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">
</td>
<TD VALIGN="TOP" ALIGN="RIGHT">
<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">Remove</a> <A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/button/trash-can.gif"  WIDTH="14" HEIGHT="18" BORDER="0" align="absmiddle"></a>
</td>
</tr>

Any help is appreciated.

Corey

Offline

 

#21 06-14-2004 12:22:19

DigMar
Member
From: United States
Registered: 05-25-2004
Posts: 71
Website

Re: Delete Icon In Shopping Cart


Thanks anyway guys, we fixed it... 

Offline

 

#22 06-17-2004 00:48:30

TheThinker
Member
From: Salt Lake City, Utah
Registered: 06-16-2004
Posts: 535
Website

Re: Delete Icon In Shopping Cart

How did you fix it??  Please share so the rest of us will know...


Regards,
Eric

Offline

 

#23 06-17-2004 03:09:54

Todd
Member
From: Kitty Hawk, NC
Registered: 04-01-2003
Posts: 553
Website

Re: Delete Icon In Shopping Cart

Follow the 3rd post down from the top of this forum discussion by 'TheBlade'.

You can also follow this posts from above after making all the modifications 'TheBlade' describes to include an image along with the word delete.



I made a couple of changes to the above code for cosmetic reasons.  The final code for the  Element that I am using is...



<TR BGCOLOR="(CGIVAR)cart_row_color(/CGIVAR)">

<TD VALIGN="TOP"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)cart_linkopen(/CGIVAR)(CGIVAR)cart_prodnumber_display(/CGIVAR)(CGIVAR)cart_prodname(/CGIVAR)(CGIVAR)cart_linkclose(/CGIVAR)(CGIGET TYPE="SUB" VALUE="ste_cart_disp_options" PARAMS="(CGIVAR)cart_prodoptions(/CGIVAR)")</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT"><FONT FACE="(CGIVAR)html_small_font_face(/CGIVAR)" SIZE="(CGIVAR)html_small_font_size(/CGIVAR)" COLOR="(CGIVAR)html_small_font_color(/CGIVAR)">(CGIVAR)currency_symbol(/CGIVAR)(CGIVAR)cart_amtprod(/CGIVAR)</font></td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<INPUT TYPE="TEXT" NAME="C-(CGIVAR)cart_id(/CGIVAR)" VALUE="(CGIVAR)cart_prodquantity(/CGIVAR)" SIZE="3">

</td>

<TD VALIGN="TOP" ALIGN="RIGHT">

<A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)">Remove</a> <A HREF="(CGIVAR)common_url(/CGIVAR)&pg=ste_cart_delete_proc&ref=C-(CGIVAR)cart_id(/CGIVAR)"><IMG SRC="(CGIVAR)images_path(/CGIVAR)/store/trashcan2.gif"  WIDTH="14" HEIGHT="18" BORDER="0" align="absmiddle"></a>

</td>

</tr>

You can see this is action at .


there's more than one way to...



Offline

 

#24 07-25-2004 14:18:13

steveblueradio
Member
From: Belfast, Northern Ireland
Registered: 06-28-2004
Posts: 755
Website

Re: Delete Icon In Shopping Cart

hi,
its confussing to see people who have spent time adding mods and hacks to their ccp site, only to give up and install and open source program, granted php is easier to use than perl and it has a mysql backend, but that should'nt be the reason to move.
i for one did try my hand at this open source program, but the fact that the payment process is an open source hack worried me some what, not the sort of thing i would like to be handling my money and transactions.
i have also found that ccp51 is a hell of a lot better than this open source script, and i have found that it is earier to use and skin...i have noticed that a lot of people just use the default look with this other script, not very professional face to show your customers.
cheers
steve


I'm Gene Hunt, Your DCI, And it's 1973, Nearly Dinner Time, I'm havin hoops........

Cheers,
Steve
-------------------

Offline

 

#25 08-03-2004 17:49:06

one2ku
Member
From: CA
Registered: 04-29-2004
Posts: 176
Website

Re: Delete Icon In Shopping Cart

nice mod and pretty easy to do.

Offline

 

Board footer