PDA

View Full Version : order numbers


web@ack
09-Dec-2003, 12:01 PM
hi

is there any way in actininc to customize the order numbers that are sent through the shop rather than random letters and numbers?

thanks

Menar
09-Dec-2003, 12:33 PM
Hi there,

Please click on the link below for previous discussions.

Click HERE (http://community.actinic.com/showthread.php?s=&threadid=2254&highlight=order+number)

Hope this helps

web@ack
09-Dec-2003, 01:07 PM
The order number is generated by OrderScript.pl. There is the code fragment

code:-------------------------------------------------------------------------------- $::s_sOrderNumber = $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) .
substr("0000000" . $nCounter, -7);--------------------------------------------------------------------------------
which assembles the final number. You can alter this line if you have some perl knowledge. But you must be very carefull here (and note that Actinic doesn't support any script customisation).

I hope this helps.


Rather than it display the initials and postcode, i want to change it to a set number/letter sequence so it is the same sequence everytime, well apart from the number

would it be like this?

code:-------------------------------------------------------------------------------- $::s_sOrderNumber = TT93HO . substr($$::g_pSetupBlob{CGI_ID}, -1) .
substr("0000000" . $nCounter, -7);--------------------------------------------------------------------------------

?

Menar
09-Dec-2003, 03:56 PM
Hi there,

Your perl seems correct although I am not an expert, therefore I would not be able to comment also there is no support for modified perl script. However, as I understand the core part is the counter;

substr("0000000" . $nCounter, -7);

This would be more of an 'trial and error' process, unless anyone with the knowledge of perl can comment.

Note: Original perl scripts are kept in, Actinic Ecommerce V6|Original folder.

web@ack
09-Dec-2003, 04:08 PM
Tried it as i typed above but it threw up an error when running it.

anyway i could maybe define new variables somewhere in the script? would that work?

thanks

rmladden
09-Dec-2003, 04:29 PM
You need to put your character constant in quotes.


$::s_sOrderNumber = "TT93HO" . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000000" . $nCounter, -7)

matperino
15-Jul-2005, 12:04 PM
Hi everybody,

I would like to trim off as many characters as possible in the order number (so that order numbers are shorter and easier to use).

Can somebody give me the correct code for that?

Thanks in advance!

Nadeem
19-Jul-2005, 09:02 AM
Hi there

Is this for version 7? or version 6? Both script have had major changes, i will ask the development team if this can be done, but it may not be possible, so please bear that in mind.

Kind Regards

matperino
19-Jul-2005, 12:41 PM
Hi,

I'm on Developer version 7.0.1.0.0.0.EGSA

Thanks for your help.

Nadeem
19-Jul-2005, 01:31 PM
Hi there

Okay am finding out the information

Kind Regards

Nadeem
20-Jul-2005, 10:09 AM
Hi there

You can shorten the order number of an order if you like. To do this, open "OrderScript.pl" and on line 6209 you will have the following:
$::s_sOrderNumber = $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000000" . $nCounter, -7);

So as an Example if you want the first 3 letters to be "ACT" and shorten it, so the whole number of would order would be 8 characters instead of 11 characters then you would make the following change:


$::s_sOrderNumber = "ACT" . substr($$::g_pSetupBlob{CGI_ID}, -1) .
substr("0000" . $nCounter, -4);

You can take bits out, but you cannot extended it.

Hope this helps. Remember to backup the original orderscript.pl just in case something happens, i have tested this on my version and it works fine :)

Kind Regards

matperino
21-Jul-2005, 07:18 AM
:) :) Thanks a lot!
Works perfect.

stonda
25-Jun-2007, 02:29 PM
I add this part of code in orderscript.pl in version 7 and version 8.04. I worked perfectly.
I upgraded on friday to 8.5.1 : and get now an order number with 14 digits (instead of 8 before), so it seems that it doesn't work on this version ?
Is there a perl specialist on the forum to help me : my bank cannot accept more than 8 digits !!!

Bruce
26-Jun-2007, 10:15 AM
You will have to redo the changes you made on 8.0.4.

Kind regards,

stonda
28-Jun-2007, 11:49 AM
Ok done. Thanks

Darren B
28-Jun-2007, 07:46 PM
If you want it to take the 1st four digits of the postcode then open the orderscript.pl file and find the line


$sPostCode = substr($sPostCode, -4, 4);

change the -4 to 0 and it will read from the start of the postcode

hope this might help some of you

D

knighton620
04-Jun-2008, 01:17 PM
Thats great- thanks v much for the quick reply.

John

jont
05-Jun-2008, 07:41 AM
Thats great- thanks v much for the quick reply.

Has something been deleted as the previous post was 11 months ago :confused:

leehack
05-Jun-2008, 08:01 AM
Has something been deleted as the previous post was 11 months ago :confused:

You thinking processed meat?

TraceyHand
05-Jun-2008, 08:11 AM
pmsl..you cynic!
Actually, the reply is in response to a post, in a different thread, which had pointed to this thread as a solution to it.
The poster obviously posted their thanks in the wrong thread, that's all

and I thought I was cynical!
:p

jont
05-Jun-2008, 09:12 AM
the reply is in response to a post, in a different thread

...similar to the game of giving the answer to the previous question?

leehack
05-Jun-2008, 09:13 AM
Nothing has been deleted Jont.

jont
05-Jun-2008, 10:09 AM
Navigate to the outer layout and find the OUTERLAYOUT variable.... add your code above there.

jont
05-Jun-2008, 10:10 AM
Where do I put the checkout progress indicator.

leehack
05-Jun-2008, 10:14 AM
In the fridge to keep it cool.

jont
05-Jun-2008, 10:24 AM
Where is your Curly Wurly.

leehack
05-Jun-2008, 10:29 AM
The guy fixing the roof tiles robbed it for his pet snake.

jont
05-Jun-2008, 10:32 AM
How are you getting on with the Laser Mouse?

leehack
05-Jun-2008, 10:34 AM
It's OK until there is a real downpour and then frankly its waterproofness goes out of the window and it turns into a flannel.

jont
05-Jun-2008, 10:37 AM
Did you get that Marquee for Travis' birthday party? Hopefully the weather will be nice.

leehack
05-Jun-2008, 10:39 AM
I'm thinking of getting a marquee for Travis's birthday party, fingers crossed the weather is good.

jont
05-Jun-2008, 10:52 AM
Get yourself a Pinata from Party Pete and hang it from the roof ... violence with sweets .. everyone is happy :cool:

leehack
05-Jun-2008, 11:02 AM
Got any ideas on what i could get from Party Pete's to make people smile?

gabrielcrowe
05-Jun-2008, 11:18 AM
Magnetic Accelerator gun (Acc-Mag), a firearm in a museum exhibit noted as being one of the most efficient rifles ever invented, though it takes an extremely long time to reload. When used by Simon Phoenix, it appears rather unwieldy and impractical, though this may be attributable to Phoenix's unfamiliarity with the futuristic weapon.

jont
05-Jun-2008, 11:24 AM
Anyone read the article in the Sun about our men in Iraq being outfitted with what is essentially a Trebuchet for the 21st century? Surely we have something more efficient they can use?

TraceyHand
05-Jun-2008, 11:25 AM
pink!
:eek:

leehack
05-Jun-2008, 11:28 AM
What's your favourite colour Bumpsy?

jont
05-Jun-2008, 11:42 AM
Magnetic Accelerator gun (Acc-Mag), a firearm in a museum exhibit noted as being one of the most efficient rifles ever invented, though it takes an extremely long time to reload. When used by Simon Phoenix, it appears rather unwieldy and impractical, though this may be attributable to Phoenix's unfamiliarity with the futuristic weapon.

Stallone uses a TV. What does Snipes use?

Darren B
05-Jun-2008, 11:42 AM
ok im seriously thinking i need to start on the pills again

leehack
05-Jun-2008, 11:44 AM
Darren you've not been yourself lately, do you think some medication would help?

Darren B
05-Jun-2008, 11:46 AM
i have not been feeling the best lately

leehack
05-Jun-2008, 11:53 AM
How are you lately Darren?

TraceyHand
05-Jun-2008, 12:00 PM
I thought he'd been banged up

Darren B
05-Jun-2008, 12:05 PM
well its nice to see you all again

jont
05-Jun-2008, 12:07 PM
How are those new glasses Darren?

Darren B
05-Jun-2008, 12:08 PM
Was thinking of getting some new glasses actually

leehack
05-Jun-2008, 12:08 PM
Darren you should have gone to Specsavers.

jont
05-Jun-2008, 12:09 PM
Where did Darren go?

leehack
05-Jun-2008, 12:11 PM
Anyone fancy playing hide and seek?

Darren B
05-Jun-2008, 02:46 PM
I've been playing hide and seek

leehack
05-Jun-2008, 02:47 PM
What you been up to Darren?

Darren B
05-Jun-2008, 02:49 PM
i feel like playing games today

leehack
05-Jun-2008, 02:51 PM
What shall we do Taddy?

Darren B
05-Jun-2008, 03:40 PM
sheesh i was nearly late for work this morning

leehack
05-Jun-2008, 03:43 PM
Anything happened today Taddy?

Jan
05-Jun-2008, 04:00 PM
sheesh i was nearly late for work this morningBut luckily you forgot to go home last night, so you were already there?

Regards,

Darren B
05-Jun-2008, 04:12 PM
ooooooooooooooh hi ya Jan, were ya been

i had frosties for breakfast and they were scrummy

TraceyHand
05-Jun-2008, 04:13 PM
hey D :)
What did you do when you woke up this morning?

jont
05-Jun-2008, 04:16 PM
hey D :)
What did you do when you woke up this morning?

<off topic>how that was the Frosties reference and not seeing Jan just after waking up :eek: </on topic>

Darren B
05-Jun-2008, 04:27 PM
I slept like a log

ignoring jonts comments for fear of incrimination

TraceyHand
05-Jun-2008, 04:34 PM
<off topic>how that was the Frosties reference and not seeing Jan just after waking up :eek: </on topic>

<off topic and not much caring as she doesn't know what the topic is anyway>
Quite honestly, jont, I have no fricken idea what the game is...I just wanted to join in :D <end waffle>

Jan
05-Jun-2008, 06:33 PM
I've been here Darren, not had much to say though.

Darren B
06-Jun-2008, 06:46 AM
I've been here Darren, not had much to say though.

Ponders that, not sure, checks Jans Gender, ponders some more, and decides Jans not much to say is probabaly different to darrens much to say ;)

TraceyHand
06-Jun-2008, 08:16 AM
decides Jans not much to say is probabaly different to darrens much to say ;)

I seriously, seriously doubt that! :p
You gab like a woman, D :D

essentialoils
03-Sep-2009, 08:46 PM
Hi there

You can shorten the order number of an order if you like. To do this, open "OrderScript.pl" and on line 6209 you will have the following:
$::s_sOrderNumber = $sInitials . $sPostCode . substr($$::g_pSetupBlob{CGI_ID}, -1) . substr("0000000" . $nCounter, -7);

So as an Example if you want the first 3 letters to be "ACT" and shorten it, so the whole number of would order would be 8 characters instead of 11 characters then you would make the following change:


$::s_sOrderNumber = "ACT" . substr($$::g_pSetupBlob{CGI_ID}, -1) .
substr("0000" . $nCounter, -4);

You can take bits out, but you cannot extended it.

Hope this helps. Remember to backup the original orderscript.pl just in case something happens, i have tested this on my version and it works fine :)

Kind Regards
I have tried this. It works, except it places a 1 before the 0000

Is this an errror message? How do I get rid of the 1

TraceyHand
03-Sep-2009, 08:53 PM
the 1 is coming from the script ID.
If you want to remove it, remove substr($$::g_pSetupBlob{CGI_ID}, -1) . from the code

you might want to extend the 0000 to 00000 though or you'll only get to order number 9999 and then it'll reset again.

essentialoils
03-Sep-2009, 09:53 PM
Thank you tracy! very kind of you to answer.

$::s_sOrderNumber = "" .
substr("00000" . $nCounter, -5);

This is what the Doctor ordered.

--

A note on the order #: After 3 years of using actinic and receiving 1000's of Orders:

Use and Sorting the original Long number is basically useless. Why?

1. Customs change there name, and address.
2. Actinic Link to Sage puts the useless beginning in Sales order number and had to copy and paste the end.
3. Tired of listening to customers tiring to say the long number and having to say the last numbers.

--

Special note on external reference:

1.) This is the most important constant for a company search and sort.

In customer accounts The external reference Is the basic constant (along side the name which should have been merged and called Account Reference.) Used also in Sage.

It should be before or after the order number on the Orders Tab.

Then you could sort, search and export correctly and usefully.