Jump to content

ContextErrorException


morochojch

Recommended Posts

Regards, the mistake ContextErrorException: Notice: Undefined index: newsearch Me acurre d ela following way: and edited the my-account.tpl and I want to add an iten mas called new search and eh placed the following code:

<a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="new-search-link" href="{$urls.pages.new_search}">
          <span class="link-item">
            <i class="material-icons">&#xE8B0;</i>
            {l s='Nueva Busqueda' d='Shop.Theme.Customeraccount'}
          </span>
        </a>
     i Created the files : NewSearchController:  (/Controllers/front/)

class NewSearchControllerCore extends FrontController
{
    public $auth = true;
    public $php_self = 'new-search';
    public $authRedirection = 'new-search';
    public $ssl = true;

    /**
     * Assign template vars related to page content
     * @see FrontController::initContent()
     */
    public function initContent()
    {
       

        $this->context->smarty->assign([
            'Contenido' => "mostrar",
        ]);

        parent::initContent();
        $this->setTemplate('customer/new-search');
    }

}

and  new-search.tpl :  (theme/classic/templates/customer)

{extends file='customer/page.tpl'}

{block name='page_title'}

<span class="sitemap-title">{l s='Nueva Busqueda' d='Shop.Theme.Customeraccount'}</span>

{/block}

{block name='page_content_container'}

<section>

</section>

{/block}

 

When I try to open from the mariner the section  (localhost/tienda/es/my-account)

The following mistake appears:

 ContextErrorException

Notice: Undefined index: newsearch

in aec64e1f1a7437e41ac5a6981d7bd0f24050a27f_2.file.my-account.tpl.php line 136
at Block_147005b6065ce0b9c54_87051534->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 247

That eh done badly? Thank you, for the help

Link to comment
Share on other sites

3 hours ago, morochojch said:

Regards, the mistake ContextErrorException: Notice: Undefined index: newsearch Me acurre d ela following way: and edited the my-account.tpl and I want to add an iten mas called new search and eh placed the following code:

<a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" id="new-search-link" href="{$urls.pages.new_search}">
          <span class="link-item">
            <i class="material-icons">&#xE8B0;</i>
            {l s='Nueva Busqueda' d='Shop.Theme.Customeraccount'}
          </span>
        </a>
     i Created the files : NewSearchController:  (/Controllers/front/)

class NewSearchControllerCore extends FrontController
{
    public $auth = true;
    public $php_self = 'new-search';
    public $authRedirection = 'new-search';
    public $ssl = true;

    /**
     * Assign template vars related to page content
     * @see FrontController::initContent()
     */
    public function initContent()
    {
       

        $this->context->smarty->assign([
            'Contenido' => "mostrar",
        ]);

        parent::initContent();
        $this->setTemplate('customer/new-search');
    }

}

and  new-search.tpl :  (theme/classic/templates/customer)

{extends file='customer/page.tpl'}

{block name='page_title'}

<span class="sitemap-title">{l s='Nueva Busqueda' d='Shop.Theme.Customeraccount'}</span>

{/block}

{block name='page_content_container'}

<section>

</section>

{/block}

 

When I try to open from the mariner the section  (localhost/tienda/es/my-account)

The following mistake appears:

 ContextErrorException

Notice: Undefined index: newsearch

in aec64e1f1a7437e41ac5a6981d7bd0f24050a27f_2.file.my-account.tpl.php line 136
at Block_147005b6065ce0b9c54_87051534->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 247

That eh done badly? Thank you, for the help

Add the function:  

public function getBreadcrumbLinks()
    {
        $breadcrumb = parent::getBreadcrumbLinks();

        $breadcrumb['links'][] = $this->addMyAccountToBreadcrumb();

        return $breadcrumb;
    }

into NewSearchController, Nonetheless it does not work

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...