diff --git a/app/design/adminhtml/default/default/template/catalog/product/edit.phtml b/app/design/adminhtml/default/default/template/catalog/product/edit.phtml
index 5fb4f6e9490..d118f0c4cd3 100644
--- a/app/design/adminhtml/default/default/template/catalog/product/edit.phtml
+++ b/app/design/adminhtml/default/default/template/catalog/product/edit.phtml
@@ -92,6 +92,39 @@
return 1;
}
+ function openDuplicateDialog(keepImagesUrl,skipImagesUrl) {
+ var html = '__('Do you want to use the same images on the duplicate product?'); ?>
';
+ html += '__('You can disable this message on'); ?>:
__('System'); ?> > __('Configuration'); ?> > __('Catalog Images'); ?> > __('Product Image'); ?>
';
+
+ 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:'__('Current product has images') ?>',
+ recenterAuto:false,
+ hideEffect:Element.hide,
+ showEffect:Element.show,
+ id:"duplicate-product",
+ buttonClass:"form-button",
+ okLabel:"__('Duplicate with images'); ?>",
+ ok: duplicateKeepImages.bind(this),
+ cancelLabel: "__('Duplicate without images'); ?>",
+ cancel: duplicateSkipImages.bind(this),
+ });
+ }
+
Event.observe(window, 'load', function() {
var objName = 'getSelectedTabId() ?>';
if (objName) {
diff --git a/app/locale/en_US/Mage_Adminhtml.csv b/app/locale/en_US/Mage_Adminhtml.csv
index 0262cbb17b8..945e5947641 100644
--- a/app/locale/en_US/Mage_Adminhtml.csv
+++ b/app/locale/en_US/Mage_Adminhtml.csv
@@ -1312,3 +1312,12 @@
"{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento configuration.","{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento configuration."
"Powered by OpenMage","Powered by OpenMage"
"At least one currency has to be allowed.","At least one currency has to be allowed."
+"Do you want to use the same images on the duplicate product?","Do you want to use the same images on the duplicate product?"
+"You can disable this message on","You can disable this message on"
+"Current product has images","Current product has images"
+"Duplicate with images","Duplicate with images"
+"Duplicate without images","Duplicate without images"
+"Always ask","Always ask"
+"Duplicate product without images","Duplicate product without images"
+"Copy Images on Duplicate","Copy Images on Duplicate"
+"'Ask' option only affects Admin interface. Default for programmatical duplication is to persist images.","'Ask' option only affects Admin interface. Default for programmatical duplication is to persist images."