ableier Posted May 1, 2015 Share Posted May 1, 2015 (edited) I used the "cleaning" module and have the dreaded blank white product page ever since. After enabling error reporting I get the following: Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home1/fmgwebco/public_html/bopshop/themes/default-bootstrap/product.tpl" on line 751 "{/if}" unclosed {if} tag <-- thrown in /home1/fmgwebco/public_html/bopshop/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 751 I've looked at these lines and can't figure this out. I have done extensive searching, but have yet to come across this same (or similar) error. Any help would be greatly appreciated. Thank you in advance. Edited July 21, 2015 by ableier (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted May 1, 2015 Share Posted May 1, 2015 You basically need to add a {/if} some where on or after line 751 on the product.tpl to to close an if statement. 1 Link to comment Share on other sites More sharing options...
ableier Posted May 1, 2015 Author Share Posted May 1, 2015 I thought that to begin with but there is a if tag there. Here are the last lines ending on line 751: {else} {addJsDef specific_price=0} {/if} {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval} {* TODO: remove if always false *} {addJsDef stock_management=$PS_STOCK_MANAGEMENT|intval} {addJsDef taxRate=$tax_rate|floatval} {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL} {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL} {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL} {addJsDefL name='product_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL} {addJsDefL name='product_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL} {/strip} {/if} I don't even know where to look, as everything seems okay. I've emptied the cache and smarty to no avail. Any other ideas would be greatly appreciated. Thank you. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 1, 2015 Share Posted May 1, 2015 Your code is wrong. You are closing if-tag twice, but opening none. This line {else} {addJsDef specific_price=0} {/if} should be {else} {addJsDef specific_price=0} {if} and not {/if} Link to comment Share on other sites More sharing options...
ableier Posted May 1, 2015 Author Share Posted May 1, 2015 Unfortunately, that didn't do the trick. That is a closing tag... here is the a few more lines: {/if} {if $display_qties == 1 && $product->quantity} {addJsDef quantityAvailable=$product->quantity} {else} {addJsDef quantityAvailable=0} {/if} {addJsDef quantitiesDisplayAllowed=$display_qties|boolval} {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'percentage'} {addJsDef reduction_percent=$product->specificPrice.reduction*100|floatval} {else} {addJsDef reduction_percent=0} {/if} {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'amount'} {addJsDef reduction_price=$product->specificPrice.reduction|floatval} {else} {addJsDef reduction_price=0} {/if} {if $product->specificPrice && $product->specificPrice.price} {addJsDef specific_price=$product->specificPrice.price|floatval} {else} {addJsDef specific_price=0} {/if} {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval} {* TODO: remove if always false *} {addJsDef stock_management=$PS_STOCK_MANAGEMENT|intval} {addJsDef taxRate=$tax_rate|floatval} {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL} {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL} {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL} {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL} {addJsDefL name='product_fileDefaultHtml'}{l s='No file selected' js=1}{/addJsDefL} {addJsDefL name='product_fileButtonHtml'}{l s='Choose File' js=1}{/addJsDefL} {/strip} {/if} That tag you mentioned closes the {if} above it. The last {/if} doesn't have anything to close, and I have no idea what should be open?? I tried removing it and nothing. Any other suggestions. Thanks for the help. Link to comment Share on other sites More sharing options...
ableier Posted May 1, 2015 Author Share Posted May 1, 2015 I just uploaded a fresh product.tpl and overwrote the corrupted file. Seems to be working fine now. Still couldn't find the problem though. Thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts