Hi,
The developer documentation have a section for the "generate" function
www.hikashop.com/support/documentation/1...er.html#fct_generate
When the function "generate" is called from the HikaSerial order class (when an order is confirmed and need serials), the pack will contain an "order_product_id".
Otherwise, it will contain some data related to the "order_pack", a combination from 3 tables.
SELECT product.product_id as `main_product_id`, product.product_parent_id, pp.*, pack.*
( product - hikashop product table / pp - hikaserial product_pack table / pack - hikaserial pack table).
The table product_pack also contains the product_id but because you can have variants, we have to handle the parent product id too.
In any case, the usage of the "order_product_id" is the best and is set automatically by HikaSerial when a generation comes from an order (because you can also generate serials in the backend but without any order data).
Regards,