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 12-21-2003 15:15:43

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

Options Display Within View Cart

Ok, so I've gotten this to work with version CCP5, but can't seem to get this to work for CCP51.  I'd like to display the selected options each on individual lines within the shopping cart instead of all on one line.

Instead of this display:
Size: Small; Colors: Red; Fabric: cotton

I'd like to display it like this:
Size: Small
Colors: Red
Fabric: Cotton

I have looked at this post for CCP5
, but it doesn't seem to work with TIKI. I know it is within the ste_cart.pl file, but I can't seem to get it to work.  Thanks.


Vinh
VQC Designs, LLC


Offline

 

#2 12-21-2003 15:44:41

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

Re: Options Display Within View Cart

Ok, just got it worked on both. Give me your FTP info and I'll make it work.


______________________________________________

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 12-21-2003 16:09:26

TerryA
Member
From: Sanford, Fl
Registered: 07-14-2003
Posts: 1322
Website

Re: Options Display Within View Cart

scoutch, again, why don't you post the answer here so that we all can see how it is done?  This forum is about sharing and support. 

Thanks.

Offline

 

#4 12-21-2003 16:26:56

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

Re: Options Display Within View Cart

Ok, I'll post them here.


______________________________________________

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

 

#5 12-21-2003 16:47:31

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

Re: Options Display Within View Cart

Yes, I prefer to have you post on this forum instead of divulging my account info. Thanks.


Vinh
VQC Designs, LLC


Offline

 

#6 12-22-2003 11:26:09

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

Re: Options Display Within View Cart

scoutch,

you mentioned that you got this working for TIKI, would you mind posting the mod here?  thanks.


Vinh
VQC Designs, LLC


Offline

 

#7 12-22-2003 11:41:09

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

Re: Options Display Within View Cart

Since you already integrated the MOD into the 5.0 version, could you e-mail me the file so that I could work it out on 5.1 ? The integration will take less time this way.


______________________________________________

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

 

#8 12-22-2003 12:03:26

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

Re: Options Display Within View Cart

No, I have not integrated any MOD into my current setup.  The MOD I did on CCP5 is for a completely different site.  This is for a fresh install with TIKI on a completely new site. 

Like TerryA has stated, why not post the MOD for TIKI and let everyone benefit from this.  I'm sure there are more users on this forum that want to know how to make this work. Thanks.


Vinh
VQC Designs, LLC


Offline

 

#9 12-22-2003 16:38:11

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

Re: Options Display Within View Cart

In the file ./cgi-bin/library/modules/ste_cart.pl in the routine 'ste_cart_add_cgi_api_proc' look for:

Code:


$cart_prodoptions .= "$display_name: $field_value; ";

And change to:

Code:


$cart_prodoptions .= "$display_name: $field_value<BR>";

Then look for:

Code:


$cart_prodoptions .= "$sel_name; ";

And change to:

Code:


$cart_prodoptions .= "$sel_name<BR>";

Then look for:

Code:


$cart_prodoptions .= "; ";

And change to:

Code:


$cart_prodoptions .= "<BR>";

Then find:

Code:


if ($cart_prodoptions ne "") {

chop($cart_prodoptions);
chop($cart_prodoptions);

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

And change to:

Code:


if ($cart_prodoptions ne "") {

chop($cart_prodoptions);
chop($cart_prodoptions);
chop($cart_prodoptions);
chop($cart_prodoptions);

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


Nick Hendler

Offline

 

#10 12-22-2003 16:40:39

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

Re: Options Display Within View Cart

I added that yesterday on my file actually hehe ! 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

 

#11 05-25-2004 17:00:44

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

Re: Options Display Within View Cart

I installed the above mod at . However, I have run across something strange.  The custom greek section of the site uses the remote api functions.  Only the custom greek gear section is getting formatted with linebreaks.  The rest of the store still uses the semi colon as the separater when the data is sent to the shopping cart.

Any ideas on why this is?


there's more than one way to...



Offline

 

#12 05-26-2004 12:09:28

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

Re: Options Display Within View Cart

There are two routines that would need editing:

ste_cart_add_cart_api_proc
ste_cart_add_cgi_api_proc

One handles remote products, the other CCP based products.


Nick Hendler

Offline

 

#13 05-26-2004 21:43:54

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

Re: Options Display Within View Cart

Thanks Nick.  I only edited the one... so I'm going back and will edit the other.  In addition, I would love to see Zuma have this type of layout functionality by default.  Seems to be an easier format to read when viewing the cart or reading the order emails.


there's more than one way to...



Offline

 

#14 05-27-2004 01:22:23

roxie
Member
From: Central Oregon
Registered: 11-17-2003
Posts: 80
Website

Re: Options Display Within View Cart

Woo Hoo! Thank you very much! This modification is ever better that the bold I asked about awhile back. Very nice to read the order emails now.

Thank you Nick! :-)
RoxAnne

Offline

 

#15 05-27-2004 10:16:36

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

Re: Options Display Within View Cart

I now have this mod installed fully and its working great!

I was thinking that it would be nice to format the options with different colors from the options names... so that it would look something like this...

Size:
Material:
Graphic:

Anyone ever had to do anything similar?  Would love to see this mod.


there's more than one way to...



Offline

 

#16 06-06-2004 12:35:05

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

Re: Options Display Within View Cart

That would be done by wrapping the $field_value and $sel_name variables with FONT tags.


Nick Hendler

Offline

 

#17 06-13-2004 04:37:52

csherwood123
Member
Registered: 10-22-2002
Posts: 235

Re: Options Display Within View Cart

Nick,

I made modifications to my ste_cart.pl similar to what you outlined in your post earlier. However, I wanted selected options on seperate lines in addition to each being seperated by a newline, like this:


Option 4


Option 2
Option 3


Option 1
Option 3
Option 4

I accomplished this by adding additional <BR>s and wrapping the display variables in <B> tags. For example, my code for the TEXTBOX options looks like this:

Code:

if ($display_type eq "TEXTBOX" || $display_type eq "TEXTAREA") {

$field_value = $q->param($form_id);

if ($field_value ne "") {

$cart_prodoptions .= "<BR><B>$display_name:</B><BR> $field_value<BR> ";
$reqopt_found = "Y";

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

I made similar changes to the other option types.

The good news is that my cart and my printable invoices look just the way I want them to look. The bad news is that the formatting for my internal and customer confirmation emails have gotten a little screwed-up.

I didn't realize that the ste_cart_add_cgi_api_proc would effect the emails?!?

My emails now look rather weird when it comes to the product option print outs. Some of them are printed one after the other, line after line, while some of them look more like the Invoice with newline breaks between each.

For example, my product / option listings look something like this:

Item: XKS 586 Computer
(XKS111) - $2000.00
Quantity: 1


Category I - Choose 1 Item:
80 Meg Hard DriveCategory II - Choose 2 Items:  100 Meg Zip Drive w/ Audio Runner  Flat Screen Monitor (17 in.)Category III - Choose 3 Items:  Watcom 543 12 in. Tablet  Logitech Optical Mouse WD 120 MEG External Tape Backup Drive and Router   

Add a Surround Sound Speaker System?
3. Sony - Superplayer 44

Add a Laser Printer?
2. HP 1100 Laser Jet

Add a Themed Picture Frame?:
No, thanks.


How do I get my emails straightened out (without messing up my Invoices now)? I really don't care if the emails revert back to showing all of the options crunched together as in the first part of my example, or if I can get them to show up on new lines like on the Invoice. However, they need to be all one format or the other - consistency is a good thing, right?  wink

Your time and expertise are appreciated. Thanks in advance!

-chip

Offline

 

#18 06-15-2004 15:16:38

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

Re: Options Display Within View Cart

Did you make any changes to the email confirmation routine in ste_order.pl?  That's where those messages are generated.


Nick Hendler

Offline

 

#19 06-15-2004 16:02:42

csherwood123
Member
Registered: 10-22-2002
Posts: 235

Re: Options Display Within View Cart

No changes were made to anything other than ste_cart.pl.

My changes look PERFECT in the cart and on the Invoice, but the emails are a total mess.

Offline

 

#20 06-16-2004 09:08:34

nav
Banned
Registered: 04-07-2004
Posts: 666

Re: Options Display Within View Cart

How about adding the new entry like this :

Code:


if ($display_type eq "TEXTBOX" || $display_type eq "TEXTAREA") {

$field_value = $q->param($form_id);

if ($field_value ne "") {

$cart_prodoptions .= <<ENDOFTEXT;

<BR><B>$display_name:</B><BR> $field_value<BR>

ENDOFTEXT

$reqopt_found = "Y";

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

Would it display otherwise ?


______________________________________________

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

 

#21 06-16-2004 11:13:06

csherwood123
Member
Registered: 10-22-2002
Posts: 235

Re: Options Display Within View Cart

After looking at this in more detail and experimenting with various changes (including Nav's suggestion) I still haven't been able to get my emails straightened out, but I do have some more information which may be useful in debugging.

The problem occurs only with Options which allow more than a single selection. While these options format correctly in the cart and the invoice, they run together in the emails. Therefore the issue seems to be specific to the code encapsulated by the following if statement:

elsif ($display_type eq "RADIO" || $display_type eq "SELECT-MULT" || $display_type eq "CHECKBOX") {

The code pertaining to $display_type TEXTBOX or TEXTAREA or SELECT seems to be formatting just fine in the cart, the invoice, and the emails.

Here is what I currently have in the suspect section of code:

Code:

} elsif ($display_type eq "RADIO" || $display_type eq "SELECT-MULT" || $display_type eq "CHECKBOX") {

@field_value = $q->param($form_id);

if (@field_value) {

$cart_prodoptions .= "<BR><B>$display_name:</B><BR> ";
$reqopt_found = "Y";

foreach $field_value(@field_value) {

my ($sel_id,$sel_name,$sel_pricech,$sel_price,$sel_weightch,$sel_weight,$sel_inv) = split(/\|/,$field_value);

if ($cart_prodquantity > "$sel_inv" && $inv eq "Y") {

$inventory_level_exceeded = "Y";
$cart_prodquantity = "$sel_inv";

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

$cart_prodoptions .= "$sel_name<BR>";

if ($sel_pricech eq "I" && $sel_price > "0") {

$cart_amtprod = ($cart_amtprod + $sel_price);

} elsif ($sel_pricech eq "D" && $sel_price > "0") {

$cart_amtprod = ($cart_amtprod - $sel_price);

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

if ($sel_weightch eq "I" && $sel_weight > "0") {

$cart_prodshipweight = ($cart_prodshipweight + $sel_weight);

} elsif ($sel_weightch eq "D" && $sel_weight > "0") {

$cart_prodshipweight = ($cart_prodshipweight - $sel_weight);

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

Any suggestions would be greatly appreciated!

Offline

 

#22 06-16-2004 12:13:59

nav
Banned
Registered: 04-07-2004
Posts: 666

Re: Options Display Within View Cart



While these options format correctly in the cart and the invoice, they run together in the emails. Therefore the issue seems to be specific to the code encapsulated by the following if statement:

In this case, are you sure the source of the problem would not present itself from ste_order.pl file instead of ste_cart.pl file ?


______________________________________________

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

 

#23 06-16-2004 12:22:04

csherwood123
Member
Registered: 10-22-2002
Posts: 235

Re: Options Display Within View Cart

I guess I may need to look at the ste_order.pl file and see if I can figure out what's going on there.

The only changes I've made for this mod so far have all been confined to the  ste_cart.pl file. The changes have successfully modified the formatting in the cart and the invoice, but the emails seem to be ignoring the new formatting when the Option added includes more than one selection.

Seems odd.


Offline

 

#24 06-16-2004 12:30:19

nav
Banned
Registered: 04-07-2004
Posts: 666

Re: Options Display Within View Cart



but the emails seem to be ignoring the new formatting when the Option added includes more than one selection.

That is the problem, right there. smile

You would need to add the <BR> tags into ste_order.pl file in the orders and invoices display as well to accomplish this. Nick recently posted a MOD regarding the orders & invoice presentation from ste_order.pl file.

It looks much better this way. 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

 

#25 06-21-2004 14:26:44

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

Re: Options Display Within View Cart

I don't see $sel_name being added to $cart_prodoptions in that code.  Is it further down in the code?


Nick Hendler

Offline

 

Board footer