Product Administration Guide > Customizable Product Scripts >

About Product Path


The product path is the path from the root of a customizable product to a component product within it. The path is a string that specifies the customizable product root and all relationship names leading to the component product. All or part of the product path are arguments to several scripting methods.

The syntax for product paths is as follows:

$.[Root Product]#1.[Relationship]#[Component Product]

Observe the following guidelines for product paths:

Figure 14 shows the structure of customizable product CP1.

Figure 14.  Customizable Product Structure

Customizable product CP1 has two relationships R1 and R2. Relationship R1 contains two component products P1 and P2. Relationship R2 contains the customizable product CP2. CP2 contains one relationship R3, which has two component products P3 and P4.

The product paths for this customizable product are as follows:

Here are examples of using product paths in script methods:

  1. To add 1 P1:
  2. AddItem("$.[CP1]#1", "R1", "P1", "1")

  3. To add 1 P3:
  4. AddItem("$.[CP1]#1.[R2]#[CP2]", "R3", "P3", "1")

  5. To reduce the quantity of P3 to 0:
  6. RemoveItem("$.[CP1]#1.[R2]#[CP2].[R3]#[P3]")

  7. To set the attribute Color to Red for P1:
  8. SetAttribute("$.[CP1]#1.[R1]#[P1]", "Color", "Red")


 Product Administration Guide 
 Published: 23 June 2003