Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7108 Представления

I'm trying to let the user choose the barcode encoding type by popping a wizard before printing the "Product Label", so I can read the chosen encoding from that wizard in product_label.xls

<barCode code="XXXX"><xsl:value-of select="ean13" /></barCode>

Is is possible to write something instead of "XXXX" that reads wizard data?

In the reports we used to write something like [[ data['form']['XXXX'] ]], but how to do it in .xsl?

Аватар
Отменить
Автор Лучший ответ

I managed my way and found the solution, and I would like to share it.. :)

I added new function field to product.product object, and inside this function I have read the wizard table and return a proper result.

Then, I added the new field name in product_label.xml, then I were able to read the field value from product_label.xsl by the following code:

<xsl:variable name="temp_var"><xsl:value-of select="field_from_wizard"/></xsl:variable>
<xsl:if test="$temp_var='Code128'">
    <barCode code="Code128"><xsl:value-of select="field2" /></barCode>
</xsl:if>

This maybe not the optimal solution. however, it solved the problem.

Hope it will help someone else..%

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мар. 25
5078
0
мар. 15
3915
1
июл. 24
1186
0
апр. 15
4268
2
мар. 15
5619