我需要在我的新插件中覆盖cscart中的fncatelog.php。
My addon files :-
1. app/addons/newaddon/frontend/controllers/frontend/categories.post.php
2. design/themes/response/templates/addons/newaddon/overrides/blocks/product_filters/original.tpl
In func.php
I need to override the fn_get_filters_products_count() this function in my newaddon.
我该怎么办?请帮帮我。
答案 0 :(得分:1)
您可以使用以下某个钩子修改此函数返回的数据: get_filters_products_count_pre get_filters_products_count_before_select_filters get_product_filter_fields
您可以在http://docs.cs-cart.com/4.2.x/addons/hooking/index.html页面上阅读有关CS-Cart中的挂钩系统的更多信息。
答案 1 :(得分:1)
您无法覆盖整个功能。但是您可以使用钩子来修改输入参数并返回参数。 在你的情况下钩子是
要了解有关cscart挂钩的更多信息,请使用此链接 - http://docs.cs-cart.com/4.3.x/developer_guide/core/coding_standards/hooks.html