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.
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.
Offline
Ok, just got it worked on both. Give me your FTP info and I'll make it work.
Offline
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
Ok, I'll post them here.
Offline
Yes, I prefer to have you post on this forum instead of divulging my account info. Thanks.
Offline
scoutch,
you mentioned that you got this working for TIKI, would you mind posting the mod here? thanks.
Offline
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.
Offline
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.
Offline
In the file ./cgi-bin/library/modules/ste_cart.pl in the routine 'ste_cart_add_cgi_api_proc' look for:
$cart_prodoptions .= "$display_name: $field_value; ";
And change to:
$cart_prodoptions .= "$display_name: $field_value<BR>";
Then look for:
$cart_prodoptions .= "$sel_name; ";
And change to:
$cart_prodoptions .= "$sel_name<BR>";
Then look for:
$cart_prodoptions .= "; ";
And change to:
$cart_prodoptions .= "<BR>";
Then find:
if ($cart_prodoptions ne "") { chop($cart_prodoptions); chop($cart_prodoptions); } ######### End of if statement.
And change to:
if ($cart_prodoptions ne "") { chop($cart_prodoptions); chop($cart_prodoptions); chop($cart_prodoptions); chop($cart_prodoptions); } ######### End of if statement.
Offline
I added that yesterday on my file actually hehe !
Offline
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?
Offline
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.
Offline
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.
Offline
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.
Offline
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:
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?
Your time and expertise are appreciated. Thanks in advance!
-chip
Offline
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
How about adding the new entry like this :
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 ?
Offline
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:
} 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
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 ?
Offline
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
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.
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.
Offline