Quantity selection matrix patch for Catalog 6.1.4

The following set of patches add the capability to build a matrix of quantity cells
where the entered values will be summed when adding to cart.  
The matrix is editable in the Cart and displayed on the checkout pages.
A list of the non-zero choices is passed to the customer e-mail, Orders and Reports.  

For example if you have a product that you wholesale in 5 sizes 
and 4 colours you could have a quantity matrix on the web-page:-

Colour/Size  S  M  L  XL XXL

   Red       0  0  0   0   0
  Green      0  0  0   0   0
  Blue       0  0  0   0   0
 Yellow      0  0  0   0   0 


Where the customer can enter whatever quantities they like in the "0" cells.

To implement the above example all you need to do is in a Product's dialogue is 
to set the CUSTOMVARS:-

QTYCOLS to "Size,S,M,L,XL,XXL"
QTYROWS to "Colour,Red,Green,Blue,Yellow"

And that's that.

Installation:-

The .html, .css and .js files will work with any V6 version.  
The .pl and .pm files are for V6.1.4 ONLY.

Don't try to use them with other versions.

Copy the patch files (everything in this Zipfile) into Site1 (back up the files that will be replaced first).
Edit Act_Primary.html (back it up first) and look for the line:-


<SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>


Add the following 2 lines immediately below it


<SCRIPT LANGUAGE="JavaScript" SRC="quantitytablesupport.js" TYPE="text/javascript"></SCRIPT>
<LINK REL=STYLESHEET HREF="quantitytablesupport.css">


Now do the same for Act_PrimaryCheckout.html and that's all patching done.   

In Actinic create 2 CUSTOMVARS namely  QTYCOLS and QTYROWS.  

Also go to View / Search Settings / Results and untick "Highlight Located Text".  
This is needed because of a bug in Actinic (it's in V6.1.2 and below).  

To implement the above example all you need to do is in a Product's dialogue is 
to set the CUSTOMVARS:-

QTYCOLS to "Size,S,M,L,XL,XXL"
QTYROWS to "Colour,Red,Green,Blue,Yellow"

(if using Business make sure that "Use as Customvar" is checked and that "Searchable" is unchecked)

You can have any number of rows or columns but remember that it's all got to fit on the shopping cart
so you may want to use the smaller range (or smaller descriptions) for the Columns.

Select the section type as "Quantity on Product Page" (you can use Single Add to Cart if you wish)
and use QtyProductPageTable_ProductLine.html as the product (or section default) template. 
The matrix will be automagically generated for you and will be editable in the Shopping Cart.

Only the cells with non-zero quantities will be displayed in the customer e-mail 
and back office reports.

Notes:-

If you wish to use this with your own product templates that's easy.   Just replace the 
fragment NETQUOTEVAR:PRODUCTQUANTITY in your template with the corresponding lump of 
code from QtyProductPageTable_ProductLine.html (the included comments explain what to use).

This does not attempt to implement any kind of stock control for each size, colour, etc.   
There is just a single product with a single stock level (which can be managed as usual)
and a lot of additional information defining what quantities of the combinations 
the customer has ordered. 

The file quantitytablesupport.css contains the styles used for the product matrix.
There are two sections, one for the product page and one for the shopping cart. 

An extra product template "QtyCartTable_ProductLine.html" is provided.  Use this 
if you want "Quantity in Shopping Cart" type pages.

I've not implemented this (yet - and may never) for "Quantity on Confirmation Page" sections. Don't use.

Norman Rouxel  rouxel@drillpine.biz

   




