Magento 将自定义代码添加到高级搜索结果页面的右侧边栏

Magento 将自定义代码添加到高级搜索结果页面的右侧边栏,magento,Magento,我试图在高级搜索结果页面的右侧栏中显示自定义(动态)文本 我可以添加一个静态块,但在这种情况下这没有帮助 我已经将代码添加到了产品视图页面,并且效果很好 有关示例,请参见 我需要一些类似的高级搜索结果 有什么建议吗 谢谢如果您不知道要编辑哪一页,请按照以下步骤操作: 要在Magento中打开模板路径提示,请执行以下操作: 1.log into the magento back-end admin 2.Go to System -> Configuration in the main me

我试图在高级搜索结果页面的右侧栏中显示自定义(动态)文本

我可以添加一个静态块,但在这种情况下这没有帮助

我已经将代码添加到了产品视图页面,并且效果很好

有关示例,请参见

我需要一些类似的高级搜索结果

有什么建议吗


谢谢

如果您不知道要编辑哪一页,请按照以下步骤操作:

要在Magento中打开模板路径提示,请执行以下操作:

1.log into the magento back-end admin

2.Go to System -> Configuration in the main menu

3.Go to Developer on the bottom left under ADVANCED

4.Switch to the store view on the top left to your current website or store view.

5.Under the Debug tab of the same Developer config page you will see a new option appear that will allow you to turn on/off template path hints.
记得清除缓存。

更多信息

如果这对您没有帮助,则
右侧栏
页面应为: \app\design\frontend\yourtemplate\yourtemplate\template\catalog\navigation\left\u nav.phtml


您可以在这里编写自定义文本。

您只需编辑静态块内容,并在底部添加以下代码

{{block type=“core/template”template=“catalogsearch/advanced/resultpagelinks.phtml”}

在正确的路径中创建catalogsearch/advanced/resultpagelinks.phtml文件,并在此文件中生成动态链接。在此文件中,如果需要,您将通过调用Mage::app()->getLayout()->getBlock('catalogsearch/advanced_result')来获取搜索结果块数据

比如说

$resultsBlock=Mage::app()->getLayout()->getBlockSingleton('catalogsearch/advanced_result'); 变量转储($resultsBlock->getResultCount())//返回搜索结果计数


因此,您可以根据搜索结果创建动态链接。

您是如何在产品页面上添加此链接的?我编辑了product/view.phtml--在我知道要编辑的文件(我想--results.phtml)下面添加了代码。我已经对“实际结果”页面进行了更改——这是如何将文本添加到右侧边栏/列,我无法理解。@Akiva,我可以查看结果页面吗?你有url吗?@ManafPM产品的url是@Akiva,而不是产品页面。我只是想看看搜索结果页面。您告诉我,除了文本之外,您已经对“实际结果”页面进行了更改。你能给我那个页面的url吗?@ManafPM如果你点击产品页面顶部的Orthodong论坛链接,它会带你进入一个高级搜索结果页面——修改后显示更多信息。在右栏/顶部的侧栏中有2..--这是一个静态块。我想把链接放在下面(类似于产品页面侧面的链接),谢谢——我会在周日早上试试,让你知道。