PDA

View Full Version : Listing attributes in a column


datart
20-Jan-2003, 06:01 PM
Hi,

does anybody know how to make the attributes appear in a vertical column instead of a comma separated line ? I can't seem to find the code that constructs this line and throws in all those commas.
My shooping cart looks very complex as the attributes show values with commas (used instead of decimal point in Sweden) and so there are commas everywhere. Very confusing to read.

Also the same applies to the final receipt.

Thanks in advance.

Mike

TraceyG
21-Jan-2003, 02:21 PM
Hi Mike,

I'm not sure what you mean, can you post the URL so I can take a look.

datart
21-Jan-2003, 04:42 PM
What I mean is that each product (spectacles actually) has lots of parameters to choose from to suit the customers prescription. When they click the buy button and they go to the confirmation page the order details is displayed in one long line e.g.

Model 43
Ax - 10,00, SF - 13,00, PD - 21,00, etc. etc

instead of what I would like which is

Ax - 10,00
SF - 13,00
PD - 21,00

you see.

Strangely it apears perfectly in the email reciept.

NormanRouxel
22-Jan-2003, 01:11 AM
That comma is probably in the Perl scripts (ActinicOrder.pm I think). Are you sure you want to patch them. Actinic (rightly) won't support patched Perl scripts.

Norman

datart
22-Jan-2003, 02:06 PM
Can anybody else confirn that this script inserts the comma.

I'm happy to edit the script if I know which one it is.

NormanRouxel
22-Jan-2003, 04:16 PM
It's done in ActinicOrder.pm as I guessed but is overridden if the file ActinicSCCode.fil exists. My patch involves substituting a very unusual character "¬" for the comma and then replacing that with the HTML <br> when the list is displayed. Don't use "¬" in your attribute names or values (but who would?).

Warning this involves editing the Perl scripts that Actinic uses.
Actinic (rightly) doesn't support patched scripts.

I've attached these instructions becase the forum is munging the text.

Norman

Note to Forum administrator. Aaaargh there's a buglet in the way the forum displays stuff with HTML escaped characters.

If I have an HTML escape sequence e.g. "Ampersand nbsp semicolon" (I've had to write this in longhand because of said problem) within the text of a message or even within code .. /code tags. it is always displayed on screen as the corresponding single character and not as the escape sequence.

datart
22-Jan-2003, 08:35 PM
That works out great on the shopping cart and order pages thanks.

But it wasn't actually what I was looking for.

What I actually need is the same effect when the confirmation page is displayed. i.e. the page that appears immediately after you click "Buy" .
This is the page that shows you the product you ordered with any attributes and then prompts you for a quantity etc.

And after that little problem is solved, I would be nice to display it in the same way on the invoices and order details once they are downloaded.

thanks in advance.

Mike

NormanRouxel
22-Jan-2003, 11:24 PM
What I actually need is the same effect when the confirmation page is displayed. i.e. the page that appears immediately after you click "Buy" .
This is the page that shows you the product you ordered with any attributes and then prompts you for a quantity etc.

Attached is a new readme that fixes that too.

And after that little problem is solved, I would be nice to display it in the same way on the invoices and order details once they are downloaded.

And jam on it too;). Sorry - too much work to do for free.

Norman.

datart
23-Jan-2003, 07:46 AM
Thanks for that,

I'm quite happy to code it my self if I'm pointed in the right direction. You have already gone above and beyond the call of duty.

Cheers

Mike

NormanRouxel
23-Jan-2003, 09:23 AM
In OrderScript.pl find the approriate (maybe all) lines containing

FindComponent($_,$VariantList);

And add extra string parameter after $VariantList containing New Line (maybe CRLF) sequence

FindComponent($_,$VariantList,"\n");

you might need "\r\n" instead.

Norman

datart
23-Jan-2003, 09:33 AM
Thanks for that, I'll give it a go.

(can't really work out why it's not standard)

Mike

NormanRouxel
23-Jan-2003, 01:24 PM
can't really work out why it's not standard

Probably because Actinic has been around since 640x480 was the standard and they didn't want to take up too much screen space.

Norman

brookbab
08-Nov-2007, 12:33 PM
Is it possible to get this working to the same effect in v8?

NormanRouxel
08-Nov-2007, 10:37 PM
Possibly. I've a feeling it's only ActincOrder.pm that needs fixing nowadays.

However it's 4 years between the prior post and yours so it may be hard to locate the code to tweak.