AdditionalInfo - AdditionalInfo4

Get help with nopcart formatting or style related issues.

Moderators: Koibito, Stefko, Randy

AdditionalInfo - AdditionalInfo4

Postby xeokeri » Sun Sep 14, 2003 12:02 am

It is very important for my site structure to be able to seperate the ADDINFO, ADDINFO2, ADDINFO3, ADDINFO4 to make their own lines instead of being appended to the field[3] with field[5].

The end result would be something like this.

Style field[5]
Type field[7]
Color field[8]
Size field[9]


I was thinking of doing it with the example from axiom82 with the thumbnail in cart, which I am very thankful to axiom for that bit.

Code: Select all
      Token0 = database.indexOf("|", 0);
      Token1 = database.indexOf("|", Token0+1);
      Token2 = database.indexOf("|", Token1+1);
      Token3 = database.indexOf("|", Token2+1);
      Token4 = database.indexOf("|", Token3+1);
      Token5 = database.indexOf("|", Token4+1);
      Token6 = database.indexOf("|", Token5+1);
      Token7 = database.indexOf("|", Token6+1);
      Token8 = database.indexOf("|", Token7+1);

      fields = new Array;
      fields[0] = database.substring( 0, Token0 );
      fields[1] = database.substring( Token0+1, Token1 );
      fields[2] = database.substring( Token1+1, Token2 );
      fields[3] = database.substring( Token2+1, Token3 );
      fields[4] = database.substring( Token3+1, Token4 );
      fields[5] = database.substring( Token4+1, Token5 );
      fields[6] = database.substring( Token4+1, Token6 );
      fields[7] = database.substring( Token4+1, Token7 );
      fields[8] = database.substring( Token5+1, Token8 );
      fields[9] = database.substring( Token5+1, database.length );

      if ( fields[0] == strID_NUM &&
           fields[2] == strPRICE  &&
           fields[3] == strNAME   &&
           fields[5] == strADDTLINFO
           fields[7] == strADDTLINFO2
           fields[8] == strADDTLINFO3
           fields[9] == strADDTLINFO4
         ) {
         bAlreadyInCart = true;
         dbUpdatedOrder = strID_NUM    + "|" +
                          (parseInt(strQUANTITY)+parseInt(fields[1]))  + "|" +
                          strPRICE     + "|" +
                          strNAME      + "|" +
                          strSHIPPING  + "|" +
                          strADDTLINFO + "|" +
                          strADDTLINFO2+ "|" +
                          strADDTLINFO3+ "|" +
                          strADDTLINFO4+ "|" +
                          strIMAGE;


I know it is possible to do this, but my process I performed caused the cart view to fault out.

If anyone has a clue on how to do this, please help. It's much needed.

- X
xeokeri
 
Posts: 20
Joined: Thu Jun 05, 2003 10:01 pm
Location: Muskegon, Michigan USA

Postby Stefko » Sun Sep 14, 2003 12:35 am

Your on the right track, you will have to change this in each function, looks like 4 different function plus any where the ADDITIONINFO is referenced.
Can be done with a little time! And much debugging!!
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Additional.....

Postby xeokeri » Sun Sep 14, 2003 4:09 am

I am attaching my test nopcart.js file that I was working on before I sent the first post. I had included the parts into all the needed sections, but I might have missed something somewhere, or put something in wrong, cause I also did a change to the strADDINF0 += sections.

Let me know where my mistake is.

And remember, this script is modded to work within my iframed site with a dynamic updateing process.

----

It's not showing as attached, so I put the link to a copy here.

http://www.xirtz.com/nopcart/nopcart.js.txt

----

- X
xeokeri
 
Posts: 20
Joined: Thu Jun 05, 2003 10:01 pm
Location: Muskegon, Michigan USA

Postby Stefko » Sun Sep 14, 2003 5:32 am

// Xeon Xai 09/13/2003
if ( thisForm.ADDITIONALINFO4 == null ) {
strADDTLINFO4 = "";
} else {
strADDTLINFO4 = thisForm.ADDITIONALINFO2[thisForm.ADDITIONALINFO4.selectedIndex].value;
}
// End mod.

Should be 4
Your 3 userentry"s should follow these lines of code since it is your database.length, ADDITIONALINFO4 should be in the standard default format!
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

I got it working... with your help.

Postby xeokeri » Mon Sep 15, 2003 8:57 am

I got it working just need to get it more organized.

I notice too that since with the addition fields[ ] entries, the thumnbnail in cart now is changed to fields[9] instead of fields[6].

Slowly getting to the end result. But your information has helped.

- X
xeokeri
 
Posts: 20
Joined: Thu Jun 05, 2003 10:01 pm
Location: Muskegon, Michigan USA


Return to Help: Formatting and Style

Who is online

Users browsing this forum: No registered users and 0 guests

cron