I know this is an old thread. But in case if anyone's looking for answer for the 'smarty not carrying the assigned variables' problem, here are my fixes.
Override
/controllers/front/listing/CategoryController.php
Then you can attach your variables in the 'initContent()' function.
<?php
class CategoryController extends CategoryControllerCore
{
public function initContent()
{
parent::initContent();
if ($this->category->checkAccess($this->context->customer->id)) {
$this->doProductSearch(
'catalog/listing/category',
[
'entity' => 'category',
'id' => $this->category->id,
]
);
}
$this->context->smarty->assign([
'custom_variable' => 'some custom values...',
]);
}
}