Context data available in Quote PDF

Variables

Variable name

Description

Variable name

Description

is_draft

Boolean, indicating whether a given quote has a draft status

billing_address

The billing address data of a given quote. It contains sub-variables:

  • billing_address.title

  • billing_address.first_name

  • billing_address.last_name

  • etc.

Please take a look at the b3_address_quoteddressDB table, to get the up-to-date list of sub-variables.

pdf_comment

Quote’s remarks for PDF. Provided on the detail page

currency

Quote’s currency

customer_email

Customer’s email

customer_number

Customer’s number

customer_number_label

The label defined in the Admin Panel: Organizations > Address & User Field Customizations > Customer number label

is_customer_number_shown

The visibility setting from the Admin Panel:
Organizations > Address & User Field Customizations > Customer number visibility

customer_reference

Customer reference from the quote. Inputted in the checkout

customer_reference_label

The label defined in the Admin Panel: Organizations > Address & User Field Customizations > Reference number label

is_customer_reference_shown

The visibility setting from the Admin Panel:
Organizations > Address & User Field Customizations > Reference number visibility

delivery_instructions

Delivery instructions specified for the quote

difference_to_minimum

The amount applied to the quote to compensate for the minimum order price defined in the service settings. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

expiration_date

Quote’s expiry date

fee

Total fee value of the given quote. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

fees

A list of fee objects (fees applied to the quote). Every fee object contains sub-variables:

  • fee_obj.fee (name of the given fee)

  • fee_obj.amount (either net or gross value of the fee. Depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers)

This is how you could use it in a template:

{% for fee_obj in fees %} {{ fee_obj.fee }} {% endfor %}

general_sales_conditions

General sales conditions of a given printing service

general_shipping_conditions

General shipping conditions of a given printing service

issue_date

Quote’s creation date

is_pickup

A boolean, indicating whether pickup delivery is activated for the given quote

logo_url

URL to the logo of the printing service

page_footer

Footer information defined for the given printing service

pickup_location

The whole PickupLocation object that is linked to the given quote. To get the up-to-date list of sub-variables, please look at the b3_shipping_pickuplocation DB table

post_processings_price

The total cost of post-processings of the given quote. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

printing_price

Total print price of the given quote. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

quote_full_number

Quote’s full number

quote_lines

Please take a look at the Line Variables section below this table

service

The whole Service object that is linked to the given quote. To get the up-to-date list of sub-variables, please look at the partner_partner DB table

service_address

The whole Address object (address of the printing service). To get the up-to-date list of sub-variables, please look at the b3_address_partneraddress DB table

shipping_address

The whole Address object (quote’s shipping address). To get the up-to-date list of sub-variables, please look at the b3_address_quoteaddress DB table

shipping_method

The whole ShippingMethod object (quote’s selected shipping method). To get the up-to-date list of sub-variables, please look at the b3_shipping_shippingmethod DB table

shipping_range

If shipping method is defined, then the range will be displayed in the following format:

  • {min} - {max}

    • e.g. “2 - 5”

shipping_value

The shipping price of the quote. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

subtotal

The subtotal price of the quote. It can be either a net or gross price depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

tax

The total tax value of the quote

tax_rate

The tax rate that was applied to the quote

total_prices

The total price object of the quote. It contains sub-variables:

  • total_prices.currency

  • total_prices.tax

  • total_prices.excl_tax

  • total_prices.incl_tax

total_weight

The total quote’s weight either in grams or kilograms

total_weight_decimals

Either g or kg. Up to 999 grams, the unit will be g, kg otherwise

total_weight_unit

Either 0 or 1. It should be used as an argument to floatformat Django’s function.
For example:

{{ total_weight|floatformat:total_weight_decimals }}

0 is returned if the weight is lower than 1000 grams, 1 otherwise

theme_font

(Hardcoded) Open Sans

theme_date_format

(Hardcoded) d.m.Y

theme_datetime_format

(Hardcoded) d.m.Y H:i

example of b3_address_quoteddressDB table (release-24.10.x)

id,deleted_date,title,first_name,last_name,company_name,vat_id,department,line1,line2,zip_code,city,state,phone_number,date_created,country_id,user_id 2,,Herr,John,Doe,High Performance Metals GMbH,DE814254567,871024,Hansaallee 31a,"Building 2, entrance 17",10549,Düsseldorf,Nordrhein-Westfalen,49152841624,2024-10-28 11:35:29.417 +0300,DE,231

Line Variables

The quote_lines variable is an array of line objects. Every object contains info about a single line. This is how you would usually use it:

{% for line in quote_lines %} Quote Line {{ line.fullName }} ... {% endfor %}

This is a list of sub-variables:

Variable name

Description

Variable name

Description

fullName

Full name of the line e.g. 100004-Clamping Connector-1

id

Database identifier of the quote line (an integer value)

linkedCatalogItemId

Database identifier of the linked catalog item if one exists (an integer value)

name

Name of the line e.g. Clamping Connector

offer

An object containing info about the selected offer. It contains sub-variables:

  • offer.id: DB identifier

  • offer.title: name of the material

  • offer.hasPostProcessing: boolean value indicating whether there are any pps defined for this offer

  • offer.internalIdentifier: material’s internal identifier

  • offer.minimumWallThickness: material’s minimum wall thickness

  • offer.optimalWallThickness: material’s optimal wall thickness

  • offer.printabilityStatus: material’s printability report

  • offer.minW: material’s minimum width

  • offer.maxW: material’s maximum width

  • offer.minH: material’s minimum height

  • offer.maxH: material’s maximum height

  • offer.minD: material’s minimum depth

  • offer.maxD: material’s maximum depth

  • offer.technology: name of the technology

  • offer.material: full name of the material

  • offer.postProcessings: an array of objects, containing info about selected post processings. You would usually similarly iterate over those objects as over order lines:

    The following sub-variables are available:

    • pp_object.title: name of the post processing

    • pp_object.colorTitle: color if chosen

    • pp_object.price: price value of the post processing. Either gross or net depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers)

partRequirements

A part requirements object:

  • partRequirements.formId: the whole Form object. Take a look at the b3_forms2_formtable

  • partRequirements.title

  • partRequirements.description

  • partRequirements.fields: an array of Field objects to iterate over. Take a look at the b3_forms2_propertyvalue table

partRequirementsId

Database identifier of the attached part requirement form

postProcessings

An array of objects, containing info about selected post processings. You would usually similarly iterate over those objects as over order lines:

The following sub-variables are available:

  • processing.PostProcessing: underlying post-processing object:

    • processing.PostProcessing.title

    • processing.PostProcessing.id

  • processing.Color: color if attached:

    • processing.Color.id

    • processing.Color.title

    • processing.Color.rgb

  • processing.Price: price object:

    • processing.Price.exclusiveTax

    • processing.Price.inclusiveTax

    • processing.Price.tax

    • processing.Price.currency

preferredDueDate

Preferred due date of the quote line

quantity

Ordered quantity of the quote line

sequenceNumber

The order number at which the line was uploaded to the basket

stlFile

An object containing info about the stl file. It contains sub-variables:

  • stlFile.uuid

  • stlFile.showname

  • stlFile.creationDate

  • stlFile.downloadOptimizedUrl: URL link, to download the optimized version of the file

  • stlFile.downloadOriginalUrl: URL link, to download the original version of the file

  • stlFile.downloadThumbnailUrl: URL link, to download the file’s thumbnail

  • stlFile.origin: the source, from where the file was uploaded. For example: ampi

  • stlFile.originalFileName: showname+ file extension

  • stlFile.parameter: object with technical parameters of the file:

    • stlFile.parameter.area

    • stlFile.parameter.volume

    • stlFile.parameter.h

    • stlFile.parameter.w

    • stlFile.parameter.d

    • stlFile.parameter.faces

    • stlFile.parameter.shells

    • stlFile.parameter.holes

  • stlFile.unit

  • stlFile.status: our system parses the files upon the upload. This is the status of this parsing process

  • stlFile.uploadedInUnit: same as unit

unitPostProcessingPrice

Price object:

  • unitPostProcessingPrice.exclusiveTax

  • unitPostProcessingPrice.inclusiveTax

  • unitPostProcessingPrice.tax

  • unitPostProcessingPrice.currency

isInCatalog

Boolean indication, whether there is a catalog item linked. It’s checking for the existence of linkedCatalogItemId

attachments

An array of objects, containing info about uploaded attachments. You would usually similarly iterate over those objects as over order lines:

The following sub-variables are available:

  • attachment.id

  • attachment.name

  • attachment.filesize

  • attachment.added: creation date

  • attachment.url: URL to download the file

  • attachment.uploader: object with the uploader details:

    • attachment.uploader.avatar: URL to download the avatar

    • attachment.uploader.company

    • attachment.uploader.customerNumber

    • attachment.uploader.email

    • attachment.uploader.firstName

    • attachment.uploader.id

    • attachment.uploader.lastName

    • attachment.uploader.name: first + last name

dimensions

An object containing raw dimensions of the quote line. It contains the following sub-variables (floating-point values):

  • dimensions.w (width)

  • dimensions.h (height)

  • dimensions.d (depth)

Those will be in inches or mm, depending on the unit of the stlfile

isManuallyPriced

Boolean indicator, whether the given line is manually priced

isPricingResolved

A dead variable. Avoid it

weight

Weight of the quote line (times the ordered quantity) in either grams or kilograms. So if the single part weights 50 grams, and the quantity equals 5, then this will contain 250

weightUnit

Either g or kg. Up to 999 grams, the unit will be g, kg otherwise

weightDecimals

Either 0 or 1. It should be used as an argument to floatformat Django’s function.
For example:

{{ weight|floatformat:weightDecimals }}

0 is returned if the weight is lower than 1000 grams, 1 otherwise

prices

This object contains various line prices:

  • prices.unitPrice (unit price of the line)

  • prices.linePrice (total price of the line)

  • prices.printPrice (printing price of the line)

All of those prices are either gross or net depending on the Admin Panel setting Organizations > General Settings & Features > Show only Net Prices for customers

thumbnail

File download link, to download the thumbnail of the quote line

part_requirements

It contains the part-requirements-form object. This is a very complicated object. Please refer to the b3_forms2_forminstance DB table. An example of how to use it: