PDA

View Full Version : Other Info Lost


nielsnorby
05-Dec-2003, 10:24 PM
Hi, any help would be appreciated. When adding items to my cart, I require engraving instructions (other info prompt) to continue. When you put it in and proceed straight to checkout, it works fine, but if you click on view cart(basket) it looses the other info (engraving instructions) information. Any ideas what causes this?:confused:

website is www.sdtrophy.com

NormanRouxel
05-Dec-2003, 11:40 PM
You're using patched Perl scripts and modified Design / Text.

You'll have to post the version of Actinic you're using and the details of what changes you made (copy and paste from whatever instructions you followed) before anyone can help.

Norman

nielsnorby
06-Dec-2003, 07:08 AM
I am using version 6 of business. The only patching of perls I did was the one for the cascading menu system. Got in over my head so thought I went back and replaced the orginal pearls. Guess I didn't. Does this help in being able to correct my problem?:rolleyes:

NormanRouxel
06-Dec-2003, 12:10 PM
The Cascading Menu doesn't require any Perl patches (if you mean NorTree or NorCascade that is). I wrote that so I can help if you want to get it working. Best to post a separate topic for this.

You've done something to replace the standard single-line Other Info Prompt with a textbox.

The way you do this has to change depending on whether you're running 6.1.3 or lower (Actinic changed the way the Other Info Prompt works slightly with 6.1.3).

You'll need to check and report the actual version number (see Help / About).

It may also help to post what you've got in Design / Text / Go to / Phase -1, ID 2161.

Norman

p.s. The thread http://community.actinic.com/showthread.php?s=&threadid=4508 also has someone with exactly your problem.

nielsnorby
06-Dec-2003, 03:32 PM
Norman,
I followed your P.S. link and that fixed my problem.
I'm sure others have said this, but I just wanted to say

THANK YOU! You're Awesome.

You are much appreciated!!!!!!!!!!!!!!
:D

NormanRouxel
06-Dec-2003, 05:22 PM
That 6.1.3 patch was Actinic's one. However there seems to be a bug in it. If you enter some new lines into that textarea spurious <BR> line appear in the Cart pages.


I think I've fixed it - the new patch is here:-

The updated fix for 6.1.3 onwards is:

1. Go to 'Design | Text'

2. Click 'Go To' and in the ID field enter '2161'.

3. It should highlight a line that says find a line that says:
%s<INPUT TYPE=text NAME="%s" SIZE="%d" MAXLENGTH="%d" VALUE="%s" %s>

4. Change the prompt to read:
%s<textarea NAME="%s" ROWS="5" COLS="40" %d MAXLENGTH="%d">%s</textarea>

5. Click 'OK' to save your changes.

6. Now go into your 'Site1' folder and locate a file called 'ActinicOrder.pm'. Open it in Notepad.

7. Search for '2161', you should see...
$sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, $sStyle);

8. Comment out this line by preceding it with a #.

9. Insert the following immediately after the above line...
$sHTML = ACTINIC::GetPhrase(-1, 2161);
$sHTML =~ s/%d/%s/;
$sValue =~ s/%0a//ig; # we seem to need to remove some Line Feeds here
$sHTML = sprintf( $sHTML, "", $sIndex, $sStyle, 1000, $sValue);

10. Save the file and then upload your Actinic store.

If you've installed the prior version then you don't need to redo the whole thing. Just edit ActinicOrder.pm and replace the line

$sHTML =~ s/>MyText/>/i;

with

$sValue =~ s/%0a//ig; # we seem to need to remove some Line Feeds here


Norman

Ravon
11-Jan-2004, 05:31 PM
hello Norman,

I have used your new patch but as it works correctly on the view cart and reciept page, the text isn't right in the emails.

i get the following layout in the emails like below:

Mr Norman Allen
%0a6 Cherry
Walk
%0aChanterhill
%0aEnnisk-
llen
%0aFermanagh
%0aBT74 4BJ

even though it shows it like this on my reciept page etc.

Mr Norman Allen
6 Cherry Walk
Chanterhill
Enniskillen
Fermanagh
BT74 4BJ


any suggestions would be much appreciated

regards

NormanRouxel
11-Jan-2004, 06:36 PM
Actinic should really fix this as they have it in their Advanced Guide.
However while they get round to it try this:-

Edit orderscript.pl

look for:-

if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0)
{
MailOrderLine( "",
$$pProduct{'OTHER_INFO_PROMPT'} . "\r\n " . $CurrentItem{'INFO'},


Change to:-

if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0)
{
my $PatchIt = $CurrentItem{'INFO'};
$PatchIt =~ s/%0a//ig;
MailOrderLine( "",
$$pProduct{'OTHER_INFO_PROMPT'} . "\r\n " . $PatchIt,

I've not tested this so back up orderscript.pl before you try this.

Norman

Ravon
11-Jan-2004, 06:56 PM
thanks for that. it removes the %0 but it cuts off some letters at the start and also parts of it are moved onto another line. when in view cart they aren't

NormanRouxel
11-Jan-2004, 08:06 PM
Any chance of posting what actually happens like you did earlier with the Norman Allen example?

Or post a URL so I can see for myself.


Norman

Ravon
11-Jan-2004, 08:19 PM
url is custom-stamps.co.uk (http://www.custom-stamps.co.uk)

text came out like

Mr Norman Allen
6 Cherry
Walk
Chanterhill
Enniskillen
-
ermanagh
BT74 4BJ

NormanRouxel
11-Jan-2004, 08:48 PM
In that patched orderscript.pl as above replace


$PatchIt =~ s/%0a//ig;


with

$PatchIt =~ s/%0a/\r\n /ig;



I've tested that here and it works OK. Any other formatting problems may be due to there only being a limited amount of room on each line.

Norman

NormanRouxel
11-Jan-2004, 08:49 PM
For anyone else reading this thread here's the entire patch.

The Textarea as Other info Prompt updated (11-01-04) fix for 6.1.3 onwards is:

1. Go to 'Design | Text'

2. Click 'Go To' and in the ID field enter '2161'.

3. It should highlight a line that says find a line that says:

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

4. Change the prompt to read:

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

5. Click 'OK' to save your changes.

6. Now go into your 'Site1' folder and locate a file called 'ActinicOrder.pm'. Open it in Notepad.

7. Search for '2161', you should see...

$sHTML = ACTINIC::GetPhrase(-1, 2161, "", $sIndex, 35, 1000, $sValue, $sStyle);

8. Comment out this line by preceding it with a #.

9. Insert the following immediately after the above line...

$sHTML = ACTINIC::GetPhrase(-1, 2161);
$sHTML =~ s/%d/%s/;
$sValue =~ s/%0a//ig; # we seem to need to remove some Line Feeds here
$sHTML = sprintf( $sHTML, "", $sIndex, $sStyle, 1000, $sValue);

10. Save the file.

11. Now go into your 'Site1' folder and locate a file called 'orderscript.pl'. Open it in Notepad.

12. Look for:-

if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0)
{
MailOrderLine( "",
$$pProduct{'OTHER_INFO_PROMPT'} . "\r\n " . $CurrentItem{'INFO'},


13. Change to:-

if (length $$pProduct{'OTHER_INFO_PROMPT'} > 0)
{
my $PatchIt = $CurrentItem{'INFO'};
$PatchIt =~ s/%0a/\r\n /ig;
MailOrderLine( "",
$$pProduct{'OTHER_INFO_PROMPT'} . "\r\n " . $PatchIt,

14. Save the file and then upload your Actinic store.

Norman

Ravon
11-Jan-2004, 09:09 PM
thanks Norman for that