Enter the width and height of the part of your picture you want to see.I.e. the brown part of the image. Don't include any part hidden by the mount board.
Priced by the area of mountboard and glass needed + perimiter length of frame.
We've created new user variables for Mount Price, Mount Border, Frame Price and Frame Width to make it general purpose.
Set at £100 per square M for mount and glass.
Set at £10 per linear M for frame.
Formula used: frameit(width, length, scalefactor, anc)
Show JavaScript file:
// picture frame calculation V4.18
// customer enters width and height (in cm) for their picture (the part they want to show)
// our entered sizes are automatically converted to metres before we use them in calculation
// Example:
// we use a 5cm mountboard border so mountboard and glass have width + 0.1 and height + 0.1
// so calculation for area of glass and mountboard is (width + 0.1) * (height + 0.1)
// the frame is 4cm wide so we'll need (width + 0.1 + 0.08)*2 + (height + 0.1 + 0.08)*2 total length
// we set the product price to £1 (but don't display it) so the script will calculate and return the price to use
// when called width and height will have been scaled to metres. E.g. With Units set to cm, 50cm becomes 0.5
// Basic calculation using variables MountPrice, MountBorder, FramePrice, FrameWidth
function frameit(width, height, scalefactor, anc){
var mountprice = productancdata(anc, 'mountprice');
var mountborder = productancdata(anc, 'mountborder') / scalefactor;
var mountarea = (width + mountborder*2) * (height + mountborder*2);
var mounttotalprice = mountarea * mountprice;
var frameprice = productancdata(anc, 'frameprice');
var framewidth = productancdata(anc, 'framewidth') / scalefactor;
var framelength = ((width + mountborder*2 + framewidth*2) + (height + mountborder*2 + framewidth*2)) * 2;
var frametotalprice = framelength * frameprice;
return mounttotalprice + frametotalprice;
}