Page 1 of 3

Multiple other info fields

Posted: Fri Dec 16, 2005 7:07 pm
by skinnybloke
Hi - I am investigating using multiple other info fields for one site (v7.04) but cannot get it to display more than one box.

The problem page can be seen on my test site

http://www.handinglove.co.uk/acatalog/p ... _cars.html

The html code shows:
<script language=JavaScript>setotherinfo('<SPAN CLASS="actrequiredcolor">Number written on the ECU ( box ) | Number of pins on the original chip | Number written on the original chip | Chassis No. of car</SPAN>', 'NAME="O_3837">', '60', '1000')</script>
Is it the span tag that is causing the problem? If so where would it pick this up from?

Posted: Sat Dec 17, 2005 2:10 am
by norman
This patch relies on looking for the standard Actinic way of displaying the Other Info Prompt. In V6 and V7 this is usually something like:

<SPAN CLASS="actrequiredcolor"><BR>Name|Age|Sex<BR></SPAN>

and the patch picks out the bit between <BR> and the other <BR> which until your site have always surrounded the Prompt.

Now your site is generating

<SPAN CLASS="actrequiredcolor">Name|Age|Sex</SPAN>

so it looks like you've changed something in Design / Text to remove these <BR> tags - perhaps you wanted the prompt on the same line as the input box.

You can either:-

a) Replace the 2 <BR> tags so we ghet what's expected (this will affect the way these prompts are displayed throught your site)

2) change my JavaScript (the stuff you added to actiniccore.js)

replace the lines

Code: Select all

  var p1 = pre.indexOf('<BR>');
  var before = pre.substring(0, p1 + 4);  // before the prompt.
  var rest = pre.substr(p1 + 4);          // whats after the <BR>
  p1 = rest.indexOf('<BR>');              // final <BR>
with

Code: Select all

  var p1 = pre.indexOf('or">');            // look for tail of  <SPAN CLASS="actrequiredcolor">
  var before = pre.substring(0, p1 + 4);  // before the prompt.
  var rest = pre.substr(p1 + 4);          // whats after the <SPAN...>
  p1 = rest.indexOf('</SP');              // final </SPAN>
This is untested so it'll be up to you to try it out. Best look at your page with Firefox and use its Tools / JavaScript Console to check for bugs.

Posted: Sat Dec 17, 2005 3:55 pm
by Guest
Thanks Norman - that has sorted it.

Posted: Mon Dec 19, 2005 3:05 pm
by Guest
...or maybe not.

Everything displays ok but when I click on the "Add to Basket" button I get the error
error 500: Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.
I've tried swapping files and the problem is in Actinicorder.pm but I cannot see what I have done wrong. Has this been tested in 7.04?

Regards
David

Posted: Mon Dec 19, 2005 6:53 pm
by norman
It works fine on all Actinic V7 releases.

You've probably mis-patched ActinicOrder.pm. Start with a clean version (there's on in C:\Program Files\Actinic v7\Original) and try again. Be very careful when replacing entire subroutines to make sure you don't leave any of the old code there.

I can send correctly patched versions but will only do such work for people who've donated.

Posted: Wed Dec 21, 2005 5:41 pm
by Guest
Norman - how untrustworthy you have become - lol. My intention is to donate once my client has accepted the changes and made them live.

You may not remember me but I purchased Product Upsell and donated for dynamic product images for http://www.gentstuff.co.uk.

Regards
David

Posted: Wed Dec 21, 2005 5:42 pm
by Guest
oops - that should have been http://www.gentsstuff.co.uk

Posted: Wed Dec 21, 2005 6:03 pm
by norman
Hi David,

Sorry I didn't recognise you. It's hard for me to know who's who, when they post as "Guest".

Send me the clean ActinicOrder.pm (and a note of the Actinic Version it's from) and I'll send it back to you patched.

Posted: Fri Feb 24, 2006 1:09 am
by Jeff P
Norman:
Went to Actinic / Design / Test / HTML Phaase: -1 ID 2161
According to instructions it's supposed to read:

%s<INPUT TYPE=text NAME="%s" SIZE="%d" MAXLENGTH="%d" VALUE="%s" %s>

Instead it reads:

%s<textarea NAME="%s" ROWS="5" COLS="20" %d
MAXLENGTH="%d"> %s</textarea>

I'm using Developer 7.03.1.0.0FBIA.
Stopped as I didn't want to screw anything up.

Please advise.

Posted: Fri Feb 24, 2006 1:12 am
by norman
Jeff,

That code must be from someone trying to convert that box from a single line into a TEXTAREA field. Probably left behind from trying out something in the Advanced Guide.

Just note down what was in there and go ahead and change it as per the Multi-Other-Info patch.

Posted: Fri Feb 24, 2006 1:27 am
by Jeff P
Wow...that was fast...don't you sleep?

Will do.

Thanks.

Posted: Fri Feb 24, 2006 1:44 am
by Jeff P
Made the change to 2161 by copying and pasting
<script language=JavaScript>setotherinfo('%s', 'NAME="%s">', '%d', '%d')</script>

Get series of error messages "An Error has occurred in the script...etc.
First one says:
LINE: 245
Char: 10
Error: Expected ';'
Code: 0
URL: file//C:\Program Files\Actinic v7\Sites\Site 1\PreviewHTML\P_index.html

Should I ignore and go to the next steps of patching ActinicOrder.pm

Jeff

Posted: Fri Feb 24, 2006 3:29 am
by norman
You only need to patch the Perl scripts the .pm and .pl files once you want to upload to a server. For Preview testing just actiniccore.js and Design / Text / 2161 need patching.

From the error message you're getting either you've forgotten to patch actiniccore.js (or have patched it badly) or you have some unusual characters in your Other Info Prompt. Make sure you don't use single or double quotes ( ' or " ) in there.

Posted: Fri Feb 24, 2006 3:36 am
by norman
Another thing you can do to get better error diagnostics is to do a Page Preview. Then copy the URL from internet Explorer's address bar into Firefox and use Firefox's Tools / JavaScript Console to get decent diagnostics.

Posted: Fri Feb 24, 2006 11:34 am
by Jeff P
Ignore the above :oops:
Sat bolt upright in bed at 4 a.m. :shock:
Realized it had nothing...nothing...to do with the change to 2161.
Sorry...