28-11-02 - WidthTimesDepth_ProductLine.txt - Norman Rouxel rouxel@attglobal.net The following template will allow two form fields containing a Width and Depth to be entered and their product passed as the Other Info Prompt text. It would be easy to amend this to calculate volumes. This you need the section set to display Quantity on Product Page and Other Info Prompt set to something like "Dimensions:". It would be possible for someone to alter these values at Display Cart page. They could alter the total Quantity or Other Info Prompt. While this would not affect the value of the order it might create misleading details. To prevent this you can edit ActinicOrder.pm to make these fields uneditable for such products. Info on doing this is at the end of this readme. Save the following template with a name like AreaProductLine.html and select it in your product dialogue. NETQUOTEVAR:INCLUDE Act_ProductSeparator.html NETQUOTEVAR:ENDSEPARATOR NETQUOTEVAR:PRODUCTFORMBEGIN NETQUOTEVAR:TEMPLATEBEGINXML NETQUOTEVAR:PRODUCTIMAGE NETQUOTEVAR:PRODUCTNAME NETQUOTEVAR:PRODUCTREF
NETQUOTEVAR:PRODUCTDESCRIPTION NETQUOTEVAR:EXTINFOLINK
NETQUOTEVAR:EXTINFOBUTTON
NETQUOTEVAR:PRODUCTBEGINLINKNETQUOTEVAR:PRODUCTLINKTEXTNETQUOTEVAR:PRODUCTENDLINK Width:    Depth:
NETQUOTEVAR:PRICEEXPLANATION

NETQUOTEVAR:PRODUCTPRICE
NETQUOTEVAR:DATEPROMPT NETQUOTEVAR:CARTERRORXML
NETQUOTEVAR:ADDTOCARTBUTTON
NETQUOTEVAR:TEMPLATEENDXML NETQUOTEVAR:PRODUCTFORMEND NETQUOTEVAR:NEXT Optional info on altering ActinicOrder.pm so customers cannot amend dimensions. Edit ActinicOrder.pm (use a text editor - not a word processor - back it up first):- find line $ActinicOrder::s_nContext = $ActinicOrder::FROM_UNKNOWN; ADD this line immediately after it my $NorcatInfoHide = $::FALSE; find the line $sInfo = InfoHTMLGenerate($$pProduct{'REFERENCE'}, $nLineCount, $sInfo, !$bIncludeButtons, $aFailures->[$nLineCount]->{"INFOINPUT"}); INSERT the following immediately above it. if ($$pProduct{'OTHER_INFO_PROMPT'} eq 'Dimensions:') # change this to suit Other Info Prompt you use { $NorcatInfoHide = $::TRUE; } find the line (it's only a few lines down from where you are) $sInfoLine = InfoLineHTML($$pProduct{'OTHER_INFO_PROMPT'}, $sInfo, $sInfoLineHTML); ADD the following line immediately after it. $NorcatInfoHide = $::FALSE; find the line $sHTML = ""; REPLACE it with the following fragment if ($NorcatInfoHide) { $sHTML = $sValue . ""; } else { $sHTML = ""; } that's that. Notes. If you have only a few products of this type then the template above is fine. If you have lots of such products then you might want to move the JavaScript part from the product template into Act_ProductBody.html so that it isn't unnecessarily duplicated for each product. You could also move it to actiniccore.js instead and this would mean that it would load from the browser cache on subsequent page loads. Norman Rouxel rouxel@attglobal.net