Jump to content

shaunwhl1991

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • First Name
    Shaun
  • Last Name
    Lin

shaunwhl1991's Achievements

Newbie

Newbie (1/14)

  • First Post Rare
  • One Year In Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

0

Reputation

  1. 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...', ]); } }
×
×
  • Create New...