Unhandled Error!
Call to a member function get_parents() on null
Document |
/modules/cms/classes/cms_controller.php(383) : eval()'d code |
Document type |
PHP document |
Line |
9 |
Exception class |
Error |
# |
Call Stack Code |
Document |
Line |
11 |
eval(()) |
/modules/cms/classes/cms_controller.php |
383 |
10 |
Cms_Controller->evalWithException('?><nav class="breadcrumb">
<div class="row">
<div class="twelve columns">
<ul>
<li>
<a href="<?php echo root_url('/'); ?>">Home</a>
</li>
<?php foreach($category->get_parents(true) as $category): ?>
<li>
<a href="<?php echo $category->page_url('/category'); ?>" title="<?php echo $category->name; ?>"><?php echo $category->name; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</nav>
<section class="content">
<section class="category <?php echo $category->url_name; ?>">
<div class="row">
<div class="nine columns push-three">
<div id="product_list">
<?php $this->render_partial('shop:product_list', array(
'products' => $category->list_products(),
'class' => 'four',
'records_per_page' => lemonade_setting('products_per_page'),
'paginate'=> true,
'pagination_base_url' => $category->page_url('/category'),
'page_index' => $this->request_param(-1, 0)
)); ?>
</div>
</div>
<aside class="hide-for-small three columns pull-nine">
<div class="filters">
<?php echo open_form(array(
'onsubmit' => "return $(this).getForm().sendRequest('filter_products', {
update: { 'product_list': 'shop:product_list' }
})",
'class' => 'custom'
)); ?>
<?php
$subcats = Shop_Category::create()->find_by_url_name($category->url_name)->list_children('front_end_sort_order');
if( sizeof($subcats) > 1 ): ?>
<div class="row filter_subcats">
<div class="twelve columns">
<h6>Sub categories</h6>
<?php foreach($subcats as $subcat): ?>
<label for="<?php echo $subcat->url_name; ?>">
<input id="<?php echo $subcat->url_name; ?>" type="checkbox" name="sub_category[]" value="<?php echo $subcat->id; ?>">
<?php echo $subcat->name; ?>
</label>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<div class="row filter_cost">
<div class="twelve columns">
<h6>Cost</h6>
<?php $top_price = Db_DbHelper::scalar('SELECT price FROM shop_products t1 LEFT JOIN shop_products_categories t2 ON t1.id = t2.shop_product_id WHERE t2.shop_category_id = '.$category->id.' ORDER BY price DESC'); ?>
<label for="price_low">
<input id="price_low" type="radio" name="price_range" value="<?php echo "0|" . ceil($top_price)/2; ?>">
<?php echo format_currency(0) . " – " . format_currency(ceil($top_price)/2); ?>
</label>
<label for="price_high">
<input id="price_high" type="radio" name="price_range" value="<?php echo ceil($top_price)/2 . "|" . $top_price; ?>">
<?php echo format_currency(ceil($top_price)/2) . " – " . format_currency($top_price); ?>
</label>
</div>
</div>
<div class="row filter_order">
<div class="twelve columns">
<h6>Order</h6>
<select name="sorting">
<option value="relevance">Most relevant</option>
<option value="created_at">Latest</option>
<option value="name asc">Name (A to Z)</option>
<option value="name desc">Name (Z to A)</option>
<option value="price asc">Price (Low to High)</option>
<option value="price desc">Price (High to Low)</option>
</select>
</div>
</div>
<div class="row filter_search">
<div class="twelve columns">
<h6>Search</h6>
<input type="text" name="query" value="">
</div>
</div>
<div class="row filter_categories">
<div class="twelve columns">
<h6>Categories</h6>
<?php
$categories = Shop_Category::create()->list_root_children();
echo '<ul>';
foreach( $categories as $cat ){
if( $cat->name == 'Products' ){
echo '<li><a href="'.$cat->page_url('/category').'" class="category-link">All Products</a></li>';
}else{
echo '<li><a href="'.$cat->page_url('/category').'" class="category-link">'. $cat->name.'</a></li>';
}
}
echo '</ul>';
?>
</div>
</div>
<div class="row">
<div class="twelve columns">
<input type="hidden" name="main_category" value="<?php echo $category->id; ?>">
<button type="submit" class="button full-width"><i class="foundicon-search"></i> Filter products</button>
</div>
</div>
<?php echo close_form(); ?>
</div>
</aside>
</div>
</section>
</section>', 'CMS page', 'Category') |
/modules/cms/classes/cms_controller.php |
608 |
9 |
Cms_Controller->eval_page_content(()) |
/modules/cms/classes/cms_controller.php |
198 |
8 |
Cms_Controller->open(object(Cms_Page), array(0)) |
/controllers/application.php |
72 |
7 |
Application->On404(()) |
/phproad/modules/phpr/classes/phpr_controller.php |
170 |
6 |
Phpr_Controller->executeAction('On404', array(0)) |
/phproad/modules/phpr/classes/phpr_controller.php |
84 |
5 |
Phpr_Controller->_run('On404', array(0)) |
/phproad/modules/phpr/classes/phpr_response.php |
64 |
4 |
Phpr_Response->open404(()) |
/phproad/modules/phpr/classes/phpr_response.php |
37 |
3 |
Phpr_Response->open('/category') |
/phproad/system/phproad.php |
31 |
2 |
include('/home/clmi/httpdocs/public/phproad/system/phproad.php') |
/boot.php |
114 |
1 |
require_once('/home/clmi/httpdocs/public/boot.php') |
/index.php |
3 |