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..30a4faf538a 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,38 @@
return 1;
}
+ function openDuplicateDialog(keepImagesUrl,skipImagesUrl) {
+ var 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:'__('Copy the images onto the new product?') ?>',
+ recenterAuto:false,
+ hideEffect:Element.hide,
+ showEffect:Element.show,
+ id:"duplicate-product",
+ buttonClass:"form-button",
+ okLabel:"__('Yes'); ?>",
+ ok: duplicateKeepImages.bind(this),
+ cancelLabel: "__('Duplicate product 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..022a6b0aa5f 100644
--- a/app/locale/en_US/Mage_Adminhtml.csv
+++ b/app/locale/en_US/Mage_Adminhtml.csv
@@ -1312,3 +1312,10 @@
"{{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."
+"You can disable this message on","You can disable this message on"
+"Copy the images onto the new product?","Copy the images onto the new product?"
+"Copy images to the new product","Copy images to the new product"
+"Always ask","Always ask"
+"Duplicate product without images","Duplicate product without images"
+"Skip Images on Duplicate","Skip 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."