Post by Beglet » Mon May 21, 2018 8:57 pm

Hi I have come across this when selecting and loading a category page...

Parse error: syntax error, unexpected end of file
........./template/product/category.tpl on line 189


.tpl file is:

<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/common/config.tpl" );
$themeConfig = (array)$this->config->get('themecontrol');
$categoryConfig = array(
'listing_products_columns' => 0,
'listing_products_columns_small' => 2,
'listing_products_columns_minismall' => 1,
'cateogry_display_mode' => 'grid',
'category_pzoom' => 1,
'quickview' => 0,
'show_swap_image' => 0,
);
$categoryConfig = array_merge($categoryConfig, $themeConfig );
$DISPLAY_MODE = $categoryConfig['cateogry_display_mode'];
$MAX_ITEM_ROW = $themeConfig['listing_products_columns']?$themeConfig['listing_products_columns']:4;
$MAX_ITEM_ROW_SMALL = $categoryConfig['listing_products_columns_small']?$themeConfig['listing_products_columns_small']:4;
$MAX_ITEM_ROW_MINI = $categoryConfig['listing_products_columns_minismall']?$themeConfig['listing_products_columns_minismall']:1;
$categoryPzoom = $categoryConfig['category_pzoom'];
$quickview = $categoryConfig['quickview'];
$swapimg = $categoryConfig['show_swap_image'];
?>
<?php echo $header; ?>
<div class="col-lg-12">
<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/common/breadcrumb.tpl" ); ?>
</div>
<?php if( $SPAN[0] ): ?>

<aside class="col-lg-<?php echo $SPAN[0];?> col-md-<?php echo $SPAN[0];?> col-sm-12 col-xs-12">
<?php echo $column_left; ?>
</aside>
<?php endif; ?>
<section class="col-lg-<?php echo $SPAN[1];?> col-md-<?php echo $SPAN[1];?> col-sm-12 col-xs-12">
<div class="content-product">
<div id="content">
<?php echo $content_top; ?>
<?php if ($thumb || $description) { ?>
<div class="category-info clearfix">

<?php if ($description) { ?>
<?php echo $description; ?>
<?php } ?>
</div>
<?php } ?>


<div class="category-list clearfix">




<?php if ($categories) { ?>
<?php foreach ($categories as $category) { ?>
<h2><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></h2>
<?php if ($category['subproducts']) { ?>
<div class="product-list">
<?php foreach ($category['subproducts'] as $product) { ?>
<div>
<?php if ($product['thumb']) { ?>
<div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
<?php } ?>
<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
<div class="description"><?php echo $product['description']; ?></div>
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</div>
<?php } ?>
<?php if ($product['rating']) { ?>
<div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
<?php } ?>
<div class="cart">
<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
</div>
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
<div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>


</div>



<?php if ($products) { ?>
<div class="product-filter clearfix">
<div class="display hidden-xs">
<span><?php echo $text_display; ?></span>
<span><?php echo $text_list; ?></span>
<a onclick="display('grid');"><span
class="glyphicon glyphicon-align-justify"></span><?php echo $text_grid; ?></a>
</div>
<div class="product-compare"><a href="<?php echo $compare; ?>"
id="compare-total">
<span class="hidden-xs"><?php echo $text_compare; ?></span><em class="visible-xs icon-retweet"></em>
</a>
</div>

<div class="limit"><span class="hidden-text"><?php echo $text_limit; ?></span>
<select onchange="location = this.value;">
<?php foreach ($limits as $limits) { ?>
<?php if ($limits['value'] == $limit) { ?>
<option value="<?php echo $limits['href']; ?>"
selected="selected"><?php echo $limits['text']; ?></option>
<?php } else { ?>
<option value="<?php echo $limits['href']; ?>"><?php echo $limits['text']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
<div class="sort"><span class="hidden-text"><?php echo $text_sort; ?></span>
<select onchange="location = this.value;">
<?php foreach ($sorts as $sorts) { ?>
<?php if ($sorts['value'] == $sort . '-' . $order) { ?>
<option value="<?php echo $sorts['href']; ?>"
selected="selected"><?php echo $sorts['text']; ?></option>
<?php } else { ?>
<option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>

</div>

<?php if ($products) { ?>
<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/product/product_collection.tpl" ); ?>
<?php } ?>

<?php } ?>
<?php if (!$categories && !$products) { ?>
<div class="content"><?php echo $text_empty; ?></div>
<div class="buttons">
<div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_continue; ?></a></div>
</div>
<?php } ?>
<?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
function display(view) {
if (view == 'list') {
$('.product-grid').attr('class', 'product-list');

$('.products-block .product-block').each(function (index, element) {

$(element).parent().addClass("col-fullwidth");
});

$('.display').html('<span style="float: left;"><?php echo $text_display; ?></span><a class="list active"><span class="glyphicon glyphicon-align-justify"></span><em><?php echo $text_list; ?></em></a><a class="grid" onclick="display(\'grid\');"><span class="glyphicon glyphicon-th"></span><em><?php echo $text_grid; ?></em></a>');

$.totalStorage('display', 'list');
} else {
$('.product-list').attr('class', 'product-grid');

$('.products-block .product-block').each(function (index, element) {
$(element).parent().removeClass("col-fullwidth");
});

$('.display').html('<span style="float: left;"><?php echo $text_display; ?></span><a class="list" onclick="display(\'list\');"><span class="glyphicon glyphicon-align-justify"></span><em><?php echo $text_list; ?></em></a><a class="grid active"><span class="glyphicon glyphicon-th"></span><em><?php echo $text_grid; ?></em></a>');

$.totalStorage('display', 'grid');
}
}

view = $.totalStorage('display');

if (view) {
display(view);
} else {
display('<?php echo $DISPLAY_MODE;?>');
}
//--></script>
</div>
</section>

<?php if( $SPAN[2] ): ?>
<aside class="col-lg-<?php echo $SPAN[2];?> col-md-<?php echo $SPAN[2];?> col-sm-12 col-xs-12">
<?php echo $column_right; ?>
</aside>
<?php endif; ?>
<?php echo $footer; ?>



Will be grateful for any help. Thanks

Newbie

Posts

Joined
Mon May 21, 2018 8:51 pm

Post by yodapt » Mon May 21, 2018 10:21 pm

Did you ever edit that file?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm

Who is online

Users browsing this forum: Bing [Bot] and 41 guests