-
-
Notifications
You must be signed in to change notification settings - Fork 450
Refine duplicate product dialog title, message text, and layout #5229
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
Conversation
Co-authored-by: addison74 <[email protected]>
|
@copilot - replace Dialog.confim() with the code bellow: Dialog.confirm(html, {
width: 505,
height: "auto",
draggable: true,
closable: true,
className: "magento",
windowClassName: "popup-window",
title: '<?php echo $this->__('Duplicate Product') ?>',
recenterAuto: false,
hideEffect: Element.hide,
showEffect: Element.show,
id: "duplicate-product",
buttonClass: "form-button",
okLabel: "<?php echo $this->__('Duplicate with images'); ?>",
ok: duplicateKeepImages.bind(this),
cancelLabel: "<?php echo $this->__('Duplicate without images'); ?>",
cancel: duplicateSkipImages.bind(this),
onShow: function(dialogWindow) {
var content = document.getElementById('duplicate-product_content');
if (content) {
content.style.paddingTop = '1.25em';
}
var buttons = document.querySelectorAll('.magento_buttons');
buttons.forEach(function(button) {
button.style.textAlign = 'center';
});
}
});This is the visual result implemented by you
Here is the result for the requested change
Changes for the height and width values. Added onShow() for padding on top and centering the buttons. |
- Increase width from 450px to 505px for better text layout - Change height from fixed 120px to "auto" for responsive sizing - Add onShow handler to apply top padding (1.25em) to content - Center-align buttons for improved visual balance Co-authored-by: addison74 <[email protected]>
... Updated in commit 07ce45b. The dialog now has:
The onShow handler applies the padding and button alignment dynamically when the dialog appears. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refines the duplicate product dialog by improving its title, simplifying the message text, and enhancing the layout for better user experience. The changes remove verbose configuration instructions and create a cleaner, more focused dialog.
Changes:
- Updated dialog title from "Current product has images" to "Duplicate Product"
- Simplified message text to be more direct and user-friendly, removing configuration path references
- Enhanced dialog layout with increased width (505px), auto height, additional padding, and centered buttons
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/locale/en_US/Mage_Adminhtml.csv | Replaced verbose dialog strings with simplified, user-friendly text |
| app/design/adminhtml/default/default/template/catalog/product/edit.phtml | Updated openDuplicateDialog function with new message, improved formatting, responsive sizing, and onShow handler for layout adjustments |
app/design/adminhtml/default/default/template/catalog/product/edit.phtml
Show resolved
Hide resolved
app/design/adminhtml/default/default/template/catalog/product/edit.phtml
Outdated
Show resolved
Hide resolved
…edit.phtml Co-authored-by: Copilot <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.





Follow-up to #5083. The duplicate product dialog displayed a verbose title and configuration instructions that cluttered the UI and obscured the user's decision.
Changes
Dialog title
Dialog message
Dialog layout
Code
Button labels remain unchanged.
Files Modified
app/design/adminhtml/default/default/template/catalog/product/edit.phtmlapp/locale/en_US/Mage_Adminhtml.csvOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.