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

Ask a Question / Contact Us code duplication #6143

Open
torvista opened this issue Jan 18, 2024 · 1 comment
Open

Ask a Question / Contact Us code duplication #6143

torvista opened this issue Jan 18, 2024 · 1 comment

Comments

@torvista
Copy link
Member

Should these not be page-specific?

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?>

<?php if ($messageStack->size('contact') > 0) echo $messageStack->output('contact'); ?>

Not relevant/required for Ask a Question?

<?php
// show dropdown if set
if (!empty(CONTACT_US_LIST)){
?>
<label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
<?php echo zen_draw_pull_down_menu('send_to', $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
<br class="clearBoth">
<?php
}
?>

I supposed the contact form could be moved to a module for contact us, ask a question, back in stock...?

@lat9
Copy link
Contributor

lat9 commented Jan 19, 2024

  1. While those message-stack pages could be page-specific, I see no harm in the fact that the two pages share the same name.
  2. I can see a use-case where questions asked about a product might be associated with shipping vs. product behavior, with the question destination different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants