<%
/*check if the buy_button can be displayed*/
IF $opt_productinfofields THEN
QUERY ProductInputField_inproduct(product_id=$product_id) DO DISPLAY IF $if_required THEN $hide_buy_button=1 ENDIF NEXTROW ENDQUERY
ENDIF
$use_standard_template=1
IF $Session.product_small_template=='undefined' THEN $Session.product_small_template='' ENDIF
IF $Data.product_small_template THEN
$Session.product_small_template=$Data.product_small_template
ENDIF
IF ($Shop.product_small_template AND $Shop.product_small_template!='standard')
OR ($product_small_template AND $product_small_template!='standard')
OR ($Session.product_small_template!='standard' AND $Session.product_small_template)
OR ($Data.Category_product_small_template!='standard' AND $Data.Category_product_small_template)
THEN
IF $Session.product_small_template THEN
$Data.product_small_template=$Session.product_small_template
CALL RUN_FILE('product-small-'+$Session.product_small_template+'.htm')
$use_standard_template=0
ELSIF $Data.Category_product_small_template THEN
$Data.product_small_template=$Data.Category_product_small_template
CALL RUN_FILE('product-small-'+$Data.Category_product_small_template+'.htm')
$use_standard_template=0
ELSIF $Data.product_small_template THEN
$Data.product_small_template=$Data.product_small_template
CALL RUN_FILE('product-small-'+$Data.product_small_template+'.htm')
$use_standard_template=0
ELSIF $Shop.product_small_template THEN
$Data.product_small_template=$Shop.product_small_template
CALL RUN_FILE('product-small-'+$Shop.product_small_template+'.htm')
$use_standard_template=0
ENDIF
POP $Data.product_small_template
ENDIF
IF $use_standard_template THEN
IF $Data.product_small_template == 'standard' THEN
$Session.product_small_template=''
$Data.product_small_template=''
ENDIF%>
<%ENDIF
POP $use_standard_template%>