Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

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

  • Changed from "Current product has images" → "Duplicate Product"

Dialog message

  • Simplified from verbose multi-line text with configuration path → "This product has images. Do you want to create a duplicate product that includes them?"
  • Removed "You can disable this message on: System > Configuration > Catalog Images > Product Image"

Dialog layout

  • Width increased from 450px to 505px for better text layout
  • Height changed from fixed 120px to "auto" for responsive sizing
  • Added top padding (1.25em) to content area for improved spacing
  • Centered button alignment for better visual balance

Code

// Before
var html = '<p><?php echo $this->__('Do you want to use the same images on the duplicate product?'); ?></p>';
html += '<p><small><?php echo $this->__('You can disable this message on'); ?>:<br/> <i>...</i></small></p><br/>';
title: '<?php echo $this->__('Current product has images') ?>'

// After  
var html = '<p><?php echo $this->__('This product has images. Do you want to create a duplicate product that includes them?'); ?></p>';
title: '<?php echo $this->__('Duplicate Product') ?>'

// Dialog configuration includes onShow handler for layout improvements

Button labels remain unchanged.

Files Modified

  • app/design/adminhtml/default/default/template/catalog/product/edit.phtml
  • app/locale/en_US/Mage_Adminhtml.csv
Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Follow-up the PR #5083: Review and refine text and labels related to section config</issue_title>
<issue_description>### Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

This report is related to this PR #5083.

The Duplicate Product popup currently displays:

  1. Title: Current product has images
  2. Content:
Do you want to use the same images on the duplicate product? 
You can disable this message on: 
System > Configuration > Catalog > Product Image
  1. Buttons:
    Duplicate with images
    Duplicate without images

This implementation lacks clarity and creates redundancy in the user interface.

Image

Expected Behavior

Enhance the Duplicate Product popup to align better with user intention and improve visual clarity:

  1. Title: Update to Duplicate Product to clearly reflect the duplication process underway.
  2. Content:
    Simplify to: This product has images. Do you want to create a duplicate product that includes them?
    Why it's beneficial: Removes unnecessary configurational details and presents a straightforward message.
  3. Buttons: Retain the existing
Image

Steps To Reproduce

  1. Attempt to duplicate a product with images in the Admin interface.
  2. Observe the current title, content, and button labels in the popup.
  3. Compare the behavior against the proposed refinements for clarity and intent.

Environment

- OpenMage: latest from repository
- PHP: 8.4
- Test environment: Ubuntu + DDEV

Anything else?

Replace the current code for the Duplicate Product popup with the following:

function openDuplicateDialog(keepImagesUrl, skipImagesUrl) {
    var html = '<p><?php echo $this->__('This product has images. Do you want to create a duplicate product that includes them?'); ?></p>';

    function duplicateKeepImages(dialogWindow) {
        dialogWindow.close();
        setLocation(keepImagesUrl);
    }
    function duplicateSkipImages(dialogWindow) {
        dialogWindow.close();
        setLocation(skipImagesUrl);
    }

    Dialog.confirm(html, {
        width: 450,
        height: 120,
        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),
    });
}

These changes improve the popup's readability while preserving its functionality and intention.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI changed the title [WIP] Refine text and labels in duplicate product popup Refine duplicate product dialog title and message text Jan 10, 2026
Copilot AI requested a review from addison74 January 10, 2026 12:50
@github-actions github-actions bot added Component: Catalog Relates to Mage_Catalog Template : admin Relates to admin template Component: Adminhtml Relates to Mage_Adminhtml translations Relates to app/locale labels Jan 10, 2026
@addison74
Copy link
Contributor

@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

implementation

Here is the result for the requested change

after_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]>
Copy link
Contributor Author

Copilot AI commented Jan 10, 2026

@copilot - replace Dialog.confim() with the code bellow:

...

Updated in commit 07ce45b. The dialog now has:

  • Width: 505px (increased from 450px)
  • Height: auto (changed from fixed 120px)
  • Top padding: 1.25em on content
  • Centered button alignment

The onShow handler applies the padding and button alignment dynamically when the dialog appears.

Copilot AI changed the title Refine duplicate product dialog title and message text Refine duplicate product dialog title, message text, and layout Jan 10, 2026
@addison74 addison74 marked this pull request as ready for review January 10, 2026 14:21
Copilot AI review requested due to automatic review settings January 10, 2026 14:21
Copy link
Contributor

Copilot AI left a 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

@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a 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.

@addison74 addison74 requested review from Hanmac and theroch January 15, 2026 20:17
@addison74 addison74 merged commit 0cff430 into main Jan 16, 2026
30 checks passed
@addison74 addison74 deleted the copilot/refine-duplicate-product-popup branch January 16, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Adminhtml Relates to Mage_Adminhtml Component: Catalog Relates to Mage_Catalog Template : admin Relates to admin template translations Relates to app/locale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Follow-up the PR #5083: Refine duplicate product dialog title, message text, and layout

4 participants