Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add category description to notifier #6469

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

scottcwilson
Copy link
Sponsor Contributor

Fixes #6467

@torvista
Copy link
Member

Should not also $current_categories_description be removed from
$zco_notifier->notify('NOTIFY_HEADER_END_INDEX_MAIN_TEMPLATE_VARS', NULL, $current_categories_description);
since it has no effect if modified?

@scottcwilson
Copy link
Sponsor Contributor Author

No. We want to avoid not-upwardly-compatible changes to notifers.

@torvista
Copy link
Member

Understood as a general rule, but given a previous comment to make the function of a notifier self-explanatory, leaving this here implies it can be changed, when it can't, so it is misleading.

@scottcwilson
Copy link
Sponsor Contributor Author

It can be changed. The change just won't show up in the template. It could be used somewhere else, who knows.

@drbyte
Copy link
Member

drbyte commented May 23, 2024

I wonder if the placement of the original notifier is the real problem here.
Yes, our standard practice is to leave most final notifier calls at the bottom of these header_php and main_template_vars files .... but in this sort of case where tpl_page_body is called manually (as is the case in all main_template_vars files), there's little point in the notifier hook coming after it.
I haven't looked at the overall code-base to see how drastic this sort of pattern correction might be.

@scottcwilson
Copy link
Sponsor Contributor Author

Let's not overcorrect a non-problem based on a speculation. The original issue is resolved. Unless there's an actual problem with the last notifier, this should be sufficient.

@drbyte drbyte merged commit 5d7cc23 into zencart:master Jun 6, 2024
8 checks passed
@scottcwilson scottcwilson deleted the cat_desc branch June 6, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

index/category listing, final notifier for categories_description correct?
3 participants