Lesson 7: Integrating Custom Formula into the Conditional Double-Sided Logic

Tyler MacDonald Updated by Tyler MacDonald

Objective

Enhance the double-sided feature by applying custom formulas within the existing conditional logic.

Outcome

By the end of this lesson, your product will dynamically adjust its pricing and configuration based on user inputs, providing a more personalized experience.

Note: In this lesson, we enhance the existing conditional logic by integrating custom formulas, gaining greater control over the product’s functionality.

Step 1: Copy the Previous Lesson's Product and Rename

As with previous lessons, each subsequent lesson will be a copy of the last. Follow these steps:

  1. Copy the Product
    • From Lesson 6: Replacing a System Formula with a Custom Formula, click on the blue action button and select Copy Product.
    • This will generate a copy of the product, which will be in Draft Mode.
  2. Update Basic Settings
    • Click on Basic Settings and update the following fields:
      • Product Name: Lesson 7: Integrating Custom Formula into the Conditional Double-Sided Logic
      • Product Description: The product now dynamically adjusts its pricing and configuration based on user inputs, providing a more personalized experience.

Step 2: Improving Custom Logic - Replace the System Formula

  1. Edit the Default Item
    • Open Default Items, select Generic Printer, and click the blue edit pencil.
  2. Update the System Formula
    • Change the system formula from Area to None. This allows us to implement our own custom formula.
  3. Add Custom Logic
    • Click Custom, and input the following code:
    (Double_Sided)
    ?
    ( ( Width * Height ) /144 ) *2
    :
    ( Width * Height ) /144
    ;
    This code dynamically calculates the area based on whether the double-sided option is selected, providing greater control over the product's functionality.

Step 3: Configuring and Publishing the Product

Once saved, you'll remain on the Configure Pricing screen by default.

Draft Mode

All newly created products, or copies of products, are initially set to Draft Mode. This feature allows you to work on a product without introducing it into the main system.

Publishing the Product

To publish your product:

  1. Select the blue action button in the top right corner.
  2. Choose Publish Product from the dropdown menu.

Once published, the draft tag will disappear, indicating that the product is now active and ready to be used in transactions.

Step 4: Adding the Product to a Transaction

Using the quote started in the previous lesson, let's add this new product as a line item:

  1. Enter a Width and Height of 120".
  2. Select a Material from your dropdown.
  3. Click and unclick the Double-Sided checkbox.
  4. Click Save.

Conclusion

Congratulations! You've successfully integrated a custom formula into the conditional double-sided logic, giving your product even more flexibility and customization options. In the next lesson, we’ll explore further ways to refine your product setup to create even more dynamic and personalized user experiences.

How did we do?

Lesson 6: Replacing a System Formula with a Custom Formula

Lesson 8: Adding an Additional Dropdown Menu

Contact