Print Products and Managing Variations
Printers might have product dependent requirements, such as adding blank pages or increasing bleed widths.
While developing a template with multiple print options, it is important to know which product you are actively rendering PDF for.
Print Product-Driven Templating
Uhuu provides product information by appending uhuu_print_product
reserved key to template rendering payload data.
{
"uhuu_print_product" : {
"code": "[product.code]",
"sku": "[product.sku]",
"component": {
"code" : "[component.code]",
"page_count" : "[component.page_count]"
}
}
}
Developers can check the uhuu_print_product
key data to identify the product component currently rendering and optimize print templates accordingly.
page_count
parameter for component's page count.
Sometimes components have dynamic page counts. When the page_count
is 0 or empty, the page count of the component will be dynamically calculated from the generated PDF before it is sent to the printer.
Print Store and Product Components
If you already have an active print store, navigate to your print store page and select Store Settings
.
Within the Products section, you'll discover the store products along with their components, which are crucial for rendering the product's personalized print documents.
Clicking on a component now toggles sample data for the uhuu_print_product, which will be injected into the payload during runtime.