This email is to provide you all with some information of the capabilities and the parameters you can pass to the fabric tool.

The Fabric tool is in a shared calculator directory and is available on most all of our sites (aside from a couple of internal sites and PCS(?)). The actual fabric tool you can edit may be found on cushionsource.com FTP site under the following directory:

The following will also be available at the top of fabricpick.php

When calling fabricpick.php, a number of get variables may be used to define certain parameters and the initial state of the fabric picker. They are:

Fabricpick.php (GET PARAMETERS)

Required / Important parameters

     -g=(string)[,(string),...] (multiple groups supported) **REQUIRED**
             Defines what fabric groups may be requested. Based on the OneView `Fabric
             Groups` tool. Multiple groups may be defined by comma delimiting each group

     -v=(integer) **REQUIRED**

             The fabric provider - who will be shipping out the item with this fabric. Vendor ID
             is matched up with fabric inventories in their respective groups.

     -jsfunc=(string) (jsfunc=childcolor by default) **IMPORTANT**
             Defines the name of the javascript function to use when returning fabric data.
             (Not required when viewonly is set)

     -param=(string) **USEFUL**
             Used to pass parameter information to the fabric tool and is given back to the opener
             function (jsfunc) after a fabric selection has been made.

Viewing Options


             Does not display links to choose a fabric. However, fabric samples and yardage
             are still displayed. Allows full use of the Fabric tool.

             Does not display fabric pricing, fabric samples, or fabric yardage.

             When provided the numeric ID of company specified in the htus.`ref_company`
             table, then that site ID will be used to pull site specific data out of the database
             (ie. Website Logo)

Search / Sorting Options

             If you want to have a search come up when pulling up the fabric tool, you may
             do so by specifying this parameter with a default search. Be nice and URL encode.

     -availability=(string) DEFAULT:'all'
             Filters fabrics that are instock. Otherwise displays all available fabrics.
             Valid entries are:
                  instock - Displays instock fabrics
                  all - Displays all available fabrics

     -colors=(string) DEFAULT:'all'
             Filters fabrics that match the request. Otherwise displays all available fabrics.
             Valid entries are self-explanatory:

     -m=(integer) DEFAULT:'' "STYLE TYPE"
             Filters fabrics that match the request. Otherwise displays all available fabrics.
             Valid entries are:
                  0 - Solid
                  1 - Striped
                  2 - Floral

     -view=(string) DEFAULT:''
             Filters fabrics that match the request. Otherwise displays all available fabrics.
             Valid entries are:
                  favorites - View Favorites
                  [NULL] - Normal Mode

Fabricpick.php (SESSION / COOKIE INFO)

Session / Cookie Variables Used


             Used to up the count of items in the cart. In this case, for fabric samples and fabric

             Used to add items in the cart. REQUIRED FOR: for fabric samples and fabric yardage.

             The Favorite Fabrics cookie is a comma delimited string with the group link ids of
             fabrics from the htus.`fabric_group_link` table.

Fabricpick.php (RETURN DATA)

Data returned:
     The data turned to the main window is in the form of a javascript function. By default this
     function is `childcolor`, but any primary window javascript function may be used so long as
     it is specified in the `jsfunc` GET parameter. The function should have support for the

         {{JS FUNC NAME}}(ID, sID, nam, img, param, obj)

               ID - numeric group_link_id
               sID - SunbrellaID
               nam - Fabric Name
               img - Image thumbnail url
               param - params passed to the tool at the beginning of the fabric selection process.
               obj - various data returned from the fabric tool

Fabricpick.php (EXAMPLE USAGE)

Just a few examples:

Simple fabric picker with `American Mills` vendor and `all fabrics` group (uses default JSFunc)

Returns to parent windows using javascript function `pickedfab`

Groups `AMIndoor` and `SunbrellaOutdoor`, with VIEW ONLY and NO PRICING

Filters for `instock` and `black` fabrics.



Copyright© 2007-2024 One Web View

Copyright © 2007-2024 One Web View. All rights reserved. Use of this site signifies that you are in agreement with our terms and conditions.