Engraving Add On. V1.22. For Actinic V9.0.2.
This patch adds a number of text entry fields to the website products.
The number of characters in these fields will be counted and used to surcharge that product.
The Field Length, optional Description, Free Characters, Pence per Additional Character,
Maximum Displayed Width and Extra Width can all be set via Variables.
INSTALLATION
This patch contains modified Perl files for Actinic V9.0.2 only.
Don't install these Perl files on other versions.
The other files should work with Actinic version V9.0.0 onwards.
It would be a good idea to make a Snapshot and to copy all of Site1 somewhere safe
before doing anything below.
The following files are replaced or modified so back them up first:
ActinicOrder.pm
Cart.pm
OrderScript.pl
ShoppingCart.pl
Unzip this Zipfile into your Site folder.
(1) Run Actinic and do File / Snapshot / Import Site
Choose the file EngravingAddOn.acd (from your Site folder) and proceed with the import.
The import should have a description:
Engraving Add On. Partial Site Design.
Safe to import into an existing site.
(c) 2007, 2008 Drillpine Ltd - www.drillpine.biz
Close down Actinic and Re start it.
(2) In the Actinic Content Tree, click on any Product Section.
Then select the Design Tab, then the Design Tree (bottom right).
Click the top of the Design Tree (on default site - "Works Best with Reflective").
In the Layout Code window look for the line (about line 65 - NOT the
line near the top):
Paste the following above it.
(3) Look in your Overall Layout for the fragment (it's in the line):
onload="
amend it to read (leave the rest of the line intact)
onload="refreshcounts();
Click Apply.
(4) Go to Design / Library / Layouts / Products / ProductLayout / Values
In the Available Layout Names, select Standard Layout Using CSS with Engraving
and click the [>] arrow to move it to Layouts Offered By This Selector. OK out.
That's installation finished.
INITIAL SETUP
In Settings / Site Options / Engraving Charge, set the variable EngravingVatFactor as below
If your site uses product prices entered Excluding tax and you show:
VAT Inclusive Product Prices Vat Exclusive Product Prices
1.175 1
(enter engraving charges INCLUDING VAT) (enter engraving charges excluding VAT)
If your site uses product prices entered Including tax and you show:
VAT Inclusive Product Prices Vat Exclusive Product Prices**
1 0.8511
(enter engraving charges including VAT) (enter engraving charges EXCLUDING VAT)
**The informative engraving pricing in the Cart will be displayed excluding VAT.
OPERATION
Just use layout Standard Layout Using CSS With Engraving
for the products you want an engraving applied to.
You can change Variables
Line1Length the number of charcters allowed
Line2Length "
Line3Length "
Line4Length "
Line5Length "
FreeChars the number of free characters (use 0 if all are chargeable)
PencePerChar pence per additional character
EngravingCharge price in pounds for setup (use 0 if no charge)
MaxSize maximum width (characters)to show any field at
Overlap extra character space (allows for wide characters - leave at 10)
to different values if required. You can do this at the Site, Section or Product level.
If you use small values for PencePerChar or EngravingCharge then always us a leading
zero; e.g. 0.50, 0.99, etc.
If you want to have fewer text entry lines on a product then set the Value to empty on
Line5Length, Line4Length, etc (starting from end).
If you have these Properties set at the Section or Global level and you want to remove them
from a particular product, enter them for that product but set the value to empty.
NOTES
The properties can be set on a global, per-page (Section) or per-product basis.
If you are using per-page properties you MUST set them on the actual page (Section).
Do not rely on them being carried through from a higher level page (Section).
LAYOUT
It is very easy to add the Engraving option to any other product layout.
Just insert layout "Engraving Option" where you want this to appear.
ADVANCED CUSTOMISATION
It is possible to use a Choice to set the style for the text input boxes.
You might want to do this to show the engraving text in alternative fonts.
To do this simply add the style code to each Choices EngravingTextStyle field.
Your first style should match the default (Arial) set in textfieldsupport.js
E.g.
Attribute called Font, Choices set as below:-
Choice Name EngravingTextStyle
Arial font-family:Arial
Palatino font-family:Palatino Linotype
Orbus font-family:Orbus Multiserif
or using images for these fonts
Choice Name HTML for Name EngravingTextStyle
Arial !!<
>!!Arial font-family:Arial
Palatino !!<
>!!Palatino font-family:Palatino Linotype
Orbus !!<
>!!Orbus font-family:Orbus Multiserif
The styles used for the text input area are controlled by variables at the top of textfieldsupport.js.
UPGRADING ACTINIC
If Actinic gets updated it is very likely that the Perl scripts (ActinicOrder.pm, Cart.pm,
OrderScript.pl, ShoppingCart.pl) will need to be re-patched. The patched code can be found
by looking for the string "norcat" in the ones from this zipfile.
Or contact me (Norman Rouxel) via rouxel@drillpine.biz
UNISTALLATION
Change all products that use layout "Standard Layout Using CSS With Engraving" to use another layout.
Restore the following files in your Site folder to their originals
ActinicOrder.pm
Cart.pm
OrderScript.pl
ShoppingCart.pl
Remove the following line from your overall layout (and any other Primary Templates that you use for products)
Also in your overall layout change the fragment in the tag from
onload="refreshcounts();"
amend it to read
onload=""
Go to Design / Library / Variables and delete all of Engraving Options.
Go to Design / Library / Layouts / Products and delete "Standard Layout Using CSS With Engraving".
Go to Design / Library / Layouts / Choices and restore Radio Button Choice to it's original value (right-click it to do this).
Delete the files textfieldsupport.js from your Site1 folder.
SNAPSHOT TECHNICAL DATA
Variables (* Selectors):
FreeChars
Line5Length
Line4Length
Line3Length
Line2Length
Line1Length
Overlap
EngravingTextStyle
EngravingVatFactor
Engraving Option *
MaxSize
EngravingCharge
PencePerChar
StartJavaScriptComment
EndJavaScriptComment
Property tabs:
Engraving Charge
Layouts:
Standard Layout Using CSS With Engraving
Drop Down Choice
Radio Button Choice
Drop Down Choice List
Engraving Option Code
CHANGE LOG
17-10-08 V1.22 Fail safe (to 1) if illegal EngravingVATFactor of 0 is entered.
Files changed
ActinicOrder.pm
Cart.pm
08-10-08 V1.21a No code changes. Updated readme for clearer description of Vat INC / EX
product prices, displayed prices and EngravingVatFactor values.
21-03-08 V1.21 Amended JavaScript to prevent spurious onclick on radio buttons.
Files changed
textfieldsupport.js (modified refreshcounts function)
21-03-08 V1.20 V9 Version.
Files changed
This ReadMe.
13-09-07 V1.20 Bugfix: JavaScript errors in Design Preview.
Fixed by replacing in Engraving Option Code
with Variables containing that text.
Layouts altered
Engraving Option Code
New Variables
StartJavaScriptComment
EndJavaScriptComment
28-08-07 V1.19 Bugfix: Zero values at Product level (e.g. EngravingCharge)
were being overridden by non-zero Section level ones.
Files changed
ShoppingCart.pl
28-03-07 V1.18 Bugfix: Duplicates weren't passing text to cart
(Switched back to using ProductReference instead of Anchor).
Files changed
textfieldsupport.js
Layouts altered
Engraving Option Code
19-02-07 V1.17 Improvement: Optimised Drop Down Choice code generation.
Files changed
textfieldsupport.js (only the selectchanged function)
Layouts altered
Drop Down Choice
16-02-07 V1.16 Added capability. Can now set text style via Drop Down Choices.
Files changed
textfieldsupport.js (added selectchanged function)
Layouts altered
Drop Down Choice Lists
Drop Down Choice
29-01-07 V1.15 Changed capability. Style on Radio Buttons now set by a variable.
Files changed
textfieldsupport.js (only the radioclicked function)
New variable
EngravingTextStyle
29-01-07 V1.14 V8 Version now operational. Based on Actinic V7 V1.13.
New variable EngravingVatFactor to allow Ex VAT / Inc VAT sites.
Files changed
ActinicOrder.pl
Cart.pm
26-10-06 V1.13 Bugfix. Patch didn't allow decimal values in PENCEPERCHAR and ENGRAVINGCHARGE.
Files changed:
ActinicOrder.pm
Cart.pm
07-08-06 V1.12 Code changes. Deal better with hiding / revealing.
Display price in red in Cart if any surcharge.
Files changed:
ActinicOrder.pm
textfieldsupport.js
07-08-06 V1.11 Using NETQUOTEVAR:PRODUCTANCHOR for reference detection.
Added button to hide / show engraving fields.
Added optional Engraving Charge.
Files changed:
Act_ProductLine_Engraved.html
ActinicOrder.pm
Cart.pm
OrderScript.pl
ShoppingCart.pl
textfieldsupport.js
this ReadMe.
29-12-05 V1.10 Future Compatibility: Changed HTML for Name code from to
Files changed:
textfieldsupport.js
this ReadMe.
26-12-05 V1.09 Tidy up. Added explanation on style changing.
Files changed:
this ReadMe.
26-12-05 V1.08 Tweak. Added background-color to text form fields as CartErrorXML was erronously highlighting these.
Moved some styles to top of JavaScript.
Removed template comment about 5 field limit (arbitary number now).
Files changed:
Act_ProductLine_Engraved.html
textfieldsupport.js
24-12-05 V1.07 New capability. Can add style to INPUT fields via radio button HTML for Name.
N.B. If this used you cannot have quotes anywhere in your Radio Button HTML for name fields (use ")
Replaced topounds() with tidier to2digits()
Added Onload handler to reset counts and fonts if page refreshed (IE needs this).
Added background-color to text form fields as CartErrorXML was erronously highlighting these.
Files changed:
textfieldsupport.js
this ReadMe (info on creating style entries, adding OnLoad function call)
Files added:
Act_VariantRadioButton.html
24-12-05 V1.06 New capability. Max number of fields (was 5) now only limited by number
of TEXTnLENGTH custom properties defined (and added to list in Act_ProductLine_Engraved.html)
Files changed:
textfieldsupport.js
ShoppingCart.pl
this ReadMe (info on creating additional TEXTnLENGTH entries)
24-12-05 V1.05 Compatibility. Use own topounds routine instead of less portable toFixed().
Files changed:
textfieldsupport.js
12-12-05 V1.04 Bugfix. $sNorcatSectionBlobName was typo'd in ShoppingCart.pl
Files changed:
ShoppingCart.pl
05-12-05 V1.03 Major Code change. Allow for some free characters. Readme amended to suit Engravers.
Moved price calculation to ShoppingCart.pl as this means less server load.
Char count and engraving charge now stored in Cart before text.
Added character count and engraving charge to Cart display.
Improved TEXTnLENGTH error detection.
Files changed:
ActinicOrder.pm
Cart.pm
OrderScript.pl
ShoppingCart.pl
textfieldsupport.js
28-04-05 V1.02 New feature. Added handleEnter routine to prevent incomplete Form submission
if Enter key pressed on text fields.
Files changed:
textfieldsupport.js
25-04-05 V1.01 Bugfix. Extra blank field was being shown if less than max used.
Files changed:
ShoppingCart.pl
05-04-05 V1.00 Initial release.