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 02-16-2004 16:52:13

bgroup
Member
Registered: 03-31-2003
Posts: 13

List Cart Products During Checkout Process

I've looked through the forum, no posts seem to detail how to do this... I'm not looking for a mini cart, but for the cart items to display during the checkout/invoice process.

We need to be able to list the products in the cart along with option information, line item by line item then display the subtotal & total... something like this:

item one name   $10.00
item one option  $  5.00
item two name   $10.00
------------------------------
total:                $ 25.00

Any pointers?

Lisa Brown

Offline

 

#2 02-16-2004 19:47:11

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

Re: List Cart Products During Checkout Process

That would require custom codings. Ask ATS, he should be able to do the job for a low fee. smile


______________________________________________

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

 

#3 02-17-2004 20:22:37

Beth
Member
Registered: 11-30-2003
Posts: 64

Re: List Cart Products During Checkout Process

Hello Lisa,

You might also be interested in viewing this topic: 

I believe you have hit on a weakness of this otherwise very professional cart.  It's my impression that Clickcartpro has opted to list the items in the shipping section for greater versatility--meaning that the different items purchased can be shipped to different ship addresses.  However, this is of no help to the customer who likes to see a summary of the order so he/she can print it.  It is also of no help to the merchant who wants to include a copy of the invoice with the order.

Nick, while the capability to ship different products to different addresses is a great and sophisticated feature, we have not taken care of the issues closer to home:  getting a good summary statement of purchase for the client to see and print.

Beth

Offline

 

#4 02-19-2004 23:16:51

bgroup
Member
Registered: 03-31-2003
Posts: 13

Re: List Cart Products During Checkout Process

Scoutch and Beth, thanks.

I ended up creating a new sub based on the mini-cart that only shows during checkout.  It lists the line items in the cart just above the sub-total and total.

You end up with a line that shows the qty, the item name, options (if any these are displayed beneath the item name), price

Code:

######################################################################
# Ste Cart lineitem                                                      #
#######################################################################

sub ste_cart_lineitem {

&initialize_sub_add('ste_cart_lineitem');

#########
######### This routine gets info from the cart for a mini-cart display.
#########
$lineitem_prodquantity = "...";
$lineitem_prodoptions = "...";
$lineitem_prodname = "...";
$lineitem_detail = "...";

if (-e "$data_temp_path/$fd_usr.$data_table_ext") {

my @lineitem = ();
my $row = "";

$sql_statement = "
SELECT cart_prodquantity,cart_prodname,cart_prodoptions,cart_amtprod
FROM cart
";

@lineitem = database_call('cart','SELECT',$sql_statement);

print <<ENDOFTEXT;
 <tr class="lineitem" align="top">
    <td WIDTH="25%" align="top"><h5>Quantity</h5></td>  
    <td WIDTH="75%" align="top"><table width="100%">
<tr class="lineitem">
     <td WIDTH="25%"><h5>Item</h5> </td>
     <td width="75%" align="right"><h5>Price</h5></td>
</tr>
</table>
</td>
  </tr>
ENDOFTEXT

foreach $row(@lineitem) {

($cart_prodquantity,$cart_prodname,$cart_prodoptions,$cart_amtprod) = @$row;

## ### added for line items 
$lineitem_prodquantity  =  $cart_prodquantity;
$lineitem_prodname      =  $cart_prodname;
$lineitem_prodoptions   =  $cart_prodoptions;
$lineitem_amtprod       =  $cart_amtprod;

print <<ENDOFTEXT;
  <tr class="lineitem">
    <td width="25%" valign="top">$lineitem_prodquantity</td>  
    <td WIDTH="75%" valign="top">$lineitem_prodname <br>
    <span class="lineitemopt">$lineitem_prodoptions</span> 
  <p align="right">$lineitem_amtprod</p>
     </td>
  </tr>
ENDOFTEXT
} ######### End of foreach statement.

@lineitem = ();

} ######### End of if statement.
&initialize_sub_remove('ste_cart_lineitem');

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

Then in the ste_cart_headchk element add this to the bottom:

Code:

(CGIGET TYPE="SUB" VALUE="ste_cart_lineitem")

I styled my text with CSS - you could change it to use the standard CCP5 fonts or  add this to your style sheet:

Code:

.lineitem {
     font-family: Verdana, Arial, Helvetica, sans-serif;
     font-size: 12px;
}
.lineitemopt {
     font-size: 10px;
}

Hope this helps someone else get their cart just so! smile

Lisa

Offline

 

#5 02-19-2004 23:18:26

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

Re: List Cart Products During Checkout Process

This MOD should be moved in the 5.1 Hacks & MODs section.


______________________________________________

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

 

#6 02-20-2004 19:31:20

sayerp
Member
Registered: 01-03-2004
Posts: 39

Re: List Cart Products During Checkout Process

Lisa,

This is a fantastic change - Thanks. 

There is one small snag to this method I have come across that maybe you or someone out there could solve.

If you implement the above method and then review historic orders (i.e. in customer accounts section) means that the historic order details contain the CURRENT CART ITEMS!!  This is somewhat confusing for the poor customer!

I think that this is because the element is used in the other areas (i.e. printable invoice etc?) and as this now invokes the current cart listing - you get the current cart whether you want it or not whereever the element is used.

Any ideas to complete this excellent MOD would be welcome as I think that this would complete the checkout process. Anyone?

Offline

 

#7 02-26-2004 10:00:59

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

Re: List Cart Products During Checkout Process

I'd just wrap the entire routine with:

Code:


if ($fd_pg eq "ste_chkout_proc") {



}

That way it will only show during checkout.


Nick Hendler

Offline

 

#8 03-03-2004 20:50:18

outback
Member
Registered: 02-28-2004
Posts: 16

Re: List Cart Products During Checkout Process

Ok I applied this mod and I love it however when I go to the checkout page the font size is huge, I have tried to apply the text mod and it is not working, I know this is simple can someone please help point me in the right direction

I want to use the global settings for font size, text and color.

which file does it get applied to?  I am assuming ste_cart.pl in library/modules/

thanks for the help

Offline

 

#9 03-04-2004 09:22:31

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

Re: List Cart Products During Checkout Process

That's because the person who did the mod used CSS instead of FONT tags in the <TD> columns.  Take a look in ste_cart.pl in the 'ste_cart_lineitem' routine and add <FONT> tags into the <TD>'s.


Nick Hendler

Offline

 

#10 08-27-2004 19:57:33

mike512
Member
Registered: 08-11-2004
Posts: 24

Re: List Cart Products During Checkout Process

LOOKS GREAT, NOW FOR THE INVOICE

How about using this on the order confirmation and printable invoice page?
Is it possible? I tried to implement it there but somehow it wont work...

Mikee

Offline

 

#11 08-30-2004 14:30:33

raygauci
Member
From: MALTA - that's in Europe s
Registered: 09-03-2003
Posts: 56
Website

Re: List Cart Products During Checkout Process

Can anyone post the complete code on this forum please. I tried to implement this one but I am getting script errors. Its a great idea to list Cart products during the checkout process.....and also need code to the printable invoice on the same lines.

Thanks
Ray
wwwgrafik-images.com

Offline

 

#12 09-09-2004 11:01:00

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

Re: List Cart Products During Checkout Process

The post by 'bgroup' lists all code needed.  If you're having problems, re-upload your original ste_cart.pl file and try again.  Be sure to upload the file in ASCII mode to the server.


Nick Hendler

Offline

 

#13 09-10-2004 07:00:15

mike512
Member
Registered: 08-11-2004
Posts: 24

Re: List Cart Products During Checkout Process

I am right that this code doesnt print the totals to the order confirmation and printable invoice right?  Or am i the only one it isnt working for?

Offline

 

#14 09-24-2004 13:56:41

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

Re: List Cart Products During Checkout Process

With the if statement change I posted, the contents will only show on checkout pages.


Nick Hendler

Offline

 

#15 12-07-2004 22:51:13

thedon122
Member
Registered: 01-21-2004
Posts: 155

Re: List Cart Products During Checkout Process

hi Nick

how do you do this where in routine?

I'd just wrap the entire routine with:


CODE 


if ($fd_pg eq "ste_chkout_proc") {



}





That way it will only show during checkout.

thanks
Charlie

Offline

 

#16 12-08-2004 10:09:45

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

Re: List Cart Products During Checkout Process

Right below:

Code:


&initialize_sub_add('ste_cart_lineitem');

Add:

Code:


if ($fd_pg eq "ste_chkout_proc") {

Then right above:

Code:


&initialize_sub_remove('ste_cart_lineitem');

Add:

Code:


}


Nick Hendler

Offline

 

#17 12-08-2004 11:31:32

thedon122
Member
Registered: 01-21-2004
Posts: 155

Re: List Cart Products During Checkout Process

Hi nick

That where i though it would go - but i was putting the code where you said but know it does not show on the checkout page ?!?!?!?

Offline

 

#18 12-10-2004 10:17:57

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

Re: List Cart Products During Checkout Process

Have you done this?:

Then in the ste_cart_headchk element add this to the bottom:

Code:


(CGIGET TYPE="SUB" VALUE="ste_cart_lineitem")


Nick Hendler

Offline

 

#19 12-10-2004 12:51:02

thedon122
Member
Registered: 01-21-2004
Posts: 155

Re: List Cart Products During Checkout Process

hi,


Have you done this?:

Then in the ste_cart_headchk element add this to the bottom:


CODE 


(CGIGET TYPE="SUB" VALUE="ste_cart_lineitem")

Yes i have added this - still does not show up??

regards
Charlie



Offline

 

#20 12-14-2004 10:34:16

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

Re: List Cart Products During Checkout Process

Does the page source show any errors in HTML comment tags?


Nick Hendler

Offline

 

#21 12-15-2004 19:57:49

thedon122
Member
Registered: 01-21-2004
Posts: 155

Re: List Cart Products During Checkout Process

hi, Nick

No errors are shown when viewing the source in notepad????

I just dont know why its not showing - could other mods be causing this problem?

Thanks in advance
Charlie

Offline

 

#22 01-14-2005 10:59:09

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

Re: List Cart Products During Checkout Process

Try wrapping that CGIGET call with an HTML <TABLE> in the element.


Nick Hendler

Offline

 

#23 01-27-2005 17:18:37

myqee
Member
From: London - UK
Registered: 11-11-2004
Posts: 55
Website

Re: List Cart Products During Checkout Process

I seem to be having the same trouble as Charlie. The list does not appear on the checkout above the subtotal... Did you manage to solve it Charlie? ...I hope I can get this working as I really would like this MOD.  :-)

This is what I have done going by what was posted here: (please correct me if I have errors, Ta!)



Code:

<BR>

<CENTER>

<TABLE WIDTH="(CGIVAR)html_cart_table_size(/CGIVAR)" COLS="2" CELLPADDING="10" CELLSPACING="3">
(CGIGET TYPE="SUB" VALUE="ste_cart_lineitem")



Code:

######################################################################
# Ste Cart lineitem                                                      #
#######################################################################

sub ste_cart_lineitem {

&initialize_sub_add('ste_cart_lineitem');
if ($fd_pg eq "ste_chkout_proc") {

#########
######### This routine gets info from the cart for a mini-cart display.
#########
$lineitem_prodquantity = "...";
$lineitem_prodoptions = "...";
$lineitem_prodname = "...";
$lineitem_detail = "...";

if (-e "$data_temp_path/$fd_usr.$data_table_ext") {

my @lineitem = ();
my $row = "";

$sql_statement = "
SELECT cart_prodquantity,cart_prodname,cart_prodoptions,cart_amtprod
FROM cart
";

@lineitem = database_call('cart','SELECT',$sql_statement);

print <<ENDOFTEXT;
<tr class="lineitem" align="top">
   <td WIDTH="25%" align="top"><h5>Quantity</h5></td>  
   <td WIDTH="75%" align="top"><table width="100%">
<tr class="lineitem">
<td WIDTH="25%"><h5>Item</h5> </td>
<td width="75%" align="right"><h5>Price</h5></td>
</tr>
</table>
</td>
 </tr>
ENDOFTEXT

foreach $row(@lineitem) {

($cart_prodquantity,$cart_prodname,$cart_prodoptions,$cart_amtprod) = @$row;

## ### added for line items 
$lineitem_prodquantity  =  $cart_prodquantity;
$lineitem_prodname      =  $cart_prodname;
$lineitem_prodoptions   =  $cart_prodoptions;
$lineitem_amtprod       =  $cart_amtprod;

print <<ENDOFTEXT;
 <tr class="lineitem">
   <td width="25%" valign="top">$lineitem_prodquantity</td>  
   <td WIDTH="75%" valign="top">$lineitem_prodname <br>
   <span class="lineitemopt">$lineitem_prodoptions</span> 
 <p align="right">$lineitem_amtprod</p>
</td>
 </tr>
ENDOFTEXT
} ######### End of foreach statement.

@lineitem = ();

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

}
&initialize_sub_remove('ste_cart_lineitem');


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

This code was inserted at the end of the file just above above:

Code:

#######################################################################
# Return True Value For End Of File                                   #
#######################################################################

1;

myqee
_____________________________________________________________



  <-- My CCP Shop!
_____________________________________________________________

Offline

 

#24 01-28-2005 03:11:08

Shawn
Member
Registered: 09-24-2004
Posts: 216

Re: List Cart Products During Checkout Process

Without looking at your code, be sure that the code for Ste Cart lineitem is inserted
into ste_cart.pl and not ste_chkout.pl.  I like this mod and I added it to the top of my ste_cart.pl file then adjusted the table and font tags to get the desired look.

Offline

 

#25 01-28-2005 06:27:19

myqee
Member
From: London - UK
Registered: 11-11-2004
Posts: 55
Website

Re: List Cart Products During Checkout Process

Thanks for the reply Shawn.

However, I moved the code to the  file as you were right, I had put the code in the wrong file () but the item listing is still not showing up at the chekout page?

I've done a view source of the checkout page and there is no code where it should be appearing. Its as if the subroutine is just not getting called at all?

Any ideas as to what I am doing wrong?  I'm using the same code as in my previous post but this time in the ste_cart.pl file.


myqee
_____________________________________________________________



  <-- My CCP Shop!
_____________________________________________________________

Offline

 

Board footer