SIWA_Fabian Posted October 12, 2022 Share Posted October 12, 2022 Hello Guys Can anybody help me with this problem? A module i bought for a shop makes this call in one of its TPLs: href="{$link->getModuleLink('b2bregistration', 'b2b', array(), true)|escape:'htmlall':'UTF-8'}" The result if the following error: This issue happens in the hook "displayCustomerAccount". Not every customer is effected. Sofar I have no clue on why which one is affected and another is not. I dumped $link right before the hook {block name='display_customer_account'} {dump($link)} {hook h='displayCustomerAccount'} {/block} and inside the TPL-File of the module. <a class="col-lg-4 col-md-6 col-sm-6 col-xs-12" href="{$link->getModuleLink('b2bregistration', 'b2b', array(), true)|escape:'htmlall':'UTF-8'}" title="{l s='Create Account as B2B' d='Shop.Theme.Customeraccount'}"> <span class="link-item"> <i class="fal fa-suitcase"></i> {dump($link)}<br/> {l s='Create Account as B2B' d='Shop.Theme.Customeraccount'} </span> </a> These are the Results: working customer: not working customer (i removed the function inside the href so the dump gets executed): The module in question is the first one to be executed inside the hook. Does anybody have clues why the Link-Object gets removed for one customer and replaced by the string? Can anybody give insight on how I might find the place where the Link-Object gets replaced? How should I best search the code to find Sections which might be responsible? Thanks in Advance for your help. Best Regards Fabian Link to comment Share on other sites More sharing options...
ps8modules Posted October 12, 2022 Share Posted October 12, 2022 (edited) Prestashop 1.7 {url entity='module' name='b2bregistration' controller='myController' params=['paramKey1' => $paramValue1]} or {$this->context->link->getModuleLink('b2bregistration', 'b2b', [], null, null, null, true)} Edited October 12, 2022 by 4you.software (see edit history) 1 Link to comment Share on other sites More sharing options...
SIWA_Fabian Posted October 13, 2022 Author Share Posted October 13, 2022 14 hours ago, 4you.software said: Prestashop 1.7 {url entity='module' name='b2bregistration' controller='myController' params=['paramKey1' => $paramValue1]} or {$this->context->link->getModuleLink('b2bregistration', 'b2b', [], null, null, null, true)} The first one helped just fine. Thanks a lot! 1 Link to comment Share on other sites More sharing options...
ps8modules Posted October 13, 2022 Share Posted October 13, 2022 I gladly helped 😉 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now