分析错误:语法错误,加载调用脚本这一部分的任何页面时出现意外的$end


Parse error: syntax error, unexpected $end when loading any page where this portion of the script is called

这是xml文件的一部分,该文件在加载时通过修改页面的部分进行解析。修改后的版本由虚拟引擎缓存和显示,这样实际的模板文件就不会被修改。

    <file name="catalog/view/theme/*/template/product/product.tpl">
    <operation error="skip">
        <search position="before"><![CDATA[
        <?php if ($price) { ?>
        ]]></search>
        <add trim="true"><![CDATA[
        <?php if ($call_price < 1) { ?>
        ]]></add>
    </operation>
    <operation error="skip">
        <search position="before" index="1"><![CDATA[
        <?php if ($options) { ?>
        ]]></search>
        <add trim="true"><![CDATA[
        <?php } else { ?>
        <?php if ($call_price) { ?>
        <div class="description" style="border-top:none; margin-top:0px;">
        <?php echo $text_call_price; ?>
        </div>
        <?php } ?>
        <?php } ?>
        ]]></add>
    </operation>
    <operation error="skip">
        <search position="replace"><![CDATA[
        <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
        ]]></search>
        <add trim="true"><![CDATA[
        <?php if ($disable_button < 1) { ?>
        <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />          
        <?php } else { ?>
        <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" style="background-image:none; background-color:#CCC;" disabled="disabled" />
        <?php } ?>
        ]]></add>
    </operation>
</file>

在我看来,您似乎还没有关闭这些if语句:

    <?php if ($price) { ?>
    ...
    <?php if ($call_price < 1) { ?>