Version Notes
This extension is working on Magento 1.6, 1.7 and 1.8 perfectly.
Download this release
Release Info
Developer | eSparkBiz |
Extension | Video_Video_Gallery |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Mymodule/Videogallery/Block/Adminhtml/Catalog/Product/Edit/Tab/Videos.php +41 -0
- app/code/community/Mymodule/Videogallery/Block/Adminhtml/Catalog/Product/Edit/Tabs.php +20 -0
- app/code/community/Mymodule/Videogallery/Block/Adminhtml/Videobox.php +53 -0
- app/code/community/Mymodule/Videogallery/Block/Catalog/Product/View/Media.php +24 -0
- app/code/community/Mymodule/Videogallery/Helper/Data.php +5 -0
- app/code/community/Mymodule/Videogallery/Model/Observer.php +30 -0
- app/code/community/Mymodule/Videogallery/Model/Resource/Setup.php +6 -0
- app/code/community/Mymodule/Videogallery/Model/Resource/Videos.php +8 -0
- app/code/community/Mymodule/Videogallery/Model/Resource/Videos/Collection.php +10 -0
- app/code/community/Mymodule/Videogallery/Model/Videos.php +8 -0
- app/code/community/Mymodule/Videogallery/controllers/Adminhtml/Catalog/ProductController.php +11 -0
- app/code/community/Mymodule/Videogallery/controllers/IndexController.php +11 -0
- app/code/community/Mymodule/Videogallery/etc/config.xml +135 -0
- app/code/community/Mymodule/Videogallery/etc/system.xml +44 -0
- app/code/community/Mymodule/Videogallery/sql/videogallery_setup/mysql4-install-0.1.0.php +15 -0
- app/design/adminhtml/default/default/layout/videogallery.xml +12 -0
- app/design/adminhtml/default/default/template/access_denied.phtml +40 -0
- app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml +105 -0
- app/design/adminhtml/default/default/template/api/roleinfo.phtml +47 -0
- app/design/adminhtml/default/default/template/api/roles.phtml +37 -0
- app/design/adminhtml/default/default/template/api/rolesedit.phtml +143 -0
- app/design/adminhtml/default/default/template/api/rolesusers.phtml +28 -0
- app/design/adminhtml/default/default/template/api/user_roles_grid_js.phtml +85 -0
- app/design/adminhtml/default/default/template/api/userinfo.phtml +52 -0
- app/design/adminhtml/default/default/template/api/usernroles.phtml +31 -0
- app/design/adminhtml/default/default/template/api/userroles.phtml +45 -0
- app/design/adminhtml/default/default/template/api/users.phtml +40 -0
- app/design/adminhtml/default/default/template/api2/attribute/buttons.phtml +53 -0
- app/design/adminhtml/default/default/template/api2/attribute/resource.phtml +158 -0
- app/design/adminhtml/default/default/template/api2/permissions/user/edit/tab/roles/js.phtml +59 -0
- app/design/adminhtml/default/default/template/api2/role/buttons.phtml +52 -0
- app/design/adminhtml/default/default/template/api2/role/users_grid_js.phtml +122 -0
- app/design/adminhtml/default/default/template/authorizenet/directpost/iframe.phtml +56 -0
- app/design/adminhtml/default/default/template/authorizenet/directpost/info.phtml +157 -0
- app/design/adminhtml/default/default/template/backup/dialogs.phtml +164 -0
- app/design/adminhtml/default/default/template/backup/left.phtml +27 -0
- app/design/adminhtml/default/default/template/backup/list.phtml +40 -0
- app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/bundle.phtml +95 -0
- app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/checkbox.phtml +52 -0
- app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/multi.phtml +49 -0
- app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml +65 -0
- app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml +55 -0
- app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml +76 -0
- app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option.phtml +235 -0
- app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/search.phtml +35 -0
- app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/selection.phtml +352 -0
- app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml +411 -0
- app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml +341 -0
- app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml +398 -0
- app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml +340 -0
- app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml +415 -0
- app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml +118 -0
- app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml +115 -0
- app/design/adminhtml/default/default/template/captcha/zend.phtml +56 -0
- app/design/adminhtml/default/default/template/catalog/category/checkboxes/tree.phtml +199 -0
- app/design/adminhtml/default/default/template/catalog/category/edit.phtml +198 -0
- app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml +258 -0
- app/design/adminhtml/default/default/template/catalog/category/tree.phtml +480 -0
- app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml +202 -0
- app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml +56 -0
- app/design/adminhtml/default/default/template/catalog/product.phtml +47 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml +338 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/new/created.phtml +54 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml +223 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/set/main.phtml +461 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/set/main/tree/attribute.phtml +26 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/set/main/tree/group.phtml +27 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/add.phtml +41 -0
- app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/main.phtml +36 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/configure.phtml +54 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml +60 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/grouped.phtml +95 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options.phtml +45 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/js.phtml +106 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/date.phtml +94 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/default.phtml +31 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/file.phtml +103 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/select.phtml +39 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/text.phtml +42 -0
- app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/qty.phtml +36 -0
- app/design/adminhtml/default/default/template/catalog/product/created.phtml +59 -0
- app/design/adminhtml/default/default/template/catalog/product/edit.phtml +133 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/action/attribute.phtml +61 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/action/inventory.phtml +181 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/action/websites.phtml +120 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/categories.phtml +148 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml +57 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml +359 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml +53 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options/type/file.phtml +61 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml +173 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/options/type/text.phtml +55 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/price/group.phtml +169 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml +171 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/serializer.phtml +33 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml +153 -0
- app/design/adminhtml/default/default/template/catalog/product/edit/websites.phtml +100 -0
- app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml +125 -0
- app/design/adminhtml/default/default/template/catalog/product/js.phtml +94 -0
- app/design/adminhtml/default/default/template/catalog/product/price.phtml +383 -0
- app/design/adminhtml/default/default/template/catalog/product/tab/alert.phtml +37 -0
- app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml +263 -0
- app/design/adminhtml/default/default/template/catalog/product/widget/chooser/container.phtml +37 -0
- app/design/adminhtml/default/default/template/catalog/wysiwyg/js.phtml +118 -0
- app/design/adminhtml/default/default/template/centinel/authentication/complete.phtml +38 -0
- app/design/adminhtml/default/default/template/centinel/authentication/start.phtml +38 -0
- app/design/adminhtml/default/default/template/centinel/validation/form.phtml +37 -0
- app/design/adminhtml/default/default/template/cms/browser/content.phtml +49 -0
- app/design/adminhtml/default/default/template/cms/browser/content/files.phtml +54 -0
- app/design/adminhtml/default/default/template/cms/browser/content/newfolder.phtml +33 -0
- app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml +71 -0
- app/design/adminhtml/default/default/template/cms/browser/js.phtml +39 -0
- app/design/adminhtml/default/default/template/cms/browser/tree.phtml +82 -0
- app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml +32 -0
- app/design/adminhtml/default/default/template/coming.phtml +30 -0
- app/design/adminhtml/default/default/template/compiler/process.phtml +94 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/authors.phtml +91 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/contents.phtml +91 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/depends.phtml +137 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/load.phtml +35 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/package.phtml +91 -0
- app/design/adminhtml/default/default/template/connect/extension/custom/release.phtml +29 -0
- app/design/adminhtml/default/default/template/currencysymbol/grid.phtml +100 -0
- app/design/adminhtml/default/default/template/customer/edit/js.phtml +33 -0
- app/design/adminhtml/default/default/template/customer/edit/tab/account/form/renderer/group.phtml +52 -0
- app/design/adminhtml/default/default/template/customer/edit/tab/view/grid/item.phtml +46 -0
- app/design/adminhtml/default/default/template/customer/online.phtml +34 -0
- app/design/adminhtml/default/default/template/customer/sales/order/create/address/form/renderer/vat.phtml +52 -0
- app/design/adminhtml/default/default/template/customer/system/config/validatevat.phtml +65 -0
- app/design/adminhtml/default/default/template/customer/tab/addresses.phtml +635 -0
- app/design/adminhtml/default/default/template/customer/tab/cart.phtml +96 -0
- app/design/adminhtml/default/default/template/customer/tab/newsletter.phtml +30 -0
- app/design/adminhtml/default/default/template/customer/tab/view.phtml +82 -0
- app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml +85 -0
- app/design/adminhtml/default/default/template/customer/tab/wishlist.phtml +79 -0
- app/design/adminhtml/default/default/template/dashboard/graph.phtml +65 -0
- app/design/adminhtml/default/default/template/dashboard/graph/disabled.phtml +31 -0
- app/design/adminhtml/default/default/template/dashboard/grid.phtml +86 -0
- app/design/adminhtml/default/default/template/dashboard/index.phtml +133 -0
- app/design/adminhtml/default/default/template/dashboard/salebar.phtml +36 -0
- app/design/adminhtml/default/default/template/dashboard/searches.phtml +35 -0
- app/design/adminhtml/default/default/template/dashboard/store/switcher.phtml +77 -0
- app/design/adminhtml/default/default/template/dashboard/totalbar.phtml +42 -0
- app/design/adminhtml/default/default/template/directory/js/optional_zip_countries.phtml +66 -0
- app/design/adminhtml/default/default/template/downloadable/product/composite/fieldset/downloadable.phtml +91 -0
- app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable.phtml +273 -0
- app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml +388 -0
- app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/samples.phtml +217 -0
- app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml +62 -0
- app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml +62 -0
- app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml +62 -0
- app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/create/items/renderer/downloadable.phtml +139 -0
- app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/view/items/renderer/downloadable.phtml +123 -0
- app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/create/items/renderer/downloadable.phtml +133 -0
- app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/view/items/renderer/downloadable.phtml +123 -0
- app/design/adminhtml/default/default/template/downloadable/sales/order/view/items/renderer/downloadable.phtml +146 -0
- app/design/adminhtml/default/default/template/eav/attribute/edit/js.phtml +26 -0
- app/design/adminhtml/default/default/template/email/order/items.phtml +150 -0
- app/design/adminhtml/default/default/template/empty.phtml +42 -0
- app/design/adminhtml/default/default/template/example.phtml +301 -0
- app/design/adminhtml/default/default/template/forgotpassword.phtml +74 -0
- app/design/adminhtml/default/default/template/formkey.phtml +27 -0
- app/design/adminhtml/default/default/template/giftmessage/form.phtml +57 -0
- app/design/adminhtml/default/default/template/giftmessage/giftoptionsform.phtml +68 -0
- app/design/adminhtml/default/default/template/giftmessage/helper.phtml +104 -0
- app/design/adminhtml/default/default/template/giftmessage/popup.phtml +56 -0
- app/design/adminhtml/default/default/template/giftmessage/sales/order/create/giftoptions.phtml +53 -0
- app/design/adminhtml/default/default/template/giftmessage/sales/order/create/items.phtml +41 -0
- app/design/adminhtml/default/default/template/giftmessage/sales/order/view/giftoptions.phtml +53 -0
- app/design/adminhtml/default/default/template/giftmessage/sales/order/view/items.phtml +44 -0
- app/design/adminhtml/default/default/template/googlebase/captcha.phtml +35 -0
- app/design/adminhtml/default/default/template/googlebase/items.phtml +55 -0
- app/design/adminhtml/default/default/template/googlebase/types/edit/attributes.phtml +125 -0
- app/design/adminhtml/default/default/template/importexport/busy.phtml +43 -0
- app/design/adminhtml/default/default/template/importexport/export/form/after.phtml +43 -0
- app/design/adminhtml/default/default/template/importexport/export/form/before.phtml +73 -0
- app/design/adminhtml/default/default/template/importexport/import/form/after.phtml +32 -0
- app/design/adminhtml/default/default/template/importexport/import/form/before.phtml +137 -0
- app/design/adminhtml/default/default/template/importexport/import/frame/result.phtml +31 -0
- app/design/adminhtml/default/default/template/index/notifications.phtml +34 -0
- app/design/adminhtml/default/default/template/login.phtml +77 -0
- app/design/adminhtml/default/default/template/media/editor.phtml +46 -0
- app/design/adminhtml/default/default/template/media/uploader.phtml +73 -0
- app/design/adminhtml/default/default/template/moneybookers/info.phtml +26 -0
- app/design/adminhtml/default/default/template/moneybookers/jsinit.phtml +37 -0
- app/design/adminhtml/default/default/template/moneybookers/pdf/info.phtml +24 -0
- app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml +91 -0
- app/design/adminhtml/default/default/template/newsletter/preview/store.phtml +61 -0
- app/design/adminhtml/default/default/template/newsletter/problem/list.phtml +94 -0
- app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml +99 -0
- app/design/adminhtml/default/default/template/newsletter/queue/list.phtml +39 -0
- app/design/adminhtml/default/default/template/newsletter/queue/preview.phtml +37 -0
- app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml +82 -0
- app/design/adminhtml/default/default/template/newsletter/template/edit.phtml +190 -0
- app/design/adminhtml/default/default/template/newsletter/template/list.phtml +39 -0
- app/design/adminhtml/default/default/template/newsletter/template/preview.phtml +37 -0
- app/design/adminhtml/default/default/template/notification/baseurl.phtml +35 -0
- app/design/adminhtml/default/default/template/notification/security.phtml +32 -0
- app/design/adminhtml/default/default/template/notification/survey.phtml +56 -0
- app/design/adminhtml/default/default/template/notification/toolbar.phtml +83 -0
- app/design/adminhtml/default/default/template/notification/window.phtml +77 -0
- app/design/adminhtml/default/default/template/oauth/authorize/button-simple.phtml +62 -0
- app/design/adminhtml/default/default/template/oauth/authorize/button.phtml +59 -0
- app/design/adminhtml/default/default/template/oauth/authorize/confirm-simple.phtml +52 -0
- app/design/adminhtml/default/default/template/oauth/authorize/confirm.phtml +46 -0
- app/design/adminhtml/default/default/template/oauth/authorize/form/login-simple.phtml +77 -0
- app/design/adminhtml/default/default/template/oauth/authorize/form/login.phtml +67 -0
- app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml +50 -0
- app/design/adminhtml/default/default/template/oauth/authorize/reject-simple.phtml +47 -0
- app/design/adminhtml/default/default/template/oauth/authorize/reject.phtml +44 -0
- app/design/adminhtml/default/default/template/overlay_popup.phtml +55 -0
- app/design/adminhtml/default/default/template/page.phtml +91 -0
- app/design/adminhtml/default/default/template/page/footer.phtml +47 -0
- app/design/adminhtml/default/default/template/page/head.phtml +34 -0
- app/design/adminhtml/default/default/template/page/header.phtml +64 -0
- app/design/adminhtml/default/default/template/page/js/calendar.phtml +100 -0
- app/design/adminhtml/default/default/template/page/js/translate.phtml +67 -0
- app/design/adminhtml/default/default/template/page/menu.phtml +36 -0
- app/design/adminhtml/default/default/template/page/notices.phtml +44 -0
- app/design/adminhtml/default/default/template/pagecache/cache/additional.phtml +39 -0
- app/design/adminhtml/default/default/template/paygate/form/cc.phtml +74 -0
- app/design/adminhtml/default/default/template/paygate/info/cc.phtml +56 -0
- app/design/adminhtml/default/default/template/paygate/info/pdf.phtml +43 -0
- app/design/adminhtml/default/default/template/payment/form/cc.phtml +117 -0
- app/design/adminhtml/default/default/template/payment/form/ccsave.phtml +67 -0
app/code/community/Mymodule/Videogallery/Block/Adminhtml/Catalog/Product/Edit/Tab/Videos.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Block_Adminhtml_Catalog_Product_Edit_Tab_Videos extends Mage_Adminhtml_Block_Widget
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
}
|
9 |
+
|
10 |
+
|
11 |
+
protected function _prepareLayout()
|
12 |
+
{
|
13 |
+
if(Mage::getStoreConfig('videogallery/general/enable')):
|
14 |
+
$this->setChild('add_button',
|
15 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
16 |
+
->setData(array(
|
17 |
+
'label' => Mage::helper('catalog')->__('Add New Video'),
|
18 |
+
'class' => 'add',
|
19 |
+
'id' => 'add_new_defined_video'
|
20 |
+
))
|
21 |
+
);
|
22 |
+
|
23 |
+
$this->setChild('videos_box',
|
24 |
+
$this->getLayout()->createBlock('videogallery/adminhtml_videobox')
|
25 |
+
);
|
26 |
+
|
27 |
+
endif;
|
28 |
+
|
29 |
+
return parent::_prepareLayout();
|
30 |
+
}
|
31 |
+
|
32 |
+
public function getAddButtonHtml()
|
33 |
+
{
|
34 |
+
return $this->getChildHtml('add_button');
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getVideosBoxHtml()
|
38 |
+
{
|
39 |
+
return $this->getChildHtml('videos_box');
|
40 |
+
}
|
41 |
+
}
|
app/code/community/Mymodule/Videogallery/Block/Adminhtml/Catalog/Product/Edit/Tabs.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mymodule_Videogallery_Block_Adminhtml_Catalog_Product_Edit_Tabs extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs
|
3 |
+
{
|
4 |
+
protected function _prepareLayout()
|
5 |
+
{
|
6 |
+
parent::_prepareLayout();
|
7 |
+
if(Mage::getStoreConfig('videogallery/general/enable')):
|
8 |
+
if($this->getRequest()->getModuleName()=="admin" && $this->getRequest()->getControllerName()=="catalog_product"){
|
9 |
+
if(($this->getRequest()->getParam("set") && $this->getRequest()->getActionName()=="new") || $this->getRequest()->getActionName()=="edit"){
|
10 |
+
$this->addTab('videos', array(
|
11 |
+
'label' => Mage::helper('catalog')->__('Videos'),
|
12 |
+
'url' => $this->getUrl('*/*/videos', array('_current' => true)),
|
13 |
+
'class' => 'ajax',
|
14 |
+
));
|
15 |
+
}
|
16 |
+
}
|
17 |
+
endif;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
?>
|
app/code/community/Mymodule/Videogallery/Block/Adminhtml/Videobox.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Block_Adminhtml_Videobox extends Mage_Adminhtml_Block_Abstract
|
4 |
+
{
|
5 |
+
public function _construct() {
|
6 |
+
parent::_construct();
|
7 |
+
if(Mage::getStoreConfig('videogallery/general/enable'))
|
8 |
+
$this->setTemplate('videogallery/videobox.phtml');
|
9 |
+
}
|
10 |
+
|
11 |
+
protected function _prepareLayout()
|
12 |
+
{
|
13 |
+
if(Mage::getStoreConfig('videogallery/general/enable')):
|
14 |
+
$this->setChild('delete_button',
|
15 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
16 |
+
->setData(array(
|
17 |
+
'label' => Mage::helper('catalog')->__('Delete Video'),
|
18 |
+
'class' => 'delete delete-video ',
|
19 |
+
))
|
20 |
+
);
|
21 |
+
endif;
|
22 |
+
|
23 |
+
return parent::_prepareLayout();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function getFieldName()
|
27 |
+
{
|
28 |
+
return 'product[videos]';
|
29 |
+
}
|
30 |
+
|
31 |
+
public function getFieldId()
|
32 |
+
{
|
33 |
+
return 'product_video';
|
34 |
+
}
|
35 |
+
|
36 |
+
public function getVideoIdCount()
|
37 |
+
{
|
38 |
+
$video = Mage::getModel("videogallery/videos")->getCollection()->addFieldToFilter("video_product_id",$this->getRequest()->getParam("id"));
|
39 |
+
return count($video->getData()) + 1;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getVideoData() {
|
43 |
+
$video = Mage::getModel("videogallery/videos")->getCollection()->addFieldToFilter("video_product_id",$this->getRequest()->getParam("id"))->setOrder('video_id', 'ASC');
|
44 |
+
return $video->getData();
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
public function getDeleteButtonHtml()
|
49 |
+
{
|
50 |
+
return $this->getChildHtml('delete_button');
|
51 |
+
}
|
52 |
+
}
|
53 |
+
?>
|
app/code/community/Mymodule/Videogallery/Block/Catalog/Product/View/Media.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mymodule_Videogallery_Block_Catalog_Product_View_Media extends Mage_Catalog_Block_Product_View_Media
|
3 |
+
{
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
}
|
7 |
+
|
8 |
+
public function getVideoCollection(){
|
9 |
+
$product=$this->getProduct();
|
10 |
+
$video = Mage::getModel("videogallery/videos")->getCollection()->addFieldToFilter("video_product_id",$product->getId())->setOrder('video_id', 'ASC');
|
11 |
+
return $video;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getVideoEmbedUrl($videoUrl){
|
15 |
+
$youtubeId= ltrim(substr($videoUrl, strrpos($videoUrl, "v="), strlen($videoUrl)),"v=");
|
16 |
+
return "//www.youtube.com/embed/".$youtubeId;
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getVideoImage($videoUrl){
|
20 |
+
$youtubeId= ltrim(substr($videoUrl, strrpos($videoUrl, "v="), strlen($videoUrl)),"v=");
|
21 |
+
return "http://img.youtube.com/vi/".$youtubeId."/1.jpg";
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Mymodule/Videogallery/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mymodule_Videogallery_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
app/code/community/Mymodule/Videogallery/Model/Observer.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Model_Observer {
|
4 |
+
|
5 |
+
public function saveVideos($event) {
|
6 |
+
$product = $event->getProduct();
|
7 |
+
$videoPostData = $product->getData("videos");
|
8 |
+
foreach ($videoPostData as $video){
|
9 |
+
$video_data= Mage::getModel("videogallery/videos");
|
10 |
+
//This is for inserting new videos
|
11 |
+
if(!empty($video["videoUrl"]) && $video["is_delete"]==0 && !isset($video['video_id'])){
|
12 |
+
$video_data->setData("video_product_id",$product->getId());
|
13 |
+
$video_data->setData("video_url",$video["videoUrl"]);
|
14 |
+
$video_data->save();
|
15 |
+
}
|
16 |
+
// This is for deleting existing videos
|
17 |
+
else if($video["is_delete"]==1 && isset($video['video_id'])){
|
18 |
+
$video_data->load($video['video_id']);
|
19 |
+
$video_data->delete();
|
20 |
+
}
|
21 |
+
// This is for updating existing videos
|
22 |
+
if(isset($video['video_id']) && $video["is_delete"]==0){
|
23 |
+
$video_data->load($video['video_id']);
|
24 |
+
$video_data->setData("video_url",$video["videoUrl"]);
|
25 |
+
$video_data->save();
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Mymodule/Videogallery/Model/Resource/Setup.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {
|
4 |
+
|
5 |
+
}
|
6 |
+
?>
|
app/code/community/Mymodule/Videogallery/Model/Resource/Videos.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Model_Resource_Videos extends Mage_Core_Model_Resource_Db_Abstract {
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('videogallery/videos', 'video_id');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/Mymodule/Videogallery/Model/Resource/Videos/Collection.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Mymodule_Videogallery_Model_Resource_Videos_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract {
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('videogallery/videos');
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
10 |
+
?>
|
app/code/community/Mymodule/Videogallery/Model/Videos.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mymodule_Videogallery_Model_Videos extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
protected function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('videogallery/videos');
|
7 |
+
}
|
8 |
+
}
|
app/code/community/Mymodule/Videogallery/controllers/Adminhtml/Catalog/ProductController.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once 'Mage/Adminhtml/controllers/Catalog/ProductController.php';
|
3 |
+
class Mymodule_Videogallery_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController
|
4 |
+
{
|
5 |
+
public function videosAction()
|
6 |
+
{
|
7 |
+
$this->_initProduct();
|
8 |
+
$this->loadLayout();
|
9 |
+
$this->renderLayout();
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Mymodule/Videogallery/controllers/IndexController.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mymodule_Videogallery_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->renderLayout();
|
8 |
+
}
|
9 |
+
}
|
10 |
+
|
11 |
+
?>
|
app/code/community/Mymodule/Videogallery/etc/config.xml
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Mymodule_Videogallery>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Mymodule_Videogallery>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<videogallery>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Mymodule_Videogallery</module>
|
14 |
+
<frontName>videogallery</frontName>
|
15 |
+
</args>
|
16 |
+
</videogallery>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<videogallery>
|
21 |
+
<file>videogallery.xml</file>
|
22 |
+
</videogallery>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<adminhtml>
|
27 |
+
<layout>
|
28 |
+
<updates>
|
29 |
+
<videogallery>
|
30 |
+
<file>videogallery.xml</file>
|
31 |
+
</videogallery>
|
32 |
+
</updates>
|
33 |
+
</layout>
|
34 |
+
<acl>
|
35 |
+
<resources>
|
36 |
+
<admin>
|
37 |
+
<children>
|
38 |
+
<system>
|
39 |
+
<children>
|
40 |
+
<config>
|
41 |
+
<children>
|
42 |
+
<videogallery translate="title" module="videogallery">
|
43 |
+
<title>Videogallery</title>
|
44 |
+
<sort_order>99</sort_order>
|
45 |
+
</videogallery>
|
46 |
+
</children>
|
47 |
+
</config>
|
48 |
+
</children>
|
49 |
+
</system>
|
50 |
+
</children>
|
51 |
+
</admin>
|
52 |
+
</resources>
|
53 |
+
</acl>
|
54 |
+
</adminhtml>
|
55 |
+
<admin>
|
56 |
+
<routers>
|
57 |
+
<videogallery_admin>
|
58 |
+
<use>admin</use>
|
59 |
+
<args>
|
60 |
+
<module>Mymodule_Videogallery</module>
|
61 |
+
<frontName>videogallery_admin</frontName>
|
62 |
+
</args>
|
63 |
+
</videogallery_admin>
|
64 |
+
<adminhtml>
|
65 |
+
<args>
|
66 |
+
<modules>
|
67 |
+
<mymodule_videogallery before="Mage_Adminhtml">Mymodule_Videogallery_Adminhtml</mymodule_videogallery>
|
68 |
+
</modules>
|
69 |
+
</args>
|
70 |
+
</adminhtml>
|
71 |
+
</routers>
|
72 |
+
</admin>
|
73 |
+
<global>
|
74 |
+
<blocks>
|
75 |
+
<videogallery>
|
76 |
+
<class>Mymodule_Videogallery_Block</class>
|
77 |
+
</videogallery>
|
78 |
+
<adminhtml>
|
79 |
+
<rewrite>
|
80 |
+
<catalog_product_edit_tabs>Mymodule_Videogallery_Block_Adminhtml_Catalog_Product_Edit_Tabs</catalog_product_edit_tabs>
|
81 |
+
</rewrite>
|
82 |
+
</adminhtml>
|
83 |
+
<catalog>
|
84 |
+
<rewrite>
|
85 |
+
<product_view_media>Mymodule_Videogallery_Block_Catalog_Product_View_Media</product_view_media>
|
86 |
+
</rewrite>
|
87 |
+
</catalog>
|
88 |
+
</blocks>
|
89 |
+
<models>
|
90 |
+
<videogallery>
|
91 |
+
<class>Mymodule_Videogallery_Model</class>
|
92 |
+
<resourceModel>videogallery_resource</resourceModel>
|
93 |
+
</videogallery>
|
94 |
+
<videogallery_resource>
|
95 |
+
<class>Mymodule_Videogallery_Model_Resource</class>
|
96 |
+
<entities>
|
97 |
+
<videos>
|
98 |
+
<table>mymodule_videogallery</table>
|
99 |
+
</videos>
|
100 |
+
</entities>
|
101 |
+
</videogallery_resource>
|
102 |
+
</models>
|
103 |
+
<events>
|
104 |
+
<catalog_product_save_before>
|
105 |
+
<observers>
|
106 |
+
<videogallery_catalog_product_observer>
|
107 |
+
<type>singleton</type>
|
108 |
+
<class>Mymodule_Videogallery_Model_Observer</class>
|
109 |
+
<method>saveVideos</method>
|
110 |
+
</videogallery_catalog_product_observer>
|
111 |
+
</observers>
|
112 |
+
</catalog_product_save_before>
|
113 |
+
</events>
|
114 |
+
<helpers>
|
115 |
+
<videogallery>
|
116 |
+
<class>Mymodule_Videogallery_Helper</class>
|
117 |
+
</videogallery>
|
118 |
+
</helpers>
|
119 |
+
<resources>
|
120 |
+
<videogallery_setup>
|
121 |
+
<setup>
|
122 |
+
<module>Mymodule_Videogallery</module>
|
123 |
+
<class>Mymodule_Videogallery_Model_Resource_Setup</class>
|
124 |
+
</setup>
|
125 |
+
</videogallery_setup>
|
126 |
+
</resources>
|
127 |
+
</global>
|
128 |
+
<default>
|
129 |
+
<videogallery>
|
130 |
+
<general>
|
131 |
+
<enable>0</enable>
|
132 |
+
</general>
|
133 |
+
</videogallery>
|
134 |
+
</default>
|
135 |
+
</config>
|
app/code/community/Mymodule/Videogallery/etc/system.xml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<mymoduleconfig translate="label" module="videogallery">
|
5 |
+
<label>Esparkbiz</label>
|
6 |
+
<sort_order>100</sort_order>
|
7 |
+
</mymoduleconfig>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<videogallery translate="label" module="videogallery">
|
11 |
+
<label>Videogallery Settings</label>
|
12 |
+
<tab>mymoduleconfig</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<general>
|
20 |
+
<label>General</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<enable translate="label">
|
28 |
+
<label>Enable</label>
|
29 |
+
<comment>
|
30 |
+
<![CDATA[Enable or Disable this extension.]]>
|
31 |
+
</comment>
|
32 |
+
<frontend_type>select</frontend_type>
|
33 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
34 |
+
<sort_order>1</sort_order>
|
35 |
+
<show_in_default>1</show_in_default>
|
36 |
+
<show_in_website>1</show_in_website>
|
37 |
+
<show_in_store>1</show_in_store>
|
38 |
+
</enable>
|
39 |
+
</fields>
|
40 |
+
</general>
|
41 |
+
</groups>
|
42 |
+
</videogallery>
|
43 |
+
</sections>
|
44 |
+
</config>
|
app/code/community/Mymodule/Videogallery/sql/videogallery_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$installer->run("
|
5 |
+
CREATE TABLE `{$installer->getTable('videogallery/videos')}` (
|
6 |
+
`video_id` int(11) NOT NULL AUTO_INCREMENT,
|
7 |
+
`video_product_id` int(11) NOT NULL,
|
8 |
+
`video_url` varchar(50) NOT NULL,
|
9 |
+
`video_created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
10 |
+
`video_updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
11 |
+
PRIMARY KEY (`video_id`)
|
12 |
+
) ENGINE=MyISAM AUTO_INCREMENT=41 DEFAULT CHARSET=latin1;
|
13 |
+
");
|
14 |
+
$installer->endSetup();
|
15 |
+
?>
|
app/design/adminhtml/default/default/layout/videogallery.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<adminhtml_catalog_product_videos>
|
4 |
+
<block type="core/text_list" name="root" output="toHtml">
|
5 |
+
<block type="videogallery/adminhtml_catalog_product_edit_tab_videos" name="admin.product.videos">
|
6 |
+
<action method="setTemplate" ifconfig="videogallery/general/enable">
|
7 |
+
<template>videogallery/video.phtml</template>
|
8 |
+
</action>
|
9 |
+
</block>
|
10 |
+
</block>
|
11 |
+
</adminhtml_catalog_product_videos>
|
12 |
+
</layout>
|
app/design/adminhtml/default/default/template/access_denied.phtml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Denied
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<h1 class="page-heading"><?php echo $this->helper('adminhtml')->__('Access denied') ?></h1>
|
33 |
+
<?php if (!$this->hasAvailaleResources()): ?>
|
34 |
+
<p>
|
35 |
+
<?php echo $this->helper('adminhtml')->__('Please try to logout and sign in again.') ?><br/>
|
36 |
+
<?php echo $this->helper('adminhtml')->__('If this message persists, please contact the store owner.') ?>
|
37 |
+
</p>
|
38 |
+
<?php else: ?>
|
39 |
+
<p><?php echo $this->helper('adminhtml')->__('Access denied.') ?></p>
|
40 |
+
<?php endif?>
|
app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
<!--
|
29 |
+
<?php $myBlock = $this->getLayout()->getBlock('roleUsersGrid'); ?>
|
30 |
+
<?php if( is_object($myBlock) && $myBlock->getJsObjectName() ): ?>
|
31 |
+
var checkBoxes = $H({});
|
32 |
+
var warning = false;
|
33 |
+
var inRoleUsers = $H(<?php echo $myBlock->_getUsers(true) ?>);
|
34 |
+
if (inRoleUsers.size() > 0) warning = true;
|
35 |
+
$('in_role_user').value = inRoleUsers.toQueryString();
|
36 |
+
|
37 |
+
function registerUserRole(grid, element, checked){
|
38 |
+
if(checked){
|
39 |
+
inRoleUsers.set(element.value, 0);
|
40 |
+
} else {
|
41 |
+
inRoleUsers.unset(element.value);
|
42 |
+
}
|
43 |
+
$('in_role_user').value = inRoleUsers.toQueryString();
|
44 |
+
grid.reloadParams = {'in_role_user[]':inRoleUsers.keys()};
|
45 |
+
}
|
46 |
+
|
47 |
+
function roleUsersRowClick(grid, event){
|
48 |
+
var trElement = Event.findElement(event, 'tr');
|
49 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
50 |
+
if(trElement){
|
51 |
+
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
52 |
+
if(checkbox[0]){
|
53 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
54 |
+
if (warning && checkBoxes.size() > 0) {
|
55 |
+
if ( !confirm("<?php echo $this->__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?') ?>") ) {
|
56 |
+
checkbox[0].checked = false;
|
57 |
+
checkBoxes.each(function(elem) {
|
58 |
+
if (elem.value.status == 1) {
|
59 |
+
elem.value.object.checked = true;
|
60 |
+
}
|
61 |
+
});
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
warning = false;
|
65 |
+
}
|
66 |
+
<?php echo $myBlock->getJsObjectName() ?>.setCheckboxChecked(checkbox[0], checked);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
function roleUsersRowInit(grid, row){
|
72 |
+
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
73 |
+
if (checkbox) {
|
74 |
+
checkBoxes.set(checkbox.value, {'status' : ((checkbox.checked) ? 1 : 0), 'object' : checkbox});
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
function myhandler(obj)
|
79 |
+
{
|
80 |
+
if (checkBoxes.size() > 0) {
|
81 |
+
if ( !confirm("<?php echo $this->__('Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?') ?>") ) {
|
82 |
+
obj.checked = false;
|
83 |
+
checkBoxes.each(function(elem) {
|
84 |
+
if (elem.value.status == 1) {
|
85 |
+
elem.value.object.checked = true;
|
86 |
+
}
|
87 |
+
});
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
warning = false;
|
91 |
+
}
|
92 |
+
checkBoxes.each(function(elem) {
|
93 |
+
<?php echo $myBlock->getJsObjectName() ?>.setCheckboxChecked(elem.value.object, obj.checked);
|
94 |
+
});
|
95 |
+
}
|
96 |
+
|
97 |
+
<?php echo $myBlock->getJsObjectName() ?>.rowClickCallback = roleUsersRowClick;
|
98 |
+
<?php echo $myBlock->getJsObjectName() ?>.initRowCallback = roleUsersRowInit;
|
99 |
+
<?php echo $myBlock->getJsObjectName() ?>.checkboxCheckCallback = registerUserRole;
|
100 |
+
<?php echo $myBlock->getJsObjectName() ?>.checkCheckboxes = myhandler;
|
101 |
+
<?php echo $myBlock->getJsObjectName() ?>.rows.each(function(row){roleUsersRowInit(<?php echo $myBlock->getJsObjectName() ?>, row)});
|
102 |
+
$('in_role_user_old').value = $('in_role_user').value;
|
103 |
+
<?php endif; ?>
|
104 |
+
//-->
|
105 |
+
</script>
|
app/design/adminhtml/default/default/template/api/roleinfo.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/** @var $this Mage_Adminhtml_Block_Api_Tab_Roleinfo */
|
27 |
+
|
28 |
+
?>
|
29 |
+
<div class="content-header">
|
30 |
+
<table cellspacing="0">
|
31 |
+
<tr>
|
32 |
+
<td style="width:50%;"><h3 class="icon-head head-permissions-role"><?php echo ($this->getRoleId() > 0 ) ? ($this->__('Edit Role') . " '{$this->escapeHtml($this->getRoleInfo()->getRoleName())}'") : $this->__('Add New Role') ?></h3></td>
|
33 |
+
<td class="form-buttons">
|
34 |
+
<?php echo $this->getBackButtonHtml() ?>
|
35 |
+
<?php echo $this->getResetButtonHtml() ?>
|
36 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
37 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
<form action="<?php echo $this->getUrl('*/*/saverole') ?>" method="post" id="role_edit_form">
|
43 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
44 |
+
</form>
|
45 |
+
<script type="text/javascript">
|
46 |
+
var roleForm = new varienForm('role_edit_form');
|
47 |
+
</script>
|
app/design/adminhtml/default/default/template/api/roles.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-permissions-role"><?php echo $this->__('Roles') ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<button class="scalable add" onclick="window.location='<?php echo $this->getAddNewUrl() ?>'"><span><span><span><?php echo $this->__('Add New Role') ?></span></span></span></button>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<?php echo $this->getGridHtml() ?>
|
app/design/adminhtml/default/default/template/api/rolesedit.phtml
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Roles Resources') ?></h4>
|
30 |
+
</div>
|
31 |
+
<input type="hidden" name="resource" id="role_resources" value="">
|
32 |
+
<fieldset id="role_resources">
|
33 |
+
|
34 |
+
<span class="field-row">
|
35 |
+
<label for="all"><?php echo $this->__('Resource Access') ?></label>
|
36 |
+
<select id="all" name="all" onchange="$('resources_container').toggle()" class="select">
|
37 |
+
<option value="0" <?php echo ($this->getEverythingAllowed()?'':'selected="selected"'); ?>><?php echo $this->__('Custom') ?></option>
|
38 |
+
<option value="1" <?php echo ($this->getEverythingAllowed()?'selected="selected"':''); ?>><?php echo $this->__('All') ?></option>
|
39 |
+
</select>
|
40 |
+
</span>
|
41 |
+
|
42 |
+
<span class="field-row" id="resources_container">
|
43 |
+
<label><?php echo $this->__('Resources') ?></label>
|
44 |
+
<div class="f-left">
|
45 |
+
<div class="tree x-tree" id="resource-tree"></div>
|
46 |
+
</div>
|
47 |
+
</span>
|
48 |
+
|
49 |
+
</fieldset>
|
50 |
+
</div>
|
51 |
+
<!-- Draw Resources Tree -->
|
52 |
+
<script type="text/javascript">
|
53 |
+
<?php if($this->getEverythingAllowed()): ?>
|
54 |
+
$('resources_container').hide();
|
55 |
+
<?php endif; ?>
|
56 |
+
Ext.EventManager.onDocumentReady(function() {
|
57 |
+
var tree = new Ext.tree.TreePanel('resource-tree', {
|
58 |
+
animate:false,
|
59 |
+
loader: false,
|
60 |
+
enableDD:false,
|
61 |
+
containerScroll: true,
|
62 |
+
rootUIProvider: Ext.tree.CheckboxNodeUI,
|
63 |
+
selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
|
64 |
+
rootVisible: false
|
65 |
+
});
|
66 |
+
|
67 |
+
tree.on('check', checkHandler, tree);
|
68 |
+
|
69 |
+
// set the root node
|
70 |
+
var root = new Ext.tree.TreeNode({
|
71 |
+
text: 'root',
|
72 |
+
draggable:false,
|
73 |
+
checked:'false',
|
74 |
+
id:'__root__',
|
75 |
+
uiProvider: Ext.tree.CheckboxNodeUI
|
76 |
+
});
|
77 |
+
|
78 |
+
tree.setRootNode(root);
|
79 |
+
bildResourcesTree(root, <?php echo $this->getResTreeJson() ?>);
|
80 |
+
tree.addListener('click', resourceClick.createDelegate(this));
|
81 |
+
|
82 |
+
// render the tree
|
83 |
+
tree.render();
|
84 |
+
// root.expand();
|
85 |
+
tree.expandAll();
|
86 |
+
|
87 |
+
$('role_resources').value = tree.getChecked().join(',');
|
88 |
+
});
|
89 |
+
|
90 |
+
function resourceClick(node, e){
|
91 |
+
node.getUI().check(!node.getUI().checked());
|
92 |
+
varienElementMethods.setHasChanges(Event.element(e), e);
|
93 |
+
};
|
94 |
+
|
95 |
+
function bildResourcesTree(parent, config){
|
96 |
+
if (!config) return null;
|
97 |
+
|
98 |
+
if (parent && config && config.length){
|
99 |
+
for (var i = 0; i < config.length; i++){
|
100 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
101 |
+
var node = new Ext.tree.TreeNode(config[i]);
|
102 |
+
parent.appendChild(node);
|
103 |
+
if(config[i].children){
|
104 |
+
bildResourcesTree(node, config[i].children);
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
function checkHandler(node)
|
111 |
+
{
|
112 |
+
if ( node.attributes.checked && node.parentNode ) {
|
113 |
+
var n = node.parentNode;
|
114 |
+
this.removeListener('check', checkHandler);
|
115 |
+
do {
|
116 |
+
if (!n || n.attributes.id == 'admin' || n.attributes.id == '__root__') {
|
117 |
+
break;
|
118 |
+
} else {
|
119 |
+
n.ui.check(true);
|
120 |
+
}
|
121 |
+
} while (n = n.parentNode );
|
122 |
+
this.on('check', checkHandler);
|
123 |
+
}
|
124 |
+
if ( !node.isLeaf() && node.hasChildNodes() ) {
|
125 |
+
this.removeListener('check', checkHandler);
|
126 |
+
processChildren(node, node.attributes.checked);
|
127 |
+
this.on('check', checkHandler);
|
128 |
+
}
|
129 |
+
$('role_resources').value = this.getChecked().join(',');
|
130 |
+
}
|
131 |
+
|
132 |
+
function processChildren(node, state)
|
133 |
+
{
|
134 |
+
if ( !node.hasChildNodes() ) return false;
|
135 |
+
for(var i = 0; i < node.childNodes.length; i++ ) {
|
136 |
+
node.childNodes[i].ui.check(state);
|
137 |
+
if ( node.childNodes[i].hasChildNodes() ) {
|
138 |
+
processChildren(node.childNodes[i], state);
|
139 |
+
}
|
140 |
+
}
|
141 |
+
return true;
|
142 |
+
}
|
143 |
+
</script>
|
app/design/adminhtml/default/default/template/api/rolesusers.phtml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Role Users') ?></h4>
|
28 |
+
<?php echo $this->_getGridHtml() ?>
|
app/design/adminhtml/default/default/template/api/user_roles_grid_js.phtml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
<!--
|
29 |
+
<?php $myBlock = $this->getLayout()->getBlock('user.roles.grid'); ?>
|
30 |
+
<?php if( is_object($myBlock) && $myBlock->getJsObjectName()): ?>
|
31 |
+
var radioBoxes = $H({});
|
32 |
+
var warning = false;
|
33 |
+
var userRoles = $H(<?php echo $myBlock->_getSelectedRoles(true) ?>);
|
34 |
+
if (userRoles.size() > 0) warning = true;
|
35 |
+
$('user_user_roles').value = userRoles.toQueryString();
|
36 |
+
|
37 |
+
function registerUserRole(grid, element, checked){
|
38 |
+
if(checked){
|
39 |
+
userRoles.each(function(o){userRoles.remove(o[0]);});
|
40 |
+
userRoles[element.value] = 0;
|
41 |
+
} else {
|
42 |
+
userRoles.remove(element.value);
|
43 |
+
}
|
44 |
+
$('user_user_roles').value = userRoles.toQueryString();
|
45 |
+
grid.reloadParams = {'user_roles[]':userRoles.keys()};
|
46 |
+
}
|
47 |
+
|
48 |
+
function roleRowClick(grid, event){
|
49 |
+
var trElement = Event.findElement(event, 'tr');
|
50 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
51 |
+
if(trElement){
|
52 |
+
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
53 |
+
if(checkbox[0] && !checkbox[0].checked){
|
54 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
55 |
+
if (checked && warning && radioBoxes.size() > 0) {
|
56 |
+
if ( !confirm("<?php echo $this->__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?') ?>") ) {
|
57 |
+
checkbox[0].checked = false;
|
58 |
+
for(i in radioBoxes) {
|
59 |
+
if( radioBoxes[i].status == 1) {
|
60 |
+
radioBoxes[i].object.checked = true;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
warning = false;
|
66 |
+
}
|
67 |
+
<?php echo $myBlock->getJsObjectName() ?>.setCheckboxChecked(checkbox[0], checked);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
function rolesRowInit(grid, row){
|
73 |
+
var checkbox = $(row).getElementsByClassName('radio')[0];
|
74 |
+
if (checkbox) {
|
75 |
+
radioBoxes[checkbox.value] = {'status' : ((checkbox.checked) ? 1 : 0), 'object' : checkbox};
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
<?php echo $myBlock->getJsObjectName() ?>.rowClickCallback = roleRowClick;
|
80 |
+
<?php echo $myBlock->getJsObjectName() ?>.initRowCallback = rolesRowInit;
|
81 |
+
<?php echo $myBlock->getJsObjectName() ?>.checkboxCheckCallback = registerUserRole;
|
82 |
+
<?php echo $myBlock->getJsObjectName() ?>.rows.each(function(row){rolesRowInit(<?php echo $myBlock->getJsObjectName() ?>, row)});
|
83 |
+
<?php endif; ?>
|
84 |
+
//-->
|
85 |
+
</script>
|
app/design/adminhtml/default/default/template/api/userinfo.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;">
|
31 |
+
<h3>
|
32 |
+
<?php if($this->getUser()->getUserId()): ?>
|
33 |
+
<?php $_userName = $this->getUser()->getFirstname() . ' ' . $this->getUser()->getLastname() ?>
|
34 |
+
<?php echo $this->__("Edit User '%s'", $_userName) ?>
|
35 |
+
<?php else: ?>
|
36 |
+
<?php echo $this->__('Add New User') ?>
|
37 |
+
<?php endif; ?>
|
38 |
+
</h3>
|
39 |
+
</td>
|
40 |
+
<td class="form-buttons">
|
41 |
+
<?php echo $this->getBackButtonHtml() ?>
|
42 |
+
<?php echo $this->getResetButtonHtml() ?>
|
43 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
44 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
45 |
+
</table>
|
46 |
+
</div>
|
47 |
+
<form action="<?php echo $this->getUrl('*/*/saveuser') ?>" method="post" id="user_edit_form">
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
</form>
|
50 |
+
<script type="text/javascript">
|
51 |
+
var userForm = new varienForm('user_edit_form');
|
52 |
+
</script>
|
app/design/adminhtml/default/default/template/api/usernroles.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="roles">
|
28 |
+
<li class="add"><a href="<?php echo $this->getUrl('*/*/edituser') ?>"><?php echo $this->__('Add New User') ?></a></li>
|
29 |
+
<li class="add"><a href="<?php echo $this->getUrl('*/*/editroles') ?>"><?php echo $this->__('Add New Role') ?></a></li>
|
30 |
+
</div>
|
31 |
+
<div class="clear"></div>
|
app/design/adminhtml/default/default/template/api/userroles.phtml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('User Roles') ?></h4>
|
30 |
+
</div>
|
31 |
+
<fieldset id="user_roles">
|
32 |
+
<?php foreach ($roles as $role): ?>
|
33 |
+
<?php
|
34 |
+
$checked = false;
|
35 |
+
foreach( $user_roles->getItems() as $user_role )
|
36 |
+
{
|
37 |
+
if( $user_role->getParentId() == $role->getRoleId() ) {
|
38 |
+
$checked = true;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
?>
|
42 |
+
<input type="checkbox" value="<?php echo $role->getRoleId(); ?>" <?php echo ($checked ? "checked" : ""); ?> name="roles[]" id="_<?php echo $role->getRoleId(); ?>" /> <label for="_<?php echo $role->getRoleId(); ?>" class="normal"><?php echo $role->getRoleName(); ?></label><br />
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</fieldset>
|
45 |
+
</div>
|
app/design/adminhtml/default/default/template/api/users.phtml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3><?php echo $this->__('Users') ?></h3></td>
|
31 |
+
<td class="a-right">
|
32 |
+
<button class="scalable add" onclick="window.location='<?php echo $this->getAddNewUrl() ?>'"><span><span><span><?php echo $this->__('Add New User') ?></span></span></span></button>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<div>
|
38 |
+
<?php echo $this->getGridHtml() ?>
|
39 |
+
</div>
|
40 |
+
|
app/design/adminhtml/default/default/template/api2/attribute/buttons.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/** @var $this Mage_Api2_Block_Adminhtml_Attribute_Buttons */
|
27 |
+
|
28 |
+
?>
|
29 |
+
<div class="content-header">
|
30 |
+
<table cellspacing="0">
|
31 |
+
<tr>
|
32 |
+
<td style="width:50%;">
|
33 |
+
<h3 class="icon-head head-permissions-role">
|
34 |
+
<?php echo $this->getCaption() ?>
|
35 |
+
</h3>
|
36 |
+
</td>
|
37 |
+
<td class="form-buttons">
|
38 |
+
<?php echo $this->getBackButtonHtml() ?>
|
39 |
+
<?php echo $this->getResetButtonHtml() ?>
|
40 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
41 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
</table>
|
45 |
+
</div>
|
46 |
+
<form action="<?php echo $this->getUrl('*/*/save') ?>" method="post" id="role_edit_form">
|
47 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
48 |
+
</form>
|
49 |
+
<script type="text/javascript">
|
50 |
+
//<![CDATA[
|
51 |
+
var roleForm = new varienForm('role_edit_form');
|
52 |
+
//]]>
|
53 |
+
</script>
|
app/design/adminhtml/default/default/template/api2/attribute/resource.phtml
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
/**
|
30 |
+
* @see Mage_Api2_Block_Adminhtml_Attribute_Tab_Resource
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
|
34 |
+
<?php echo $this->getChildHtml(); ?>
|
35 |
+
|
36 |
+
<div class="entry-edit">
|
37 |
+
<div class="entry-edit-head">
|
38 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('User Type Resources') ?></h4>
|
39 |
+
</div>
|
40 |
+
<input type="hidden" name="resource" id="role_resources" value="" />
|
41 |
+
<fieldset id="role_resources">
|
42 |
+
|
43 |
+
<span class="field-row">
|
44 |
+
<label for="all"><?php echo $this->__('Resource Access') ?></label>
|
45 |
+
<select id="all" name="all" onchange="$('resources_container').toggle()" class="select">
|
46 |
+
<option value="0" <?php echo ($this->getEverythingAllowed()?'':'selected'); ?>><?php echo $this->__('Custom') ?></option>
|
47 |
+
<option value="1" <?php echo ($this->getEverythingAllowed()?'selected':''); ?>><?php echo $this->__('All') ?></option>
|
48 |
+
</select>
|
49 |
+
</span>
|
50 |
+
|
51 |
+
<span class="field-row" id="resources_container">
|
52 |
+
<label><?php echo $this->__('Resources') ?></label>
|
53 |
+
<div class="f-left">
|
54 |
+
<div class="tree x-tree" id="resource-tree"></div>
|
55 |
+
</div>
|
56 |
+
<?php if ($this->hasEntityOnlyAttributes()): ?>
|
57 |
+
<div class="clear"></div>
|
58 |
+
<span>* This attribute data will be returned for a single resource only.</span>
|
59 |
+
<?php endif; ?>
|
60 |
+
</span>
|
61 |
+
|
62 |
+
</fieldset>
|
63 |
+
</div>
|
64 |
+
<!-- Draw Resources Tree -->
|
65 |
+
<script type="text/javascript">
|
66 |
+
//<![CDATA[
|
67 |
+
<?php if($this->getEverythingAllowed()): ?>
|
68 |
+
$('resources_container').hide();
|
69 |
+
<?php endif; ?>
|
70 |
+
Ext.EventManager.onDocumentReady(function() {
|
71 |
+
var tree = new Ext.tree.TreePanel('resource-tree', {
|
72 |
+
animate:false,
|
73 |
+
loader: false,
|
74 |
+
enableDD:false,
|
75 |
+
containerScroll: true,
|
76 |
+
rootUIProvider: Ext.tree.CheckboxNodeUI,
|
77 |
+
selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
|
78 |
+
rootVisible: false
|
79 |
+
});
|
80 |
+
|
81 |
+
tree.on('check', checkHandler, tree);
|
82 |
+
|
83 |
+
// set the root node
|
84 |
+
var root = new Ext.tree.TreeNode({
|
85 |
+
text: 'root',
|
86 |
+
draggable:false,
|
87 |
+
checked:'false',
|
88 |
+
id:'__root__',
|
89 |
+
uiProvider: Ext.tree.CheckboxNodeUI
|
90 |
+
});
|
91 |
+
|
92 |
+
tree.setRootNode(root);
|
93 |
+
bildResourcesTree(root, <?php echo $this->getResTreeJson() ?>);
|
94 |
+
tree.addListener('click', resourceClick.createDelegate(this));
|
95 |
+
|
96 |
+
// render the tree
|
97 |
+
tree.render();
|
98 |
+
// root.expand();
|
99 |
+
tree.expandAll();
|
100 |
+
|
101 |
+
$('role_resources').value = tree.getChecked().join(',');
|
102 |
+
});
|
103 |
+
|
104 |
+
function resourceClick(node, e){
|
105 |
+
node.getUI().check(!node.getUI().checked());
|
106 |
+
varienElementMethods.setHasChanges(Event.element(e), e);
|
107 |
+
};
|
108 |
+
|
109 |
+
function bildResourcesTree(parent, config){
|
110 |
+
if (!config) return null;
|
111 |
+
|
112 |
+
if (parent && config && config.length){
|
113 |
+
for (var i = 0; i < config.length; i++){
|
114 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
115 |
+
var node = new Ext.tree.TreeNode(config[i]);
|
116 |
+
parent.appendChild(node);
|
117 |
+
if(config[i].children){
|
118 |
+
bildResourcesTree(node, config[i].children);
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
function checkHandler(node)
|
125 |
+
{
|
126 |
+
if ( node.attributes.checked && node.parentNode ) {
|
127 |
+
var n = node.parentNode;
|
128 |
+
this.removeListener('check', checkHandler);
|
129 |
+
do {
|
130 |
+
if (!n || n.attributes.id == 'admin' || n.attributes.id == '__root__') {
|
131 |
+
break;
|
132 |
+
} else {
|
133 |
+
n.ui.check(true);
|
134 |
+
}
|
135 |
+
} while (n = n.parentNode );
|
136 |
+
this.on('check', checkHandler);
|
137 |
+
}
|
138 |
+
if ( !node.isLeaf() && node.hasChildNodes() ) {
|
139 |
+
this.removeListener('check', checkHandler);
|
140 |
+
processChildren(node, node.attributes.checked);
|
141 |
+
this.on('check', checkHandler);
|
142 |
+
}
|
143 |
+
$('role_resources').value = this.getChecked().join(',');
|
144 |
+
}
|
145 |
+
|
146 |
+
function processChildren(node, state)
|
147 |
+
{
|
148 |
+
if ( !node.hasChildNodes() ) return false;
|
149 |
+
for(var i = 0; i < node.childNodes.length; i++ ) {
|
150 |
+
node.childNodes[i].ui.check(state);
|
151 |
+
if ( node.childNodes[i].hasChildNodes() ) {
|
152 |
+
processChildren(node.childNodes[i], state);
|
153 |
+
}
|
154 |
+
}
|
155 |
+
return true;
|
156 |
+
}
|
157 |
+
//]]>
|
158 |
+
</script>
|
app/design/adminhtml/default/default/template/api2/permissions/user/edit/tab/roles/js.phtml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<script type="text/javascript">
|
29 |
+
//<![CDATA[
|
30 |
+
var activeRestRole = getActiveRestRole();
|
31 |
+
|
32 |
+
/* Retrieve current active rest role */
|
33 |
+
function getActiveRestRole() {
|
34 |
+
var role;
|
35 |
+
api2_roles_sectionJsObject.rows.each(function(row) {
|
36 |
+
var radiobox = $(row).getElementsByClassName('radio')[0];
|
37 |
+
if ('undefined' != typeof radiobox && radiobox.checked) {
|
38 |
+
role = radiobox;
|
39 |
+
}
|
40 |
+
});
|
41 |
+
return role;
|
42 |
+
}
|
43 |
+
|
44 |
+
/* Callback function for rest role row click */
|
45 |
+
function restRolesRowClick(grid, event) {
|
46 |
+
var newRestRole = getActiveRestRole();
|
47 |
+
if (newRestRole.value !== activeRestRole.value) {
|
48 |
+
if (!confirm("Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?") ) {
|
49 |
+
newRestRole.checked = !newRestRole.checked;
|
50 |
+
activeRestRole.checked = true;
|
51 |
+
} else {
|
52 |
+
activeRestRole = newRestRole;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
api2_roles_sectionJsObject.rowClickCallback = restRolesRowClick;
|
58 |
+
//]]>
|
59 |
+
</script>
|
app/design/adminhtml/default/default/template/api2/role/buttons.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /** @var $this Mage_Adminhtml_Block_Api_Tab_Roleinfo */ ?>
|
28 |
+
<div class="content-header">
|
29 |
+
<table cellspacing="0">
|
30 |
+
<tr>
|
31 |
+
<td style="width:50%;">
|
32 |
+
<h3 class="icon-head head-permissions-role">
|
33 |
+
<?php echo $this->getCaption() ?>
|
34 |
+
</h3>
|
35 |
+
</td>
|
36 |
+
<td class="form-buttons">
|
37 |
+
<?php echo $this->getBackButtonHtml() ?>
|
38 |
+
<?php echo $this->getResetButtonHtml() ?>
|
39 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
40 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
</table>
|
44 |
+
</div>
|
45 |
+
<form action="<?php echo $this->getUrl('*/*/save') ?>" method="post" id="role_edit_form">
|
46 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
47 |
+
</form>
|
48 |
+
<script type="text/javascript">
|
49 |
+
//<![CDATA[
|
50 |
+
var roleForm = new varienForm('role_edit_form');
|
51 |
+
//]]>
|
52 |
+
</script>
|
app/design/adminhtml/default/default/template/api2/role/users_grid_js.phtml
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<script type="text/javascript">
|
29 |
+
//<![CDATA[
|
30 |
+
<?php
|
31 |
+
/** @var $myBlock Mage_Api2_Block_Adminhtml_Roles_Tab_Users */
|
32 |
+
$myBlock = $this->getLayout()->getBlock('adminhtml.role.edit.tab.users');
|
33 |
+
$name = $myBlock->getJsObjectName();
|
34 |
+
?>
|
35 |
+
<?php if (is_object($myBlock) && $name && !$myBlock->isHidden()): ?>
|
36 |
+
var checkBoxes = $H(<?php echo $myBlock->getUsers(true) ?>);
|
37 |
+
var warning = false;
|
38 |
+
if (checkBoxes.size() > 0) {
|
39 |
+
warning = true;
|
40 |
+
}
|
41 |
+
$('in_role_users').value = checkBoxes.toQueryString();
|
42 |
+
|
43 |
+
function registerUserRole(grid, element, checked)
|
44 |
+
{
|
45 |
+
if (checked) {
|
46 |
+
checkBoxes.set(element.value, 0);
|
47 |
+
} else {
|
48 |
+
checkBoxes.unset(element.value);
|
49 |
+
}
|
50 |
+
$('in_role_users').value = checkBoxes.toQueryString();
|
51 |
+
grid.reloadParams = {'in_role_users[]':checkBoxes.keys()};
|
52 |
+
}
|
53 |
+
|
54 |
+
function roleUsersRowClick(grid, event)
|
55 |
+
{
|
56 |
+
var trElement = Event.findElement(event, 'tr');
|
57 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
58 |
+
if (trElement) {
|
59 |
+
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
60 |
+
if(checkbox[0]){
|
61 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
62 |
+
if (checked) {
|
63 |
+
checkbox[0].checked = true;
|
64 |
+
if ( confirm("<?php echo $this->__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?') ?>") ) {
|
65 |
+
checkBoxes.set(checkbox[0].value, checked);
|
66 |
+
varienElementMethods.setHasChanges(checkbox[0]);
|
67 |
+
} else {
|
68 |
+
checkbox[0].checked = false;
|
69 |
+
}
|
70 |
+
warning = false;
|
71 |
+
} else {
|
72 |
+
checkBoxes.unset(checkbox[0].value);
|
73 |
+
}
|
74 |
+
|
75 |
+
$('in_role_users').value = checkBoxes.toQueryString();
|
76 |
+
grid.reloadParams = {'in_role_user[]':checkBoxes.keys()};
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
function roleUsersRowInit(grid, row)
|
82 |
+
{
|
83 |
+
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
84 |
+
if (checkbox) {
|
85 |
+
if (checkbox.checked) {
|
86 |
+
checkBoxes.set(checkbox.value, checkbox.checked);
|
87 |
+
} else {
|
88 |
+
checkBoxes.unset(checkbox.value);
|
89 |
+
}
|
90 |
+
|
91 |
+
$('in_role_users').value = checkBoxes.toQueryString();
|
92 |
+
grid.reloadParams = {'in_role_user[]':checkBoxes.keys()};
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
function myhandler(o)
|
97 |
+
{
|
98 |
+
if (checkBoxes.size() > 0) {
|
99 |
+
if (!confirm("<?php echo $this->__('Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?') ?>") ) {
|
100 |
+
o.checked = !o.checked;
|
101 |
+
} else {
|
102 |
+
checkBoxes.each(function(el){
|
103 |
+
el.checked = o.checked;
|
104 |
+
});
|
105 |
+
return false;
|
106 |
+
}
|
107 |
+
warning = false;
|
108 |
+
}
|
109 |
+
|
110 |
+
$('in_role_users').value = checkBoxes.toQueryString();
|
111 |
+
//grid.reloadParams = {'in_role_user[]':checkBoxes.keys()};
|
112 |
+
}
|
113 |
+
|
114 |
+
<?php echo $name ?>.rowClickCallback = roleUsersRowClick;
|
115 |
+
<?php echo $name ?>.initRowCallback = roleUsersRowInit;
|
116 |
+
<?php echo $name ?>.checkboxCheckCallback = registerUserRole;
|
117 |
+
<?php echo $name ?>.checkCheckboxes = myhandler;
|
118 |
+
<?php echo $name ?>.rows.each(function(row){roleUsersRowInit(<?php echo $name ?>, row)});
|
119 |
+
$('in_role_users_old').value = $('in_role_users').value;
|
120 |
+
<?php endif; ?>
|
121 |
+
//]]>
|
122 |
+
</script>
|
app/design/adminhtml/default/default/template/authorizenet/directpost/iframe.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @var $this Mage_Authorizenet_Block_Directpost_Iframe
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php
|
32 |
+
$_params = $this->getParams();
|
33 |
+
/* @var $_helper Mage_Authorizenet_Helper_Data */
|
34 |
+
$_helper = $this->helper('authorizenet');
|
35 |
+
?>
|
36 |
+
<html>
|
37 |
+
<head>
|
38 |
+
<script type="text/javascript">
|
39 |
+
//<![CDATA[
|
40 |
+
<?php if (isset($_params['redirect'])): ?>
|
41 |
+
window.location="<?php echo $this->escapeUrl($_params['redirect']) ?>";
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php if (isset($_params['redirect_parent'])): ?>
|
44 |
+
window.top.location="<?php echo $this->escapeUrl($_params['redirect_parent']) ?>";
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php if (isset($_params['error_msg'])): ?>
|
47 |
+
window.top.directPostModel.showError(<?php echo $this->helper('core')->jsonEncode($_params['error_msg']) ?>);
|
48 |
+
<?php if (isset($_params['x_invoice_num'])): ?>
|
49 |
+
window.top.directPostModel.successUrl="<?php echo $_helper->getSuccessOrderUrl($_params) ?>";
|
50 |
+
<?php endif; ?>
|
51 |
+
<?php endif; ?>
|
52 |
+
//]]>
|
53 |
+
</script>
|
54 |
+
</head>
|
55 |
+
<body></body>
|
56 |
+
</html>
|
app/design/adminhtml/default/default/template/authorizenet/directpost/info.phtml
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* @see Mage_Authorizenet_Block_Directpost_Form
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php
|
32 |
+
$_form = $this;
|
33 |
+
$_code = $_form->getMethodCode();
|
34 |
+
$_method = $_form->getMethod();
|
35 |
+
$_controller = $this->helper('authorizenet')->getControllerName();
|
36 |
+
$_orderUrl = $this->helper('authorizenet')->getPlaceOrderAdminUrl();
|
37 |
+
?>
|
38 |
+
<!-- IFRAME for request to our server -->
|
39 |
+
<iframe id="order-directpost-iframe" allowtransparency="true" frameborder="0" name="iframeSubmitOrder" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getJsUrl() ?>blank.html"></iframe>
|
40 |
+
<!-- IFRAME for request to Authorize.net -->
|
41 |
+
<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost" style="display:none;width:100%;background-color:transparent" src="<?php echo $this->getJsUrl() ?>blank.html"></iframe>
|
42 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none;">
|
43 |
+
<li>
|
44 |
+
<div class="input-box">
|
45 |
+
<label for="<?php echo $_code ?>_cc_type"><?php echo Mage::helper('payment')->__('Credit Card Type') ?> <span class="required">*</span></label><br/>
|
46 |
+
<select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
|
47 |
+
<?php $_ccType = $_form->getInfoData('cc_type') ?>
|
48 |
+
<option value=""></option>
|
49 |
+
<?php foreach ($_form->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
50 |
+
<option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
51 |
+
<?php endforeach ?>
|
52 |
+
</select>
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
<li>
|
56 |
+
<div class="input-box">
|
57 |
+
<label for="<?php echo $_code ?>_cc_number"><?php echo Mage::helper('payment')->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
|
58 |
+
<input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo Mage::helper('payment')->__('Credit Card Number') ?>" class="input-text validate-cc-number" value="<?php echo $this->getInfoData('cc_number')?>" />
|
59 |
+
</div>
|
60 |
+
</li>
|
61 |
+
<li>
|
62 |
+
<div class="input-box">
|
63 |
+
<label for="<?php echo $_code ?>_expiration"><?php echo Mage::helper('payment')->__('Expiration Date') ?> <span class="required">*</span></label><br/>
|
64 |
+
<select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="validate-cc-exp required-entry">
|
65 |
+
<?php $_ccExpMonth = $_form->getInfoData('cc_exp_month') ?>
|
66 |
+
<?php foreach ($_form->getCcMonths() as $k=>$v): ?>
|
67 |
+
<option value="<?php echo $k ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
68 |
+
<?php endforeach ?>
|
69 |
+
</select>
|
70 |
+
<?php $_ccExpYear = $_form->getInfoData('cc_exp_year') ?>
|
71 |
+
<select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
|
72 |
+
<?php foreach ($_form->getCcYears() as $k=>$v): ?>
|
73 |
+
<option value="<?php echo $k ? $k : '' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
74 |
+
<?php endforeach ?>
|
75 |
+
</select>
|
76 |
+
</div>
|
77 |
+
</li>
|
78 |
+
<?php if($_form->hasVerification()): ?>
|
79 |
+
<li>
|
80 |
+
<div class="input-box">
|
81 |
+
<label for="<?php echo $_code ?>_cc_cid"><?php echo Mage::helper('payment')->__('Card Verification Number') ?> <span class="required">*</span></label><br/>
|
82 |
+
<input type="text" title="<?php echo Mage::helper('payment')->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="<?php echo $this->getInfoData('cc_cid')?>" />
|
83 |
+
</div>
|
84 |
+
</li>
|
85 |
+
<?php endif; ?>
|
86 |
+
</ul>
|
87 |
+
<script type="text/javascript">
|
88 |
+
//<![CDATA[
|
89 |
+
/**
|
90 |
+
* Disable cart server validation in admin
|
91 |
+
*/
|
92 |
+
AdminOrder.prototype.prepareParams = function(params) {
|
93 |
+
if (!params) {
|
94 |
+
params = {};
|
95 |
+
}
|
96 |
+
if (!params.customer_id) {
|
97 |
+
params.customer_id = this.customerId;
|
98 |
+
}
|
99 |
+
if (!params.store_id) {
|
100 |
+
params.store_id = this.storeId;
|
101 |
+
}
|
102 |
+
if (!params.currency_id) {
|
103 |
+
params.currency_id = this.currencyId;
|
104 |
+
}
|
105 |
+
if (!params.form_key) {
|
106 |
+
params.form_key = FORM_KEY;
|
107 |
+
}
|
108 |
+
|
109 |
+
if (this.paymentMethod != '<?php echo $_code ?>') {
|
110 |
+
var data = this.serializeData('order-billing_method');
|
111 |
+
if (data) {
|
112 |
+
data.each(function(value) {
|
113 |
+
params[value[0]] = value[1];
|
114 |
+
});
|
115 |
+
}
|
116 |
+
} else {
|
117 |
+
params['payment[method]'] = '<?php echo $_code ?>';
|
118 |
+
}
|
119 |
+
return params;
|
120 |
+
};
|
121 |
+
AdminOrder.prototype.getPaymentData = function(currentMethod) {
|
122 |
+
if (typeof (currentMethod) == 'undefined') {
|
123 |
+
if (this.paymentMethod) {
|
124 |
+
currentMethod = this.paymentMethod;
|
125 |
+
} else {
|
126 |
+
return false;
|
127 |
+
}
|
128 |
+
}
|
129 |
+
if (currentMethod == '<?php echo $_code ?>') {
|
130 |
+
return false;
|
131 |
+
}
|
132 |
+
var data = {};
|
133 |
+
var fields = $('payment_form_' + currentMethod).select('input', 'select');
|
134 |
+
for ( var i = 0; i < fields.length; i++) {
|
135 |
+
data[fields[i].name] = fields[i].getValue();
|
136 |
+
}
|
137 |
+
if ((typeof data['payment[cc_type]']) != 'undefined'
|
138 |
+
&& (!data['payment[cc_type]'] || !data['payment[cc_number]'])) {
|
139 |
+
return false;
|
140 |
+
}
|
141 |
+
return data;
|
142 |
+
};
|
143 |
+
<?php if (!$this->isAjaxRequest()): ?>
|
144 |
+
document.observe('dom:loaded', function(){
|
145 |
+
<?php endif; ?>
|
146 |
+
directPostModel = new directPost(
|
147 |
+
'<?php echo $_code ?>',
|
148 |
+
'directpost-iframe',
|
149 |
+
'<?php echo $_controller ?>',
|
150 |
+
'<?php echo $_orderUrl ?>',
|
151 |
+
'<?php echo $_method->getCgiUrl() ?>',
|
152 |
+
'<?php echo $this->getUrl('*/*/save', array('_secure' => $this->getRequest()->isSecure())) ?>');
|
153 |
+
<?php if (!$this->isAjaxRequest()): ?>
|
154 |
+
});
|
155 |
+
<?php endif; ?>
|
156 |
+
//]]>
|
157 |
+
</script>
|
app/design/adminhtml/default/default/template/backup/dialogs.phtml
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="backup-dialog" style="display: none;" id="rollback-warning">
|
2 |
+
<div class="entry-edit">
|
3 |
+
<div class="entry-edit-head">
|
4 |
+
<h4 class="head-edit-form fieldset-legend"><?php echo $this->__('Warning') ?></h4>
|
5 |
+
</div>
|
6 |
+
<div class="content">
|
7 |
+
<div><?php echo $this->__('Any data created since the backup was made will be lost including admin users, customers and orders.')?></div>
|
8 |
+
<div class="question"><?php echo $this->__('Are you sure you want to proceed?')?></div>
|
9 |
+
</div>
|
10 |
+
<div class="buttons-set">
|
11 |
+
<div class="f-right">
|
12 |
+
<button type="button" class="scalable " onclick="backup.requestPassword()"><span><?php echo $this->__('OK')?></span></button>
|
13 |
+
<button type="button" class="scalable " onclick="backup.hidePopups()"><span><?php echo $this->__('Cancel')?></span></button>
|
14 |
+
</div>
|
15 |
+
</div>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="backup-dialog" style="display: none;" id="backup-warning">
|
20 |
+
<div class="entry-edit">
|
21 |
+
<div class="entry-edit-head">
|
22 |
+
<h4 class="head-edit-form fieldset-legend"><?php echo $this->__('Warning') ?></h4>
|
23 |
+
</div>
|
24 |
+
<div class="content">
|
25 |
+
<div class="backup-messages" style="display: none;"><ul class="messages"></ul></div>
|
26 |
+
<div><?php echo $this->__("The backup's creation process will take time.")?></div>
|
27 |
+
<div><?php echo $this->__('You will need to wait when the action ends.')?></div>
|
28 |
+
<div><?php echo $this->__('Do you really want to proceed?')?></div>
|
29 |
+
</div>
|
30 |
+
<div class="buttons-set">
|
31 |
+
<div class="f-right">
|
32 |
+
<button type="button" class="scalable " onclick="backup.requestBackupOptions()"><span><?php echo $this->__('OK')?></span></button>
|
33 |
+
<button type="button" class="scalable " onclick="backup.hidePopups()"><span><?php echo $this->__('Cancel')?></span></button>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<div class="backup-dialog" style="display: none;" id="backup-options">
|
40 |
+
<div class="entry-edit">
|
41 |
+
<div class="entry-edit-head">
|
42 |
+
<h4 class="head-edit-form fieldset-legend"><?php echo $this->__('Backup options') ?></h4>
|
43 |
+
</div>
|
44 |
+
<div class="content">
|
45 |
+
<div class="backup-messages" style="display: none;"><ul class="messages"></ul></div>
|
46 |
+
<div><?php echo $this->__('Please specify backup creation options')?></div>
|
47 |
+
<form action="" method="post" id="backup-form" onsubmit="return backup.submitBackup();">
|
48 |
+
<table class="form-list question" cellspacing="0">
|
49 |
+
<tr>
|
50 |
+
<td style="padding-right: 8px;"><label for="backup_name" class="nobr"><?php echo $this->__('Backup Name')?></label></td>
|
51 |
+
<td>
|
52 |
+
<input type="text" name="backup_name" id="backup_name" class="validate-alphanum-with-spaces validate-length maximum-length-50" style="width: 343px" maxlength="50" />
|
53 |
+
<p class="note"><span><?php echo $this->__('Please use only letters (a-z or A-Z), numbers (0-9) or spaces in this field.'); ?></span></p>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<td> </td>
|
58 |
+
<td class="maintenance-checkbox-container">
|
59 |
+
<input type="checkbox" name="maintenance_mode" value="1" id="backup_maintenance_mode"/>
|
60 |
+
<label for="backup_maintenance_mode"><?php echo $this->__('Put store on the maintenance mode while backup creation')?></label>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
<tr id="exclude-media-checkbox-container" style="display: none;">
|
64 |
+
<td> </td>
|
65 |
+
<td>
|
66 |
+
<input type="checkbox" name="exclude_media" value="1" id="exclude_media"/>
|
67 |
+
<label for="exclude_media"><?php echo $this->__('Exclude media folder from backup')?></label>
|
68 |
+
</td>
|
69 |
+
</tr>
|
70 |
+
</table>
|
71 |
+
</form>
|
72 |
+
</div>
|
73 |
+
<div class="buttons-set">
|
74 |
+
<div class="f-right">
|
75 |
+
<button type="button" class="scalable " onclick="backup.submitBackup()"><span><?php echo $this->__('OK')?></span></button>
|
76 |
+
<button type="button" class="scalable " onclick="backup.hidePopups()"><span><?php echo $this->__('Cancel')?></span></button>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div class="backup-dialog" style="display: none;" id="rollback-request-password">
|
83 |
+
<div class="entry-edit">
|
84 |
+
<div class="entry-edit-head">
|
85 |
+
<h4 class="head-edit-form fieldset-legend"><?php echo $this->__('Please enter password') ?></h4>
|
86 |
+
</div>
|
87 |
+
<div class="content">
|
88 |
+
<div class="backup-messages" style="display: none;"><ul class="messages"></ul></div>
|
89 |
+
<div><?php echo $this->__('Please enter password to confirm rollback.')?></div>
|
90 |
+
<div><?php echo $this->__('This action cannot be undone.')?></div>
|
91 |
+
<div class="question"><?php echo $this->__('Are you sure you want to proceed?')?></div>
|
92 |
+
<form action="" method="post" id="rollback-form" onsubmit="return backup.submitRollback();">
|
93 |
+
<div class="password-box-container">
|
94 |
+
<table class="form-list" cellspacing="0">
|
95 |
+
<tr>
|
96 |
+
<td style="padding-right: 8px;"><label for="password" class="nobr"><?php echo $this->__('User Password')?> <span class="required">*</span></label></td>
|
97 |
+
<td><input type="password" name="password" id="password" class="required-entry"></td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<td> </td>
|
101 |
+
<td class="maintenance-checkbox-container">
|
102 |
+
<input type="checkbox" name="maintenance_mode" value="1" id="rollback_maintenance_mode"/>
|
103 |
+
<label for="rollback_maintenance_mode"><?php echo $this->__('Put store on the maintenance mode while rollback processing')?></label>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<tr id="use-ftp-checkbox-row" style="display: none;">
|
107 |
+
<td> </td>
|
108 |
+
<td><input type="checkbox" name="use_ftp" value="1" id="use_ftp" onClick="backup.toggleFtpCredentialsForm();"/> <label for="use_ftp"><?php echo $this->__('Use FTP Connection')?></label></td>
|
109 |
+
</tr>
|
110 |
+
</table>
|
111 |
+
</div>
|
112 |
+
<div class="entry-edit" id="ftp-credentials-container" style="display: none;">
|
113 |
+
<div class="entry-edit-head">
|
114 |
+
<h4 class=""><?php echo $this->__('FTP credentials')?></h4>
|
115 |
+
</div>
|
116 |
+
<fieldset>
|
117 |
+
<table class="form-list" cellspacing="0">
|
118 |
+
<tr>
|
119 |
+
<td class="label"><label for="ftp_host"><?php echo $this->__('FTP Host')?> <span class="required">*</span></label></td>
|
120 |
+
<td class="value"><input type="text" name="ftp_host" id="ftp_host"></td>
|
121 |
+
</tr>
|
122 |
+
<tr>
|
123 |
+
<td class="label"><label for="ftp_user"><?php echo $this->__('FTP Login')?> <span class="required">*</span></label></td>
|
124 |
+
<td class="value"><input type="text" name="ftp_user" id="ftp_user"></td>
|
125 |
+
</tr>
|
126 |
+
<tr>
|
127 |
+
<td class="label"><label for="ftp_pass"><?php echo $this->__('FTP Password')?> <span class="required">*</span></label></td>
|
128 |
+
<td class="value"><input type="password" name="ftp_pass" id="ftp_pass"></td>
|
129 |
+
</tr>
|
130 |
+
<tr>
|
131 |
+
<td class="label"><label for="ftp_path"><?php echo $this->__('Magento root directory')?></label></td>
|
132 |
+
<td class="value"><input type="text" name="ftp_path" id="ftp_path"></td>
|
133 |
+
</tr>
|
134 |
+
</table>
|
135 |
+
</fieldset>
|
136 |
+
</div>
|
137 |
+
</form>
|
138 |
+
</div>
|
139 |
+
<div class="buttons-set">
|
140 |
+
<div class="f-right">
|
141 |
+
<button type="button" class="scalable " onclick="backup.submitRollback()"><span><?php echo $this->__('OK')?></span></button>
|
142 |
+
<button type="button" class="scalable " onclick="backup.hidePopups()"><span><?php echo $this->__('Cancel')?></span></button>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
</div>
|
147 |
+
|
148 |
+
<div id="popup-window-mask" style="display: none;"></div>
|
149 |
+
|
150 |
+
<?php
|
151 |
+
$helper = Mage::helper('backup');
|
152 |
+
$rollbackUrl = $this->getUrl('*/*/rollback');
|
153 |
+
$backupUrl = $this->getUrl('*/*/create');
|
154 |
+
?>
|
155 |
+
|
156 |
+
<script type="text/javascript">
|
157 |
+
//<![CDATA[
|
158 |
+
document.observe('dom:loaded', function () {
|
159 |
+
backup = new AdminBackup();
|
160 |
+
backup.rollbackUrl = '<?php echo $helper->jsQuoteEscape($rollbackUrl);?>';
|
161 |
+
backup.backupUrl = '<?php echo $helper->jsQuoteEscape($backupUrl);?>';
|
162 |
+
});
|
163 |
+
//]]>
|
164 |
+
</script>
|
app/design/adminhtml/default/default/template/backup/left.phtml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<h3><?php echo Mage::helper('backup')->__('Create Backup') ?></h3>
|
app/design/adminhtml/default/default/template/backup/list.phtml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-backups-control"><?php echo Mage::helper('backup')->__('Backups') ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php echo $this->getCreateSnapshotButtonHtml(); ?>
|
33 |
+
<?php echo $this->getCreateMediaBackupButtonHtml(); ?>
|
34 |
+
<?php echo $this->getCreateButtonHtml(); ?>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
</table>
|
38 |
+
</div>
|
39 |
+
<?php echo $this->getGridHtml() ?>
|
40 |
+
<?php echo $this->getDialogsHtml() ?>
|
app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/bundle.phtml
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php /* @var $this Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Bundle */ ?>
|
29 |
+
<?php $options = Mage::helper('core')->decorateArray($this->getOptions()); ?>
|
30 |
+
<?php if (count($options)): ?>
|
31 |
+
<div id="catalog_product_composite_configure_fields_bundle" class="<?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
32 |
+
<h4><?php echo Mage::helper('catalog')->__('Bundle Items') ?></h4>
|
33 |
+
<div class="product-options">
|
34 |
+
<dl>
|
35 |
+
<?php foreach ($options as $option) : ?>
|
36 |
+
<?php if ($option->getSelections()) : ?>
|
37 |
+
<?php echo $this->getOptionHtml($option); ?>
|
38 |
+
<?php endif; ?>
|
39 |
+
<?php endforeach; ?>
|
40 |
+
</dl>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<script>
|
45 |
+
var BundleControl = Class.create();
|
46 |
+
BundleControl.prototype = {
|
47 |
+
initialize: function (config) {
|
48 |
+
this.config = config;
|
49 |
+
},
|
50 |
+
|
51 |
+
changeSelection: function (selection) {
|
52 |
+
if (selection.multiple) {
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
var parts = selection.id.split('-'), optionId = parts[2],
|
56 |
+
showQtyInput = selection.value && selection.value != 'none',
|
57 |
+
options = this.config.options[optionId],
|
58 |
+
selectionOptions = options && options.selections && options.selections[selection.value] || {};
|
59 |
+
|
60 |
+
selectionOptions.can_change_qty = Number(selectionOptions.can_change_qty) && showQtyInput;
|
61 |
+
this.updateQtyInput(optionId, selectionOptions);
|
62 |
+
},
|
63 |
+
|
64 |
+
updateQtyInput: function(optionId, selectionOptions) {
|
65 |
+
var elem = $('bundle-option-' + optionId + '-qty-input'),
|
66 |
+
default_qty = Number(selectionOptions.default_qty);
|
67 |
+
if (!elem) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
if (selectionOptions.can_change_qty) {
|
71 |
+
elem.removeClassName('qty-disabled');
|
72 |
+
elem.disabled = false;
|
73 |
+
if (elem.value == '0') {
|
74 |
+
elem.value = default_qty || 1;
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
elem.addClassName('qty-disabled');
|
78 |
+
elem.disabled = true;
|
79 |
+
elem.value = default_qty || 0;
|
80 |
+
}
|
81 |
+
},
|
82 |
+
|
83 |
+
updateForDefaults: function () {
|
84 |
+
for (var optionId in this.config.options) {
|
85 |
+
var selection = $('bundle-option-' + optionId);
|
86 |
+
if (selection) {
|
87 |
+
this.changeSelection(selection);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
92 |
+
ProductConfigure.bundleControl = new BundleControl(<?php echo $this->getJsonConfig() ?>);
|
93 |
+
</script>
|
94 |
+
|
95 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/checkbox.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<?php /* @var $this Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Checkbox */ ?>
|
29 |
+
<?php $_option = $this->getOption(); ?>
|
30 |
+
<?php $_selections = $_option->getSelections(); ?>
|
31 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
32 |
+
<dt><label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php if ($_option->getRequired()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label></dt>
|
33 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
34 |
+
<div class="input-box">
|
35 |
+
<?php if (count($_selections) == 1 && $_option->getRequired()): ?>
|
36 |
+
<?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
|
37 |
+
<input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" price="<?php echo $this->getSelectionPrice($_selections[0]) ?>"'/>
|
38 |
+
<?php else:?>
|
39 |
+
<ul class="options-list">
|
40 |
+
<?php foreach($_selections as $_selection): ?>
|
41 |
+
<li><input class="change-container-classname checkbox bundle-option-<?php echo $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" type="checkbox" name="bundle_option[<?php echo $_option->getId() ?>][]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable() && !$_skipSaleableCheck) echo ' disabled="disabled"' ?> value="<?php echo $_selection->getSelectionId() ?>" onclick="ProductConfigure.bundleControl.changeSelection(this)" price="<?php echo $this->getSelectionPrice($_selection) ?>"/>
|
42 |
+
<span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection) ?></label></span>
|
43 |
+
<?php if($_option->getRequired()): ?>
|
44 |
+
<?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
|
45 |
+
<?php endif; ?>
|
46 |
+
</li>
|
47 |
+
<?php endforeach; ?>
|
48 |
+
</ul>
|
49 |
+
<div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
</dd>
|
app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/multi.phtml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<?php /* @var $this Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Multi */ ?>
|
29 |
+
<?php $_option = $this->getOption(); ?>
|
30 |
+
<?php $_selections = $_option->getSelections(); ?>
|
31 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
32 |
+
<dt><label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php if ($_option->getRequired()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label></dt>
|
33 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
34 |
+
<div class="input-box">
|
35 |
+
<?php if (count($_selections) == 1 && $_option->getRequired()): ?>
|
36 |
+
<?php echo $this->getSelectionQtyTitlePrice($_selections[0]) ?>
|
37 |
+
<input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" price="<?php echo $this->getSelectionPrice($_selections[0]) ?>"/>
|
38 |
+
<?php else: ?>
|
39 |
+
<select multiple="multiple" size="5" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>][]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select multiselect change-container-classname" onchange="ProductConfigure.bundleControl.changeSelection(this)">
|
40 |
+
<?php if(!$_option->getRequired()): ?>
|
41 |
+
<option value=""><?php echo $this->__('None') ?></option>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php foreach ($_selections as $_selection): ?>
|
44 |
+
<option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable() && !$_skipSaleableCheck) echo ' disabled="disabled"' ?> price="<?php echo $this->getSelectionPrice($_selection) ?>"><?php echo $this->getSelectionQtyTitlePrice($_selection, false) ?></option>
|
45 |
+
<?php endforeach; ?>
|
46 |
+
</select>
|
47 |
+
<?php endif; ?>
|
48 |
+
</div>
|
49 |
+
</dd>
|
app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/radio.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<?php /* @var $this Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Radio */ ?>
|
29 |
+
<?php $_option = $this->getOption(); ?>
|
30 |
+
<?php $_selections = $_option->getSelections(); ?>
|
31 |
+
<?php $_default = $_option->getDefaultSelection(); ?>
|
32 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
33 |
+
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
|
34 |
+
|
35 |
+
<dt>
|
36 |
+
<span class="qty-holder">
|
37 |
+
<label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
|
38 |
+
</span>
|
39 |
+
<label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php if ($_option->getRequired()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
|
40 |
+
</dt>
|
41 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
42 |
+
<div class="input-box">
|
43 |
+
<?php if ($this->_showSingle()): ?>
|
44 |
+
<?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
|
45 |
+
<input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" price="<?php echo $this->getSelectionPrice($_selections[0]) ?>" />
|
46 |
+
<?php else:?>
|
47 |
+
<ul class="options-list">
|
48 |
+
<?php if (!$_option->getRequired()): ?>
|
49 |
+
<li><input type="radio" class="radio" id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php echo ($_default && $_default->isSalable())?'':' checked="checked" ' ?> value="" onclick="ProductConfigure.bundleControl.changeSelection(this)"/>
|
50 |
+
<span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>"><?php echo $this->__('None') ?></label></span>
|
51 |
+
</li>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php foreach ($_selections as $_selection): ?>
|
54 |
+
<li><input type="radio" class="radio<?php echo $_option->getRequired()?' validate-one-required-by-name':'' ?> change-container-classname" id="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]"<?php if ($this->_isSelected($_selection)) echo ' checked="checked"' ?><?php if (!$_selection->isSaleable() && !$_skipSaleableCheck) echo ' disabled="disabled"' ?>value="<?php echo $_selection->getSelectionId() ?>" onclick="ProductConfigure.bundleControl.changeSelection(this)" price="<?php echo $this->getSelectionPrice($_selection) ?>" qtyId="bundle-option-<?php echo $_option->getId() ?>-qty-input"/>
|
55 |
+
<span class="label"><label for="bundle-option-<?php echo $_option->getId() ?>-<?php echo $_selection->getSelectionId() ?>"><?php echo $this->getSelectionTitlePrice($_selection) ?></label></span>
|
56 |
+
<?php if ($_option->getRequired()): ?>
|
57 |
+
<?php echo $this->setValidationContainer('bundle-option-'.$_option->getId().'-'.$_selection->getSelectionId(), 'bundle-option-'.$_option->getId().'-container') ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
</li>
|
60 |
+
<?php endforeach; ?>
|
61 |
+
</ul>
|
62 |
+
<div id="bundle-option-<?php echo $_option->getId() ?>-container"></div>
|
63 |
+
<?php endif; ?>
|
64 |
+
</div>
|
65 |
+
</dd>
|
app/design/adminhtml/default/default/template/bundle/product/composite/fieldset/options/type/select.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<?php /* @var $this Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Select */ ?>
|
29 |
+
<?php $_option = $this->getOption(); ?>
|
30 |
+
<?php $_selections = $_option->getSelections(); ?>
|
31 |
+
<?php $_default = $_option->getDefaultSelection(); ?>
|
32 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
33 |
+
<?php list($_defaultQty, $_canChangeQty) = $this->_getDefaultValues(); ?>
|
34 |
+
|
35 |
+
<dt>
|
36 |
+
<span class="qty-holder">
|
37 |
+
<label for="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->__('Qty:') ?> </label><input <?php if (!$_canChangeQty) echo ' disabled="disabled"' ?> id="bundle-option-<?php echo $_option->getId() ?>-qty-input" class="input-text qty<?php if (!$_canChangeQty) echo ' qty-disabled' ?>" type="text" name="bundle_option_qty[<?php echo $_option->getId() ?>]" value="<?php echo $_defaultQty ?>"/>
|
38 |
+
</span>
|
39 |
+
<label<?php if ($_option->getRequired()) echo ' class="required"' ?>><?php if ($_option->getRequired()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
|
40 |
+
</dt>
|
41 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
42 |
+
<div class="input-box">
|
43 |
+
<?php if ($this->_showSingle()): ?>
|
44 |
+
<?php echo $this->getSelectionTitlePrice($_selections[0]) ?>
|
45 |
+
<input type="hidden" name="bundle_option[<?php echo $_option->getId() ?>]" value="<?php echo $_selections[0]->getSelectionId() ?>" price="<?php echo $this->getSelectionPrice($_selections[0]) ?>"/>
|
46 |
+
<?php else:?>
|
47 |
+
<select id="bundle-option-<?php echo $_option->getId() ?>" name="bundle_option[<?php echo $_option->getId() ?>]" class="bundle-option-<?php echo $_option->getId() ?><?php if ($_option->getRequired()) echo ' required-entry' ?> bundle-option-select change-container-classname" onchange="ProductConfigure.bundleControl.changeSelection(this)">
|
48 |
+
<option value=""><?php echo $this->__('Choose a selection...') ?></option>
|
49 |
+
<?php foreach ($_selections as $_selection): ?>
|
50 |
+
<option value="<?php echo $_selection->getSelectionId() ?>"<?php if ($this->_isSelected($_selection)) echo ' selected="selected"' ?><?php if (!$_selection->isSaleable() && !$_skipSaleableCheck) echo ' disabled="disabled"' ?> price="<?php echo $this->getSelectionPrice($_selection) ?>" qtyId="bundle-option-<?php echo $_option->getId() ?>-qty-input"><?php echo $this->getSelectionTitlePrice($_selection, false) ?></option>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</select>
|
53 |
+
<?php endif; ?>
|
54 |
+
</div>
|
55 |
+
</dd>
|
app/design/adminhtml/default/default/template/bundle/product/edit/bundle.phtml
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
if(typeof Bundle=='undefined') {
|
29 |
+
Bundle = {};
|
30 |
+
}
|
31 |
+
</script>
|
32 |
+
|
33 |
+
<div class="entry-edit">
|
34 |
+
<div class="entry-edit-head">
|
35 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('bundle')->__('Shipment') ?></h4>
|
36 |
+
</div>
|
37 |
+
<fieldset>
|
38 |
+
<table cellspacing="0" class="form-list">
|
39 |
+
<tr>
|
40 |
+
<td class="label"><label for="shipment_type"><?php echo Mage::helper('bundle')->__('Ship Bundle Items') ?></label></td>
|
41 |
+
<td class="value"><select <?php if ($this->isReadonly()): ?>disabled="disabled" <?php endif;?>id="shipment_type" name="<?php echo $this->getFieldSuffix() ?>[shipment_type]" class="select">
|
42 |
+
<option value="1"><?php echo Mage::helper('bundle')->__('Separately') ?></option>
|
43 |
+
<option value="0"<?php if ($this->getProduct()->getShipmentType() == 0): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('bundle')->__('Together') ?></option>
|
44 |
+
</select>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
</table>
|
48 |
+
</fieldset>
|
49 |
+
</div>
|
50 |
+
|
51 |
+
<div class="entry-edit custom-options bundle" id="product_bundle_container">
|
52 |
+
<div class="entry-edit-head">
|
53 |
+
<h4><?php echo $this->__('Bundle Items') ?></h4>
|
54 |
+
<div class="right"><?php echo $this->getAddButtonHtml() ?></div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div id="product_options_container" class="box">
|
58 |
+
<div id="product_bundle_container_top"></div>
|
59 |
+
<?php echo $this->getOptionsBoxHtml() ?>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
<script type="text/javascript">
|
64 |
+
// re-bind form elements onchange
|
65 |
+
varienWindowOnload(true);
|
66 |
+
<?php if ($this->isReadonly()):?>
|
67 |
+
$('product_bundle_container').select('input', 'select', 'textarea', 'button').each(function(input){
|
68 |
+
input.disabled = true;
|
69 |
+
if (input.tagName.toLowerCase() == 'button') {
|
70 |
+
input.addClassName('disabled');
|
71 |
+
}
|
72 |
+
});
|
73 |
+
<?php endif; ?>
|
74 |
+
</script>
|
75 |
+
|
76 |
+
<div><input type="hidden" name="affect_bundle_product_selections" value="1" /></div>
|
app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option.phtml
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
optionTemplate = '<div id="<?php echo $this->getFieldId() ?>_{{index}}" class="option-box"> ' +
|
29 |
+
'<div class="option-title"> ' +
|
30 |
+
'<label for="<?php echo $this->getFieldName() ?>[{{index}}][title]"><?php echo Mage::helper('bundle')->__('Default Title') ?> <span class="required">*</span></label>' +
|
31 |
+
<?php if ($this->isDefaultStore()): ?>
|
32 |
+
'<input class="input-text required-entry" type="text" name="<?php echo $this->getFieldName() ?>[{{index}}][title]" id="id_<?php echo $this->getFieldName() ?>_{{index}}_title" value="{{title}}">' +
|
33 |
+
<?php else: ?>
|
34 |
+
'<input class="input-text required-entry" type="text" name="<?php echo $this->getFieldName() ?>[{{index}}][default_title]" id="id_<?php echo $this->getFieldName() ?>_{{index}}_default_title" value="{{default_title}}">' +
|
35 |
+
<?php endif; ?>
|
36 |
+
'<?php echo $this->jsQuoteEscape($this->getOptionDeleteButtonHtml()) ?>' +
|
37 |
+
'</div>' +
|
38 |
+
'<table class="option-header" cellpadding="0" cellspacing="0">' +
|
39 |
+
'<thead>' +
|
40 |
+
'<tr>' +
|
41 |
+
<?php if (!$this->isDefaultStore()): ?>
|
42 |
+
'<th class="opt-title"><?php echo Mage::helper('bundle')->__('Store View Title') ?> <span class="required">*</span></th>' +
|
43 |
+
<?php endif; ?>
|
44 |
+
'<th class="opt-type"><?php echo Mage::helper('bundle')->__('Input Type') ?></th>' +
|
45 |
+
'<th class="opt-req"><?php echo $this->jsQuoteEscape(Mage::helper('bundle')->__('Is Required')) ?></th>' +
|
46 |
+
'<th class="opt-order"><?php echo Mage::helper('bundle')->__('Position') ?></th>' +
|
47 |
+
'<th> </th>' +
|
48 |
+
'</tr>' +
|
49 |
+
'</thead>' +
|
50 |
+
'<tbody>' +
|
51 |
+
'<tr>' +
|
52 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_id_{{index}}" name="<?php echo $this->getFieldName() ?>[{{index}}][option_id]" value="{{option_id}}">' +
|
53 |
+
'<input type="hidden" name="<?php echo $this->getFieldName() ?>[{{index}}][delete]" value="" class="delete">' +
|
54 |
+
<?php if (!$this->isDefaultStore()): ?>
|
55 |
+
'<td><input class="input-text required-entry" type="text" name="<?php echo $this->getFieldName() ?>[{{index}}][title]" id="id_<?php echo $this->getFieldName() ?>_{{index}}_title_store" value="{{title}}"></td>' +
|
56 |
+
<?php endif; ?>
|
57 |
+
'<td><?php echo $this->getTypeSelectHtml() ?></td>' +
|
58 |
+
'<td><?php echo $this->getRequireSelectHtml() ?></td>' +
|
59 |
+
'<td><input class="input-text validate-zero-or-greater" type="text" name="<?php echo $this->getFieldName() ?>[{{index}}][position]" value="{{position}}"></td>' +
|
60 |
+
'<td> <?php echo $this->jsQuoteEscape($this->getAddSelectionButtonHtml()) ?></td>' +
|
61 |
+
'</tr>' +
|
62 |
+
'</tbody>' +
|
63 |
+
'</table>' +
|
64 |
+
'<div id="<?php echo $this->getFieldId() ?>_search_{{index}}">' +
|
65 |
+
'</div>' +
|
66 |
+
'</div>';
|
67 |
+
</script>
|
68 |
+
|
69 |
+
<?php echo $this->getSelectionHtml() ?>
|
70 |
+
|
71 |
+
<script type="text/javascript">
|
72 |
+
|
73 |
+
function changeInputType(oldObject, oType) {
|
74 |
+
var newObject = document.createElement('input');
|
75 |
+
newObject.type = oType;
|
76 |
+
if(oldObject.size) newObject.size = oldObject.size;
|
77 |
+
if(oldObject.value) newObject.value = oldObject.value;
|
78 |
+
if(oldObject.name) newObject.name = oldObject.name;
|
79 |
+
if(oldObject.id) newObject.id = oldObject.id;
|
80 |
+
if(oldObject.onclick) newObject.onclick = oldObject.onclick;
|
81 |
+
if(oldObject.className) newObject.className = oldObject.className;
|
82 |
+
oldObject.parentNode.replaceChild(newObject,oldObject);
|
83 |
+
return newObject;
|
84 |
+
}
|
85 |
+
|
86 |
+
Bundle.Option = Class.create();
|
87 |
+
Bundle.Option.prototype = {
|
88 |
+
idLabel : '<?php echo $this->getFieldId() ?>',
|
89 |
+
top : '',
|
90 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
91 |
+
templateText : '',
|
92 |
+
itemsCount : 0,
|
93 |
+
initialize : function(template) {
|
94 |
+
this.templateText = template;
|
95 |
+
this.top = $('product_bundle_container_top');
|
96 |
+
},
|
97 |
+
|
98 |
+
add : function(data) {
|
99 |
+
if(!data){
|
100 |
+
data = {};
|
101 |
+
this.top = $('product_bundle_container_top');
|
102 |
+
} else {
|
103 |
+
data.title = data.title.replace('"', """);
|
104 |
+
}
|
105 |
+
|
106 |
+
data.index = this.itemsCount++;
|
107 |
+
|
108 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
109 |
+
|
110 |
+
Element.insert(this.top, {'after':this.template.evaluate(data)});
|
111 |
+
|
112 |
+
this.top = $(this.idLabel + '_' + data.index);
|
113 |
+
|
114 |
+
//set selected type
|
115 |
+
if (data.type) {
|
116 |
+
$A($(this.idLabel + '_'+data.index+'_type').options).each(function(option){
|
117 |
+
if (option.value==data.type) option.selected = true;
|
118 |
+
});
|
119 |
+
}
|
120 |
+
|
121 |
+
//set selected is_require
|
122 |
+
if (data.required) {
|
123 |
+
$A($(this.idLabel + '_'+data.index+'_required').options).each(function(option){
|
124 |
+
if (option.value==data.required) option.selected = true;
|
125 |
+
});
|
126 |
+
}
|
127 |
+
// rebind change notifications
|
128 |
+
varienWindowOnload(true);
|
129 |
+
|
130 |
+
return data.index;
|
131 |
+
},
|
132 |
+
|
133 |
+
remove : function(event){
|
134 |
+
var element = $(Event.findElement(event, 'div')).parentNode;
|
135 |
+
if(element){
|
136 |
+
Element.select(element, '.delete').each(function(elem){elem.value='1'});
|
137 |
+
Element.select(element, ['input', 'select']).each(function(elem){elem.hide(); elem.className = '';});
|
138 |
+
Element.hide(element);
|
139 |
+
}
|
140 |
+
},
|
141 |
+
|
142 |
+
changeType : function(event) {
|
143 |
+
var element = Event.element(event);
|
144 |
+
parts = element.id.split('_');
|
145 |
+
i = parts[2];
|
146 |
+
if (element.value == 'multi' || element.value == 'checkbox') {
|
147 |
+
inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
|
148 |
+
inputs.each(
|
149 |
+
function(elem){
|
150 |
+
//elem.type = "checkbox";
|
151 |
+
changeInputType(elem, 'checkbox');
|
152 |
+
}
|
153 |
+
);
|
154 |
+
/**
|
155 |
+
* Hide not needed elements (user defined qty select box)
|
156 |
+
*/
|
157 |
+
inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
|
158 |
+
inputs.each(
|
159 |
+
function(elem){
|
160 |
+
elem.hide();
|
161 |
+
}
|
162 |
+
);
|
163 |
+
|
164 |
+
} else {
|
165 |
+
inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' tr.selection input.default'));
|
166 |
+
have = false;
|
167 |
+
for (j=0; j< inputs.length; j++) {
|
168 |
+
//inputs[j].type = "radio";
|
169 |
+
changeInputType(inputs[j], 'radio');
|
170 |
+
if (inputs[j].checked && have) {
|
171 |
+
inputs[j].checked = false;
|
172 |
+
} else {
|
173 |
+
have = true;
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Show user defined select box
|
179 |
+
*/
|
180 |
+
inputs = $A($$('#' + bSelection.idLabel + '_box_' + i + ' .qty-box'));
|
181 |
+
inputs.each(
|
182 |
+
function(elem){
|
183 |
+
elem.show();
|
184 |
+
}
|
185 |
+
);
|
186 |
+
}
|
187 |
+
},
|
188 |
+
|
189 |
+
priceTypeFixed : function() {
|
190 |
+
inputs = $A($$('.price-type-box'));
|
191 |
+
inputs.each(
|
192 |
+
function(elem){
|
193 |
+
elem.show();
|
194 |
+
}
|
195 |
+
);
|
196 |
+
},
|
197 |
+
|
198 |
+
priceTypeDynamic : function() {
|
199 |
+
inputs = $A($$('.price-type-box'));
|
200 |
+
inputs.each(
|
201 |
+
function(elem){
|
202 |
+
elem.hide();
|
203 |
+
}
|
204 |
+
);
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
var optionIndex = 0;
|
209 |
+
bOption = new Bundle.Option(optionTemplate);
|
210 |
+
//adding data to templates
|
211 |
+
<?php foreach ($this->getOptions() as $_option): ?>
|
212 |
+
optionIndex = bOption.add(<?php echo $_option->toJson() ?>);
|
213 |
+
<?php if ($_option->getSelections()):?>
|
214 |
+
<?php foreach ($_option->getSelections() as $_selection): ?>
|
215 |
+
<?php $_selection->setName($this->escapeHtml($_selection->getName())); ?>
|
216 |
+
bSelection.addRow(optionIndex, <?php echo $_selection->toJson() ?>);
|
217 |
+
<?php endforeach; ?>
|
218 |
+
<?php endif; ?>
|
219 |
+
<?php endforeach; ?>
|
220 |
+
/**
|
221 |
+
* Adding event on price type select box of product to hide or show prices for selections
|
222 |
+
*/
|
223 |
+
function togglePriceType() {
|
224 |
+
if ($('price_type').value == '1') {
|
225 |
+
bOption.priceTypeFixed();
|
226 |
+
} else {
|
227 |
+
bOption.priceTypeDynamic();
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
togglePriceType();
|
232 |
+
|
233 |
+
Event.observe('price_type', 'change', togglePriceType);
|
234 |
+
|
235 |
+
</script>
|
app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/search.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<div style="float: right;"><?php echo $this->getButtonsHtml() ?></div>
|
30 |
+
<h4 class="fieldset-legend <?php echo ($this->getHeaderCssClass()) ? $this->getHeaderCssClass().' icon-head' : '' ?>"><?php echo $this->getHeaderText() ?></h4>
|
31 |
+
</div>
|
32 |
+
<fieldset>
|
33 |
+
<?php echo $this->getChildHtml() ?>
|
34 |
+
</fieldset>
|
35 |
+
</div>
|
app/design/adminhtml/default/default/template/bundle/product/edit/bundle/option/selection.phtml
ADDED
@@ -0,0 +1,352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
|
30 |
+
var bundleTemplateBox = '<table class="border" cellpadding="0" cellspacing="0">' +
|
31 |
+
' <thead>' +
|
32 |
+
' <tr class="headings">' +
|
33 |
+
' <th><?php echo Mage::helper('catalog')->__('Name') ?></th>' +
|
34 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
35 |
+
' <th class="type-price price-type-box"><?php echo Mage::helper('catalog')->__('Price') ?></th>' +
|
36 |
+
' <th class="type-type price-type-box"><?php echo Mage::helper('bundle')->__('Price Type') ?></th>' +
|
37 |
+
<?php endif; ?>
|
38 |
+
' <th class="type-price"><?php echo Mage::helper('bundle')->__('Default Qty') ?></th>' +
|
39 |
+
' <th class="type-uqty qty-box"><?php echo$this->jsQuoteEscape(Mage::helper('bundle')->__('User Defined Qty')) ?></th>' +
|
40 |
+
' <th class="type-order"><?php echo Mage::helper('bundle')->__('Position') ?></th>' +
|
41 |
+
' <th style="width:1px"><?php echo Mage::helper('bundle')->__('Default') ?></th>' +
|
42 |
+
' <th class="last"> </th>' +
|
43 |
+
' </tr>' +
|
44 |
+
' </thead> ' +
|
45 |
+
' <tbody>' +
|
46 |
+
' </tbody>' +
|
47 |
+
'</table>';
|
48 |
+
|
49 |
+
var bundleTemplateRow ='<td>' +
|
50 |
+
' <input type="hidden" id="<?php echo $this->getFieldId() ?>_id_{{index}}" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][selection_id]" value="{{selection_id}}">' +
|
51 |
+
' <input type="hidden" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][option_id]" value="{{option_id}}">' +
|
52 |
+
' <input type="hidden" class="product" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][product_id]" value="{{product_id}}">' +
|
53 |
+
' <input type="hidden" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][delete]" value="" class="delete">' +
|
54 |
+
' {{name}}<br />' +
|
55 |
+
' <div class="nobr">' +
|
56 |
+
' <strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> {{sku}}' +
|
57 |
+
' </div>' +
|
58 |
+
'</td>' +
|
59 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
60 |
+
'<td class="price-type-box"><input id="<?php echo $this->getFieldId() ?>_{{index}}_price_value" class="input-text required-entry validate-zero-or-greater" type="text" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][selection_price_value]" value="{{selection_price_value}}"<?php if($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?>></td>' +
|
61 |
+
'<td class="price-type-box"><?php echo $this->getPriceTypeSelectHtml() ?><div><?php echo $this->getCheckboxScopeHtml() ?></div></td>' +
|
62 |
+
<?php else : ?>
|
63 |
+
'<input type="hidden" id="<?php echo $this->getFieldId(); ?>_{{index}}_price_value" name="<?php echo $this->getFieldName(); ?>[{{parentIndex}}][{{index}}][selection_price_value]" value="0" />' +
|
64 |
+
'<input type="hidden" id="<?php echo $this->getFieldId(); ?>_{{index}}_price_type" name="<?php echo $this->getFieldName(); ?>[{{parentIndex}}][{{index}}][selection_price_type]" value="0" />' +
|
65 |
+
<?php if ($this->isUsedWebsitePrice()): ?>
|
66 |
+
'<input type="hidden" id="<?php echo $this->getFieldId(); ?>_{{index}}_price_scope" name="<?php echo $this->getFieldName(); ?>[{{parentIndex}}][{{index}}][default_price_scope]" value="1" />' +
|
67 |
+
<?php endif; ?>
|
68 |
+
<?php endif; ?>
|
69 |
+
'<td><input class="input-text required-entry validate-zero-or-greater" type="text" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][selection_qty]" value="{{selection_qty}}"></td>' +
|
70 |
+
'<td class="qty-box"><?php echo $this->getQtyTypeSelectHtml() ?></td>' +
|
71 |
+
'<td><input class="input-text required-entry validate-zero-or-greater" type="text" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][position]" value="{{position}}"></td>' +
|
72 |
+
'<td class="a-center"><input onclick="bSelection.checkGroup(event)" type="{{option_type}}" class="default" name="<?php echo $this->getFieldName() ?>[{{parentIndex}}][{{index}}][is_default]" value="1" {{checked}}></td>' +
|
73 |
+
'<td class="last"><span title="Delete Row"><?php echo $this->getSelectionDeleteButtonHtml() ?></span></td>';
|
74 |
+
|
75 |
+
Bundle.Selection = Class.create();
|
76 |
+
Bundle.Selection.prototype = {
|
77 |
+
idLabel : '<?php echo $this->getFieldId() ?>',
|
78 |
+
scopePrice : <?php echo (int)$this->isUsedWebsitePrice() ?>,
|
79 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
80 |
+
templateBox : '',
|
81 |
+
templateRow : '',
|
82 |
+
itemsCount : 0,
|
83 |
+
row : null,
|
84 |
+
gridSelection : new Hash(),
|
85 |
+
|
86 |
+
initialize : function() {
|
87 |
+
this.templateBox = '<div class="grid tier form-list" id="' + this.idLabel + '_box_{{parentIndex}}">' + bundleTemplateBox + '</div>';
|
88 |
+
|
89 |
+
this.templateRow = '<tr class="selection" id="' + this.idLabel + '_row_{{index}}">' + bundleTemplateRow + '</tr>';
|
90 |
+
},
|
91 |
+
|
92 |
+
showSearch : function(event) {
|
93 |
+
var element = Event.findElement(event, 'div');
|
94 |
+
var parts = element.id.split('_');
|
95 |
+
|
96 |
+
var products = new Array();
|
97 |
+
|
98 |
+
var inputs = $A($$('#' + element.id + ' tr.selection input.product'));
|
99 |
+
for (i=0; i<inputs.length; i++) {
|
100 |
+
products.push(inputs[i].value);
|
101 |
+
}
|
102 |
+
|
103 |
+
this.gridSelection.set(parts[2], $H({}));
|
104 |
+
|
105 |
+
new Ajax.Updater(bOption.idLabel + '_search_' + parts[2], '<?php echo $this->getSelectionSearchUrl() ?>', {
|
106 |
+
method: 'post',
|
107 |
+
parameters : {'index' : parts[2], 'products[]' : products, 'form_key': FORM_KEY},
|
108 |
+
evalScripts : true
|
109 |
+
});
|
110 |
+
|
111 |
+
if (Event.element(event).tagName.toLowerCase() != 'button') {
|
112 |
+
var button = Event.element(event).up('button');
|
113 |
+
} else {
|
114 |
+
var button = Event.element(event);
|
115 |
+
}
|
116 |
+
button.hide();
|
117 |
+
},
|
118 |
+
|
119 |
+
addRow : function (parentIndex, data) {
|
120 |
+
var box = null;
|
121 |
+
if (!(box = $(this.idLabel + '_box_' + parentIndex))) {
|
122 |
+
this.addBox(parentIndex);
|
123 |
+
box = $(this.idLabel + '_box_' + parentIndex);
|
124 |
+
} else {
|
125 |
+
box.show();
|
126 |
+
}
|
127 |
+
|
128 |
+
var option_type = $(bOption.idLabel + '_' + parentIndex + '_type');
|
129 |
+
|
130 |
+
if(!data){
|
131 |
+
var data = {};
|
132 |
+
}
|
133 |
+
|
134 |
+
if (data.can_read_price != undefined && !data.can_read_price) {
|
135 |
+
data.selection_price_value = '';
|
136 |
+
} else {
|
137 |
+
data.selection_price_value = Number(data.selection_price_value).toFixed(2);
|
138 |
+
}
|
139 |
+
|
140 |
+
data.index = this.itemsCount++;
|
141 |
+
data.parentIndex = parentIndex;
|
142 |
+
|
143 |
+
if (option_type.value == 'multi' || option_type.value == 'checkbox') {
|
144 |
+
data.option_type = 'checkbox';
|
145 |
+
} else {
|
146 |
+
data.option_type = 'radio';
|
147 |
+
}
|
148 |
+
|
149 |
+
if (data.is_default == 1) {
|
150 |
+
data.checked = 'checked="checked"';
|
151 |
+
}
|
152 |
+
|
153 |
+
this.template = new Template(this.templateRow, this.templateSyntax);
|
154 |
+
var tbody = $$('#' + this.idLabel + '_box_' + parentIndex + ' tbody');
|
155 |
+
|
156 |
+
Element.insert(tbody[0], {'bottom':this.template.evaluate(data)});
|
157 |
+
|
158 |
+
if (data.selection_price_type) {
|
159 |
+
$A($(this.idLabel + '_'+data.index+'_price_type').options).each(function(option){
|
160 |
+
if (option.value==data.selection_price_type) option.selected = true;
|
161 |
+
});
|
162 |
+
}
|
163 |
+
|
164 |
+
if (data.selection_price_type) {
|
165 |
+
$A($(this.idLabel + '_'+data.index+'_can_change_qty').options).each(function(option){
|
166 |
+
if (option.value==data.selection_can_change_qty) option.selected = true;
|
167 |
+
});
|
168 |
+
}
|
169 |
+
|
170 |
+
var checkbox = $(this.idLabel + '_'+data.index+'_price_scope');
|
171 |
+
if (checkbox && this.scopePrice) {
|
172 |
+
if (data.price_scope === undefined) {
|
173 |
+
checkbox.up().hide();
|
174 |
+
} else if(!data.price_scope) {
|
175 |
+
checkbox.checked = true;
|
176 |
+
this.addScope(null, checkbox);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
this.bindScopeCheckbox();
|
181 |
+
|
182 |
+
if (option_type.value == 'multi' || option_type.value == 'checkbox') {
|
183 |
+
/**
|
184 |
+
* Hide not needed elements (user defined qty select box)
|
185 |
+
*/
|
186 |
+
inputs = $A($$('#' + this.idLabel + '_box_' + data.parentIndex + ' .qty-box'));
|
187 |
+
inputs.each(
|
188 |
+
function(elem){
|
189 |
+
elem.hide();
|
190 |
+
}
|
191 |
+
);
|
192 |
+
}
|
193 |
+
|
194 |
+
if (!$('price_type') || $('price_type').value != '1') {
|
195 |
+
/**
|
196 |
+
* Hide not needed elements (price type select and price input)
|
197 |
+
*/
|
198 |
+
inputs = $A($$('#' + this.idLabel + '_box_' + data.parentIndex + ' .price-type-box'));
|
199 |
+
inputs.each(
|
200 |
+
function(elem){
|
201 |
+
elem.hide();
|
202 |
+
}
|
203 |
+
);
|
204 |
+
}
|
205 |
+
},
|
206 |
+
|
207 |
+
bindScopeCheckbox : function(){
|
208 |
+
var checkboxes = $$('.bundle-option-price-scope-checkbox');
|
209 |
+
for (var i=0;i<checkboxes.length;i++) {
|
210 |
+
if (!$(checkboxes[i]).binded) {
|
211 |
+
$(checkboxes[i]).binded = true;
|
212 |
+
Event.observe(checkboxes[i], 'click', this.addScope.bind(this));
|
213 |
+
}
|
214 |
+
}
|
215 |
+
},
|
216 |
+
|
217 |
+
addScope : function(event, element){
|
218 |
+
if (element == undefined) {
|
219 |
+
element = $(Event.element(event));
|
220 |
+
}
|
221 |
+
var priceValue = $(element.id.sub('scope', 'value'));
|
222 |
+
var priceType = $(element.id.sub('scope', 'type'));
|
223 |
+
|
224 |
+
if (element.checked) {
|
225 |
+
priceValue.disable();
|
226 |
+
priceType.disable();
|
227 |
+
} else {
|
228 |
+
priceValue.enable();
|
229 |
+
priceType.enable();
|
230 |
+
}
|
231 |
+
},
|
232 |
+
|
233 |
+
addBox : function (parentIndex) {
|
234 |
+
var div = $(bOption.idLabel + '_' + parentIndex)
|
235 |
+
this.template = new Template(this.templateBox, this.templateSyntax);
|
236 |
+
var data = {'parentIndex' : parentIndex};
|
237 |
+
Element.insert(div, {'bottom':this.template.evaluate(data)});
|
238 |
+
},
|
239 |
+
|
240 |
+
remove : function(event) {
|
241 |
+
var element = Event.findElement(event, 'tr');
|
242 |
+
var container = Event.findElement(event, 'div');
|
243 |
+
|
244 |
+
if (element) {
|
245 |
+
Element.select(element, '.delete').each(function(elem){elem.value='1'});
|
246 |
+
Element.select(element, ['input', 'select']).each(function(elem){elem.hide()});
|
247 |
+
Element.removeClassName(element, 'selection');
|
248 |
+
Element.hide(element);
|
249 |
+
|
250 |
+
if (container) {
|
251 |
+
if ($$('#' + container.id + ' tr.selection')) {
|
252 |
+
if (!$$('#' + container.id + ' tr.selection').length) {
|
253 |
+
container.hide();
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
258 |
+
},
|
259 |
+
|
260 |
+
checkGroup : function(event) {
|
261 |
+
var element = Event.element(event);
|
262 |
+
if (element.type == 'radio') {
|
263 |
+
var box = element.up('div');
|
264 |
+
|
265 |
+
var inputs = $$('div#' + box.id + ' input.default');
|
266 |
+
if (inputs) {
|
267 |
+
for (i=0; i< inputs.length; i++) {
|
268 |
+
if (inputs[i].name != element.name) {
|
269 |
+
inputs[i].checked = false;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
},
|
275 |
+
|
276 |
+
productGridAddSelected : function(event) {
|
277 |
+
var element = Event.findElement(event, 'button');
|
278 |
+
var parts = element.id.split('_');
|
279 |
+
|
280 |
+
$(bOption.idLabel + '_search_' + parts[2]).innerHTML = '';
|
281 |
+
$(bOption.idLabel + '_' + parts[2] + '_add_button').show();
|
282 |
+
|
283 |
+
this.gridSelection.get(parts[2]).each(
|
284 |
+
function(pair) {
|
285 |
+
var qty = pair.value.get('qty');
|
286 |
+
var data = {
|
287 |
+
'name' : pair.value.get('name'),
|
288 |
+
'selection_price_value' : 0,
|
289 |
+
'selection_qty' : (qty == '' ? 1 : qty),
|
290 |
+
'sku' : pair.value.get('sku'),
|
291 |
+
'position' : 0,
|
292 |
+
'product_id' : pair.key,
|
293 |
+
'option_id' : $(bOption.idLabel + '_id_' + parts[2]).value
|
294 |
+
};
|
295 |
+
bSelection.addRow(parts[2], data);
|
296 |
+
}
|
297 |
+
);
|
298 |
+
},
|
299 |
+
|
300 |
+
productGridRowInit : function(grid, row){
|
301 |
+
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
302 |
+
var inputs = $(row).getElementsByClassName('input-text');
|
303 |
+
for (var i = 0; i < inputs.length; i++) {
|
304 |
+
inputs[i].checkbox = checkbox;
|
305 |
+
Event.observe(inputs[i], 'keyup', this.productGridRowInputChange.bind(this));
|
306 |
+
Event.observe(inputs[i], 'change', this.productGridRowInputChange.bind(this));
|
307 |
+
}
|
308 |
+
},
|
309 |
+
|
310 |
+
productGridCheckboxCheck : function(grid, element, checked) {
|
311 |
+
var id = element.up('table').id.split('_')[4];
|
312 |
+
if (element.value > 0) {
|
313 |
+
if (element.checked) {
|
314 |
+
var tr = element.parentNode.parentNode;
|
315 |
+
if (!this.gridSelection.get(id)) {
|
316 |
+
this.gridSelection.set(id, new Hash());
|
317 |
+
}
|
318 |
+
this.gridSelection.get(id).set(element.value, $H({}));
|
319 |
+
this.gridSelection.get(id).get(element.value).set('name', tr.select('td.name')[0].innerHTML);
|
320 |
+
this.gridSelection.get(id).get(element.value).set('qty', tr.select('input.qty')[0].value);
|
321 |
+
this.gridSelection.get(id).get(element.value).set('sku', tr.select('td.sku')[0].innerHTML);
|
322 |
+
} else {
|
323 |
+
this.gridSelection.get(id).unset(element.value);
|
324 |
+
}
|
325 |
+
}
|
326 |
+
},
|
327 |
+
|
328 |
+
productGridRowClick : function(grid, event) {
|
329 |
+
var trElement = Event.findElement(event, 'tr');
|
330 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
331 |
+
if (trElement) {
|
332 |
+
var checkbox = Element.select(trElement, 'input');
|
333 |
+
if (checkbox[0]) {
|
334 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
335 |
+
grid.setCheckboxChecked(checkbox[0], checked);
|
336 |
+
}
|
337 |
+
}
|
338 |
+
},
|
339 |
+
|
340 |
+
productGridRowInputChange : function(event) {
|
341 |
+
var element = Event.element(event);
|
342 |
+
if (!element.checkbox.checked) {
|
343 |
+
return;
|
344 |
+
}
|
345 |
+
var id = element.up('table').id.split('_')[4];
|
346 |
+
this.gridSelection.get(id).get(element.checkbox.value).set('qty', element.value);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
bSelection = new Bundle.Selection();
|
351 |
+
//]]>
|
352 |
+
</script>
|
app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml
ADDED
@@ -0,0 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = $this->getChilds($_item); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
49 |
+
<?php if ($_item->getOrderItem()->getParentItem()): ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td> </td>
|
55 |
+
<td> </td>
|
56 |
+
<td> </td>
|
57 |
+
<td> </td>
|
58 |
+
<td> </td>
|
59 |
+
<td> </td>
|
60 |
+
<td class="last"> </td>
|
61 |
+
</tr>
|
62 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php endif; ?>
|
65 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
66 |
+
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
67 |
+
<td><h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
68 |
+
<div>
|
69 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
70 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
71 |
+
</div>
|
72 |
+
</td>
|
73 |
+
<?php else: ?>
|
74 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
75 |
+
<?php endif; ?>
|
76 |
+
<td class="a-right">
|
77 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
78 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
79 |
+
<span class="price-excl-tax">
|
80 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
81 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
82 |
+
<?php endif; ?>
|
83 |
+
|
84 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
85 |
+
<?php
|
86 |
+
echo $this->displayPrices(
|
87 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
88 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
89 |
+
);
|
90 |
+
?>
|
91 |
+
<?php else: ?>
|
92 |
+
<?php echo $this->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
93 |
+
<?php endif; ?>
|
94 |
+
|
95 |
+
|
96 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
97 |
+
<br />
|
98 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
99 |
+
<small>
|
100 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
101 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
102 |
+
<?php endforeach; ?>
|
103 |
+
</small>
|
104 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
105 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
106 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
107 |
+
<?php endforeach; ?>
|
108 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
109 |
+
<small>
|
110 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
111 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
112 |
+
<?php endforeach; ?>
|
113 |
+
</small>
|
114 |
+
<?php endif; ?>
|
115 |
+
|
116 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
117 |
+
<br />
|
118 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
119 |
+
<?php
|
120 |
+
echo $this->displayPrices(
|
121 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
122 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
123 |
+
);
|
124 |
+
?>
|
125 |
+
</span>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php endif; ?>
|
128 |
+
</span>
|
129 |
+
<br />
|
130 |
+
<?php endif; ?>
|
131 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
132 |
+
<span class="price-incl-tax">
|
133 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
134 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
135 |
+
<?php endif; ?>
|
136 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
137 |
+
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
138 |
+
|
139 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
140 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
141 |
+
<?php else: ?>
|
142 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
143 |
+
<?php endif; ?>
|
144 |
+
|
145 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
146 |
+
<br />
|
147 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
148 |
+
<small>
|
149 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
150 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
151 |
+
<?php endforeach; ?>
|
152 |
+
</small>
|
153 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
154 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
155 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
156 |
+
<?php endforeach; ?>
|
157 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
158 |
+
<small>
|
159 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
160 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
161 |
+
<?php endforeach; ?>
|
162 |
+
</small>
|
163 |
+
<?php endif; ?>
|
164 |
+
|
165 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
166 |
+
<br />
|
167 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
168 |
+
<?php endif; ?>
|
169 |
+
<?php endif; ?>
|
170 |
+
</span>
|
171 |
+
<?php endif; ?>
|
172 |
+
<?php else: ?>
|
173 |
+
|
174 |
+
<?php endif; ?>
|
175 |
+
</td>
|
176 |
+
<td>
|
177 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
178 |
+
<table cellspacing="0" class="qty-table">
|
179 |
+
<tr>
|
180 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
181 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyOrdered()*1 ?></strong></td>
|
182 |
+
</tr>
|
183 |
+
<?php if ((float) $_item->getOrderItem()->getQtyInvoiced()): ?>
|
184 |
+
<tr>
|
185 |
+
<td><?php echo Mage::helper('sales')->__('Invoiced') ?></td>
|
186 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyInvoiced()*1 ?></strong></td>
|
187 |
+
</tr>
|
188 |
+
<?php endif; ?>
|
189 |
+
<?php if ((float) $_item->getOrderItem()->getQtyShipped() && $this->isShipmentSeparately($_item)): ?>
|
190 |
+
<tr>
|
191 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
192 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyShipped()*1 ?></strong></td>
|
193 |
+
</tr>
|
194 |
+
<?php endif; ?>
|
195 |
+
<?php if ((float) $_item->getOrderItem()->getQtyRefunded()): ?>
|
196 |
+
<tr>
|
197 |
+
<td><?php echo Mage::helper('sales')->__('Refunded') ?></td>
|
198 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyRefunded()*1 ?></strong></td>
|
199 |
+
</tr>
|
200 |
+
<?php endif; ?>
|
201 |
+
<?php if ((float) $_item->getOrderItem()->getQtyCanceled()): ?>
|
202 |
+
<tr>
|
203 |
+
<td><?php echo Mage::helper('sales')->__('Canceled') ?></td>
|
204 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyCanceled()*1 ?></strong></td>
|
205 |
+
</tr>
|
206 |
+
<?php endif; ?>
|
207 |
+
</table>
|
208 |
+
<?php elseif ($this->isShipmentSeparately($_item)): ?>
|
209 |
+
<table cellspacing="0" class="qty-table">
|
210 |
+
<tr>
|
211 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
212 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyOrdered()*1 ?></strong></td>
|
213 |
+
</tr>
|
214 |
+
<?php if ((float) $_item->getOrderItem()->getQtyShipped()): ?>
|
215 |
+
<tr>
|
216 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
217 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyShipped()*1 ?></strong></td>
|
218 |
+
</tr>
|
219 |
+
<?php endif; ?>
|
220 |
+
</table>
|
221 |
+
<?php else: ?>
|
222 |
+
|
223 |
+
<?php endif; ?>
|
224 |
+
</td>
|
225 |
+
<?php if ($this->canParentReturnToStock($_item)) : ?>
|
226 |
+
<td class="a-center">
|
227 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
228 |
+
<?php if ($this->canReturnItemToStock($_item)) : ?>
|
229 |
+
<input type="checkbox" name="creditmemo[items][<?php echo $_item->getOrderItemId() ?>][back_to_stock]" value="1"<?php if ($_item->getBackToStock()):?> checked="checked"<?php endif;?> />
|
230 |
+
<?php endif; ?>
|
231 |
+
<?php else: ?>
|
232 |
+
|
233 |
+
<?php endif; ?>
|
234 |
+
</td>
|
235 |
+
<?php endif; ?>
|
236 |
+
<td class="a-center">
|
237 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
238 |
+
<?php if ($this->canEditQty()) : ?>
|
239 |
+
<input type="text" class="input-text qty-input" name="creditmemo[items][<?php echo $_item->getOrderItemId() ?>][qty]" value="<?php echo $_item->getQty()*1 ?>" />
|
240 |
+
<?php else: ?>
|
241 |
+
<?php echo $_item->getQty()*1 ?>
|
242 |
+
<?php endif; ?>
|
243 |
+
<?php else: ?>
|
244 |
+
|
245 |
+
<?php endif; ?>
|
246 |
+
</td>
|
247 |
+
<td class="a-right">
|
248 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
249 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
250 |
+
<span class="price-excl-tax">
|
251 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
252 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
253 |
+
<?php endif; ?>
|
254 |
+
|
255 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
256 |
+
<?php
|
257 |
+
echo $this->displayPrices(
|
258 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
259 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
260 |
+
);
|
261 |
+
?>
|
262 |
+
<?php else: ?>
|
263 |
+
<?php echo $this->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
264 |
+
<?php endif; ?>
|
265 |
+
|
266 |
+
|
267 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
268 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
269 |
+
<small>
|
270 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
271 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
272 |
+
<?php endforeach; ?>
|
273 |
+
</small>
|
274 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
275 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
276 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
277 |
+
<?php endforeach; ?>
|
278 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
279 |
+
<small>
|
280 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
281 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
282 |
+
<?php endforeach; ?>
|
283 |
+
</small>
|
284 |
+
<?php endif; ?>
|
285 |
+
|
286 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
287 |
+
<br />
|
288 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
289 |
+
<?php
|
290 |
+
echo $this->displayPrices(
|
291 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
292 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
293 |
+
);
|
294 |
+
?>
|
295 |
+
</span>
|
296 |
+
<?php endif; ?>
|
297 |
+
<?php endif; ?>
|
298 |
+
</span>
|
299 |
+
<br />
|
300 |
+
<?php endif; ?>
|
301 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
302 |
+
<span class="price-incl-tax">
|
303 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
304 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
305 |
+
<?php endif; ?>
|
306 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
307 |
+
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
308 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
309 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
310 |
+
<?php else: ?>
|
311 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
312 |
+
<?php endif; ?>
|
313 |
+
|
314 |
+
|
315 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
316 |
+
|
317 |
+
<br />
|
318 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
319 |
+
<small>
|
320 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
321 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
322 |
+
<?php endforeach; ?>
|
323 |
+
</small>
|
324 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
325 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
326 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
327 |
+
<?php endforeach; ?>
|
328 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
329 |
+
<small>
|
330 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
331 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
332 |
+
<?php endforeach; ?>
|
333 |
+
</small>
|
334 |
+
<?php endif; ?>
|
335 |
+
|
336 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
337 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
338 |
+
<?php endif; ?>
|
339 |
+
<?php endif; ?>
|
340 |
+
</span>
|
341 |
+
<?php endif; ?>
|
342 |
+
</span>
|
343 |
+
<?php else: ?>
|
344 |
+
|
345 |
+
<?php endif; ?>
|
346 |
+
</td>
|
347 |
+
<td class="a-right">
|
348 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
349 |
+
<?php echo $this->displayPriceAttribute('tax_amount') ?>
|
350 |
+
<?php else: ?>
|
351 |
+
|
352 |
+
<?php endif; ?>
|
353 |
+
</td>
|
354 |
+
<td class="a-right">
|
355 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
356 |
+
<?php echo $this->displayPriceAttribute('discount_amount') ?>
|
357 |
+
<?php else: ?>
|
358 |
+
|
359 |
+
<?php endif; ?>
|
360 |
+
</td>
|
361 |
+
<td class="a-right last">
|
362 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
363 |
+
<?php echo $this->displayPrices(
|
364 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(),
|
365 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount()
|
366 |
+
) ?>
|
367 |
+
<?php else: ?>
|
368 |
+
|
369 |
+
<?php endif; ?>
|
370 |
+
</td>
|
371 |
+
</tr>
|
372 |
+
<?php endforeach; ?>
|
373 |
+
<?php if($_showlastRow): ?>
|
374 |
+
<tr class="border">
|
375 |
+
<td>
|
376 |
+
<?php if ($this->getOrderOptions($_item->getOrderItem())): ?>
|
377 |
+
<dl class="item-options">
|
378 |
+
<?php foreach ($this->getOrderOptions($_item->getOrderItem()) as $option): ?>
|
379 |
+
<dt><?php echo $option['label'] ?></dt>
|
380 |
+
<dd>
|
381 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
382 |
+
<?php echo $option['value'];?>
|
383 |
+
<?php else: ?>
|
384 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
385 |
+
<?php if ($_remainder):?>
|
386 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
387 |
+
<script type="text/javascript">
|
388 |
+
$('<?php echo $_id ?>').hide();
|
389 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
390 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
391 |
+
</script>
|
392 |
+
<?php endif;?>
|
393 |
+
<?php endif;?>
|
394 |
+
</dd>
|
395 |
+
<?php endforeach; ?>
|
396 |
+
</dl>
|
397 |
+
<?php else: ?>
|
398 |
+
|
399 |
+
<?php endif; ?>
|
400 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
401 |
+
</td>
|
402 |
+
<td> </td>
|
403 |
+
<td> </td>
|
404 |
+
<td> </td>
|
405 |
+
<td> </td>
|
406 |
+
<td> </td>
|
407 |
+
<td> </td>
|
408 |
+
<td> </td>
|
409 |
+
<td class="last"> </td>
|
410 |
+
</tr>
|
411 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml
ADDED
@@ -0,0 +1,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = $this->getChilds($_item); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
49 |
+
<?php if ($_item->getOrderItem()->getParentItem()): ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td> </td>
|
55 |
+
<td> </td>
|
56 |
+
<td> </td>
|
57 |
+
<td> </td>
|
58 |
+
<td class="last"> </td>
|
59 |
+
</tr>
|
60 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
61 |
+
<?php endif; ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
64 |
+
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
65 |
+
<td><h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
66 |
+
<div>
|
67 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
68 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
69 |
+
</div>
|
70 |
+
</td>
|
71 |
+
<?php else: ?>
|
72 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
73 |
+
<?php endif; ?>
|
74 |
+
<td class="a-right">
|
75 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
76 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
77 |
+
<span class="price-excl-tax">
|
78 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
79 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
80 |
+
<?php endif; ?>
|
81 |
+
|
82 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
83 |
+
<?php
|
84 |
+
echo $this->displayPrices(
|
85 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
86 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
87 |
+
);
|
88 |
+
?>
|
89 |
+
<?php else: ?>
|
90 |
+
<?php echo $this->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
91 |
+
<?php endif; ?>
|
92 |
+
|
93 |
+
|
94 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
95 |
+
<br />
|
96 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
97 |
+
<small>
|
98 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
99 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
100 |
+
<?php endforeach; ?>
|
101 |
+
</small>
|
102 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
103 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
104 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
105 |
+
<?php endforeach; ?>
|
106 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
107 |
+
<small>
|
108 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
109 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
110 |
+
<?php endforeach; ?>
|
111 |
+
</small>
|
112 |
+
<?php endif; ?>
|
113 |
+
|
114 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
115 |
+
<br />
|
116 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
117 |
+
<?php
|
118 |
+
echo $this->displayPrices(
|
119 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
120 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
121 |
+
);
|
122 |
+
?>
|
123 |
+
</span>
|
124 |
+
<?php endif; ?>
|
125 |
+
<?php endif; ?>
|
126 |
+
</span>
|
127 |
+
<br />
|
128 |
+
<?php endif; ?>
|
129 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
130 |
+
<span class="price-incl-tax">
|
131 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
132 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
133 |
+
<?php endif; ?>
|
134 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
135 |
+
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
136 |
+
|
137 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
138 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
139 |
+
<?php else: ?>
|
140 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
141 |
+
<?php endif; ?>
|
142 |
+
|
143 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
144 |
+
<br />
|
145 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
146 |
+
<small>
|
147 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
148 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
149 |
+
<?php endforeach; ?>
|
150 |
+
</small>
|
151 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
152 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
153 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
154 |
+
<?php endforeach; ?>
|
155 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
156 |
+
<small>
|
157 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
158 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
159 |
+
<?php endforeach; ?>
|
160 |
+
</small>
|
161 |
+
<?php endif; ?>
|
162 |
+
|
163 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
164 |
+
<br />
|
165 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
166 |
+
<?php endif; ?>
|
167 |
+
<?php endif; ?>
|
168 |
+
</span>
|
169 |
+
<?php endif; ?>
|
170 |
+
<?php else: ?>
|
171 |
+
|
172 |
+
<?php endif; ?>
|
173 |
+
</td>
|
174 |
+
<td class="a-center">
|
175 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
176 |
+
<?php echo $_item->getQty()*1 ?>
|
177 |
+
<?php else: ?>
|
178 |
+
|
179 |
+
<?php endif; ?>
|
180 |
+
</td>
|
181 |
+
<td class="a-right">
|
182 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
183 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
184 |
+
<span class="price-excl-tax">
|
185 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
186 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
187 |
+
<?php endif; ?>
|
188 |
+
|
189 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
190 |
+
<?php
|
191 |
+
echo $this->displayPrices(
|
192 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
193 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
194 |
+
);
|
195 |
+
?>
|
196 |
+
<?php else: ?>
|
197 |
+
<?php echo $this->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
198 |
+
<?php endif; ?>
|
199 |
+
|
200 |
+
|
201 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
202 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
203 |
+
<small>
|
204 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
205 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
206 |
+
<?php endforeach; ?>
|
207 |
+
</small>
|
208 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
209 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
210 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
211 |
+
<?php endforeach; ?>
|
212 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
213 |
+
<small>
|
214 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
215 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
216 |
+
<?php endforeach; ?>
|
217 |
+
</small>
|
218 |
+
<?php endif; ?>
|
219 |
+
|
220 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
221 |
+
<br />
|
222 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
223 |
+
<?php
|
224 |
+
echo $this->displayPrices(
|
225 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
226 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
227 |
+
);
|
228 |
+
?>
|
229 |
+
</span>
|
230 |
+
<?php endif; ?>
|
231 |
+
<?php endif; ?>
|
232 |
+
</span>
|
233 |
+
<br />
|
234 |
+
<?php endif; ?>
|
235 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
236 |
+
<span class="price-incl-tax">
|
237 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
238 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
239 |
+
<?php endif; ?>
|
240 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
241 |
+
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
242 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
243 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
244 |
+
<?php else: ?>
|
245 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
246 |
+
<?php endif; ?>
|
247 |
+
|
248 |
+
|
249 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
250 |
+
|
251 |
+
<br />
|
252 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
253 |
+
<small>
|
254 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
255 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
256 |
+
<?php endforeach; ?>
|
257 |
+
</small>
|
258 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
259 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
260 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
261 |
+
<?php endforeach; ?>
|
262 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
263 |
+
<small>
|
264 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
265 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
266 |
+
<?php endforeach; ?>
|
267 |
+
</small>
|
268 |
+
<?php endif; ?>
|
269 |
+
|
270 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
271 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
272 |
+
<?php endif; ?>
|
273 |
+
<?php endif; ?>
|
274 |
+
</span>
|
275 |
+
<?php endif; ?>
|
276 |
+
</span>
|
277 |
+
<?php else: ?>
|
278 |
+
|
279 |
+
<?php endif; ?>
|
280 |
+
</td>
|
281 |
+
<td class="a-right">
|
282 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
283 |
+
<?php echo $this->displayPriceAttribute('tax_amount') ?>
|
284 |
+
<?php else: ?>
|
285 |
+
|
286 |
+
<?php endif; ?>
|
287 |
+
</td>
|
288 |
+
<td class="a-right">
|
289 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
290 |
+
<?php echo $this->displayPriceAttribute('discount_amount') ?>
|
291 |
+
<?php else: ?>
|
292 |
+
|
293 |
+
<?php endif; ?>
|
294 |
+
</td>
|
295 |
+
<td class="a-right last">
|
296 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
297 |
+
<?php echo $this->displayPrices(
|
298 |
+
$_item->getBaseRowTotal()-$_item->getBaseDiscountAmount()+$_item->getBaseTaxAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(),
|
299 |
+
$_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()
|
300 |
+
) ?>
|
301 |
+
<?php else: ?>
|
302 |
+
|
303 |
+
<?php endif; ?>
|
304 |
+
</td>
|
305 |
+
</tr>
|
306 |
+
<?php endforeach; ?>
|
307 |
+
<?php if($_showlastRow): ?>
|
308 |
+
<tr class="border">
|
309 |
+
<td>
|
310 |
+
<?php if ($this->getOrderOptions()): ?>
|
311 |
+
<dl class="item-options">
|
312 |
+
<?php foreach ($this->getOrderOptions() as $option): ?>
|
313 |
+
<dt><?php echo $option['label'] ?></dt>
|
314 |
+
<dd>
|
315 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
316 |
+
<?php echo $option['value'];?>
|
317 |
+
<?php else: ?>
|
318 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
319 |
+
<?php if ($_remainder):?>
|
320 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
321 |
+
<script type="text/javascript">
|
322 |
+
$('<?php echo $_id ?>').hide();
|
323 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
324 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
325 |
+
</script>
|
326 |
+
<?php endif;?>
|
327 |
+
<?php endif;?>
|
328 |
+
</dd>
|
329 |
+
<?php endforeach; ?>
|
330 |
+
</dl>
|
331 |
+
<?php endif; ?>
|
332 |
+
<?php echo $this->htmlEscape($this->getItem()->getDescription()) ?>
|
333 |
+
</td>
|
334 |
+
<td> </td>
|
335 |
+
<td> </td>
|
336 |
+
<td> </td>
|
337 |
+
<td> </td>
|
338 |
+
<td> </td>
|
339 |
+
<td class="last"> </td>
|
340 |
+
</tr>
|
341 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml
ADDED
@@ -0,0 +1,398 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = $this->getChilds($_item); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php if ($_item->getOrderItem()->getParentItem()): ?>
|
49 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td> </td>
|
55 |
+
<td> </td>
|
56 |
+
<td> </td>
|
57 |
+
<td> </td>
|
58 |
+
<td> </td>
|
59 |
+
<td class="last"> </td>
|
60 |
+
</tr>
|
61 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
65 |
+
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
66 |
+
<td><h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
67 |
+
<div>
|
68 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
69 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
70 |
+
</div>
|
71 |
+
</td>
|
72 |
+
<?php else: ?>
|
73 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
74 |
+
<?php endif; ?>
|
75 |
+
<td class="a-right">
|
76 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
77 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
78 |
+
<span class="price-excl-tax">
|
79 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
80 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
81 |
+
<?php endif; ?>
|
82 |
+
|
83 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
84 |
+
<?php
|
85 |
+
echo $this->displayPrices(
|
86 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
87 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
88 |
+
);
|
89 |
+
?>
|
90 |
+
<?php else: ?>
|
91 |
+
<?php echo $this->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
92 |
+
<?php endif; ?>
|
93 |
+
|
94 |
+
|
95 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
96 |
+
<br />
|
97 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
98 |
+
<small>
|
99 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
100 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
101 |
+
<?php endforeach; ?>
|
102 |
+
</small>
|
103 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
104 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
105 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
106 |
+
<?php endforeach; ?>
|
107 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
108 |
+
<small>
|
109 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
110 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
111 |
+
<?php endforeach; ?>
|
112 |
+
</small>
|
113 |
+
<?php endif; ?>
|
114 |
+
|
115 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
116 |
+
<br />
|
117 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
118 |
+
<?php
|
119 |
+
echo $this->displayPrices(
|
120 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
121 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
122 |
+
);
|
123 |
+
?>
|
124 |
+
</span>
|
125 |
+
<?php endif; ?>
|
126 |
+
<?php endif; ?>
|
127 |
+
</span>
|
128 |
+
<br />
|
129 |
+
<?php endif; ?>
|
130 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
131 |
+
<span class="price-incl-tax">
|
132 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
133 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
134 |
+
<?php endif; ?>
|
135 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
136 |
+
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
137 |
+
|
138 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
139 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
140 |
+
<?php else: ?>
|
141 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
142 |
+
<?php endif; ?>
|
143 |
+
|
144 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
145 |
+
<br />
|
146 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
147 |
+
<small>
|
148 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
149 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
150 |
+
<?php endforeach; ?>
|
151 |
+
</small>
|
152 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
153 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
154 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
155 |
+
<?php endforeach; ?>
|
156 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
157 |
+
<small>
|
158 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
159 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
160 |
+
<?php endforeach; ?>
|
161 |
+
</small>
|
162 |
+
<?php endif; ?>
|
163 |
+
|
164 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
165 |
+
<br />
|
166 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
167 |
+
<?php endif; ?>
|
168 |
+
<?php endif; ?>
|
169 |
+
</span>
|
170 |
+
<?php endif; ?>
|
171 |
+
<?php else: ?>
|
172 |
+
|
173 |
+
<?php endif; ?>
|
174 |
+
</td>
|
175 |
+
<td>
|
176 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
177 |
+
<table cellspacing="0" class="qty-table">
|
178 |
+
<tr>
|
179 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
180 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyOrdered()*1 ?></strong></td>
|
181 |
+
</tr>
|
182 |
+
<?php if ((float) $_item->getOrderItem()->getQtyInvoiced()): ?>
|
183 |
+
<tr>
|
184 |
+
<td><?php echo Mage::helper('sales')->__('Invoiced') ?></td>
|
185 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyInvoiced()*1 ?></strong></td>
|
186 |
+
</tr>
|
187 |
+
<?php endif; ?>
|
188 |
+
<?php if ((float) $_item->getOrderItem()->getQtyShipped() && $this->isShipmentSeparately($_item)): ?>
|
189 |
+
<tr>
|
190 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
191 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyShipped()*1 ?></strong></td>
|
192 |
+
</tr>
|
193 |
+
<?php endif; ?>
|
194 |
+
<?php if ((float) $_item->getOrderItem()->getQtyRefunded()): ?>
|
195 |
+
<tr>
|
196 |
+
<td><?php echo Mage::helper('sales')->__('Refunded') ?></td>
|
197 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyRefunded()*1 ?></strong></td>
|
198 |
+
</tr>
|
199 |
+
<?php endif; ?>
|
200 |
+
<?php if ((float) $_item->getOrderItem()->getQtyCanceled()): ?>
|
201 |
+
<tr>
|
202 |
+
<td><?php echo Mage::helper('sales')->__('Canceled') ?></td>
|
203 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyCanceled()*1 ?></strong></td>
|
204 |
+
</tr>
|
205 |
+
<?php endif; ?>
|
206 |
+
</table>
|
207 |
+
<?php elseif ($this->isShipmentSeparately($_item)): ?>
|
208 |
+
<table cellspacing="0" class="qty-table">
|
209 |
+
<tr>
|
210 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
211 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyOrdered()*1 ?></strong></td>
|
212 |
+
</tr>
|
213 |
+
<?php if ((float) $_item->getOrderItem()->getQtyShipped()): ?>
|
214 |
+
<tr>
|
215 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
216 |
+
<td><strong><?php echo $_item->getOrderItem()->getQtyShipped()*1 ?></strong></td>
|
217 |
+
</tr>
|
218 |
+
<?php endif; ?>
|
219 |
+
</table>
|
220 |
+
<?php else: ?>
|
221 |
+
|
222 |
+
<?php endif; ?>
|
223 |
+
</td>
|
224 |
+
<td class="a-center">
|
225 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
226 |
+
<?php if ($this->canEditQty()) : ?>
|
227 |
+
<input type="text" class="input-text qty-input" name="invoice[items][<?php echo $_item->getOrderItemId() ?>]" value="<?php echo $_item->getQty()*1 ?>" />
|
228 |
+
<?php else : ?>
|
229 |
+
<?php echo $_item->getQty()*1 ?>
|
230 |
+
<?php endif; ?>
|
231 |
+
<?php else: ?>
|
232 |
+
|
233 |
+
<?php endif; ?>
|
234 |
+
</td>
|
235 |
+
<td class="a-right">
|
236 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
237 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
238 |
+
<span class="price-excl-tax">
|
239 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
240 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
241 |
+
<?php endif; ?>
|
242 |
+
|
243 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
244 |
+
<?php
|
245 |
+
echo $this->displayPrices(
|
246 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
247 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
248 |
+
);
|
249 |
+
?>
|
250 |
+
<?php else: ?>
|
251 |
+
<?php echo $this->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
252 |
+
<?php endif; ?>
|
253 |
+
|
254 |
+
|
255 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
256 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
257 |
+
<small>
|
258 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
259 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
260 |
+
<?php endforeach; ?>
|
261 |
+
</small>
|
262 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
263 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
264 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
265 |
+
<?php endforeach; ?>
|
266 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
267 |
+
<small>
|
268 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
269 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
270 |
+
<?php endforeach; ?>
|
271 |
+
</small>
|
272 |
+
<?php endif; ?>
|
273 |
+
|
274 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
275 |
+
<br />
|
276 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
277 |
+
<?php
|
278 |
+
echo $this->displayPrices(
|
279 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
280 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
281 |
+
);
|
282 |
+
?>
|
283 |
+
</span>
|
284 |
+
<?php endif; ?>
|
285 |
+
<?php endif; ?>
|
286 |
+
</span>
|
287 |
+
<br />
|
288 |
+
<?php endif; ?>
|
289 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
290 |
+
<span class="price-incl-tax">
|
291 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
292 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
293 |
+
<?php endif; ?>
|
294 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
295 |
+
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
296 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
297 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
298 |
+
<?php else: ?>
|
299 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
300 |
+
<?php endif; ?>
|
301 |
+
|
302 |
+
|
303 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
304 |
+
|
305 |
+
<br />
|
306 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
307 |
+
<small>
|
308 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
309 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
310 |
+
<?php endforeach; ?>
|
311 |
+
</small>
|
312 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
313 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
314 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
315 |
+
<?php endforeach; ?>
|
316 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
317 |
+
<small>
|
318 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
319 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
320 |
+
<?php endforeach; ?>
|
321 |
+
</small>
|
322 |
+
<?php endif; ?>
|
323 |
+
|
324 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
325 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
326 |
+
<?php endif; ?>
|
327 |
+
<?php endif; ?>
|
328 |
+
</span>
|
329 |
+
<?php endif; ?>
|
330 |
+
</span>
|
331 |
+
<?php else: ?>
|
332 |
+
|
333 |
+
<?php endif; ?>
|
334 |
+
</td>
|
335 |
+
<td class="a-right">
|
336 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
337 |
+
<?php echo $this->displayPriceAttribute('tax_amount') ?>
|
338 |
+
<?php else: ?>
|
339 |
+
|
340 |
+
<?php endif; ?>
|
341 |
+
</td>
|
342 |
+
<td class="a-right">
|
343 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
344 |
+
<?php echo $this->displayPriceAttribute('discount_amount') ?>
|
345 |
+
<?php else: ?>
|
346 |
+
|
347 |
+
<?php endif; ?>
|
348 |
+
</td>
|
349 |
+
<td class="a-right last">
|
350 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
351 |
+
<?php echo $this->displayPrices(
|
352 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(),
|
353 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount()
|
354 |
+
) ?>
|
355 |
+
<?php else: ?>
|
356 |
+
|
357 |
+
<?php endif; ?>
|
358 |
+
</td>
|
359 |
+
</tr>
|
360 |
+
<?php endforeach; ?>
|
361 |
+
<?php if($_showlastRow): ?>
|
362 |
+
<tr class="border">
|
363 |
+
<td>
|
364 |
+
<?php if ($this->getOrderOptions($_item->getOrderItem())): ?>
|
365 |
+
<dl class="item-options">
|
366 |
+
<?php foreach ($this->getOrderOptions($_item->getOrderItem()) as $option): ?>
|
367 |
+
<dt><?php echo $option['label'] ?></dt>
|
368 |
+
<dd>
|
369 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
370 |
+
<?php echo $option['value'];?>
|
371 |
+
<?php else: ?>
|
372 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
373 |
+
<?php if ($_remainder):?>
|
374 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
375 |
+
<script type="text/javascript">
|
376 |
+
$('<?php echo $_id ?>').hide();
|
377 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
378 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
379 |
+
</script>
|
380 |
+
<?php endif;?>
|
381 |
+
<?php endif;?>
|
382 |
+
</dd>
|
383 |
+
<?php endforeach; ?>
|
384 |
+
</dl>
|
385 |
+
<?php else: ?>
|
386 |
+
|
387 |
+
<?php endif; ?>
|
388 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
389 |
+
</td>
|
390 |
+
<td> </td>
|
391 |
+
<td> </td>
|
392 |
+
<td> </td>
|
393 |
+
<td> </td>
|
394 |
+
<td> </td>
|
395 |
+
<td> </td>
|
396 |
+
<td class="last"> </td>
|
397 |
+
</tr>
|
398 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml
ADDED
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = $this->getChilds($_item); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php if ($_item->getOrderItem()->getParentItem()): ?>
|
49 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td> </td>
|
55 |
+
<td> </td>
|
56 |
+
<td> </td>
|
57 |
+
<td> </td>
|
58 |
+
<td class="last"> </td>
|
59 |
+
</tr>
|
60 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
61 |
+
<?php endif; ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
64 |
+
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
65 |
+
<td><h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
66 |
+
<div>
|
67 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
68 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
69 |
+
</div>
|
70 |
+
<?php else: ?>
|
71 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
72 |
+
<?php endif; ?>
|
73 |
+
<td class="a-right">
|
74 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
75 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
76 |
+
<span class="price-excl-tax">
|
77 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
78 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
79 |
+
<?php endif; ?>
|
80 |
+
|
81 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
82 |
+
<?php
|
83 |
+
echo $this->displayPrices(
|
84 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
85 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
86 |
+
);
|
87 |
+
?>
|
88 |
+
<?php else: ?>
|
89 |
+
<?php echo $this->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
90 |
+
<?php endif; ?>
|
91 |
+
|
92 |
+
|
93 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
94 |
+
<br />
|
95 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
96 |
+
<small>
|
97 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
98 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
99 |
+
<?php endforeach; ?>
|
100 |
+
</small>
|
101 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
102 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
104 |
+
<?php endforeach; ?>
|
105 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
106 |
+
<small>
|
107 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
108 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
109 |
+
<?php endforeach; ?>
|
110 |
+
</small>
|
111 |
+
<?php endif; ?>
|
112 |
+
|
113 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
114 |
+
<br />
|
115 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
116 |
+
<?php
|
117 |
+
echo $this->displayPrices(
|
118 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
119 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
120 |
+
);
|
121 |
+
?>
|
122 |
+
</span>
|
123 |
+
<?php endif; ?>
|
124 |
+
<?php endif; ?>
|
125 |
+
</span>
|
126 |
+
<br />
|
127 |
+
<?php endif; ?>
|
128 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
129 |
+
<span class="price-incl-tax">
|
130 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
131 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
134 |
+
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
135 |
+
|
136 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
137 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
138 |
+
<?php else: ?>
|
139 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
140 |
+
<?php endif; ?>
|
141 |
+
|
142 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
143 |
+
<br />
|
144 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
145 |
+
<small>
|
146 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
147 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
148 |
+
<?php endforeach; ?>
|
149 |
+
</small>
|
150 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
151 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
152 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
153 |
+
<?php endforeach; ?>
|
154 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
155 |
+
<small>
|
156 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
157 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
158 |
+
<?php endforeach; ?>
|
159 |
+
</small>
|
160 |
+
<?php endif; ?>
|
161 |
+
|
162 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
163 |
+
<br />
|
164 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
165 |
+
<?php endif; ?>
|
166 |
+
<?php endif; ?>
|
167 |
+
</span>
|
168 |
+
<?php endif; ?>
|
169 |
+
<?php else: ?>
|
170 |
+
|
171 |
+
<?php endif; ?>
|
172 |
+
</td>
|
173 |
+
<td class="a-center">
|
174 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
175 |
+
<?php echo $_item->getQty()*1 ?>
|
176 |
+
<?php else: ?>
|
177 |
+
|
178 |
+
<?php endif; ?>
|
179 |
+
</td>
|
180 |
+
<td class="a-right">
|
181 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
182 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
183 |
+
<span class="price-excl-tax">
|
184 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
185 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
186 |
+
<?php endif; ?>
|
187 |
+
|
188 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
189 |
+
<?php
|
190 |
+
echo $this->displayPrices(
|
191 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
192 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
193 |
+
);
|
194 |
+
?>
|
195 |
+
<?php else: ?>
|
196 |
+
<?php echo $this->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
197 |
+
<?php endif; ?>
|
198 |
+
|
199 |
+
|
200 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
201 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
202 |
+
<small>
|
203 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
204 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
205 |
+
<?php endforeach; ?>
|
206 |
+
</small>
|
207 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
208 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
209 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
210 |
+
<?php endforeach; ?>
|
211 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
212 |
+
<small>
|
213 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
214 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
215 |
+
<?php endforeach; ?>
|
216 |
+
</small>
|
217 |
+
<?php endif; ?>
|
218 |
+
|
219 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
220 |
+
<br />
|
221 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
222 |
+
<?php
|
223 |
+
echo $this->displayPrices(
|
224 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
225 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
226 |
+
);
|
227 |
+
?>
|
228 |
+
</span>
|
229 |
+
<?php endif; ?>
|
230 |
+
<?php endif; ?>
|
231 |
+
</span>
|
232 |
+
<br />
|
233 |
+
<?php endif; ?>
|
234 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
235 |
+
<span class="price-incl-tax">
|
236 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
237 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
238 |
+
<?php endif; ?>
|
239 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
240 |
+
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
241 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
242 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
243 |
+
<?php else: ?>
|
244 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
245 |
+
<?php endif; ?>
|
246 |
+
|
247 |
+
|
248 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
249 |
+
|
250 |
+
<br />
|
251 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
252 |
+
<small>
|
253 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
254 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
255 |
+
<?php endforeach; ?>
|
256 |
+
</small>
|
257 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
258 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
259 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
260 |
+
<?php endforeach; ?>
|
261 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
262 |
+
<small>
|
263 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
264 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
265 |
+
<?php endforeach; ?>
|
266 |
+
</small>
|
267 |
+
<?php endif; ?>
|
268 |
+
|
269 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
270 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
271 |
+
<?php endif; ?>
|
272 |
+
<?php endif; ?>
|
273 |
+
</span>
|
274 |
+
<?php endif; ?>
|
275 |
+
</span>
|
276 |
+
<?php else: ?>
|
277 |
+
|
278 |
+
<?php endif; ?>
|
279 |
+
</td>
|
280 |
+
<td class="a-right">
|
281 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
282 |
+
<?php echo $this->displayPriceAttribute('tax_amount') ?>
|
283 |
+
<?php else: ?>
|
284 |
+
|
285 |
+
<?php endif; ?>
|
286 |
+
</td>
|
287 |
+
<td class="a-right">
|
288 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
289 |
+
<?php echo $this->displayPriceAttribute('discount_amount') ?>
|
290 |
+
<?php else: ?>
|
291 |
+
|
292 |
+
<?php endif; ?>
|
293 |
+
</td>
|
294 |
+
<td class="a-right last">
|
295 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
296 |
+
<?php echo $this->displayPrices(
|
297 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getBaseWeeeTaxAppliedRowAmount(),
|
298 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount()
|
299 |
+
) ?>
|
300 |
+
<?php else: ?>
|
301 |
+
|
302 |
+
<?php endif; ?>
|
303 |
+
</td>
|
304 |
+
</tr>
|
305 |
+
<?php endforeach; ?>
|
306 |
+
<?php if($_showlastRow): ?>
|
307 |
+
<tr class="border">
|
308 |
+
<td>
|
309 |
+
<?php if ($this->getOrderOptions()): ?>
|
310 |
+
<dl class="item-options">
|
311 |
+
<?php foreach ($this->getOrderOptions() as $option): ?>
|
312 |
+
<dt><?php echo $option['label'] ?></dt>
|
313 |
+
<dd>
|
314 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
315 |
+
<?php echo $option['value'];?>
|
316 |
+
<?php else: ?>
|
317 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
318 |
+
<?php if ($_remainder):?>
|
319 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
320 |
+
<script type="text/javascript">
|
321 |
+
$('<?php echo $_id ?>').hide();
|
322 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
323 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
324 |
+
</script>
|
325 |
+
<?php endif;?>
|
326 |
+
<?php endif;?>
|
327 |
+
</dd>
|
328 |
+
<?php endforeach; ?>
|
329 |
+
</dl>
|
330 |
+
<?php endif; ?>
|
331 |
+
<?php echo $this->htmlEscape($this->getItem()->getDescription()) ?>
|
332 |
+
</td>
|
333 |
+
<td> </td>
|
334 |
+
<td> </td>
|
335 |
+
<td> </td>
|
336 |
+
<td> </td>
|
337 |
+
<td> </td>
|
338 |
+
<td class="last"> </td>
|
339 |
+
</tr>
|
340 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml
ADDED
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_View_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = array_merge(array($_item), $_item->getChildrenItems()); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription() || $this->canDisplayGiftmessage()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
49 |
+
<?php if ($_item->getParentItem()): ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td> </td>
|
55 |
+
<td> </td>
|
56 |
+
<td> </td>
|
57 |
+
<td> </td>
|
58 |
+
<td> </td>
|
59 |
+
<td> </td>
|
60 |
+
<td> </td>
|
61 |
+
<td class="last"> </td>
|
62 |
+
</tr>
|
63 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php endif; ?>
|
66 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
67 |
+
<?php if (!$_item->getParentItem()): ?>
|
68 |
+
<td>
|
69 |
+
<h5 class="title">
|
70 |
+
<span id="order_item_<?php echo $_item->getId() ?>_title"><?php echo $this->htmlEscape($_item->getName()) ?></span>
|
71 |
+
</h5>
|
72 |
+
<div>
|
73 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
74 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
75 |
+
</div>
|
76 |
+
</td>
|
77 |
+
<?php else: ?>
|
78 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
79 |
+
<?php endif; ?>
|
80 |
+
<td class="a-center">
|
81 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
82 |
+
<?php echo $_item->getStatus() ?>
|
83 |
+
<?php else: ?>
|
84 |
+
|
85 |
+
<?php endif; ?>
|
86 |
+
</td>
|
87 |
+
<td class="a-right">
|
88 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
89 |
+
<?php echo $this->displayPriceAttribute('original_price') ?>
|
90 |
+
<?php else: ?>
|
91 |
+
|
92 |
+
<?php endif; ?>
|
93 |
+
</td>
|
94 |
+
<td class="a-right">
|
95 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
96 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
97 |
+
<span class="price-excl-tax">
|
98 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
99 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
100 |
+
<?php endif; ?>
|
101 |
+
|
102 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
103 |
+
<?php
|
104 |
+
echo $this->displayPrices(
|
105 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
106 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
107 |
+
);
|
108 |
+
?>
|
109 |
+
<?php else: ?>
|
110 |
+
<?php echo $this->displayPrices($_item->getBasePrice(), $_item->getPrice()) ?>
|
111 |
+
<?php endif; ?>
|
112 |
+
|
113 |
+
|
114 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
115 |
+
<br />
|
116 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
117 |
+
<small>
|
118 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
119 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
120 |
+
<?php endforeach; ?>
|
121 |
+
</small>
|
122 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
123 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
124 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
125 |
+
<?php endforeach; ?>
|
126 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
127 |
+
<small>
|
128 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
129 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
130 |
+
<?php endforeach; ?>
|
131 |
+
</small>
|
132 |
+
<?php endif; ?>
|
133 |
+
|
134 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
135 |
+
<br />
|
136 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
137 |
+
<?php
|
138 |
+
echo $this->displayPrices(
|
139 |
+
$_item->getBasePrice()+$_item->getBaseWeeeTaxAppliedAmount()+$_item->getBaseWeeeTaxDisposition(),
|
140 |
+
$_item->getPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()
|
141 |
+
);
|
142 |
+
?>
|
143 |
+
</span>
|
144 |
+
<?php endif; ?>
|
145 |
+
<?php endif; ?>
|
146 |
+
</span>
|
147 |
+
<br />
|
148 |
+
<?php endif; ?>
|
149 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
150 |
+
<span class="price-incl-tax">
|
151 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
152 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
153 |
+
<?php endif; ?>
|
154 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
155 |
+
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
156 |
+
|
157 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
158 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
159 |
+
<?php else: ?>
|
160 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
161 |
+
<?php endif; ?>
|
162 |
+
|
163 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
164 |
+
<br />
|
165 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
166 |
+
<small>
|
167 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
168 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
169 |
+
<?php endforeach; ?>
|
170 |
+
</small>
|
171 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
172 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
173 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></small></span>
|
174 |
+
<?php endforeach; ?>
|
175 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
176 |
+
<small>
|
177 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
178 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
179 |
+
<?php endforeach; ?>
|
180 |
+
</small>
|
181 |
+
<?php endif; ?>
|
182 |
+
|
183 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
184 |
+
<br />
|
185 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedAmount(), $_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
186 |
+
<?php endif; ?>
|
187 |
+
<?php endif; ?>
|
188 |
+
</span>
|
189 |
+
<?php endif; ?>
|
190 |
+
<?php else: ?>
|
191 |
+
|
192 |
+
<?php endif; ?>
|
193 |
+
</td>
|
194 |
+
<td>
|
195 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
196 |
+
<table cellspacing="0" class="qty-table">
|
197 |
+
<tr>
|
198 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
199 |
+
<td><strong><?php echo $_item->getQtyOrdered()*1 ?></strong></td>
|
200 |
+
</tr>
|
201 |
+
<?php if ((float) $_item->getQtyInvoiced()): ?>
|
202 |
+
<tr>
|
203 |
+
<td><?php echo Mage::helper('sales')->__('Invoiced') ?></td>
|
204 |
+
<td><strong><?php echo $_item->getQtyInvoiced()*1 ?></strong></td>
|
205 |
+
</tr>
|
206 |
+
<?php endif; ?>
|
207 |
+
<?php if ((float) $_item->getQtyShipped() && $this->isShipmentSeparately($_item)): ?>
|
208 |
+
<tr>
|
209 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
210 |
+
<td><strong><?php echo $_item->getQtyShipped()*1 ?></strong></td>
|
211 |
+
</tr>
|
212 |
+
<?php endif; ?>
|
213 |
+
<?php if ((float) $_item->getQtyRefunded()): ?>
|
214 |
+
<tr>
|
215 |
+
<td><?php echo Mage::helper('sales')->__('Refunded') ?></td>
|
216 |
+
<td><strong><?php echo $_item->getQtyRefunded()*1 ?></strong></td>
|
217 |
+
</tr>
|
218 |
+
<?php endif; ?>
|
219 |
+
<?php if ((float) $_item->getQtyCanceled()): ?>
|
220 |
+
<tr>
|
221 |
+
<td><?php echo Mage::helper('sales')->__('Canceled') ?></td>
|
222 |
+
<td><strong><?php echo $_item->getQtyCanceled()*1 ?></strong></td>
|
223 |
+
</tr>
|
224 |
+
<?php endif; ?>
|
225 |
+
</table>
|
226 |
+
<?php elseif ($this->isShipmentSeparately($_item)): ?>
|
227 |
+
<table cellspacing="0" class="qty-table">
|
228 |
+
<tr>
|
229 |
+
<td><?php echo Mage::helper('sales')->__('Ordered') ?></td>
|
230 |
+
<td><strong><?php echo $_item->getQtyOrdered()*1 ?></strong></td>
|
231 |
+
</tr>
|
232 |
+
<?php if ((float) $_item->getQtyShipped()): ?>
|
233 |
+
<tr>
|
234 |
+
<td><?php echo Mage::helper('sales')->__('Shipped') ?></td>
|
235 |
+
<td><strong><?php echo $_item->getQtyShipped()*1 ?></strong></td>
|
236 |
+
</tr>
|
237 |
+
<?php endif; ?>
|
238 |
+
</table>
|
239 |
+
<?php else: ?>
|
240 |
+
|
241 |
+
<?php endif; ?>
|
242 |
+
</td>
|
243 |
+
<td class="a-right">
|
244 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
245 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
246 |
+
<span class="price-excl-tax">
|
247 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
248 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
249 |
+
<?php endif; ?>
|
250 |
+
|
251 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
252 |
+
<?php
|
253 |
+
echo $this->displayPrices(
|
254 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
255 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
256 |
+
);
|
257 |
+
?>
|
258 |
+
<?php else: ?>
|
259 |
+
<?php echo $this->displayPrices($_item->getBaseRowTotal(), $_item->getRowTotal()) ?>
|
260 |
+
<?php endif; ?>
|
261 |
+
|
262 |
+
|
263 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
264 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
265 |
+
<small>
|
266 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
267 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
268 |
+
<?php endforeach; ?>
|
269 |
+
</small>
|
270 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
271 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
272 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
273 |
+
<?php endforeach; ?>
|
274 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
275 |
+
<small>
|
276 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
277 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
278 |
+
<?php endforeach; ?>
|
279 |
+
</small>
|
280 |
+
<?php endif; ?>
|
281 |
+
|
282 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
283 |
+
<br />
|
284 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br />
|
285 |
+
<?php
|
286 |
+
echo $this->displayPrices(
|
287 |
+
$_item->getBaseRowTotal()+$_item->getBaseWeeeTaxAppliedRowAmount()+$_item->getBaseWeeeTaxRowDisposition(),
|
288 |
+
$_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()
|
289 |
+
);
|
290 |
+
?>
|
291 |
+
</span>
|
292 |
+
<?php endif; ?>
|
293 |
+
<?php endif; ?>
|
294 |
+
</span>
|
295 |
+
<br />
|
296 |
+
<?php endif; ?>
|
297 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?>
|
298 |
+
<span class="price-incl-tax">
|
299 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices()): ?>
|
300 |
+
<span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
301 |
+
<?php endif; ?>
|
302 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
303 |
+
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
304 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
305 |
+
<?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
306 |
+
<?php else: ?>
|
307 |
+
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
308 |
+
<?php endif; ?>
|
309 |
+
|
310 |
+
|
311 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
312 |
+
|
313 |
+
<br />
|
314 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
315 |
+
<small>
|
316 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
317 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
318 |
+
<?php endforeach; ?>
|
319 |
+
</small>
|
320 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
321 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
322 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></small></span>
|
323 |
+
<?php endforeach; ?>
|
324 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
325 |
+
<small>
|
326 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
327 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
328 |
+
<?php endforeach; ?>
|
329 |
+
</small>
|
330 |
+
<?php endif; ?>
|
331 |
+
|
332 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
333 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
334 |
+
<?php endif; ?>
|
335 |
+
<?php endif; ?>
|
336 |
+
</span>
|
337 |
+
<?php endif; ?>
|
338 |
+
<?php else: ?>
|
339 |
+
|
340 |
+
<?php endif; ?>
|
341 |
+
</td>
|
342 |
+
<td class="a-right">
|
343 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
344 |
+
<?php echo $this->displayPriceAttribute('tax_amount') ?>
|
345 |
+
<?php else: ?>
|
346 |
+
|
347 |
+
<?php endif; ?>
|
348 |
+
</td>
|
349 |
+
|
350 |
+
<td class="a-right">
|
351 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
352 |
+
<?php echo $this->displayTaxPercent($_item) ?>
|
353 |
+
<?php else: ?>
|
354 |
+
|
355 |
+
<?php endif; ?>
|
356 |
+
</td>
|
357 |
+
<td class="a-right">
|
358 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
359 |
+
<?php echo $this->displayPriceAttribute('discount_amount') ?>
|
360 |
+
<?php else: ?>
|
361 |
+
|
362 |
+
<?php endif; ?>
|
363 |
+
</td>
|
364 |
+
<td class="a-right last">
|
365 |
+
<?php if ($this->canShowPriceInfo($_item)): ?>
|
366 |
+
<?php echo $this->displayPrices(
|
367 |
+
max(0, $_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount()),
|
368 |
+
max(0, $_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount())
|
369 |
+
); ?>
|
370 |
+
<?php else: ?>
|
371 |
+
|
372 |
+
<?php endif; ?>
|
373 |
+
</td>
|
374 |
+
</tr>
|
375 |
+
<?php endforeach; ?>
|
376 |
+
<?php if($_showlastRow): ?>
|
377 |
+
<tr<?php if (!$this->canDisplayGiftmessage()) echo ' class="border"' ?>>
|
378 |
+
<td>
|
379 |
+
<?php if ($this->getOrderOptions()): ?>
|
380 |
+
<dl class="item-options">
|
381 |
+
<?php foreach ($this->getOrderOptions() as $option): ?>
|
382 |
+
<dt><?php echo $option['label'] ?>:</dt>
|
383 |
+
<dd>
|
384 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
385 |
+
<?php echo $option['value'];?>
|
386 |
+
<?php else: ?>
|
387 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
388 |
+
<?php if ($_remainder):?>
|
389 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
390 |
+
<script type="text/javascript">
|
391 |
+
$('<?php echo $_id ?>').hide();
|
392 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
393 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
394 |
+
</script>
|
395 |
+
<?php endif;?>
|
396 |
+
<?php endif;?>
|
397 |
+
</dd>
|
398 |
+
<?php endforeach; ?>
|
399 |
+
</dl>
|
400 |
+
<?php else: ?>
|
401 |
+
|
402 |
+
<?php endif; ?>
|
403 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
404 |
+
</td>
|
405 |
+
<td> </td>
|
406 |
+
<td> </td>
|
407 |
+
<td> </td>
|
408 |
+
<td> </td>
|
409 |
+
<td> </td>
|
410 |
+
<td> </td>
|
411 |
+
<td> </td>
|
412 |
+
<td> </td>
|
413 |
+
<td class="last"> </td>
|
414 |
+
</tr>
|
415 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = $this->getChilds($_item); ?>
|
35 |
+
<?php $_count = count ($items) ?>
|
36 |
+
<?php $_index = 0 ?>
|
37 |
+
|
38 |
+
<?php $_prevOptionId = '' ?>
|
39 |
+
|
40 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
41 |
+
<?php $_showlastRow = true ?>
|
42 |
+
<?php else: ?>
|
43 |
+
<?php $_showlastRow = false ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
<?php foreach ($items as $_item): ?>
|
47 |
+
<?php $this->setPriceDataObject($_item) ?>
|
48 |
+
<?php if ($_item->getOrderItem()->getParentItem()): ?>
|
49 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
50 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
51 |
+
<tr>
|
52 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
53 |
+
<td> </td>
|
54 |
+
<td class="last"> </td>
|
55 |
+
</tr>
|
56 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
57 |
+
<?php endif; ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
<tr class="<?php echo (++$_index==$_count && !$_showlastRow)?'border':'' ?>">
|
60 |
+
<?php if (!$_item->getOrderItem()->getParentItem()): ?>
|
61 |
+
<td><h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
62 |
+
<div>
|
63 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
64 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
65 |
+
</div>
|
66 |
+
</td>
|
67 |
+
<?php else: ?>
|
68 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
69 |
+
<?php endif; ?>
|
70 |
+
<td>
|
71 |
+
<?php if ($this->isShipmentSeparately($_item)): ?>
|
72 |
+
<?php echo $this->getColumnHtml($_item, 'qty') ?>
|
73 |
+
<?php else: ?>
|
74 |
+
|
75 |
+
<?php endif; ?>
|
76 |
+
</td>
|
77 |
+
<td class="last">
|
78 |
+
<?php if ($this->isShipmentSeparately($_item)): ?>
|
79 |
+
<input type="text" class="input-text" name="shipment[items][<?php echo $_item->getOrderItemId() ?>]" value="<?php echo $_item->getQty()*1 ?>" />
|
80 |
+
<?php else: ?>
|
81 |
+
|
82 |
+
<?php endif; ?>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
<?php if($_showlastRow): ?>
|
87 |
+
<tr class="border">
|
88 |
+
<td>
|
89 |
+
<?php if ($this->getOrderOptions($_item->getOrderItem())): ?>
|
90 |
+
<dl class="item-options">
|
91 |
+
<?php foreach ($this->getOrderOptions($_item->getOrderItem()) as $option): ?>
|
92 |
+
<dt><?php echo $option['label'] ?></dt>
|
93 |
+
<dd>
|
94 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
95 |
+
<?php echo $option['value'];?>
|
96 |
+
<?php else: ?>
|
97 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
98 |
+
<?php if ($_remainder):?>
|
99 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
100 |
+
<script type="text/javascript">
|
101 |
+
$('<?php echo $_id ?>').hide();
|
102 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
103 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
104 |
+
</script>
|
105 |
+
<?php endif;?>
|
106 |
+
<?php endif;?>
|
107 |
+
</dd>
|
108 |
+
<?php endforeach; ?>
|
109 |
+
</dl>
|
110 |
+
<?php else: ?>
|
111 |
+
|
112 |
+
<?php endif; ?>
|
113 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
114 |
+
</td>
|
115 |
+
<td> </td>
|
116 |
+
<td class="last"> </td>
|
117 |
+
</tr>
|
118 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Bundle_Block_Adminhtml_Sales_Order_Items_Renderer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_item = $this->getItem() ?>
|
34 |
+
<?php $items = array_merge(array($_item->getOrderItem()), $_item->getOrderItem()->getChildrenItems()) ?>
|
35 |
+
<?php $shipItems = $this->getChilds($_item) ?>
|
36 |
+
<?php $_count = count ($items) ?>
|
37 |
+
<?php $_index = 0 ?>
|
38 |
+
|
39 |
+
<?php $_prevOptionId = '' ?>
|
40 |
+
|
41 |
+
<?php if($this->getOrderOptions() || $_item->getDescription()): ?>
|
42 |
+
<?php $_showlastRow = true ?>
|
43 |
+
<?php else: ?>
|
44 |
+
<?php $_showlastRow = false ?>
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
<?php foreach ($items as $_item): ?>
|
48 |
+
<?php $this->setPriceDataObject($_item) ?>
|
49 |
+
<?php if ($_item->getParentItem()): ?>
|
50 |
+
<?php $attributes = $this->getSelectionAttributes($_item) ?>
|
51 |
+
<?php if ($_prevOptionId != $attributes['option_id']): ?>
|
52 |
+
<tr>
|
53 |
+
<td><div class="option-label"><?php echo $attributes['option_label'] ?></div></td>
|
54 |
+
<td class="last"> </td>
|
55 |
+
</tr>
|
56 |
+
<?php $_prevOptionId = $attributes['option_id'] ?>
|
57 |
+
<?php endif; ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
<tr<?php echo (++$_index==$_count && !$_showlastRow)?' class="border"':'' ?>>
|
60 |
+
<?php if (!$_item->getParentItem()): ?>
|
61 |
+
<td>
|
62 |
+
<h5 class="title"><?php echo $this->htmlEscape($_item->getName()) ?></h5>
|
63 |
+
<div>
|
64 |
+
<strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong>
|
65 |
+
<?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
|
66 |
+
</div>
|
67 |
+
</td>
|
68 |
+
<?php else: ?>
|
69 |
+
<td><div class="option-value"><?php echo $this->getValueHtml($_item)?></div></td>
|
70 |
+
<?php endif; ?>
|
71 |
+
<td class="a-center last">
|
72 |
+
<?php if (($this->isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?>
|
73 |
+
<?php if (isset($shipItems[$_item->getId()])): ?>
|
74 |
+
<?php echo $shipItems[$_item->getId()]->getQty()*1 ?>
|
75 |
+
<?php elseif ($_item->getIsVirtual()): ?>
|
76 |
+
<?php echo $this->__('N/A') ?>
|
77 |
+
<?php else: ?>
|
78 |
+
0
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php else: ?>
|
81 |
+
|
82 |
+
<?php endif; ?>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
<?php if($_showlastRow): ?>
|
87 |
+
<tr class="border">
|
88 |
+
<td>
|
89 |
+
<?php if ($this->getOrderOptions($_item->getOrderItem())): ?>
|
90 |
+
<dl class="item-options">
|
91 |
+
<?php foreach ($this->getOrderOptions($_item->getOrderItem()) as $option): ?>
|
92 |
+
<dt><?php echo $option['label'] ?></dt>
|
93 |
+
<dd>
|
94 |
+
<?php if (isset($option['custom_view']) && $option['custom_view']): ?>
|
95 |
+
<?php echo $option['value'];?>
|
96 |
+
<?php else: ?>
|
97 |
+
<?php echo Mage::helper('core/string')->truncate($option['value'], 55, '', $_remainder);?>
|
98 |
+
<?php if ($_remainder):?>
|
99 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
100 |
+
<script type="text/javascript">
|
101 |
+
$('<?php echo $_id ?>').hide();
|
102 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
103 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
104 |
+
</script>
|
105 |
+
<?php endif;?>
|
106 |
+
<?php endif;?>
|
107 |
+
</dd>
|
108 |
+
<?php endforeach; ?>
|
109 |
+
</dl>
|
110 |
+
<?php endif; ?>
|
111 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
112 |
+
</td>
|
113 |
+
<td class="last"> </td>
|
114 |
+
</tr>
|
115 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/captcha/zend.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $captcha = $this->getCaptchaModel() ?>
|
28 |
+
<?php /* @var $this Mage_Core_Block_Captcha_Zend */ ?>
|
29 |
+
<div class="clear"></div>
|
30 |
+
<div class="captcha">
|
31 |
+
<div class="captcha-input input-box input-left">
|
32 |
+
<label for="captcha"><?php echo $this->__('Please type the letters from the image:') ?></label><br />
|
33 |
+
<input type="text" name="<?php echo Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE ?>[<?php echo $this->getFormId()?>]" id="captcha" class="required-entry input-text validation-failed"/>
|
34 |
+
</div>
|
35 |
+
<div class="captcha-image input-right">
|
36 |
+
<img id="captcha-reload" class="captcha-reload" src="<?php echo $this->getSkinUrl('images/reload.png') ?>" alt="<?php echo $this->__('Reload captcha') ?>"/>
|
37 |
+
<img id="<?php echo $this->getFormId() ?>" width="<?php echo $this->getImgWidth() ?>" height="<?php echo $this->getImgHeight() ?>" src="<?php echo $captcha->getImgSrc() ?>" />
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
<?php if ($captcha->isCaseSensitive()) :?>
|
41 |
+
<div class="captcha-note">
|
42 |
+
<p><?php echo $this->__('<strong>Attention</strong>: Captcha is case sensitive.') ?></p>
|
43 |
+
</div>
|
44 |
+
<?php endif; ?>
|
45 |
+
<script type="text/javascript">
|
46 |
+
//<![CDATA[
|
47 |
+
document.observe('dom:loaded', function () {
|
48 |
+
var captcha = new Captcha('<?php echo $this->getRefreshUrl() ?>', '<?php echo $this->getFormId() ?>');
|
49 |
+
|
50 |
+
$('captcha-reload').observe('click', function () {
|
51 |
+
captcha.refresh(this);
|
52 |
+
});
|
53 |
+
|
54 |
+
});
|
55 |
+
//]]>
|
56 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/category/checkboxes/tree.phtml
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php $_divId = 'tree-div_' . time() ?>
|
29 |
+
<div id="<?php echo $_divId ?>" class="tree"></div>
|
30 |
+
|
31 |
+
<script type="text/javascript">
|
32 |
+
//<![CDATA[
|
33 |
+
|
34 |
+
// TODO: cleanup this script. It was copypasted from catalog/category/tree
|
35 |
+
|
36 |
+
var tree;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Fix ext compatibility with prototype 1.6
|
40 |
+
*/
|
41 |
+
Ext.lib.Event.getTarget = function(e) {
|
42 |
+
var ee = e.browserEvent || e;
|
43 |
+
return ee.target ? Event.element(ee) : null;
|
44 |
+
};
|
45 |
+
|
46 |
+
Ext.tree.TreePanel.Enhanced = function(el, config)
|
47 |
+
{
|
48 |
+
Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, config);
|
49 |
+
};
|
50 |
+
|
51 |
+
Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
|
52 |
+
|
53 |
+
loadTree : function(config, firstLoad)
|
54 |
+
{
|
55 |
+
var parameters = config['parameters'];
|
56 |
+
var data = config['data'];
|
57 |
+
|
58 |
+
if ((typeof parameters['root_visible']) != 'undefined') {
|
59 |
+
this.rootVisible = parameters['root_visible']*1;
|
60 |
+
}
|
61 |
+
|
62 |
+
var root = new Ext.tree.TreeNode(parameters);
|
63 |
+
|
64 |
+
this.nodeHash = {};
|
65 |
+
this.setRootNode(root);
|
66 |
+
|
67 |
+
if (firstLoad) {
|
68 |
+
this.addListener('click', this.categoryClick.createDelegate(this));
|
69 |
+
}
|
70 |
+
|
71 |
+
this.loader.buildCategoryTree(root, data);
|
72 |
+
this.el.dom.innerHTML = '';
|
73 |
+
// render the tree
|
74 |
+
this.render();
|
75 |
+
},
|
76 |
+
|
77 |
+
categoryClick : function(node, e)
|
78 |
+
{
|
79 |
+
node.getUI().check(!node.getUI().checked());
|
80 |
+
}
|
81 |
+
});
|
82 |
+
|
83 |
+
Ext.onReady(function()
|
84 |
+
{
|
85 |
+
var categoryLoader = new Ext.tree.TreeLoader({
|
86 |
+
dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
|
87 |
+
});
|
88 |
+
|
89 |
+
categoryLoader.createNode = function(config) {
|
90 |
+
config.uiProvider = Ext.tree.CheckboxNodeUI;
|
91 |
+
var node;
|
92 |
+
var _node = Object.clone(config);
|
93 |
+
if (config.children && !config.children.length) {
|
94 |
+
delete(config.children);
|
95 |
+
node = new Ext.tree.AsyncTreeNode(config);
|
96 |
+
} else {
|
97 |
+
node = new Ext.tree.TreeNode(config);
|
98 |
+
}
|
99 |
+
|
100 |
+
return node;
|
101 |
+
};
|
102 |
+
|
103 |
+
categoryLoader.buildCategoryTree = function(parent, config)
|
104 |
+
{
|
105 |
+
if (!config) return null;
|
106 |
+
|
107 |
+
if (parent && config && config.length){
|
108 |
+
for (var i = 0; i < config.length; i++) {
|
109 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
110 |
+
var node;
|
111 |
+
var _node = Object.clone(config[i]);
|
112 |
+
if (_node.children && !_node.children.length) {
|
113 |
+
delete(_node.children);
|
114 |
+
node = new Ext.tree.AsyncTreeNode(_node);
|
115 |
+
} else {
|
116 |
+
node = new Ext.tree.TreeNode(config[i]);
|
117 |
+
}
|
118 |
+
parent.appendChild(node);
|
119 |
+
node.loader = node.getOwnerTree().loader;
|
120 |
+
if (_node.children) {
|
121 |
+
this.buildCategoryTree(node, _node.children);
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
125 |
+
};
|
126 |
+
|
127 |
+
categoryLoader.buildHash = function(node)
|
128 |
+
{
|
129 |
+
var hash = {};
|
130 |
+
|
131 |
+
hash = this.toArray(node.attributes);
|
132 |
+
|
133 |
+
if (node.childNodes.length>0 || (node.loaded==false && node.loading==false)) {
|
134 |
+
hash['children'] = new Array;
|
135 |
+
|
136 |
+
for (var i = 0, len = node.childNodes.length; i < len; i++) {
|
137 |
+
if (!hash['children']) {
|
138 |
+
hash['children'] = new Array;
|
139 |
+
}
|
140 |
+
hash['children'].push(this.buildHash(node.childNodes[i]));
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
return hash;
|
145 |
+
};
|
146 |
+
|
147 |
+
categoryLoader.toArray = function(attributes) {
|
148 |
+
var data = {};
|
149 |
+
for (var key in attributes) {
|
150 |
+
var value = attributes[key];
|
151 |
+
data[key] = value;
|
152 |
+
}
|
153 |
+
|
154 |
+
return data;
|
155 |
+
};
|
156 |
+
|
157 |
+
categoryLoader.on("beforeload", function(treeLoader, node) {
|
158 |
+
treeLoader.baseParams.id = node.attributes.id;
|
159 |
+
});
|
160 |
+
|
161 |
+
categoryLoader.on("load", function(treeLoader, node, config) {
|
162 |
+
varienWindowOnload();
|
163 |
+
});
|
164 |
+
|
165 |
+
tree = new Ext.tree.TreePanel.Enhanced('<?php echo $_divId ?>', {
|
166 |
+
animate: false,
|
167 |
+
loader: categoryLoader,
|
168 |
+
enableDD: false,
|
169 |
+
containerScroll: true,
|
170 |
+
selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
|
171 |
+
rootVisible: '<?php echo $this->getRoot()->getIsVisible() ?>',
|
172 |
+
useAjax: <?php echo $this->getUseAjax() ?>,
|
173 |
+
currentNodeId: <?php echo (int) $this->getCategoryId() ?>,
|
174 |
+
addNodeTo: false,
|
175 |
+
rootUIProvider: Ext.tree.CheckboxNodeUI
|
176 |
+
});
|
177 |
+
|
178 |
+
tree.on('check', function(node, checked) {
|
179 |
+
<?php echo $this->getJsFormObject() ?>.updateElement.value = this.getChecked().join(', ');
|
180 |
+
varienElementMethods.setHasChanges(node.getUI().checkbox);
|
181 |
+
}, tree);
|
182 |
+
|
183 |
+
// set the root node
|
184 |
+
var parameters = {
|
185 |
+
text: '<?php echo htmlentities($this->getRoot()->getName()) ?>',
|
186 |
+
draggable: false,
|
187 |
+
checked:'<?php echo $this->getRoot()->getChecked() ?>',
|
188 |
+
uiProvider: Ext.tree.CheckboxNodeUI,
|
189 |
+
allowDrop: <?php if ($this->getRoot()->getIsVisible()): ?>true<?php else : ?>false<?php endif; ?>,
|
190 |
+
id: <?php echo (int) $this->getRoot()->getId() ?>,
|
191 |
+
expanded: <?php echo (int) $this->getIsWasExpanded() ?>,
|
192 |
+
category_id: <?php echo (int) $this->getCategoryId() ?>
|
193 |
+
};
|
194 |
+
|
195 |
+
tree.loadTree({parameters:parameters, data:<?php echo $this->getTreeJson() ?>},true);
|
196 |
+
|
197 |
+
});
|
198 |
+
//]]>
|
199 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/category/edit.phtml
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for Mage_Adminhtml_Block_Catalog_Category_Cointainer
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<div id="category-edit-container" class="category-content">
|
34 |
+
<?php echo $this->getChildHtml('form') ?>
|
35 |
+
</div>
|
36 |
+
<script type="text/javascript">
|
37 |
+
//<![CDATA[
|
38 |
+
|
39 |
+
function categoryReset(url,useAjax){
|
40 |
+
if(useAjax){
|
41 |
+
var params = {active_tab_id:false};
|
42 |
+
updateContent(url, params);
|
43 |
+
}else{
|
44 |
+
location.href = url;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Delete some category
|
50 |
+
* This routine get categoryId explicitly, so even if currently selected tree node is out of sync
|
51 |
+
* with this form, we surely delete same category in the tree and at backend
|
52 |
+
*/
|
53 |
+
function categoryDelete(url, useAjax, categoryId) {
|
54 |
+
if (confirm('<?php echo Mage::helper('catalog')->__('Are you sure you want to delete this category?') ?>')){
|
55 |
+
if (useAjax){
|
56 |
+
tree.nodeForDelete = categoryId;
|
57 |
+
updateContent(url, {}, true);
|
58 |
+
} else {
|
59 |
+
location.href = url;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Update category content area
|
66 |
+
*/
|
67 |
+
function updateContent(url, params, refreshTree) {
|
68 |
+
if (!params) {
|
69 |
+
params = {};
|
70 |
+
}
|
71 |
+
if (!params.form_key) {
|
72 |
+
params.form_key = FORM_KEY;
|
73 |
+
}
|
74 |
+
|
75 |
+
toolbarToggle.stop();
|
76 |
+
|
77 |
+
/*if(params.node_name)
|
78 |
+
{
|
79 |
+
var currentNode = tree.getNodeById(tree.currentNodeId);
|
80 |
+
currentNode.setText(params.node_name);
|
81 |
+
}*/
|
82 |
+
|
83 |
+
var categoryContainer = $('category-edit-container');
|
84 |
+
var messagesContainer = $('messages');
|
85 |
+
var thisObj = this;
|
86 |
+
new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
|
87 |
+
parameters: params,
|
88 |
+
evalScripts: true,
|
89 |
+
onComplete: function () {
|
90 |
+
/**
|
91 |
+
* This func depends on variables, that came in response, and were eval'ed in onSuccess() callback.
|
92 |
+
* Since prototype's Element.update() evals javascripts in 10 msec, we should exec our func after it.
|
93 |
+
*/
|
94 |
+
setTimeout(function() {
|
95 |
+
try {
|
96 |
+
if (refreshTree) {
|
97 |
+
thisObj.refreshTreeArea();
|
98 |
+
}
|
99 |
+
toolbarToggle.start();
|
100 |
+
} catch (e) {
|
101 |
+
alert(e.message);
|
102 |
+
};
|
103 |
+
}, 25);
|
104 |
+
},
|
105 |
+
onSuccess: function(transport) {
|
106 |
+
try {
|
107 |
+
if (transport.responseText.isJSON()) {
|
108 |
+
var response = transport.responseText.evalJSON();
|
109 |
+
var needUpdate = true;
|
110 |
+
if (response.error) {
|
111 |
+
alert(response.message);
|
112 |
+
needUpdate = false;
|
113 |
+
}
|
114 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
115 |
+
setLocation(response.ajaxRedirect);
|
116 |
+
needUpdate = false;
|
117 |
+
}
|
118 |
+
if (needUpdate){
|
119 |
+
if (response.content){
|
120 |
+
$(categoryContainer).update(response.content);
|
121 |
+
}
|
122 |
+
if (response.messages){
|
123 |
+
$(messagesContainer).update(response.messages);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
} else {
|
127 |
+
$(categoryContainer).update(transport.responseText);
|
128 |
+
}
|
129 |
+
}
|
130 |
+
catch (e) {
|
131 |
+
$(categoryContainer).update(transport.responseText);
|
132 |
+
}
|
133 |
+
}
|
134 |
+
});
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Refresh tree nodes after saving or deleting a category
|
139 |
+
*/
|
140 |
+
function refreshTreeArea(transport)
|
141 |
+
{
|
142 |
+
if (tree && window.editingCategoryBreadcrumbs) {
|
143 |
+
// category deleted - delete its node
|
144 |
+
if (tree.nodeForDelete) {
|
145 |
+
var node = tree.getNodeById(tree.nodeForDelete);
|
146 |
+
tree.nodeForDelete = false;
|
147 |
+
|
148 |
+
if (node) { // Check maybe tree became somehow not synced with ajax and we're trying to delete unknown node
|
149 |
+
node.parentNode.removeChild(node);
|
150 |
+
tree.currentNodeId = false;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
// category created - add its node
|
154 |
+
else if (tree.addNodeTo) {
|
155 |
+
var parent = tree.getNodeById(tree.addNodeTo);
|
156 |
+
tree.addNodeTo = false;
|
157 |
+
|
158 |
+
if (parent) { // Check maybe tree became somehow not synced with ajax and we're trying to add to unknown node
|
159 |
+
var node = new Ext.tree.AsyncTreeNode(editingCategoryBreadcrumbs[editingCategoryBreadcrumbs.length - 1]);
|
160 |
+
node.loaded = true;
|
161 |
+
tree.currentNodeId = node.id;
|
162 |
+
parent.appendChild(node);
|
163 |
+
|
164 |
+
if (parent.expanded) {
|
165 |
+
tree.selectCurrentNode();
|
166 |
+
} else {
|
167 |
+
var timer;
|
168 |
+
parent.expand();
|
169 |
+
var f = function(){
|
170 |
+
if(parent.expanded){ // done expanding
|
171 |
+
clearInterval(timer);
|
172 |
+
tree.selectCurrentNode();
|
173 |
+
}
|
174 |
+
};
|
175 |
+
timer = setInterval(f, 200);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
// update all affected categories nodes names
|
181 |
+
for (var i = 0; i < editingCategoryBreadcrumbs.length; i++) {
|
182 |
+
var node = tree.getNodeById(editingCategoryBreadcrumbs[i].id);
|
183 |
+
if (node) {
|
184 |
+
node.setText(editingCategoryBreadcrumbs[i].text);
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
function displayLoadingMask()
|
191 |
+
{
|
192 |
+
var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page
|
193 |
+
Position.clone($(loaderArea), $('loading-mask'), {offsetLeft:-2});
|
194 |
+
toggleSelectsUnderBlock($('loading-mask'), false);
|
195 |
+
Element.show('loading-mask');
|
196 |
+
}
|
197 |
+
//]]>
|
198 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<div class="content-header">
|
29 |
+
<h3 class="icon-head head-categories"><?php echo $this->htmlEscape($this->getHeader()) . ($this->getCategoryId() ? ' (' . Mage::helper('catalog')->__('ID: %s', $this->getCategoryId()) . ')' : '') ?></h3>
|
30 |
+
<p class="content-buttons form-buttons">
|
31 |
+
<?php echo $this->getResetButtonHtml() ?>
|
32 |
+
<?php if($this->getCategoryId()): ?>
|
33 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
34 |
+
<?php endif; ?>
|
35 |
+
<?php echo $this->getAdditionalButtonsHtml(); ?>
|
36 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
37 |
+
</p>
|
38 |
+
</div>
|
39 |
+
<?php if($this->hasStoreRootCategory()): ?>
|
40 |
+
<?php echo $this->getTabsHtml() ?>
|
41 |
+
<?php else: ?>
|
42 |
+
<div class="messages warning-msg">
|
43 |
+
<?php echo Mage::helper('catalog')->__('Set root category for this store in the <a href="%s">configuration</a>', $this->getStoreConfigurationUrl()) ?>
|
44 |
+
</div>
|
45 |
+
<?php endif; ?>
|
46 |
+
<iframe name="iframeSave" style="display:none; width:100%;" src="<?php echo $this->getJsUrl() ?>blank.html"></iframe>
|
47 |
+
<form target="iframeSave" id="category_edit_form" action="<?php echo $this->getSaveUrl() ?>" method="post" enctype="multipart/form-data">
|
48 |
+
<div class="no-display">
|
49 |
+
<input type="hidden" name="isIframe" value="1" />
|
50 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
51 |
+
<input type="hidden" name="category_products" id="in_category_products" value="" />
|
52 |
+
<input type="hidden" name="active_tab_id" id="active_tab_id" value="" />
|
53 |
+
</div>
|
54 |
+
<div id="category_tab_content"></div>
|
55 |
+
</form>
|
56 |
+
<script type="text/javascript">
|
57 |
+
//<![CDATA[
|
58 |
+
categoryForm = new varienForm('category_edit_form');
|
59 |
+
|
60 |
+
categoryForm.submit= function (url) {
|
61 |
+
this.errorSections = $H({});
|
62 |
+
this.canShowError = true;
|
63 |
+
this.submitUrl = url;
|
64 |
+
if (this.validator && this.validator.validate()) {
|
65 |
+
if(this.validationUrl){
|
66 |
+
this._validate();
|
67 |
+
}
|
68 |
+
else{
|
69 |
+
if (this.isSubmitted) {
|
70 |
+
return false;
|
71 |
+
}
|
72 |
+
this.isSubmitted = true;
|
73 |
+
this._submit();
|
74 |
+
}
|
75 |
+
displayLoadingMask();
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
return false;
|
79 |
+
};
|
80 |
+
|
81 |
+
categoryForm.refreshPath = function () {
|
82 |
+
|
83 |
+
categoryId = this.getCategoryId();
|
84 |
+
|
85 |
+
if (!categoryId) {
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
|
89 |
+
var refreshPathSuccess = function(transport) {
|
90 |
+
if (transport.responseText.isJSON()) {
|
91 |
+
response = transport.responseText.evalJSON()
|
92 |
+
if (response.error) {
|
93 |
+
alert(response.message);
|
94 |
+
} else {
|
95 |
+
if (categoryForm.getCategoryId() == response['id']) {
|
96 |
+
categoryForm.setCategoryPath(response['path']);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
};
|
101 |
+
|
102 |
+
new Ajax.Request(
|
103 |
+
'<?php echo $this->getRefreshPathUrl() ?>',
|
104 |
+
{
|
105 |
+
method: 'POST',
|
106 |
+
evalScripts: true,
|
107 |
+
onSuccess: refreshPathSuccess
|
108 |
+
}
|
109 |
+
);
|
110 |
+
|
111 |
+
};
|
112 |
+
|
113 |
+
categoryForm.getCategoryId = function () {
|
114 |
+
collection = $(this.formId).getInputs('hidden','general[id]');
|
115 |
+
if (collection.size() > 0) {
|
116 |
+
return collection.first().value;
|
117 |
+
}
|
118 |
+
return false;
|
119 |
+
};
|
120 |
+
|
121 |
+
categoryForm.setCategoryPath = function (path) {
|
122 |
+
collection = $(this.formId).getInputs('hidden','general[path]');
|
123 |
+
if (collection.size() > 0) {
|
124 |
+
return collection.first().value = path;
|
125 |
+
}
|
126 |
+
};
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Create/edit some category
|
130 |
+
*/
|
131 |
+
function categorySubmit(url, useAjax) {
|
132 |
+
var activeTab = $('active_tab_id');
|
133 |
+
if (activeTab) {
|
134 |
+
if (activeTab.tabsJsObject && activeTab.tabsJsObject.activeTab) {
|
135 |
+
activeTab.value = activeTab.tabsJsObject.activeTab.id;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
var params = {};
|
140 |
+
var fields = $('category_edit_form').getElementsBySelector('input', 'select');
|
141 |
+
for(var i=0;i<fields.length;i++){
|
142 |
+
if (!fields[i].name) {
|
143 |
+
continue;
|
144 |
+
}
|
145 |
+
params[fields[i].name] = fields[i].getValue();
|
146 |
+
}
|
147 |
+
|
148 |
+
// Get info about what we're submitting - to properly update tree nodes
|
149 |
+
var categoryId = params['general[id]'] ? params['general[id]'] : 0;
|
150 |
+
var isCreating = categoryId == 0; // Separate variable is needed because '0' in javascript converts to TRUE
|
151 |
+
var path = params['general[path]'].split('/');
|
152 |
+
var parentId = path.pop();
|
153 |
+
if (parentId == categoryId) { // Maybe path includes category id itself
|
154 |
+
parentId = path.pop();
|
155 |
+
}
|
156 |
+
|
157 |
+
// Make operations with category tree
|
158 |
+
if (isCreating) {
|
159 |
+
/* Some specific tasks for creating category */
|
160 |
+
if (!tree.currentNodeId) {
|
161 |
+
// First submit of form - select some node to be current
|
162 |
+
tree.currentNodeId = parentId;
|
163 |
+
}
|
164 |
+
tree.addNodeTo = parentId;
|
165 |
+
} else {
|
166 |
+
/* Some specific tasks for editing category */
|
167 |
+
// Maybe change category enabled/disabled style
|
168 |
+
if (tree && tree.storeId==0) {
|
169 |
+
var currentNode = tree.getNodeById(categoryId);
|
170 |
+
|
171 |
+
if (currentNode) {
|
172 |
+
if (parseInt(params['general[is_active]'])) {
|
173 |
+
var oldClass = 'no-active-category';
|
174 |
+
var newClass = 'active-category';
|
175 |
+
} else {
|
176 |
+
var oldClass = 'active-category';
|
177 |
+
var newClass = 'no-active-category';
|
178 |
+
}
|
179 |
+
|
180 |
+
Element.removeClassName(currentNode.ui.wrap.firstChild, oldClass);
|
181 |
+
Element.addClassName(currentNode.ui.wrap.firstChild, newClass);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
// Submit form
|
187 |
+
categoryForm.submit();
|
188 |
+
}
|
189 |
+
|
190 |
+
<?php if(($block = $this->getLayout()->getBlock('category.product.grid')) && ($_gridJsObject=$block->getJsObjectName())): ?>
|
191 |
+
|
192 |
+
var categoryProducts = $H(<?php echo $this->getProductsJson() ?>);
|
193 |
+
$('in_category_products').value = categoryProducts.toQueryString();
|
194 |
+
|
195 |
+
function registerCategoryProduct(grid, element, checked){
|
196 |
+
if(checked){
|
197 |
+
if(element.positionElement){
|
198 |
+
element.positionElement.disabled = false;
|
199 |
+
categoryProducts.set(element.value, element.positionElement.value);
|
200 |
+
}
|
201 |
+
}
|
202 |
+
else{
|
203 |
+
if(element.positionElement){
|
204 |
+
element.positionElement.disabled = true;
|
205 |
+
}
|
206 |
+
categoryProducts.unset(element.value);
|
207 |
+
}
|
208 |
+
$('in_category_products').value = categoryProducts.toQueryString();
|
209 |
+
grid.reloadParams = {'selected_products[]':categoryProducts.keys()};
|
210 |
+
}
|
211 |
+
function categoryProductRowClick(grid, event){
|
212 |
+
var trElement = Event.findElement(event, 'tr');
|
213 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
214 |
+
if(trElement){
|
215 |
+
var checkbox = Element.getElementsBySelector(trElement, 'input');
|
216 |
+
if(checkbox[0]){
|
217 |
+
var checked = isInput ? checkbox[0].checked : !checkbox[0].checked;
|
218 |
+
<?php echo $_gridJsObject ?>.setCheckboxChecked(checkbox[0], checked);
|
219 |
+
}
|
220 |
+
}
|
221 |
+
}
|
222 |
+
function positionChange(event){
|
223 |
+
var element = Event.element(event);
|
224 |
+
if(element && element.checkboxElement && element.checkboxElement.checked){
|
225 |
+
categoryProducts.set(element.checkboxElement.value, element.value);
|
226 |
+
$('in_category_products').value = categoryProducts.toQueryString();
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
var tabIndex = 1000;
|
231 |
+
function categoryProductRowInit(grid, row){
|
232 |
+
var checkbox = $(row).getElementsByClassName('checkbox')[0];
|
233 |
+
var position = $(row).getElementsByClassName('input-text')[0];
|
234 |
+
if(checkbox && position){
|
235 |
+
checkbox.positionElement = position;
|
236 |
+
position.checkboxElement = checkbox;
|
237 |
+
position.disabled = !checkbox.checked;
|
238 |
+
position.tabIndex = tabIndex++;
|
239 |
+
Event.observe(position,'keyup',positionChange);
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
|
244 |
+
<?php echo $_gridJsObject ?>.rowClickCallback = categoryProductRowClick;
|
245 |
+
<?php echo $_gridJsObject ?>.initRowCallback = categoryProductRowInit;
|
246 |
+
<?php echo $_gridJsObject ?>.checkboxCheckCallback = registerCategoryProduct;
|
247 |
+
<?php echo $_gridJsObject ?>.rows.each(function(row){categoryProductRowInit(<?php echo $_gridJsObject ?>, row)});
|
248 |
+
|
249 |
+
<?php endif; ?>
|
250 |
+
<?php if($this->isAjax() && ($block = $this->getLayout()->getBlock('tabs')) && ($_tabsJsObject=$block->getJsObjectName())): ?>
|
251 |
+
<?php echo $_tabsJsObject ?>.moveTabContentInDest();
|
252 |
+
if (<?php echo $_tabsJsObject ?>.activeTab) {
|
253 |
+
$('active_tab_id').value = <?php echo $_tabsJsObject ?>.activeTab.id;
|
254 |
+
}
|
255 |
+
$('active_tab_id').tabsJsObject = <?php echo $_tabsJsObject ?>;
|
256 |
+
<?php endif; ?>
|
257 |
+
//]]>
|
258 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/category/tree.phtml
ADDED
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="categories-side-col">
|
28 |
+
<div class="content-header">
|
29 |
+
<h3 class="icon-head head-categories"><?php echo Mage::helper('catalog')->__('Categories') ?></h3>
|
30 |
+
<?php if ($this->getRoot()): ?>
|
31 |
+
<?php echo $this->getAddRootButtonHtml() ?><br />
|
32 |
+
<?php echo $this->getAddSubButtonHtml() ?>
|
33 |
+
<?php endif; ?>
|
34 |
+
</div>
|
35 |
+
<?php echo $this->getStoreSwitcherHtml();?>
|
36 |
+
<div class="tree-actions">
|
37 |
+
<?php if($this->getRoot()): ?>
|
38 |
+
<?php //echo $this->getCollapseButtonHtml() ?>
|
39 |
+
<?php //echo $this->getExpandButtonHtml() ?>
|
40 |
+
<a href="#" onclick="tree.collapseTree(); return false;"><?php echo Mage::helper('catalog')->__('Collapse All'); ?></a> <span class="separator">|</span> <a href="#" onclick="tree.expandTree(); return false;"><?php echo Mage::helper('catalog')->__('Expand All'); ?></a>
|
41 |
+
<?php endif; ?>
|
42 |
+
</div>
|
43 |
+
<?php if ($this->getRoot()): ?>
|
44 |
+
<div class="tree-holder">
|
45 |
+
<div id="tree-div" style="width:100%; overflow:auto;"></div>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<script type="text/javascript">
|
49 |
+
//<![CDATA[
|
50 |
+
var tree;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Fix ext compatibility with prototype 1.6
|
54 |
+
*/
|
55 |
+
Ext.lib.Event.getTarget = function(e) {
|
56 |
+
var ee = e.browserEvent || e;
|
57 |
+
return ee.target ? Event.element(ee) : null;
|
58 |
+
};
|
59 |
+
|
60 |
+
Ext.tree.TreePanel.Enhanced = function(el, config)
|
61 |
+
{
|
62 |
+
Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, config);
|
63 |
+
};
|
64 |
+
|
65 |
+
Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
|
66 |
+
|
67 |
+
loadTree : function(config, firstLoad)
|
68 |
+
{
|
69 |
+
var parameters = config['parameters'];
|
70 |
+
var data = config['data'];
|
71 |
+
|
72 |
+
this.storeId = parameters['store_id'];
|
73 |
+
|
74 |
+
if ( this.storeId != 0 && $('add_root_category_button')) {
|
75 |
+
$('add_root_category_button').hide();
|
76 |
+
}
|
77 |
+
|
78 |
+
if ((typeof parameters['root_visible']) != 'undefined') {
|
79 |
+
this.rootVisible = parameters['root_visible']*1;
|
80 |
+
}
|
81 |
+
|
82 |
+
var root = new Ext.tree.TreeNode(parameters);
|
83 |
+
|
84 |
+
this.nodeHash = {};
|
85 |
+
this.setRootNode(root);
|
86 |
+
|
87 |
+
if (firstLoad) {
|
88 |
+
this.addListener('click', this.categoryClick);
|
89 |
+
this.addListener('beforenodedrop', categoryMove.createDelegate(this));
|
90 |
+
}
|
91 |
+
|
92 |
+
this.loader.buildCategoryTree(root, data);
|
93 |
+
this.el.dom.innerHTML = '';
|
94 |
+
// render the tree
|
95 |
+
this.render();
|
96 |
+
if (parameters['expanded']) {
|
97 |
+
this.expandAll();
|
98 |
+
} else {
|
99 |
+
root.expand();
|
100 |
+
}
|
101 |
+
|
102 |
+
var selectedNode = this.getNodeById(parameters['category_id']);
|
103 |
+
if (selectedNode) {
|
104 |
+
this.currentNodeId = parameters['category_id'];
|
105 |
+
}
|
106 |
+
this.selectCurrentNode();
|
107 |
+
},
|
108 |
+
|
109 |
+
request : function(url, params)
|
110 |
+
{
|
111 |
+
if (!params) {
|
112 |
+
if (category_info_tabsJsTabs.activeTab) {
|
113 |
+
var params = {active_tab_id:category_info_tabsJsTabs.activeTab.id};
|
114 |
+
}
|
115 |
+
else {
|
116 |
+
var params = {};
|
117 |
+
}
|
118 |
+
}
|
119 |
+
if (!params.form_key) {
|
120 |
+
params.form_key = FORM_KEY;
|
121 |
+
}
|
122 |
+
var result = new Ajax.Request(
|
123 |
+
url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ),
|
124 |
+
{
|
125 |
+
parameters: params,
|
126 |
+
method: 'post'
|
127 |
+
}
|
128 |
+
);
|
129 |
+
|
130 |
+
return result;
|
131 |
+
},
|
132 |
+
|
133 |
+
selectCurrentNode : function()
|
134 |
+
{
|
135 |
+
if (this.currentNodeId) {
|
136 |
+
var selectedNode = this.getNodeById(this.currentNodeId);
|
137 |
+
if ((typeof selectedNode.attributes.path)!='undefined') {
|
138 |
+
var path = selectedNode.attributes.path;
|
139 |
+
if (!this.storeId) {
|
140 |
+
path = '0/'+path;
|
141 |
+
}
|
142 |
+
this.selectPath(path);
|
143 |
+
} else {
|
144 |
+
this.getSelectionModel().select(selectedNode);
|
145 |
+
}
|
146 |
+
}
|
147 |
+
},
|
148 |
+
|
149 |
+
collapseTree : function()
|
150 |
+
{
|
151 |
+
this.collapseAll();
|
152 |
+
|
153 |
+
this.selectCurrentNode();
|
154 |
+
|
155 |
+
if (!this.collapsed) {
|
156 |
+
this.collapsed = true;
|
157 |
+
this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(false) ?>';
|
158 |
+
this.request(this.loader.dataUrl, false);
|
159 |
+
}
|
160 |
+
},
|
161 |
+
|
162 |
+
expandTree : function()
|
163 |
+
{
|
164 |
+
this.expandAll();
|
165 |
+
if (this.collapsed) {
|
166 |
+
this.collapsed = false;
|
167 |
+
this.loader.dataUrl = '<?php echo $this->getLoadTreeUrl(true) ?>';
|
168 |
+
this.request(this.loader.dataUrl, false);
|
169 |
+
}
|
170 |
+
},
|
171 |
+
|
172 |
+
categoryClick : function(node, e)
|
173 |
+
{
|
174 |
+
var baseUrl = '<?php echo $this->getEditUrl() ?>';
|
175 |
+
var urlExt = (this.storeId?'store/'+this.storeId+'/':'')+'id/'+node.id+'/';
|
176 |
+
var url = parseSidUrl(baseUrl, urlExt);
|
177 |
+
|
178 |
+
this.currentNodeId = node.id;
|
179 |
+
if (!this.useAjax) {
|
180 |
+
setLocation(url);
|
181 |
+
return;
|
182 |
+
}
|
183 |
+
if (category_info_tabsJsTabs.activeTab) {
|
184 |
+
var params = {active_tab_id:category_info_tabsJsTabs.activeTab.id};
|
185 |
+
}
|
186 |
+
updateContent(url, params);
|
187 |
+
}
|
188 |
+
});
|
189 |
+
|
190 |
+
function reRenderTree(event, switcher)
|
191 |
+
{
|
192 |
+
// re-render tree by store switcher
|
193 |
+
if (tree && event) {
|
194 |
+
var obj = event.target;
|
195 |
+
var newStoreId = obj.value * 1;
|
196 |
+
var storeParam = newStoreId ? 'store/'+newStoreId + '/' : '';
|
197 |
+
|
198 |
+
if (obj.switchParams) {
|
199 |
+
storeParam += obj.switchParams;
|
200 |
+
}
|
201 |
+
if (switcher.useConfirm) {
|
202 |
+
if (!confirm("<?php echo $this->__('Please confirm site switching. All data that hasn\'t been saved will be lost.') ?>")){
|
203 |
+
obj.value = '<?php echo (int) $this->getStoreId() ?>';
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
if ($('add_root_category_button')) {
|
209 |
+
if (newStoreId == 0) {
|
210 |
+
$('add_root_category_button').show();
|
211 |
+
}
|
212 |
+
else {
|
213 |
+
$('add_root_category_button').hide();
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
// retain current selected category id
|
218 |
+
storeParam = storeParam + 'id/' + tree.currentNodeId + '/';
|
219 |
+
var url = tree.switchTreeUrl + storeParam;
|
220 |
+
|
221 |
+
// load from cache
|
222 |
+
// load from ajax
|
223 |
+
new Ajax.Request(url + (url.match(new RegExp('\\?')) ? '&isAjax=true' : '?isAjax=true' ), {
|
224 |
+
parameters : {store: newStoreId, form_key: FORM_KEY},
|
225 |
+
method : 'post',
|
226 |
+
onComplete : function(transport) {
|
227 |
+
var response = eval('(' + transport.responseText + ')');
|
228 |
+
if (!response['parameters']) {
|
229 |
+
return false;
|
230 |
+
}
|
231 |
+
|
232 |
+
_renderNewTree(response, storeParam);
|
233 |
+
}
|
234 |
+
});
|
235 |
+
}
|
236 |
+
// render default tree
|
237 |
+
else {
|
238 |
+
_renderNewTree();
|
239 |
+
}
|
240 |
+
}
|
241 |
+
|
242 |
+
function _renderNewTree(config, storeParam)
|
243 |
+
{
|
244 |
+
if (!config) {
|
245 |
+
var config = defaultLoadTreeParams;
|
246 |
+
}
|
247 |
+
if (tree) {
|
248 |
+
tree.purgeListeners();
|
249 |
+
tree.el.dom.innerHTML = '';
|
250 |
+
}
|
251 |
+
tree = new Ext.tree.TreePanel.Enhanced('tree-div', newTreeParams);
|
252 |
+
tree.loadTree(config, true);
|
253 |
+
|
254 |
+
// try to select current category
|
255 |
+
var selectedNode = tree.getNodeById(config.parameters.category_id);
|
256 |
+
if (selectedNode) {
|
257 |
+
tree.currentNodeId = config.parameters.category_id;
|
258 |
+
}
|
259 |
+
tree.selectCurrentNode();
|
260 |
+
|
261 |
+
// update content area
|
262 |
+
var url = tree.editUrl;
|
263 |
+
if (storeParam) {
|
264 |
+
url = url + storeParam;
|
265 |
+
}
|
266 |
+
<?php if ($this->isClearEdit()):?>
|
267 |
+
if (selectedNode) {
|
268 |
+
url = url + 'id/' + config.parameters.category_id;
|
269 |
+
}
|
270 |
+
<?php endif;?>
|
271 |
+
updateContent(url);
|
272 |
+
}
|
273 |
+
|
274 |
+
Ext.onReady(function()
|
275 |
+
{
|
276 |
+
categoryLoader = new Ext.tree.TreeLoader({
|
277 |
+
dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
|
278 |
+
});
|
279 |
+
|
280 |
+
categoryLoader.createNode = function(config) {
|
281 |
+
var node;
|
282 |
+
var _node = Object.clone(config);
|
283 |
+
if (config.children && !config.children.length) {
|
284 |
+
delete(config.children);
|
285 |
+
node = new Ext.tree.AsyncTreeNode(config);
|
286 |
+
} else {
|
287 |
+
node = new Ext.tree.TreeNode(config);
|
288 |
+
}
|
289 |
+
|
290 |
+
return node;
|
291 |
+
};
|
292 |
+
|
293 |
+
categoryLoader.buildCategoryTree = function(parent, config)
|
294 |
+
{
|
295 |
+
if (!config) return null;
|
296 |
+
|
297 |
+
if (parent && config && config.length){
|
298 |
+
for (var i = 0; i < config.length; i++) {
|
299 |
+
var node;
|
300 |
+
var _node = Object.clone(config[i]);
|
301 |
+
if (_node.children && !_node.children.length) {
|
302 |
+
delete(_node.children);
|
303 |
+
node = new Ext.tree.AsyncTreeNode(_node);
|
304 |
+
} else {
|
305 |
+
node = new Ext.tree.TreeNode(config[i]);
|
306 |
+
}
|
307 |
+
parent.appendChild(node);
|
308 |
+
node.loader = node.getOwnerTree().loader;
|
309 |
+
if (_node.children) {
|
310 |
+
this.buildCategoryTree(node, _node.children);
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
};
|
315 |
+
|
316 |
+
categoryLoader.buildHash = function(node)
|
317 |
+
{
|
318 |
+
var hash = {};
|
319 |
+
|
320 |
+
hash = this.toArray(node.attributes);
|
321 |
+
|
322 |
+
if (node.childNodes.length>0 || (node.loaded==false && node.loading==false)) {
|
323 |
+
hash['children'] = new Array;
|
324 |
+
|
325 |
+
for (var i = 0, len = node.childNodes.length; i < len; i++) {
|
326 |
+
if (!hash['children']) {
|
327 |
+
hash['children'] = new Array;
|
328 |
+
}
|
329 |
+
hash['children'].push(this.buildHash(node.childNodes[i]));
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
return hash;
|
334 |
+
};
|
335 |
+
|
336 |
+
categoryLoader.toArray = function(attributes) {
|
337 |
+
var data = {form_key: FORM_KEY};
|
338 |
+
for (var key in attributes) {
|
339 |
+
var value = attributes[key];
|
340 |
+
data[key] = value;
|
341 |
+
}
|
342 |
+
|
343 |
+
return data;
|
344 |
+
};
|
345 |
+
|
346 |
+
categoryLoader.on("beforeload", function(treeLoader, node) {
|
347 |
+
treeLoader.baseParams.id = node.attributes.id;
|
348 |
+
treeLoader.baseParams.store = node.attributes.store;
|
349 |
+
treeLoader.baseParams.form_key = FORM_KEY;
|
350 |
+
});
|
351 |
+
|
352 |
+
categoryLoader.on("load", function(treeLoader, node, config) {
|
353 |
+
varienWindowOnload();
|
354 |
+
});
|
355 |
+
|
356 |
+
if ((typeof varienStoreSwitcher)!='undefined') {
|
357 |
+
varienStoreSwitcher.storeSelectorClickCallback = reRenderTree;
|
358 |
+
}
|
359 |
+
|
360 |
+
newTreeParams = {
|
361 |
+
animate : false,
|
362 |
+
loader : categoryLoader,
|
363 |
+
enableDD : true,
|
364 |
+
containerScroll : true,
|
365 |
+
selModel : new Ext.tree.CheckNodeMultiSelectionModel(),
|
366 |
+
rootVisible : '<?php echo $this->getRoot()->getIsVisible() ?>',
|
367 |
+
useAjax : <?php echo $this->getUseAjax() ?>,
|
368 |
+
switchTreeUrl : '<?php echo $this->getSwitchTreeUrl() ?>',
|
369 |
+
editUrl : '<?php echo $this->getEditUrl() ?>',
|
370 |
+
currentNodeId : <?php echo (int) $this->getCategoryId() ?>
|
371 |
+
};
|
372 |
+
|
373 |
+
defaultLoadTreeParams = {
|
374 |
+
parameters : {
|
375 |
+
text : '<?php echo htmlentities($this->getRoot()->getName()) ?>',
|
376 |
+
draggable : false,
|
377 |
+
allowDrop : <?php if ($this->getRoot()->getIsVisible()): ?>true<?php else : ?>false<?php endif; ?>,
|
378 |
+
id : <?php echo (int) $this->getRoot()->getId() ?>,
|
379 |
+
expanded : <?php echo (int) $this->getIsWasExpanded() ?>,
|
380 |
+
store_id : <?php echo (int) $this->getStore()->getId() ?>,
|
381 |
+
category_id : <?php echo (int) $this->getCategoryId() ?>
|
382 |
+
},
|
383 |
+
data : <?php echo $this->getTreeJson() ?>
|
384 |
+
};
|
385 |
+
|
386 |
+
reRenderTree();
|
387 |
+
});
|
388 |
+
|
389 |
+
function addNew(url, isRoot)
|
390 |
+
{
|
391 |
+
if (isRoot) {
|
392 |
+
tree.currentNodeId = tree.root.id;
|
393 |
+
}
|
394 |
+
|
395 |
+
if (/store\/\d+/.test(url)) {
|
396 |
+
url = url.replace(/store\/\d+/, "store/" + tree.storeId);
|
397 |
+
}
|
398 |
+
else {
|
399 |
+
url+= "store/" + tree.storeId + "/";
|
400 |
+
}
|
401 |
+
|
402 |
+
url+= 'parent/'+tree.currentNodeId;
|
403 |
+
updateContent(url);
|
404 |
+
}
|
405 |
+
|
406 |
+
function categoryMove(obj)
|
407 |
+
{
|
408 |
+
var data = {id: obj.dropNode.id, form_key: FORM_KEY};
|
409 |
+
|
410 |
+
data.point = obj.point;
|
411 |
+
switch (obj.point) {
|
412 |
+
case 'above' :
|
413 |
+
data.pid = obj.target.parentNode.id;
|
414 |
+
data.paid = obj.dropNode.parentNode.id;
|
415 |
+
if (obj.target.previousSibling) {
|
416 |
+
data.aid = obj.target.previousSibling.id;
|
417 |
+
} else {
|
418 |
+
data.aid = 0;
|
419 |
+
}
|
420 |
+
break;
|
421 |
+
case 'below' :
|
422 |
+
data.pid = obj.target.parentNode.id;
|
423 |
+
data.aid = obj.target.id;
|
424 |
+
break;
|
425 |
+
case 'append' :
|
426 |
+
data.pid = obj.target.id;
|
427 |
+
data.paid = obj.dropNode.parentNode.id;
|
428 |
+
if (obj.target.lastChild) {
|
429 |
+
data.aid = obj.target.lastChild.id;
|
430 |
+
} else {
|
431 |
+
data.aid = 0;
|
432 |
+
}
|
433 |
+
break;
|
434 |
+
default :
|
435 |
+
obj.cancel = true;
|
436 |
+
return obj;
|
437 |
+
}
|
438 |
+
|
439 |
+
var success = function(o) {
|
440 |
+
try {
|
441 |
+
if(o.responseText){
|
442 |
+
if(o.responseText==='SUCCESS'){
|
443 |
+
categoryForm.refreshPath();
|
444 |
+
} else {
|
445 |
+
alert(o.responseText);
|
446 |
+
location.reload();
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
catch(e) {
|
451 |
+
}
|
452 |
+
};
|
453 |
+
|
454 |
+
var failure = function(o) {
|
455 |
+
try {
|
456 |
+
console.log(o.statusText);
|
457 |
+
} catch (e2) {
|
458 |
+
alert(o.statusText);
|
459 |
+
}
|
460 |
+
location.reload();
|
461 |
+
};
|
462 |
+
|
463 |
+
var pd = [];
|
464 |
+
for(var key in data) {
|
465 |
+
pd.push(encodeURIComponent(key), "=", encodeURIComponent(data[key]), "&");
|
466 |
+
}
|
467 |
+
pd.splice(pd.length-1,1);
|
468 |
+
new Ajax.Request(
|
469 |
+
'<?php echo $this->getMoveUrl() ?>',
|
470 |
+
{
|
471 |
+
method: 'POST',
|
472 |
+
parameters: pd.join(""),
|
473 |
+
onSuccess : success,
|
474 |
+
onFailure : failure
|
475 |
+
}
|
476 |
+
);
|
477 |
+
}
|
478 |
+
//]]>
|
479 |
+
</script>
|
480 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/catalog/category/widget/tree.phtml
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php $_divId = 'tree' . $this->getId() ?>
|
29 |
+
<div id="<?php echo $_divId ?>" class="tree"></div>
|
30 |
+
|
31 |
+
<script type="text/javascript">
|
32 |
+
//<![CDATA[
|
33 |
+
|
34 |
+
var tree<?php echo $this->getId() ?>;
|
35 |
+
|
36 |
+
var useMassaction = <?php echo $this->getUseMassaction()?1:0; ?>;
|
37 |
+
|
38 |
+
var isAnchorOnly = <?php echo $this->getIsAnchorOnly()?1:0; ?>;
|
39 |
+
|
40 |
+
Ext.tree.TreePanel.Enhanced = function(el, config)
|
41 |
+
{
|
42 |
+
Ext.tree.TreePanel.Enhanced.superclass.constructor.call(this, el, config);
|
43 |
+
};
|
44 |
+
|
45 |
+
Ext.extend(Ext.tree.TreePanel.Enhanced, Ext.tree.TreePanel, {
|
46 |
+
|
47 |
+
loadTree : function(config, firstLoad)
|
48 |
+
{
|
49 |
+
var parameters = config['parameters'];
|
50 |
+
var data = config['data'];
|
51 |
+
|
52 |
+
if ((typeof parameters['root_visible']) != 'undefined') {
|
53 |
+
this.rootVisible = parameters['root_visible']*1;
|
54 |
+
}
|
55 |
+
|
56 |
+
var root = new Ext.tree.TreeNode(parameters);
|
57 |
+
|
58 |
+
this.nodeHash = {};
|
59 |
+
this.setRootNode(root);
|
60 |
+
|
61 |
+
if (firstLoad) {
|
62 |
+
<?php if ($this->getNodeClickListener()): ?>
|
63 |
+
this.addListener('click', <?php echo $this->getNodeClickListener() ?>.createDelegate(this));
|
64 |
+
<?php endif; ?>
|
65 |
+
}
|
66 |
+
|
67 |
+
this.loader.buildCategoryTree(root, data);
|
68 |
+
this.el.dom.innerHTML = '';
|
69 |
+
// render the tree
|
70 |
+
this.render();
|
71 |
+
}
|
72 |
+
});
|
73 |
+
|
74 |
+
Ext.onReady(function()
|
75 |
+
{
|
76 |
+
var emptyNodeAdded = <?php echo ($this->getWithEmptyNode() ? 'false' : 'true') ?>;
|
77 |
+
|
78 |
+
var categoryLoader = new Ext.tree.TreeLoader({
|
79 |
+
dataUrl: '<?php echo $this->getLoadTreeUrl() ?>'
|
80 |
+
});
|
81 |
+
|
82 |
+
categoryLoader.buildCategoryTree = function(parent, config)
|
83 |
+
{
|
84 |
+
if (!config) return null;
|
85 |
+
|
86 |
+
|
87 |
+
if (parent && config && config.length){
|
88 |
+
for (var i = 0; i < config.length; i++) {
|
89 |
+
var node;
|
90 |
+
if (useMassaction && config[i].is_anchor == isAnchorOnly) {
|
91 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
92 |
+
}
|
93 |
+
var _node = Object.clone(config[i]);
|
94 |
+
|
95 |
+
// Add empty node to reset category filter
|
96 |
+
if(!emptyNodeAdded) {
|
97 |
+
var empty = Object.clone(_node);
|
98 |
+
empty.text = '<?php echo $this->__('None') ?>';
|
99 |
+
empty.children = [];
|
100 |
+
empty.id = 'none';
|
101 |
+
empty.path = '1/none';
|
102 |
+
empty.cls = 'leaf';
|
103 |
+
parent.appendChild(new Ext.tree.TreeNode(empty));
|
104 |
+
emptyNodeAdded = true;
|
105 |
+
}
|
106 |
+
|
107 |
+
if (_node.children && !_node.children.length) {
|
108 |
+
delete(_node.children);
|
109 |
+
node = new Ext.tree.AsyncTreeNode(_node);
|
110 |
+
} else {
|
111 |
+
node = new Ext.tree.TreeNode(config[i]);
|
112 |
+
}
|
113 |
+
parent.appendChild(node);
|
114 |
+
node.loader = node.getOwnerTree().loader;
|
115 |
+
node.loader = node.getOwnerTree().loader;
|
116 |
+
if (_node.children) {
|
117 |
+
this.buildCategoryTree(node, _node.children);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
};
|
122 |
+
|
123 |
+
categoryLoader.createNode = function(config) {
|
124 |
+
var node;
|
125 |
+
if (useMassaction && config.is_anchor == isAnchorOnly) {
|
126 |
+
config.uiProvider = Ext.tree.CheckboxNodeUI;
|
127 |
+
}
|
128 |
+
var _node = Object.clone(config);
|
129 |
+
if (config.children && !config.children.length) {
|
130 |
+
delete(config.children);
|
131 |
+
node = new Ext.tree.AsyncTreeNode(config);
|
132 |
+
} else {
|
133 |
+
node = new Ext.tree.TreeNode(config);
|
134 |
+
}
|
135 |
+
return node;
|
136 |
+
};
|
137 |
+
|
138 |
+
categoryLoader.buildHash = function(node)
|
139 |
+
{
|
140 |
+
var hash = {};
|
141 |
+
|
142 |
+
hash = this.toArray(node.attributes);
|
143 |
+
|
144 |
+
if (node.childNodes.length>0 || (node.loaded==false && node.loading==false)) {
|
145 |
+
hash['children'] = new Array;
|
146 |
+
|
147 |
+
for (var i = 0, len = node.childNodes.length; i < len; i++) {
|
148 |
+
if (!hash['children']) {
|
149 |
+
hash['children'] = new Array;
|
150 |
+
}
|
151 |
+
hash['children'].push(this.buildHash(node.childNodes[i]));
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
return hash;
|
156 |
+
};
|
157 |
+
|
158 |
+
categoryLoader.toArray = function(attributes) {
|
159 |
+
var data = {};
|
160 |
+
for (var key in attributes) {
|
161 |
+
var value = attributes[key];
|
162 |
+
data[key] = value;
|
163 |
+
}
|
164 |
+
|
165 |
+
return data;
|
166 |
+
};
|
167 |
+
|
168 |
+
categoryLoader.on("beforeload", function(treeLoader, node) {
|
169 |
+
treeLoader.baseParams.id = node.attributes.id;
|
170 |
+
});
|
171 |
+
|
172 |
+
tree<?php echo $this->getId() ?> = new Ext.tree.TreePanel.Enhanced('<?php echo $_divId ?>', {
|
173 |
+
animate: false,
|
174 |
+
loader: categoryLoader,
|
175 |
+
enableDD: false,
|
176 |
+
containerScroll: true,
|
177 |
+
rootVisible: '<?php echo $this->getRoot()->getIsVisible() ?>',
|
178 |
+
useAjax: true,
|
179 |
+
currentNodeId: <?php echo (int) $this->getCategoryId() ?>,
|
180 |
+
addNodeTo: false
|
181 |
+
});
|
182 |
+
|
183 |
+
if (useMassaction) {
|
184 |
+
tree<?php echo $this->getId() ?>.on('check', function(node) {
|
185 |
+
$('<?php echo $_divId; ?>').fire('node:changed', {node:node});
|
186 |
+
}, tree<?php echo $this->getId() ?>);
|
187 |
+
}
|
188 |
+
|
189 |
+
// set the root node
|
190 |
+
var parameters = {
|
191 |
+
text: 'Psw',
|
192 |
+
draggable: false,
|
193 |
+
id: <?php echo (int) $this->getRoot()->getId() ?>,
|
194 |
+
expanded: <?php echo (int) $this->getIsWasExpanded() ?>,
|
195 |
+
category_id: <?php echo (int) $this->getCategoryId() ?>
|
196 |
+
};
|
197 |
+
|
198 |
+
tree<?php echo $this->getId() ?>.loadTree({parameters:parameters, data:<?php echo $this->getTreeJson() ?>},true);
|
199 |
+
|
200 |
+
});
|
201 |
+
//]]>
|
202 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Catalog_Form_Renderer_Fieldset_Element
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php $_element = $this->getElement() ?>
|
33 |
+
<?php $this->checkFieldDisable() ?>
|
34 |
+
|
35 |
+
<?php if ($_element->getType()=='hidden'): ?>
|
36 |
+
<tr>
|
37 |
+
<td class="hidden" colspan="100"><?php echo trim($_element->getElementHtml()) ?></td>
|
38 |
+
</tr>
|
39 |
+
<?php else: ?>
|
40 |
+
<tr>
|
41 |
+
<td class="label"><?php echo trim($this->getElementLabelHtml()) ?></td>
|
42 |
+
<td class="value">
|
43 |
+
<?php echo trim($this->getElementHtml()) ?>
|
44 |
+
<?php if ($_element->getNote()) : ?>
|
45 |
+
<p class="note"><?php echo $_element->getNote() ?></p>
|
46 |
+
<?php endif; ?>
|
47 |
+
</td>
|
48 |
+
<td class="scope-label"><span class="nobr"><?php echo $this->getScopeLabel() ?></span></td>
|
49 |
+
<?php if ($this->canDisplayUseDefault()): ?>
|
50 |
+
<td class="value use-default">
|
51 |
+
<input <?php if($_element->getReadonly()):?> disabled="disabled"<?php endif; ?> type="checkbox" name="use_default[]" id="<?php echo $_element->getHtmlId() ?>_default"<?php if ($this->usedDefault()): ?> checked="checked"<?php endif; ?> onclick="toggleValueElements(this, this.parentNode.parentNode)" value="<?php echo $this->getAttributeCode() ?>"/>
|
52 |
+
<label for="<?php echo $_element->getHtmlId() ?>_default" class="normal"><?php echo $this->__('Use Default Value') ?></label>
|
53 |
+
</td>
|
54 |
+
<?php endif; ?>
|
55 |
+
</tr>
|
56 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/catalog/product.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Catalog_Product
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<div class="content-header">
|
33 |
+
<table cellspacing="0">
|
34 |
+
<tr>
|
35 |
+
<td style="width:50%;"><h3 class="icon-head head-products"><?php echo Mage::helper('catalog')->__('Manage Products') ?></h3></td>
|
36 |
+
<td class="a-right">
|
37 |
+
<?php echo $this->getButtonsHtml() ?>
|
38 |
+
</td>
|
39 |
+
</tr>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
<?php if( !$this->isSingleStoreMode() ): ?>
|
43 |
+
<?php echo $this->getChildHtml('store_switcher');?>
|
44 |
+
<?php endif;?>
|
45 |
+
<div>
|
46 |
+
<?php echo $this->getGridHtml() ?>
|
47 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml
ADDED
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
function saveAndContinueEdit(){
|
30 |
+
disableElements('save');
|
31 |
+
var activeTab = product_attribute_tabsJsTabs.activeTab.id;
|
32 |
+
if (editForm.submit($('edit_form').action+'back/edit/tab/' + activeTab) == false) {
|
33 |
+
enableElements('save');
|
34 |
+
}
|
35 |
+
varienGlobalEvents.attachEventHandler('formValidateAjaxComplete', function (){
|
36 |
+
enableElements('save');
|
37 |
+
});
|
38 |
+
}
|
39 |
+
|
40 |
+
function saveAttribute(){
|
41 |
+
disableElements('save');
|
42 |
+
if (editForm.submit() == false){
|
43 |
+
enableElements('save');
|
44 |
+
}
|
45 |
+
varienGlobalEvents.attachEventHandler('formValidateAjaxComplete', function (){
|
46 |
+
enableElements('save');
|
47 |
+
});
|
48 |
+
}
|
49 |
+
|
50 |
+
function toggleApplyVisibility(select) {
|
51 |
+
if ($(select).value == 1) {
|
52 |
+
$(select).next('select').removeClassName('no-display');
|
53 |
+
$(select).next('select').removeClassName('ignore-validate');
|
54 |
+
|
55 |
+
} else {
|
56 |
+
$(select).next('select').addClassName('no-display');
|
57 |
+
$(select).next('select').addClassName('ignore-validate');
|
58 |
+
var options = $(select).next('select').options;
|
59 |
+
for( var i=0; i < options.length; i++) {
|
60 |
+
options[i].selected = false;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
function checkOptionsPanelVisibility(){
|
66 |
+
if($('matage-options-panel')){
|
67 |
+
var panel = $('matage-options-panel');
|
68 |
+
if($('frontend_input') && ($('frontend_input').value=='select' || $('frontend_input').value=='multiselect')){
|
69 |
+
panel.show();
|
70 |
+
}
|
71 |
+
else {
|
72 |
+
panel.hide();
|
73 |
+
}
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
function bindAttributeInputType()
|
78 |
+
{
|
79 |
+
checkOptionsPanelVisibility();
|
80 |
+
switchDefaultValueField();
|
81 |
+
checkIsConfigurableVisibility();
|
82 |
+
if($('frontend_input') && ($('frontend_input').value=='select' || $('frontend_input').value=='multiselect' || $('frontend_input').value=='price')){
|
83 |
+
if($('is_filterable') && !$('is_filterable').getAttribute('readonly')){
|
84 |
+
$('is_filterable').disabled = false;
|
85 |
+
}
|
86 |
+
if($('is_filterable_in_search') && !$('is_filterable_in_search').getAttribute('readonly')){
|
87 |
+
$('is_filterable_in_search').disabled = false;
|
88 |
+
}
|
89 |
+
if($('backend_type') && $('backend_type').options){
|
90 |
+
for(var i=0;i<$('backend_type').options.length;i++){
|
91 |
+
if($('backend_type').options[i].value=='int') $('backend_type').selectedIndex = i;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
else {
|
96 |
+
if($('is_filterable')){
|
97 |
+
$('is_filterable').selectedIndex=0;
|
98 |
+
$('is_filterable').disabled = true;
|
99 |
+
}
|
100 |
+
if($('is_filterable_in_search')){
|
101 |
+
$('is_filterable_in_search').disabled = true;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($('frontend_input') && ($('frontend_input').value=='multiselect'
|
106 |
+
|| $('frontend_input').value=='gallery'
|
107 |
+
|| $('frontend_input').value=='textarea')) {
|
108 |
+
if ($('used_for_sort_by')) {
|
109 |
+
$('used_for_sort_by').disabled = true;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
else {
|
113 |
+
if ($('used_for_sort_by') && !$('used_for_sort_by').getAttribute('readonly')) {
|
114 |
+
$('used_for_sort_by').disabled = false;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
setRowVisibility('is_wysiwyg_enabled', false);
|
119 |
+
setRowVisibility('is_html_allowed_on_front', false);
|
120 |
+
|
121 |
+
switch ($('frontend_input').value) {
|
122 |
+
case 'textarea':
|
123 |
+
setRowVisibility('is_wysiwyg_enabled', true);
|
124 |
+
if($('is_wysiwyg_enabled').value == '0'){
|
125 |
+
setRowVisibility('is_html_allowed_on_front', true);
|
126 |
+
$('is_html_allowed_on_front').disabled = false;
|
127 |
+
}
|
128 |
+
$('frontend_class').value = '';
|
129 |
+
$('frontend_class').disabled = true;
|
130 |
+
break;
|
131 |
+
case 'text':
|
132 |
+
setRowVisibility('is_html_allowed_on_front', true);
|
133 |
+
$('is_html_allowed_on_front').disabled = false;
|
134 |
+
|
135 |
+
if (!$('frontend_class').getAttribute('readonly')) {
|
136 |
+
$('frontend_class').disabled = false;
|
137 |
+
}
|
138 |
+
break;
|
139 |
+
case 'select':
|
140 |
+
case 'multiselect':
|
141 |
+
setRowVisibility('is_html_allowed_on_front', true);
|
142 |
+
$('is_html_allowed_on_front').disabled = false;
|
143 |
+
break;
|
144 |
+
default:
|
145 |
+
$('frontend_class').value = '';
|
146 |
+
$('frontend_class').disabled = true;
|
147 |
+
}
|
148 |
+
|
149 |
+
switchIsFilterable();
|
150 |
+
}
|
151 |
+
|
152 |
+
function switchIsFilterable()
|
153 |
+
{
|
154 |
+
if ($('is_filterable')) {
|
155 |
+
if ($('is_filterable').selectedIndex == 0) {
|
156 |
+
$('position').disabled = true;
|
157 |
+
} else {
|
158 |
+
if (!$('position').getAttribute('readonly')){
|
159 |
+
$('position').disabled = false;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
function disableApplyToValue(value)
|
166 |
+
{
|
167 |
+
var applyToSelect = $('apply_to');
|
168 |
+
for (i=0;i<applyToSelect.options.length;i++) {
|
169 |
+
if (value == applyToSelect.options[i].value) {
|
170 |
+
applyToSelect.options[i].disabled = true;
|
171 |
+
applyToSelect.options[i].selected = false;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
function switchDefaultValueField()
|
177 |
+
{
|
178 |
+
if (!$('frontend_input')) {
|
179 |
+
return;
|
180 |
+
}
|
181 |
+
|
182 |
+
var currentValue = $('frontend_input').value;
|
183 |
+
|
184 |
+
var defaultValueTextVisibility = false;
|
185 |
+
var defaultValueTextareaVisibility = false;
|
186 |
+
var defaultValueDateVisibility = false;
|
187 |
+
var defaultValueYesnoVisibility = false;
|
188 |
+
var scopeVisibility = true;
|
189 |
+
|
190 |
+
switch (currentValue) {
|
191 |
+
case 'select':
|
192 |
+
optionDefaultInputType = 'radio';
|
193 |
+
break;
|
194 |
+
|
195 |
+
case 'multiselect':
|
196 |
+
optionDefaultInputType = 'checkbox';
|
197 |
+
break;
|
198 |
+
|
199 |
+
case 'date':
|
200 |
+
defaultValueDateVisibility = true;
|
201 |
+
break;
|
202 |
+
|
203 |
+
case 'boolean':
|
204 |
+
defaultValueYesnoVisibility = true;
|
205 |
+
break;
|
206 |
+
|
207 |
+
case 'textarea':
|
208 |
+
defaultValueTextareaVisibility = true;
|
209 |
+
break;
|
210 |
+
|
211 |
+
case 'media_image':
|
212 |
+
defaultValueTextVisibility = false;
|
213 |
+
break;
|
214 |
+
case 'price':
|
215 |
+
scopeVisibility = false;
|
216 |
+
default:
|
217 |
+
defaultValueTextVisibility = true;
|
218 |
+
break;
|
219 |
+
}
|
220 |
+
|
221 |
+
var applyToSelect = $('apply_to');
|
222 |
+
switch (currentValue) {
|
223 |
+
<?php foreach (Mage::helper('catalog')->getAttributeDisabledTypes() as $type=>$disabled): ?>
|
224 |
+
case '<?php echo $type; ?>':
|
225 |
+
<?php foreach ($disabled as $one): ?>
|
226 |
+
disableApplyToValue('<?php echo $one; ?>');
|
227 |
+
<?php endforeach; ?>
|
228 |
+
break;
|
229 |
+
<?php endforeach; ?>
|
230 |
+
default:
|
231 |
+
for (i=0;i<applyToSelect.options.length;i++) {
|
232 |
+
applyToSelect.options[i].disabled = false;
|
233 |
+
}
|
234 |
+
break;
|
235 |
+
}
|
236 |
+
|
237 |
+
switch (currentValue) {
|
238 |
+
case 'media_image':
|
239 |
+
$('front_fieldset').previous().hide();
|
240 |
+
$('front_fieldset').hide();
|
241 |
+
|
242 |
+
setRowVisibility('is_required', false);
|
243 |
+
setRowVisibility('is_unique', false);
|
244 |
+
setRowVisibility('frontend_class', false);
|
245 |
+
break;
|
246 |
+
|
247 |
+
<?php foreach (Mage::helper('catalog')->getAttributeHiddenFields() as $type=>$fields): ?>
|
248 |
+
case '<?php echo $type; ?>':
|
249 |
+
<?php foreach ($fields as $one): ?>
|
250 |
+
<?php if ($one == '_front_fieldset'): ?>
|
251 |
+
$('front_fieldset').previous().hide();
|
252 |
+
$('front_fieldset').hide();
|
253 |
+
<?php elseif ($one == '_default_value'): ?>
|
254 |
+
defaultValueTextVisibility =
|
255 |
+
defaultValueTextareaVisibility =
|
256 |
+
defaultValueDateVisibility =
|
257 |
+
defaultValueYesnoVisibility = false;
|
258 |
+
<?php elseif ($one == '_scope'): ?>
|
259 |
+
scopeVisibility = false;
|
260 |
+
<?php else: ?>
|
261 |
+
setRowVisibility('<?php echo $one; ?>', false);
|
262 |
+
<?php endif; ?>
|
263 |
+
<?php endforeach; ?>
|
264 |
+
break;
|
265 |
+
<?php endforeach; ?>
|
266 |
+
|
267 |
+
default:
|
268 |
+
$('front_fieldset').previous().show();
|
269 |
+
$('front_fieldset').show();
|
270 |
+
setRowVisibility('is_required', true);
|
271 |
+
setRowVisibility('is_unique', true);
|
272 |
+
setRowVisibility('frontend_class', true);
|
273 |
+
setRowVisibility('is_configurable', true);
|
274 |
+
break;
|
275 |
+
}
|
276 |
+
|
277 |
+
setRowVisibility('default_value_text', defaultValueTextVisibility);
|
278 |
+
setRowVisibility('default_value_textarea', defaultValueTextareaVisibility);
|
279 |
+
setRowVisibility('default_value_date', defaultValueDateVisibility);
|
280 |
+
setRowVisibility('default_value_yesno', defaultValueYesnoVisibility);
|
281 |
+
setRowVisibility('is_global', scopeVisibility);
|
282 |
+
|
283 |
+
var elems = document.getElementsByName('default[]');
|
284 |
+
for (var i = 0; i < elems.length; i++) {
|
285 |
+
elems[i].type = optionDefaultInputType;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
function setRowVisibility(id, isVisible)
|
290 |
+
{
|
291 |
+
if ($(id)) {
|
292 |
+
var td = $(id).parentNode;
|
293 |
+
var tr = $(td.parentNode);
|
294 |
+
|
295 |
+
if (isVisible) {
|
296 |
+
tr.show();
|
297 |
+
} else {
|
298 |
+
tr.blur();
|
299 |
+
tr.hide();
|
300 |
+
}
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
function checkIsConfigurableVisibility()
|
305 |
+
{
|
306 |
+
if (!$('is_configurable') || !$('is_global') || !$('frontend_input')) return;
|
307 |
+
if ($F('is_global')==1 && $F('frontend_input')=='select') {
|
308 |
+
setRowVisibility('is_configurable', true);
|
309 |
+
} else {
|
310 |
+
setRowVisibility('is_configurable', false);
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
function updateRequriedOptions()
|
315 |
+
{
|
316 |
+
if ($F('frontend_input')=='select' && $F('is_required')==1) {
|
317 |
+
$('option-count-check').addClassName('required-options-count');
|
318 |
+
} else {
|
319 |
+
$('option-count-check').removeClassName('required-options-count');
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
if($('frontend_input')){
|
324 |
+
Event.observe($('frontend_input'), 'change', updateRequriedOptions);
|
325 |
+
Event.observe($('frontend_input'), 'change', bindAttributeInputType);
|
326 |
+
Event.observe($('is_global'), 'change', checkIsConfigurableVisibility);
|
327 |
+
}
|
328 |
+
|
329 |
+
if ($('is_filterable')) {
|
330 |
+
Event.observe($('is_filterable'), 'change', switchIsFilterable);
|
331 |
+
}
|
332 |
+
|
333 |
+
if ($('is_required')) {
|
334 |
+
Event.observe($('is_required'), 'change', updateRequriedOptions);
|
335 |
+
}
|
336 |
+
bindAttributeInputType();
|
337 |
+
//]]>
|
338 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/new/created.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
var added = false;
|
29 |
+
function addAttribute(closeAfter) {
|
30 |
+
if(window.opener!=null && !added) {
|
31 |
+
window.opener.Product.AttributesBridge.addAttributeRow(<?php echo $this->getAttributesBlockJson() ?>);
|
32 |
+
added = true;
|
33 |
+
}
|
34 |
+
|
35 |
+
if(closeAfter)
|
36 |
+
{
|
37 |
+
closeWindow();
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
function closeWindow()
|
42 |
+
{
|
43 |
+
if (window.opener) {
|
44 |
+
window.opener.focus();
|
45 |
+
}
|
46 |
+
window.close();
|
47 |
+
}
|
48 |
+
|
49 |
+
addAttribute(false);
|
50 |
+
setTimeout(closeWindow, 3000);
|
51 |
+
</script>
|
52 |
+
<div class="a-center">
|
53 |
+
<?php echo $this->getCloseButtonHtml() ?>
|
54 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/options.phtml
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Attribute options control
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div>
|
35 |
+
<ul class="messages">
|
36 |
+
<li class="notice-msg">
|
37 |
+
<ul>
|
38 |
+
<li><?php echo Mage::helper('catalog')->__('If you do not specify an option value for a specific store view then the default (Admin) value will be used.') ?></li>
|
39 |
+
</ul>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<div class="entity-edit">
|
45 |
+
<div class="entry-edit-head">
|
46 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Manage Titles (Size, Color, etc.)') ?></h4>
|
47 |
+
</div>
|
48 |
+
<div class="box">
|
49 |
+
<div class="hor-scroll">
|
50 |
+
<table class="dynamic-grid" cellspacing="0" id="attribute-labels-table">
|
51 |
+
<tr>
|
52 |
+
<?php foreach ($this->getStores() as $_store): ?>
|
53 |
+
<th><?php echo $_store->getName() ?></th>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</tr>
|
56 |
+
<tr>
|
57 |
+
<?php $_labels = $this->getLabelValues() ?>
|
58 |
+
<?php foreach ($this->getStores() as $_store): ?>
|
59 |
+
<td>
|
60 |
+
<input class="input-text<?php if($_store->getId()==0): ?> required-option<?php endif; ?>" type="text" name="frontend_label[<?php echo $_store->getId() ?>]" value="<?php echo $this->htmlEscape($_labels[$_store->getId()]) ?>"<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
|
61 |
+
</td>
|
62 |
+
<?php endforeach; ?>
|
63 |
+
</tr>
|
64 |
+
</table>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<br/>
|
69 |
+
<div class="entity-edit" id="matage-options-panel">
|
70 |
+
<div class="entry-edit-head">
|
71 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Manage Options (values of your attribute)') ?></h4>
|
72 |
+
</div>
|
73 |
+
<div class="box">
|
74 |
+
<div class="hor-scroll">
|
75 |
+
<table class="dynamic-grid" cellspacing="0" cellpadding="0">
|
76 |
+
<tr id="attribute-options-table">
|
77 |
+
<?php foreach ($this->getStores() as $_store): ?>
|
78 |
+
<th><?php echo $_store->getName() ?></th>
|
79 |
+
<?php endforeach; ?>
|
80 |
+
<th><?php echo Mage::helper('catalog')->__('Position') ?></th>
|
81 |
+
<th class="nobr a-center"><?php echo Mage::helper('catalog')->__('Is Default') ?></th>
|
82 |
+
<th>
|
83 |
+
<?php if (!$this->getReadOnly()):?>
|
84 |
+
<?php echo $this->getAddNewButtonHtml() ?>
|
85 |
+
<?php endif;?>
|
86 |
+
</th>
|
87 |
+
</tr>
|
88 |
+
<tr class="no-display template" id="row-template">
|
89 |
+
<?php foreach ($this->getStores() as $_store): ?>
|
90 |
+
<td><input name="option[value][{{id}}][<?php echo $_store->getId() ?>]" value="{{store<?php echo $_store->getId() ?>}}" class="input-text<?php if($_store->getId()==0): ?> required-option<?php endif; ?>" type="text" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/></td>
|
91 |
+
<?php endforeach; ?>
|
92 |
+
<td class="a-center"><input class="input-text" type="text" name="option[order][{{id}}]" value="{{sort_order}}" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/></td>
|
93 |
+
<td><input class="input-radio" type="radio" name="default[]" value="{{id}}" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/></td>
|
94 |
+
<td class="a-left">
|
95 |
+
<input type="hidden" class="delete-flag" name="option[delete][{{id}}]" value="" />
|
96 |
+
<?php if (!$this->getReadOnly()):?>
|
97 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
98 |
+
<?php endif;?>
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
</table>
|
102 |
+
</div>
|
103 |
+
<input type="hidden" id="option-count-check" value="" />
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
<script type="text/javascript">
|
107 |
+
//<![CDATA[
|
108 |
+
var optionDefaultInputType = 'radio';
|
109 |
+
|
110 |
+
// IE removes quotes from element.innerHTML whenever it thinks they're not needed, which breaks html.
|
111 |
+
var templateText =
|
112 |
+
'<tr class="option-row">'+
|
113 |
+
<?php foreach ($this->getStores() as $_store): ?>
|
114 |
+
'<td><input name="option[value][{{id}}][<?php echo $_store->getId() ?>]" value="{{store<?php echo $_store->getId() ?>}}" class="input-text<?php if($_store->getId()==0): ?> required-option<?php endif; ?>" type="text" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/><\/td>'+
|
115 |
+
<?php endforeach; ?>
|
116 |
+
'<td><input class="input-text" type="text" name="option[order][{{id}}]" value="{{sort_order}}" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/><\/td>'+
|
117 |
+
'<td class="a-center"><input class="input-radio" type="{{intype}}" name="default[]" value="{{id}}" {{checked}} <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/><\/td>'+
|
118 |
+
'<td class="a-left" id="delete_button_container_{{id}}">'+
|
119 |
+
'<input type="hidden" class="delete-flag" name="option[delete][{{id}}]" value="" />'+
|
120 |
+
<?php if (!$this->getReadOnly()):?>
|
121 |
+
'<?php echo $this->getDeleteButtonHtml() ?>'+
|
122 |
+
<?php endif;?>
|
123 |
+
'<\/td>'+
|
124 |
+
'<\/tr>';
|
125 |
+
|
126 |
+
var attributeOption = {
|
127 |
+
table : $('attribute-options-table'),
|
128 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
129 |
+
templateText : templateText,
|
130 |
+
itemCount : 0,
|
131 |
+
totalItems : 0,
|
132 |
+
isReadOnly: <?php echo (int)$this->getReadOnly(); ?>,
|
133 |
+
add : function(data) {
|
134 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
135 |
+
var isNewOption = false;
|
136 |
+
if(!data.id){
|
137 |
+
data = {};
|
138 |
+
data.id = 'option_'+this.itemCount;
|
139 |
+
isNewOption = true;
|
140 |
+
}
|
141 |
+
if (!data.intype)
|
142 |
+
data.intype = optionDefaultInputType;
|
143 |
+
Element.insert(this.table, {after: this.template.evaluate(data)});
|
144 |
+
if (isNewOption && !this.isReadOnly) {
|
145 |
+
this.enableNewOptionDeleteButton(data.id);
|
146 |
+
}
|
147 |
+
this.bindRemoveButtons();
|
148 |
+
this.itemCount++;
|
149 |
+
this.totalItems++;
|
150 |
+
this.updateItemsCountField();
|
151 |
+
},
|
152 |
+
remove : function(event){
|
153 |
+
var element = $(Event.findElement(event, 'tr')); // !!! Button already
|
154 |
+
// have table parent in safari
|
155 |
+
// Safari workaround
|
156 |
+
element.ancestors().each(function(parentItem){
|
157 |
+
if (parentItem.hasClassName('option-row')) {
|
158 |
+
element = parentItem;
|
159 |
+
throw $break;
|
160 |
+
} else if (parentItem.hasClassName('box')) {
|
161 |
+
throw $break;
|
162 |
+
}
|
163 |
+
});
|
164 |
+
|
165 |
+
|
166 |
+
if(element){
|
167 |
+
var elementFlags = element.getElementsByClassName('delete-flag');
|
168 |
+
if(elementFlags[0]){
|
169 |
+
elementFlags[0].value=1;
|
170 |
+
}
|
171 |
+
|
172 |
+
element.addClassName('no-display');
|
173 |
+
element.addClassName('template');
|
174 |
+
element.hide();
|
175 |
+
this.totalItems--;
|
176 |
+
this.updateItemsCountField();
|
177 |
+
}
|
178 |
+
},
|
179 |
+
updateItemsCountField: function() {
|
180 |
+
if (this.totalItems > 0) {
|
181 |
+
$('option-count-check').value = '1';
|
182 |
+
} else {
|
183 |
+
$('option-count-check').value = '';
|
184 |
+
}
|
185 |
+
},
|
186 |
+
enableNewOptionDeleteButton: function(id) {
|
187 |
+
$$('#delete_button_container_' + id + ' button').each(function(button) {
|
188 |
+
button.enable();
|
189 |
+
button.removeClassName('disabled');
|
190 |
+
});
|
191 |
+
},
|
192 |
+
bindRemoveButtons : function(){
|
193 |
+
var buttons = $$('.delete-option');
|
194 |
+
for(var i=0;i<buttons.length;i++){
|
195 |
+
if(!$(buttons[i]).binded){
|
196 |
+
$(buttons[i]).binded = true;
|
197 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
}
|
203 |
+
if($('row-template')){
|
204 |
+
$('row-template').remove();
|
205 |
+
}
|
206 |
+
attributeOption.bindRemoveButtons();
|
207 |
+
|
208 |
+
if($('add_new_option_button')){
|
209 |
+
Event.observe('add_new_option_button', 'click', attributeOption.add.bind(attributeOption));
|
210 |
+
}
|
211 |
+
Validation.addAllThese([
|
212 |
+
['required-option', '<?php echo Mage::helper('catalog')->__('Failed') ?>', function(v) {
|
213 |
+
return !Validation.get('IsEmpty').test(v);
|
214 |
+
}]]);
|
215 |
+
Validation.addAllThese([
|
216 |
+
['required-options-count', '<?php echo Mage::helper('catalog')->__('Options is required') ?>', function(v) {
|
217 |
+
return !Validation.get('IsEmpty').test(v);
|
218 |
+
}]]);
|
219 |
+
<?php foreach ($this->getOptionValues() as $_value): ?>
|
220 |
+
attributeOption.add(<?php echo $_value->toJson() ?>);
|
221 |
+
<?php endforeach; ?>
|
222 |
+
//]]>
|
223 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/set/main.phtml
ADDED
@@ -0,0 +1,461 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-product-attribute-sets"><?php echo $this->htmlEscape($this->_getHeader()) ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php echo $this->getBackButtonHtml() ?>
|
33 |
+
<?php echo $this->getResetButtonHtml() ?>
|
34 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
35 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
</div>
|
40 |
+
<table cellspacing="0" width="100%">
|
41 |
+
<tr>
|
42 |
+
<td width="360" style="border-right:1px solid #ddd; padding:0 23px 23px 0;" class="edit-attribute-set">
|
43 |
+
<?php echo $this->getSetFormHtml() ?>
|
44 |
+
</td>
|
45 |
+
<td width="320" style="border-right:1px solid #ddd; padding:0 23px 23px 23px;">
|
46 |
+
<div class="content-header skip-header">
|
47 |
+
<table cellspacing="0">
|
48 |
+
<tbody>
|
49 |
+
<tr>
|
50 |
+
<td><h3><?php echo Mage::helper('catalog')->__('Groups') ?></h3></td>
|
51 |
+
</tr>
|
52 |
+
</tbody>
|
53 |
+
</table>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<?php if (!$this->getIsReadOnly()): ?>
|
57 |
+
<p><?php echo $this->getAddGroupButton() ?> <?php echo $this->getDeleteGroupButton() ?></p>
|
58 |
+
<p class="note-block"><?php echo Mage::helper('catalog')->__('Double click on a group to rename it') ?></p>
|
59 |
+
<?php endif; ?>
|
60 |
+
|
61 |
+
<?php echo $this->getSetsFilterHtml() ?>
|
62 |
+
<?php echo $this->getGroupTreeHtml() ?>
|
63 |
+
</td>
|
64 |
+
<td style="padding:0 0 23px 23px;">
|
65 |
+
<div class="content-header skip-header">
|
66 |
+
<table cellspacing="0">
|
67 |
+
<tbody>
|
68 |
+
<tr>
|
69 |
+
<td><h3><?php echo Mage::helper('catalog')->__('Unassigned Attributes') ?></h3></td>
|
70 |
+
</tr>
|
71 |
+
</tbody>
|
72 |
+
</table>
|
73 |
+
</div>
|
74 |
+
<div id="tree-div2" style="height:400px; margin-top:5px;overflow:auto"></div>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
var allowDragAndDrop = <?php echo ($this->getIsReadOnly() ? 'false' : 'true'); ?>;
|
78 |
+
var canEditGroups = <?php echo ($this->getIsReadOnly() ? 'false' : 'true'); ?>;
|
79 |
+
|
80 |
+
var TreePanels = function() {
|
81 |
+
// shorthand
|
82 |
+
var Tree = Ext.tree;
|
83 |
+
|
84 |
+
return {
|
85 |
+
init : function(){
|
86 |
+
// yui-ext tree
|
87 |
+
|
88 |
+
var tree = new Ext.tree.TreePanel('tree-div1', {
|
89 |
+
animate:false,
|
90 |
+
loader: false,
|
91 |
+
enableDD:allowDragAndDrop,
|
92 |
+
containerScroll: true,
|
93 |
+
rootVisible: false
|
94 |
+
});
|
95 |
+
|
96 |
+
// set the root node
|
97 |
+
this.root = new Ext.tree.TreeNode({
|
98 |
+
text: 'ROOT',
|
99 |
+
allowDrug:false,
|
100 |
+
allowDrop:true,
|
101 |
+
id:'1'
|
102 |
+
});
|
103 |
+
|
104 |
+
tree.setRootNode(this.root);
|
105 |
+
buildCategoryTree(this.root, <?php echo $this->getGroupTreeJson() ?>);
|
106 |
+
// render the tree
|
107 |
+
tree.render();
|
108 |
+
this.root.expand(false, false);
|
109 |
+
tree.expandAll();
|
110 |
+
|
111 |
+
this.ge = new Ext.tree.TreeEditor(tree, {
|
112 |
+
allowBlank:false,
|
113 |
+
blankText:'<?php echo Mage::helper('catalog')->__('A name is required') ?>',
|
114 |
+
selectOnFocus:true,
|
115 |
+
cls:'folder'
|
116 |
+
});
|
117 |
+
|
118 |
+
this.root.addListener('beforeinsert', editSet.leftBeforeInsert);
|
119 |
+
this.root.addListener('beforeappend', editSet.leftBeforeInsert);
|
120 |
+
|
121 |
+
//this.ge.addListener('beforerender', editSet.editGroup);
|
122 |
+
this.ge.addListener('beforeshow', editSet.editGroup);
|
123 |
+
this.ge.addListener('beforecomplete', editSet.beforeRenameGroup);
|
124 |
+
//this.ge.addListener('startedit', editSet.editGroup);
|
125 |
+
|
126 |
+
//-------------------------------------------------------------
|
127 |
+
|
128 |
+
var tree2 = new Ext.tree.TreePanel('tree-div2', {
|
129 |
+
animate:false,
|
130 |
+
loader: false,
|
131 |
+
enableDD:allowDragAndDrop,
|
132 |
+
containerScroll: true,
|
133 |
+
rootVisible: false,
|
134 |
+
lines:false
|
135 |
+
});
|
136 |
+
|
137 |
+
// set the root node
|
138 |
+
this.root2 = new Ext.tree.TreeNode({
|
139 |
+
text: 'ROOT',
|
140 |
+
draggable:false,
|
141 |
+
id:'free'
|
142 |
+
});
|
143 |
+
tree2.setRootNode(this.root2);
|
144 |
+
buildCategoryTree(this.root2, <?php echo $this->getAttributeTreeJson() ?>);
|
145 |
+
|
146 |
+
this.root2.addListener('beforeinsert', editSet.rightBeforeInsert);
|
147 |
+
this.root2.addListener('beforeappend', editSet.rightBeforeAppend);
|
148 |
+
|
149 |
+
this.root2.addListener('append', editSet.rightAppend);
|
150 |
+
this.root2.addListener('remove', editSet.rightRemove);
|
151 |
+
// render the tree
|
152 |
+
tree2.render();
|
153 |
+
this.root2.expand(false, false);
|
154 |
+
tree2.expandAll();
|
155 |
+
},
|
156 |
+
|
157 |
+
rebuildTrees : function(){
|
158 |
+
editSet.req.attributes = new Array();
|
159 |
+
rootNode = TreePanels.root;
|
160 |
+
var gIterator = 0;
|
161 |
+
for( i in rootNode.childNodes ) {
|
162 |
+
if(rootNode.childNodes[i].id) {
|
163 |
+
var group = rootNode.childNodes[i];
|
164 |
+
editSet.req.groups[gIterator] = new Array(group.id, group.attributes.text.strip(), (gIterator+1));
|
165 |
+
var iterator = 0
|
166 |
+
for( j in group.childNodes ) {
|
167 |
+
iterator ++;
|
168 |
+
if( group.childNodes[j].id > 0 ) {
|
169 |
+
editSet.req.attributes[group.childNodes[j].id] = new Array(group.childNodes[j].id, group.id, iterator, group.childNodes[j].attributes.entity_id);
|
170 |
+
}
|
171 |
+
}
|
172 |
+
iterator = 0;
|
173 |
+
}
|
174 |
+
gIterator ++;
|
175 |
+
}
|
176 |
+
|
177 |
+
editSet.req.not_attributes = new Array();
|
178 |
+
rootNode = TreePanels.root2;
|
179 |
+
|
180 |
+
var iterator = 0;
|
181 |
+
for( i in rootNode.childNodes ) {
|
182 |
+
if(rootNode.childNodes[i].id) {
|
183 |
+
if( rootNode.childNodes[i].id > 0 ) {
|
184 |
+
editSet.req.not_attributes[iterator] = rootNode.childNodes[i].attributes.entity_id;
|
185 |
+
}
|
186 |
+
iterator ++;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
}
|
190 |
+
};
|
191 |
+
}();
|
192 |
+
|
193 |
+
function buildCategoryTree(parent, config){
|
194 |
+
if (!config) return null;
|
195 |
+
if (parent && config && config.length){
|
196 |
+
for (var i = 0; i < config.length; i++) {
|
197 |
+
var node = new Ext.tree.TreeNode(config[i]);
|
198 |
+
parent.appendChild(node);
|
199 |
+
node.addListener('click', editSet.register);
|
200 |
+
node.addListener('beforemove', editSet.groupBeforeMove);
|
201 |
+
node.addListener('beforeinsert', editSet.groupBeforeInsert);
|
202 |
+
node.addListener('beforeappend', editSet.groupBeforeInsert);
|
203 |
+
if( config[i].children ) {
|
204 |
+
for( j in config[i].children ) {
|
205 |
+
if(config[i].children[j].id) {
|
206 |
+
newNode = new Ext.tree.TreeNode(config[i].children[j]);
|
207 |
+
node.appendChild(newNode);
|
208 |
+
newNode.addListener('click', editSet.unregister);
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
var editSet = function() {
|
217 |
+
return {
|
218 |
+
register : function(node) {
|
219 |
+
editSet.currentNode = node;
|
220 |
+
},
|
221 |
+
|
222 |
+
unregister : function() {
|
223 |
+
editSet.currentNode = false;
|
224 |
+
},
|
225 |
+
|
226 |
+
submit : function() {
|
227 |
+
if( TreePanels.root.firstChild == TreePanels.root.lastChild ) {
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
|
231 |
+
if( editSet.SystemNodesExists(editSet.currentNode) ) {
|
232 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('This group contains system attributes. Please move system attributes to another group and try again.')) ?>');
|
233 |
+
return;
|
234 |
+
}
|
235 |
+
|
236 |
+
if (editSet.ConfigurableNodeExists(editSet.currentNode)) {
|
237 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('This group contains attributes, used in configurable products. Please move these attributes to another group and try again.')) ?>');
|
238 |
+
return;
|
239 |
+
}
|
240 |
+
|
241 |
+
if( editSet.currentNode && editSet.currentNode.attributes.cls == 'folder' ) {
|
242 |
+
TreePanels.root.removeChild(editSet.currentNode);
|
243 |
+
for( i in editSet.currentNode.childNodes ) {
|
244 |
+
if( editSet.currentNode.childNodes[i].id ) {
|
245 |
+
child = editSet.currentNode.childNodes[i];
|
246 |
+
newNode = new Ext.tree.TreeNode(child.attributes);
|
247 |
+
|
248 |
+
if( child.attributes.is_user_defined == 1 ) {
|
249 |
+
TreePanels.root2.appendChild(newNode);
|
250 |
+
}
|
251 |
+
}
|
252 |
+
}
|
253 |
+
editSet.req.removeGroups[editSet.currentNode.id] = editSet.currentNode.id;
|
254 |
+
editSet.currentNode = false;
|
255 |
+
}
|
256 |
+
},
|
257 |
+
|
258 |
+
SystemNodesExists : function(currentNode) {
|
259 |
+
for( i in currentNode.childNodes ) {
|
260 |
+
if( currentNode.childNodes[i].id ) {
|
261 |
+
child = editSet.currentNode.childNodes[i];
|
262 |
+
if( child.attributes.is_user_defined != 1 ) {
|
263 |
+
return true;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
}
|
267 |
+
},
|
268 |
+
|
269 |
+
ConfigurableNodeExists : function(currentNode) {
|
270 |
+
for (var i in currentNode.childNodes ) {
|
271 |
+
if (currentNode.childNodes[i].id) {
|
272 |
+
child = editSet.currentNode.childNodes[i];
|
273 |
+
if (child.attributes.is_configurable) {
|
274 |
+
return true;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
return false;
|
279 |
+
},
|
280 |
+
|
281 |
+
rightAppend : function(node) {
|
282 |
+
return;
|
283 |
+
},
|
284 |
+
|
285 |
+
addGroup : function() {
|
286 |
+
var group_name = prompt("<?php echo Mage::helper('catalog')->__('Please enter a new group name') ?>","");
|
287 |
+
group_name = group_name.strip();
|
288 |
+
if( group_name == '' ) {
|
289 |
+
this.addGroup();
|
290 |
+
} else if( group_name != false && group_name != null && group_name != '' ) {
|
291 |
+
|
292 |
+
if (!editSet.validateGroupName(group_name, 0)) {
|
293 |
+
return;
|
294 |
+
}
|
295 |
+
|
296 |
+
var newNode = new Ext.tree.TreeNode({
|
297 |
+
text : group_name.escapeHTML(),
|
298 |
+
cls : 'folder',
|
299 |
+
allowDrop : true,
|
300 |
+
allowDrag : true
|
301 |
+
});
|
302 |
+
TreePanels.root.appendChild(newNode);
|
303 |
+
newNode.addListener('beforemove', editSet.groupBeforeMove);
|
304 |
+
newNode.addListener('beforeinsert', editSet.groupBeforeInsert);
|
305 |
+
newNode.addListener('beforeappend', editSet.groupBeforeInsert);
|
306 |
+
newNode.addListener('click', editSet.register);
|
307 |
+
}
|
308 |
+
},
|
309 |
+
|
310 |
+
editGroup : function(obj) {
|
311 |
+
if( obj.editNode.attributes.cls != 'folder' || !canEditGroups) {
|
312 |
+
TreePanels.ge.cancelEdit();
|
313 |
+
return false;
|
314 |
+
}
|
315 |
+
},
|
316 |
+
|
317 |
+
beforeRenameGroup : function(obj, after, before) {
|
318 |
+
return editSet.validateGroupName(after, obj.editNode.id);
|
319 |
+
},
|
320 |
+
|
321 |
+
validateGroupName : function(name, exceptNodeId) {
|
322 |
+
name = name.strip();
|
323 |
+
if (name === '') {
|
324 |
+
return false;
|
325 |
+
}
|
326 |
+
for (var i=0; i < TreePanels.root.childNodes.length; i++) {
|
327 |
+
if (TreePanels.root.childNodes[i].text.toLowerCase() == name.toLowerCase() && TreePanels.root.childNodes[i].id != exceptNodeId) {
|
328 |
+
errorText = "<?php echo Mage::helper('catalog')->__('Attribute group with the \"/name/\" name already exists') ?>";
|
329 |
+
alert(errorText.replace("/name/",name));
|
330 |
+
return false;
|
331 |
+
}
|
332 |
+
}
|
333 |
+
return true;
|
334 |
+
},
|
335 |
+
|
336 |
+
save : function() {
|
337 |
+
$('messages').update();
|
338 |
+
TreePanels.rebuildTrees();
|
339 |
+
var _validator = new Validation('set_prop_form', {onSubmit:false});
|
340 |
+
if( !_validator.validate() ) {
|
341 |
+
return;
|
342 |
+
}
|
343 |
+
editSet.req.attribute_set_name = $('attribute_set_name').value;
|
344 |
+
if (!editSet.req.form_key) {
|
345 |
+
editSet.req.form_key = FORM_KEY;
|
346 |
+
}
|
347 |
+
var req = {data : Ext.util.JSON.encode(editSet.req)};
|
348 |
+
var con = new Ext.lib.Ajax.request('POST', '<?php echo $this->getMoveUrl() ?>', {success:editSet.success,failure:editSet.failure}, req);
|
349 |
+
},
|
350 |
+
|
351 |
+
success : function(o) {
|
352 |
+
var response = Ext.util.JSON.decode(o.responseText);
|
353 |
+
if( response.error ) {
|
354 |
+
$('messages').update(response.message);
|
355 |
+
} else if( response.ajaxExpired && response.ajaxRedirect ){
|
356 |
+
setLocation(response.ajaxRedirect);
|
357 |
+
} else if( response.url ){
|
358 |
+
setLocation(response.url);
|
359 |
+
} else if( response.message ) {
|
360 |
+
$('messages').update(response.message);
|
361 |
+
}
|
362 |
+
},
|
363 |
+
|
364 |
+
failure : function(o) {
|
365 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('Unable to complete this request.')) ?>');
|
366 |
+
},
|
367 |
+
|
368 |
+
groupBeforeMove : function(tree, nodeThis, oldParent, newParent) {
|
369 |
+
if( newParent.attributes.cls == 'folder' && nodeThis.attributes.cls == 'folder' ) {
|
370 |
+
return false;
|
371 |
+
}
|
372 |
+
|
373 |
+
if( newParent == TreePanels.root && nodeThis.attributes.cls != 'folder' ) {
|
374 |
+
return false;
|
375 |
+
}
|
376 |
+
},
|
377 |
+
|
378 |
+
rightBeforeAppend : function(tree, nodeThis, node, newParent) {
|
379 |
+
if (node.attributes.is_user_defined == 0) {
|
380 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('You cannot remove system attribute from this set.')) ?>');
|
381 |
+
return false;
|
382 |
+
}
|
383 |
+
else if (node.attributes.is_configurable == 1) {
|
384 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
|
385 |
+
return false;
|
386 |
+
}
|
387 |
+
else {
|
388 |
+
return true;
|
389 |
+
}
|
390 |
+
},
|
391 |
+
|
392 |
+
rightBeforeInsert : function(tree, nodeThis, node, newParent) {
|
393 |
+
var empty = TreePanels.root2.findChild('id', 'empty');
|
394 |
+
if( empty ) {
|
395 |
+
return false;
|
396 |
+
}
|
397 |
+
|
398 |
+
if (node.attributes.is_user_defined == 0) {
|
399 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('You cannot remove system attribute from this set.')) ?>');
|
400 |
+
return false;
|
401 |
+
}
|
402 |
+
else if (node.attributes.is_configurable == 1) {
|
403 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('catalog')->__('This attribute is used in configurable products. You cannot remove it from the attribute set.')) ?>');
|
404 |
+
return false;
|
405 |
+
}
|
406 |
+
else {
|
407 |
+
return true;
|
408 |
+
}
|
409 |
+
},
|
410 |
+
|
411 |
+
groupBeforeInsert : function(tree, nodeThis, node, newParent) {
|
412 |
+
if( node.allowChildren ) {
|
413 |
+
return false;
|
414 |
+
}
|
415 |
+
},
|
416 |
+
|
417 |
+
rightAppend : function(tree, nodeThis, node) {
|
418 |
+
var empty = TreePanels.root2.findChild('id', 'empty');
|
419 |
+
if( empty && node.id != 'empty' ) {
|
420 |
+
TreePanels.root2.removeChild(empty);
|
421 |
+
}
|
422 |
+
},
|
423 |
+
|
424 |
+
rightRemove : function(tree, nodeThis, node) {
|
425 |
+
if( nodeThis.firstChild == null && node.id != 'empty' ) {
|
426 |
+
var newNode = new Ext.tree.TreeNode({
|
427 |
+
text : '<?php echo Mage::helper('catalog')->__('Empty') ?>',
|
428 |
+
id : 'empty',
|
429 |
+
cls : 'folder',
|
430 |
+
is_user_defined : 1,
|
431 |
+
allowDrop : false,
|
432 |
+
allowDrag : false
|
433 |
+
});
|
434 |
+
TreePanels.root2.appendChild(newNode);
|
435 |
+
}
|
436 |
+
},
|
437 |
+
|
438 |
+
leftBeforeInsert : function(tree, nodeThis, node, newParent) {
|
439 |
+
if( node.allowChildren == false ) {
|
440 |
+
return false;
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
444 |
+
}();
|
445 |
+
|
446 |
+
function initVars() {
|
447 |
+
editSet.req = {};
|
448 |
+
editSet.req.attributes = false;
|
449 |
+
editSet.req.groups = new Array();
|
450 |
+
editSet.req.not_attributes = false;
|
451 |
+
editSet.req.attribute_set_name = false;
|
452 |
+
editSet.req.removeGroups = new Array();
|
453 |
+
}
|
454 |
+
|
455 |
+
initVars();
|
456 |
+
Ext.EventManager.onDocumentReady(TreePanels.init, TreePanels, true);
|
457 |
+
//]]>
|
458 |
+
</script>
|
459 |
+
</td>
|
460 |
+
</tr>
|
461 |
+
</table>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/set/main/tree/attribute.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/set/main/tree/group.phtml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="tree-div1" style="width:320px;height:400px;margin-top:5px;overflow:auto"></div>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/add.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-product-attribute-sets"><?php echo $this->_getHeader() ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php echo $this->getBackButtonHtml() ?>
|
33 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
</table>
|
37 |
+
</div>
|
38 |
+
<?php echo $this->getFormHtml() ?>
|
39 |
+
<script type="text/javascript">
|
40 |
+
var addSet = new varienForm('<?php echo $this->getFormId() ?>');
|
41 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/attribute/set/toolbar/main.phtml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-product-attribute-sets"><?php echo $this->_getHeader() ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php echo $this->getNewButtonHtml() ?>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/composite/configure.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div id="popup-window-mask" style="display:none;"></div>
|
28 |
+
<div id="product_composite_configure" class="product-configure-popup" style="display:none;">
|
29 |
+
<iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe" src="#" style="width:0; height:0; border:0px solid #fff; position:absolute; top:-1000px; left:-1000px" onload="window.productConfigure && productConfigure.onLoadIFrame()"></iframe>
|
30 |
+
<form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data" onsubmit="productConfigure.onConfirmBtn(); return false;" target="product_composite_configure_iframe">
|
31 |
+
<div class="entry-edit">
|
32 |
+
<div class="entry-edit-head">
|
33 |
+
<h4 class="icon-head fieldset-legend"><?php echo Mage::helper('catalog')->__('Configure Product') ?></h4>
|
34 |
+
</div>
|
35 |
+
<div id="product_composite_configure_messages" style="display: none;" >
|
36 |
+
<ul class="messages"><li class="error-msg"></li></ul>
|
37 |
+
</div>
|
38 |
+
<div id="product_composite_configure_form_fields" class="content"></div>
|
39 |
+
<div id="product_composite_configure_form_additional" style="display:none;"></div>
|
40 |
+
<div id="product_composite_configure_form_confirmed" style="display:none;"></div>
|
41 |
+
<div class="buttons-set a-right">
|
42 |
+
<button type="button" class="scalable" onclick="productConfigure.onCancelBtn()" id="product_composite_configure_form_cancel"><span><span><span><?php echo Mage::helper('catalog')->__('Cancel') ?></span></span></span></button>
|
43 |
+
<button type="submit" class="scalable"><span><span><span><?php echo Mage::helper('catalog')->__('OK') ?></span></span></span></button>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<input type="hidden" name="as_js_varname" value="iFrameResponse" />
|
47 |
+
<input type="hidden" name="form_key" value="<?php echo $this->getFormKey() ?>" />
|
48 |
+
</form>
|
49 |
+
<div id="product_composite_configure_confirmed" style="display:none;"></div>
|
50 |
+
|
51 |
+
<script type="text/javascript">
|
52 |
+
var productCompositeConfigureForm = new varienForm('product_composite_configure_form');
|
53 |
+
</script>
|
54 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/configurable.phtml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php /* @var $this Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Configurable */ ?>
|
29 |
+
<?php $_product = $this->getProduct(); ?>
|
30 |
+
<?php $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); ?>
|
31 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
32 |
+
<?php if (($_product->isSaleable() || $_skipSaleableCheck) && count($_attributes)):?>
|
33 |
+
<div id="catalog_product_composite_configure_fields_configurable" class="<?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
34 |
+
<h4><?php echo Mage::helper('catalog')->__('Associated Products') ?></h4>
|
35 |
+
<div class="product-options">
|
36 |
+
<dl>
|
37 |
+
<?php foreach($_attributes as $_attribute): ?>
|
38 |
+
<dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
|
39 |
+
<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
|
40 |
+
<div class="input-box">
|
41 |
+
<select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
|
42 |
+
<option><?php echo Mage::helper('catalog')->__('Choose an Option...') ?></option>
|
43 |
+
</select>
|
44 |
+
</div>
|
45 |
+
</dd>
|
46 |
+
<?php endforeach; ?>
|
47 |
+
</dl>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<script type="text/javascript">
|
51 |
+
var config = <?php echo $this->getJsonConfig() ?>;
|
52 |
+
if (window.productConfigure) {
|
53 |
+
config.containerId = window.productConfigure.blockFormFields.id;
|
54 |
+
if (window.productConfigure.restorePhase) {
|
55 |
+
config.inputsInitialized = true;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
ProductConfigure.spConfig = new Product.Config(config);
|
59 |
+
</script>
|
60 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/grouped.phtml
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php /* @var $this Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Grouped */ ?>
|
29 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
30 |
+
<div id="catalog_product_composite_configure_fields_grouped" class="grid <?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
31 |
+
<h4><?php echo Mage::helper('catalog')->__('Associated Products') ?></h4>
|
32 |
+
<div class="product-options">
|
33 |
+
<?php $_product = $this->getProduct(); ?>
|
34 |
+
<?php $this->setPreconfiguredValue(); ?>
|
35 |
+
<?php $_associatedProducts = $this->getAssociatedProducts(); ?>
|
36 |
+
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
|
37 |
+
<?php if ((!$_product->isAvailable() && !$_skipSaleableCheck) || !$_hasAssociatedProducts): ?>
|
38 |
+
<p class="availability out-of-stock"><?php echo Mage::helper('catalog')->__('Availability:') ?> <span><?php echo Mage::helper('catalog')->__('Out of stock') ?></span></p>
|
39 |
+
<?php endif; ?>
|
40 |
+
<table class="data-table grouped-items-table" id="super-product-table">
|
41 |
+
<col />
|
42 |
+
<col />
|
43 |
+
<col />
|
44 |
+
<col />
|
45 |
+
<col width="1" />
|
46 |
+
<thead>
|
47 |
+
<tr "class="headings">
|
48 |
+
<th><?php echo Mage::helper('catalog')->__('ID') ?></th>
|
49 |
+
<th><?php echo Mage::helper('catalog')->__('SKU') ?></th>
|
50 |
+
<th><?php echo Mage::helper('catalog')->__('Product Name') ?></th>
|
51 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
52 |
+
<th class="a-right"><?php echo Mage::helper('catalog')->__('Price') ?></th>
|
53 |
+
<?php endif; ?>
|
54 |
+
<?php if ($_product->isSaleable() || $_skipSaleableCheck): ?>
|
55 |
+
<th class="a-center"><?php echo Mage::helper('catalog')->__('Qty') ?></th>
|
56 |
+
<?php endif; ?>
|
57 |
+
</tr>
|
58 |
+
</thead>
|
59 |
+
<tbody>
|
60 |
+
<?php if ($_hasAssociatedProducts): ?>
|
61 |
+
<?php $i = 0 ?>
|
62 |
+
<?php foreach ($_associatedProducts as $_item): ?>
|
63 |
+
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
|
64 |
+
<tr class="<?php echo (++$i % 2) ? 'even' : 'odd' ?>">
|
65 |
+
<td><?php echo $_item->getId() ?></td>
|
66 |
+
<td><?php echo $this->escapeHtml($_item->getSku()) ?></td>
|
67 |
+
<td><?php echo $this->escapeHtml($_item->getName()) ?></td>
|
68 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
69 |
+
<td class="a-right">
|
70 |
+
<?php if ($this->getCanShowProductPrice($_item)): ?>
|
71 |
+
<?php echo $this->getPriceHtml($_item, true) ?>
|
72 |
+
<?php endif; ?>
|
73 |
+
</td>
|
74 |
+
<?php endif; ?>
|
75 |
+
<?php if ($_product->isSaleable() || $_skipSaleableCheck): ?>
|
76 |
+
<td class="a-center">
|
77 |
+
<?php if ($_item->isSaleable() || $_skipSaleableCheck) : ?>
|
78 |
+
<input type="text" name="super_group[<?php echo $_item->getId() ?>]" id="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo Mage::helper('catalog')->__('Qty') ?>" class="input-text qty" />
|
79 |
+
<input type="hidden" value="1" price="<?php echo $this->getCurrencyPrice($_item->getPrice()) ?>" qtyId="super_group[<?php echo $_item->getId() ?>]" />
|
80 |
+
<?php else: ?>
|
81 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
82 |
+
<?php endif; ?>
|
83 |
+
</td>
|
84 |
+
<?php endif; ?>
|
85 |
+
</tr>
|
86 |
+
<?php endforeach; ?>
|
87 |
+
<?php else: ?>
|
88 |
+
<tr>
|
89 |
+
<td colspan="<?php if ($_product->isSaleable() || $_skipSaleableCheck): ?>4<?php else : ?>3<?php endif; ?>"><?php echo Mage::helper('catalog')->__('No options of this product are available.') ?></td>
|
90 |
+
</tr>
|
91 |
+
<?php endif; ?>
|
92 |
+
</tbody>
|
93 |
+
</table>
|
94 |
+
</div>
|
95 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options.phtml
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php /* @var $this Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Options */ ?>
|
29 |
+
<?php $options = Mage::helper('core')->decorateArray($this->getOptions()); ?>
|
30 |
+
<?php if (count($options)): ?>
|
31 |
+
|
32 |
+
<?php echo $this->getChildHtml('options_js') ?>
|
33 |
+
|
34 |
+
<div id="product_composite_configure_fields_options" class="<?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
35 |
+
<h4><?php echo Mage::helper('catalog')->__('Custom Options') ?></h4>
|
36 |
+
<div class="product-options">
|
37 |
+
<dl>
|
38 |
+
<?php foreach($options as $option): ?>
|
39 |
+
<?php echo $this->getOptionHtml($option); ?>
|
40 |
+
<?php endforeach;?>
|
41 |
+
</dl>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/js.phtml
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<script type="text/javascript">
|
29 |
+
//<![CDATA[
|
30 |
+
validateOptionsCallback = function (elmId, result){
|
31 |
+
var container = $(elmId).up('ul.options-list');
|
32 |
+
if (!container) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
if (result == 'failed') {
|
36 |
+
container.removeClassName('validation-passed');
|
37 |
+
container.addClassName('validation-failed');
|
38 |
+
} else {
|
39 |
+
container.removeClassName('validation-failed');
|
40 |
+
container.addClassName('validation-passed');
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
productConfigure.opConfig = {};
|
45 |
+
|
46 |
+
var DateOption = Class.create({
|
47 |
+
|
48 |
+
getDaysInMonth: function(month, year)
|
49 |
+
{
|
50 |
+
var curDate = new Date();
|
51 |
+
if (!month) {
|
52 |
+
month = curDate.getMonth();
|
53 |
+
}
|
54 |
+
if (2 == month && !year) { // leap year assumption for unknown year
|
55 |
+
return 29;
|
56 |
+
}
|
57 |
+
if (!year) {
|
58 |
+
year = curDate.getFullYear();
|
59 |
+
}
|
60 |
+
return 32 - new Date(year, month - 1, 32).getDate();
|
61 |
+
},
|
62 |
+
|
63 |
+
reloadMonth: function(event)
|
64 |
+
{
|
65 |
+
var selectEl = event.findElement();
|
66 |
+
var idParts = selectEl.id.split("_");
|
67 |
+
if (idParts.length != 3) {
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
var optionIdPrefix = idParts[0] + "_" + idParts[1];
|
71 |
+
var month = parseInt($(optionIdPrefix + "_month").value);
|
72 |
+
var year = parseInt($(optionIdPrefix + "_year").value);
|
73 |
+
var dayEl = $(optionIdPrefix + "_day");
|
74 |
+
|
75 |
+
var days = this.getDaysInMonth(month, year);
|
76 |
+
|
77 |
+
//remove days
|
78 |
+
for (var i = dayEl.options.length - 1; i >= 0; i--) {
|
79 |
+
if (dayEl.options[i].value > days) {
|
80 |
+
dayEl.remove(dayEl.options[i].index);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
// add days
|
85 |
+
var lastDay = parseInt(dayEl.options[dayEl.options.length-1].value);
|
86 |
+
for (i = lastDay + 1; i <= days; i++) {
|
87 |
+
this.addOption(dayEl, i, i);
|
88 |
+
}
|
89 |
+
},
|
90 |
+
|
91 |
+
addOption: function(select, text, value)
|
92 |
+
{
|
93 |
+
var option = document.createElement('OPTION');
|
94 |
+
option.value = value;
|
95 |
+
option.text = text;
|
96 |
+
|
97 |
+
if (select.options.add) {
|
98 |
+
select.options.add(option);
|
99 |
+
} else {
|
100 |
+
select.appendChild(option);
|
101 |
+
}
|
102 |
+
}
|
103 |
+
});
|
104 |
+
productConfigure.opConfig.dateOption = new DateOption();
|
105 |
+
//]]>
|
106 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/date.phtml
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Date */ ?>
|
28 |
+
<?php $_option = $this->getOption(); ?>
|
29 |
+
<?php $_optionId = $_option->getId(); ?>
|
30 |
+
<dt class="label"><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
|
31 |
+
<?php echo $this->getFormatedPrice() ?></dt>
|
32 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
33 |
+
|
34 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
|
35 |
+
|| $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?>
|
36 |
+
|
37 |
+
<?php echo $this->getDateHtml() ?>
|
38 |
+
|
39 |
+
<?php if (!$this->useCalendar()): ?>
|
40 |
+
<script type="text/javascript">
|
41 |
+
//<![CDATA[
|
42 |
+
var dateOption = productConfigure.opConfig.dateOption;
|
43 |
+
Event.observe('options_<?php echo $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption));
|
44 |
+
Event.observe('options_<?php echo $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption));
|
45 |
+
//]]>
|
46 |
+
</script>
|
47 |
+
<?php endif; ?>
|
48 |
+
|
49 |
+
<?php endif; ?>
|
50 |
+
|
51 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
|
52 |
+
|| $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?>
|
53 |
+
<span class="time-picker"><?php echo $this->getTimeHtml() ?></span>
|
54 |
+
<?php endif; ?>
|
55 |
+
|
56 |
+
<input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" />
|
57 |
+
<script type="text/javascript">
|
58 |
+
//<![CDATA[
|
59 |
+
<?php if ($_option->getIsRequire()): ?>
|
60 |
+
Validation.addAllThese(
|
61 |
+
[
|
62 |
+
['validate-datetime-<?php echo $_optionId ?>', '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('This is a required option') )?>', function(v) {
|
63 |
+
var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
|
64 |
+
for (var i=0; i < dateTimeParts.length; i++) {
|
65 |
+
if (dateTimeParts[i].value == "") return false;
|
66 |
+
}
|
67 |
+
return true;
|
68 |
+
}]
|
69 |
+
]
|
70 |
+
);
|
71 |
+
<?php else: ?>
|
72 |
+
Validation.add(
|
73 |
+
'validate-datetime-<?php echo $_optionId ?>',
|
74 |
+
'<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('Field is not complete') )?>',
|
75 |
+
function(v) {
|
76 |
+
var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
|
77 |
+
var hasWithValue = false, hasWithNoValue = false;
|
78 |
+
var pattern = /day_part$/i;
|
79 |
+
for (var i=0; i < dateTimeParts.length; i++) {
|
80 |
+
if (! pattern.test(dateTimeParts[i].id)) {
|
81 |
+
if (dateTimeParts[i].value === "") {
|
82 |
+
hasWithValue = true;
|
83 |
+
} else {
|
84 |
+
hasWithNoValue = true;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
return hasWithValue ^ hasWithNoValue;
|
89 |
+
}
|
90 |
+
);
|
91 |
+
<?php endif; ?>
|
92 |
+
//]]>
|
93 |
+
</script>
|
94 |
+
</dd>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/default.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Options */ ?>
|
28 |
+
<?php $option = $this->getOption(); ?>
|
29 |
+
<dt>
|
30 |
+
<label><?php echo $this->escapeHtml($option->getTitle()) ?></label>
|
31 |
+
</dt>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/file.phtml
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_option = $this->getOption(); ?>
|
28 |
+
<?php $_fileInfo = $this->getFileInfo(); ?>
|
29 |
+
<?php $_fileExists = $_fileInfo->hasData() ? true : false; ?>
|
30 |
+
<?php $_fileName = 'options_' . $_option->getId() . '_file'; ?>
|
31 |
+
<?php $_fieldNameAction = $_fileName . '_action'; ?>
|
32 |
+
<?php $_fieldValueAction = $_fileExists ? 'save_old' : 'save_new'; ?>
|
33 |
+
<?php $_fileNamed = $_fileName . '_name'; ?>
|
34 |
+
<?php $_rand = rand(); ?>
|
35 |
+
|
36 |
+
<script type="text/javascript">
|
37 |
+
//<![CDATA[
|
38 |
+
opFile<?php echo $_rand; ?> = {
|
39 |
+
initializeFile: function(inputBox) {
|
40 |
+
this.inputFile = inputBox.select('input[name="<?php echo $_fileName; ?>"]')[0];
|
41 |
+
this.inputFileAction = inputBox.select('input[name="<?php echo $_fieldNameAction; ?>"]')[0];
|
42 |
+
this.fileNameBox = inputBox.up('dd').select('.<?php echo $_fileNamed ?>')[0];
|
43 |
+
},
|
44 |
+
|
45 |
+
toggleFileChange: function(inputBox) {
|
46 |
+
this.initializeFile(inputBox);
|
47 |
+
inputBox.toggle();
|
48 |
+
this.fileChangeFlag = this.fileChangeFlag ? false : true;
|
49 |
+
if (!this.fileDeleteFlag) {
|
50 |
+
if (this.fileChangeFlag) {
|
51 |
+
this.inputFileAction.value = 'save_new';
|
52 |
+
this.inputFile.disabled = false;
|
53 |
+
} else {
|
54 |
+
this.inputFileAction.value = 'save_old';
|
55 |
+
this.inputFile.disabled = true;
|
56 |
+
}
|
57 |
+
}
|
58 |
+
},
|
59 |
+
|
60 |
+
toggleFileDelete: function(fileDeleteFlag, inputBox) {
|
61 |
+
this.initializeFile(inputBox);
|
62 |
+
this.fileDeleteFlag = fileDeleteFlag.checked ? true : false;
|
63 |
+
if (this.fileDeleteFlag) {
|
64 |
+
this.inputFileAction.value = '';
|
65 |
+
this.inputFile.disabled = true;
|
66 |
+
this.fileNameBox.setStyle({'text-decoration': 'line-through'});
|
67 |
+
} else {
|
68 |
+
this.inputFileAction.value = this.fileChangeFlag ? 'save_new' : 'save_old';
|
69 |
+
this.inputFile.disabled = (this.fileChangeFlag == 'save_old');
|
70 |
+
this.fileNameBox.setStyle({'text-decoration': 'none'});
|
71 |
+
}
|
72 |
+
}
|
73 |
+
};
|
74 |
+
//]]>
|
75 |
+
</script>
|
76 |
+
|
77 |
+
<dt><label <?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
|
78 |
+
<?php echo $this->getFormatedPrice() ?></dt>
|
79 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
80 |
+
<?php if ($_fileExists): ?>
|
81 |
+
<span class="<?php echo $_fileNamed ?>"><?php echo $_fileInfo->getTitle(); ?></span>
|
82 |
+
<a href="javascript:void(0)" class="label" onclick="opFile<?php echo $_rand; ?>.toggleFileChange($(this).next('.input-box'))">
|
83 |
+
<?php echo Mage::helper('catalog')->__('Change') ?>
|
84 |
+
</a>
|
85 |
+
<?php if (!$_option->getIsRequire()): ?>
|
86 |
+
<input type="checkbox" onclick="opFile<?php echo $_rand; ?>.toggleFileDelete($(this), $(this).next('.input-box'))" price="<?php echo $this->getCurrencyPrice($_option->getPrice(true)) ?>"/>
|
87 |
+
<span class="label"><?php echo Mage::helper('catalog')->__('Delete') ?></span>
|
88 |
+
<?php endif; ?>
|
89 |
+
<?php endif; ?>
|
90 |
+
<div class="input-box" <?php echo $_fileExists ? 'style="display:none"' : '' ?>>
|
91 |
+
<input type="file" name="<?php echo $_fileName; ?>" class="product-custom-option<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?>" price="<?php echo $this->getCurrencyPrice($_option->getPrice(true)) ?>" <?php echo $_fileExists ? 'disabled="disabled"' : '' ?>/>
|
92 |
+
<input type="hidden" name="<?php echo $_fieldNameAction; ?>" value="<?php echo $_fieldValueAction; ?>" />
|
93 |
+
<?php if ($_option->getFileExtension()): ?>
|
94 |
+
<p class="no-margin"><?php echo Mage::helper('catalog')->__('Allowed file extensions to upload')?>: <strong><?php echo $_option->getFileExtension() ?></strong></p>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php if ($_option->getImageSizeX() > 0): ?>
|
97 |
+
<p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image width')?>: <strong><?php echo $_option->getImageSizeX() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
|
98 |
+
<?php endif; ?>
|
99 |
+
<?php if ($_option->getImageSizeY() > 0): ?>
|
100 |
+
<p class="no-margin"><?php echo Mage::helper('catalog')->__('Maximum image height')?>: <strong><?php echo $_option->getImageSizeY() ?> <?php echo Mage::helper('catalog')->__('px.')?></strong></p>
|
101 |
+
<?php endif; ?>
|
102 |
+
</div>
|
103 |
+
</dd>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/select.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Select */ ?>
|
28 |
+
<?php $_option = $this->getOption(); ?>
|
29 |
+
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label></dt>
|
30 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
31 |
+
<div class="input-box">
|
32 |
+
<?php echo $this->getValuesHtml() ?>
|
33 |
+
<?php if ($_option->getIsRequire()): ?>
|
34 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
|
35 |
+
<span id="options-<?php echo $_option->getId() ?>-container"></span>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php endif;?>
|
38 |
+
</div>
|
39 |
+
</dd>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/text.phtml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Catalog_Block_Product_View_Options_Type_Text */ ?>
|
28 |
+
<?php $_option = $this->getOption(); ?>
|
29 |
+
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
|
30 |
+
<?php echo $this->getFormatedPrice() ?></dt>
|
31 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
32 |
+
<div class="input-box">
|
33 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?>
|
34 |
+
<input type="text" id="options_<?php echo $_option->getId() ?>_text" class="input-text<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-' . $_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" value="<?php echo $this->escapeHtml($this->getDefaultValue()) ?>" price="<?php echo $this->getCurrencyPrice($_option->getPrice(true)) ?>" />
|
35 |
+
<?php elseif ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?>
|
36 |
+
<textarea id="options_<?php echo $_option->getId() ?>_text" class="<?php echo $_option->getIsRequire() ? ' required-entry' : '' ?> <?php echo $_option->getMaxCharacters() ? ' validate-length maximum-length-' . $_option->getMaxCharacters() : '' ?> product-custom-option" name="options[<?php echo $_option->getId() ?>]" rows="5" cols="25" price="<?php echo $this->getCurrencyPrice($_option->getPrice(true)) ?>"><?php echo $this->escapeHtml($this->getDefaultValue()) ?></textarea>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php if ($_option->getMaxCharacters()): ?>
|
39 |
+
<p class="note"><?php echo Mage::helper('catalog')->__('Maximum number of characters:')?> <strong><?php echo $_option->getMaxCharacters() ?></strong></p>
|
40 |
+
<?php endif; ?>
|
41 |
+
</div>
|
42 |
+
</dd>
|
app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/qty.phtml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php /* @var $this Mage_Adminhtml_Block_Catalog_Product_Composite_Fieldset_Qty */ ?>
|
29 |
+
|
30 |
+
<div id="product_composite_configure_fields_qty" class="<?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
31 |
+
<div class="product-options">
|
32 |
+
<dl>
|
33 |
+
<dt><label><?php echo Mage::helper('catalog')->__('Quantity') ?></label> <input id="product_composite_configure_input_qty" class="input-text" type="text" name="qty" value="<?php echo $this->getQtyValue() * 1 ?>"></dt>
|
34 |
+
</dl>
|
35 |
+
</div>
|
36 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/created.phtml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
var added = false;
|
29 |
+
function addProduct(closeAfter) {
|
30 |
+
if(window.opener!=null && !added) {
|
31 |
+
<?php if($this->isEdit()): ?>
|
32 |
+
window.opener.superProduct.updateProduct(<?php echo $this->getProductId() ?>, <?php echo $this->getAttributesJson(); ?>);
|
33 |
+
<?php else: ?>
|
34 |
+
window.opener.superProduct.addNewProduct(<?php echo $this->getProductId() ?>, <?php echo $this->getAttributesJson(); ?>);
|
35 |
+
window.opener.superProduct.showNoticeMessage();
|
36 |
+
<?php endif; ?>
|
37 |
+
added = true;
|
38 |
+
}
|
39 |
+
|
40 |
+
if(closeAfter)
|
41 |
+
{
|
42 |
+
closeWindow();
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
function closeWindow()
|
47 |
+
{
|
48 |
+
if (window.opener) {
|
49 |
+
window.opener.focus();
|
50 |
+
}
|
51 |
+
window.close();
|
52 |
+
}
|
53 |
+
|
54 |
+
addProduct(false);
|
55 |
+
setTimeout(closeWindow, 3000);
|
56 |
+
</script>
|
57 |
+
<div class="a-center">
|
58 |
+
<?php echo $this->getCloseButtonHtml() ?>
|
59 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/edit.phtml
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for Mage_Adminhtml_Block_Catalog_Product_Edit
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
<div class="content-header">
|
36 |
+
<h3 class="icon-head head-products"><?php echo $this->getHeader() ?></h3>
|
37 |
+
<p class="content-buttons form-buttons"><?php echo $this->getBackButtonHtml() ?>
|
38 |
+
<?php echo $this->getCancelButtonHtml() ?>
|
39 |
+
<?php if($this->getProductId()): ?>
|
40 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
41 |
+
<?php if($this->getProductSetId() && $this->getIsConfigured()): ?>
|
42 |
+
<?php echo $this->getDuplicateButtonHtml() ?>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
<?php if($this->getProductSetId() && $this->getIsConfigured()): ?>
|
46 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
47 |
+
<?php echo $this->getSaveAndEditButtonHtml() ?>
|
48 |
+
<?php endif; ?>
|
49 |
+
</p>
|
50 |
+
</div>
|
51 |
+
<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="product_edit_form" enctype="multipart/form-data">
|
52 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
53 |
+
<div style="display:none"></div>
|
54 |
+
</form>
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
var productTemplateSyntax = /(^|.|\r|\n)({{(\w+)}})/;
|
58 |
+
var productForm = new varienForm('product_edit_form', '<?php echo $this->getValidationUrl() ?>');
|
59 |
+
productForm._processValidationResult = function(transport) {
|
60 |
+
var response = transport.responseText.evalJSON();
|
61 |
+
if (response.error){
|
62 |
+
if (response.attribute && $(response.attribute)) {
|
63 |
+
$(response.attribute).setHasError(true, productForm);
|
64 |
+
Validation.ajaxError($(response.attribute), response.message);
|
65 |
+
if (!Prototype.Browser.IE){
|
66 |
+
$(response.attribute).focus();
|
67 |
+
}
|
68 |
+
}
|
69 |
+
else if ($('messages')) {
|
70 |
+
$('messages').innerHTML = '<ul class="messages"><li class="error-msg"><ul><li>' + response.message + '</li></ul></li></ul>';
|
71 |
+
}
|
72 |
+
}
|
73 |
+
else{
|
74 |
+
productForm._submit();
|
75 |
+
}
|
76 |
+
};
|
77 |
+
function saveAndContinueEdit(urlTemplate) {
|
78 |
+
var template = new Template(urlTemplate, productTemplateSyntax);
|
79 |
+
var url = template.evaluate({tab_id:product_info_tabsJsTabs.activeTab.id});
|
80 |
+
productForm.submit(url);
|
81 |
+
}
|
82 |
+
function setSettings(urlTemplate, setElement, typeElement) {
|
83 |
+
var template = new Template(urlTemplate, productTemplateSyntax);
|
84 |
+
setLocation(template.evaluate({attribute_set:$F(setElement),type:$F(typeElement)}));
|
85 |
+
}
|
86 |
+
|
87 |
+
function setSuperSettings(urlTemplate, attributesClass, validateField) {
|
88 |
+
var attributesFields = $$('.' + attributesClass);
|
89 |
+
var attributes = Form.serializeElements(attributesFields, true).attribute;
|
90 |
+
if(typeof attributes == 'string') {
|
91 |
+
attributes = [attributes];
|
92 |
+
}
|
93 |
+
|
94 |
+
if(!attributes) {
|
95 |
+
$(validateField).value = 'no-attributes';
|
96 |
+
} else {
|
97 |
+
$(validateField).value = 'has-attributes';
|
98 |
+
}
|
99 |
+
|
100 |
+
if (productForm.validator.validate()) {
|
101 |
+
var template = new Template(urlTemplate, productTemplateSyntax);
|
102 |
+
var url = template.evaluate({
|
103 |
+
attributes: encode_base64(attributes.join(',')).replace(new RegExp('/','g'),'%2F').replace(new RegExp('=','g'),'%3D')
|
104 |
+
});
|
105 |
+
setLocation(url);
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
function checkMaxLength(Object, MaxLen)
|
110 |
+
{
|
111 |
+
if (Object.value.length > MaxLen-1) {
|
112 |
+
Object.value = Object.value.substr(0, MaxLen);
|
113 |
+
}
|
114 |
+
return 1;
|
115 |
+
}
|
116 |
+
|
117 |
+
Event.observe(window, 'load', function() {
|
118 |
+
var objName = '<?php echo $this->getSelectedTabId() ?>';
|
119 |
+
if (objName) {
|
120 |
+
obj = $(objName);
|
121 |
+
//IE fix (bubbling event model)
|
122 |
+
product_info_tabsJsTabs.setSkipDisplayFirstTab();
|
123 |
+
product_info_tabsJsTabs.showTabContent(obj);
|
124 |
+
}
|
125 |
+
Product.AttributesBridge.setTabsObject(product_info_tabsJsTabs);
|
126 |
+
});
|
127 |
+
|
128 |
+
Validation.addAllThese([
|
129 |
+
['validate-super-product-attributes', '<?php echo Mage::helper('catalog')->__('Please select one or more attributes.') ?>', function(v) {
|
130 |
+
return (v != "no-attributes");
|
131 |
+
}]]);
|
132 |
+
//]]>
|
133 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/action/attribute.phtml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td><h3><?php echo Mage::helper('catalog')->__('Update attributes') ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php echo $this->getBackButtonHtml() ?>
|
33 |
+
<?php echo $this->getCancelButtonHtml() ?>
|
34 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
</table>
|
38 |
+
</div>
|
39 |
+
<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="attributes_edit_form" enctype="multipart/form-data">
|
40 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
41 |
+
</form>
|
42 |
+
<script type="text/javascript">
|
43 |
+
var attributesForm = new varienForm('attributes_edit_form', '<?php echo $this->getValidationUrl() ?>');
|
44 |
+
attributesForm._processValidationResult = function(transport) {
|
45 |
+
var response = transport.responseText.evalJSON();
|
46 |
+
|
47 |
+
if (response.error){
|
48 |
+
if (response.attribute && $(response.attribute)) {
|
49 |
+
$(response.attribute).setHasError(true, attributesForm);
|
50 |
+
Validation.ajaxError($(response.attribute), response.message);
|
51 |
+
if (!Prototype.Browser.IE){
|
52 |
+
$(response.attribute).focus();
|
53 |
+
}
|
54 |
+
} else if ($('messages')) {
|
55 |
+
$('messages').innerHTML = '<ul class="messages"><li class="error-msg"><ul><li>' + response.message + '</li></ul></li></ul>';
|
56 |
+
}
|
57 |
+
} else {
|
58 |
+
attributesForm._submit();
|
59 |
+
}
|
60 |
+
};
|
61 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/action/inventory.phtml
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
function toggleValueElementsWithCheckbox(checkbox) {
|
30 |
+
var td = $(checkbox.parentNode);
|
31 |
+
var checkboxes = td.getElementsBySelector('input[type="checkbox"]');
|
32 |
+
var inputs = td.getElementsBySelector('input[type!="checkbox"]', 'select', 'textarea');
|
33 |
+
if (checkboxes.size()>1) {
|
34 |
+
inputs.each(function(input){
|
35 |
+
input.disabled = (!checkbox.checked || checkboxes[0].checked);
|
36 |
+
checkboxes[0].disabled = !checkbox.checked;
|
37 |
+
});
|
38 |
+
} else {
|
39 |
+
inputs.each(function(input){
|
40 |
+
input.disabled = !checkbox.checked;
|
41 |
+
});
|
42 |
+
}
|
43 |
+
}
|
44 |
+
//]]>
|
45 |
+
</script>
|
46 |
+
|
47 |
+
<div class="entry-edit">
|
48 |
+
<div class="entry-edit-head">
|
49 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Inventory') ?></h4>
|
50 |
+
</div>
|
51 |
+
<fieldset>
|
52 |
+
<legend><?php echo Mage::helper('catalog')->__('Inventory') ?></legend>
|
53 |
+
<table cellspacing="0" class="form-list" id="table_cataloginventory">
|
54 |
+
<tr>
|
55 |
+
<td class="label"><label for="inventory_manage_stock"><?php echo Mage::helper('catalog')->__('Manage Stock') ?></label></td>
|
56 |
+
<td class="value"><select id="inventory_manage_stock" name="<?php echo $this->getFieldSuffix() ?>[manage_stock]" class="select" disabled="disabled">
|
57 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
58 |
+
<option value="0"<?php if ($this->getConfigFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('No') ?></option>
|
59 |
+
</select>
|
60 |
+
<input name="<?php echo $this->getFieldSuffix() ?>[use_config_manage_stock]" type="checkbox" id="inventory_use_config_manage_stock" onclick="toggleValueElements(this, this.parentNode, $('inventory_manage_stock_checkbox'));" value="1" checked="checked" disabled="disabled" />
|
61 |
+
<label for="inventory_use_config_manage_stock" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
62 |
+
<input type="checkbox" id="inventory_manage_stock_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
63 |
+
<label for="inventory_manage_stock_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
64 |
+
</td>
|
65 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
66 |
+
</tr>
|
67 |
+
<tr>
|
68 |
+
<td class="label"><label for="inventory_qty"><?php echo Mage::helper('catalog')->__('Qty') ?><span class="required">*</span></label></td>
|
69 |
+
<td class="value">
|
70 |
+
<input type="text" class="input-text required-entry validate-number" id="inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[qty]" value="<?php echo $this->getDefaultConfigValue('qty')*1 ?>" disabled="disabled" />
|
71 |
+
<input type="checkbox" id="inventory_qty_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
72 |
+
<label for="inventory_qty_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
73 |
+
</td>
|
74 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<td class="label"><label for="inventory_min_qty"><?php echo Mage::helper('catalog')->__('Minimum Qty for Item\'s Status to be Out of Stock') ?></label></td>
|
78 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_min_qty" name="<?php echo $this->getFieldSuffix() ?>[min_qty]" value="<?php echo $this->getDefaultConfigValue('min_qty')*1 ?>" disabled="disabled" />
|
79 |
+
<input type="checkbox" id="inventory_use_config_min_qty" name="<?php echo $this->getFieldSuffix() ?>[use_config_min_qty]" value="1" onclick="toggleValueElements(this, this.parentNode, $('inventory_min_qty_checkbox'));" checked="checked" disabled="disabled" />
|
80 |
+
<label for="inventory_use_config_min_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
81 |
+
<input type="checkbox" id="inventory_min_qty_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
82 |
+
<label for="inventory_min_qty_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
83 |
+
</td>
|
84 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td class="label"><label for="inventory_min_sale_qty"><?php echo Mage::helper('catalog')->__('Minimum Qty Allowed in Shopping Cart') ?></label></td>
|
88 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_min_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[min_sale_qty]" value="<?php echo $this->getDefaultConfigValue('min_sale_qty')*1 ?>" disabled="disabled" />
|
89 |
+
<input type="checkbox" id="inventory_use_config_min_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[use_config_min_sale_qty]" value="1" onclick="toggleValueElements(this, this.parentNode, $('inventory_min_sale_qty_checkbox'));" checked="checked" disabled="disabled" />
|
90 |
+
<label for="inventory_use_config_min_sale_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
91 |
+
<input type="checkbox" id="inventory_min_sale_qty_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
92 |
+
<label for="inventory_min_sale_qty_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
93 |
+
</td>
|
94 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<td class="label"><label for="inventory_max_sale_qty"><?php echo Mage::helper('catalog')->__('Maximum Qty Allowed in Shopping Cart') ?></label></td>
|
98 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_max_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[max_sale_qty]" value="<?php echo $this->getDefaultConfigValue('max_sale_qty')*1 ?>" disabled="disabled" />
|
99 |
+
<input type="checkbox" id="inventory_use_config_max_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[use_config_max_sale_qty]" value="1" onclick="toggleValueElements(this, this.parentNode, $('inventory_max_sale_checkbox'));" checked="checked" disabled="disabled" />
|
100 |
+
<label for="inventory_use_config_max_sale_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
101 |
+
<input type="checkbox" id="inventory_max_sale_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
102 |
+
<label for="inventory_max_sale_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
103 |
+
</td>
|
104 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<td class="label"><label for="inventory_is_qty_decimal"><?php echo Mage::helper('catalog')->__('Qty Uses Decimals') ?></label></td>
|
108 |
+
<td class="value"><select id="inventory_is_qty_decimal" name="<?php echo $this->getFieldSuffix() ?>[is_qty_decimal]" class="select" disabled="disabled">
|
109 |
+
<option value="0"><?php echo Mage::helper('catalog')->__('No') ?></option>
|
110 |
+
<option value="1"<?php if ($this->getDefaultConfigValue('is_qty_decimal')==1): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
111 |
+
</select>
|
112 |
+
<input type="checkbox" id="inventory_is_qty_decimal_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
113 |
+
<label for="inventory_is_qty_decimal_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
114 |
+
</td>
|
115 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
116 |
+
</tr>
|
117 |
+
<tr>
|
118 |
+
<td class="label"><label for="inventory_backorders"><?php echo Mage::helper('catalog')->__('Backorders') ?></label></td>
|
119 |
+
<td class="value"><select id="inventory_backorders" name="<?php echo $this->getFieldSuffix() ?>[backorders]" class="select" disabled="disabled">
|
120 |
+
<?php foreach ($this->getBackordersOption() as $option): ?>
|
121 |
+
<?php $_selected = ($option['value'] == $this->getDefaultConfigValue('backorders')) ? ' selected="selected"' : '' ?>
|
122 |
+
<option value="<?php echo $option['value'] ?>"<?php echo $_selected ?>><?php echo $option['label'] ?></option>
|
123 |
+
<?php endforeach; ?>
|
124 |
+
</select>
|
125 |
+
<input type="checkbox" id="inventory_use_config_backorders" name="<?php echo $this->getFieldSuffix() ?>[use_config_backorders]" value="1" onclick="toggleValueElements(this, this.parentNode, $('inventory_backorders_checkbox'));" checked="checked" disabled="disabled" />
|
126 |
+
<label for="inventory_use_config_backorders" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
127 |
+
<input type="checkbox" id="inventory_backorders_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
128 |
+
<label for="inventory_backorders_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
129 |
+
</td>
|
130 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
131 |
+
</tr>
|
132 |
+
<tr>
|
133 |
+
<td class="label"><label for="inventory_notify_stock_qty"><?php echo Mage::helper('catalog')->__('Notify for Quantity Below') ?></label></td>
|
134 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_notify_stock_qty" name="<?php echo $this->getFieldSuffix() ?>[notify_stock_qty]" value="<?php echo $this->getDefaultConfigValue('notify_stock_qty')*1 ?>" disabled="disabled" />
|
135 |
+
<input type="checkbox" id="inventory_use_config_notify_stock_qty" name="<?php echo $this->getFieldSuffix() ?>[use_config_notify_stock_qty]" value="1" onclick="toggleValueElements(this, this.parentNode, $('inventory_notify_stock_qty_checkbox'));" checked="checked" disabled="disabled" />
|
136 |
+
<label for="inventory_use_config_notify_stock_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
137 |
+
<input type="checkbox" id="inventory_notify_stock_qty_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
138 |
+
<label for="inventory_notify_stock_qty_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
139 |
+
</td>
|
140 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
141 |
+
</tr>
|
142 |
+
|
143 |
+
<tr>
|
144 |
+
<td class="label"><label for="inventory_enable_qty_increments"><?php echo Mage::helper('catalog')->__('Enable Qty Increments') ?></label></td>
|
145 |
+
<td class="value"><select id="inventory_enable_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[enable_qty_increments]" class="select" disabled="disabled">
|
146 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
147 |
+
<option value="0"<?php if ($this->getDefaultConfigValue('enable_qty_increments') == 0): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('No') ?></option>
|
148 |
+
</select>
|
149 |
+
<input type="checkbox" id="inventory_use_config_enable_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[use_config_enable_qty_increments]" value="1" onclick="toggleValueElements(this, this.parentNode, [$('inventory_enable_qty_increments_checkbox')]);" checked="checked" disabled="disabled" />
|
150 |
+
<label for="inventory_use_config_enable_qty_increments" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
151 |
+
<input type="checkbox" id="inventory_enable_qty_increments_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
152 |
+
<label for="inventory_enable_qty_increments_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
153 |
+
</td>
|
154 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
155 |
+
</tr>
|
156 |
+
<tr>
|
157 |
+
<td class="label"><label for="inventory_qty_increments"><?php echo Mage::helper('catalog')->__('Qty Increments') ?></label></td>
|
158 |
+
<td class="value">
|
159 |
+
<input type="text" class="input-text validate-number" id="inventory_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[qty_increments]" value="<?php echo $this->getDefaultConfigValue('qty_increments')*1 ?>" disabled="disabled" />
|
160 |
+
<input type="checkbox" id="inventory_use_config_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[use_config_qty_increments]" value="1" onclick="toggleValueElements(this, this.parentNode, [$('inventory_qty_increments_checkbox')]);" checked="checked" disabled="disabled" />
|
161 |
+
<label for="inventory_use_config_qty_increments" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
162 |
+
<input type="checkbox" id="inventory_qty_increments_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
163 |
+
<label for="inventory_qty_increments_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
164 |
+
</td>
|
165 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
166 |
+
</tr>
|
167 |
+
|
168 |
+
<tr>
|
169 |
+
<td class="label"><label for="inventory_stock_availability"><?php echo Mage::helper('catalog')->__('Stock Availability') ?></label></td>
|
170 |
+
<td class="value"><select id="inventory_stock_availability" name="<?php echo $this->getFieldSuffix() ?>[is_in_stock]" class="select" disabled="disabled">
|
171 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('In Stock') ?></option>
|
172 |
+
<option value="0"<?php if ($this->getDefaultConfigValue('is_in_stock')==0): ?> selected<?php endif; ?>><?php echo Mage::helper('catalog')->__('Out of Stock') ?></option>
|
173 |
+
</select>
|
174 |
+
<input type="checkbox" id="inventory_stock_availability_checkbox" onclick="toggleValueElementsWithCheckbox(this)" />
|
175 |
+
<label for="inventory_stock_availability_checkbox" class="normal"><?php echo Mage::helper('catalog')->__('Change') ?></label>
|
176 |
+
</td>
|
177 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
178 |
+
</tr>
|
179 |
+
</table>
|
180 |
+
</fieldset>
|
181 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/edit/action/websites.phtml
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Add Product To Websites') ?></h4>
|
30 |
+
</div>
|
31 |
+
<fieldset id="grop_fields">
|
32 |
+
<?php foreach ($this->getWebsiteCollection() as $_website): ?>
|
33 |
+
<div>
|
34 |
+
<div class="website-name">
|
35 |
+
<input name="add_website_ids[]" value="<?php echo $_website->getId() ?>" <?php if($this->getWebsitesReadonly()): ?>disabled="disabled"<?php endif;?> class="checkbox website-checkbox" id="add_product_website_<?php echo $_website->getId() ?>" type="checkbox" />
|
36 |
+
<big><strong><label for="add_product_website_<?php echo $_website->getId() ?>"><?php echo $this->escapeHtml($_website->getName()) ?></label></strong></big>
|
37 |
+
</div>
|
38 |
+
<div class="webiste-groups" id="add_product_website_<?php echo $_website->getId() ?>_data">
|
39 |
+
<?php foreach ($this->getGroupCollection($_website) as $_group): ?>
|
40 |
+
<h4><?php echo $this->escapeHtml($_group->getName()) ?></h4>
|
41 |
+
<div class="group-stores">
|
42 |
+
<table>
|
43 |
+
<?php foreach ($this->getStoreCollection($_group) as $_store): ?>
|
44 |
+
<tr>
|
45 |
+
<td><?php echo $this->escapeHtml($_store->getName()) ?></td>
|
46 |
+
<td> </td>
|
47 |
+
</tr>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
</table>
|
50 |
+
</div>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</fieldset>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<div class="entry-edit">
|
59 |
+
<div class="entry-edit-head">
|
60 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Remove Product From Websites') ?></h4>
|
61 |
+
</div>
|
62 |
+
<fieldset id="grop_fields">
|
63 |
+
<ul class="messages">
|
64 |
+
<li class="notice-msg">
|
65 |
+
<ul>
|
66 |
+
<li><?php echo Mage::helper('catalog')->__("Items that you do not want to show in the catalog or search results should have status 'Disabled' in the desired store.") ?></li>
|
67 |
+
</ul>
|
68 |
+
</li>
|
69 |
+
</ul>
|
70 |
+
<?php foreach ($this->getWebsiteCollection() as $_website): ?>
|
71 |
+
<div>
|
72 |
+
<div class="website-name">
|
73 |
+
<input name="remove_website_ids[]" value="<?php echo $_website->getId() ?>" <?php if($this->getWebsitesReadonly()): ?>disabled="disabled"<?php endif;?> class="checkbox website-checkbox" id="remove_product_website_<?php echo $_website->getId() ?>" type="checkbox"/>
|
74 |
+
<big><strong><label for="remove_product_website_<?php echo $_website->getId() ?>"><?php echo $this->escapeHtml($_website->getName()) ?></label></strong></big>
|
75 |
+
</div>
|
76 |
+
<div class="webiste-groups" id="remove_product_website_<?php echo $_website->getId() ?>_data">
|
77 |
+
<?php foreach ($this->getGroupCollection($_website) as $_group): ?>
|
78 |
+
<h4><?php echo $this->escapeHtml($_group->getName()) ?></h4>
|
79 |
+
<div class="group-stores">
|
80 |
+
<table>
|
81 |
+
<?php foreach ($this->getStoreCollection($_group) as $_store): ?>
|
82 |
+
<tr>
|
83 |
+
<td><?php echo $this->escapeHtml($_store->getName()) ?></td>
|
84 |
+
<td> </td>
|
85 |
+
</tr>
|
86 |
+
<?php endforeach; ?>
|
87 |
+
</table>
|
88 |
+
</div>
|
89 |
+
<?php endforeach; ?>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<?php endforeach; ?>
|
93 |
+
</fieldset>
|
94 |
+
</div>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
var productWebsiteCheckboxes = $$('.website-checkbox');
|
98 |
+
|
99 |
+
for(var i=0;i<productWebsiteCheckboxes.length;i++){
|
100 |
+
Event.observe(productWebsiteCheckboxes[i], 'click', toggleStoreFromChoosers);
|
101 |
+
}
|
102 |
+
|
103 |
+
function toggleStoreFromChoosers(event){
|
104 |
+
var element = Event.element(event);
|
105 |
+
var selects = $(element.id+'_data').getElementsBySelector('select');
|
106 |
+
var selectBlocks = $(element.id+'_data').getElementsByClassName('website-'+element.value+'-select');
|
107 |
+
for (var i=0; i<selects.length; i++) {
|
108 |
+
selects[i].disabled=!element.checked;
|
109 |
+
}
|
110 |
+
for (var i=0; i<selectBlocks.length; i++) {
|
111 |
+
if (element.checked) {
|
112 |
+
selectBlocks[i].show();
|
113 |
+
}
|
114 |
+
else {
|
115 |
+
selectBlocks[i].hide();
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
//]]>
|
120 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/categories.phtml
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Product Categories') ?></h4>
|
30 |
+
</div>
|
31 |
+
<fieldset id="grop_fields">
|
32 |
+
<input type="hidden" name="category_ids" id="product_categories" value="<?php echo $this->getIdsString() ?>">
|
33 |
+
<div id="product-categories" class="tree"></div>
|
34 |
+
</fieldset>
|
35 |
+
</div>
|
36 |
+
<?php if($this->getRootNode() && $this->getRootNode()->hasChildren()): ?>
|
37 |
+
<script type="text/javascript">
|
38 |
+
Ext.EventManager.onDocumentReady(function() {
|
39 |
+
var categoryLoader = new Ext.tree.TreeLoader({
|
40 |
+
dataUrl: '<?php echo $this->getLoadTreeUrl()?>'
|
41 |
+
});
|
42 |
+
|
43 |
+
categoryLoader.createNode = function(config) {
|
44 |
+
config.uiProvider = Ext.tree.CheckboxNodeUI;
|
45 |
+
var node;
|
46 |
+
if (config.children && !config.children.length) {
|
47 |
+
delete(config.children);
|
48 |
+
node = new Ext.tree.AsyncTreeNode(config);
|
49 |
+
|
50 |
+
} else {
|
51 |
+
node = new Ext.tree.TreeNode(config);
|
52 |
+
}
|
53 |
+
return node;
|
54 |
+
};
|
55 |
+
|
56 |
+
categoryLoader.on("beforeload", function(treeLoader, node) {
|
57 |
+
treeLoader.baseParams.category = node.attributes.id;
|
58 |
+
});
|
59 |
+
|
60 |
+
categoryLoader.on("load", function(treeLoader, node, config) {
|
61 |
+
varienWindowOnload();
|
62 |
+
});
|
63 |
+
|
64 |
+
var tree = new Ext.tree.TreePanel('product-categories', {
|
65 |
+
animate:true,
|
66 |
+
loader: categoryLoader,
|
67 |
+
enableDD:false,
|
68 |
+
containerScroll: true,
|
69 |
+
rootUIProvider: Ext.tree.CheckboxNodeUI,
|
70 |
+
selModel: new Ext.tree.CheckNodeMultiSelectionModel(),
|
71 |
+
rootVisible: '<?php echo $this->getRootNode()->getIsVisible() ?>'
|
72 |
+
});
|
73 |
+
|
74 |
+
tree.on('check', function(node) {
|
75 |
+
if(node.attributes.checked) {
|
76 |
+
categoryAdd(node.id);
|
77 |
+
} else {
|
78 |
+
categoryRemove(node.id);
|
79 |
+
}
|
80 |
+
varienElementMethods.setHasChanges(node.getUI().checkbox);
|
81 |
+
}, tree);
|
82 |
+
|
83 |
+
// set the root node
|
84 |
+
var root = new Ext.tree.TreeNode({
|
85 |
+
text: '<?php echo $this->jsQuoteEscape($this->getRootNode()->getName()) ?>',
|
86 |
+
draggable:false,
|
87 |
+
checked:'<?php echo $this->getRootNode()->getChecked() ?>',
|
88 |
+
id:'<?php echo $this->getRootNode()->getId() ?>',
|
89 |
+
disabled: <?php echo ($this->getRootNode()->getDisabled() ? 'true' : 'false') ?>,
|
90 |
+
uiProvider: Ext.tree.CheckboxNodeUI
|
91 |
+
});
|
92 |
+
|
93 |
+
tree.setRootNode(root);
|
94 |
+
bildCategoryTree(root, <?php echo $this->getTreeJson() ?>);
|
95 |
+
tree.addListener('click', categoryClick.createDelegate(this));
|
96 |
+
|
97 |
+
// render the tree
|
98 |
+
tree.render();
|
99 |
+
root.expand();
|
100 |
+
//tree.expandAll();
|
101 |
+
});
|
102 |
+
|
103 |
+
function bildCategoryTree(parent, config){
|
104 |
+
if (!config) return null;
|
105 |
+
|
106 |
+
if (parent && config && config.length){
|
107 |
+
for (var i = 0; i < config.length; i++){
|
108 |
+
config[i].uiProvider = Ext.tree.CheckboxNodeUI;
|
109 |
+
var node;
|
110 |
+
var _node = Object.clone(config[i]);
|
111 |
+
if (_node.children && !_node.children.length) {
|
112 |
+
delete(_node.children);
|
113 |
+
node = new Ext.tree.AsyncTreeNode(_node);
|
114 |
+
|
115 |
+
} else {
|
116 |
+
node = new Ext.tree.TreeNode(config[i]);
|
117 |
+
}
|
118 |
+
parent.appendChild(node);
|
119 |
+
node.loader = node.getOwnerTree().loader;
|
120 |
+
if(config[i].children){
|
121 |
+
bildCategoryTree(node, config[i].children);
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
function categoryClick(node, e){
|
128 |
+
if (node.disabled) {
|
129 |
+
return;
|
130 |
+
}
|
131 |
+
node.getUI().check(!node.getUI().checked());
|
132 |
+
varienElementMethods.setHasChanges(Event.element(e), e);
|
133 |
+
};
|
134 |
+
function categoryAdd(id) {
|
135 |
+
var ids = $('product_categories').value.split(',');
|
136 |
+
ids.push(id);
|
137 |
+
$('product_categories').value = ids.join(',');
|
138 |
+
}
|
139 |
+
function categoryRemove(id) {
|
140 |
+
var ids = $('product_categories').value.split(',');
|
141 |
+
// bug #7654 fixed
|
142 |
+
while (-1 != ids.indexOf(id)) {
|
143 |
+
ids.splice(ids.indexOf(id), 1);
|
144 |
+
}
|
145 |
+
$('product_categories').value = ids.join(',');
|
146 |
+
}
|
147 |
+
</script>
|
148 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options.phtml
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit custom-options product-custom-options">
|
28 |
+
<div id="dynamic-price-warrning" style="display:none">
|
29 |
+
<ul class="messages">
|
30 |
+
<li class="error-msg">
|
31 |
+
<ul>
|
32 |
+
<li><?php echo $this->__('Bundle with dynamic pricing cannot include custom defined options. Options will not be saved.') ?></li>
|
33 |
+
</ul>
|
34 |
+
</li>
|
35 |
+
</ul>
|
36 |
+
</div>
|
37 |
+
<div class="entry-edit-head">
|
38 |
+
<h4><?php echo Mage::helper('catalog')->__('Custom Options') ?></h4>
|
39 |
+
<div class="right"><?php echo $this->getAddButtonHtml() ?></div>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<div id="product_options_container" class="box">
|
43 |
+
<div id="product_options_container_top"></div>
|
44 |
+
<?php echo $this->getOptionsBoxHtml() ?>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<script type="text/javascript">
|
49 |
+
// re-bind form elements onchange
|
50 |
+
varienWindowOnload(true);
|
51 |
+
//show error message
|
52 |
+
if ($('price_type')) {
|
53 |
+
if ($('price_type').value == '0' && $('dynamic-price-warrning')) {
|
54 |
+
$('dynamic-price-warrning').show();
|
55 |
+
}
|
56 |
+
}
|
57 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml
ADDED
@@ -0,0 +1,359 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php echo $this->getTemplatesHtml() ?>
|
28 |
+
|
29 |
+
<script type="text/javascript">
|
30 |
+
//<![CDATA[
|
31 |
+
var firstStepTemplate = '<div class="option-box" id="option_{{id}}">'+
|
32 |
+
'<table id="<?php echo $this->getFieldId() ?>_{{id}}" class="option-header" cellpadding="0" cellspacing="0">'+
|
33 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_{{id}}_is_delete" name="<?php echo $this->getFieldName() ?>[{{id}}][is_delete]" value="" />'+
|
34 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_{{id}}_previous_type" name="<?php echo $this->getFieldName() ?>[{{id}}][previous_type]" value="{{type}}" />'+
|
35 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_{{id}}_previous_group" name="<?php echo $this->getFieldName() ?>[{{id}}][previous_group]" value="" />'+
|
36 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_{{id}}_id" name="<?php echo $this->getFieldName() ?>[{{id}}][id]" value="{{id}}" />'+
|
37 |
+
'<input type="hidden" id="<?php echo $this->getFieldId() ?>_{{id}}_option_id" name="<?php echo $this->getFieldName() ?>[{{id}}][option_id]" value="{{option_id}}" />'+
|
38 |
+
'<thead>'+
|
39 |
+
'<tr>'+
|
40 |
+
'<th class="opt-title"><?php echo Mage::helper('catalog')->__('Title') ?> <span class="required">*</span></th>'+
|
41 |
+
'<th class="opt-type"><?php echo Mage::helper('catalog')->__('Input Type') ?> <span class="required">*</span></th>'+
|
42 |
+
'<th class="opt-req"><?php echo $this->jsQuoteEscape(Mage::helper('catalog')->__('Is Required')) ?></th>'+
|
43 |
+
'<th class="opt-order"><?php echo Mage::helper('catalog')->__('Sort Order') ?></th>'+
|
44 |
+
'<th class="a-right"><?php echo $this->jsQuoteEscape($this->getDeleteButtonHtml()) ?></th>'+
|
45 |
+
'</tr>'+
|
46 |
+
'</thead>'+
|
47 |
+
'<tr>'+
|
48 |
+
'<td><input type="text" class="required-entry input-text" id="<?php echo $this->getFieldId() ?>_{{id}}_title" name="<?php echo $this->getFieldName() ?>[{{id}}][title]" value="{{title}}">{{checkboxScopeTitle}}</td>'+
|
49 |
+
'<td><?php echo $this->getTypeSelectHtml() ?></td>'+
|
50 |
+
'<td class="opt-req"><?php echo $this->getRequireSelectHtml() ?></td>'+
|
51 |
+
'<td><input type="text" class="validate-zero-or-greater input-text" name="<?php echo $this->getFieldName() ?>[{{id}}][sort_order]" value="{{sort_order}}"></td>'+
|
52 |
+
'<td> </td>'+
|
53 |
+
'</tr></table></div>';
|
54 |
+
|
55 |
+
var productOption = {
|
56 |
+
div : $('product_options_container_top'),
|
57 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
58 |
+
templateText : firstStepTemplate,
|
59 |
+
itemCount : 1,
|
60 |
+
add : function(data) {
|
61 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
62 |
+
|
63 |
+
if(!data.id){
|
64 |
+
data = {};
|
65 |
+
data.id = this.itemCount;
|
66 |
+
data.type = '';
|
67 |
+
data.option_id = 0;
|
68 |
+
} else {
|
69 |
+
this.itemCount = data.item_count;
|
70 |
+
}
|
71 |
+
|
72 |
+
Element.insert(this.div, {'after':this.template.evaluate(data)});
|
73 |
+
|
74 |
+
//set selected type
|
75 |
+
if (data.type) {
|
76 |
+
$A($('<?php echo $this->getFieldId() ?>_'+data.id+'_type').options).each(function(option){
|
77 |
+
if (option.value==data.type) option.selected = true;
|
78 |
+
});
|
79 |
+
}
|
80 |
+
|
81 |
+
//set selected is_require
|
82 |
+
if (data.is_require) {
|
83 |
+
$A($('<?php echo $this->getFieldId() ?>_'+data.id+'_is_require').options).each(function(option){
|
84 |
+
if (option.value==data.is_require) option.selected = true;
|
85 |
+
});
|
86 |
+
}
|
87 |
+
|
88 |
+
if (data.checkboxScopeTitle) {
|
89 |
+
//set disabled
|
90 |
+
if ($('<?php echo $this->getFieldId() ?>_'+data.option_id+'_title') && data.scopeTitleDisabled) {
|
91 |
+
$('<?php echo $this->getFieldId() ?>_'+data.option_id+'_title').disable();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
this.itemCount++;
|
96 |
+
this.bindRemoveButtons();
|
97 |
+
productOptionType.bindSelectInputType();
|
98 |
+
},
|
99 |
+
remove : function(event){
|
100 |
+
var element = $(Event.findElement(event, 'div'));
|
101 |
+
if(element){
|
102 |
+
$('product_'+element.readAttribute('id')+'_'+'is_delete').value = '1';
|
103 |
+
element.addClassName('no-display');
|
104 |
+
element.addClassName('ignore-validate');
|
105 |
+
element.hide();
|
106 |
+
}
|
107 |
+
},
|
108 |
+
bindRemoveButtons : function(){
|
109 |
+
var buttons = $$('div.product-custom-options .delete-product-option');
|
110 |
+
for(var i=0;i<buttons.length;i++){
|
111 |
+
if(!$(buttons[i]).binded){
|
112 |
+
$(buttons[i]).binded = true;
|
113 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
114 |
+
}
|
115 |
+
}
|
116 |
+
var inputs = $$('div.product-custom-options button', 'div.product-custom-options input', 'div.product-custom-options select', 'div.product-custom-options textarea');
|
117 |
+
<?php if ($this->isReadonly()):?>
|
118 |
+
for (var i=0, l = inputs.length; i < l; i ++) {
|
119 |
+
inputs[i].disabled = true;
|
120 |
+
if (inputs[i].tagName.toLowerCase()=='button') {
|
121 |
+
inputs[i].addClassName('disabled');
|
122 |
+
}
|
123 |
+
}
|
124 |
+
<?php else: ?>
|
125 |
+
inputs.each(function(el) { Event.observe(el, 'change', el.setHasChanges.bind(el)); } )
|
126 |
+
<?php endif;?>
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
var productOptionType = {
|
132 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
133 |
+
loadStepTwo : function(event){
|
134 |
+
var element = $(Event.findElement(event, 'select'));
|
135 |
+
|
136 |
+
var group = '';
|
137 |
+
var previousGroupElm = $(element.readAttribute('id').sub('_type', '_previous_group'));
|
138 |
+
|
139 |
+
switch(element.getValue()){
|
140 |
+
case 'field':
|
141 |
+
case 'area':
|
142 |
+
template = OptionTemplateText;
|
143 |
+
group = 'text';
|
144 |
+
break;
|
145 |
+
case 'file':
|
146 |
+
template = OptionTemplateFile;
|
147 |
+
group = 'file';
|
148 |
+
break;
|
149 |
+
case 'drop_down':
|
150 |
+
case 'radio':
|
151 |
+
case 'checkbox':
|
152 |
+
case 'multiple':
|
153 |
+
template = OptionTemplateSelect;
|
154 |
+
group = 'select';
|
155 |
+
break;
|
156 |
+
case 'date':
|
157 |
+
case 'date_time':
|
158 |
+
case 'time':
|
159 |
+
template = OptionTemplateDate;
|
160 |
+
group = 'date';
|
161 |
+
break;
|
162 |
+
default:
|
163 |
+
template = '';
|
164 |
+
group = 'unknown';
|
165 |
+
break;
|
166 |
+
}
|
167 |
+
|
168 |
+
if (previousGroupElm.getValue() != group) {
|
169 |
+
if ($(element.readAttribute('id')+'_'+previousGroupElm.getValue())) {
|
170 |
+
formElm = $(element.readAttribute('id')+'_'+previousGroupElm.getValue()).descendants();
|
171 |
+
formElm.each(function(elm){
|
172 |
+
if (elm.tagName == 'input' || elm.tagName == 'select') {
|
173 |
+
elm.name = '__delete__'+elm.readAttribute('name');
|
174 |
+
}
|
175 |
+
});
|
176 |
+
|
177 |
+
$(element.readAttribute('id')+'_'+previousGroupElm.getValue()).addClassName('no-display');
|
178 |
+
$(element.readAttribute('id')+'_'+previousGroupElm.getValue()).addClassName('ignore-validate');
|
179 |
+
$(element.readAttribute('id')+'_'+previousGroupElm.getValue()).hide();
|
180 |
+
}
|
181 |
+
|
182 |
+
previousGroupElm.value = group;
|
183 |
+
|
184 |
+
if ($(element.readAttribute('id')+'_'+group)) {
|
185 |
+
formElm = $(element.readAttribute('id')+'_'+group).descendants();
|
186 |
+
formElm.each(function(elm){
|
187 |
+
if (elm.match('input') || elm.match('select')) {
|
188 |
+
elm.name = elm.readAttribute('name').sub('__delete__', '');
|
189 |
+
}
|
190 |
+
});
|
191 |
+
$(element.readAttribute('id')+'_'+group).removeClassName('no-display');
|
192 |
+
$(element.readAttribute('id')+'_'+group).removeClassName('ignore-validate');
|
193 |
+
$(element.readAttribute('id')+'_'+group).show();
|
194 |
+
|
195 |
+
} else {
|
196 |
+
template = '<div id="'+element.readAttribute('id')+'_'+group+'" class="grid tier form-list">'+template+'</div><div id="'+element.readAttribute('id')+'_'+group+'_advice"></div';
|
197 |
+
this.secondTemplate = new Template(template, this.templateSyntax);
|
198 |
+
|
199 |
+
data = {};
|
200 |
+
if (!data.option_id) {
|
201 |
+
data = {};
|
202 |
+
data.option_id = $(element.readAttribute('id').sub('_type', '_id')).getValue();
|
203 |
+
}
|
204 |
+
|
205 |
+
Element.insert(element.readAttribute('id').sub('_type', ''), {'after':this.secondTemplate.evaluate(data)});
|
206 |
+
|
207 |
+
switch(element.getValue()){
|
208 |
+
case 'drop_down':
|
209 |
+
case 'radio':
|
210 |
+
case 'checkbox':
|
211 |
+
case 'multiple':
|
212 |
+
selectOptionType.bindAddButton();
|
213 |
+
break;
|
214 |
+
}
|
215 |
+
}
|
216 |
+
}
|
217 |
+
},
|
218 |
+
addDataToValues : function(data){
|
219 |
+
|
220 |
+
switch(data.type){
|
221 |
+
case 'field':
|
222 |
+
case 'area':
|
223 |
+
template = OptionTemplateText;
|
224 |
+
group = 'text';
|
225 |
+
break;
|
226 |
+
case 'file':
|
227 |
+
template = OptionTemplateFile;
|
228 |
+
group = 'file';
|
229 |
+
break;
|
230 |
+
case 'drop_down':
|
231 |
+
case 'radio':
|
232 |
+
case 'checkbox':
|
233 |
+
case 'multiple':
|
234 |
+
template = OptionTemplateSelect;
|
235 |
+
group = 'select';
|
236 |
+
break;
|
237 |
+
case 'date':
|
238 |
+
case 'date_time':
|
239 |
+
case 'time':
|
240 |
+
template = OptionTemplateDate;
|
241 |
+
group = 'date';
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
|
245 |
+
$('<?php echo $this->getFieldId() ?>_'+data.id+'_previous_group').value = group;
|
246 |
+
|
247 |
+
template = '<div id="<?php echo $this->getFieldId() ?>_{{id}}_type_'+group+'" class="grid tier form-list">'+template+'</div><div id="<?php echo $this->getFieldId() ?>_{{id}}_type_'+group+'_advice"></div>';
|
248 |
+
|
249 |
+
this.secondTemplate = new Template(template, this.templateSyntax);
|
250 |
+
|
251 |
+
Element.insert($('<?php echo $this->getFieldId() ?>_'+data.option_id), {'after':this.secondTemplate.evaluate(data)});
|
252 |
+
|
253 |
+
if (data.checkboxScopePrice) {
|
254 |
+
//set disabled
|
255 |
+
if ($('<?php echo $this->getFieldId() ?>_'+data.option_id+'_price') && data.scopePriceDisabled) {
|
256 |
+
$('<?php echo $this->getFieldId() ?>_'+data.option_id+'_price').disable();
|
257 |
+
$('<?php echo $this->getFieldId() ?>_'+data.option_id+'_price_type').disable();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
switch(data.type){
|
262 |
+
case 'drop_down':
|
263 |
+
case 'radio':
|
264 |
+
case 'checkbox':
|
265 |
+
case 'multiple':
|
266 |
+
data.optionValues.each(function(value) {
|
267 |
+
selectOptionType.add(value);
|
268 |
+
});
|
269 |
+
selectOptionType.bindAddButton();
|
270 |
+
break;
|
271 |
+
}
|
272 |
+
|
273 |
+
if (data.price_type) {
|
274 |
+
$A($('<?php echo $this->getFieldId() ?>_'+data.option_id+'_price_type').options).each(function(option){
|
275 |
+
if (option.value==data.price_type) option.selected = true;
|
276 |
+
});
|
277 |
+
}
|
278 |
+
|
279 |
+
},
|
280 |
+
bindSelectInputType : function(){
|
281 |
+
var types = $$('.select-product-option-type');
|
282 |
+
for(var i=0;i<types.length;i++){
|
283 |
+
if(!$(types[i]).binded){
|
284 |
+
$(types[i]).binded = true;
|
285 |
+
Event.observe(types[i], 'change', function(event){
|
286 |
+
productOptionType.loadStepTwo(event);
|
287 |
+
});
|
288 |
+
}
|
289 |
+
}
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
var productOptionScope = {
|
294 |
+
addScope : function(event){
|
295 |
+
var element = $(Event.element(event));
|
296 |
+
fieldToDisable = $(element.readAttribute('id').sub('_use_default', ''));
|
297 |
+
|
298 |
+
if (fieldToDisable.disabled) {
|
299 |
+
if (fieldToDisable.hasClassName('product-option-price')) {//need change to cheking value of element
|
300 |
+
$(fieldToDisable.readAttribute('id')+'_type').enable();
|
301 |
+
}
|
302 |
+
fieldToDisable.enable();
|
303 |
+
} else {
|
304 |
+
if (fieldToDisable.hasClassName('product-option-price')) {//need change to cheking value of element
|
305 |
+
$(fieldToDisable.readAttribute('id')+'_type').disable();
|
306 |
+
}
|
307 |
+
fieldToDisable.disable();
|
308 |
+
}
|
309 |
+
},
|
310 |
+
bindScopeCheckbox : function(){
|
311 |
+
var checkboxes = $$('.product-option-scope-checkbox');
|
312 |
+
for (var i=0;i<checkboxes.length;i++) {
|
313 |
+
if (!$(checkboxes[i]).binded) {
|
314 |
+
$(checkboxes[i]).binded = true;
|
315 |
+
Event.observe(checkboxes[i], 'click', this.addScope.bind(this));
|
316 |
+
}
|
317 |
+
}
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
if($('option_panel')){
|
322 |
+
$('option_panel').remove();
|
323 |
+
}
|
324 |
+
|
325 |
+
productOption.bindRemoveButtons();
|
326 |
+
|
327 |
+
if($('<?php echo $this->getAddButtonId() ?>')){
|
328 |
+
Event.observe('<?php echo $this->getAddButtonId() ?>', 'click', productOption.add.bind(productOption));
|
329 |
+
}
|
330 |
+
|
331 |
+
//validation for selected input type
|
332 |
+
Validation.addAllThese([
|
333 |
+
['required-option-select', <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Select type of option')) ?>, function(v, elm) {
|
334 |
+
if (elm.getValue() == '') {
|
335 |
+
return false;
|
336 |
+
}
|
337 |
+
return true;
|
338 |
+
}]]);
|
339 |
+
|
340 |
+
//adding data to templates
|
341 |
+
<?php foreach ($this->getOptionValues() as $_value): ?>
|
342 |
+
productOption.add(<?php echo $_value->toJson() ?>);
|
343 |
+
productOptionType.addDataToValues(<?php echo $_value->toJson() ?>);
|
344 |
+
<?php endforeach; ?>
|
345 |
+
|
346 |
+
//bind scope checkboxes
|
347 |
+
productOptionScope.bindScopeCheckbox();
|
348 |
+
//]]>
|
349 |
+
</script>
|
350 |
+
|
351 |
+
<?php foreach ($this->getOptionValues() as $_value): ?>
|
352 |
+
<?php
|
353 |
+
echo '<pre>';
|
354 |
+
echo $_value->toJson();
|
355 |
+
die();
|
356 |
+
?>
|
357 |
+
<?php endforeach; ?>
|
358 |
+
|
359 |
+
<div><?php if (!$this->isReadonly()):?><input type="hidden" name="affect_product_custom_options" value="1" /><?php endif;?></div>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options/type/date.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
|
29 |
+
OptionTemplateDate = '<table class="border" cellpadding="0" cellspacing="0">'+
|
30 |
+
'<tr class="headings">'+
|
31 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
32 |
+
'<th class="type-price"><?php echo Mage::helper('catalog')->__('Price') ?></th>' +
|
33 |
+
'<th class="type-type"><?php echo Mage::helper('catalog')->__('Price Type') ?></th>' +
|
34 |
+
<?php endif; ?>
|
35 |
+
'<th class="last"><?php echo Mage::helper('catalog')->__('SKU') ?></th>'+
|
36 |
+
'</tr>'+
|
37 |
+
'<tr>'+
|
38 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
39 |
+
'<td><input type="text" class="input-text validate-number product-option-price" id="product_option_{{option_id}}_price" name="product[options][{{option_id}}][price]" value="{{price}}"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?>></td>' +
|
40 |
+
'<td><?php echo $this->getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}</td>' +
|
41 |
+
<?php else : ?>
|
42 |
+
'<input type="hidden" id="product_option_{{option_id}}_price" name="product[options][{{option_id}}][price]">' +
|
43 |
+
'<input type="hidden" name="product[options][{{option_id}}][price_type]" id="product_option_{{option_id}}_price_type">' +
|
44 |
+
<?php endif; ?>
|
45 |
+
'<td class="last"><input type="text" class="input-text type-sku" name="product[options][{{option_id}}][sku]" value="{{sku}}"></td>'+
|
46 |
+
'</tr>'+
|
47 |
+
'</table>';
|
48 |
+
|
49 |
+
if ($('option_panel_type_date')) {
|
50 |
+
$('option_panel_type_date').remove();
|
51 |
+
}
|
52 |
+
|
53 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options/type/file.phtml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
|
29 |
+
OptionTemplateFile = '<table class="border" cellpadding="0" cellspacing="0">'+
|
30 |
+
'<tr class="headings">'+
|
31 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
32 |
+
'<th class="type-price">' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Price')); ?> + '</th>' +
|
33 |
+
'<th class="type-type">' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Price Type')); ?> + '</th>' +
|
34 |
+
<?php endif; ?>
|
35 |
+
'<th class="type-sku">' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('SKU')); ?> + '</th>' +
|
36 |
+
'<th class="type-title">' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Allowed File Extensions')); ?> + '</th>'+
|
37 |
+
'<th class="last">' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Maximum Image Size')); ?> + '</th>' +
|
38 |
+
'</tr>' +
|
39 |
+
'<tr>' +
|
40 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
41 |
+
'<td><input class="input-text validate-zero-or-greater" type="text" name="product[options][{{option_id}}][price]" value="{{price}}"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?>></td>' +
|
42 |
+
'<td>' + <?php echo $this->helper('core')->jsonEncode($this->getPriceTypeSelectHtml()) ?> + '</td>' +
|
43 |
+
<?php else : ?>
|
44 |
+
'<input type="hidden" name="product[options][{{option_id}}][price]">' +
|
45 |
+
'<input type="hidden" name="product[options][{{option_id}}][price_type]" id="product_option_{{option_id}}_price_type">' +
|
46 |
+
<?php endif; ?>
|
47 |
+
'<td><input type="text" class="input-text" name="product[options][{{option_id}}][sku]" value="{{sku}}"></td>' +
|
48 |
+
'<td><input class="input-text" type="text" name="product[options][{{option_id}}][file_extension]" value="{{file_extension}}"></td>' +
|
49 |
+
'<td class="type-last last" nowrap><input class="input-text" type="text" name="product[options][{{option_id}}][image_size_x]" value="{{image_size_x}}">' +
|
50 |
+
<?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('x')) ?> +
|
51 |
+
'<input class="input-text" type="text" name="product[options][{{option_id}}][image_size_y]" value="{{image_size_y}}">' +
|
52 |
+
<?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('px.')) ?> +
|
53 |
+
'<br/>' + <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('leave blank if its not an image')) ?> + '</td>' +
|
54 |
+
'</tr>'+
|
55 |
+
'</table>';
|
56 |
+
|
57 |
+
if ($('option_panel_type_file')) {
|
58 |
+
$('option_panel_type_file').remove();
|
59 |
+
}
|
60 |
+
|
61 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<script type="text/javascript">
|
29 |
+
//<![CDATA[
|
30 |
+
OptionTemplateSelect = '<table class="border" cellpadding="0" cellspacing="0">'+
|
31 |
+
'<input type="hidden" class="required-option-select-type-rows" name="validation_{{option_id}}_result" value="" >'+
|
32 |
+
'<thead>'+
|
33 |
+
'<tr class="headings">'+
|
34 |
+
'<th class="type-title"><?php echo Mage::helper('catalog')->__('Title') ?> <span class="required">*</span></th>'+
|
35 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
36 |
+
'<th class="type-price"><?php echo Mage::helper('catalog')->__('Price') ?></th>' +
|
37 |
+
'<th class="type-type"><?php echo Mage::helper('catalog')->__('Price Type') ?></th>' +
|
38 |
+
<?php endif; ?>
|
39 |
+
'<th class="type-sku"><?php echo Mage::helper('catalog')->__('SKU') ?></th>'+
|
40 |
+
'<th class="type-order"><?php echo Mage::helper('catalog')->__('Sort Order') ?></th>'+
|
41 |
+
'<th class="type-butt last"> </th>'+
|
42 |
+
'</tr>'+
|
43 |
+
'</thead>'+
|
44 |
+
'<tbody id="select_option_type_row_{{option_id}}">'+
|
45 |
+
'</tbody>'+
|
46 |
+
'<tfoot>'+
|
47 |
+
'<tr>'+
|
48 |
+
'<td colspan="100" class="a-right"><?php echo $this->getAddButtonHtml() ?></td>'+
|
49 |
+
'</tr>'+
|
50 |
+
'</tfoot>'+
|
51 |
+
'</table>';
|
52 |
+
|
53 |
+
OptionTemplateSelectRow = '<tr id="product_option_{{id}}_select_{{select_id}}">'+
|
54 |
+
'<td>'+
|
55 |
+
'<input type="hidden" name="product[options][{{id}}][values][{{select_id}}][option_type_id]" value="{{option_type_id}}">'+
|
56 |
+
'<input type="hidden" id="product_option_{{id}}_select_{{select_id}}_is_delete" name="product[options][{{id}}][values][{{select_id}}][is_delete]" value="">'+
|
57 |
+
'<input type="text" class="required-entry input-text select-type-title" id="product_option_{{id}}_select_{{select_id}}_title" name="product[options][{{id}}][values][{{select_id}}][title]" value="{{title}}">{{checkboxScopeTitle}}</td>'+
|
58 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
59 |
+
'<td><input type="text" class="input-text validate-number product-option-price" id="product_option_{{id}}_select_{{select_id}}_price" name="product[options][{{id}}][values][{{select_id}}][price]" value="{{price}}"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?>></td>' +
|
60 |
+
'<td><?php echo $this->getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}</td>' +
|
61 |
+
<?php else : ?>
|
62 |
+
'<input type="hidden" id="product_option_{{id}}_select_{{select_id}}_price" name="product[options][{{id}}][values][{{select_id}}][price]">' +
|
63 |
+
'<input type="hidden" name="product[options][{{id}}][values][{{select_id}}][price_type]" id="product_option_{{id}}_select_{{select_id}}_price_type">' +
|
64 |
+
<?php endif; ?>
|
65 |
+
'<td><input type="text" class="input-text" name="product[options][{{id}}][values][{{select_id}}][sku]" value="{{sku}}"></td>'+
|
66 |
+
'<td><input type="text" class="validate-zero-or-greater input-text" name="product[options][{{id}}][values][{{select_id}}][sort_order]" value="{{sort_order}}"></td>'+
|
67 |
+
'<td class="last"><span title="Delete row"><?php echo $this->getDeleteButtonHtml() ?></span></td>'+
|
68 |
+
'</tr>';
|
69 |
+
|
70 |
+
selectOptionType = {
|
71 |
+
div : 'select_option_type_row',
|
72 |
+
itemCount : 0,
|
73 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
74 |
+
templateText : OptionTemplateSelectRow,
|
75 |
+
add : function(data) {
|
76 |
+
|
77 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
78 |
+
|
79 |
+
if (data.target || data.srcElement) {//data is Event (work in IE and Firefox)
|
80 |
+
element = $(Event.findElement(data, 'button'));
|
81 |
+
optionId = element.readAttribute('id').sub('add_select_row_button_', '');
|
82 |
+
data = {};
|
83 |
+
data.option_type_id = '-1';
|
84 |
+
data.select_id = this.itemCount;
|
85 |
+
} else {
|
86 |
+
optionId = data.option_id;
|
87 |
+
data.select_id = data.option_type_id;
|
88 |
+
this.itemCount = data.item_count;
|
89 |
+
}
|
90 |
+
|
91 |
+
data.id = optionId;
|
92 |
+
|
93 |
+
Element.insert($(this.div+'_'+data.id), {'bottom':this.template.evaluate(data)});
|
94 |
+
|
95 |
+
if (data.checkboxScopeTitle) {
|
96 |
+
//set disabled
|
97 |
+
if ($('product_option_'+data.id+'_select_'+data.select_id+'_title') && data.scopeTitleDisabled) {
|
98 |
+
$('product_option_'+data.id+'_select_'+data.select_id+'_title').disable();
|
99 |
+
}
|
100 |
+
}
|
101 |
+
if (data.checkboxScopePrice) {
|
102 |
+
//set disabled
|
103 |
+
if ($('product_option_'+data.id+'_select_'+data.select_id+'_price') && data.scopePriceDisabled) {
|
104 |
+
$('product_option_'+data.id+'_select_'+data.select_id+'_price').disable();
|
105 |
+
$('product_option_'+data.id+'_select_'+data.select_id+'_price_type').disable();
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
if (data.price_type) {
|
110 |
+
$A($('product_option_'+data.id+'_select_'+data.select_id+'_price_type').options).each(function(option){
|
111 |
+
if (option.value==data.price_type) option.selected = true;
|
112 |
+
});
|
113 |
+
}
|
114 |
+
|
115 |
+
this.itemCount++;
|
116 |
+
this.bindRemoveButtons();
|
117 |
+
},
|
118 |
+
remove : function(event){
|
119 |
+
var element = $(Event.findElement(event, 'tr'));
|
120 |
+
|
121 |
+
if(element){
|
122 |
+
$(element.readAttribute('id')+'_is_delete').value = '1';
|
123 |
+
element.addClassName('no-display');
|
124 |
+
element.addClassName('ignore-validate');
|
125 |
+
element.hide();
|
126 |
+
}
|
127 |
+
},
|
128 |
+
bindRemoveButtons : function(){
|
129 |
+
var buttons = $$('.delete-select-row');
|
130 |
+
for(var i=0;i<buttons.length;i++){
|
131 |
+
if(!$(buttons[i]).binded){
|
132 |
+
$(buttons[i]).binded = true;
|
133 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
134 |
+
}
|
135 |
+
}
|
136 |
+
},
|
137 |
+
bindAddButton : function()
|
138 |
+
{
|
139 |
+
var buttons = $$('.add-select-row');
|
140 |
+
for(var i=0;i<buttons.length;i++){
|
141 |
+
if(!$(buttons[i]).binded){
|
142 |
+
$(buttons[i]).binded = true;
|
143 |
+
Event.observe(buttons[i], 'click', this.add.bind(this));
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
if ($('option_panel_type_select')) {
|
150 |
+
$('option_panel_type_select').remove();
|
151 |
+
}
|
152 |
+
|
153 |
+
selectOptionType.bindRemoveButtons();
|
154 |
+
|
155 |
+
Validation.addAllThese([
|
156 |
+
['required-option-select-type-rows', <?php echo $this->helper('core')->jsonEncode(Mage::helper('catalog')->__('Please add rows to option.')); ?>, function(v, elm) {
|
157 |
+
var optionContainerElm = elm.up('div.grid');
|
158 |
+
var selectTypesFlag = false;
|
159 |
+
selectTypeElements = $$('#'+optionContainerElm.id+' .select-type-title');
|
160 |
+
selectTypeElements.each(function(elm){
|
161 |
+
if (elm.id && elm.up('tr').visible()) {
|
162 |
+
selectTypesFlag = true;
|
163 |
+
}
|
164 |
+
});
|
165 |
+
elm.advaiceContainer = optionContainerElm.id+'_advice';
|
166 |
+
return selectTypesFlag;
|
167 |
+
}]]);
|
168 |
+
|
169 |
+
if($('add_select_row_button')){
|
170 |
+
Event.observe('add_select_row_button', 'click', selectOptionType.add.bind(selectOptionType));
|
171 |
+
}
|
172 |
+
//]]>
|
173 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/options/type/text.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
OptionTemplateText = '<table class="border" cellpadding="0" cellspacing="0">'+
|
30 |
+
'<tr class="headings">'+
|
31 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
32 |
+
'<th class="type-price"><?php echo Mage::helper('catalog')->__('Price') ?></th>' +
|
33 |
+
'<th class="type-type"><?php echo Mage::helper('catalog')->__('Price Type') ?></th>' +
|
34 |
+
<?php endif; ?>
|
35 |
+
'<th class="type-sku"><?php echo Mage::helper('catalog')->__('SKU') ?></th>'+
|
36 |
+
'<th class="type-last last"><?php echo Mage::helper('catalog')->__('Max Characters') ?> </th>'+
|
37 |
+
'</tr>'+
|
38 |
+
'<tr>'+
|
39 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
40 |
+
'<td><input type="text" class="input-text validate-number product-option-price" id="product_option_{{option_id}}_price" name="product[options][{{option_id}}][price]" value="{{price}}"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?>></td>' +
|
41 |
+
'<td><?php echo $this->getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}</td>' +
|
42 |
+
<?php else : ?>
|
43 |
+
'<input type="hidden" name="product[options][{{option_id}}][price]">' +
|
44 |
+
'<input type="hidden" name="product[options][{{option_id}}][price_type]" id="product_option_{{option_id}}_price_type">' +
|
45 |
+
<?php endif; ?>
|
46 |
+
'<td><input type="text" class="input-text" name="product[options][{{option_id}}][sku]" value="{{sku}}"></td>'+
|
47 |
+
'<td class="type-last last"><input type="text" class="input-text validate-zero-or-greater" name="product[options][{{option_id}}][max_characters]" value="{{max_characters}}"></td>'+
|
48 |
+
'</tr>'+
|
49 |
+
'</table>';
|
50 |
+
|
51 |
+
if ($('option_panel_type_text')) {
|
52 |
+
$('option_panel_type_text').remove();
|
53 |
+
}
|
54 |
+
//]]>
|
55 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/price/group.phtml
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/** @var $this Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group */
|
29 |
+
$_htmlId = $this->getElement()->getHtmlId();
|
30 |
+
$_htmlClass = $this->getElement()->getClass();
|
31 |
+
$_htmlName = $this->getElement()->getName();
|
32 |
+
$_readonly = $this->getElement()->getReadonly();
|
33 |
+
$_priceValueValidation = $this->getPriceValidation('validate-zero-or-greater');
|
34 |
+
|
35 |
+
$_showWebsite= $this->isMultiWebsites();
|
36 |
+
?>
|
37 |
+
<tr>
|
38 |
+
<td class="label"><?php echo $this->getElement()->getLabel(); ?></td>
|
39 |
+
<td colspan="10" class="grid tier">
|
40 |
+
<table cellspacing="0" class="data border" id="group_prices_table">
|
41 |
+
<?php if ($_showWebsite) : ?>
|
42 |
+
<col width="135" />
|
43 |
+
<?php endif; ?>
|
44 |
+
<col width="120" />
|
45 |
+
<col />
|
46 |
+
<col width="1" />
|
47 |
+
<thead>
|
48 |
+
<tr class="headings">
|
49 |
+
<th <?php if (!$_showWebsite): ?>style="display: none;"<?php endif; ?>><?php echo Mage::helper('catalog')->__('Website'); ?></th>
|
50 |
+
<th><?php echo Mage::helper('catalog')->__('Customer Group'); ?></th>
|
51 |
+
<th><?php echo $this->getPriceColumnHeader(Mage::helper('catalog')->__('Price')); ?></th>
|
52 |
+
<th class="last"><?php echo Mage::helper('catalog')->__('Action'); ?></th>
|
53 |
+
</tr>
|
54 |
+
</thead>
|
55 |
+
<tbody id="<?php echo $_htmlId; ?>_container"></tbody>
|
56 |
+
<tfoot>
|
57 |
+
<tr>
|
58 |
+
<td <?php if (!$_showWebsite): ?>style="display: none;"<?php endif; ?>></td>
|
59 |
+
<td colspan="4" class="a-right"><?php echo $this->getAddButtonHtml(); ?></td>
|
60 |
+
</tr>
|
61 |
+
</tfoot>
|
62 |
+
</table>
|
63 |
+
|
64 |
+
<script type="text/javascript">
|
65 |
+
//<![CDATA[
|
66 |
+
var groupPriceRowTemplate = '<tr>'
|
67 |
+
+ '<td<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>'
|
68 |
+
+ '<select class="<?php echo $_htmlClass; ?> required-entry" name="<?php echo $_htmlName; ?>[{{index}}][website_id]" id="group_price_row_{{index}}_website">'
|
69 |
+
<?php foreach ($this->getWebsites() as $_websiteId => $_info) : ?>
|
70 |
+
+ '<option value="<?php echo $_websiteId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_info['name'])); ?><?php if (!empty($_info['currency'])) : ?> [<?php echo $this->escapeHtml($_info['currency']); ?>]<?php endif; ?></option>'
|
71 |
+
<?php endforeach; ?>
|
72 |
+
+ '</select></td>'
|
73 |
+
+ '<td><select class="<?php echo $_htmlClass; ?> custgroup required-entry" name="<?php echo $_htmlName; ?>[{{index}}][cust_group]" id="group_price_row_{{index}}_cust_group">'
|
74 |
+
<?php foreach ($this->getCustomerGroups() as $_groupId => $_groupName): ?>
|
75 |
+
+ '<option value="<?php echo $_groupId; ?>"><?php echo $this->jsQuoteEscape($this->escapeHtml($_groupName)); ?></option>'
|
76 |
+
<?php endforeach; ?>
|
77 |
+
+ '</select></td>'
|
78 |
+
+ '<td><input class="<?php echo $_htmlClass; ?> required-entry <?php echo $_priceValueValidation; ?>" type="text" name="<?php echo $_htmlName; ?>[{{index}}][price]" value="{{price}}" id="group_price_row_{{index}}_price" /></td>'
|
79 |
+
+ '<td class="last"><input type="hidden" name="<?php echo $_htmlName; ?>[{{index}}][delete]" class="delete" value="" id="group_price_row_{{index}}_delete" />'
|
80 |
+
+ '<button title="<?php echo Mage::helper('catalog')->__('Delete Group Price'); ?>" type="button" class="scalable delete icon-btn delete-product-option" id="group_price_row_{{index}}_delete_button" onclick="return groupPriceControl.deleteItem(event);">'
|
81 |
+
+ '<span><?php echo Mage::helper('catalog')->__('Delete'); ?></span></button></td>'
|
82 |
+
+ '</tr>';
|
83 |
+
|
84 |
+
var groupPriceControl = {
|
85 |
+
template: new Template(groupPriceRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', '')),
|
86 |
+
itemsCount: 0,
|
87 |
+
addItem : function () {
|
88 |
+
<?php if ($_readonly): ?>
|
89 |
+
if (arguments.length < 3) {
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
<?php endif; ?>
|
93 |
+
var data = {
|
94 |
+
website_id: '<?php echo $this->getDefaultWebsite(); ?>',
|
95 |
+
group: '<?php echo $this->getDefaultCustomerGroup(); ?>',
|
96 |
+
price: '',
|
97 |
+
readOnly: false,
|
98 |
+
index: this.itemsCount++
|
99 |
+
};
|
100 |
+
|
101 |
+
if(arguments.length >= 3) {
|
102 |
+
data.website_id = arguments[0];
|
103 |
+
data.group = arguments[1];
|
104 |
+
data.price = arguments[2];
|
105 |
+
}
|
106 |
+
if (arguments.length == 4) {
|
107 |
+
data.readOnly = arguments[3];
|
108 |
+
}
|
109 |
+
|
110 |
+
Element.insert($('<?php echo $_htmlId; ?>_container'), {
|
111 |
+
bottom : this.template.evaluate(data)
|
112 |
+
});
|
113 |
+
|
114 |
+
$('group_price_row_' + data.index + '_cust_group').value = data.group;
|
115 |
+
$('group_price_row_' + data.index + '_website').value = data.website_id;
|
116 |
+
|
117 |
+
<?php if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()): ?>
|
118 |
+
var websiteElement = $('group_price_row_' + data.index + '_website');
|
119 |
+
var websiteCaption = websiteElement.options[websiteElement.selectedIndex].text;
|
120 |
+
|
121 |
+
websiteElement.insert({after:'<span class="website-name">' + websiteCaption + '</span>'});
|
122 |
+
websiteElement.hide();
|
123 |
+
<?php endif;?>
|
124 |
+
|
125 |
+
if (data.readOnly == '1') {
|
126 |
+
['website', 'cust_group', 'price', 'delete'].each(function(element_suffix) {
|
127 |
+
$('group_price_row_' + data.index + '_' + element_suffix).disabled = true;
|
128 |
+
});
|
129 |
+
$('group_price_row_' + data.index + '_delete_button').hide();
|
130 |
+
}
|
131 |
+
|
132 |
+
<?php if ($_readonly): ?>
|
133 |
+
$('<?php echo $_htmlId; ?>_container').select('input', 'select').each(this.disableElement);
|
134 |
+
$('<?php echo $_htmlId; ?>_container').up('table').select('button').each(this.disableElement);
|
135 |
+
<?php else: ?>
|
136 |
+
$('<?php echo $_htmlId; ?>_container').select('input', 'select').each(function(element) {
|
137 |
+
Event.observe(element, 'change', element.setHasChanges.bind(element));
|
138 |
+
});
|
139 |
+
<?php endif; ?>
|
140 |
+
},
|
141 |
+
disableElement: function(element) {
|
142 |
+
element.disabled = true;
|
143 |
+
element.addClassName('disabled');
|
144 |
+
},
|
145 |
+
deleteItem: function(event) {
|
146 |
+
var tr = Event.findElement(event, 'tr');
|
147 |
+
if (tr) {
|
148 |
+
Element.select(tr, '.delete').each(function(element) {
|
149 |
+
element.value='1';
|
150 |
+
});
|
151 |
+
Element.select(tr, ['input', 'select']).each(function(element) {
|
152 |
+
element.hide();
|
153 |
+
});
|
154 |
+
Element.hide(tr);
|
155 |
+
Element.addClassName(tr, 'no-display template');
|
156 |
+
}
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
};
|
160 |
+
<?php foreach ($this->getValues() as $_item) : ?>
|
161 |
+
groupPriceControl.addItem('<?php echo $_item['website_id']; ?>', '<?php echo $_item['cust_group']; ?>', '<?php echo sprintf('%.2f', $_item['price']); ?>', <?php echo (int)!empty($_item['readonly']); ?>);
|
162 |
+
<?php endforeach; ?>
|
163 |
+
<?php if ($_readonly) : ?>
|
164 |
+
$('<?php echo $_htmlId; ?>_container').up('table').select('button')
|
165 |
+
.each(groupPriceControl.disableElement);
|
166 |
+
<?php endif; ?>
|
167 |
+
//]]>
|
168 |
+
</script>
|
169 |
+
</td></tr>
|
app/design/adminhtml/default/default/template/catalog/product/edit/price/tier.phtml
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/* @var $this Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier */
|
27 |
+
?>
|
28 |
+
<?php $_htmlId = $this->getElement()->getHtmlId() ?>
|
29 |
+
<?php $_htmlClass = $this->getElement()->getClass() ?>
|
30 |
+
<?php $_htmlName = $this->getElement()->getName() ?>
|
31 |
+
<?php $_readonly = $this->getElement()->getReadonly() ?>
|
32 |
+
<?php $_showWebsite = $this->isShowWebsiteColumn(); ?>
|
33 |
+
<?php $_editWebsite = $this->isAllowChangeWebsite(); ?>
|
34 |
+
<?php $_priceValueValidation = $this->getPriceValidation('validate-greater-than-zero'); ?>
|
35 |
+
|
36 |
+
|
37 |
+
<?php $_showWebsite = $this->isShowWebsiteColumn(); ?>
|
38 |
+
<?php $_showWebsite= $this->isMultiWebsites(); ?>
|
39 |
+
<tr>
|
40 |
+
<td class="label"><?php echo $this->getElement()->getLabel() ?></td>
|
41 |
+
<td colspan="10" class="grid tier">
|
42 |
+
<table cellspacing="0" class="data border" id="tiers_table">
|
43 |
+
<?php if ($_showWebsite): ?>
|
44 |
+
<col width="135" />
|
45 |
+
<?php endif; ?>
|
46 |
+
<col width="120" />
|
47 |
+
<col width="95" />
|
48 |
+
<col />
|
49 |
+
<col width="1" />
|
50 |
+
<thead>
|
51 |
+
<tr class="headings">
|
52 |
+
<th <?php if (!$_showWebsite): ?>style="display:none"<?php endif; ?>><?php echo Mage::helper('sales')->__('Website') ?></th>
|
53 |
+
<th><?php echo Mage::helper('catalog')->__('Customer Group') ?></th>
|
54 |
+
<th><?php echo Mage::helper('catalog')->__('Qty') ?></th>
|
55 |
+
<th><?php echo $this->getPriceColumnHeader(Mage::helper('catalog')->__('Price')) ?></th>
|
56 |
+
<th class="last"><?php echo Mage::helper('catalog')->__('Action') ?></th>
|
57 |
+
</tr>
|
58 |
+
</thead>
|
59 |
+
<tbody id="<?php echo $_htmlId ?>_container"></tbody>
|
60 |
+
<tfoot>
|
61 |
+
<tr>
|
62 |
+
<td <?php if (!$_showWebsite): ?>style="display:none"<?php endif; ?>></td>
|
63 |
+
<td colspan="4" class="a-right"><?php echo $this->getAddButtonHtml() ?></td>
|
64 |
+
</tr>
|
65 |
+
</tfoot>
|
66 |
+
</table>
|
67 |
+
|
68 |
+
<script type="text/javascript">
|
69 |
+
//<![CDATA[
|
70 |
+
var tierPriceRowTemplate = '<tr>'
|
71 |
+
+ '<td<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>'
|
72 |
+
+ '<select class="<?php echo $_htmlClass ?> required-entry" name="<?php echo $_htmlName ?>[{{index}}][website_id]" id="tier_price_row_{{index}}_website">'
|
73 |
+
<?php foreach ($this->getWebsites() as $_websiteId => $_info): ?>
|
74 |
+
+ '<option value="<?php echo $_websiteId ?>"><?php echo $this->jsQuoteEscape($this->htmlEscape($_info['name'])) ?><?php if (!empty($_info['currency'])): ?> [<?php echo $this->htmlEscape($_info['currency']) ?>]<?php endif; ?></option>'
|
75 |
+
<?php endforeach ?>
|
76 |
+
+ '</select></td>'
|
77 |
+
+ '<td><select class="<?php echo $_htmlClass ?> custgroup required-entry" name="<?php echo $_htmlName ?>[{{index}}][cust_group]" id="tier_price_row_{{index}}_cust_group">'
|
78 |
+
<?php foreach ($this->getCustomerGroups() as $_groupId=>$_groupName): ?>
|
79 |
+
+ '<option value="<?php echo $_groupId ?>"><?php echo $this->jsQuoteEscape($this->htmlEscape($_groupName)) ?></option>'
|
80 |
+
<?php endforeach ?>
|
81 |
+
+ '</select></td>'
|
82 |
+
+ '<td class="nobr"><input class="<?php echo $_htmlClass ?> qty required-entry validate-greater-than-zero" type="text" name="<?php echo $_htmlName ?>[{{index}}][price_qty]" value="{{qty}}" id="tier_price_row_{{index}}_qty" />'
|
83 |
+
+ ' <small class="nobr"><?php echo Mage::helper('catalog')->__("and above")?></small></td>'
|
84 |
+
+ '<td><input class="<?php echo $_htmlClass ?> required-entry <?php echo $_priceValueValidation ?>" type="text" name="<?php echo $_htmlName ?>[{{index}}][price]" value="{{price}}" id="tier_price_row_{{index}}_price" /></td>'
|
85 |
+
+ '<td class="last"><input type="hidden" name="<?php echo $_htmlName ?>[{{index}}][delete]" class="delete" value="" id="tier_price_row_{{index}}_delete" />'
|
86 |
+
+ '<button title="<?php echo Mage::helper('catalog')->__("Delete Tier") ?>" type="button" class="scalable delete icon-btn delete-product-option" id="tier_price_row_{{index}}_delete_button" onclick="return tierPriceControl.deleteItem(event);">'
|
87 |
+
+ '<span><span><span><?php echo Mage::helper('catalog')->__("Delete") ?></span></span></span></button></td>'
|
88 |
+
+ '</tr>';
|
89 |
+
|
90 |
+
var tierPriceControl = {
|
91 |
+
template: new Template(tierPriceRowTemplate, new RegExp('(^|.|\\r|\\n)({{\\s*(\\w+)\\s*}})', "")),
|
92 |
+
itemsCount: 0,
|
93 |
+
addItem : function () {
|
94 |
+
<?php if ($_readonly): ?>
|
95 |
+
if (arguments.length < 4) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
<?php endif; ?>
|
99 |
+
var data = {
|
100 |
+
website_id: '<?php echo $this->getDefaultWebsite() ?>',
|
101 |
+
group: '<?php echo $this->getDefaultCustomerGroup() ?>',
|
102 |
+
qty: '',
|
103 |
+
price: '',
|
104 |
+
readOnly: false,
|
105 |
+
index: this.itemsCount++
|
106 |
+
};
|
107 |
+
|
108 |
+
if(arguments.length >= 4) {
|
109 |
+
data.website_id = arguments[0];
|
110 |
+
data.group = arguments[1];
|
111 |
+
data.qty = arguments[2];
|
112 |
+
data.price = arguments[3];
|
113 |
+
}
|
114 |
+
if (arguments.length == 5) {
|
115 |
+
data.readOnly = arguments[4];
|
116 |
+
}
|
117 |
+
|
118 |
+
Element.insert($('<?php echo $_htmlId ?>_container'), {
|
119 |
+
bottom : this.template.evaluate(data)
|
120 |
+
});
|
121 |
+
|
122 |
+
$('tier_price_row_' + data.index + '_cust_group').value = data.group;
|
123 |
+
$('tier_price_row_' + data.index + '_website').value = data.website_id;
|
124 |
+
|
125 |
+
<?php if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()):?>
|
126 |
+
var wss = $('tier_price_row_' + data.index + '_website');
|
127 |
+
var txt = wss.options[wss.selectedIndex].text;
|
128 |
+
|
129 |
+
wss.insert({after:'<span class="website-name">' + txt + '</span>'});
|
130 |
+
wss.hide();
|
131 |
+
<?php endif;?>
|
132 |
+
|
133 |
+
if (data.readOnly == '1') {
|
134 |
+
['website', 'cust_group', 'qty', 'price', 'delete'].each(function(idx){
|
135 |
+
$('tier_price_row_'+data.index+'_'+idx).disabled = true;
|
136 |
+
});
|
137 |
+
$('tier_price_row_'+data.index+'_delete_button').hide();
|
138 |
+
}
|
139 |
+
|
140 |
+
<?php if ($_readonly): ?>
|
141 |
+
$('<?php echo $_htmlId ?>_container').select('input', 'select').each(this.disableElement);
|
142 |
+
$('<?php echo $_htmlId ?>_container').up('table').select('button').each(this.disableElement);
|
143 |
+
<?php else: ?>
|
144 |
+
$('<?php echo $_htmlId ?>_container').select('input', 'select').each(function(el){ Event.observe(el, 'change', el.setHasChanges.bind(el)); });
|
145 |
+
<?php endif; ?>
|
146 |
+
},
|
147 |
+
disableElement: function(el) {
|
148 |
+
el.disabled = true;
|
149 |
+
el.addClassName('disabled');
|
150 |
+
},
|
151 |
+
deleteItem: function(event) {
|
152 |
+
var tr = Event.findElement(event, 'tr');
|
153 |
+
if (tr) {
|
154 |
+
Element.select(tr, '.delete').each(function(elem){elem.value='1'});
|
155 |
+
Element.select(tr, ['input', 'select']).each(function(elem){elem.hide()});
|
156 |
+
Element.hide(tr);
|
157 |
+
Element.addClassName(tr, 'no-display template');
|
158 |
+
}
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
};
|
162 |
+
<?php foreach ($this->getValues() as $_item): ?>
|
163 |
+
tierPriceControl.addItem('<?php echo $_item['website_id'] ?>', '<?php echo $_item['cust_group'] ?>', '<?php echo $_item['price_qty']*1 ?>', '<?php echo sprintf('%.2f', $_item['price']) ?>', <?php echo (int)!empty($_item['readonly'])?>);
|
164 |
+
<?php endforeach; ?>
|
165 |
+
<?php if ($_readonly): ?>
|
166 |
+
$('<?php echo $_htmlId ?>_container').up('table').select('button')
|
167 |
+
.each(tierPriceControl.disableElement);
|
168 |
+
<?php endif; ?>
|
169 |
+
//]]>
|
170 |
+
</script>
|
171 |
+
</td></tr>
|
app/design/adminhtml/default/default/template/catalog/product/edit/serializer.phtml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php $_id = 'id_' . md5(microtime()) ?>
|
29 |
+
<input type="hidden" name="<?php echo $this->getInputElementName()?>" value="" id="<?php echo $_id?>" />
|
30 |
+
<script type="text/javascript">
|
31 |
+
// create serializer controller, that will syncronize grid checkboxes with hidden input
|
32 |
+
new productLinksController('<?php echo $_id?>', <?php echo $this->getProductsJSON() ?>, <?php echo $this->getGridBlock()->getJsObjectName() ?>);
|
33 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if (!$this->isReadonly()):?>
|
28 |
+
<div class="entry-edit">
|
29 |
+
<div id="assign_product_warrning" style="display: none;">
|
30 |
+
<ul class="messages">
|
31 |
+
<li class="error-msg">
|
32 |
+
<ul>
|
33 |
+
<li><?php echo $this->__('Links with associated products will retain only after saving current product.') ?></li>
|
34 |
+
</ul>
|
35 |
+
</li>
|
36 |
+
</ul>
|
37 |
+
</div>
|
38 |
+
<div class="entry-edit-head">
|
39 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Create Simple Associated Product') ?></h4>
|
40 |
+
</div>
|
41 |
+
<fieldset class="a-right">
|
42 |
+
<?php echo $this->getChildHtml('create_empty') ?> <?php echo $this->getChildHtml('create_from_configurable') ?>
|
43 |
+
</fieldset>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
<div id="<?php echo $this->getHtmlId() ?>_simple_form" class="ignore-validate configurable-simple-product">
|
47 |
+
<?php echo $this->getChildHtml('simple'); ?>
|
48 |
+
</div>
|
49 |
+
<?php endif;?>
|
50 |
+
<div class="entry-edit">
|
51 |
+
<div class="entry-edit-head">
|
52 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Super product attributes configuration') ?></h4>
|
53 |
+
</div>
|
54 |
+
<fieldset id="<?php echo $this->getHtmlId() ?>">
|
55 |
+
<legend><?php echo Mage::helper('catalog')->__('Super product attributes configuration') ?></legend>
|
56 |
+
<input type="hidden" id="<?php echo $this->getHtmlId() ?>_save_links" name="configurable_products_data" value=""/>
|
57 |
+
<input type="hidden" id="<?php echo $this->getHtmlId() ?>_save_attributes" name="configurable_attributes_data" />
|
58 |
+
|
59 |
+
<ul class="messages">
|
60 |
+
<li class="notice-msg">
|
61 |
+
<ul><li><?php echo Mage::helper('catalog')->__('Price values for options should be specified in system base currency.')?></li></ul>
|
62 |
+
<ul><li><?php echo Mage::helper('catalog')->__('Attrribute names can be specified per store.')?></li></ul>
|
63 |
+
</li>
|
64 |
+
</ul>
|
65 |
+
<ul id="<?php echo $this->getHtmlId() ?>_attributes" class="super-attributes">
|
66 |
+
</ul>
|
67 |
+
</fieldset>
|
68 |
+
</div>
|
69 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>_attribute_template">
|
70 |
+
<div class="<?php if (!$this->isReadonly()):?>attribute-name-container <?php endif;?>left">
|
71 |
+
'{{frontend_label}}'
|
72 |
+
</div>
|
73 |
+
<div class="values-container right">
|
74 |
+
<label for="__id___label" class="bold"><?php echo Mage::helper('catalog')->__('Attribute Name:') ?></label>
|
75 |
+
<input id="__id___label" type="text" <?php if ($this->isAttributesConfigurationReadonly()): ?> disabled="disabled" <?php endif;?> class="input-text attribute-label required-entry template no-display" value="'{{label}}'" readonly="label" />
|
76 |
+
<input id="__id___label_use_default" type="checkbox" value="1" " checked="use_default" class="attribute-use-default-label">
|
77 |
+
<label for="__id___label_use_default"><?php echo Mage::helper('catalog')->__('Use default')?> ('{{store_label}}')</label>
|
78 |
+
<ul class="attribute-values">
|
79 |
+
</ul>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>_value_template">
|
83 |
+
<div class="attribute-value-label-container left">
|
84 |
+
<?php echo Mage::helper('catalog')->__('Option:') ?> <strong>'{{label}}'</strong>
|
85 |
+
</div>
|
86 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
87 |
+
<div class="attribute-values-container-main">
|
88 |
+
<div class="attribute-values-container left">
|
89 |
+
<?php echo Mage::helper('catalog')->__('Price:') ?>
|
90 |
+
<input id="__id___pricing" type="text" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?> class="input-text attribute-price validate-number template no-display" value="'{{pricing_value}}'"/>
|
91 |
+
</div>
|
92 |
+
<div class="attribute-values-container left">
|
93 |
+
<select class="attribute-price-type" id="__id___price_type" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?>>
|
94 |
+
<option value="0"><?php echo Mage::helper('catalog')->__('Fixed') ?></option>
|
95 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Percentage') ?></option>
|
96 |
+
</select>
|
97 |
+
</div>
|
98 |
+
<?php if ($this->getShowUseDefaultPrice()):?>
|
99 |
+
<div class="attribute-values-container">
|
100 |
+
<input id="__id___default" type="checkbox" <?php if ($this->isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" <?php endif;?> class="attribute-use-default-value"> <label for="__id___default" class="normal"><?php echo Mage::helper('catalog')->__('Use Default Value') ?></label>
|
101 |
+
</div>
|
102 |
+
<?php endif;?>
|
103 |
+
<?php else : ?>
|
104 |
+
<div class="attribute-values-container-main">
|
105 |
+
<div class="attribute-values-container left">
|
106 |
+
<input id="__id___pricing" type="hidden" class="attribute-price template no-display" value="0" />
|
107 |
+
</div>
|
108 |
+
<div class="attribute-values-container left">
|
109 |
+
<input type="hidden" class="attribute-price-type" id="__id___price_type" value="0" />
|
110 |
+
</div>
|
111 |
+
<?php if ($this->getShowUseDefaultPrice()) : ?>
|
112 |
+
<div class="attribute-values-container no-display">
|
113 |
+
<input id="__id___default" type="checkbox" <?php if ($this->isReadonly() || $this->getCanEditPrice() === false):?> disabled="disabled" <?php endif;?> class="attribute-use-default-value">
|
114 |
+
</div>
|
115 |
+
<?php endif; ?>
|
116 |
+
<?php endif; ?>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<div class="template no-display" id="<?php echo $this->getHtmlId() ?>_simple_pricing">
|
120 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
121 |
+
<div class="attribute-values-container left v-middle">
|
122 |
+
<?php echo Mage::helper('catalog')->__('Price:') ?>
|
123 |
+
<input type="text" class="input-text attribute-price validate-number"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>/>
|
124 |
+
</div>
|
125 |
+
<div class="attribute-values-container left v-middle">
|
126 |
+
<select class="attribute-price-type"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>>
|
127 |
+
<option value="0"><?php echo Mage::helper('catalog')->__('Fixed') ?></option>
|
128 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Percentage') ?></option>
|
129 |
+
</select>
|
130 |
+
</div>
|
131 |
+
<?php else : ?>
|
132 |
+
<input type="hidden" class="attribute-price" />
|
133 |
+
<input type="hidden" class="attribute-price-type" />
|
134 |
+
<?php endif; ?>
|
135 |
+
</div>
|
136 |
+
<div class="template no-display" id="<?php echo $this->getHtmlId() ?>_simple_pricing_view">
|
137 |
+
<?php echo Mage::helper('catalog')->__('Price') ?> <strong>'{{value}}'</strong>
|
138 |
+
</div>
|
139 |
+
<?php echo $this->getGridHtml() ?>
|
140 |
+
<script type="text/javascript">
|
141 |
+
var superProduct = new Product.Configurable(<?php echo $this->getAttributesJson() ?>,<?php echo $this->getLinksJson() ?>,'<?php echo $this->getHtmlId() ?>_',<?php echo $this->getGridJsObject() ?>, <?php echo ( $this->isReadonly() ? 'true' : 'false'); ?>);
|
142 |
+
superProduct.createEmptyUrl = '<?php echo $this->getNewEmptyProductUrl() ?>';
|
143 |
+
superProduct.createNormalUrl = '<?php echo $this->getNewProductUrl() ?>';
|
144 |
+
superProduct.createQuickUrl = '<?php echo $this->getQuickCreationUrl() ?>';
|
145 |
+
|
146 |
+
Validation.add(
|
147 |
+
'validate-configurable',
|
148 |
+
'<?php echo $this->escapeJs(Mage::helper('catalog')->__('Product with this combination of attributes already associated to configurable.')) ?>',
|
149 |
+
superProduct.checkCreationUniqueAttributes.bind(superProduct)
|
150 |
+
)
|
151 |
+
</script>
|
152 |
+
|
153 |
+
<div><input type="hidden" name="affect_configurable_product_attributes" value="1" /></div>
|
app/design/adminhtml/default/default/template/catalog/product/edit/websites.phtml
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Product In Websites') ?></h4>
|
30 |
+
</div>
|
31 |
+
<fieldset id="grop_fields">
|
32 |
+
<?php if($this->getProductId()): ?>
|
33 |
+
<ul class="messages">
|
34 |
+
<li class="notice-msg">
|
35 |
+
<ul>
|
36 |
+
<li><?php echo Mage::helper('catalog')->__("Items that you don't want to show in the catalog or search results should have status 'Disabled' in the desired store.") ?></li>
|
37 |
+
</ul>
|
38 |
+
</li>
|
39 |
+
</ul>
|
40 |
+
<?php endif; ?>
|
41 |
+
<div class="store-scope">
|
42 |
+
<?php echo $this->getHintHtml() ?>
|
43 |
+
<div class="tree-store-scope">
|
44 |
+
<?php foreach ($this->getWebsiteCollection() as $_website): ?>
|
45 |
+
<div class="website-name">
|
46 |
+
<input name="product[website_ids][]" value="<?php echo $_website->getId() ?>" <?php if ($this->isReadonly()):?> disabled="disabled"<?php endif;?> class="checkbox website-checkbox" id="product_website_<?php echo $_website->getId() ?>" type="checkbox"<?php if($this->hasWebsite($_website->getId())): ?> checked="checked"<?php endif; ?> />
|
47 |
+
<big><strong><label for="product_website_<?php echo $_website->getId() ?>"><?php echo $this->escapeHtml($_website->getName()) ?></label></strong></big>
|
48 |
+
</div>
|
49 |
+
<div class="webiste-groups" id="product_website_<?php echo $_website->getId() ?>_data">
|
50 |
+
<?php foreach ($this->getGroupCollection($_website) as $_group): ?>
|
51 |
+
<h4><?php echo $this->escapeHtml($_group->getName()) ?></h4>
|
52 |
+
<div class="group-stores">
|
53 |
+
<table>
|
54 |
+
<?php foreach ($this->getStoreCollection($_group) as $_store): ?>
|
55 |
+
<tr>
|
56 |
+
<td><?php echo $this->escapeHtml($_store->getName()) ?></td>
|
57 |
+
<td>
|
58 |
+
<?php if($this->getWebsites() && !$this->hasWebsite($_website->getId())): ?>
|
59 |
+
<span class="website-<?php echo $_website->getId() ?>-select" style="display:none">
|
60 |
+
<?php echo Mage::helper('catalog')->__('(Copy data from: %s)', $this->getChooseFromStoreHtml($_store)) ?>
|
61 |
+
</span>
|
62 |
+
<?php endif; ?>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<?php endforeach; ?>
|
66 |
+
</table>
|
67 |
+
</div>
|
68 |
+
<?php endforeach; ?>
|
69 |
+
</div>
|
70 |
+
<?php endforeach; ?>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</fieldset>
|
74 |
+
</div>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
var productWebsiteCheckboxes = $$('.website-checkbox');
|
78 |
+
|
79 |
+
for(var i=0;i<productWebsiteCheckboxes.length;i++){
|
80 |
+
Event.observe(productWebsiteCheckboxes[i], 'click', toggleStoreFromChoosers);
|
81 |
+
}
|
82 |
+
|
83 |
+
function toggleStoreFromChoosers(event){
|
84 |
+
var element = Event.element(event);
|
85 |
+
var selects = $('product_website_'+element.value+'_data').getElementsBySelector('select');
|
86 |
+
var selectBlocks = $('product_website_'+element.value+'_data').getElementsByClassName('website-'+element.value+'-select');
|
87 |
+
for (var i=0; i<selects.length; i++) {
|
88 |
+
selects[i].disabled=!element.checked;
|
89 |
+
}
|
90 |
+
for (var i=0; i<selectBlocks.length; i++) {
|
91 |
+
if (element.checked) {
|
92 |
+
selectBlocks[i].show();
|
93 |
+
}
|
94 |
+
else {
|
95 |
+
selectBlocks[i].hide();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
//]]>
|
100 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/helper/gallery.phtml
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for block Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php
|
33 |
+
$_block = $this;
|
34 |
+
/* @var $_block Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content */
|
35 |
+
?>
|
36 |
+
<div id="<?php echo $_block->getHtmlId() ?>" >
|
37 |
+
<ul class="messages">
|
38 |
+
<li class="notice-msg">
|
39 |
+
<ul>
|
40 |
+
<li>
|
41 |
+
<?php echo Mage::helper('catalog')->__('Image type and information need to be specified for each store view.'); ?>
|
42 |
+
</li>
|
43 |
+
</ul>
|
44 |
+
</li>
|
45 |
+
</ul>
|
46 |
+
<div class="grid">
|
47 |
+
<table cellspacing="0" class="data border" id="<?php echo $_block->getHtmlId() ?>_grid" width="100%">
|
48 |
+
<col width="1" />
|
49 |
+
<col />
|
50 |
+
<col width="70" />
|
51 |
+
<?php foreach ($_block->getImageTypes() as $typeId=>$type): ?>
|
52 |
+
<col />
|
53 |
+
<?php endforeach; ?>
|
54 |
+
<col width="70" />
|
55 |
+
<col width="70" />
|
56 |
+
<thead>
|
57 |
+
<tr class="headings">
|
58 |
+
<th><?php echo Mage::helper('catalog')->__('Image') ?></th>
|
59 |
+
<th><?php echo Mage::helper('catalog')->__('Label') ?></th>
|
60 |
+
<th><?php echo Mage::helper('catalog')->__('Sort Order') ?></th>
|
61 |
+
<?php foreach ($_block->getImageTypes() as $typeId=>$type): ?>
|
62 |
+
<th><?php echo $type['label'] ?></th>
|
63 |
+
<?php endforeach; ?>
|
64 |
+
<th><?php echo Mage::helper('catalog')->__('Exclude') ?></th>
|
65 |
+
<th class="last"><?php echo Mage::helper('catalog')->__('Remove') ?></th>
|
66 |
+
</tr>
|
67 |
+
</thead>
|
68 |
+
<tbody id="<?php echo $_block->getHtmlId() ?>_list">
|
69 |
+
<tr id="<?php echo $_block->getHtmlId() ?>_template" class="template no-display">
|
70 |
+
<td class="cell-image"><div class="place-holder" onmouseover="<?php echo $_block->getJsObjectName(); ?>.loadImage('__file__')"><span><?php echo Mage::helper('catalog')->__('Roll Over for preview') ?></span></div><img src="<?php echo $this->getSkinUrl('images/spacer.gif')?>" width="100" style="display:none;" alt="" /></td>
|
71 |
+
<td class="cell-label"><input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td>
|
72 |
+
<td class="cell-position"><input type="text" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> class="input-text validate-number" onkeyup="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" onchange="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td>
|
73 |
+
<?php foreach ($_block->getImageTypes() as $typeId=>$type): ?>
|
74 |
+
<td class="cell-<?php echo $typeId ?> a-center"><input <?php if($_block->getElement()->getAttributeReadonly($typeId)) :?> disabled="disabled" <?php endif;?> type="radio" name="<?php echo $type['field'] ?>" onclick="<?php echo $_block->getJsObjectName(); ?>.setProductImages('__file__')" value="__file__" /></td>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
<td class="cell-disable a-center"><input type="checkbox" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> onclick="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td>
|
77 |
+
<td class="cell-remove a-center last"><input type="checkbox" <?php if($_block->getElement()->getReadonly()):?> disabled="disabled"<?php endif;?> onclick="<?php echo $_block->getJsObjectName(); ?>.updateImage('__file__')" /></td>
|
78 |
+
</tr>
|
79 |
+
<?php if($_block->hasUseDefault()): ?>
|
80 |
+
<tr id="<?php echo $_block->getHtmlId() ?>_default">
|
81 |
+
<td><?php echo Mage::helper('catalog')->__('Use Default Value') ?></td>
|
82 |
+
<td> </td>
|
83 |
+
<td> </td>
|
84 |
+
<?php foreach ($_block->getMediaAttributes() as $_attribute): ?>
|
85 |
+
<td class="a-center">
|
86 |
+
<?php if($_block->getElement()->canDisplayUseDefault($_attribute)): ?>
|
87 |
+
<input class="default-checkbox" name="use_default[]" type="checkbox" <?php if($_block->getElement()->getAttributeReadonly($_attribute->getAttributeCode())):?> disabled="disabled" <?php endif;?> onclick="<?php echo $_block->getJsObjectName(); ?>.updateUseDefault()"
|
88 |
+
<?php if($_block->getElement()->usedDefault($_attribute)): ?>checked<?php endif; ?> value="<?php echo $_attribute->getAttributeCode() ?>" />
|
89 |
+
<?php endif ?>
|
90 |
+
</td>
|
91 |
+
<?php endforeach; ?>
|
92 |
+
<td> </td>
|
93 |
+
<td class="last"> </td>
|
94 |
+
</tr>
|
95 |
+
<?php endif ?>
|
96 |
+
<tr id="<?php echo $_block->getHtmlId() ?>-image-0">
|
97 |
+
<td class="cell-image"><?php echo Mage::helper('catalog')->__('No image') ?></td>
|
98 |
+
<td class="cell-label"><input type="hidden" /> </td>
|
99 |
+
<td class="cell-position"><input type="hidden" /> </td>
|
100 |
+
<?php foreach ($_block->getImageTypes() as $typeId=>$type): ?>
|
101 |
+
<td class="cell-<?php echo $typeId ?> a-center"><input type="radio" <?php if($_block->getElement()->getAttributeReadonly($typeId)) :?> disabled="disabled" <?php endif;?> name="<?php echo $type['field'] ?>" onclick="<?php echo $_block->getJsObjectName(); ?>.setProductImages('no_selection')" value="no_selection" /></td>
|
102 |
+
<?php endforeach; ?>
|
103 |
+
<td class="cell-disable"><input type="hidden" /> </td>
|
104 |
+
<td class="cell-remove last"><input type="hidden" /> </td>
|
105 |
+
</tr>
|
106 |
+
</tbody>
|
107 |
+
<?php if (!$_block->getElement()->getReadonly()):?>
|
108 |
+
<tfoot>
|
109 |
+
<tr>
|
110 |
+
<td colspan="100" class="last" style="padding:8px">
|
111 |
+
<?php echo $_block->getUploaderHtml() ?>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
</tfoot>
|
115 |
+
<?php endif;?>
|
116 |
+
</table>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<input type="hidden" id="<?php echo $_block->getHtmlId() ?>_save" name="<?php echo $_block->getElement()->getName() ?>[images]" value="<?php echo $_block->htmlEscape($_block->getImagesJson()) ?>" />
|
120 |
+
<input type="hidden" id="<?php echo $_block->getHtmlId() ?>_save_image" name="<?php echo $_block->getElement()->getName() ?>[values]" value="<?php echo $_block->htmlEscape($_block->getImagesValuesJson()) ?>" />
|
121 |
+
<script type="text/javascript">
|
122 |
+
//<![CDATA[
|
123 |
+
var <?php echo $_block->getJsObjectName(); ?> = new Product.Gallery('<?php echo $_block->getHtmlId() ?>', <?php if ($_block->getElement()->getReadonly()):?>null<?php else:?><?php echo $_block->getUploader()->getJsObjectName() ?><?php endif;?>, <?php echo $_block->getImageTypesJson() ?>);
|
124 |
+
//]]>
|
125 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/js.phtml
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
Event.observe(window, 'load', recalculateTax);
|
30 |
+
Event.observe(window, 'load', registerTaxRecalcs);
|
31 |
+
|
32 |
+
function registerTaxRecalcs()
|
33 |
+
{
|
34 |
+
if (typeof dynamicTaxes == 'undefined') {
|
35 |
+
return;
|
36 |
+
}
|
37 |
+
|
38 |
+
for (var i=0; i<dynamicTaxes.length; i++) {
|
39 |
+
Event.observe($(dynamicTaxes[i]), 'change', recalculateTax);
|
40 |
+
}
|
41 |
+
Event.observe($('tax_class_id'), 'change', recalculateTax);
|
42 |
+
}
|
43 |
+
|
44 |
+
var priceFormat = <?php echo $this->helper('tax')->getPriceFormat($this->getStore()); ?>;
|
45 |
+
var taxRates = <?php echo $this->helper('tax')->getAllRatesByProductClass($this->getStore()); ?>;
|
46 |
+
|
47 |
+
function recalculateTax()
|
48 |
+
{
|
49 |
+
if (typeof dynamicTaxes == 'undefined') {
|
50 |
+
return;
|
51 |
+
}
|
52 |
+
|
53 |
+
for (var i=0; i<dynamicTaxes.length; i++) {
|
54 |
+
var code = dynamicTaxes[i];
|
55 |
+
var span = $('dynamic-tax-' + code);
|
56 |
+
var input = $(code);
|
57 |
+
|
58 |
+
if (!input.value) {
|
59 |
+
span.innerHTML = '';
|
60 |
+
continue;
|
61 |
+
}
|
62 |
+
|
63 |
+
var rate = 0;
|
64 |
+
var taxClass = $('tax_class_id').options[$('tax_class_id').selectedIndex].value;
|
65 |
+
eval('var value = taxRates.value_' + taxClass);
|
66 |
+
|
67 |
+
if (value != undefined) {
|
68 |
+
rate = value;
|
69 |
+
}
|
70 |
+
|
71 |
+
var spanValue = '';
|
72 |
+
if (rate != 0) {
|
73 |
+
spanValue = ' ' + formatCurrency(input.value/(100+rate)*rate, priceFormat);
|
74 |
+
}
|
75 |
+
span.innerHTML = spanValue;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
// Bind tab changes
|
80 |
+
function bindActiveProductTab(event) {
|
81 |
+
if(event.tab && event.tab.name && $('store_switcher')){
|
82 |
+
$('store_switcher').switchParams = 'active_tab/'+event.tab.name+'/';
|
83 |
+
}
|
84 |
+
}
|
85 |
+
varienGlobalEvents.attachEventHandler('showTab', bindActiveProductTab);
|
86 |
+
|
87 |
+
// bind active tab
|
88 |
+
<?php if($tabsBlock = $this->getLayout()->getBlock('product_tabs')): ?>
|
89 |
+
if(<?php echo $tabsBlock->getJsObjectName() ?> && <?php echo $tabsBlock->getJsObjectName() ?>.activeTab && $('store_switcher')){
|
90 |
+
$('store_switcher').switchParams = 'active_tab/'+<?php echo $tabsBlock->getJsObjectName() ?>.activeTab.name+'/';
|
91 |
+
}
|
92 |
+
<?php endif; ?>
|
93 |
+
//]]>
|
94 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/price.phtml
ADDED
@@ -0,0 +1,383 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
/**
|
30 |
+
* Template for displaying product price in different places (products grid, product view page etc)
|
31 |
+
*
|
32 |
+
* @see Mage_Adminhtml_Block_Catalog_Product_Price
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
/** @var $_coreHelper Mage_Core_Helper_Data */
|
37 |
+
$_coreHelper = $this->helper('core');
|
38 |
+
/** @var $_weeeHelper Mage_Weee_Helper_Data */
|
39 |
+
$_weeeHelper = $this->helper('weee');
|
40 |
+
/** @var $_taxHelper Mage_Tax_Helper_Data */
|
41 |
+
$_taxHelper = $this->helper('tax');
|
42 |
+
|
43 |
+
$_product = $this->getProduct();
|
44 |
+
$_id = $_product->getId();
|
45 |
+
$_storeId = $_product->getStoreId();
|
46 |
+
$_website = Mage::app()->getStore($_storeId)->getWebsite();
|
47 |
+
|
48 |
+
$_weeeSeparator = '';
|
49 |
+
$_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
|
50 |
+
$_minimalPriceValue = $_product->getMinimalPrice();
|
51 |
+
$_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
|
52 |
+
?>
|
53 |
+
|
54 |
+
|
55 |
+
<?php
|
56 |
+
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
|
57 |
+
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
|
58 |
+
?>
|
59 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product, null, null, $_website); ?>
|
60 |
+
<?php if ($_weeeHelper->typeOfDisplay($_product, array(1,2,4))): ?>
|
61 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product, null, null, $_website); ?>
|
62 |
+
<?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, $_website); ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
|
65 |
+
<div class="price-box">
|
66 |
+
<?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
|
67 |
+
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
|
68 |
+
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
|
69 |
+
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
|
70 |
+
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
|
71 |
+
<?php if ($_finalPrice == $_price): ?>
|
72 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
73 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
74 |
+
<span class="price-excluding-tax">
|
75 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
76 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
77 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, false) ?>
|
78 |
+
</span>
|
79 |
+
</span>
|
80 |
+
<span class="price-including-tax">
|
81 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
82 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
83 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
|
84 |
+
</span>
|
85 |
+
</span>
|
86 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
87 |
+
<span class="price-excluding-tax">
|
88 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
89 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
90 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, false) ?>
|
91 |
+
</span>
|
92 |
+
</span>
|
93 |
+
<span class="price-including-tax">
|
94 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
95 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
96 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
97 |
+
</span>
|
98 |
+
<span class="weee">(
|
99 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
100 |
+
<?php echo $_weeeSeparator; ?>
|
101 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
102 |
+
<?php $_weeeSeparator = ' + '; ?>
|
103 |
+
<?php endforeach; ?>
|
104 |
+
)</span>
|
105 |
+
</span>
|
106 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
107 |
+
<span class="price-excluding-tax">
|
108 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
109 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
110 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, false) ?>
|
111 |
+
</span>
|
112 |
+
</span>
|
113 |
+
<span class="price-including-tax">
|
114 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
115 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
116 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
117 |
+
</span>
|
118 |
+
<span class="weee">(
|
119 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
120 |
+
<?php echo $_weeeSeparator; ?>
|
121 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), $_storeId, true, true); ?>
|
122 |
+
<?php $_weeeSeparator = ' + '; ?>
|
123 |
+
<?php endforeach; ?>
|
124 |
+
)</span>
|
125 |
+
</span>
|
126 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
127 |
+
<span class="price-excluding-tax">
|
128 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
129 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
130 |
+
<?php echo $_coreHelper->currencyByStore($_price, $_storeId, true, false) ?>
|
131 |
+
</span>
|
132 |
+
</span>
|
133 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
134 |
+
<span class="weee">
|
135 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
136 |
+
</span>
|
137 |
+
<?php endforeach; ?>
|
138 |
+
<span class="price-including-tax">
|
139 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
140 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
141 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
142 |
+
</span>
|
143 |
+
</span>
|
144 |
+
<?php else: ?>
|
145 |
+
<span class="price-excluding-tax">
|
146 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
147 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
148 |
+
<?php echo $_coreHelper->currencyByStore($_price, $_storeId, true, false) ?>
|
149 |
+
</span>
|
150 |
+
</span>
|
151 |
+
<span class="price-including-tax">
|
152 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
153 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
154 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax, $_storeId, true, false) ?>
|
155 |
+
</span>
|
156 |
+
</span>
|
157 |
+
<?php endif; ?>
|
158 |
+
<?php else: ?>
|
159 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
160 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
161 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
|
162 |
+
</span>
|
163 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
164 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
165 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
|
166 |
+
</span>
|
167 |
+
<span class="weee">(
|
168 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
169 |
+
<?php echo $_weeeSeparator; ?>
|
170 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
171 |
+
<?php $_weeeSeparator = ' + '; ?>
|
172 |
+
<?php endforeach; ?>
|
173 |
+
)</span>
|
174 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
175 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
176 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
|
177 |
+
</span>
|
178 |
+
<span class="weee">(
|
179 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
180 |
+
<?php echo $_weeeSeparator; ?>
|
181 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), $_storeId, true, true); ?>
|
182 |
+
<?php $_weeeSeparator = ' + '; ?>
|
183 |
+
<?php endforeach; ?>
|
184 |
+
)</span>
|
185 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
186 |
+
<span class="regular-price"><?php echo $_coreHelper->currencyByStore($_price, $_storeId, true, true) ?></span><br />
|
187 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
188 |
+
<span class="weee">
|
189 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
190 |
+
</span>
|
191 |
+
<?php endforeach; ?>
|
192 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
193 |
+
<?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
|
194 |
+
</span>
|
195 |
+
<?php else: ?>
|
196 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
197 |
+
<?php echo $_coreHelper->currencyByStore($_price, $_storeId, true, true) ?>
|
198 |
+
</span>
|
199 |
+
<?php endif; ?>
|
200 |
+
<?php endif; ?>
|
201 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
202 |
+
<?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
|
203 |
+
|
204 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
205 |
+
<p class="old-price">
|
206 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
207 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
208 |
+
<?php echo $_coreHelper->currencyByStore($_regularPrice+$_originalWeeeTaxAmount, $_storeId, true, false) ?>
|
209 |
+
</span>
|
210 |
+
</p>
|
211 |
+
|
212 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
213 |
+
<p class="special-price">
|
214 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
215 |
+
<span class="price-excluding-tax">
|
216 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
217 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
218 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?>
|
219 |
+
</span>
|
220 |
+
</span>
|
221 |
+
<span class="price-including-tax">
|
222 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
223 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
224 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
225 |
+
</span>
|
226 |
+
</span>
|
227 |
+
</p>
|
228 |
+
<?php else: ?>
|
229 |
+
<p class="special-price">
|
230 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
231 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
232 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?>
|
233 |
+
</span>
|
234 |
+
</p>
|
235 |
+
<?php endif; ?>
|
236 |
+
|
237 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
238 |
+
<p class="old-price">
|
239 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
240 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
241 |
+
<?php echo $_coreHelper->currencyByStore($_regularPrice+$_originalWeeeTaxAmount, $_storeId, true, false) ?>
|
242 |
+
</span>
|
243 |
+
</p>
|
244 |
+
|
245 |
+
<p class="special-price">
|
246 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
247 |
+
<span class="price-excluding-tax">
|
248 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
249 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
250 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?>
|
251 |
+
</span>
|
252 |
+
</span>
|
253 |
+
<span class="weee">(
|
254 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
255 |
+
<?php echo $_weeeSeparator; ?>
|
256 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
257 |
+
<?php $_weeeSeparator = ' + '; ?>
|
258 |
+
<?php endforeach; ?>
|
259 |
+
)</span>
|
260 |
+
<span class="price-including-tax">
|
261 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
262 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
263 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
264 |
+
</span>
|
265 |
+
</span>
|
266 |
+
</p>
|
267 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
268 |
+
<p class="old-price">
|
269 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
270 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
271 |
+
<?php echo $_coreHelper->currencyByStore($_regularPrice+$_originalWeeeTaxAmount, $_storeId, true, false) ?>
|
272 |
+
</span>
|
273 |
+
</p>
|
274 |
+
|
275 |
+
<p class="special-price">
|
276 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
277 |
+
<span class="price-excluding-tax">
|
278 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
279 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
280 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?>
|
281 |
+
</span>
|
282 |
+
</span>
|
283 |
+
<span class="weee">(
|
284 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
285 |
+
<?php echo $_weeeSeparator; ?>
|
286 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), $_storeId, true, true); ?>
|
287 |
+
<?php $_weeeSeparator = ' + '; ?>
|
288 |
+
<?php endforeach; ?>
|
289 |
+
)</span>
|
290 |
+
<span class="price-including-tax">
|
291 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
292 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
293 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
294 |
+
</span>
|
295 |
+
</span>
|
296 |
+
</p>
|
297 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
298 |
+
<p class="old-price">
|
299 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
300 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
301 |
+
<?php echo $_coreHelper->currencyByStore($_regularPrice, $_storeId, true, false) ?>
|
302 |
+
</span>
|
303 |
+
</p>
|
304 |
+
|
305 |
+
<p class="special-price">
|
306 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
307 |
+
<span class="price-excluding-tax">
|
308 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
309 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
310 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice, $_storeId, true, false) ?>
|
311 |
+
</span>
|
312 |
+
</span>
|
313 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
314 |
+
<span class="weee">
|
315 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currencyByStore($_weeeTaxAttribute->getAmount(), $_storeId, true, true); ?>
|
316 |
+
</span>
|
317 |
+
<?php endforeach; ?>
|
318 |
+
<span class="price-including-tax">
|
319 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
320 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
321 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?>
|
322 |
+
</span>
|
323 |
+
</span>
|
324 |
+
</p>
|
325 |
+
<?php else: // excl. ?>
|
326 |
+
<p class="old-price">
|
327 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
328 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
329 |
+
<?php echo $_coreHelper->currencyByStore($_regularPrice, $_storeId, true, false) ?>
|
330 |
+
</span>
|
331 |
+
</p>
|
332 |
+
|
333 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
334 |
+
<p class="special-price">
|
335 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
336 |
+
<span class="price-excluding-tax">
|
337 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
338 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
339 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice, $_storeId, true, false) ?>
|
340 |
+
</span>
|
341 |
+
</span>
|
342 |
+
<span class="price-including-tax">
|
343 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
344 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
345 |
+
<?php echo $_coreHelper->currencyByStore($_finalPriceInclTax, $_storeId, true, false) ?>
|
346 |
+
</span>
|
347 |
+
</span>
|
348 |
+
</p>
|
349 |
+
<?php else: ?>
|
350 |
+
<p class="special-price">
|
351 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
352 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
353 |
+
<?php echo $_coreHelper->currencyByStore($_finalPrice, $_storeId, true, false) ?>
|
354 |
+
</span>
|
355 |
+
</p>
|
356 |
+
<?php endif; ?>
|
357 |
+
<?php endif; ?>
|
358 |
+
|
359 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
360 |
+
|
361 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
|
362 |
+
|
363 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
364 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
365 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
|
366 |
+
<?php endif; ?>
|
367 |
+
|
368 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
369 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
370 |
+
<?php else:?>
|
371 |
+
<span class="minimal-price-link">
|
372 |
+
<?php endif?>
|
373 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
374 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
375 |
+
<?php echo $_coreHelper->currencyByStore($_minimalPriceDisplayValue, $_storeId, true, false) ?>
|
376 |
+
</span>
|
377 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
378 |
+
</a>
|
379 |
+
<?php else:?>
|
380 |
+
</span>
|
381 |
+
<?php endif?>
|
382 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
383 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/product/tab/alert.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for block Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<div id="alert_messages_block"><?php echo $this->getMessageHtml() ?></div>
|
33 |
+
<div>
|
34 |
+
<h4 class="icon-head head-edit-form"><?php echo Mage::helper('productalert')->__('Product Alerts') ?></h4>
|
35 |
+
</div>
|
36 |
+
<div class="clear"></div>
|
37 |
+
<?php echo $this->getAccordionHtml() ?>
|
app/design/adminhtml/default/default/template/catalog/product/tab/inventory.phtml
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if ($this->isReadonly()):?>
|
28 |
+
<?php $_readonly = ' disabled="disabled" ';?>
|
29 |
+
<?php else: ?>
|
30 |
+
<?php $_readonly = '';?>
|
31 |
+
<?php endif; ?>
|
32 |
+
<div class="entry-edit">
|
33 |
+
<div class="entry-edit-head">
|
34 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Inventory') ?></h4>
|
35 |
+
</div>
|
36 |
+
<fieldset>
|
37 |
+
|
38 |
+
<legend><?php echo Mage::helper('catalog')->__('Inventory') ?></legend>
|
39 |
+
<table cellspacing="0" class="form-list" id="table_cataloginventory">
|
40 |
+
<tr>
|
41 |
+
<td class="label"><label for="inventory_manage_stock"><?php echo Mage::helper('catalog')->__('Manage Stock') ?></label></td>
|
42 |
+
<td class="value"><select id="inventory_manage_stock" name="<?php echo $this->getFieldSuffix() ?>[stock_data][manage_stock]" class="select" <?php echo $_readonly;?>>
|
43 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
44 |
+
<option value="0"<?php if ($this->getConfigFieldValue('manage_stock') == 0): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('No') ?></option>
|
45 |
+
</select>
|
46 |
+
<input type="hidden" id="inventory_manage_stock_default" value="<?php echo $this->getDefaultConfigValue('manage_stock'); ?>" />
|
47 |
+
|
48 |
+
<?php $_checked = ($this->getFieldValue('use_config_manage_stock') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
49 |
+
<input type="checkbox" id="inventory_use_config_manage_stock" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_manage_stock]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/>
|
50 |
+
<label for="inventory_use_config_manage_stock" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
51 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_manage_stock'), $('inventory_use_config_manage_stock').parentNode);</script><?php endif; ?></td>
|
52 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
53 |
+
</tr>
|
54 |
+
|
55 |
+
<?php if(!$this->getProduct()->isComposite()): ?>
|
56 |
+
<tr>
|
57 |
+
<td class="label"><label for="inventory_qty"><?php echo Mage::helper('catalog')->__('Qty') ?><span class="required">*</span></label></td>
|
58 |
+
<td class="value">
|
59 |
+
<?php if (!$_readonly):?>
|
60 |
+
<input type="hidden" id="original_inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][original_inventory_qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>"/>
|
61 |
+
<?php endif;?>
|
62 |
+
<input type="text" class="input-text required-entry validate-number" id="inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>" <?php echo $_readonly;?>/>
|
63 |
+
</td>
|
64 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
65 |
+
</tr>
|
66 |
+
|
67 |
+
<tr>
|
68 |
+
<td class="label"><label for="inventory_min_qty"><?php echo Mage::helper('catalog')->__('Qty for Item\'s Status to Become Out of Stock') ?></label></td>
|
69 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_min_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][min_qty]" value="<?php echo $this->getFieldValue('min_qty')*1 ?>" <?php echo $_readonly;?>/>
|
70 |
+
|
71 |
+
<?php $_checked = ($this->getFieldValue('use_config_min_qty') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
72 |
+
<input type="checkbox" id="inventory_use_config_min_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_min_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" <?php echo $_readonly;?> />
|
73 |
+
<label for="inventory_use_config_min_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
74 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_min_qty'), $('inventory_use_config_min_qty').parentNode);</script><?php endif; ?></td>
|
75 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
76 |
+
</tr>
|
77 |
+
|
78 |
+
<tr>
|
79 |
+
<td class="label"><label for="inventory_min_sale_qty"><?php echo Mage::helper('catalog')->__('Minimum Qty Allowed in Shopping Cart') ?></label></td>
|
80 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_min_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][min_sale_qty]" value="<?php echo $this->getFieldValue('min_sale_qty')*1 ?>" <?php echo $_readonly;?>/>
|
81 |
+
|
82 |
+
<?php $_checked = ($this->getFieldValue('use_config_min_sale_qty') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
83 |
+
<input type="checkbox" id="inventory_use_config_min_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_min_sale_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> />
|
84 |
+
<label for="inventory_use_config_min_sale_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
85 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_min_sale_qty'), $('inventory_use_config_min_sale_qty').parentNode);</script><?php endif; ?></td>
|
86 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
87 |
+
</tr>
|
88 |
+
|
89 |
+
<tr>
|
90 |
+
<td class="label"><label for="inventory_max_sale_qty"><?php echo Mage::helper('catalog')->__('Maximum Qty Allowed in Shopping Cart') ?></label></td>
|
91 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_max_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][max_sale_qty]" value="<?php echo $this->getFieldValue('max_sale_qty')*1 ?>" <?php echo $_readonly;?> />
|
92 |
+
|
93 |
+
<?php $_checked = ($this->getFieldValue('use_config_max_sale_qty') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
94 |
+
<input type="checkbox" id="inventory_use_config_max_sale_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_max_sale_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> />
|
95 |
+
<label for="inventory_use_config_max_sale_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
96 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_max_sale_qty'), $('inventory_use_config_max_sale_qty').parentNode);</script><?php endif; ?></td>
|
97 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
98 |
+
</tr>
|
99 |
+
|
100 |
+
<?php if($this->canUseQtyDecimals()): ?>
|
101 |
+
<tr>
|
102 |
+
<td class="label"><label for="inventory_is_qty_decimal"><?php echo Mage::helper('catalog')->__('Qty Uses Decimals') ?></label></td>
|
103 |
+
<td class="value"><select id="inventory_is_qty_decimal" name="<?php echo $this->getFieldSuffix() ?>[stock_data][is_qty_decimal]" class="select" <?php echo $_readonly;?>>
|
104 |
+
<option value="0"><?php echo Mage::helper('catalog')->__('No') ?></option>
|
105 |
+
<option value="1"<?php if($this->getFieldValue('is_qty_decimal')==1): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
106 |
+
</select>
|
107 |
+
</td>
|
108 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
109 |
+
</tr>
|
110 |
+
|
111 |
+
<?php if (!$this->isVirtual()) : ?>
|
112 |
+
<tr>
|
113 |
+
<td class="label"><label for="inventory_is_decimal_divided"><?php echo Mage::helper('catalog')->__('Can be Divided into Multiple Boxes for Shipping') ?></label></td>
|
114 |
+
<td class="value"><select id="inventory_is_decimal_divided" name="<?php echo $this->getFieldSuffix() ?>[stock_data][is_decimal_divided]" class="select" <?php echo $_readonly;?>>
|
115 |
+
<option value="0"><?php echo Mage::helper('catalog')->__('No') ?></option>
|
116 |
+
<option value="1"<?php if($this->getFieldValue('is_decimal_divided') == 1): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
117 |
+
</select>
|
118 |
+
</td>
|
119 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
120 |
+
</tr>
|
121 |
+
<?php endif; ?>
|
122 |
+
|
123 |
+
<?php endif; ?>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="label"><label for="inventory_backorders"><?php echo Mage::helper('catalog')->__('Backorders') ?></label></td>
|
127 |
+
<td class="value"><select id="inventory_backorders" name="<?php echo $this->getFieldSuffix() ?>[stock_data][backorders]" class="select" <?php echo $_readonly;?>>
|
128 |
+
<?php foreach ($this->getBackordersOption() as $option): ?>
|
129 |
+
<?php $_selected = ($option['value'] == $this->getFieldValue('backorders')) ? 'selected="selected"' : '' ?>
|
130 |
+
<option value="<?php echo $option['value'] ?>" <?php echo $_selected ?>><?php echo $option['label'] ?></option>
|
131 |
+
<?php endforeach; ?>
|
132 |
+
</select>
|
133 |
+
|
134 |
+
<?php $_checked = ($this->getFieldValue('use_config_backorders') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
135 |
+
<input type="checkbox" id="inventory_use_config_backorders" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_backorders]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?> />
|
136 |
+
<label for="inventory_use_config_backorders" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
137 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_backorders'), $('inventory_use_config_backorders').parentNode);</script><?php endif; ?></td>
|
138 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
139 |
+
</tr>
|
140 |
+
<tr>
|
141 |
+
<td class="label"><label for="inventory_notify_stock_qty"><?php echo Mage::helper('catalog')->__('Notify for Quantity Below') ?></label></td>
|
142 |
+
<td class="value"><input type="text" class="input-text validate-number" id="inventory_notify_stock_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][notify_stock_qty]" value="<?php echo $this->getFieldValue('notify_stock_qty')*1 ?>" <?php echo $_readonly;?>/>
|
143 |
+
|
144 |
+
<?php $_checked = ($this->getFieldValue('use_config_notify_stock_qty') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
145 |
+
<input type="checkbox" id="inventory_use_config_notify_stock_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_notify_stock_qty]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/>
|
146 |
+
<label for="inventory_use_config_notify_stock_qty" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
147 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_notify_stock_qty'), $('inventory_use_config_notify_stock_qty').parentNode);</script><?php endif; ?></td>
|
148 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
149 |
+
</tr>
|
150 |
+
<?php endif; ?>
|
151 |
+
<tr>
|
152 |
+
<td class="label"><label for="inventory_enable_qty_increments"><?php echo Mage::helper('catalog')->__('Enable Qty Increments') ?></label></td>
|
153 |
+
<td class="value"><select id="inventory_enable_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][enable_qty_increments]" class="select" <?php echo $_readonly;?>>
|
154 |
+
<option value="1"><?php echo Mage::helper('catalog')->__('Yes') ?></option>
|
155 |
+
<option value="0"<?php if ($this->getConfigFieldValue('enable_qty_increments') == 0): ?> selected="selected"<?php endif; ?>><?php echo Mage::helper('catalog')->__('No') ?></option>
|
156 |
+
</select>
|
157 |
+
<input type="hidden" id="inventory_enable_qty_increments_default" value="<?php echo $this->getDefaultConfigValue('enable_qty_increments'); ?>" />
|
158 |
+
|
159 |
+
<?php $_checked = ($this->getFieldValue('use_config_enable_qty_increments') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
160 |
+
<input type="checkbox" id="inventory_use_config_enable_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_enable_qty_increments]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/>
|
161 |
+
<label for="inventory_use_config_enable_qty_increments" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
162 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_enable_qty_increments'), $('inventory_use_config_enable_qty_increments').parentNode);</script><?php endif; ?></td>
|
163 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
164 |
+
</tr>
|
165 |
+
<tr>
|
166 |
+
<td class="label"><label for="inventory_qty_increments"><?php echo Mage::helper('catalog')->__('Qty Increments') ?></label></td>
|
167 |
+
<td class="value">
|
168 |
+
<input type="text" class="input-text validate-digits" id="inventory_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][qty_increments]" value="<?php echo $this->getFieldValue('qty_increments')*1 ?>" <?php echo $_readonly;?>/>
|
169 |
+
<?php $_checked = ($this->getFieldValue('use_config_qty_increments') || $this->IsNew()) ? 'checked="checked"' : '' ?>
|
170 |
+
<input type="checkbox" id="inventory_use_config_qty_increments" name="<?php echo $this->getFieldSuffix() ?>[stock_data][use_config_qty_increments]" value="1" <?php echo $_checked ?> onclick="toggleValueElements(this, this.parentNode);" class="checkbox" <?php echo $_readonly;?>/>
|
171 |
+
<label for="inventory_use_config_qty_increments" class="normal"><?php echo Mage::helper('catalog')->__('Use Config Settings') ?></label>
|
172 |
+
<?php if (!$this->isReadonly()):?><script type="text/javascript">toggleValueElements($('inventory_use_config_qty_increments'), $('inventory_use_config_qty_increments').parentNode);</script><?php endif; ?></td>
|
173 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
174 |
+
</tr>
|
175 |
+
<tr>
|
176 |
+
<td class="label"><label for="inventory_stock_availability"><?php echo Mage::helper('catalog')->__('Stock Availability') ?></label></td>
|
177 |
+
<td class="value"><select id="inventory_stock_availability" name="<?php echo $this->getFieldSuffix() ?>[stock_data][is_in_stock]" class="select" <?php echo $_readonly;?>>
|
178 |
+
<?php foreach ($this->getStockOption() as $option): ?>
|
179 |
+
<?php $_selected = ($option['value'] == $this->getFieldValue('is_in_stock')) ? 'selected="selected"' : '' ?>
|
180 |
+
<option value="<?php echo $option['value'] ?>" <?php echo $_selected ?>><?php echo $option['label'] ?></option>
|
181 |
+
<?php endforeach; ?>
|
182 |
+
</select>
|
183 |
+
</td>
|
184 |
+
<td class="value scope-label"><?php echo Mage::helper('adminhtml')->__('[GLOBAL]') ?></td>
|
185 |
+
</tr>
|
186 |
+
</table>
|
187 |
+
</fieldset>
|
188 |
+
</div>
|
189 |
+
<script type="text/javascript">
|
190 |
+
//<![CDATA[
|
191 |
+
function changeManageStockOption()
|
192 |
+
{
|
193 |
+
var manageStock = $('inventory_use_config_manage_stock').checked
|
194 |
+
? $('inventory_manage_stock_default').value
|
195 |
+
: $('inventory_manage_stock').value;
|
196 |
+
var catalogInventoryNotManageStockFields = {
|
197 |
+
inventory_min_sale_qty: true,
|
198 |
+
inventory_max_sale_qty: true,
|
199 |
+
inventory_enable_qty_increments : true,
|
200 |
+
inventory_qty_increments: true
|
201 |
+
};
|
202 |
+
|
203 |
+
$$('#table_cataloginventory tr').each(function(el) {
|
204 |
+
if (el == $('inventory_manage_stock').up(1)) {
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
+
for (field in catalogInventoryNotManageStockFields) {
|
209 |
+
if ($(field) && ($(field).up(1) == el)) {
|
210 |
+
return;
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
el[manageStock == 1 ? 'show' : 'hide']();
|
215 |
+
});
|
216 |
+
|
217 |
+
return true;
|
218 |
+
}
|
219 |
+
|
220 |
+
function applyEnableQtyIncrements() {
|
221 |
+
var enableQtyIncrements = $('inventory_use_config_enable_qty_increments').checked
|
222 |
+
? $('inventory_enable_qty_increments_default').value
|
223 |
+
: $('inventory_enable_qty_increments').value;
|
224 |
+
|
225 |
+
$('inventory_qty_increments').up('tr')[enableQtyIncrements == 1 ? 'show' : 'hide']();
|
226 |
+
}
|
227 |
+
|
228 |
+
function applyEnableDecimalDivided() {
|
229 |
+
<?php if (!$this->isVirtual()) : ?>
|
230 |
+
$('inventory_is_decimal_divided').up('tr').hide();
|
231 |
+
<?php endif; ?>
|
232 |
+
$('inventory_qty_increments').removeClassName('validate-digits').removeClassName('validate-number');
|
233 |
+
$('inventory_min_sale_qty').removeClassName('validate-digits').removeClassName('validate-number');
|
234 |
+
if ($('inventory_is_qty_decimal').value == 1) {
|
235 |
+
<?php if (!$this->isVirtual()) : ?>
|
236 |
+
$('inventory_is_decimal_divided').up('tr').show();
|
237 |
+
<?php endif; ?>
|
238 |
+
$('inventory_qty_increments').addClassName('validate-number');
|
239 |
+
$('inventory_min_sale_qty').addClassName('validate-number');
|
240 |
+
} else {
|
241 |
+
$('inventory_qty_increments').addClassName('validate-digits');
|
242 |
+
$('inventory_min_sale_qty').addClassName('validate-digits');
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
+
Event.observe(window, 'load', function() {
|
247 |
+
if ($('inventory_manage_stock') && $('inventory_use_config_manage_stock')) {
|
248 |
+
Event.observe($('inventory_manage_stock'), 'change', changeManageStockOption);
|
249 |
+
Event.observe($('inventory_use_config_manage_stock'), 'change', changeManageStockOption);
|
250 |
+
changeManageStockOption();
|
251 |
+
}
|
252 |
+
if ($('inventory_enable_qty_increments') && $('inventory_use_config_enable_qty_increments')) {
|
253 |
+
Event.observe($('inventory_enable_qty_increments'), 'change', applyEnableQtyIncrements);
|
254 |
+
Event.observe($('inventory_use_config_enable_qty_increments'), 'change', applyEnableQtyIncrements);
|
255 |
+
applyEnableQtyIncrements();
|
256 |
+
}
|
257 |
+
if ($('inventory_is_qty_decimal') && $('inventory_qty_increments') && $('inventory_min_sale_qty')) {
|
258 |
+
Event.observe($('inventory_is_qty_decimal'), 'change', applyEnableDecimalDivided);
|
259 |
+
applyEnableDecimalDivided();
|
260 |
+
}
|
261 |
+
});
|
262 |
+
//]]>
|
263 |
+
</script>
|
app/design/adminhtml/default/default/template/catalog/product/widget/chooser/container.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Container for product link widget chooser
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser_Container
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div class="columns">
|
35 |
+
<div class="side-col"><?php echo $this->getTreeHtml() ?></div>
|
36 |
+
<div class="main-col"><?php echo $this->getGridHtml() ?></div>
|
37 |
+
</div>
|
app/design/adminhtml/default/default/template/catalog/wysiwyg/js.phtml
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
|
30 |
+
var catalogWysiwygEditor = {
|
31 |
+
overlayShowEffectOptions : null,
|
32 |
+
overlayHideEffectOptions : null,
|
33 |
+
open : function(editorUrl, elementId) {
|
34 |
+
if (editorUrl && elementId) {
|
35 |
+
new Ajax.Request(editorUrl, {
|
36 |
+
parameters: {
|
37 |
+
element_id: elementId+'_editor',
|
38 |
+
store_id: '<?php echo $this->getStoreId() ?>'
|
39 |
+
},
|
40 |
+
onSuccess: function(transport) {
|
41 |
+
try {
|
42 |
+
this.openDialogWindow(transport.responseText, elementId);
|
43 |
+
} catch(e) {
|
44 |
+
alert(e.message);
|
45 |
+
}
|
46 |
+
}.bind(this)
|
47 |
+
});
|
48 |
+
}
|
49 |
+
},
|
50 |
+
openDialogWindow : function(content, elementId) {
|
51 |
+
this.overlayShowEffectOptions = Windows.overlayShowEffectOptions;
|
52 |
+
this.overlayHideEffectOptions = Windows.overlayHideEffectOptions;
|
53 |
+
Windows.overlayShowEffectOptions = {duration:0};
|
54 |
+
Windows.overlayHideEffectOptions = {duration:0};
|
55 |
+
|
56 |
+
Dialog.confirm(content, {
|
57 |
+
draggable:true,
|
58 |
+
resizable:true,
|
59 |
+
closable:true,
|
60 |
+
className:"magento",
|
61 |
+
windowClassName:"popup-window",
|
62 |
+
title:'WYSIWYG Editor',
|
63 |
+
width:950,
|
64 |
+
height:555,
|
65 |
+
zIndex:1000,
|
66 |
+
recenterAuto:false,
|
67 |
+
hideEffect:Element.hide,
|
68 |
+
showEffect:Element.show,
|
69 |
+
id:"catalog-wysiwyg-editor",
|
70 |
+
buttonClass:"form-button",
|
71 |
+
okLabel:"Submit",
|
72 |
+
ok: this.okDialogWindow.bind(this),
|
73 |
+
cancel: this.closeDialogWindow.bind(this),
|
74 |
+
onClose: this.closeDialogWindow.bind(this),
|
75 |
+
firedElementId: elementId
|
76 |
+
});
|
77 |
+
|
78 |
+
content.evalScripts.bind(content).defer();
|
79 |
+
|
80 |
+
$(elementId+'_editor').value = $(elementId).value;
|
81 |
+
},
|
82 |
+
okDialogWindow : function(dialogWindow) {
|
83 |
+
if (dialogWindow.options.firedElementId) {
|
84 |
+
wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
|
85 |
+
wysiwygObj.turnOff();
|
86 |
+
if (tinyMCE.get(wysiwygObj.id)) {
|
87 |
+
$(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
|
88 |
+
} else {
|
89 |
+
if ($(dialogWindow.options.firedElementId+'_editor')) {
|
90 |
+
$(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId+'_editor').value;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
this.closeDialogWindow(dialogWindow);
|
95 |
+
},
|
96 |
+
closeDialogWindow : function(dialogWindow) {
|
97 |
+
// remove form validation event after closing editor to prevent errors during save main form
|
98 |
+
if (typeof varienGlobalEvents != undefined && editorFormValidationHandler) {
|
99 |
+
varienGlobalEvents.removeEventHandler('formSubmit', editorFormValidationHandler);
|
100 |
+
}
|
101 |
+
|
102 |
+
//IE fix - blocked form fields after closing
|
103 |
+
$(dialogWindow.options.firedElementId).focus();
|
104 |
+
|
105 |
+
//destroy the instance of editor
|
106 |
+
wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
|
107 |
+
if (tinyMCE.get(wysiwygObj.id)) {
|
108 |
+
tinyMCE.execCommand('mceRemoveControl', true, wysiwygObj.id);
|
109 |
+
}
|
110 |
+
|
111 |
+
dialogWindow.close();
|
112 |
+
Windows.overlayShowEffectOptions = this.overlayShowEffectOptions;
|
113 |
+
Windows.overlayHideEffectOptions = this.overlayHideEffectOptions;
|
114 |
+
}
|
115 |
+
};
|
116 |
+
|
117 |
+
//]]>
|
118 |
+
</script>
|
app/design/adminhtml/default/default/template/centinel/authentication/complete.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if ($this->getIsProcessed()):?>
|
28 |
+
<?php if ($this->getIsSuccess()):?>
|
29 |
+
<h1><?php echo $this->__('Verification Successful');?></h1>
|
30 |
+
<p><?php echo $this->__('Please continue with placing order.')?></p>
|
31 |
+
<?php else:?>
|
32 |
+
<h4><?php echo $this->__('Verification Failed');?></h4>
|
33 |
+
<p><?php echo $this->__('The card has failed verification with the issuer bank.')?> <strong><?php echo $this->__('Order cannot be placed.')?></strong></p>
|
34 |
+
<?php endif;?>
|
35 |
+
<?php else:?>
|
36 |
+
<h4><?php echo $this->__('Verification cannot be processed');?></h4>
|
37 |
+
<p><?php echo $this->__('There has been wrong payment information submitted or time limit has expired. Please, try again.')?> <strong><?php echo $this->__('Order cannot be placed.')?></strong></p>
|
38 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/centinel/authentication/start.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<form name="validation_form" id="validation_form" action="<?php echo $this->getAcsUrl();?>" method="post">
|
28 |
+
<input type="hidden" name="PaReq" value="<?php echo $this->getPaReq()?>" />
|
29 |
+
<input type="hidden" name="TermUrl" value="<?php echo $this->getTermUrl()?>" />
|
30 |
+
<input type="hidden" name="MD" value="<?php echo $this->getMd()?>" />
|
31 |
+
</form>
|
32 |
+
<script type="text/javascript">
|
33 |
+
//<![CDATA[
|
34 |
+
window.onload = function(){
|
35 |
+
document.getElementById('validation_form').submit();
|
36 |
+
};
|
37 |
+
//]]>
|
38 |
+
</script>
|
app/design/adminhtml/default/default/template/centinel/validation/form.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="centinel">
|
28 |
+
<div class="authentication">
|
29 |
+
<iframe frameborder="0" border="0" id="<?php echo $this->getContainerId() ?>" src="" style="display:none;"></iframe>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<button onclick="cardValidator.validate()" class="scalable" type="button"><span><span><span><?php echo $this->__('Start/Reset Validation...')?></span></span></span></button>
|
33 |
+
<script type="text/javascript">
|
34 |
+
//<![CDATA[
|
35 |
+
cardValidator = new centinelValidator('<?php echo $this->getMethodCode() ?>', '<?php echo $this->getFrameUrl() ?>', '<?php echo $this->getContainerId() ?>');
|
36 |
+
//]]>
|
37 |
+
</script>
|
app/design/adminhtml/default/default/template/cms/browser/content.phtml
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Wysiwyg Images content template
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php echo $this->getChildHtml('wysiwyg_images.js') ?>
|
35 |
+
|
36 |
+
<div class="content-header skip-header" id="content_header">
|
37 |
+
<table cellspacing="0">
|
38 |
+
<tr>
|
39 |
+
<td><h3 id="content_header_text"><?php echo $this->getHeaderText() ?></h3></td>
|
40 |
+
<td class="form-buttons">
|
41 |
+
<?php echo $this->getButtonsHtml() ?>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
</table>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<div id="contents-uploader"><?php echo $this->getChildHtml('wysiwyg_images.uploader') ?></div>
|
48 |
+
<div id="contents"></div>
|
49 |
+
<div id="contents-newfolder" class="no-display"><?php echo $this->getChildHtml('wysiwyg_images.newfolder') ?></div>
|
app/design/adminhtml/default/default/template/cms/browser/content/files.phtml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Directory contents template for Wysiwyg Images
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Files
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_width = $this->getImagesWidth();
|
36 |
+
$_height = $this->getImagesHeight();
|
37 |
+
?>
|
38 |
+
<?php if ($this->getFilesCount() > 0): ?>
|
39 |
+
<?php foreach ($this->getFiles() as $file): ?>
|
40 |
+
<div class="filecnt" id="<?php echo $this->getFileId($file) ?>">
|
41 |
+
<p class="nm" style="height:<?php echo $_height ?>px;width:<?php echo $_width ?>px;">
|
42 |
+
<?php if($this->getFileThumbUrl($file)):?>
|
43 |
+
<img src="<?php echo $this->getFileThumbUrl($file) ?>" alt="<?php echo $this->getFileName($file) ?>"/>
|
44 |
+
<?php endif; ?>
|
45 |
+
</p>
|
46 |
+
<?php if($this->getFileWidth($file)): ?>
|
47 |
+
<small><?php echo $this->getFileWidth($file) ?>x<?php echo $this->getFileHeight($file) ?> <?php echo $this->helper('cms')->__('px.') ?></small><br/>
|
48 |
+
<?php endif; ?>
|
49 |
+
<small><?php echo $this->getFileShortName($file); ?></small>
|
50 |
+
</div>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
<?php else: ?>
|
53 |
+
<?php echo $this->helper('cms')->__('No files found') ?>
|
54 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/cms/browser/content/newfolder.phtml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* New directory template for Wysiwyg Images
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Newfolder
|
32 |
+
*/
|
33 |
+
?>
|
app/design/adminhtml/default/default/template/cms/browser/content/uploader.phtml
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Uploader template for Wysiwyg Images
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div id="<?php echo $this->getHtmlId() ?>" class="uploader">
|
35 |
+
<div class="buttons">
|
36 |
+
<div id="<?php echo $this->getHtmlId() ?>-install-flash" style="display:none">
|
37 |
+
<?php echo Mage::helper('media')->__('This content requires last version of Adobe Flash Player. <a href="%s">Get Flash</a>', 'http://www.adobe.com/go/getflash/') ?>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
<div class="clear"></div>
|
41 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>-template">
|
42 |
+
<div id="{{id}}" class="file-row">
|
43 |
+
<span class="file-info">{{name}} ({{size}})</span>
|
44 |
+
<span class="delete-button"><?php echo $this->getDeleteButtonHtml() ?></span>
|
45 |
+
<span class="progress-text"></span>
|
46 |
+
<div class="clear"></div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>-template-progress">
|
50 |
+
{{percent}}% {{uploaded}} / {{total}}
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<script type="text/javascript">
|
55 |
+
//<![CDATA[
|
56 |
+
maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
|
57 |
+
maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';
|
58 |
+
|
59 |
+
<?php echo $this->getJsObjectName() ?> = new Flex.Uploader('<?php echo $this->getHtmlId() ?>', '<?php echo $this->getSkinUrl('media/uploader.swf') ?>', <?php echo $this->getConfigJson() ?>);
|
60 |
+
<?php echo $this->getJsObjectName() ?>.onFilesComplete = function(completedFiles){
|
61 |
+
completedFiles.each(function(file){
|
62 |
+
<?php echo $this->getJsObjectName() ?>.removeFile(file.id);
|
63 |
+
});
|
64 |
+
MediabrowserInstance.handleUploadComplete();
|
65 |
+
}
|
66 |
+
// hide flash buttons
|
67 |
+
if ($('<?php echo $this->getHtmlId() ?>-flash') != undefined) {
|
68 |
+
$('<?php echo $this->getHtmlId() ?>-flash').setStyle({float:'left'});
|
69 |
+
}
|
70 |
+
//]]>
|
71 |
+
</script>
|
app/design/adminhtml/default/default/template/cms/browser/js.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Directories tree template
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<script type="text/javascript">
|
35 |
+
//<![CDATA[
|
36 |
+
MediabrowserInstance = new Mediabrowser(<?php echo $this->getFilebrowserSetupObject() ?>);
|
37 |
+
MediabrowserInstance.storeId = '<?php echo $this->getStoreId() ?>';
|
38 |
+
//]]>
|
39 |
+
</script>
|
app/design/adminhtml/default/default/template/cms/browser/tree.phtml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Directories tree template
|
30 |
+
*
|
31 |
+
* @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Tree
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div class="categories-side-col">
|
35 |
+
<div class="tree-actions">
|
36 |
+
<a href="#" id="tree_action_collapse"><?php echo $this->helper('cms')->__('Collapse All'); ?></a>
|
37 |
+
<span class="separator">|</span>
|
38 |
+
<a href="#" id="tree_action_expand"><?php echo $this->helper('cms')->__('Expand All'); ?></a>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<div id="tree" style="width:100%; overflow:auto;"></div>
|
43 |
+
|
44 |
+
<script type="text/javascript">
|
45 |
+
Ext.onReady(function(){
|
46 |
+
var Tree = Ext.tree;
|
47 |
+
var tree = new Tree.TreePanel('tree', {
|
48 |
+
animate:true,
|
49 |
+
loader: new Tree.TreeLoader({
|
50 |
+
dataUrl:'<?php echo $this->getTreeLoaderUrl() ?>'
|
51 |
+
}),
|
52 |
+
enableDD:false,
|
53 |
+
containerScroll: true
|
54 |
+
});
|
55 |
+
|
56 |
+
// set the root node
|
57 |
+
var root = new Tree.AsyncTreeNode({
|
58 |
+
text: '<?php echo $this->getRootNodeName() ?>',
|
59 |
+
draggable:false,
|
60 |
+
id:'root'
|
61 |
+
});
|
62 |
+
tree.setRootNode(root);
|
63 |
+
|
64 |
+
// render the tree
|
65 |
+
tree.render();
|
66 |
+
root.expand();
|
67 |
+
|
68 |
+
Event.observe($('tree_action_collapse'), 'click', function(){
|
69 |
+
tree.collapseAll();
|
70 |
+
});
|
71 |
+
|
72 |
+
Event.observe($('tree_action_expand'), 'click', function(){
|
73 |
+
tree.expandAll();
|
74 |
+
});
|
75 |
+
|
76 |
+
MediabrowserInstance.setTree(tree);
|
77 |
+
tree.addListener('click', MediabrowserInstance.selectFolder.bind(MediabrowserInstance));
|
78 |
+
tree.expandPath('<?php echo $this->getTreeCurrentPath() ?>','', function(success, node) {
|
79 |
+
MediabrowserInstance.selectFolder(node);
|
80 |
+
});
|
81 |
+
});
|
82 |
+
</script>
|
app/design/adminhtml/default/default/template/cms/page/edit/form/renderer/content.phtml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_element = $this->getElement() ?>
|
28 |
+
<?php if (!$_element->getNoDisplay()): ?>
|
29 |
+
<tr>
|
30 |
+
<td colspan="3" class="value"><?php echo trim($_element->getElementHtml()) ?></td>
|
31 |
+
</tr>
|
32 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/coming.phtml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<h3><?php echo Mage::helper('adminhtml')->__('Sorry, this feature is coming soon...') ?></h3>
|
29 |
+
</div>
|
30 |
+
<p><?php echo Mage::helper('adminhtml')->__('We\'re in our typing table, coding away more features for Magento. Thank you for your patience.') ?></p>
|
app/design/adminhtml/default/default/template/compiler/process.phtml
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-compilation"><?php echo $this->getHeader() ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<?php if ($this->canRunCompilation()): ?>
|
33 |
+
<?php echo $this->getChangeStatusButtonHtml() ?>
|
34 |
+
<?php echo $this->getRunButtonHtml() ?>
|
35 |
+
<?php endif;?>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
</div>
|
40 |
+
<div class="entry-edit">
|
41 |
+
<form name="compilation_form" id="compilation_form" method="post" action="<?php echo $this->getRunFormAction(); ?>">
|
42 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
43 |
+
<?php if (!$this->canRunCompilation()): ?>
|
44 |
+
<div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
45 |
+
<?php endif;?>
|
46 |
+
|
47 |
+
<div class="entry-edit-head">
|
48 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('compiler')->__('Compilation State') ?></h4>
|
49 |
+
</div>
|
50 |
+
<fieldset>
|
51 |
+
<legend><?php echo Mage::helper('compiler')->__('Compilation State') ?></legend>
|
52 |
+
<table cellspacing="0" class="form-list" style="width:100%">
|
53 |
+
<tr>
|
54 |
+
<td class="label"><label ><?php echo Mage::helper('compiler')->__('Compiler Status')?></label></td>
|
55 |
+
<td class="value">
|
56 |
+
<strong><?php echo $this->getCompilerStatus()?></strong>
|
57 |
+
</td>
|
58 |
+
</tr>
|
59 |
+
<tr>
|
60 |
+
<td class="label"><label ><?php echo Mage::helper('compiler')->__('Compilation State')?></label></td>
|
61 |
+
<td class="value">
|
62 |
+
<strong><?php echo $this->getCompilerState()?></strong>
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td class="label"><label ><?php echo Mage::helper('compiler')->__('Collected Files Count')?></label></td>
|
67 |
+
<td class="value">
|
68 |
+
<strong><?php echo $this->getCollectedFilesCount() ?></strong>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<td class="label"><label ><?php echo Mage::helper('compiler')->__('Compiled Scopes Count')?></label></td>
|
73 |
+
<td class="value">
|
74 |
+
<strong><?php echo $this->getCompiledFilesCount() ?></strong>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td class="label"><label ><?php echo Mage::helper('compiler')->__('Scopes Compilation Settings')?></label></td>
|
79 |
+
<td class="value">
|
80 |
+
<?php foreach($this->getCompilationList() as $_frontName => $_classNames) : ?>
|
81 |
+
<p>
|
82 |
+
<label><strong><?php echo $_frontName ?></strong></label><br />
|
83 |
+
<textarea style="width:70%" readonly="readonly" cols="5" rows="3"><?php echo $this->arrToSting($_classNames)?></textarea>
|
84 |
+
</p>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
</table>
|
89 |
+
</fieldset>
|
90 |
+
</form>
|
91 |
+
</div>
|
92 |
+
<script type="text/javascript">
|
93 |
+
compilationForm = new varienForm('compilation_form');
|
94 |
+
</script>
|
app/design/adminhtml/default/default/template/connect/extension/custom/authors.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
var id = 0;
|
29 |
+
var authorTemplate =
|
30 |
+
'<tr>'+
|
31 |
+
'<td style="margin-bottom:5px;">'+
|
32 |
+
'<input class="input-text required-entry" style="width:160px;" name="authors[name][]" id="authors_name_{{id}}" value="{{name}}"/>'+
|
33 |
+
'</td>'+
|
34 |
+
'<td style="margin-bottom:5px;">'+
|
35 |
+
'<input class="input-text required-entry" style="width:140px;" name="authors[user][]" id="authors_user_{{id}}" value="{{user}}"/>'+
|
36 |
+
'</td>'+
|
37 |
+
'<td style="margin-bottom:5px;">'+
|
38 |
+
'<input class="input-text required-entry validate-email" style="width:160px;" name="authors[email][]" id="authors_email_{{id}}" value="{{email}}"/>'+
|
39 |
+
'</td>'+
|
40 |
+
'<td style="margin-bottom:5px;">'+
|
41 |
+
'<?php echo $this->jsQuoteEscape($this->getRemoveRowButtonHtml('tr')) ?>'+
|
42 |
+
'</td>'+
|
43 |
+
'</tr>';
|
44 |
+
|
45 |
+
function addAuthor(data)
|
46 |
+
{
|
47 |
+
if (data == undefined) {
|
48 |
+
data = {};
|
49 |
+
}
|
50 |
+
data.id = id++;
|
51 |
+
|
52 |
+
var template = new Template(authorTemplate, /(^|.|\r|\n)({{(\w+)}})/);
|
53 |
+
Element.insert($('authors_container'), {bottom: template.evaluate(data)});
|
54 |
+
}
|
55 |
+
</script>
|
56 |
+
|
57 |
+
<div class="entry-edit">
|
58 |
+
<?php echo $this->getFormHtml() ?>
|
59 |
+
<div class="entry-edit-head">
|
60 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__("Authors") ?></h4>
|
61 |
+
</div>
|
62 |
+
<fieldset id="authors_fieldset" class="grid">
|
63 |
+
<legend><?php echo $this->__("Authors") ?></legend>
|
64 |
+
<table class="data" cellspacing="0">
|
65 |
+
<thead>
|
66 |
+
<tr class="headings">
|
67 |
+
<th><?php echo $this->__("Name") ?> <span class="required">*</span></th>
|
68 |
+
<th><?php echo $this->__("User") ?> <span class="required">*</span></th>
|
69 |
+
<th><?php echo $this->__("Email") ?> <span class="required">*</span></th>
|
70 |
+
<th><?php echo $this->__("Remove") ?></th>
|
71 |
+
</tr>
|
72 |
+
</thead>
|
73 |
+
<tbody id="authors_container">
|
74 |
+
<script type="text/javascript">
|
75 |
+
<?php if (count($this->getAuthors())): ?>
|
76 |
+
<?php foreach ($this->getAuthors() as $author): ?>
|
77 |
+
addAuthor(<?php echo $author ?>);
|
78 |
+
<?php endforeach ?>
|
79 |
+
<?php else: ?>
|
80 |
+
addAuthor();
|
81 |
+
<?php endif;?>
|
82 |
+
</script>
|
83 |
+
</tbody>
|
84 |
+
<tfoot>
|
85 |
+
<tr>
|
86 |
+
<td class="a-right" colspan="4"><?php echo $this->getAddAuthorButtonHtml() ?></td>
|
87 |
+
</tr>
|
88 |
+
</tfoot>
|
89 |
+
</table>
|
90 |
+
</fieldset>
|
91 |
+
</div>
|
app/design/adminhtml/default/default/template/connect/extension/custom/contents.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<div class="entry-edit">
|
29 |
+
<?php echo $this->getFormHtml() ?>
|
30 |
+
|
31 |
+
<div class="entry-edit-head">
|
32 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__("Contents") ?></h4>
|
33 |
+
</div>
|
34 |
+
<fieldset id="contents_fieldset" class="grid">
|
35 |
+
<legend><?php echo $this->__("Contents") ?></legend>
|
36 |
+
<table class="data" cellspacing="0">
|
37 |
+
<thead>
|
38 |
+
<tr class="headings">
|
39 |
+
<th><?php echo $this->__("Target") ?></th>
|
40 |
+
<th><?php echo $this->__("Path") ?></th>
|
41 |
+
<th><?php echo $this->__("Type") ?></th>
|
42 |
+
<th><?php echo $this->__("Include") ?></th>
|
43 |
+
<th><?php echo $this->__("Ignore") ?></th>
|
44 |
+
<th><?php echo $this->__("Action") ?></th>
|
45 |
+
</tr>
|
46 |
+
<tr id="contents_template" style="display:none">
|
47 |
+
<?php function showContentsTemplate($self, $_i=0) { ?>
|
48 |
+
<td style="margin-bottom:5px;">
|
49 |
+
<select name="contents[target][]" style="width:170px">
|
50 |
+
<optgroup label="Magento">
|
51 |
+
<?php foreach ($self->getMageTargets() as $_value=>$_label): ?>
|
52 |
+
<option value="<?php echo $_value ?>" <?php echo $self->getSelected('contents/target/'.$_i, $_value) ?>><?php echo $_label ?></option>
|
53 |
+
<?php endforeach ?>
|
54 |
+
</optgroup>
|
55 |
+
</select>
|
56 |
+
</td><td style="margin-bottom:5px;">
|
57 |
+
<input class="input-text" style="width:150px" name="contents[path][]" value="<?php echo $self->getValue('contents/path/'.$_i) ?>"/>
|
58 |
+
</td><td style="margin-bottom:5px;">
|
59 |
+
<select name="contents[type][]" style="width:100px">
|
60 |
+
<option value="file" <?php echo $self->getSelected('contents/type/'.$_i, 'file') ?>><?php echo Mage::helper('adminhtml')->__("File") ?></option>
|
61 |
+
<option value="dir" <?php echo $self->getSelected('contents/type/'.$_i, 'dir') ?>><?php echo Mage::helper('adminhtml')->__("Recursive Dir") ?></option>
|
62 |
+
</select>
|
63 |
+
</td><td style="margin-bottom:5px;">
|
64 |
+
<input class="input-text" style="width:100px" name="contents[include][]" value="<?php echo $self->getValue('contents/include/'.$_i) ?>"/>
|
65 |
+
</td><td style="margin-bottom:5px;">
|
66 |
+
<input class="input-text" style="width:100px" name="contents[ignore][]" value="<?php echo $self->getValue('contents/ignore/'.$_i) ?>"/>
|
67 |
+
</td><td style="margin-bottom:5px;">
|
68 |
+
<?php echo $self->getRemoveRowButtonHtml('tr') ?>
|
69 |
+
</td>
|
70 |
+
<?php } ?>
|
71 |
+
<?php showContentsTemplate($this) ?>
|
72 |
+
</tr>
|
73 |
+
</thead>
|
74 |
+
<tbody id="contents_container">
|
75 |
+
<?php if ($this->getData('contents/target')): ?>
|
76 |
+
<?php foreach ($this->getData('contents/target') as $_i=>$_dbField): ?>
|
77 |
+
<?php if (0===$_i) continue; ?>
|
78 |
+
<tr>
|
79 |
+
<?php showContentsTemplate($this, $_i) ?>
|
80 |
+
</tr>
|
81 |
+
<?php endforeach ?>
|
82 |
+
<?php endif ?>
|
83 |
+
</tbody>
|
84 |
+
<tfoot>
|
85 |
+
<tr>
|
86 |
+
<td class="a-right" colspan="6"><?php echo $this->getAddRowButtonHtml('contents_container', 'contents_template', $this->__('Add Contents Path')) ?></td>
|
87 |
+
</tr>
|
88 |
+
</tfoot>
|
89 |
+
</table>
|
90 |
+
</fieldset>
|
91 |
+
</div>
|
app/design/adminhtml/default/default/template/connect/extension/custom/depends.phtml
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<?php echo $this->getFormHtml() ?>
|
29 |
+
|
30 |
+
<div class="entry-edit-head">
|
31 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__("Packages") ?></h4>
|
32 |
+
</div>
|
33 |
+
<fieldset id="depends_packages_fieldset" class="grid">
|
34 |
+
<legend><?php echo $this->__("Packages") ?></legend>
|
35 |
+
<table class="data" cellspacing="0">
|
36 |
+
<thead>
|
37 |
+
<tr class="headings">
|
38 |
+
<th><?php echo $this->__("Package") ?></th>
|
39 |
+
<th><?php echo $this->__("Channel") ?></th>
|
40 |
+
<th><?php echo $this->__("Min") ?></th>
|
41 |
+
<th><?php echo $this->__("Max") ?></th>
|
42 |
+
<th><?php echo $this->__("Files") ?></th>
|
43 |
+
<th><?php echo $this->__("Action") ?></th>
|
44 |
+
</tr>
|
45 |
+
<tr id="depends_packages_template" style="display:none">
|
46 |
+
<?php function showDependsPackageTemplate($self, $_i=0) {
|
47 |
+
$filesClass = "files";
|
48 |
+
?>
|
49 |
+
|
50 |
+
|
51 |
+
<td style="margin-bottom:5px;">
|
52 |
+
<input class="input-text" style="width:200px;" name="depends[package][name][]" value="<?php echo $self->getValue('depends/package/name/'.$_i) ?>"/>
|
53 |
+
</td><td style="margin-bottom:5px;">
|
54 |
+
<input class="input-text" style="width:200px;" name="depends[package][channel][]" value="<?php echo $self->getValue('depends/package/channel/'.$_i) ?>"/>
|
55 |
+
</td><td style="margin-bottom:5px;">
|
56 |
+
<input class="input-text" style="width:50px;" name="depends[package][min][]" value="<?php echo $self->getValue('depends/package/min/'.$_i) ?>"/>
|
57 |
+
</td><td style="margin-bottom:5px;">
|
58 |
+
<input class="input-text" style="width:50px;" name="depends[package][max][]" value="<?php echo $self->getValue('depends/package/max/'.$_i) ?>"/>
|
59 |
+
</td><td style="margin-bottom:5px;">
|
60 |
+
<textarea class="<?php echo $filesClass ?>" style="width:300px;display:none" name="depends[package][files][]"><?php echo $self->getValue('depends/package/files/'.$_i)?> </textarea>
|
61 |
+
<?php echo $self->getAddFileDepsRowButtonHtml("tr", $filesClass) ?>
|
62 |
+
</td><td style="margin-bottom:5px;">
|
63 |
+
<?php echo $self->getRemoveRowButtonHtml('tr') ?>
|
64 |
+
</td>
|
65 |
+
<?php } ?>
|
66 |
+
<?php showDependsPackageTemplate($this) ?>
|
67 |
+
</tr>
|
68 |
+
</thead>
|
69 |
+
<tbody id="depends_packages_container">
|
70 |
+
<?php if ($this->getData('depends/package/name')): ?>
|
71 |
+
<?php foreach ($this->getData('depends/package/name') as $_i=>$_dbField): ?>
|
72 |
+
<?php if (0===$_i) continue; ?>
|
73 |
+
<tr>
|
74 |
+
<?php showDependsPackageTemplate($this, $_i) ?>
|
75 |
+
</tr>
|
76 |
+
<?php endforeach ?>
|
77 |
+
<?php endif ?>
|
78 |
+
</tbody>
|
79 |
+
<tfoot>
|
80 |
+
<tr>
|
81 |
+
<td class="a-right" colspan="8"><?php echo $this->getAddRowButtonHtml('depends_packages_container', 'depends_packages_template', $this->__('Add Package dependency')) ?></td>
|
82 |
+
</tr>
|
83 |
+
</tfoot>
|
84 |
+
</table>
|
85 |
+
</fieldset>
|
86 |
+
|
87 |
+
<div class="entry-edit-head">
|
88 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__("Extensions") ?></h4>
|
89 |
+
</div>
|
90 |
+
<fieldset id="depends_extensions_fieldset" class="grid">
|
91 |
+
<legend><?php echo $this->__("Extensions") ?></legend>
|
92 |
+
<table class="data" cellspacing="0">
|
93 |
+
<thead>
|
94 |
+
<tr class="headings">
|
95 |
+
<th><?php echo $this->__("Extension") ?></th>
|
96 |
+
<th><?php echo $this->__("Min") ?></th>
|
97 |
+
<th><?php echo $this->__("Max") ?></th>
|
98 |
+
<th><?php echo $this->__("Action") ?></th>
|
99 |
+
</tr>
|
100 |
+
<tr id="depends_extensions_template" style="display:none">
|
101 |
+
<?php function showDependsExtensionsTemplate($self, $_i=0) { ?>
|
102 |
+
<td style="margin-bottom:5px;">
|
103 |
+
<select name="depends[extension][name][]" style="width:100px">
|
104 |
+
<?php foreach ($self->getExtensions() as $_value=>$_label): ?>
|
105 |
+
<option value="<?php echo $_value ?>" <?php echo $self->getSelected('depends/extension/name/'.$_i, $_value) ?>><?php echo $_label ?></option>
|
106 |
+
<?php endforeach ?>
|
107 |
+
</select>
|
108 |
+
</td><td style="margin-bottom:5px;">
|
109 |
+
<input class="input-text" style="width:50px;" name="depends[extension][min][]" value="<?php echo $self->getValue('depends/extension/min/'.$_i) ?>"/>
|
110 |
+
</td><td style="margin-bottom:5px;">
|
111 |
+
<input class="input-text" style="width:50px;" name="depends[extension][max][]" value="<?php echo $self->getValue('depends/extension/max/'.$_i) ?>"/>
|
112 |
+
</td><td style="margin-bottom:5px;">
|
113 |
+
<?php echo $self->getRemoveRowButtonHtml('tr') ?>
|
114 |
+
</td>
|
115 |
+
<?php } ?>
|
116 |
+
<?php showDependsExtensionsTemplate($this) ?>
|
117 |
+
</tr>
|
118 |
+
</thead>
|
119 |
+
<tbody id="depends_extensions_container">
|
120 |
+
<?php if ($this->getData('depends/extension/name')): ?>
|
121 |
+
<?php foreach ($this->getData('depends/extension/name') as $_i=>$_dbField): ?>
|
122 |
+
<?php if (0===$_i) continue; ?>
|
123 |
+
<tr>
|
124 |
+
<?php showDependsExtensionsTemplate($this, $_i) ?>
|
125 |
+
</tr>
|
126 |
+
<?php endforeach ?>
|
127 |
+
<?php endif ?>
|
128 |
+
</tbody>
|
129 |
+
<tfoot>
|
130 |
+
<tr>
|
131 |
+
<td class="a-right" colspan="7"><?php echo $this->getAddRowButtonHtml('depends_extensions_container', 'depends_extensions_template', $this->__('Add PHP Extension dependency')) ?></td>
|
132 |
+
</tr>
|
133 |
+
</tfoot>
|
134 |
+
</table>
|
135 |
+
</fieldset>
|
136 |
+
|
137 |
+
</div>
|
app/design/adminhtml/default/default/template/connect/extension/custom/load.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<ul class="messages">
|
29 |
+
<li class="notice-msg">
|
30 |
+
<ul>
|
31 |
+
<li><?php echo Mage::helper('catalog')->__("Please be careful as once you click on the row it will load package data form the selected file and all unsaved form data will be lost.") ?></li>
|
32 |
+
</ul>
|
33 |
+
</li>
|
34 |
+
</ul>
|
35 |
+
<?php echo $this->getPackageGridHtml() ?>
|
app/design/adminhtml/default/default/template/connect/extension/custom/package.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<script type="text/javascript">
|
29 |
+
function addRow(container, template)
|
30 |
+
{
|
31 |
+
Element.insert($(container), {bottom: '<tr>' + $(template).innerHTML + '</tr>'});
|
32 |
+
}
|
33 |
+
|
34 |
+
function removeRow(button, selector)
|
35 |
+
{
|
36 |
+
Element.remove($(button).up(selector));
|
37 |
+
}
|
38 |
+
|
39 |
+
function showHideFiles(button, selector, filesClass)
|
40 |
+
{
|
41 |
+
$(button).up(selector).select('[class="'+filesClass+'"]').map(Element.toggle);
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
function loadPackage()
|
46 |
+
{
|
47 |
+
var package = prompt('Please enter package name');
|
48 |
+
if (!package) return false;
|
49 |
+
var url = '<?php echo $this->getUrl('*/*/load') ?>';
|
50 |
+
location.href = url+(url.indexOf('?')==-1 ? '?':'&')+'id='+package;
|
51 |
+
}
|
52 |
+
|
53 |
+
function saveAsPackage()
|
54 |
+
{
|
55 |
+
_defaultPackageName = '';
|
56 |
+
if ($('_packagefile_name')) {
|
57 |
+
_defaultPackageName = $('_packagefile_name').getValue();
|
58 |
+
} else if ($('_packagename')) {
|
59 |
+
_defaultPackageName = $('_packagename').getValue();
|
60 |
+
}
|
61 |
+
var package = prompt('Please enter package file name', _defaultPackageName);
|
62 |
+
if (!package) return false;
|
63 |
+
if ($('_packagefile_name')) {
|
64 |
+
$('_packagefile_name').value = package;
|
65 |
+
}
|
66 |
+
return editForm.submit();
|
67 |
+
}
|
68 |
+
|
69 |
+
function createPackage()
|
70 |
+
{
|
71 |
+
$('_create').value = 1;
|
72 |
+
editForm.submit();
|
73 |
+
}
|
74 |
+
|
75 |
+
function resetPackage()
|
76 |
+
{
|
77 |
+
location.href = '<?php echo $this->getUrl('*/*/reset') ?>';
|
78 |
+
}
|
79 |
+
</script>
|
80 |
+
|
81 |
+
<style type="text/css">
|
82 |
+
.table-editable { border:solid 1px #CCC; background:#FAFAFA; padding:5px; margin-bottom:5px; }
|
83 |
+
.table-editable th { border-bottom:solid 1px #CCC; text-align:center; }
|
84 |
+
.table-editable th, .table-editable td { padding:1px 3px; vertical-align:middle; }
|
85 |
+
.table-editable select { height:19px; }
|
86 |
+
</style>
|
87 |
+
|
88 |
+
<div class="entry-edit">
|
89 |
+
<input type="hidden" id="_create" name="_create" />
|
90 |
+
<?php echo $this->getFormHtml() ?>
|
91 |
+
</div>
|
app/design/adminhtml/default/default/template/connect/extension/custom/release.phtml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<?php echo $this->getFormHtml() ?>
|
29 |
+
</div>
|
app/design/adminhtml/default/default/template/currencysymbol/grid.phtml
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @var $this Mage_Currencysymbol_Block_Adminhtml_System_Currencysymbol
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<div class="content-header">
|
33 |
+
<table cellspacing="0">
|
34 |
+
<tr>
|
35 |
+
<td style="width:50%;"><h3 class="icon-head head-system-currency"><?php echo $this->getHeader() ?></h3></td>
|
36 |
+
<td class="form-buttons">
|
37 |
+
<?php
|
38 |
+
echo $this->getSaveButtonHtml();
|
39 |
+
?>
|
40 |
+
</td>
|
41 |
+
</tr>
|
42 |
+
</table>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<?php $this->getCurrencySymbolsData();?>
|
46 |
+
|
47 |
+
<form id="currency_symbols_form" action="<?php echo $this->getFormActionUrl() ?>" method="post">
|
48 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
49 |
+
|
50 |
+
<div class="entry-edit">
|
51 |
+
<div class="fieldset fieldset-wide">
|
52 |
+
<div class="grid">
|
53 |
+
<div class="hor-scroll">
|
54 |
+
<table cellspacing="0" class="data table-cat-img-sizes">
|
55 |
+
<colgroup>
|
56 |
+
<col width="15%"/>
|
57 |
+
<col />
|
58 |
+
</colgroup>
|
59 |
+
<thead>
|
60 |
+
<tr class="headings">
|
61 |
+
<th><span class="nobr"><span class="not-sort"><?php echo $this->__('Currency'); ?></span></span></th>
|
62 |
+
<th><span class="nobr"><span class="not-sort"><?php echo $this->__('Symbol'); ?><span class="required"><em>*</em></span></span></span></th>
|
63 |
+
</tr>
|
64 |
+
</thead>
|
65 |
+
<tbody>
|
66 |
+
<?php foreach($this->getCurrencySymbolsData() as $code => $data): ?>
|
67 |
+
<tr>
|
68 |
+
<td class="label">
|
69 |
+
<label for="custom_currency_symbol<?php echo $code; ?>"><?php echo $code; ?> (<?php echo $data['displayName']; ?>)</label>
|
70 |
+
</td>
|
71 |
+
<td class="value">
|
72 |
+
<input id="custom_currency_symbol<?php echo $code; ?>" class=" required-entry input-text" type="text" value="<?php echo Mage::helper('core')->quoteEscape($data['displaySymbol']); ?>"<?php echo $data['inherited'] ? ' disabled="disabled"' : '';?> name="custom_currency_symbol[<?php echo $code; ?>]">
|
73 |
+
<input id="custom_currency_symbol_inherit<?php echo $code; ?>" class="checkbox config-inherit" type="checkbox" onclick="toggleUseDefault(<?php echo '\'' . $code . '\',\'' . Mage::helper('core')->quoteEscape($data['parentSymbol'], true) . '\''; ?>)"<?php echo $data['inherited'] ? ' checked="checked"' : ''; ?> value="1" name="inherit_custom_currency_symbol[<?php echo $code; ?>]">
|
74 |
+
<label class="inherit" title="" for="custom_currency_symbol_inherit<?php echo $code; ?>"><?php echo $this->getInheritText(); ?></label>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<?php endforeach; ?>
|
78 |
+
</tbody>
|
79 |
+
</table>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
</form>
|
85 |
+
<script type="text/javascript">
|
86 |
+
var currencySymbolsForm = new varienForm('currency_symbols_form');
|
87 |
+
|
88 |
+
function toggleUseDefault(code, value)
|
89 |
+
{
|
90 |
+
checkbox = $('custom_currency_symbol_inherit'+code);
|
91 |
+
input = $('custom_currency_symbol'+code);
|
92 |
+
if (checkbox.checked) {
|
93 |
+
input.value = value;
|
94 |
+
input.disabled = true;
|
95 |
+
} else {
|
96 |
+
input.disabled = false;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
</script>
|
100 |
+
|
app/design/adminhtml/default/default/template/customer/edit/js.phtml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
function saveAndContinueEdit(urlTemplate) {
|
29 |
+
var template = new Template(urlTemplate, /(^|.|\r|\n)({{(\w+)}})/);
|
30 |
+
var url = template.evaluate({tab_id:customer_info_tabsJsTabs.activeTab.id});
|
31 |
+
editForm.submit(url);
|
32 |
+
}
|
33 |
+
</script>
|
app/design/adminhtml/default/default/template/customer/edit/tab/account/form/renderer/group.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
$_element = $this->getElement();
|
29 |
+
$_note = $_element->getNote();
|
30 |
+
$_trId = $_element->getHtmlContainerId();
|
31 |
+
$_class = $_element->getFieldsetHtmlClass();
|
32 |
+
?>
|
33 |
+
<?php if (!$_element->getNoDisplay()): ?>
|
34 |
+
<tr<?php if ($_trId): ?> id="<?php echo $_trId; ?>"<?php endif; ?>>
|
35 |
+
<?php if ($_element->getType() == 'hidden'): ?>
|
36 |
+
<td colspan="2" class="hidden"><?php echo trim($_element->getElementHtml()); ?></td>
|
37 |
+
<?php else: ?>
|
38 |
+
<td class="label<?php echo $_class ? " {$_class}-label" : ''; ?>"><?php echo trim($_element->getLabelHtml()); ?></td>
|
39 |
+
<td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value'; ?><?php echo $_class ? " {$_class}-value" : ''; ?>">
|
40 |
+
<?php echo trim($_element->getElementHtml()); ?>
|
41 |
+
<?php if ($this->getDisableAutoGroupChangeAttribute()): ?>
|
42 |
+
<br/>
|
43 |
+
<input id="<?php echo $this->escapeHtml($this->getDisableAutoGroupChangeCheckboxElementId()); ?>" name="<?php echo $this->escapeHtml($this->getDisableAutoGroupChangeCheckboxElementName()); ?>" type="checkbox"<?php if ($this->getDisableAutoGroupChangeCheckboxState() == 'checked') :?> checked="checked"<?php endif; ?> value="1"/>
|
44 |
+
<label for="<?php echo $this->escapeHtml($this->getDisableAutoGroupChangeCheckboxElementId()); ?>"><?php echo $this->escapeHtml($this->getDisableAutoGroupChangeCheckboxLabel()); ?></label>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php if ($_note): ?>
|
47 |
+
<p class="note<?php echo $_class ? " {$_class}-note" : ''; ?>" id="note_<?php echo $_element->getId(); ?>"><span><?php echo $_note; ?></span></p>
|
48 |
+
<?php endif ?>
|
49 |
+
</td>
|
50 |
+
<?php endif; ?>
|
51 |
+
</tr>
|
52 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/customer/edit/tab/view/grid/item.phtml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Adminhtml_Block_Customer_Edit_Tab_View_Grid_Renderer_Item */ ?>
|
28 |
+
<?php
|
29 |
+
$product = $this->getProduct();
|
30 |
+
$options = $this->getOptionList();
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php if (!$options): ?>
|
34 |
+
<?php echo $this->escapeHtml($product->getName())?>
|
35 |
+
<?php else: ?>
|
36 |
+
<div class="bundle-product-options">
|
37 |
+
<strong><?php echo $this->escapeHtml($product->getName())?></strong>
|
38 |
+
<dl>
|
39 |
+
<?php foreach ($options as $option) : ?>
|
40 |
+
<dt><?php echo $this->escapeHtml($option['label']) ?></dt>
|
41 |
+
<?php $formatedOptionValue = $this->getFormattedOptionValue($option) ?>
|
42 |
+
<dd><?php echo $formatedOptionValue['value'] ?></dd>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</dl>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/customer/online.phtml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td><h3 class="icon-head head-online-visitors"><?php echo Mage::helper('customer')->__('Online Customers') ?></h3></td>
|
31 |
+
</tr>
|
32 |
+
</table>
|
33 |
+
</div>
|
34 |
+
<?php echo $this->getChildHtml('grid') ?>
|
app/design/adminhtml/default/default/template/customer/sales/order/create/address/form/renderer/vat.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
$_element = $this->getElement();
|
29 |
+
$_note = $_element->getNote();
|
30 |
+
$_trId = $_element->getHtmlContainerId();
|
31 |
+
$_class = $_element->getFieldsetHtmlClass();
|
32 |
+
$_validateButton = $this->getValidateButton();
|
33 |
+
?>
|
34 |
+
<?php if (!$_element->getNoDisplay()): ?>
|
35 |
+
<tr<?php if($_trId): ?> id="<?php echo $_trId; ?>"<?php endif; ?>>
|
36 |
+
<?php if ($_element->getType()=='hidden'): ?>
|
37 |
+
<td colspan="2" class="hidden"><?php echo trim($_element->getElementHtml()); ?></td>
|
38 |
+
<?php else: ?>
|
39 |
+
<td class="label<?php echo $_class ? " {$_class}-label" : ''?>"><?php echo trim($_element->getLabelHtml()); ?></td>
|
40 |
+
<td class="<?php echo $_element->hasValueClass() ? $_element->getValueClass() : 'value'; ?><?php echo $_class ? " {$_class}-value" : ''; ?>">
|
41 |
+
<?php echo trim($_element->getElementHtml()); ?>
|
42 |
+
<?php if ($_note): ?>
|
43 |
+
<p class="note<?php echo $_class ? " {$_class}-note" : ''; ?>" id="note_<?php echo $_element->getId(); ?>"><span><?php echo $_note; ?></span></p>
|
44 |
+
<?php endif; ?>
|
45 |
+
<div class="validate-vat">
|
46 |
+
<?php echo $_validateButton->toHtml(); ?>
|
47 |
+
</div>
|
48 |
+
</td>
|
49 |
+
<?php endif; ?>
|
50 |
+
|
51 |
+
</tr>
|
52 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/customer/system/config/validatevat.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Customer_System_Config_Validatevat
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<script type="text/javascript">
|
33 |
+
//<![CDATA[
|
34 |
+
function validateVat() {
|
35 |
+
var elem = $('<?php echo $this->getHtmlId() ?>');
|
36 |
+
|
37 |
+
params = {
|
38 |
+
country: $('general_store_information_merchant_country').value,
|
39 |
+
vat: $('general_store_information_merchant_vat_number').value
|
40 |
+
};
|
41 |
+
|
42 |
+
new Ajax.Request('<?php echo $this->getAjaxUrl() ?>', {
|
43 |
+
parameters: params,
|
44 |
+
onSuccess: function(response) {
|
45 |
+
result = '<?php echo $this->__('VAT Number is Invalid') ?>';
|
46 |
+
try {
|
47 |
+
response = response.responseText;
|
48 |
+
if (response == 1) {
|
49 |
+
result = '<?php echo $this->__('VAT Number is Valid') ?>';
|
50 |
+
elem.removeClassName('fail').addClassName('success')
|
51 |
+
} else {
|
52 |
+
elem.removeClassName('success').addClassName('fail')
|
53 |
+
}
|
54 |
+
} catch (e) {
|
55 |
+
elem.removeClassName('success').addClassName('fail')
|
56 |
+
}
|
57 |
+
$('validation_result').update(result);
|
58 |
+
}
|
59 |
+
});
|
60 |
+
}
|
61 |
+
//]]>
|
62 |
+
</script>
|
63 |
+
<button onclick="javascript:validateVat(); return false;" class="scalable" type="button" id="<?php echo $this->getHtmlId() ?>">
|
64 |
+
<span id="validation_result"><?php echo $this->escapeHtml($this->getButtonLabel()) ?></span>
|
65 |
+
</button>
|
app/design/adminhtml/default/default/template/customer/tab/addresses.phtml
ADDED
@@ -0,0 +1,635 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!-- Addresses list -->
|
28 |
+
<table cellspacing="0" class="form-edit">
|
29 |
+
<tr>
|
30 |
+
<td class="address-list">
|
31 |
+
<div class="entry-edit-head">
|
32 |
+
<h4 class="icon-head head-customer-address-list"><?php echo Mage::helper('customer')->__('Customer Addresses') ?></h4>
|
33 |
+
</div>
|
34 |
+
<div class="sub-btn-set"><?php echo $this->getAddNewButtonHtml() ?></div>
|
35 |
+
<ul id="address_list">
|
36 |
+
<?php $_iterator = 0; ?>
|
37 |
+
<?php if(count($addressCollection)): ?>
|
38 |
+
<?php foreach ($addressCollection as $_address): ?>
|
39 |
+
<li id="address_item_<?php echo $_address->getId() ?>">
|
40 |
+
<?php if (!$this->isReadonly()): ?>
|
41 |
+
<a href="#" class="btn-remove-address">
|
42 |
+
<img src="<?php echo $this->getSkinUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" />
|
43 |
+
</a>
|
44 |
+
<a href="#" id="select_button_<?php echo $_address->getId() ?>" class="select_button btn-edit-address">
|
45 |
+
<img src="<?php echo $this->getSkinUrl('images/edit_icon.gif') ?>" alt="Edit address"/>
|
46 |
+
</a>
|
47 |
+
<?php endif;?>
|
48 |
+
<address>
|
49 |
+
<?php echo $_address->format('html') ?>
|
50 |
+
</address>
|
51 |
+
<div class="address-type">
|
52 |
+
<span class="address-type-line">
|
53 |
+
<input type="radio" <?php if ($this->isReadonly()):?> disabled="disabled"<?php endif;?> value="<?php echo $_address->getId() ?>" id="address_item_billing<?php echo $_address->getId() ?>" name="account[default_billing]" title="<?php echo Mage::helper('customer')->__('Set as Default Billing Address') ?>"<?php if($_address->getId()==$customer->getDefaultBilling()): ?> checked="checked"<?php endif; ?>/>
|
54 |
+
<label for="address_item_billing<?php echo $_address->getId() ?>"><?php echo Mage::helper('customer')->__('Default Billing Address') ?></label>
|
55 |
+
</span>
|
56 |
+
<span class="address-type-line">
|
57 |
+
<input type="radio" <?php if ($this->isReadonly()):?> disabled="disabled"<?php endif;?> value="<?php echo $_address->getId() ?>" id="address_item_shipping<?php echo $_address->getId() ?>" name="account[default_shipping]" title="<?php echo Mage::helper('customer')->__('Set as Default Shipping Address') ?>"<?php if($_address->getId()==$customer->getDefaultShipping()): ?> checked="checked"<?php endif; ?>/>
|
58 |
+
<label for="address_item_shipping<?php echo $_address->getId() ?>"><?php echo Mage::helper('customer')->__('Default Shipping Address') ?></label>
|
59 |
+
</span>
|
60 |
+
</div>
|
61 |
+
</li>
|
62 |
+
<?php endforeach; ?>
|
63 |
+
<?php endif; ?>
|
64 |
+
</ul>
|
65 |
+
</td>
|
66 |
+
<td>
|
67 |
+
<!-- Template for adding address item to list -->
|
68 |
+
<?php $_templatePrefix = $this->getTemplatePrefix() ?>
|
69 |
+
<div id="address_item_template" class="no-display template">
|
70 |
+
<?php if (!$this->isReadonly()): ?>
|
71 |
+
<a href="#" class="btn-remove-address">
|
72 |
+
<img src="<?php echo $this->getSkinUrl('images/cancel_icon.gif') ?>" alt="Remove address" id="delete_button<?php echo ++$_iterator ?>" />
|
73 |
+
</a>
|
74 |
+
<a href="#" id="select_button_" class="select_button btn-edit-address">
|
75 |
+
<img src="<?php echo $this->getSkinUrl('images/edit_icon.gif') ?>" alt="Edit address"/>
|
76 |
+
</a>
|
77 |
+
<?php endif;?>
|
78 |
+
<address><?php echo Mage::helper('customer')->__('New Customer Address') ?></address>
|
79 |
+
<div class="address-type">
|
80 |
+
<span class="address-type-line">
|
81 |
+
<input <?php if ($this->isReadonly()):?> disabled="disabled"<?php endif;?> type="radio" value="<?php echo $_templatePrefix ?>" id="address_item_billing<?php echo $_templatePrefix ?>" name="account[default_billing]" title="<?php echo Mage::helper('customer')->__('Set as Default Billing Address') ?>"/>
|
82 |
+
<label for="address_item_billing<?php echo $_templatePrefix ?>"><?php echo Mage::helper('customer')->__('Default Billing Address') ?></label>
|
83 |
+
</span>
|
84 |
+
<span class="address-type-line">
|
85 |
+
<input <?php if ($this->isReadonly()):?> disabled="disabled"<?php endif;?> type="radio" value="<?php echo $_templatePrefix ?>" id="address_item_shipping<?php echo $_templatePrefix ?>" name="account[default_shipping]" title="<?php echo Mage::helper('customer')->__('Set as Default Shipping Address') ?>"/>
|
86 |
+
<label for="address_item_shipping<?php echo $_templatePrefix ?>"><?php echo Mage::helper('customer')->__('Default Shipping Address') ?></label>
|
87 |
+
</span>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<!-- Address form template -->
|
92 |
+
<div id="address_form_template" class="no-display template">
|
93 |
+
<?php
|
94 |
+
// Set form template elements prefix
|
95 |
+
$this->getForm()->setHtmlIdPrefix($_templatePrefix)
|
96 |
+
->setFieldNameSuffix('address['.$_templatePrefix.']');
|
97 |
+
?>
|
98 |
+
<?php echo $this->getForm()->getHtml() ?>
|
99 |
+
<?php echo $this->getCancelButtonHtml() ?>
|
100 |
+
</div>
|
101 |
+
<!-- -->
|
102 |
+
|
103 |
+
<!-- Addresses forms -->
|
104 |
+
<div class="entry-edit" id="address_form_container">
|
105 |
+
<?php if(count($addressCollection)): ?>
|
106 |
+
<?php foreach ($addressCollection as $_address): ?>
|
107 |
+
<div id="form_address_item_<?php echo $_address->getId() ?>" style="display:none">
|
108 |
+
<?php
|
109 |
+
$this->getForm()->addValues($_address->getData())
|
110 |
+
->setHtmlIdPrefix("_item{$_address->getId()}")
|
111 |
+
->setFieldNameSuffix('address['.$_address->getId().']');
|
112 |
+
$this->addValuesToNamePrefixElement($_address->getPrefix())
|
113 |
+
->addValuesToNameSuffixElement($_address->getSuffix());
|
114 |
+
?>
|
115 |
+
<?php echo $this->getForm()->getHtml() ?>
|
116 |
+
<input type="hidden" name="address[<?php echo $_address->getId() ?>][_deleted]" id="deleted_address_item_<?php echo $_address->getId() ?>" />
|
117 |
+
</div>
|
118 |
+
<?php endforeach; ?>
|
119 |
+
<?php else: ?>
|
120 |
+
<div id="no_address_message"><?php echo Mage::helper('customer')->__('This customer has no saved addresses.') ?></div>
|
121 |
+
<?php endif; ?>
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<script type="text/javascript">
|
125 |
+
//<![CDATA[
|
126 |
+
var deleteButtonId = <?php echo $_iterator ?>;
|
127 |
+
|
128 |
+
var addressesModel = Class.create();
|
129 |
+
addressesModel.prototype = {
|
130 |
+
initialize : function() {
|
131 |
+
this.activeItem = null;
|
132 |
+
this.itemTemplate = $('address_item_template');
|
133 |
+
this.formTemplate = $('address_form_template');
|
134 |
+
this.itemContainer= $('address_list');
|
135 |
+
this.formContainer= $('address_form_container');
|
136 |
+
this.baseItemId = 'new_item';
|
137 |
+
|
138 |
+
this.defaultCountries = <?php echo $this->getDefaultCountriesJson(); ?>;
|
139 |
+
this.itemContentTemplate = new Template('<?php echo $this->helper('customer/address')->getFormat('js_template')?>');
|
140 |
+
|
141 |
+
this.onNewAddressClick = this.addNewAddress.bindAsEventListener(this);
|
142 |
+
this.onItemMouseOver = this.itemMouseOver.bindAsEventListener(this);
|
143 |
+
this.onItemMouseOut = this.itemMouseOut.bindAsEventListener(this);
|
144 |
+
this.onItemMouseClick = this.itemMouseClick.bindAsEventListener(this);
|
145 |
+
this.onItemFormFieldChange = this.syncFormData.bindAsEventListener(this);
|
146 |
+
|
147 |
+
this.loader = new varienLoader(true);
|
148 |
+
this.regionsUrl = '<?php echo $this->getRegionsUrl() ?>';
|
149 |
+
this.requiredStateForCountries = <?php echo $this->helper('directory')->getCountriesWithStatesRequired(true) ?>;
|
150 |
+
this.showAllRegions = <?php echo (string)$this->helper('directory')->getShowNonRequiredState() ? 1 : 0; ?>;
|
151 |
+
|
152 |
+
this.reloadItemList(1);
|
153 |
+
|
154 |
+
for(var i=0,n=this.itemList.length; i<n; i++){
|
155 |
+
if(this.itemList[i].id){
|
156 |
+
this.addItemObservers(this.itemList[i]);
|
157 |
+
this.initItem(this.itemList[i]);
|
158 |
+
}
|
159 |
+
}
|
160 |
+
if($('add_new_address_button')){
|
161 |
+
Event.observe('add_new_address_button', 'click', this.onNewAddressClick)
|
162 |
+
}
|
163 |
+
|
164 |
+
this.setActiveItem(this.itemList[0]);
|
165 |
+
this.setAddressAsDefault();
|
166 |
+
this.bindCountryRegionRelation();
|
167 |
+
},
|
168 |
+
|
169 |
+
reloadItemList : function(initial){
|
170 |
+
this.itemList = $$('#address_list li');
|
171 |
+
if( initial ) {
|
172 |
+
this.itemCount = this.itemList.length;
|
173 |
+
}
|
174 |
+
if(!this.itemList.length){
|
175 |
+
if($('no_address_message')){
|
176 |
+
$('no_address_message').show();
|
177 |
+
}
|
178 |
+
else {
|
179 |
+
this.formContainer.innerHTML+= '<div id="no_address_message"><?php echo addslashes(Mage::helper('customer')->__('This customer has no saved addresses.')) ?></div>'
|
180 |
+
}
|
181 |
+
}
|
182 |
+
},
|
183 |
+
|
184 |
+
initItem : function(item){
|
185 |
+
if(item && $('form_'+item.id)){
|
186 |
+
item.formBlock = $('form_'+item.id);
|
187 |
+
Element.hide($('form_'+item.id));
|
188 |
+
$('form_'+item.id).statusBar = item;
|
189 |
+
$('form_'+item.id).addressItem = item;
|
190 |
+
|
191 |
+
// set Zip optional/required
|
192 |
+
var countryElement = $('_item' + item.id.replace(/address_item_/, '') + 'country_id');
|
193 |
+
varienGlobalEvents.fireEvent("address_country_changed", countryElement);
|
194 |
+
}
|
195 |
+
},
|
196 |
+
|
197 |
+
addItemObservers : function(item){
|
198 |
+
if(item.id){
|
199 |
+
Event.observe(item, 'mouseover', this.onItemMouseOver);
|
200 |
+
Event.observe(item, 'mouseout', this.onItemMouseOut);
|
201 |
+
Event.observe(item, 'click', this.onItemMouseClick);
|
202 |
+
}
|
203 |
+
},
|
204 |
+
|
205 |
+
addNewAddress : function(event){
|
206 |
+
if(this.canCreateNewAddress){
|
207 |
+
this.itemCount++;
|
208 |
+
if($('no_address_message')){
|
209 |
+
$('no_address_message').hide();
|
210 |
+
}
|
211 |
+
// preventing duplication of ids for fields and blocks
|
212 |
+
while ($$("div[id='form_address_item_" + this.itemCount + "']").length) {
|
213 |
+
this.itemCount++;
|
214 |
+
}
|
215 |
+
// create new form elements
|
216 |
+
Element.insert(this.formContainer, {bottom:
|
217 |
+
'<div id="' + 'form_' + this.baseItemId + this.itemCount + '">'
|
218 |
+
+ this.prepareTemplate(this.formTemplate.innerHTML)
|
219 |
+
+ '</div>'
|
220 |
+
});
|
221 |
+
|
222 |
+
var newForm = $('form_' + this.baseItemId + this.itemCount);
|
223 |
+
|
224 |
+
$('_item'+this.itemCount+'firstname').value = $('_accountfirstname').value;
|
225 |
+
$('_item'+this.itemCount+'lastname').value = $('_accountlastname').value;
|
226 |
+
|
227 |
+
if ($('_accountwebsite_id').value !== '' && undefined !== this.defaultCountries[$('_accountwebsite_id').value]) {
|
228 |
+
$('_item'+this.itemCount+'country_id').value = this.defaultCountries[$('_accountwebsite_id').value];
|
229 |
+
}
|
230 |
+
|
231 |
+
Element.hide(newForm);
|
232 |
+
var template = '<li id="' + this.baseItemId+this.itemCount + '">';
|
233 |
+
deleteButtonId ++;
|
234 |
+
template += this.prepareTemplate(this.itemTemplate.innerHTML).replace('delete_button', 'delete_button'+ deleteButtonId);
|
235 |
+
template += '</li>';
|
236 |
+
Element.insert(this.itemContainer, {bottom: template});
|
237 |
+
var newItem = $(this.baseItemId+this.itemCount);
|
238 |
+
newItem.isNewAddress = true;
|
239 |
+
newItem.formBlock = newForm;
|
240 |
+
|
241 |
+
|
242 |
+
newForm.statusBar = newItem;
|
243 |
+
newForm.addressItem = newItem;
|
244 |
+
|
245 |
+
this.addItemObservers(newItem);
|
246 |
+
this.setActiveItem(newItem);
|
247 |
+
this.bindCountryRegionRelation(newForm.id);
|
248 |
+
|
249 |
+
if( $('_item'+this.itemCount+'firstname').value ) this.syncFormData($('_item'+this.itemCount+'firstname'));
|
250 |
+
if( $('_item'+this.itemCount+'lastname').value ) this.syncFormData($('_item'+this.itemCount+'lastname'));
|
251 |
+
}
|
252 |
+
this.reloadItemList();
|
253 |
+
//Event.stop(event);
|
254 |
+
},
|
255 |
+
|
256 |
+
prepareTemplate : function(template){
|
257 |
+
return template
|
258 |
+
.replace(/<?php echo $_templatePrefix ?>/g, '_item'+this.itemCount)
|
259 |
+
.replace(/_counted="undefined"/g, '')
|
260 |
+
.replace(/"select_button_"/g, 'select_button_' + this.itemCount)
|
261 |
+
;
|
262 |
+
},
|
263 |
+
|
264 |
+
canCreateNewAddress : function(){
|
265 |
+
return true;
|
266 |
+
},
|
267 |
+
|
268 |
+
itemMouseOver : function(event){
|
269 |
+
var element = Event.findElement(event, 'li');
|
270 |
+
Element.addClassName(element, 'over');
|
271 |
+
},
|
272 |
+
|
273 |
+
itemMouseOut : function(event){
|
274 |
+
var element = Event.findElement(event, 'li');
|
275 |
+
Element.removeClassName(element, 'over');
|
276 |
+
},
|
277 |
+
|
278 |
+
itemMouseClick : function(event){
|
279 |
+
if (!Event) {
|
280 |
+
return;
|
281 |
+
}
|
282 |
+
var element = Event.findElement(event, 'li'); // find top item
|
283 |
+
var elem = Event.element(event); // exact element clicked
|
284 |
+
|
285 |
+
if ( ((elem.tagName.toUpperCase() == 'A') && elem.id.match(/^delete_button([0-9]*?)$/)) || ((elem.tagName.toUpperCase() == 'IMG') && elem.id.match(/^delete_button([0-9]*?)$/)) ) {
|
286 |
+
this.deleteAddress(element);
|
287 |
+
Event.stop(event);
|
288 |
+
}
|
289 |
+
else if(elem.tagName.toUpperCase() == 'INPUT') {
|
290 |
+
this.setAddressAsDefault(element);
|
291 |
+
}
|
292 |
+
else {
|
293 |
+
this.setActiveItem(element);
|
294 |
+
}
|
295 |
+
},
|
296 |
+
|
297 |
+
setAddressAsDefault : function(){
|
298 |
+
for(var i=0; i<this.itemList.length;i++){
|
299 |
+
if(this.itemList[i].id){
|
300 |
+
var inputs = $(this.itemList[i].id).getElementsBySelector('input');
|
301 |
+
var isActive = false;
|
302 |
+
for(var j in inputs){
|
303 |
+
if(inputs[j].type=='radio' && inputs[j].checked && this.itemList.length > 1){
|
304 |
+
isActive = true;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
this.toggleDeleteButton(this.itemList[i], !isActive);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
},
|
311 |
+
|
312 |
+
toggleDeleteButton : function(item, flag){
|
313 |
+
if(flag){
|
314 |
+
$(item).select('.btn-remove-address').each(Element.show);
|
315 |
+
$(item.formBlock).getElementsBySelector('.delete-address').each(Element.show);
|
316 |
+
} else {
|
317 |
+
$(item).select('.btn-remove-address').each(Element.hide);
|
318 |
+
$(item.formBlock).getElementsBySelector('.delete-address').each(Element.hide);
|
319 |
+
}
|
320 |
+
},
|
321 |
+
|
322 |
+
setActiveItem : function(item){
|
323 |
+
if(this.activeItem){
|
324 |
+
Element.removeClassName(this.activeItem, 'on');
|
325 |
+
if($('form_'+this.activeItem.id)){
|
326 |
+
Element.hide($('form_'+this.activeItem.id));
|
327 |
+
}
|
328 |
+
}
|
329 |
+
Element.addClassName(item, 'on');
|
330 |
+
|
331 |
+
if(item && $('form_'+item.id)){
|
332 |
+
$('form_'+item.id).changeRelation = item;
|
333 |
+
$('form_'+item.id).addressItem = item;
|
334 |
+
Element.show($('form_'+item.id));
|
335 |
+
//new Effect.Appear($('form_'+item.id), {duration : 0.3 });
|
336 |
+
//$('form_'+item.id).focus();
|
337 |
+
this.addFieldChangeObserver($('form_'+item.id));
|
338 |
+
var regionIdElement = $('_item' + item.id.replace(/address_item_/, '') + 'region_id');
|
339 |
+
var regionElement = $('_item' + item.id.replace(/address_item_/, '') + 'region');
|
340 |
+
this.countryEl = $('_item' + item.id.replace(/address_item_/, '') + 'country_id');
|
341 |
+
if (regionIdElement && regionElement) {
|
342 |
+
var actualId = regionElement.id;
|
343 |
+
if (('select' == regionIdElement.tagName.toLowerCase()) && regionIdElement) {
|
344 |
+
actualId = regionIdElement.id;
|
345 |
+
}
|
346 |
+
this._checkRegionRequired([regionIdElement, regionElement], actualId);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
this.activeItem = item;
|
351 |
+
},
|
352 |
+
|
353 |
+
getFormContainerFields : function(container){
|
354 |
+
var fields = $$( '#' + container.id + ' input','#' + container.id + ' select','#' + container.id + ' textarea');
|
355 |
+
return fields;
|
356 |
+
},
|
357 |
+
|
358 |
+
addFieldChangeObserver : function(container){
|
359 |
+
var fields = this.getFormContainerFields(container);
|
360 |
+
for (var i = 0; i < fields.length; i++) {
|
361 |
+
Event.observe(fields[i], 'change', this.onItemFormFieldChange);
|
362 |
+
}
|
363 |
+
|
364 |
+
},
|
365 |
+
|
366 |
+
syncFormData : function(evt){
|
367 |
+
var container = false;
|
368 |
+
|
369 |
+
if(!evt.addClassName) {
|
370 |
+
var elm = Event.element(evt);
|
371 |
+
} else {
|
372 |
+
var elm = evt;
|
373 |
+
}
|
374 |
+
|
375 |
+
elm = $(elm);
|
376 |
+
while(elm.tagName.toUpperCase() != 'BODY') {
|
377 |
+
if(elm.addressItem){
|
378 |
+
container = elm;
|
379 |
+
}
|
380 |
+
elm = $(elm.parentNode);
|
381 |
+
}
|
382 |
+
|
383 |
+
if(container){
|
384 |
+
var data = {};
|
385 |
+
var fields = this.getFormContainerFields(container);
|
386 |
+
for(var i=0; i < fields.size(); i++){
|
387 |
+
if(fields[i].id){
|
388 |
+
var id = fields[i].id.replace(/^(_item)?[0-9]+/, '');
|
389 |
+
var id = id.replace(/^(id)?[0-9]+/, '');
|
390 |
+
var value = fields[i].getValue();
|
391 |
+
var tagName = fields[i].tagName.toLowerCase();
|
392 |
+
if (tagName == 'select') {
|
393 |
+
if (fields[i].multiple) {
|
394 |
+
var values = $([]);
|
395 |
+
var l = fields[i].options.length;
|
396 |
+
for (j=0; j<l; j++) {
|
397 |
+
var o = fields[i].options[j];
|
398 |
+
if (o.selected === true) {
|
399 |
+
values[values.length] = o.text.escapeHTML();
|
400 |
+
}
|
401 |
+
}
|
402 |
+
data[id] = values.join(', ');
|
403 |
+
} else {
|
404 |
+
data[id] = fields[i].options[fields[i].selectedIndex].text.escapeHTML();
|
405 |
+
}
|
406 |
+
} else if (value !== null) {
|
407 |
+
data[id] = value.escapeHTML();
|
408 |
+
}
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
// Set name of state to 'region' if list of states are in 'region_id' selectbox
|
413 |
+
if (!data['region'] && data['region_id']) {
|
414 |
+
data['region'] = data['region_id'];
|
415 |
+
delete data['region_id'];
|
416 |
+
}
|
417 |
+
|
418 |
+
// Set data to html
|
419 |
+
var itemContainer = container.addressItem.getElementsBySelector('address');
|
420 |
+
if(itemContainer[0]){
|
421 |
+
var html = this.itemContentTemplate.evaluate(data);
|
422 |
+
html = html.replace(new RegExp('(<br\\s*/?>\\s*){2,}','img'),'<br/>');
|
423 |
+
html = html.replace(new RegExp('<br\\s*/?>(\\s*,){1,}\\s*<br\\s*/?>','ig'),'<br/>');
|
424 |
+
html = html.replace(new RegExp('<br\\s*/?>(\\s*,){1,}(.*)<br\\s*/?>','ig'),'<br/>$2<br/>');
|
425 |
+
html = html.replace(new RegExp('<br\\s*/?>(.*?)(,\\s*){1,}<br\\s*/?>','ig'),'<br/>$1<br/>');
|
426 |
+
html = html.replace(new RegExp('<br\\s*/?>(.*?)(,\\s*){2,}(.*?)<br\\s*/?>','ig'),'<br/>$1, $3<br/>');
|
427 |
+
html = html.replace(new RegExp('t:\\s*<br\\s*/?>','ig'),'');
|
428 |
+
html = html.replace(new RegExp('f:\\s*<br\\s*/?>','ig'),'');
|
429 |
+
html = html.replace(new RegExp('vat:\\s*$','ig'),'');
|
430 |
+
itemContainer[0].innerHTML = html;
|
431 |
+
}
|
432 |
+
}
|
433 |
+
},
|
434 |
+
|
435 |
+
deleteAddress : function(item){
|
436 |
+
if(confirm('<?php echo Mage::helper('customer')->__('Are you sure you want to delete this address?') ?>')){
|
437 |
+
if (!item.isNewAddress && $('deleted_'+item.id)){
|
438 |
+
$('deleted_'+item.id).value = 1;
|
439 |
+
if (item.formBlock){
|
440 |
+
item.formBlock.addClassName('ignore-validation');
|
441 |
+
}
|
442 |
+
}
|
443 |
+
if (this.activeItem == item && item != this.itemList[0]) this.setActiveItem(this.itemList[0]);
|
444 |
+
if (item == this.itemList[0] && (this.itemList[1])) this.setActiveItem(this.itemList[1]);
|
445 |
+
|
446 |
+
this.formContainer.removeChild(item.formBlock);
|
447 |
+
this.itemContainer.removeChild(item);
|
448 |
+
this.reloadItemList();
|
449 |
+
this.setAddressAsDefault();
|
450 |
+
}
|
451 |
+
},
|
452 |
+
|
453 |
+
cancelAdd : function(button){
|
454 |
+
if(confirm('<?php echo addslashes(Mage::helper('customer')->__('Are you sure you want to cancel adding of this address?')) ?>')){
|
455 |
+
var item = $(this.baseItemId + button.id.replace(new RegExp('[a-z_]*',''), ''));
|
456 |
+
|
457 |
+
if( item.isNewAddress){
|
458 |
+
if ( this.activeItem == item ) this.formContainer.removeChild(item.formBlock);
|
459 |
+
}
|
460 |
+
if ( this.activeItem == item && item != this.itemList[0] ) this.setActiveItem(this.itemList[0]);
|
461 |
+
if ( item == this.itemList[0] && (this.itemList[1]) ) this.setActiveItem(this.itemList[1]);
|
462 |
+
|
463 |
+
this.itemContainer.removeChild(item);
|
464 |
+
|
465 |
+
this.reloadItemList();
|
466 |
+
this.setAddressAsDefault();
|
467 |
+
}
|
468 |
+
},
|
469 |
+
|
470 |
+
bindCountryRegionRelation : function(parentId){
|
471 |
+
//alert('OK');
|
472 |
+
if(parentId){
|
473 |
+
var countryElements = $(parentId).getElementsByClassName('countries');
|
474 |
+
}
|
475 |
+
else{
|
476 |
+
var countryElements = $$('.countries');
|
477 |
+
}
|
478 |
+
|
479 |
+
for(var i=0;i<=countryElements.length;i++){
|
480 |
+
if(countryElements[i]){
|
481 |
+
if(!countryElements[i].bindRegions || !countryElements[i].parentBindId || countryElements[i].parentBindId!=parentId){
|
482 |
+
//if(!countryElements[i].bindRegions || !countryElements[i].parentBindId){
|
483 |
+
Event.observe(countryElements[i], 'change', this.reloadRegionField.bind(this));
|
484 |
+
|
485 |
+
countryElements[i].bindRegions = true;
|
486 |
+
countryElements[i].parentBindId = parentId;
|
487 |
+
}
|
488 |
+
}
|
489 |
+
}
|
490 |
+
},
|
491 |
+
|
492 |
+
reloadRegionField : function(event){
|
493 |
+
var countryElement = Event.element(event);
|
494 |
+
if(countryElement.id){
|
495 |
+
var regionElement = $(countryElement.id.replace(/country_id/, 'region'));
|
496 |
+
if(regionElement){
|
497 |
+
this.regionElement = regionElement;
|
498 |
+
this.countryEl = countryElement;
|
499 |
+
if (countryElement.value) {
|
500 |
+
var url = this.regionsUrl + 'parent/' + countryElement.value;
|
501 |
+
this.loader.load(url, {}, this.refreshRegionField.bind(this));
|
502 |
+
} else {
|
503 |
+
// Set empty text field in region
|
504 |
+
this.refreshRegionField('[]');
|
505 |
+
}
|
506 |
+
}
|
507 |
+
// set Zip optional/required
|
508 |
+
varienGlobalEvents.fireEvent("address_country_changed", countryElement);
|
509 |
+
}
|
510 |
+
},
|
511 |
+
|
512 |
+
// serverResponse is either string with server response, or object to force some paricular data setting
|
513 |
+
refreshRegionField : function(serverResponse){
|
514 |
+
if (!serverResponse)
|
515 |
+
return;
|
516 |
+
var data = eval('(' + serverResponse + ')');
|
517 |
+
|
518 |
+
var row = Element.previous(this.regionElement.parentNode,0);
|
519 |
+
var reqLabel = Element.select(row, '.required');
|
520 |
+
|
521 |
+
// Set regions and refresh controls
|
522 |
+
// We use a pair of 'region' and 'region_id' to properly submit data:
|
523 |
+
// manually entered text goes in 'region' and selected option id goes in 'region_id'
|
524 |
+
var regionHtmlName = this.regionElement.name;
|
525 |
+
var regionIdHtmlName = regionHtmlName.replace(/region/, 'region_id');
|
526 |
+
var regionHtmlId = this.regionElement.id;
|
527 |
+
var regionIdHtmlId = regionHtmlId.replace(/region/, 'region_id');
|
528 |
+
var newInputId = null; // id of imput that was added to a page - filled below
|
529 |
+
|
530 |
+
if (data.length) {
|
531 |
+
// Create visible selectbox 'region_id' and hidden 'region'
|
532 |
+
var html = '<select name="' + regionIdHtmlName + '" id="' + regionIdHtmlId + '" class="required-entry select" title="' + this.regionElement.title + '">';
|
533 |
+
html+= '<option value=""></option>';
|
534 |
+
for (var i in data){
|
535 |
+
if(data[i].label) {
|
536 |
+
html+= '<option value="'+data[i].value+'"';
|
537 |
+
if(this.regionElement.value && (this.regionElement.value == data[i].value || this.regionElement.value == data[i].label)){
|
538 |
+
html+= ' selected="selected"';
|
539 |
+
}
|
540 |
+
html+='>'+data[i].label+'</option>';
|
541 |
+
}
|
542 |
+
}
|
543 |
+
html += '</select>';
|
544 |
+
|
545 |
+
html += '<input type="hidden" name="' + regionHtmlName + '" id="' + regionHtmlId + '"/>';
|
546 |
+
|
547 |
+
if (reqLabel) {
|
548 |
+
reqLabel.each(function(item){Element.show(item)});
|
549 |
+
}
|
550 |
+
|
551 |
+
newInputId = regionIdHtmlId;
|
552 |
+
} else {
|
553 |
+
// Create visible text input 'region' and hidden 'region_id'
|
554 |
+
var html = '<input type="text" name="' + regionHtmlName + '" id="' + regionHtmlId + '" class="input-text" title="' + this.regionElement.title + '" />';
|
555 |
+
html += '<input type="hidden" name="' + regionIdHtmlName + '" id="' + regionIdHtmlId + '"/>';
|
556 |
+
|
557 |
+
if (reqLabel) {
|
558 |
+
reqLabel.each(function(item){Element.hide(item)});
|
559 |
+
}
|
560 |
+
|
561 |
+
newInputId = regionHtmlId;
|
562 |
+
}
|
563 |
+
|
564 |
+
var parentNode = this.regionElement.parentNode;
|
565 |
+
parentNode.innerHTML = html;
|
566 |
+
this.regionElement = $(regionHtmlId);
|
567 |
+
|
568 |
+
// Updating in address info
|
569 |
+
var newInput = $(newInputId);
|
570 |
+
Event.observe(newInput, 'change', this.onItemFormFieldChange); // Restore observing to update address info
|
571 |
+
this.syncFormData(newInput); // Update address info now
|
572 |
+
var activeElementId = regionHtmlId;
|
573 |
+
if (('select' == $(regionIdHtmlId).tagName.toLowerCase()) && regionIdHtmlId) {
|
574 |
+
activeElementId = regionIdHtmlId;
|
575 |
+
}
|
576 |
+
this._checkRegionRequired([$(regionHtmlId), $(regionIdHtmlId)], activeElementId);
|
577 |
+
},
|
578 |
+
|
579 |
+
_checkRegionRequired: function(elements, activeElementId)
|
580 |
+
{
|
581 |
+
var label, wildCard;
|
582 |
+
var that = this;
|
583 |
+
var regionRequired = this.requiredStateForCountries.indexOf(this.countryEl.value) >= 0;
|
584 |
+
|
585 |
+
elements.each(function(currentElement) {
|
586 |
+
Validation.reset(currentElement);
|
587 |
+
label = $$('label[for="' + currentElement.id + '"]')[0];
|
588 |
+
if (label) {
|
589 |
+
wildCard = label.down('em') || label.down('span.required');
|
590 |
+
if (!that.showAllRegions) {
|
591 |
+
if (regionRequired) {
|
592 |
+
label.up('tr').show();
|
593 |
+
} else {
|
594 |
+
label.up('tr').hide();
|
595 |
+
}
|
596 |
+
}
|
597 |
+
}
|
598 |
+
|
599 |
+
if (label && wildCard) {
|
600 |
+
if (!regionRequired) {
|
601 |
+
wildCard.hide();
|
602 |
+
} else {
|
603 |
+
wildCard.show();
|
604 |
+
}
|
605 |
+
}
|
606 |
+
|
607 |
+
if (!regionRequired) {
|
608 |
+
if (currentElement.hasClassName('required-entry')) {
|
609 |
+
currentElement.removeClassName('required-entry');
|
610 |
+
}
|
611 |
+
if ('select' == currentElement.tagName.toLowerCase() &&
|
612 |
+
currentElement.hasClassName('validate-select')
|
613 |
+
) {
|
614 |
+
currentElement.removeClassName('validate-select');
|
615 |
+
}
|
616 |
+
} else if (activeElementId == currentElement.id) {
|
617 |
+
if (!currentElement.hasClassName('required-entry')) {
|
618 |
+
currentElement.addClassName('required-entry');
|
619 |
+
}
|
620 |
+
if ('select' == currentElement.tagName.toLowerCase() &&
|
621 |
+
!currentElement.hasClassName('validate-select')
|
622 |
+
) {
|
623 |
+
currentElement.addClassName('validate-select');
|
624 |
+
}
|
625 |
+
}
|
626 |
+
});
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
customerAddresses = new addressesModel();
|
631 |
+
//]]>
|
632 |
+
</script>
|
633 |
+
</td>
|
634 |
+
</tr>
|
635 |
+
</table>
|
app/design/adminhtml/default/default/template/customer/tab/cart.phtml
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Adminhtml_Block_Customer_Edit_Tab_Cart */ ?>
|
28 |
+
<?php if($this->getCartHeader()): ?>
|
29 |
+
<div class="content-header skip-header">
|
30 |
+
<table cellspacing="0">
|
31 |
+
<tr>
|
32 |
+
<td style="width:50%;"><h4><?php echo $this->getCartHeader(); ?></h4></td>
|
33 |
+
</tr>
|
34 |
+
</table>
|
35 |
+
</div>
|
36 |
+
<?php endif ?>
|
37 |
+
<?php echo $this->getGridParentHtml() ?>
|
38 |
+
<?php if ($this->canDisplayContainer()) : ?>
|
39 |
+
<?php
|
40 |
+
$listType = $this->getJsObjectName();
|
41 |
+
?>
|
42 |
+
<script type="text/javascript">
|
43 |
+
<?php echo $this->getJsObjectName() ?>cartControl = {
|
44 |
+
reload: function (params) {
|
45 |
+
if (!params) {
|
46 |
+
params = {};
|
47 |
+
}
|
48 |
+
<?php echo $this->getJsObjectName() ?>.reloadParams = params;
|
49 |
+
<?php echo $this->getJsObjectName() ?>.reload();
|
50 |
+
<?php echo $this->getJsObjectName() ?>.reloadParams = {};
|
51 |
+
},
|
52 |
+
|
53 |
+
configureItem: function (itemId) {
|
54 |
+
productConfigure.setOnLoadIFrameCallback('<?php echo $listType ?>', this.cbOnLoadIframe.bind(this));
|
55 |
+
productConfigure.showItemConfiguration('<?php echo $listType ?>', itemId);
|
56 |
+
return false;
|
57 |
+
},
|
58 |
+
|
59 |
+
cbOnLoadIframe: function (response) {
|
60 |
+
if (!response.ok) {
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
this.reload();
|
64 |
+
},
|
65 |
+
|
66 |
+
removeItem: function (itemId) {
|
67 |
+
if (!itemId) {
|
68 |
+
alert('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('customer')->__('No item specified.')) ?>');
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
if(!confirm('<?php echo Mage::helper('core')->jsQuoteEscape(Mage::helper('customer')->__('Are you sure that you want to remove this item?')) ?>')) {
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
|
75 |
+
this.reload({'delete':itemId});
|
76 |
+
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
};
|
80 |
+
|
81 |
+
<?php
|
82 |
+
$params = array(
|
83 |
+
'customer_id' => $this->getCustomer()->getId(),
|
84 |
+
'website_id' => $this->getWebsiteId()
|
85 |
+
);
|
86 |
+
?>
|
87 |
+
productConfigure.addListType(
|
88 |
+
'<?php echo $listType ?>',
|
89 |
+
{
|
90 |
+
urlFetch: '<?php echo $this->getUrl('*/customer_cart_product_composite_cart/configure', $params) ?>',
|
91 |
+
urlConfirm: '<?php echo $this->getUrl('*/customer_cart_product_composite_cart/update', $params) ?>'
|
92 |
+
}
|
93 |
+
);
|
94 |
+
</script>
|
95 |
+
<?php endif ?>
|
96 |
+
<br />
|
app/design/adminhtml/default/default/template/customer/tab/newsletter.phtml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<?php echo $this->getFormObject()->getHtml() ?>
|
29 |
+
</div>
|
30 |
+
<?php echo $this->getChildHtml('grid') ?>
|
app/design/adminhtml/default/default/template/customer/tab/view.phtml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Template for block Mage_Adminhtml_Block_Customer_Edit_Tab_View
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php
|
33 |
+
$lastLoginDateAdmin = $this->getLastLoginDate();
|
34 |
+
$lastLoginDateStore = $this->getStoreLastLoginDate();
|
35 |
+
|
36 |
+
$createDateAdmin = $this->getCreateDate();
|
37 |
+
$createDateStore = $this->getStoreCreateDate();
|
38 |
+
?>
|
39 |
+
<div class="entry-edit">
|
40 |
+
<div class="entry-edit-head"><h4 class="icon-head head-customer-view"><?php echo Mage::helper('customer')->__('Personal Information') ?></h4></div>
|
41 |
+
<fieldset>
|
42 |
+
<table cellspacing="2" class="box-left">
|
43 |
+
<tr>
|
44 |
+
<td><strong><?php echo $this->__('Last Logged In:') ?></strong></td>
|
45 |
+
<td><?php echo $lastLoginDateAdmin ?> (<?php echo $this->getCurrentStatus() ?>)</td>
|
46 |
+
</tr>
|
47 |
+
<?php if ($lastLoginDateAdmin != $lastLoginDateStore): ?>
|
48 |
+
<tr>
|
49 |
+
<td><strong><?php echo $this->__('Last Logged In (%s):', $this->getStoreLastLoginDateTimezone()) ?></strong></td>
|
50 |
+
<td><?php echo $lastLoginDateStore ?> (<?php echo $this->getCurrentStatus() ?>)</td>
|
51 |
+
</tr>
|
52 |
+
<?php endif; ?>
|
53 |
+
<tr>
|
54 |
+
<td><strong><?php echo $this->__('Confirmed email:') ?></strong></td>
|
55 |
+
<td><?php echo $this->getIsConfirmedStatus() ?></td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td><strong><?php echo $this->__('Account Created on:') ?></strong></td>
|
59 |
+
<td><?php echo $createDateAdmin ?></td>
|
60 |
+
</tr>
|
61 |
+
<?php if ($createDateAdmin != $createDateStore): ?>
|
62 |
+
<tr>
|
63 |
+
<td><strong><?php echo $this->__('Account Created on (%s):', $this->getStoreCreateDateTimezone()) ?></strong></td>
|
64 |
+
<td><?php echo $createDateStore ?></td>
|
65 |
+
</tr>
|
66 |
+
<?php endif; ?>
|
67 |
+
<tr>
|
68 |
+
<td><strong><?php echo $this->__('Account Created in:') ?></strong></td>
|
69 |
+
<td><?php echo $this->getCreatedInStore() ?></td>
|
70 |
+
</tr>
|
71 |
+
<tr>
|
72 |
+
<td><strong><?php echo $this->__('Customer Group:') ?></strong></td>
|
73 |
+
<td><?php echo $this->getGroupName() ?></td>
|
74 |
+
</tr>
|
75 |
+
</table>
|
76 |
+
<address class="box-right">
|
77 |
+
<strong><?php echo $this->__('Default Billing Address') ?></strong><br/>
|
78 |
+
<?php echo $this->getBillingAddressHtml() ?>
|
79 |
+
</address>
|
80 |
+
</fieldset>
|
81 |
+
</div>
|
82 |
+
<?php echo $this->getChildHtml('', true, true); ?>
|
app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit">
|
28 |
+
<div class="entry-edit-head"><h4 class="icon-head head-customer-sales-statistics"><?php echo Mage::helper('customer')->__('Sales Statistics') ?></h4></div>
|
29 |
+
<div class="grid">
|
30 |
+
<table cellspacing="0" class="data">
|
31 |
+
<thead>
|
32 |
+
<tr class="headings">
|
33 |
+
<th><?php echo Mage::helper('customer')->__('Website') ?></th>
|
34 |
+
<th><?php echo Mage::helper('customer')->__('Store') ?></th>
|
35 |
+
<th><?php echo Mage::helper('customer')->__('Store View') ?></th>
|
36 |
+
<th><?php echo Mage::helper('customer')->__('Lifetime Sales') ?></th>
|
37 |
+
<th><?php echo Mage::helper('customer')->__('Average Sale') ?></th>
|
38 |
+
</tr>
|
39 |
+
</thead>
|
40 |
+
<tfoot>
|
41 |
+
<tr>
|
42 |
+
<td colspan="3" class="label"><strong><big><?php echo Mage::helper('customer')->__('All Store Views') ?></big></strong></td>
|
43 |
+
<td class="emph"><strong><big><?php echo $this->formatCurrency($this->getTotals()->getBaseLifetime()) ?></big></strong></td>
|
44 |
+
<td class="emph"><strong><big><?php echo $this->formatCurrency($this->getTotals()->getAvgsale()) ?></big></strong></td>
|
45 |
+
</tr>
|
46 |
+
</tfoot>
|
47 |
+
<?php if ($this->getRows()): ?>
|
48 |
+
<tbody>
|
49 |
+
<?php $_i = 0; ?>
|
50 |
+
<?php foreach ($this->getRows() as $_websiteId => $_groups): ?>
|
51 |
+
<?php $_websiteRow = false; ?>
|
52 |
+
<?php foreach ($_groups as $_groupId => $_stores): ?>
|
53 |
+
<?php $_groupRow = false; ?>
|
54 |
+
<?php foreach ($_stores as $_row): ?>
|
55 |
+
<?php if ($_row->getStoreId() == 0): ?>
|
56 |
+
<td colspan="3" class="label"><?php echo $_row->getStoreName() ?></td>
|
57 |
+
<?php else: ?>
|
58 |
+
<tr<?php echo ($_i++ % 2 ? ' class="even"' : '') ?>>
|
59 |
+
<?php if (!$_websiteRow): ?>
|
60 |
+
<td rowspan="<?php echo $this->getWebsiteCount($_websiteId) ?>"><?php echo $_row->getWebsiteName() ?></td>
|
61 |
+
<?php $_websiteRow = true; ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if (!$_groupRow): ?>
|
64 |
+
<td rowspan="<?php echo count($_stores) ?>"><?php echo $_row->getGroupName() ?></td>
|
65 |
+
<?php $_groupRow = true; ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
<td class="label"><?php echo $_row->getStoreName() ?></td>
|
68 |
+
<?php endif; ?>
|
69 |
+
<td><?php echo $this->formatCurrency($_row->getLifetime(), $_row->getWebsiteId()) ?></td>
|
70 |
+
<td><?php echo $this->formatCurrency($_row->getAvgsale(), $_row->getWebsiteId()) ?></td>
|
71 |
+
</tr>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
<?php endforeach; ?>
|
74 |
+
<?php endforeach; ?>
|
75 |
+
</tbody>
|
76 |
+
<?php else: ?>
|
77 |
+
<tbody>
|
78 |
+
<tr class="no-display"><td colspan="5"></td></tr>
|
79 |
+
</tbody>
|
80 |
+
<?php endif; ?>
|
81 |
+
</table>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
<div class="clear"></div>
|
85 |
+
<br/>
|
app/design/adminhtml/default/default/template/customer/tab/wishlist.phtml
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php echo $this->getGridParentHtml() ?>
|
28 |
+
<?php if($this->canDisplayContainer()): ?>
|
29 |
+
<script type="text/javascript">
|
30 |
+
//<!--
|
31 |
+
wishlistControl = {
|
32 |
+
reload: function (urlParams) {
|
33 |
+
if (!urlParams) {
|
34 |
+
urlParams = '';
|
35 |
+
}
|
36 |
+
var url = <?php echo $this->getJsObjectName() ?>.url + '?ajax=true' + urlParams;
|
37 |
+
new Ajax.Updater(
|
38 |
+
<?php echo $this->getJsObjectName() ?>.containerId,
|
39 |
+
url,
|
40 |
+
{
|
41 |
+
parameters: {form_key: FORM_KEY},
|
42 |
+
onComplete: <?php echo $this->getJsObjectName() ?>.initGrid.bind(<?php echo $this->getJsObjectName() ?>),
|
43 |
+
evalScripts:true
|
44 |
+
}
|
45 |
+
);
|
46 |
+
},
|
47 |
+
|
48 |
+
configureItem: function (itemId) {
|
49 |
+
productConfigure.setOnLoadIFrameCallback('wishlist', this.cbOnLoadIframe.bind(this));
|
50 |
+
productConfigure.showItemConfiguration('wishlist', itemId);
|
51 |
+
return false;
|
52 |
+
},
|
53 |
+
|
54 |
+
cbOnLoadIframe: function (response) {
|
55 |
+
if (!response.ok) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
this.reload();
|
59 |
+
},
|
60 |
+
|
61 |
+
removeItem: function (itemId) {
|
62 |
+
if(!confirm('<?php echo Mage::helper('customer')->__('Are you sure that you want to remove this item?') ?>')) {
|
63 |
+
return false;
|
64 |
+
}
|
65 |
+
this.reload('&delete=' + itemId);
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
productConfigure.addListType(
|
71 |
+
'wishlist',
|
72 |
+
{
|
73 |
+
urlFetch: '<?php echo $this->getUrl('*/customer_wishlist_product_composite_wishlist/configure') ?>',
|
74 |
+
urlConfirm: '<?php echo $this->getUrl('*/customer_wishlist_product_composite_wishlist/update') ?>'
|
75 |
+
}
|
76 |
+
);
|
77 |
+
//-->
|
78 |
+
</script>
|
79 |
+
<?php endif ?>
|
app/design/adminhtml/default/default/template/dashboard/graph.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/*
|
27 |
+
?>
|
28 |
+
<div style="width:587px;margin:20px;position:relative;margin-left:-294px;left:50%">
|
29 |
+
<div style="position:absolute;right:1px;top:0px;left: expression(parentNode.offsetWidth - offsetWidth - 1 + 'px');">
|
30 |
+
<div style="padding:5px;height:15px;width:15px;background-color:#F4F4F4" id="dashboard_<?php echo $this->getHtmlId() ?>_cal_div"><img src="<?php echo Mage::getDesign()->getSkinUrl('images/grid-cal.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" /></div>
|
31 |
+
<div style="padding:5px;display:none;width:200px;" id="dashboard_<?php echo $this->getHtmlId() ?>_range_div" class="switcher">
|
32 |
+
<?php echo $this->__('Select Range') ?>:
|
33 |
+
<select name="period" id="order_<?php echo $this->getHtmlId() ?>_period" onchange="changePeriod(this)">
|
34 |
+
<?php foreach ($this->helper('adminhtml/dashboard_data')->getDatePeriods() as $_value=>$_label): ?>
|
35 |
+
<?php if(in_array($_value, array('custom'))) continue; ?>
|
36 |
+
<option value="<?php echo $_value ?>" <?php if($this->getRequest()->getParam('period')==$_value): ?> selected<?php endif; ?>><?php echo $_label ?></option>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</select>
|
39 |
+
<img src="<?php echo Mage::getDesign()->getSkinUrl('images/dashboard-close.gif') ?>" onclick="toggleCal('<?php echo $this->getHtmlId() ?>')" />
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<?php if($this->getCount()): ?>
|
43 |
+
<img src="<?php echo $this->getChartUrl() ?>" />
|
44 |
+
<?php else: ?>
|
45 |
+
<div align="center" style="width:587px;height:300px;"><?php echo $this->__('No Data Found') ?></div>
|
46 |
+
<?php endif; ?>
|
47 |
+
</div>
|
48 |
+
<?php */ ?>
|
49 |
+
<div style="margin:20px;">
|
50 |
+
<p class="switcher a-right" style="padding:5px 10px;"><?php echo $this->__('Select Range') ?>:
|
51 |
+
<select name="period" id="order_<?php echo $this->getHtmlId() ?>_period" onchange="changeDiagramsPeriod(this);">
|
52 |
+
<?php foreach ($this->helper('adminhtml/dashboard_data')->getDatePeriods() as $_value=>$_label): ?>
|
53 |
+
<?php if(in_array($_value, array('custom'))) continue; ?>
|
54 |
+
<option value="<?php echo $_value ?>" <?php if($this->getRequest()->getParam('period')==$_value): ?> selected="selected"<?php endif; ?>><?php echo $_label ?></option>
|
55 |
+
<?php endforeach; ?>
|
56 |
+
</select></p><br/>
|
57 |
+
<?php
|
58 |
+
$_containerStyle = "width:{$this->getWidth()}px;height:{$this->getHeight()}px; margin:0 auto;";
|
59 |
+
?>
|
60 |
+
<?php if($this->getCount()): ?>
|
61 |
+
<p style="<?php echo $_containerStyle?>"><img src="<?php echo $this->getChartUrl(false) ?>" alt="chart" title="chart" /></p>
|
62 |
+
<?php else: ?>
|
63 |
+
<p class="a-center" style="<?php echo $_containerStyle?>"><?php echo $this->__('No Data Found') ?></p>
|
64 |
+
<?php endif; ?>
|
65 |
+
</div>
|
app/design/adminhtml/default/default/template/dashboard/graph/disabled.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="box" style="margin:20px;">
|
28 |
+
<p class="a-center">
|
29 |
+
<?php echo $this->helper('adminhtml')->__('Chart is disabled. If you want to enable chart, click <a href="%s">here</a>.', $this->getConfigUrl())?>
|
30 |
+
</p>
|
31 |
+
</div>
|
app/design/adminhtml/default/default/template/dashboard/grid.phtml
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
|
29 |
+
$numColumns = sizeof($this->getColumns());
|
30 |
+
?>
|
31 |
+
<?php if($this->getCollection()): ?>
|
32 |
+
<div class="grid np">
|
33 |
+
<table cellspacing="0" style="border:0;" id="<?php echo $this->getId() ?>_table">
|
34 |
+
<?php foreach ($this->getColumns() as $_column): ?>
|
35 |
+
<col <?php echo $_column->getHtmlProperty() ?> />
|
36 |
+
<?php endforeach; ?>
|
37 |
+
<?php if ($this->getHeadersVisibility() || $this->getFilterVisibility()): ?>
|
38 |
+
<thead>
|
39 |
+
<?php if ($this->getHeadersVisibility()): ?>
|
40 |
+
<tr class="headings">
|
41 |
+
<?php foreach ($this->getColumns() as $_column): ?>
|
42 |
+
<th <?php echo $_column->getHeaderHtmlProperty() ?>><span class="nobr"><?php echo $_column->getHeaderHtml() ?></span></th>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</tr>
|
45 |
+
<?php endif; ?>
|
46 |
+
</thead>
|
47 |
+
<?php endif; ?>
|
48 |
+
<tbody>
|
49 |
+
<?php if (($this->getCollection()->getSize()>0) && (!$this->getIsCollapsed())): ?>
|
50 |
+
<?php foreach ($this->getCollection() as $_index=>$_item): ?>
|
51 |
+
<tr title="<?php echo $this->getRowId($_item) ?>">
|
52 |
+
<?php $i=0;foreach ($this->getColumns() as $_column): ?>
|
53 |
+
<td class="<?php echo $_column->getCssProperty() ?> <?php echo ++$i==$numColumns?'last':'' ?>"><?php echo (($_html = $_column->getRowField($_item)) != '' ? $_html : ' ') ?></td>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</tr>
|
56 |
+
<?php endforeach; ?>
|
57 |
+
<?php elseif ($this->getEmptyText()): ?>
|
58 |
+
<tr>
|
59 |
+
<td class="empty-text <?php echo $this->getEmptyTextClass() ?>" colspan="100"><?php echo $this->getEmptyText() ?></td>
|
60 |
+
</tr>
|
61 |
+
<?php endif; ?>
|
62 |
+
</tbody>
|
63 |
+
</table>
|
64 |
+
</div>
|
65 |
+
<?php if($this->canDisplayContainer()): ?>
|
66 |
+
<script type="text/javascript">
|
67 |
+
//<![CDATA[
|
68 |
+
<?php echo $this->getJsObjectName() ?> = new varienGrid('<?php echo $this->getId() ?>', '<?php echo $this->getGridUrl() ?>', '<?php echo $this->getVarNamePage() ?>', '<?php echo $this->getVarNameSort() ?>', '<?php echo $this->getVarNameDir() ?>', '<?php echo $this->getVarNameFilter() ?>');
|
69 |
+
<?php echo $this->getJsObjectName() ?>.useAjax = '<?php echo $this->getUseAjax() ?>';
|
70 |
+
<?php if($this->getRowClickCallback()): ?>
|
71 |
+
<?php echo $this->getJsObjectName() ?>.rowClickCallback = <?php echo $this->getRowClickCallback() ?>;
|
72 |
+
<?php endif; ?>
|
73 |
+
<?php if($this->getCheckboxCheckCallback()): ?>
|
74 |
+
<?php echo $this->getJsObjectName() ?>.checkboxCheckCallback = <?php echo $this->getCheckboxCheckCallback() ?>;
|
75 |
+
<?php endif; ?>
|
76 |
+
<?php if($this->getRowInitCallback()): ?>
|
77 |
+
<?php echo $this->getJsObjectName() ?>.initRowCallback = <?php echo $this->getRowInitCallback() ?>;
|
78 |
+
<?php echo $this->getJsObjectName() ?>.rows.each(function(row){<?php echo $this->getRowInitCallback() ?>(<?php echo $this->getJsObjectName() ?>, row)});
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if($this->getMassactionBlock()->isAvailable()): ?>
|
81 |
+
<?php echo $this->getMassactionBlock()->getJavaScript() ?>
|
82 |
+
<?php endif ?>
|
83 |
+
//]]>
|
84 |
+
</script>
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php endif ?>
|
app/design/adminhtml/default/default/template/dashboard/index.phtml
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if (is_array($this->getChild('diagrams')->getTabsIds())) : ?>
|
29 |
+
<script type="text/javascript">
|
30 |
+
//<![CDATA[
|
31 |
+
function changeDiagramsPeriod(periodObj) {
|
32 |
+
periodParam = periodObj.value ? 'period/' + periodObj.value + '/' : '';
|
33 |
+
<?php foreach ($this->getChild('diagrams')->getTabsIds() as $tabId): ?>
|
34 |
+
ajaxBlockParam = 'block/tab_<?php echo $tabId ?>/';
|
35 |
+
ajaxBlockUrl = '<?php echo $this->getUrl('*/*/ajaxBlock', array('_current' => true, 'block' => '', 'period' => '')) ?>' + ajaxBlockParam + periodParam;
|
36 |
+
new Ajax.Request(ajaxBlockUrl, {
|
37 |
+
parameters: {isAjax: 'true', form_key: FORM_KEY},
|
38 |
+
onSuccess: function(transport) {
|
39 |
+
tabContentElementId = '<?php echo $this->getChild('diagrams')->getId() ?>_<?php echo $tabId ?>_content';
|
40 |
+
try {
|
41 |
+
if (transport.responseText.isJSON()) {
|
42 |
+
var response = transport.responseText.evalJSON()
|
43 |
+
if (response.error) {
|
44 |
+
alert(response.message);
|
45 |
+
}
|
46 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
47 |
+
setLocation(response.ajaxRedirect);
|
48 |
+
}
|
49 |
+
} else {
|
50 |
+
$(tabContentElementId).update(transport.responseText);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
catch (e) {
|
54 |
+
$(tabContentElementId).update(transport.responseText);
|
55 |
+
}
|
56 |
+
}
|
57 |
+
});
|
58 |
+
<?php endforeach; ?>
|
59 |
+
ajaxBlockUrl = '<?php echo $this->getUrl('*/*/ajaxBlock', array('_current' => true, 'block' => 'totals', 'period' => '')) ?>' + periodParam;
|
60 |
+
new Ajax.Request(ajaxBlockUrl, {
|
61 |
+
parameters: {isAjax: 'true', form_key: FORM_KEY},
|
62 |
+
onSuccess: function(transport) {
|
63 |
+
tabContentElementId = 'dashboard_diagram_totals';
|
64 |
+
try {
|
65 |
+
if (transport.responseText.isJSON()) {
|
66 |
+
var response = transport.responseText.evalJSON()
|
67 |
+
if (response.error) {
|
68 |
+
alert(response.message);
|
69 |
+
}
|
70 |
+
if(response.ajaxExpired && response.ajaxRedirect) {
|
71 |
+
setLocation(response.ajaxRedirect);
|
72 |
+
}
|
73 |
+
} else {
|
74 |
+
$(tabContentElementId).replace(transport.responseText);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
catch (e) {
|
78 |
+
$(tabContentElementId).replace(transport.responseText);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
});
|
82 |
+
}
|
83 |
+
|
84 |
+
function toggleCal(id) {
|
85 |
+
$('dashboard_'+id+'_cal_div').toggle();
|
86 |
+
$('dashboard_'+id+'_range_div').toggle();
|
87 |
+
}
|
88 |
+
//]]>
|
89 |
+
</script>
|
90 |
+
<?php endif; ?>
|
91 |
+
<div class="content-header">
|
92 |
+
<table cellspacing="0">
|
93 |
+
<tr>
|
94 |
+
<td><h3 class="head-dashboard"><?php echo $this->__('Dashboard') ?></h3></td>
|
95 |
+
</tr>
|
96 |
+
</table>
|
97 |
+
</div>
|
98 |
+
<div class="dashboard-container">
|
99 |
+
<?php echo $this->getChildHtml('store_switcher') ?>
|
100 |
+
<table cellspacing="25" width="100%">
|
101 |
+
<tr>
|
102 |
+
<td><?php echo $this->getChildHtml('sales') ?>
|
103 |
+
<div class="entry-edit">
|
104 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Orders') ?></h4></div>
|
105 |
+
<fieldset class="np"><?php echo $this->getChildHtml('lastOrders'); ?></fieldset>
|
106 |
+
</div>
|
107 |
+
<div class="entry-edit">
|
108 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Last 5 Search Terms') ?></h4></div>
|
109 |
+
<fieldset class="np"><?php echo $this->getChildHtml('lastSearches'); ?></fieldset>
|
110 |
+
</div>
|
111 |
+
<div class="entry-edit">
|
112 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Top 5 Search Terms') ?></h4></div>
|
113 |
+
<fieldset class="np"><?php echo $this->getChildHtml('topSearches'); ?></fieldset>
|
114 |
+
</div>
|
115 |
+
</td>
|
116 |
+
<td>
|
117 |
+
<div class="entry-edit" style="border:1px solid #ccc;">
|
118 |
+
<?php echo $this->getChildHtml('diagrams') ?>
|
119 |
+
<?php if (is_array($this->getChild('diagrams')->getTabsIds())) : ?>
|
120 |
+
<div id="diagram_tab_content"></div>
|
121 |
+
<?php endif; ?>
|
122 |
+
<div style="margin:20px;">
|
123 |
+
<?php echo $this->getChildHtml('totals') ?>
|
124 |
+
</div>
|
125 |
+
<div style="margin:20px;">
|
126 |
+
<?php echo $this->getChildHtml('grids') ?>
|
127 |
+
<div id="grid_tab_content"></div>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
</td>
|
131 |
+
</tr>
|
132 |
+
</table>
|
133 |
+
</div>
|
app/design/adminhtml/default/default/template/dashboard/salebar.phtml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if( sizeof($this->getTotals()) > 0 ): ?>
|
28 |
+
<?php foreach( $this->getTotals() as $_total ): ?>
|
29 |
+
<div class="entry-edit">
|
30 |
+
<div class="entry-edit-head"><h4><?php echo $_total['label'] ?></h4></div>
|
31 |
+
<fieldset class="a-center bold">
|
32 |
+
<span class="nowrap" style="font-size:18px;"><?php echo $_total['value'] ?><span style="font-size:14px; color:#686868;"><?php echo $_total['decimals'] ?></span></span>
|
33 |
+
</fieldset>
|
34 |
+
</div>
|
35 |
+
<?php endforeach; ?>
|
36 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/dashboard/searches.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div style="padding:5px;">
|
28 |
+
<?php if(count($this->getCollection()->getItems()) > 0): ?>
|
29 |
+
<?php foreach ($this->getCollection()->getItems() as $item): ?>
|
30 |
+
<span><?php echo $item->getQueryText() ?></span><br />
|
31 |
+
<?php endforeach; ?>
|
32 |
+
<?php else: ?>
|
33 |
+
<div class="a-center"><?php echo $this->__('No search keywords.') ?></div>
|
34 |
+
<?php endif; ?>
|
35 |
+
</div>
|
app/design/adminhtml/default/default/template/dashboard/store/switcher.phtml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<p class="switcher"><label for="store_switcher"><?php echo $this->__('View Statistics For:') ?></label>
|
28 |
+
<?php echo $this->getHintHtml() ?>
|
29 |
+
<select name="store_switcher" id="store_switcher" class="left-col-block" onchange="return switchStore(this);">
|
30 |
+
<option value=""><?php echo $this->__('All Websites') ?></option>
|
31 |
+
<?php foreach ($this->getWebsiteCollection() as $_website): ?>
|
32 |
+
<?php $showWebsite=false; ?>
|
33 |
+
<?php foreach ($this->getGroupCollection($_website) as $_group): ?>
|
34 |
+
<?php $showGroup=false; ?>
|
35 |
+
<?php foreach ($this->getStoreCollection($_group) as $_store): ?>
|
36 |
+
<?php if ($showWebsite == false): ?>
|
37 |
+
<?php $showWebsite = true; ?>
|
38 |
+
<option website="true" value="<?php echo $_website->getId() ?>"<?php if($this->getRequest()->getParam('website') == $_website->getId()): ?> selected="selected"<?php endif; ?>><?php echo $_website->getName() ?></option>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($showGroup == false): ?>
|
41 |
+
<?php $showGroup = true; ?>
|
42 |
+
<!--optgroup label=" <?php echo $_group->getName() ?>"-->
|
43 |
+
<option group="true" value="<?php echo $_group->getId() ?>"<?php if($this->getRequest()->getParam('group') == $_group->getId()): ?> selected="selected"<?php endif; ?>> <?php echo $_group->getName() ?></option>
|
44 |
+
<?php endif; ?>
|
45 |
+
<option value="<?php echo $_store->getId() ?>"<?php if($this->getStoreId() == $_store->getId()): ?> selected="selected"<?php endif; ?>> <?php echo $_store->getName() ?></option>
|
46 |
+
<?php endforeach; ?>
|
47 |
+
<?php if ($showGroup): ?>
|
48 |
+
<!--</optgroup>-->
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</select>
|
53 |
+
</p>
|
54 |
+
<script type="text/javascript">
|
55 |
+
//<![CDATA[
|
56 |
+
function switchStore(obj){
|
57 |
+
if (obj.options[obj.selectedIndex].getAttribute('website') == 'true') {
|
58 |
+
var selectionType = 'website';
|
59 |
+
} else if (obj.options[obj.selectedIndex].getAttribute('group') == 'true') {
|
60 |
+
var selectionType = 'group';
|
61 |
+
} else {
|
62 |
+
var selectionType = 'store';
|
63 |
+
}
|
64 |
+
var storeParam = obj.value ? selectionType + '/' + obj.value + '/' : '';
|
65 |
+
if(obj.switchParams){
|
66 |
+
storeParam+= obj.switchParams;
|
67 |
+
}
|
68 |
+
if ($('diagram_tab_orders_content').style.display != 'none') {
|
69 |
+
var select = $('order_orders_period');
|
70 |
+
} else if ($('diagram_tab_amounts_content').style.display != 'none') {
|
71 |
+
var select = $('order_amounts_period');
|
72 |
+
}
|
73 |
+
var periodParam = select.value ? 'period/'+select.value + '/' : '';
|
74 |
+
setLocation('<?php echo $this->getSwitchUrl() ?>'+storeParam+periodParam);
|
75 |
+
}
|
76 |
+
//]]>
|
77 |
+
</script>
|
app/design/adminhtml/default/default/template/dashboard/totalbar.phtml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if( sizeof($this->getTotals()) > 0 ): ?>
|
28 |
+
<div class="box" id="dashboard_diagram_totals">
|
29 |
+
<div class="entry-edit">
|
30 |
+
<table cellspacing="0" width="100%">
|
31 |
+
<tr>
|
32 |
+
<?php foreach( $this->getTotals() as $_total ): ?>
|
33 |
+
<td class="a-center bold">
|
34 |
+
<span><?php echo $_total['label'] ?></span><br />
|
35 |
+
<span class="nowrap" style="font-size:18px; color:#EA7601;"><?php echo $_total['value'] ?><span style="font-size:14px; color:#DE8946;"><?php echo $_total['decimals'] ?></span></span>
|
36 |
+
</td>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</tr>
|
39 |
+
</table>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/directory/js/optional_zip_countries.phtml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
/**
|
30 |
+
* JS block for including Countries with Optional Zip
|
31 |
+
*
|
32 |
+
* @see Mage_Adminhtml_Block_Template
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<script type="text/javascript">
|
36 |
+
//<![CDATA[
|
37 |
+
optionalZipCountries = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
38 |
+
|
39 |
+
function onAddressCountryChanged (countryElement) {
|
40 |
+
var zipElementId = countryElement.id.replace(/country_id/, 'postcode');
|
41 |
+
|
42 |
+
// Ajax-request and normal content load compatibility
|
43 |
+
if ($(zipElementId) != undefined) {
|
44 |
+
setPostcodeOptional($(zipElementId), countryElement.value);
|
45 |
+
} else {
|
46 |
+
Event.observe(window, "load", function () {
|
47 |
+
setPostcodeOptional($(zipElementId), countryElement.value);
|
48 |
+
});
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
function setPostcodeOptional(zipElement, country) {
|
53 |
+
if (optionalZipCountries.indexOf(country) != -1) {
|
54 |
+
while (zipElement.hasClassName('required-entry')) {
|
55 |
+
zipElement.removeClassName('required-entry');
|
56 |
+
}
|
57 |
+
zipElement.up(1).down('label > span.required').hide();
|
58 |
+
} else {
|
59 |
+
zipElement.addClassName('required-entry');
|
60 |
+
zipElement.up(1).down('label > span.required').show();
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
varienGlobalEvents.attachEventHandler("address_country_changed", onAddressCountryChanged);
|
65 |
+
//]]>
|
66 |
+
</script>
|
app/design/adminhtml/default/default/template/downloadable/product/composite/fieldset/downloadable.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /* @var $this Mage_Downloadable_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Downloadable */ ?>
|
28 |
+
<?php $_linksPurchasedSeparately = $this->getLinksPurchasedSeparately(); ?>
|
29 |
+
<?php $_skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck(); ?>
|
30 |
+
<?php if (($this->getProduct()->isSaleable() || $_skipSaleableCheck) && $this->hasLinks()):?>
|
31 |
+
|
32 |
+
<div id="catalog_product_composite_configure_fields_downloadable" class="<?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
|
33 |
+
<h4><?php echo Mage::helper('catalog')->__('Downloadable Information') ?></h4>
|
34 |
+
<div class="product-options">
|
35 |
+
<dl>
|
36 |
+
<?php $_links = $this->getLinks(); ?>
|
37 |
+
<?php $_isRequired = $this->getLinkSelectionRequired(); ?>
|
38 |
+
<dt><label<?php if ($_isRequired) echo ' class="required"' ?>><?php if ($_isRequired) echo '<em>*</em>' ?><?php echo $this->getLinksTitle() ?></label></dt>
|
39 |
+
<dd class="last">
|
40 |
+
<ul id="downloadable-links-list" class="options-list">
|
41 |
+
<?php foreach ($_links as $_link): ?>
|
42 |
+
<li>
|
43 |
+
<?php if ($_linksPurchasedSeparately): ?>
|
44 |
+
<input type="checkbox" class="checkbox<?php if ($_isRequired):?> validate-one-required-by-name<?php endif; ?> product-downloadable-link" name="links[]" id="links_<?php echo $_link->getId() ?>" value="<?php echo $_link->getId(); ?>" <?php echo $this->getLinkCheckedValue($_link); ?> price="<?php echo $this->getCurrencyPrice($_link->getPrice()); ?>"/>
|
45 |
+
<?php endif; ?>
|
46 |
+
<span class="label">
|
47 |
+
<label for="links_<?php echo $_link->getId() ?>">
|
48 |
+
<?php echo $this->escapeHtml($_link->getTitle()) ?>
|
49 |
+
</label>
|
50 |
+
<?php if ($_link->getSampleFile() || $_link->getSampleUrl()): ?>
|
51 |
+
(<a href="<?php echo $this->getLinkSamlpeUrl($_link) ?>" <?php echo $this->getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>><?php echo Mage::helper('downloadable')->__('sample') ?></a>)
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if ($_linksPurchasedSeparately): ?>
|
54 |
+
<?php echo $this->getFormattedLinkPrice($_link); ?>
|
55 |
+
<?php endif; ?>
|
56 |
+
</span>
|
57 |
+
<?php if ($_isRequired): ?>
|
58 |
+
<script type="text/javascript">
|
59 |
+
//<![CDATA[
|
60 |
+
$('links_<?php echo $_link->getId() ?>').advaiceContainer = 'links-advice-container';
|
61 |
+
$('links_<?php echo $_link->getId() ?>').callbackFunction = 'validateDownloadableCallback';
|
62 |
+
//]]>
|
63 |
+
</script>
|
64 |
+
<?php endif; ?>
|
65 |
+
</li>
|
66 |
+
<?php endforeach; ?>
|
67 |
+
</ul>
|
68 |
+
|
69 |
+
<?php if ($_isRequired): ?>
|
70 |
+
<span id="links-advice-container"></span>
|
71 |
+
<?php endif;?>
|
72 |
+
</dd>
|
73 |
+
</dl>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
<script type="text/javascript">
|
78 |
+
//<![CDATA[
|
79 |
+
validateDownloadableCallback = function (elmId, result) {
|
80 |
+
var container = $('downloadable-links-list');
|
81 |
+
if (result == 'failed') {
|
82 |
+
container.removeClassName('validation-passed');
|
83 |
+
container.addClassName('validation-failed');
|
84 |
+
} else {
|
85 |
+
container.removeClassName('validation-failed');
|
86 |
+
container.addClassName('validation-passed');
|
87 |
+
}
|
88 |
+
}
|
89 |
+
//]]>
|
90 |
+
</script>
|
91 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable.phtml
ADDED
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
/**
|
30 |
+
* @see Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<script type="text/javascript">
|
34 |
+
//<![CDATA[>
|
35 |
+
|
36 |
+
var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' +
|
37 |
+
'<div id="{{id}}" class="file-row file-row-narrow">' +
|
38 |
+
'<span class="file-info">' +
|
39 |
+
'<span class="file-info-name">{{name}}</span>' +
|
40 |
+
' ' +
|
41 |
+
'<span class="file-info-size">({{size}})</span>' +
|
42 |
+
'</span>' +
|
43 |
+
'<span class="progress-text"></span>' +
|
44 |
+
'<div class="clear"></div>' +
|
45 |
+
'</div>' +
|
46 |
+
'</div>' +
|
47 |
+
'<div class="no-display" id="[[idName]]-template-progress">' +
|
48 |
+
'{{percent}}% {{uploaded}} / {{total}}' +
|
49 |
+
'</div>';
|
50 |
+
|
51 |
+
var fileListTemplate = '<span class="file-info">' +
|
52 |
+
'<span class="file-info-name">{{name}}</span>' +
|
53 |
+
' ' +
|
54 |
+
'<span class="file-info-size">({{size}})</span>' +
|
55 |
+
'</span>';
|
56 |
+
|
57 |
+
var Downloadable = {
|
58 |
+
uploaderObj : $H({}),
|
59 |
+
objCount : 0,
|
60 |
+
setUploaderObj : function(type, key, obj){
|
61 |
+
if (!this.uploaderObj.get(type)) {
|
62 |
+
this.uploaderObj.set(type, $H({}));
|
63 |
+
}
|
64 |
+
this.uploaderObj.get(type).set(key, obj);
|
65 |
+
},
|
66 |
+
getUploaderObj : function(type, key){
|
67 |
+
try {
|
68 |
+
return this.uploaderObj.get(type).get(key);
|
69 |
+
} catch (e) {
|
70 |
+
try {
|
71 |
+
console.log(e);
|
72 |
+
} catch (e2) {
|
73 |
+
alert(e.name + '\n' + e.message);
|
74 |
+
}
|
75 |
+
}
|
76 |
+
},
|
77 |
+
unsetUploaderObj : function(type, key){
|
78 |
+
try {
|
79 |
+
this.uploaderObj.get(type).unset(key);
|
80 |
+
} catch (e) {
|
81 |
+
try {
|
82 |
+
console.log(e);
|
83 |
+
} catch (e2) {
|
84 |
+
alert(e.name + '\n' + e.message);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
},
|
88 |
+
massUploadByType : function(type){
|
89 |
+
try {
|
90 |
+
this.uploaderObj.get(type).each(function(item){
|
91 |
+
container = item.value.container.up('tr');
|
92 |
+
if (container.visible() && !container.hasClassName('no-display')) {
|
93 |
+
item.value.upload();
|
94 |
+
} else {
|
95 |
+
Downloadable.unsetUploaderObj(type, item.key);
|
96 |
+
}
|
97 |
+
});
|
98 |
+
} catch (e) {
|
99 |
+
try {
|
100 |
+
console.log(e);
|
101 |
+
} catch (e2) {
|
102 |
+
alert(e.name + '\n' + e.message);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
};
|
107 |
+
|
108 |
+
Downloadable.FileUploader = Class.create();
|
109 |
+
Downloadable.FileUploader.prototype = {
|
110 |
+
type : null,
|
111 |
+
key : null, //key, identifier of uploader obj
|
112 |
+
elmContainer : null, //insert Flex object and templates to elmContainer
|
113 |
+
fileValueName : null, //name of field of JSON data of saved file
|
114 |
+
fileValue : null,
|
115 |
+
idName : null, //id name of elements for unique uploader
|
116 |
+
uploaderText: uploaderTemplate,
|
117 |
+
uploaderSyntax : /(^|.|\r|\n)(\[\[(\w+)\]\])/,
|
118 |
+
uploaderObj : $H({}),
|
119 |
+
config : null,
|
120 |
+
initialize: function (type, key, elmContainer, fileValueName, fileValue ,idName, config) {
|
121 |
+
this.type = type;
|
122 |
+
this.key = key;
|
123 |
+
this.elmContainer = elmContainer;
|
124 |
+
this.fileValueName = fileValueName;
|
125 |
+
this.fileValue = fileValue;
|
126 |
+
this.idName = idName;
|
127 |
+
this.config = config;
|
128 |
+
uploaderTemplate = new Template(this.uploaderText, this.uploaderSyntax);
|
129 |
+
<?php if (!$this->isReadonly()):?>
|
130 |
+
Element.insert(
|
131 |
+
elmContainer,
|
132 |
+
{'top' : uploaderTemplate.evaluate({
|
133 |
+
'idName' : this.idName,
|
134 |
+
'fileValueName' : this.fileValueName,
|
135 |
+
'uploaderObj' : 'Downloadable.getUploaderObj(\''+this.type+'\', \''+this.key+'\')'
|
136 |
+
})
|
137 |
+
}
|
138 |
+
);
|
139 |
+
if ($(this.idName+'_save')) {
|
140 |
+
$(this.idName+'_save').value = this.fileValue.toJSON
|
141 |
+
? this.fileValue.toJSON()
|
142 |
+
: Object.toJSON(this.fileValue);
|
143 |
+
}
|
144 |
+
Downloadable.setUploaderObj(
|
145 |
+
this.type,
|
146 |
+
this.key,
|
147 |
+
new Flex.Uploader(this.idName, '<?php echo $this->getSkinUrl('media/uploaderSingle.swf') ?>', this.config)
|
148 |
+
);
|
149 |
+
if (varienGlobalEvents) {
|
150 |
+
varienGlobalEvents.attachEventHandler('tabChangeBefore', Downloadable.getUploaderObj(type, key).onContainerHideBefore);
|
151 |
+
}
|
152 |
+
new Downloadable.FileList(this.idName, Downloadable.getUploaderObj(type, key));
|
153 |
+
<?php endif;?>
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
Downloadable.FileList = Class.create();
|
158 |
+
Downloadable.FileList.prototype = {
|
159 |
+
file: [],
|
160 |
+
containerId: '',
|
161 |
+
container: null,
|
162 |
+
uploader: null,
|
163 |
+
fileListTemplate: fileListTemplate,
|
164 |
+
templatePattern : /(^|.|\r|\n)({{(\w+)}})/,
|
165 |
+
listTemplate : null,
|
166 |
+
initialize: function (containerId, uploader) {
|
167 |
+
this.containerId = containerId,
|
168 |
+
this.container = $(this.containerId);
|
169 |
+
this.uploader = uploader;
|
170 |
+
this.uploader.onFilesComplete = this.handleUploadComplete.bind(this);
|
171 |
+
this.file = this.getElement('save').value.evalJSON();
|
172 |
+
this.listTemplate = new Template(this.fileListTemplate, this.templatePattern);
|
173 |
+
this.updateFiles();
|
174 |
+
this.uploader.onFileRemoveAll = this.handleFileRemoveAll.bind(this);
|
175 |
+
this.uploader.onFileSelect = this.handleFileSelect.bind(this);
|
176 |
+
},
|
177 |
+
handleFileRemoveAll: function(fileId) {
|
178 |
+
$(this.containerId+'-new').hide();
|
179 |
+
$(this.containerId+'-old').show();
|
180 |
+
},
|
181 |
+
handleFileSelect: function() {
|
182 |
+
$(this.containerId+'_type').checked = true;
|
183 |
+
},
|
184 |
+
getElement: function (name) {
|
185 |
+
return $(this.containerId + '_' + name);
|
186 |
+
},
|
187 |
+
handleUploadComplete: function (files) {
|
188 |
+
files.each(function(item) {
|
189 |
+
if (!item.response.isJSON()) {
|
190 |
+
try {
|
191 |
+
console.log(item.response);
|
192 |
+
} catch (e2) {
|
193 |
+
alert(item.response);
|
194 |
+
}
|
195 |
+
return;
|
196 |
+
}
|
197 |
+
var response = item.response.evalJSON();
|
198 |
+
if (response.error) {
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
var newFile = {};
|
202 |
+
newFile.file = response.file;
|
203 |
+
newFile.name = response.name;
|
204 |
+
newFile.size = response.size;
|
205 |
+
newFile.status = 'new';
|
206 |
+
this.file[0] = newFile;
|
207 |
+
this.uploader.removeFile(item.id);
|
208 |
+
}.bind(this));
|
209 |
+
this.updateFiles();
|
210 |
+
},
|
211 |
+
updateFiles: function() {
|
212 |
+
this.getElement('save').value = this.file.toJSON
|
213 |
+
? this.file.toJSON()
|
214 |
+
: Object.toJSON(this.file);
|
215 |
+
this.file.each(function(row){
|
216 |
+
row.size = this.uploader.formatSize(row.size);
|
217 |
+
$(this.containerId + '-old').innerHTML = this.listTemplate.evaluate(row);
|
218 |
+
$(this.containerId + '-new').hide();
|
219 |
+
$(this.containerId + '-old').show();
|
220 |
+
}.bind(this));
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
var alertAlreadyDisplayed = false;
|
225 |
+
|
226 |
+
Validation.addAllThese([
|
227 |
+
['validate-downloadable-file', 'Please upload a file.', function(v,element) {
|
228 |
+
linkType = element.up(0).down('input[value="file"]');
|
229 |
+
if (linkType.checked && (v == '' || v == '[]')) {
|
230 |
+
newFileContainer = element.up(0).down('div.new-file');
|
231 |
+
if (!alertAlreadyDisplayed && (newFileContainer.empty() || newFileContainer.style.display != 'none')) {
|
232 |
+
alertAlreadyDisplayed = true;
|
233 |
+
alert('<?php echo $this->jsQuoteEscape($this->__('There are files that were selected but not uploaded yet. Please upload or remove them first'));?>');
|
234 |
+
}
|
235 |
+
return false;
|
236 |
+
}
|
237 |
+
return true;
|
238 |
+
}]
|
239 |
+
]);
|
240 |
+
|
241 |
+
Validation.addAllThese([
|
242 |
+
['validate-downloadable-url', 'Please specify Url.', function(v,element) {
|
243 |
+
linkType = element.up(0).down('input[value="url"]');
|
244 |
+
if (linkType.checked && v == '') {
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
return true;
|
248 |
+
}]
|
249 |
+
]);
|
250 |
+
//]]>
|
251 |
+
</script>
|
252 |
+
|
253 |
+
<div id="alert_messages_block"><?php echo $this->getMessageHtml() ?></div>
|
254 |
+
|
255 |
+
<div class="entry-edit">
|
256 |
+
<?php echo $this->getChildHtml('accordion') ?>
|
257 |
+
</div>
|
258 |
+
<div style="display:none">
|
259 |
+
<div id="custom-advice-container"></div>
|
260 |
+
</div>
|
261 |
+
<?php if ($this->isReadonly()): ?>
|
262 |
+
<script type="text/javascript">
|
263 |
+
$('downloadableInfo').select('input', 'select', 'textarea', 'button').each(function (item){
|
264 |
+
item.disabled = true;
|
265 |
+
if (item.tagName.toLowerCase() == 'button') {
|
266 |
+
item.addClassName('disabled');
|
267 |
+
}
|
268 |
+
});
|
269 |
+
</script>
|
270 |
+
<?php endif; ?>
|
271 |
+
<!--
|
272 |
+
<div><input type="hidden" name="affect_downloadable_information" value="1" /></div>
|
273 |
+
-->
|
app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/links.phtml
ADDED
@@ -0,0 +1,388 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @see Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php $_product = $this->getProduct()?>
|
34 |
+
<div class="fieldset">
|
35 |
+
<table cellspacing="0" class="form-list">
|
36 |
+
<tbody>
|
37 |
+
<tr class="headings">
|
38 |
+
<td class="label"><label for="name"><?php echo Mage::helper('downloadable')->__('Title')?></label>
|
39 |
+
</td>
|
40 |
+
<td class="value">
|
41 |
+
<input type="text" class="input-text" id="downloadable_links_title" name="product[links_title]" value="<?php echo $_product->getId()?$_product->getLinksTitle():$this->getLinksTitle() ?>" <?php echo ($_product->getStoreId() && $this->getUsedDefault())?'disabled="disabled"':'' ?> />
|
42 |
+
</td>
|
43 |
+
<td class="scope-label"><?php echo !Mage::app()->isSingleStoreMode() ? Mage::helper('adminhtml')->__('[STORE VIEW]') : ''; ?></td>
|
44 |
+
<td class="value use-default">
|
45 |
+
<?php if($_product->getStoreId()): ?>
|
46 |
+
<input id="link_title_default" type="checkbox" name="use_default[]" value="links_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $this->getUsedDefault()?'checked="checked"':'' ?> />
|
47 |
+
<label class="normal" for="link_title_default"><?php echo Mage::helper('downloadable')->__('Use Default Value'); ?></label>
|
48 |
+
<?php endif; ?>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</tbody>
|
52 |
+
</table>
|
53 |
+
<br />
|
54 |
+
<table cellspacing="0" class="form-list">
|
55 |
+
<tbody>
|
56 |
+
<tr class="headings">
|
57 |
+
<td class="label"><label for="name"><?php echo Mage::helper('downloadable')->__('Links can be purchased separately')?></label>
|
58 |
+
</td>
|
59 |
+
<td class="value">
|
60 |
+
<?php echo $this->getPurchasedSeparatelySelect()?>
|
61 |
+
</td>
|
62 |
+
<td class="scope-label"><?php echo !Mage::app()->isSingleStoreMode() ? Mage::helper('adminhtml')->__('[GLOBAL]') : ''; ?></td>
|
63 |
+
<td><small> </small></td>
|
64 |
+
</tr>
|
65 |
+
</tbody>
|
66 |
+
</table>
|
67 |
+
<br />
|
68 |
+
<div class="grid">
|
69 |
+
<div class="hor-scroll">
|
70 |
+
<table cellspacing="0" class="data border">
|
71 |
+
<col width="33%" />
|
72 |
+
<col />
|
73 |
+
<col />
|
74 |
+
<col />
|
75 |
+
<col width="1" />
|
76 |
+
<col width="1" />
|
77 |
+
<col width="1" />
|
78 |
+
<col width="1" />
|
79 |
+
<thead>
|
80 |
+
<tr class="headings">
|
81 |
+
<th><?php echo Mage::helper('downloadable')->__('Title')?> <span class="required">*</span></th>
|
82 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
83 |
+
<th><?php echo Mage::helper('downloadable')->__('Price')?></th>
|
84 |
+
<?php endif; ?>
|
85 |
+
<th><span class="nobr"><?php echo Mage::helper('downloadable')->__('Max. Downloads')?></span></th>
|
86 |
+
<th><?php echo Mage::helper('downloadable')->__('Shareable')?></th>
|
87 |
+
<th><?php echo Mage::helper('downloadable')->__('Sample')?></th>
|
88 |
+
<th><?php echo Mage::helper('downloadable')->__('File')?></th>
|
89 |
+
<th><span class="nobr"><?php echo Mage::helper('downloadable')->__('Sort Order')?></span></th>
|
90 |
+
<th> </th>
|
91 |
+
</tr>
|
92 |
+
</thead>
|
93 |
+
<tfoot>
|
94 |
+
<tr>
|
95 |
+
<td colspan="8" class="a-right"><?php echo $this->getAddButtonHtml()?> <?php echo $this->getUploadButtonHtml() ?></td>
|
96 |
+
</tr>
|
97 |
+
</tfoot>
|
98 |
+
<tbody id="link_items_body">
|
99 |
+
</tbody>
|
100 |
+
</table>
|
101 |
+
<div><small><?php echo Mage::helper('downloadable')->__('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></small></div>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<script type="text/javascript">
|
107 |
+
//<![CDATA[
|
108 |
+
var linkTemplate = '<tr>'+
|
109 |
+
'<td>'+
|
110 |
+
'<input type="hidden" class="__delete__" name="downloadable[link][{{id}}][is_delete]" value="" />'+
|
111 |
+
'<input type="hidden" name="downloadable[link][{{id}}][link_id]" value="{{link_id}}" />'+
|
112 |
+
'<input type="text" class="required-entry input-text" name="downloadable[link][{{id}}][title]" value="{{title}}" />'+
|
113 |
+
'<?php echo $_product->getStoreId()?'<input type="checkbox" id="downloadable_link_{{id}}_title" name="downloadable[link][{{id}}][use_default_title]" value="1" /><label class="normal" for="downloadable_link_{{id}}_title">Use Default Value</label>':'' ?>'+
|
114 |
+
'</td>'+
|
115 |
+
<?php if ($this->getCanReadPrice() !== false) : ?>
|
116 |
+
'<td class="input-price">'+
|
117 |
+
'<input type="text" id="downloadable_link_{{id}}_price_value" class="input-text validate-number link-prices<?php if ($this->getCanEditPrice() === false) : ?> disabled<?php endif; ?>" name="downloadable[link][{{id}}][price]" value="{{price}}"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> ' +
|
118 |
+
'<label>[<?php echo Mage::app()->getStore($_product->getStoreId())->getBaseCurrencyCode() ?>]</label>' +
|
119 |
+
<?php if ($_product->getStoreId() && $this->getIsPriceWebsiteScope()) : ?>
|
120 |
+
'<br /><input type="checkbox" id="downloadable_link_{{id}}_price" name="downloadable[link][{{id}}][use_default_price]" value="1"<?php if ($this->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> <label for="downloadable_link_{{id}}_price">Use Default Value</label>' +
|
121 |
+
<?php endif; ?>
|
122 |
+
'</td>' +
|
123 |
+
<?php else : ?>
|
124 |
+
'<input type="hidden" id="downloadable_link_{{id}}_price_value" class="link-prices" name="downloadable[link][{{id}}][price]" value="0" />' +
|
125 |
+
<?php if ($_product->getStoreId() && $this->getIsPriceWebsiteScope()) : ?>
|
126 |
+
'<input type="hidden" id="downloadable_link_{{id}}_price" name="downloadable[link][{{id}}][use_default_price]" value="1" />' +
|
127 |
+
<?php endif; ?>
|
128 |
+
<?php endif; ?>
|
129 |
+
'<td><input type="text" id="downloadable_link_{{id}}_downloads" name="downloadable[link][{{id}}][number_of_downloads]" class="input-text downloads" value="{{number_of_downloads}}" />'+
|
130 |
+
'<p><input type="checkbox" class="checkbox" id="downloadable_link_{{id}}_is_unlimited" name="downloadable[link][{{id}}][is_unlimited]" value="1" {{is_unlimited}} /> <label for="downloadable_link_{{id}}_is_unlimited">Unlimited</label></p></td>'+
|
131 |
+
'<td class="a-center">'+
|
132 |
+
'<select id="downloadable_link _{{id}}_shareable" name="downloadable[link][{{id}}][is_shareable]">'+
|
133 |
+
'<option value="1">Yes</option>'+
|
134 |
+
'<option value="0">No</option>'+
|
135 |
+
'<option value="2" selected="selected">Use config</option>'+
|
136 |
+
'</select>'+
|
137 |
+
'</td>'+
|
138 |
+
'<td>'+
|
139 |
+
'<div class="files">'+
|
140 |
+
'<div class="row">'+
|
141 |
+
'<label for="downloadable_link_{{id}}_sample_file_type"><input type="radio" class="radio" id="downloadable_link_{{id}}_sample_file_type" name="downloadable[link][{{id}}][sample][type]" value="file"{{sample_file_checked}} /> File:</label>'+
|
142 |
+
'<input type="hidden" id="downloadable_link_{{id}}_sample_file_save" name="downloadable[link][{{id}}][sample][file]" value="{{sample_file_save}}" />'+
|
143 |
+
'<div id="downloadable_link_{{id}}_sample_file" class="uploader">'+
|
144 |
+
'<div id="downloadable_link_{{id}}_sample_file-old" class="file-row-info"></div>'+
|
145 |
+
'<div id="downloadable_link_{{id}}_sample_file-new" class="file-row-info"></div>'+
|
146 |
+
'<div class="buttons">'+
|
147 |
+
'<div id="downloadable_link_{{id}}_sample_file-install-flash" style="display:none">'+
|
148 |
+
'<?php echo $this->jsQuoteEscape(Mage::helper('media')->__('This content requires last version of Adobe Flash Player. <a href="%s">Get Flash</a>', 'http://www.adobe.com/go/getflash/')) ?>'+
|
149 |
+
'</div>'+
|
150 |
+
'</div>'+
|
151 |
+
'<div class="clear"></div>'+
|
152 |
+
'</div>'+
|
153 |
+
'</div>'+
|
154 |
+
'<div class="row">'+
|
155 |
+
'<label for="downloadable_link_{{id}}_sample_url_type"><input type="radio" class="radio" id="downloadable_link_{{id}}_sample_url_type" name="downloadable[link][{{id}}][sample][type]" value="url"{{sample_url_checked}} /> URL:</label><input type="text" class="input-text" name="downloadable[link][{{id}}][sample][url]" value="{{sample_url}}" />'+
|
156 |
+
'</div>'+
|
157 |
+
'<div>'+
|
158 |
+
'<span id="downloadable_link_{{id}}_sample_container"></span>'+
|
159 |
+
'</div>'+
|
160 |
+
'</div>'+
|
161 |
+
'</td>'+
|
162 |
+
'<td>'+
|
163 |
+
'<div class="files">'+
|
164 |
+
'<div class="row">'+
|
165 |
+
'<label for="downloadable_link_{{id}}_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_{{id}}_file_type" name="downloadable[link][{{id}}][type]" value="file"{{file_checked}} /> File:</label>'+
|
166 |
+
'<input type="hidden" class="validate-downloadable-file" id="downloadable_link_{{id}}_file_save" name="downloadable[link][{{id}}][file]" value="{{file_save}}" />'+
|
167 |
+
'<div id="downloadable_link_{{id}}_file" class="uploader">'+
|
168 |
+
'<div id="downloadable_link_{{id}}_file-old" class="file-row-info"></div>'+
|
169 |
+
'<div id="downloadable_link_{{id}}_file-new" class="file-row-info new-file"></div>'+
|
170 |
+
'<div class="buttons">'+
|
171 |
+
'<div id="downloadable_link_{{id}}_file-install-flash" style="display:none">'+
|
172 |
+
'<?php echo $this->jsQuoteEscape(Mage::helper('media')->__('This content requires last version of Adobe Flash Player. <a href="%s">Get Flash</a>', 'http://www.adobe.com/go/getflash/')) ?>'+
|
173 |
+
'</div>'+
|
174 |
+
'</div>'+
|
175 |
+
'<div class="clear"></div>'+
|
176 |
+
'</div>'+
|
177 |
+
'</div>'+
|
178 |
+
'<div class="row">'+
|
179 |
+
'<label for="downloadable_link_{{id}}_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_{{id}}_url_type" name="downloadable[link][{{id}}][type]" value="url"{{url_checked}} /> URL:</label><input type="text" class="validate-downloadable-url input-text" name="downloadable[link][{{id}}][link_url]" value="{{link_url}}" />'+
|
180 |
+
'</div>'+
|
181 |
+
'<div>'+
|
182 |
+
'<span id="downloadable_link_{{id}}_link_container"></span>'+
|
183 |
+
'</div>'+
|
184 |
+
'</div>'+
|
185 |
+
'</td>'+
|
186 |
+
'<td class="a-center"><input type="text" name="downloadable[link][{{id}}][sort_order]" value="{{sort_order}}" class="input-text sort" /></td>'+
|
187 |
+
'<td>'+
|
188 |
+
'<button id="downloadable_link_{{id}}_delete_button" type="button" class="scalable delete icon-btn delete-link-item"><span><span><span><?php echo Mage::helper('downloadable')->__('Delete'); ?></span></span></span></button>'+
|
189 |
+
'</td>'+
|
190 |
+
'</tr>';
|
191 |
+
|
192 |
+
var linkItems = {
|
193 |
+
tbody : $('link_items_body'),
|
194 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
195 |
+
templateText : linkTemplate,
|
196 |
+
itemCount : 0,
|
197 |
+
add : function(data) {
|
198 |
+
alertAlreadyDisplayed = false;
|
199 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
200 |
+
|
201 |
+
if(!data.link_id){
|
202 |
+
data = {};
|
203 |
+
data.link_id = 0;
|
204 |
+
data.link_type = 'file';
|
205 |
+
data.sample_type = 'none';
|
206 |
+
data.number_of_downloads = '<?php echo $this->getConfigMaxDownloads() ?>';
|
207 |
+
}
|
208 |
+
|
209 |
+
data.id = this.itemCount;
|
210 |
+
|
211 |
+
if (data.link_type == 'url') {
|
212 |
+
data.url_checked = ' checked="checked"';
|
213 |
+
} else if (data.link_type == 'file') {
|
214 |
+
data.file_checked = ' checked="checked"';
|
215 |
+
}
|
216 |
+
if (data.sample_type == 'url') {
|
217 |
+
data.sample_url_checked = ' checked="checked"';
|
218 |
+
} else if (data.sample_type == 'file') {
|
219 |
+
data.sample_file_checked = ' checked="checked"';
|
220 |
+
}
|
221 |
+
|
222 |
+
Element.insert(this.tbody, {'bottom':this.template.evaluate(data)});
|
223 |
+
|
224 |
+
scopeTitle = $('downloadable_link_'+data.id+'_title');
|
225 |
+
if (scopeTitle) {
|
226 |
+
Event.observe(scopeTitle, 'click', function(event){
|
227 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
228 |
+
titleField = scopeElm.up(0).down('input[type="text"]');
|
229 |
+
if (scopeElm.checked == true) {
|
230 |
+
titleField.disabled = true;
|
231 |
+
} else {
|
232 |
+
titleField.disabled = false;
|
233 |
+
}
|
234 |
+
});
|
235 |
+
}
|
236 |
+
if (!data.store_title && scopeTitle) {
|
237 |
+
scopeTitle.up(0).down('input[type="text"]').disabled = true;
|
238 |
+
scopeTitle.checked = true;
|
239 |
+
}
|
240 |
+
|
241 |
+
scopePrice = $('downloadable_link_'+data.id+'_price');
|
242 |
+
if (scopePrice) {
|
243 |
+
Event.observe(scopePrice, 'click', function(event){
|
244 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
245 |
+
priceField = scopeElm.up(0).down('input[type="text"]');
|
246 |
+
if (scopeElm.checked == true) {
|
247 |
+
priceField.disabled = true;
|
248 |
+
} else {
|
249 |
+
priceField.disabled = false;
|
250 |
+
}
|
251 |
+
});
|
252 |
+
}
|
253 |
+
if (!data.website_price && scopePrice) {
|
254 |
+
scopePrice.up(0).down('input[type="text"]').disabled = true;
|
255 |
+
scopePrice.checked = true;
|
256 |
+
}
|
257 |
+
downloadsElm = $('downloadable_link_'+data.id+'_downloads');
|
258 |
+
isUnlimitedElm = $('downloadable_link_'+data.id+'_is_unlimited');
|
259 |
+
if (data.is_unlimited) {
|
260 |
+
downloadsElm.disabled = true;
|
261 |
+
}
|
262 |
+
Event.observe(isUnlimitedElm, 'click', function(event){
|
263 |
+
elm = Event.element(event);
|
264 |
+
elm.up('td').down('input[type="text"].downloads').disabled = elm.checked;
|
265 |
+
});
|
266 |
+
|
267 |
+
if (data.is_shareable) {
|
268 |
+
options = $('downloadable_link _'+data.id+'_shareable').options;
|
269 |
+
for (var i=0; i < options.length; i++) {
|
270 |
+
if (options[i].value == data.is_shareable) {
|
271 |
+
options[i].selected = true;
|
272 |
+
}
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
sampleUrl = $('downloadable_link_'+data.id+'_sample_url_type');
|
277 |
+
linkUrl = $('downloadable_link_'+data.id+'_url_type');
|
278 |
+
|
279 |
+
if (!data.file_save) {
|
280 |
+
data.file_save = [];
|
281 |
+
}
|
282 |
+
if (!data.sample_file_save) {
|
283 |
+
data.sample_file_save = [];
|
284 |
+
}
|
285 |
+
|
286 |
+
// link sample file
|
287 |
+
new Downloadable.FileUploader(
|
288 |
+
'linkssample',
|
289 |
+
'linkssample_'+data.id,
|
290 |
+
sampleUrl.up('td'),
|
291 |
+
'downloadable[link]['+data.id+'][sample]',
|
292 |
+
data.sample_file_save,
|
293 |
+
'downloadable_link_'+data.id+'_sample_file',
|
294 |
+
<?php echo $this->getConfigJson('link_samples') ?>
|
295 |
+
);
|
296 |
+
// link file
|
297 |
+
new Downloadable.FileUploader(
|
298 |
+
'links',
|
299 |
+
'links_'+data.id,
|
300 |
+
linkUrl.up('td'),
|
301 |
+
'downloadable[link]['+data.id+']',
|
302 |
+
data.file_save,
|
303 |
+
'downloadable_link_'+data.id+'_file',
|
304 |
+
<?php echo $this->getConfigJson() ?>
|
305 |
+
);
|
306 |
+
|
307 |
+
linkFile = $('downloadable_link_'+data.id+'_file_type');
|
308 |
+
linkFile.advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
309 |
+
linkUrl.advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
310 |
+
$('downloadable_link_'+data.id+'_file_save').advaiceContainer = 'downloadable_link_'+data.id+'_link_container';
|
311 |
+
|
312 |
+
sampleFile = $('downloadable_link_'+data.id+'_sample_file_type');
|
313 |
+
|
314 |
+
this.itemCount++;
|
315 |
+
this.togglePriceFields();
|
316 |
+
this.bindRemoveButtons();
|
317 |
+
},
|
318 |
+
remove : function(event){
|
319 |
+
var element = $(Event.findElement(event, 'tr'));
|
320 |
+
alertAlreadyDisplayed = false;
|
321 |
+
if(element){
|
322 |
+
element.down('input[type="hidden"].__delete__').value = '1';
|
323 |
+
Element.select(element, 'div.flex').each(function(elm){
|
324 |
+
elm.remove();
|
325 |
+
});
|
326 |
+
element.addClassName('no-display');
|
327 |
+
element.addClassName('ignore-validate');
|
328 |
+
element.hide();
|
329 |
+
}
|
330 |
+
},
|
331 |
+
bindRemoveButtons : function(){
|
332 |
+
var buttons = $$('tbody#link_items_body .delete-link-item');
|
333 |
+
for(var i=0;i<buttons.length;i++){
|
334 |
+
if(!$(buttons[i]).binded && !$(buttons[i]).hasClassName('disabled')){
|
335 |
+
$(buttons[i]).binded = true;
|
336 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
337 |
+
}
|
338 |
+
}
|
339 |
+
},
|
340 |
+
togglePriceFields : function(){
|
341 |
+
var toogleTo = $('downloadable_link_purchase_type').value;
|
342 |
+
var disableFlag = true;
|
343 |
+
if (toogleTo == '1') {
|
344 |
+
disableFlag = false;
|
345 |
+
}
|
346 |
+
$$('.link-prices[type="text"]').each(function(elm){
|
347 |
+
var flag = disableFlag;
|
348 |
+
if (elm.hasClassName('disabled')) {
|
349 |
+
flag = true;
|
350 |
+
}
|
351 |
+
elm.disabled = flag;
|
352 |
+
});
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
linkItems.bindRemoveButtons();
|
357 |
+
|
358 |
+
if ($('downloadable_link_purchase_type')) {
|
359 |
+
Event.observe('downloadable_link_purchase_type', 'change', linkItems.togglePriceFields.bind());
|
360 |
+
}
|
361 |
+
|
362 |
+
if($('add_link_item')) {
|
363 |
+
Event.observe('add_link_item', 'click', linkItems.add.bind(linkItems));
|
364 |
+
}
|
365 |
+
|
366 |
+
<?php foreach ($this->getLinkData() as $item): ?>
|
367 |
+
linkItems.add(<?php echo $item->toJson()?>);
|
368 |
+
<?php endforeach; ?>
|
369 |
+
|
370 |
+
Validation.addAllThese([
|
371 |
+
['validate-downloadable-link-sample-file', 'Please specify File.', function(v,element) {
|
372 |
+
fileSaveElm = element.up('div').next('input[type="hidden"]');
|
373 |
+
if (element.checked && (fileSaveElm.value == '' || fileSaveElm.value == '[]')) {
|
374 |
+
return false;
|
375 |
+
}
|
376 |
+
return true;
|
377 |
+
}]
|
378 |
+
]);
|
379 |
+
Validation.addAllThese([
|
380 |
+
['validate-downloadable-link-sample-url', 'Please specify Sample URL.', function(v,element) {
|
381 |
+
if (element.checked && element.up('p').down('input[type="text"]').value == '') {
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
return true;
|
385 |
+
}]
|
386 |
+
]);
|
387 |
+
//]]>
|
388 |
+
</script>
|
app/design/adminhtml/default/default/template/downloadable/product/edit/downloadable/samples.phtml
ADDED
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Samples
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_product = $this->getProduct() ?>
|
34 |
+
<div class="fieldset">
|
35 |
+
<table cellspacing="0" class="form-list">
|
36 |
+
<tbody>
|
37 |
+
<tr class="headings">
|
38 |
+
<td class="label"><label for="name"><?php echo Mage::helper('downloadable')->__('Title')?></label>
|
39 |
+
</td>
|
40 |
+
<td class="value">
|
41 |
+
<input type="text" class="input-text" name="product[samples_title]" value="<?php echo $_product->getId()?$_product->getSamplesTitle():$this->getSamplesTitle() ?>" <?php echo ($_product->getStoreId() && $this->getUsedDefault())?'disabled="disabled"':'' ?> />
|
42 |
+
</td>
|
43 |
+
<td class="scope-label"><?php echo !Mage::app()->isSingleStoreMode() ? Mage::helper('adminhtml')->__('[STORE VIEW]') : ''; ?></td>
|
44 |
+
<td class="value use-default">
|
45 |
+
<?php if($_product->getStoreId()): ?>
|
46 |
+
<input id="sample_title_default" type="checkbox" name="use_default[]" value="samples_title" onclick="toggleValueElements(this, this.parentNode.parentNode)" <?php echo $this->getUsedDefault()?'checked="checked"':'' ?> />
|
47 |
+
<label class="normal" for="sample_title_default">Use Default Value</label>
|
48 |
+
<?php endif; ?>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</tbody>
|
52 |
+
</table>
|
53 |
+
<br />
|
54 |
+
<div class="grid">
|
55 |
+
<div class="hor-scroll">
|
56 |
+
<table cellspacing="0" class="data border">
|
57 |
+
<col />
|
58 |
+
<col width="1" />
|
59 |
+
<col width="1" />
|
60 |
+
<col width="1" />
|
61 |
+
<thead>
|
62 |
+
<tr class="headings">
|
63 |
+
<th><?php echo Mage::helper('downloadable')->__('Title') ?> <span class="required">*</span></th>
|
64 |
+
<th><?php echo Mage::helper('downloadable')->__('File') ?></th>
|
65 |
+
<th><span class="nobr"><?php echo Mage::helper('downloadable')->__('Sort Order') ?></span></th>
|
66 |
+
<th> </th>
|
67 |
+
</tr>
|
68 |
+
</thead>
|
69 |
+
<tfoot>
|
70 |
+
<tr>
|
71 |
+
<td colspan="4" class="a-right"><?php echo $this->getAddButtonHtml() ?> <?php echo $this->getUploadButtonHtml() ?></td>
|
72 |
+
</tr>
|
73 |
+
</tfoot>
|
74 |
+
<tbody id="sample_items_body">
|
75 |
+
</tbody>
|
76 |
+
</table>
|
77 |
+
<div><small><?php echo Mage::helper('downloadable')->__('Alphanumeric, dash and underscore characters are recommended for filenames. Improper characters are replaced with \'_\'.')?></small></div>
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
<script type="text/javascript">
|
82 |
+
//<![CDATA[>
|
83 |
+
var sampleTemplate = '<tr>'+
|
84 |
+
'<td>'+
|
85 |
+
'<input type="hidden" class="__delete__" name="downloadable[sample][{{id}}][is_delete]" value="" />'+
|
86 |
+
'<input type="hidden" name="downloadable[sample][{{id}}][sample_id]" value="{{sample_id}}" />'+
|
87 |
+
'<input type="text" class="required-entry input-text" name="downloadable[sample][{{id}}][title]" value="{{title}}" />'+
|
88 |
+
'<?php echo $_product->getStoreId()?'<br /><input type="checkbox" id="downloadable_sample_{{id}}_title" name="downloadable[sample][{{id}}][use_default_title]" value="1" /><label class="normal" for="downloadable_sample_{{id}}_title">Use Default Value</label>':'' ?>'+
|
89 |
+
'</td>'+
|
90 |
+
'<td>'+
|
91 |
+
'<div class="files-wide">'+
|
92 |
+
'<div class="row">'+
|
93 |
+
'<label for="downloadable_sample_{{id}}_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_{{id}}_file_type" name="downloadable[sample][{{id}}][type]" value="file"{{file_checked}} /> File:</label>'+
|
94 |
+
'<input type="hidden" class="validate-downloadable-file" id="downloadable_sample_{{id}}_file_save" name="downloadable[sample][{{id}}][file]" value="{{file_save}}" />'+
|
95 |
+
'<div id="downloadable_sample_{{id}}_file" class="uploader">'+
|
96 |
+
'<div id="downloadable_sample_{{id}}_file-old" class="file-row-info"></div>'+
|
97 |
+
'<div id="downloadable_sample_{{id}}_file-new" class="file-row-info new-file"></div>'+
|
98 |
+
'<div class="buttons">'+
|
99 |
+
'<div id="downloadable_sample_{{id}}_file-install-flash" style="display:none">'+
|
100 |
+
'<?php echo $this->jsQuoteEscape(Mage::helper('media')->__('This content requires last version of Adobe Flash Player. <a href="%s">Get Flash</a>', 'http://www.adobe.com/go/getflash/')) ?>'+
|
101 |
+
'</div>'+
|
102 |
+
'</div>'+
|
103 |
+
'<div class="clear"></div>'+
|
104 |
+
'</div>'+
|
105 |
+
'</div>'+
|
106 |
+
'<div class="row">'+
|
107 |
+
'<label for="downloadable_sample_{{id}}_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_{{id}}_url_type" name="downloadable[sample][{{id}}][type]" value="url"{{url_checked}} /> URL:</label> <input type="text" class="validate-downloadable-url input-text" name="downloadable[sample][{{id}}][sample_url]" value="{{sample_url}}" />'+
|
108 |
+
'</div>'+
|
109 |
+
'<div>'+
|
110 |
+
'<span id="downloadable_sample_{{id}}_container"></span>'+
|
111 |
+
'</div>'+
|
112 |
+
'</div>'+
|
113 |
+
|
114 |
+
'</td>'+
|
115 |
+
'<td class="a-center"><input type="text" name="downloadable[sample][{{id}}][sort_order]" value="{{sort_order}}" class="input-text sort" /></td>'+
|
116 |
+
'<td>'+
|
117 |
+
'<button type="button" class="scalable delete icon-btn delete-sample-item"><span><span><span>Delete</span></span></span></button>'+
|
118 |
+
'</td>'+
|
119 |
+
'</tr>';
|
120 |
+
var sampleItems = {
|
121 |
+
tbody : $('sample_items_body'),
|
122 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
123 |
+
templateText : sampleTemplate,
|
124 |
+
itemCount : 0,
|
125 |
+
add : function(data) {
|
126 |
+
alertAlreadyDisplayed = false;
|
127 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
128 |
+
|
129 |
+
if(!data.sample_id){
|
130 |
+
data = {};
|
131 |
+
data.sample_type = 'file';
|
132 |
+
data.sample_id = 0;
|
133 |
+
}
|
134 |
+
|
135 |
+
data.id = this.itemCount;
|
136 |
+
|
137 |
+
if (data.sample_type == 'url') {
|
138 |
+
data.url_checked = ' checked="checked"';
|
139 |
+
} else if (data.sample_type == 'file') {
|
140 |
+
data.file_checked = ' checked="checked"';
|
141 |
+
}
|
142 |
+
|
143 |
+
Element.insert(this.tbody, {'bottom':this.template.evaluate(data)});
|
144 |
+
|
145 |
+
scopeTitle = $('downloadable_sample_'+data.id+'_title');
|
146 |
+
if (scopeTitle) {
|
147 |
+
Event.observe(scopeTitle, 'click', function(event){
|
148 |
+
scopeElm = $(Event.findElement(event, 'input'));
|
149 |
+
titleField = scopeElm.up(0).down('input[type="text"]');
|
150 |
+
if (scopeElm.checked == true) {
|
151 |
+
titleField.disabled = true;
|
152 |
+
} else {
|
153 |
+
titleField.disabled = false;
|
154 |
+
}
|
155 |
+
});
|
156 |
+
}
|
157 |
+
if (!data.store_title && scopeTitle) {
|
158 |
+
scopeTitle.up(0).down('input[type="text"]').disabled = true;
|
159 |
+
scopeTitle.checked = true;
|
160 |
+
}
|
161 |
+
|
162 |
+
sampleUrl = $('downloadable_sample_'+data.id+'_url_type');
|
163 |
+
|
164 |
+
if (!data.file_save) {
|
165 |
+
data.file_save = [];
|
166 |
+
}
|
167 |
+
new Downloadable.FileUploader(
|
168 |
+
'samples',
|
169 |
+
data.id,
|
170 |
+
sampleUrl.up('td').down('div.uploader'),
|
171 |
+
'downloadable[sample]['+data.id+']',
|
172 |
+
data.file_save,
|
173 |
+
'downloadable_sample_'+data.id+'_file',
|
174 |
+
<?php echo $this->getConfigJson() ?>
|
175 |
+
);
|
176 |
+
sampleUrl.advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
177 |
+
sampleFile = $('downloadable_sample_'+data.id+'_file_type');
|
178 |
+
sampleFile.advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
179 |
+
$('downloadable_sample_'+data.id+'_file_save').advaiceContainer = 'downloadable_sample_'+data.id+'_container';
|
180 |
+
|
181 |
+
this.itemCount++;
|
182 |
+
this.bindRemoveButtons();
|
183 |
+
},
|
184 |
+
remove : function(event){
|
185 |
+
var element = $(Event.findElement(event, 'tr'));
|
186 |
+
alertAlreadyDisplayed = false;
|
187 |
+
if(element){
|
188 |
+
element.down('input[type="hidden"].__delete__').value = '1';
|
189 |
+
element.down('div.flex').remove();
|
190 |
+
element.addClassName('no-display');
|
191 |
+
element.addClassName('ignore-validate');
|
192 |
+
element.hide();
|
193 |
+
}
|
194 |
+
},
|
195 |
+
bindRemoveButtons : function(){
|
196 |
+
var buttons = $$('tbody#sample_items_body .delete-sample-item');
|
197 |
+
for(var i=0;i<buttons.length;i++){
|
198 |
+
if(!$(buttons[i]).binded){
|
199 |
+
$(buttons[i]).binded = true;
|
200 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
sampleItems.bindRemoveButtons();
|
207 |
+
|
208 |
+
if($('add_sample_item')){
|
209 |
+
Event.observe('add_sample_item', 'click', sampleItems.add.bind(sampleItems));
|
210 |
+
}
|
211 |
+
|
212 |
+
<?php foreach ($this->getSampleData() as $item): ?>
|
213 |
+
sampleItems.add(<?php echo $item->toJson() ?>);
|
214 |
+
<?php endforeach; ?>
|
215 |
+
|
216 |
+
//]]>
|
217 |
+
</script>
|
app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($_item = $this->getItem()): ?>
|
29 |
+
<h5 class="title"><?php echo $_item->getName() ?></h5>
|
30 |
+
<div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?></div>
|
31 |
+
<?php if ($this->getOrderOptions()): ?>
|
32 |
+
<dl class="item-options">
|
33 |
+
<?php foreach ($this->getOrderOptions() as $_option): ?>
|
34 |
+
<dt><?php echo $_option['label'] ?></dt>
|
35 |
+
<dd>
|
36 |
+
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
37 |
+
<?php echo $_option['value'];?>
|
38 |
+
<?php else: ?>
|
39 |
+
<?php echo Mage::helper('core/string')->truncate($_option['value'], 55, '', $_remainder);?>
|
40 |
+
<?php if ($_remainder):?>
|
41 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
42 |
+
<script type="text/javascript">
|
43 |
+
$('<?php echo $_id ?>').hide();
|
44 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
45 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
46 |
+
</script>
|
47 |
+
<?php endif;?>
|
48 |
+
<?php endif;?>
|
49 |
+
</dd>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</dl>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if ($this->getLinks()): ?>
|
54 |
+
<dl class="item-options">
|
55 |
+
<dt><?php echo $this->getLinksTitle(); ?></dt>
|
56 |
+
<?php foreach ($this->getLinks()->getPurchasedItems() as $_link): ?>
|
57 |
+
<dd><?php echo $this->escapeHtml($_link->getLinkTitle()); ?></dd>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</dl>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
62 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($_item = $this->getItem()): ?>
|
29 |
+
<h5 class="title"><?php echo $_item->getName() ?></h5>
|
30 |
+
<div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?></div>
|
31 |
+
<?php if ($this->getOrderOptions()): ?>
|
32 |
+
<dl class="item-options">
|
33 |
+
<?php foreach ($this->getOrderOptions() as $_option): ?>
|
34 |
+
<dt><?php echo $_option['label'] ?></dt>
|
35 |
+
<dd>
|
36 |
+
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
37 |
+
<?php echo $_option['value'];?>
|
38 |
+
<?php else: ?>
|
39 |
+
<?php echo Mage::helper('core/string')->truncate($_option['value'], 55, '', $_remainder);?>
|
40 |
+
<?php if ($_remainder):?>
|
41 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
42 |
+
<script type="text/javascript">
|
43 |
+
$('<?php echo $_id ?>').hide();
|
44 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
45 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
46 |
+
</script>
|
47 |
+
<?php endif;?>
|
48 |
+
<?php endif;?>
|
49 |
+
</dd>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</dl>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if ($this->getLinks()): ?>
|
54 |
+
<dl class="item-options">
|
55 |
+
<dt><?php echo $this->getLinksTitle(); ?></dt>
|
56 |
+
<?php foreach ($this->getLinks()->getPurchasedItems() as $_link): ?>
|
57 |
+
<dd><?php echo $this->escapeHtml($_link->getLinkTitle()); ?> (<?php echo $_link->getNumberOfDownloadsBought()?$_link->getNumberOfDownloadsBought():Mage::helper('downloadable')->__('Unlimited') ?>)</dd>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</dl>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
62 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($_item = $this->getItem()): ?>
|
29 |
+
<h5 class="title"><?php echo $_item->getName() ?></h5>
|
30 |
+
<div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?></div>
|
31 |
+
<?php if ($this->getOrderOptions()): ?>
|
32 |
+
<dl class="item-options">
|
33 |
+
<?php foreach ($this->getOrderOptions() as $_option): ?>
|
34 |
+
<dt><?php echo $_option['label'] ?></dt>
|
35 |
+
<dd>
|
36 |
+
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
37 |
+
<?php echo $_option['value'];?>
|
38 |
+
<?php else: ?>
|
39 |
+
<?php echo Mage::helper('core/string')->truncate($_option['value'], 55, '', $_remainder);?>
|
40 |
+
<?php if ($_remainder):?>
|
41 |
+
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
42 |
+
<script type="text/javascript">
|
43 |
+
$('<?php echo $_id ?>').hide();
|
44 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
45 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
46 |
+
</script>
|
47 |
+
<?php endif;?>
|
48 |
+
<?php endif;?>
|
49 |
+
</dd>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</dl>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if ($this->getLinks()): ?>
|
54 |
+
<dl class="item-options">
|
55 |
+
<dt><?php echo $this->getLinksTitle(); ?></dt>
|
56 |
+
<?php foreach ($this->getLinks()->getPurchasedItems() as $_link): ?>
|
57 |
+
<dd><?php echo $this->escapeHtml($_link->getLinkTitle()) ?> (<?php echo $_link->getNumberOfDownloadsUsed() . ' / ' . ($_link->getNumberOfDownloadsBought()?$_link->getNumberOfDownloadsBought():Mage::helper('downloadable')->__('U')) ?>)</dd>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</dl>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php echo $this->htmlEscape($_item->getDescription()) ?>
|
62 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/create/items/renderer/downloadable.phtml
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_item = $this->getItem() ?>
|
28 |
+
<?php $this->setPriceDataObject($_item); ?>
|
29 |
+
<tr class="border">
|
30 |
+
<td><?php echo $this->getColumnHtml($_item, 'downloadable') ?></td>
|
31 |
+
<td class="a-right">
|
32 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
33 |
+
<span class="price-excl-tax">
|
34 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
35 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php echo $this->displayPriceAttribute('price') ?>
|
38 |
+
</span>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
41 |
+
<span class="price-incl-tax">
|
42 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
43 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
44 |
+
<?php endif; ?>
|
45 |
+
<?php if ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
46 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
47 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
49 |
+
<br />
|
50 |
+
<small>
|
51 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
52 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
53 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></span><br />
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</small>
|
56 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
57 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
58 |
+
<br />
|
59 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
60 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></small></span><br />
|
61 |
+
<?php endforeach; ?>
|
62 |
+
<span class="nobr">
|
63 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
64 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
65 |
+
</span>
|
66 |
+
<?php else: // excl. ?>
|
67 |
+
<?php echo $this->displayPriceInclTax($_item); ?>
|
68 |
+
<?php endif; ?>
|
69 |
+
</span>
|
70 |
+
<?php endif; ?>
|
71 |
+
</td>
|
72 |
+
<td class="a-center"><?php echo $this->getColumnHtml($_item, 'qty') ?></td>
|
73 |
+
<?php if ($this->canParentReturnToStock($_item)) : ?>
|
74 |
+
<td class="a-center">
|
75 |
+
<?php if ($this->canReturnItemToStock($_item)) : ?>
|
76 |
+
<input type="checkbox" name="creditmemo[items][<?php echo $_item->getOrderItemId() ?>][back_to_stock]" value="1"<?php if ($_item->getBackToStock()):?> checked<?php endif;?>/>
|
77 |
+
<?php endif; ?>
|
78 |
+
</td>
|
79 |
+
<?php endif; ?>
|
80 |
+
<td class="a-center">
|
81 |
+
<?php if ($this->canEditQty()) : ?>
|
82 |
+
<input type="text" class="input-text qty-input" name="creditmemo[items][<?php echo $_item->getOrderItemId() ?>][qty]" value="<?php echo $_item->getQty()*1 ?>"/>
|
83 |
+
<?php else : ?>
|
84 |
+
<?php echo $_item->getQty()*1 ?>
|
85 |
+
<?php endif; ?>
|
86 |
+
</td>
|
87 |
+
<td class="a-right">
|
88 |
+
|
89 |
+
|
90 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
91 |
+
<span class="price-excl-tax">
|
92 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
93 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
94 |
+
<?php endif; ?>
|
95 |
+
<?php echo $this->displayPriceAttribute('row_total') ?>
|
96 |
+
</span>
|
97 |
+
<?php endif; ?>
|
98 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
99 |
+
<span class="price-incl-tax">
|
100 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
101 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
102 |
+
<?php endif; ?>
|
103 |
+
|
104 |
+
<?php if ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
105 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
106 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
107 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
108 |
+
<br />
|
109 |
+
<small>
|
110 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
111 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
112 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></span><br />
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</small>
|
115 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
116 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
117 |
+
<br />
|
118 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
119 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></small></span><br />
|
120 |
+
<?php endforeach; ?>
|
121 |
+
<span class="nobr">
|
122 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
123 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
124 |
+
</span>
|
125 |
+
<?php else: // excl. ?>
|
126 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
127 |
+
<?php endif; ?>
|
128 |
+
<?php endif; ?>
|
129 |
+
</span>
|
130 |
+
</td>
|
131 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('tax_amount') ?></td>
|
132 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
133 |
+
<td class="a-right last">
|
134 |
+
<?php echo $this->displayPrices(
|
135 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getWeeeTaxAppliedAmount(),
|
136 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedAmount()
|
137 |
+
) ?>
|
138 |
+
</td>
|
139 |
+
</tr>
|
app/design/adminhtml/default/default/template/downloadable/sales/order/creditmemo/view/items/renderer/downloadable.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_item = $this->getItem() ?>
|
28 |
+
<?php $this->setPriceDataObject($_item) ?>
|
29 |
+
<tr class="border">
|
30 |
+
<td><?php echo $this->getColumnHtml($_item, 'downloadable') ?></td>
|
31 |
+
<td class="a-right">
|
32 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
33 |
+
<span class="price-excl-tax">
|
34 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
35 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php echo $this->displayPriceAttribute('price') ?>
|
38 |
+
</span>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
41 |
+
<span class="price-incl-tax">
|
42 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
43 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
44 |
+
<?php endif; ?>
|
45 |
+
<?php if ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
46 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
47 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
49 |
+
<br />
|
50 |
+
<small>
|
51 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
52 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
53 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></span><br />
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</small>
|
56 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
57 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
58 |
+
<br />
|
59 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
60 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></small></span><br />
|
61 |
+
<?php endforeach; ?>
|
62 |
+
<span class="nobr">
|
63 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
64 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
65 |
+
</span>
|
66 |
+
<?php else: // excl. ?>
|
67 |
+
<?php echo $this->displayPriceInclTax($_item); ?>
|
68 |
+
<?php endif; ?>
|
69 |
+
</span>
|
70 |
+
<?php endif; ?>
|
71 |
+
</td>
|
72 |
+
<td class="a-center"><?php echo $_item->getQty()*1 ?></td>
|
73 |
+
<td class="a-right">
|
74 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
75 |
+
<span class="price-excl-tax">
|
76 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
77 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
78 |
+
<?php endif; ?>
|
79 |
+
<?php echo $this->displayPriceAttribute('row_total') ?>
|
80 |
+
</span>
|
81 |
+
<?php endif; ?>
|
82 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
83 |
+
<span class="price-incl-tax">
|
84 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
85 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
86 |
+
<?php endif; ?>
|
87 |
+
|
88 |
+
<?php if ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
89 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
90 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
91 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
92 |
+
<br />
|
93 |
+
<small>
|
94 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
95 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
96 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></span><br />
|
97 |
+
<?php endforeach; ?>
|
98 |
+
</small>
|
99 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
100 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
101 |
+
<br />
|
102 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></small></span><br />
|
104 |
+
<?php endforeach; ?>
|
105 |
+
<span class="nobr">
|
106 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
107 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
108 |
+
</span>
|
109 |
+
<?php else: // excl. ?>
|
110 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
111 |
+
<?php endif; ?>
|
112 |
+
</span>
|
113 |
+
<?php endif; ?>
|
114 |
+
</td>
|
115 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('tax_amount') ?></td>
|
116 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
117 |
+
<td class="a-right last">
|
118 |
+
<?php echo $this->displayPrices(
|
119 |
+
$_item->getBaseRowTotal()-$_item->getBaseDiscountAmount()+$_item->getBaseTaxAmount(),
|
120 |
+
$_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedAmount
|
121 |
+
) ?>
|
122 |
+
</td>
|
123 |
+
</tr>
|
app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/create/items/renderer/downloadable.phtml
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_item = $this->getItem() ?>
|
28 |
+
<?php $this->setPriceDataObject($_item)?>
|
29 |
+
<tr class="border">
|
30 |
+
<td><?php echo $this->getColumnHtml($_item, 'downloadable') ?></td>
|
31 |
+
<td class="a-right">
|
32 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
33 |
+
<span class="price-excl-tax">
|
34 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
35 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php echo $this->displayPriceAttribute('price') ?>
|
38 |
+
</span>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
41 |
+
<span class="price-incl-tax">
|
42 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
43 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
44 |
+
<?php endif; ?>
|
45 |
+
<?php if ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
46 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
47 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
49 |
+
<br />
|
50 |
+
<small>
|
51 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
52 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
53 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></span><br />
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</small>
|
56 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
57 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
58 |
+
<br />
|
59 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
60 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></small></span><br />
|
61 |
+
<?php endforeach; ?>
|
62 |
+
<span class="nobr">
|
63 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
64 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
65 |
+
</span>
|
66 |
+
<?php else: // excl. ?>
|
67 |
+
<?php echo $this->displayPriceInclTax($_item); ?>
|
68 |
+
<?php endif; ?>
|
69 |
+
</span>
|
70 |
+
<?php endif; ?>
|
71 |
+
</td>
|
72 |
+
<td class="a-center"><?php echo $this->getColumnHtml($_item, 'qty') ?></td>
|
73 |
+
<td class="a-center">
|
74 |
+
<?php if ($this->canEditQty()) : ?>
|
75 |
+
<input type="text" class="input-text qty-input" name="invoice[items][<?php echo $_item->getOrderItemId() ?>]" value="<?php echo $_item->getQty()*1 ?>"/>
|
76 |
+
<?php else : ?>
|
77 |
+
<?php echo $_item->getQty()*1 ?>
|
78 |
+
<?php endif; ?>
|
79 |
+
</td>
|
80 |
+
<td class="a-right">
|
81 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
82 |
+
<span class="price-excl-tax">
|
83 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
84 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
85 |
+
<?php endif; ?>
|
86 |
+
<?php echo $this->displayPriceAttribute('row_total') ?>
|
87 |
+
</span>
|
88 |
+
<?php endif; ?>
|
89 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
90 |
+
<span class="price-incl-tax">
|
91 |
+
|
92 |
+
|
93 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
94 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
95 |
+
<?php endif; ?>
|
96 |
+
|
97 |
+
<?php if ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
98 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
99 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
100 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
101 |
+
<br />
|
102 |
+
<small>
|
103 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
104 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
105 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></span><br />
|
106 |
+
<?php endforeach; ?>
|
107 |
+
</small>
|
108 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
109 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
110 |
+
<br />
|
111 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
112 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></small></span><br />
|
113 |
+
<?php endforeach; ?>
|
114 |
+
<span class="nobr">
|
115 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
116 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
117 |
+
</span>
|
118 |
+
<?php else: // excl. ?>
|
119 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
120 |
+
<?php endif; ?>
|
121 |
+
|
122 |
+
</span>
|
123 |
+
<?php endif; ?>
|
124 |
+
</td>
|
125 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('tax_amount') ?></td>
|
126 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
127 |
+
<td class="a-right last">
|
128 |
+
<?php echo $this->displayPrices(
|
129 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount(),
|
130 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedRowAmount()
|
131 |
+
) ?>
|
132 |
+
</td>
|
133 |
+
</tr>
|
app/design/adminhtml/default/default/template/downloadable/sales/order/invoice/view/items/renderer/downloadable.phtml
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_item = $this->getItem() ?>
|
28 |
+
<?php $this->setPriceDataObject($_item) ?>
|
29 |
+
<tr class="border">
|
30 |
+
<td><?php echo $this->getColumnHtml($_item, 'downloadable') ?></td>
|
31 |
+
<td class="a-right">
|
32 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
33 |
+
<span class="price-excl-tax">
|
34 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
35 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php echo $this->displayPriceAttribute('price') ?>
|
38 |
+
</span>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
41 |
+
<span class="price-incl-tax">
|
42 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
43 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
44 |
+
<?php endif; ?>
|
45 |
+
<?php if ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
46 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
47 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
49 |
+
<br />
|
50 |
+
<small>
|
51 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
52 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
53 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></span><br />
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</small>
|
56 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
57 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
58 |
+
<br />
|
59 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
60 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></small></span><br />
|
61 |
+
<?php endforeach; ?>
|
62 |
+
<span class="nobr">
|
63 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
64 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
65 |
+
</span>
|
66 |
+
<?php else: // excl. ?>
|
67 |
+
<?php echo $this->displayPriceInclTax($_item); ?>
|
68 |
+
<?php endif; ?>
|
69 |
+
</span>
|
70 |
+
<?php endif; ?>
|
71 |
+
</td>
|
72 |
+
<td class="a-center"><?php echo $_item->getQty()*1 ?></td>
|
73 |
+
<td class="a-right">
|
74 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
75 |
+
<span class="price-excl-tax">
|
76 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
77 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
78 |
+
<?php endif; ?>
|
79 |
+
<?php echo $this->displayPriceAttribute('row_total') ?>
|
80 |
+
</span>
|
81 |
+
<?php endif; ?>
|
82 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
83 |
+
<span class="price-incl-tax">
|
84 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
85 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
86 |
+
<?php endif; ?>
|
87 |
+
|
88 |
+
<?php if ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
89 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
90 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
91 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
92 |
+
<br />
|
93 |
+
<small>
|
94 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
95 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
96 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></span><br />
|
97 |
+
<?php endforeach; ?>
|
98 |
+
</small>
|
99 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
100 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
101 |
+
<br />
|
102 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></small></span><br />
|
104 |
+
<?php endforeach; ?>
|
105 |
+
<span class="nobr">
|
106 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
107 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
108 |
+
</span>
|
109 |
+
<?php else: // excl. ?>
|
110 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
111 |
+
<?php endif; ?>
|
112 |
+
</span>
|
113 |
+
<?php endif; ?>
|
114 |
+
</td>
|
115 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('tax_amount') ?></td>
|
116 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
117 |
+
<td class="a-right last">
|
118 |
+
<?php echo $this->displayPrices(
|
119 |
+
$_item->getBaseRowTotal()+$_item->getBaseTaxAmount()-$_item->getBaseDiscountAmount()+$_item->getWeeeTaxAppliedAmount(),
|
120 |
+
$_item->getRowTotal()+$_item->getTaxAmount()-$_item->getDiscountAmount()+$_item->getWeeeTaxAppliedAmount()
|
121 |
+
) ?>
|
122 |
+
</td>
|
123 |
+
</tr>
|
app/design/adminhtml/default/default/template/downloadable/sales/order/view/items/renderer/downloadable.phtml
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_item = $this->getItem() ?>
|
28 |
+
<?php $this->setPriceDataObject($_item) ?>
|
29 |
+
<tr<?php if ($this->canDisplayGiftmessage()): ?> class="border"<?php endif; ?>>
|
30 |
+
<td class="giftmessage-single-item">
|
31 |
+
<?php if ($this->canDisplayContainer()): ?>
|
32 |
+
<div id="<?php echo $this->getHtmlId() ?>" class="item-container">
|
33 |
+
<?php endif; ?>
|
34 |
+
<div class="item-text">
|
35 |
+
<?php echo $this->getColumnHtml($_item, 'downloadable') ?>
|
36 |
+
</div>
|
37 |
+
<?php if ($this->canDisplayContainer()): ?>
|
38 |
+
</div>
|
39 |
+
<?php endif ?>
|
40 |
+
</td>
|
41 |
+
<td class="a-center"><?php echo $_item->getStatus() ?></td>
|
42 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('original_price') ?></td>
|
43 |
+
<td class="a-right">
|
44 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
45 |
+
<span class="price-excl-tax">
|
46 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
47 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php echo $this->displayPriceAttribute('price') ?>
|
50 |
+
</span>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
+
<span class="price-incl-tax">
|
54 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
55 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
56 |
+
<?php endif; ?>
|
57 |
+
<?php if ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
58 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
59 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
60 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
61 |
+
<br />
|
62 |
+
<small>
|
63 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
64 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
65 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></span><br />
|
66 |
+
<?php endforeach; ?>
|
67 |
+
</small>
|
68 |
+
<?php elseif ($_item->getWeeeTaxAppliedAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
69 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
70 |
+
<br />
|
71 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
72 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['amount'],true,true); ?></small></span><br />
|
73 |
+
<?php endforeach; ?>
|
74 |
+
<span class="nobr">
|
75 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
76 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)+$_item->getWeeeTaxAppliedAmount()); ?>
|
77 |
+
</span>
|
78 |
+
<?php else: // excl. ?>
|
79 |
+
<?php echo $this->displayPriceInclTax($_item); ?>
|
80 |
+
<?php endif; ?>
|
81 |
+
</span>
|
82 |
+
<?php endif; ?>
|
83 |
+
</td>
|
84 |
+
<td><?php echo $this->getColumnHtml($_item, 'qty') ?></td>
|
85 |
+
|
86 |
+
<td class="a-right">
|
87 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
88 |
+
<span class="price-excl-tax">
|
89 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
90 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax'); ?>:</span>
|
91 |
+
<?php endif; ?>
|
92 |
+
<?php echo $this->displayPriceAttribute('row_total') ?>
|
93 |
+
</span>
|
94 |
+
<?php endif; ?>
|
95 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
96 |
+
<span class="price-incl-tax">
|
97 |
+
|
98 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
99 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
100 |
+
<?php endif; ?>
|
101 |
+
|
102 |
+
<?php if ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 0, 'sales')): // including ?>
|
103 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
104 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): // incl. + weee ?>
|
105 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
106 |
+
<br />
|
107 |
+
<small>
|
108 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
109 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
110 |
+
<span class="nobr">+ <?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></span><br />
|
111 |
+
<?php endforeach; ?>
|
112 |
+
</small>
|
113 |
+
<?php elseif ($_item->getWeeeTaxAppliedRowAmount() && Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): // excl. + weee + final ?>
|
114 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
115 |
+
<br />
|
116 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
117 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('core')->currency($tax['row_amount'],true,true); ?></small></span><br />
|
118 |
+
<?php endforeach; ?>
|
119 |
+
<span class="nobr">
|
120 |
+
<?php echo Mage::helper('weee')->__('Total'); ?>:
|
121 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
122 |
+
</span>
|
123 |
+
<?php else: // excl. ?>
|
124 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
125 |
+
<?php endif; ?>
|
126 |
+
|
127 |
+
<!--
|
128 |
+
|
129 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
130 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax'); ?>:</span>
|
131 |
+
<?php endif; ?>
|
132 |
+
<?php echo $this->displaySubtotalInclTax($_item); ?>
|
133 |
+
-->
|
134 |
+
</span>
|
135 |
+
<?php endif; ?>
|
136 |
+
</td>
|
137 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('tax_amount') ?></td>
|
138 |
+
<td class="a-right"><?php echo $this->displayTaxPercent($_item) ?></td>
|
139 |
+
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
140 |
+
<td class="a-right last">
|
141 |
+
<?php echo $this->displayPrices(
|
142 |
+
$_item->getBaseRowTotal() - $_item->getBaseDiscountAmount() + $_item->getBaseTaxAmount(),
|
143 |
+
$_item->getRowTotal() - $_item->getDiscountAmount() + $_item->getTaxAmount() + $_item->getWeeeTaxAppliedRowAmount()
|
144 |
+
); ?>
|
145 |
+
</td>
|
146 |
+
</tr>
|
app/design/adminhtml/default/default/template/eav/attribute/edit/js.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
app/design/adminhtml/default/default/template/email/order/items.phtml
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_order=$this->getOrder() ?>
|
28 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #bebcb7; background:#f8f7f5;">
|
29 |
+
<thead>
|
30 |
+
<tr>
|
31 |
+
<th class="a-left" bgcolor="#d9e5ee" style="padding:3px 9px">Item</th>
|
32 |
+
<th class="a-center" bgcolor="#d9e5ee" style="padding:3px 9px">Qty</th>
|
33 |
+
<th class="a-right" bgcolor="#d9e5ee" style="padding:3px 9px">Subtotal</th>
|
34 |
+
</tr>
|
35 |
+
</thead>
|
36 |
+
|
37 |
+
<tbody>
|
38 |
+
<?php $i=0; foreach ($_order->getAllItems() as $_item): $i++ ?>
|
39 |
+
<tr <?php echo $i%2?'bgcolor="#eeeded"':'' ?>>
|
40 |
+
<td align="left" valign="top" style="padding:3px 9px"><?php echo $_item->getName() ?></td>
|
41 |
+
<td align="center" valign="top" style="padding:3px 9px"><?php echo sprintf('%s', $_item->getQtyOrdered()) ?></td>
|
42 |
+
<td align="right" valign="top" style="padding:3px 9px">
|
43 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
44 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
45 |
+
<span class="label"><?php echo $this->__('Excl. Tax'); ?>:</span>
|
46 |
+
<?php endif; ?>
|
47 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
48 |
+
<?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
49 |
+
<?php else: ?>
|
50 |
+
<?php echo $_order->formatPrice($_item->getRowTotal()) ?>
|
51 |
+
<?php endif; ?>
|
52 |
+
|
53 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
54 |
+
<br />
|
55 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
56 |
+
<small>
|
57 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
58 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
59 |
+
<?php endforeach; ?>
|
60 |
+
</small>
|
61 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
62 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
63 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
64 |
+
<?php endforeach; ?>
|
65 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
66 |
+
<small>
|
67 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
68 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
69 |
+
<?php endforeach; ?>
|
70 |
+
</small>
|
71 |
+
<?php endif; ?>
|
72 |
+
|
73 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
74 |
+
<br />
|
75 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php endif; ?>
|
78 |
+
<?php endif; ?>
|
79 |
+
|
80 |
+
|
81 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
82 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
83 |
+
<br /><span class="label"><?php echo $this->__('Incl. Tax'); ?>:</span>
|
84 |
+
<?php endif; ?>
|
85 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
86 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
87 |
+
<?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
88 |
+
<?php else: ?>
|
89 |
+
<?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
90 |
+
<?php endif; ?>
|
91 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
92 |
+
<br />
|
93 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
94 |
+
<small>
|
95 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
96 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
97 |
+
<?php endforeach; ?>
|
98 |
+
</small>
|
99 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
100 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
101 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
102 |
+
<?php endforeach; ?>
|
103 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
104 |
+
<small>
|
105 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
106 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
107 |
+
<?php endforeach; ?>
|
108 |
+
</small>
|
109 |
+
<?php endif; ?>
|
110 |
+
|
111 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
112 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
113 |
+
<?php endif; ?>
|
114 |
+
<?php endif; ?>
|
115 |
+
<?php endif; ?>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
<?php endforeach ?>
|
119 |
+
</tbody>
|
120 |
+
|
121 |
+
<tfoot>
|
122 |
+
<tr>
|
123 |
+
<td colspan="2" align="right" style="padding:3px 9px"><?php echo Mage::helper('sales')->__('Subtotal') ?></td>
|
124 |
+
<td align="right" style="padding:3px 9px"><?php echo $_order->formatPrice($_order->getSubtotal()) ?></td>
|
125 |
+
</tr>
|
126 |
+
<?php if ($_order->getDiscountAmount()): ?>
|
127 |
+
<tr>
|
128 |
+
<td colspan="2" align="right" style="padding:3px 9px"><?php echo Mage::helper('sales')->__('Discount') ?></td>
|
129 |
+
<td align="right" style="padding:3px 9px"><?php echo $_order->formatPrice($_order->getDiscountAmount()) ?></td>
|
130 |
+
</tr>
|
131 |
+
<?php endif; ?>
|
132 |
+
<?php if ($_order->getShippingAmount()): ?>
|
133 |
+
<tr>
|
134 |
+
<td colspan="2" align="right" style="padding:3px 9px"><?php echo Mage::helper('sales')->__('Shipping Amount') ?></td>
|
135 |
+
<td align="right" style="padding:3px 9px"><?php echo $_order->formatPrice($_order->getShippingAmount()) ?></td>
|
136 |
+
</tr>
|
137 |
+
<?php endif; ?>
|
138 |
+
<?php if ($_order->getTaxAmount()): ?>
|
139 |
+
<tr>
|
140 |
+
<td colspan="2" align="right" style="padding:3px 9px"><?php echo Mage::helper('sales')->__('Tax Amount') ?></td>
|
141 |
+
<td align="right" style="padding:3px 9px"><?php echo $_order->formatPrice($_order->getTaxAmount()) ?></td>
|
142 |
+
</tr>
|
143 |
+
<?php endif; ?>
|
144 |
+
<tr bgcolor="#DEE5E8">
|
145 |
+
<td colspan="2" align="right" style="padding:3px 9px"><strong><big><?php echo Mage::helper('sales')->__('Grand Total') ?></big></strong></td>
|
146 |
+
<td align="right" style="padding:6px 9px"><strong><big><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></big></strong></td>
|
147 |
+
</tr>
|
148 |
+
</tfoot>
|
149 |
+
|
150 |
+
</table>
|
app/design/adminhtml/default/default/template/empty.phtml
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
29 |
+
<head>
|
30 |
+
<?php $this->getChild('head')->unsetChildren(); ?>
|
31 |
+
<?php echo $this->getChildHtml('head'); ?>
|
32 |
+
</head>
|
33 |
+
<body class="page-popup<?php echo $this->getBodyClass()?$this->getBodyClass() : ''?>">
|
34 |
+
<div>
|
35 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
36 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
37 |
+
<?php echo $this->getChildHtml('content') ?>
|
38 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
39 |
+
</div>
|
40 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
41 |
+
</body>
|
42 |
+
</html>
|
app/design/adminhtml/default/default/template/example.phtml
ADDED
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html lang="en">
|
29 |
+
<head>
|
30 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
31 |
+
<title><?php echo Mage::helper('adminhtml')->__('Magento Commerce - Administrative Panel') ?></title>
|
32 |
+
<style type="text/css" media="all">
|
33 |
+
/*<![CDATA[*/ @import "<?php echo $this->getSkinUrl('styles.css') ?>"; /*]]>*/
|
34 |
+
</style>
|
35 |
+
<link rel="stylesheet" type="text/css" media="screen, projection" href="<?php echo $this->getSkinUrl('menu-top.css') ?>" />
|
36 |
+
<!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css') ?>" type="text/css" media="all" /> <![endif]-->
|
37 |
+
<!--[if lt IE 7]><script defer type="text/javascript" src="<?php echo $baseUrl ?>js/lib/ds-sleight.js"></script><![endif]-->
|
38 |
+
<script type="text/javascript" src="<?php echo $baseUrl ?>js/lib/dropdown.js"></script>
|
39 |
+
</head>
|
40 |
+
<body>
|
41 |
+
<div class="header">
|
42 |
+
<a href="#"><img src="<?php echo $this->getSkinUrl('images/logo.gif') ?>" alt="Magento logo" class="logo"/></a>
|
43 |
+
<div class="header-right">
|
44 |
+
<p>Today is: June 01, 2007<span class="separator">|</span><strong>Minu Oh</strong> (Administrator)<span class="separator">|</span><a href="#">Logout</a></p>
|
45 |
+
<fieldset>
|
46 |
+
<input type="text" class="input-text" value="Search by Keyword"/>
|
47 |
+
</fieldset>
|
48 |
+
</div>
|
49 |
+
<div class="clear"></div>
|
50 |
+
|
51 |
+
<?php echo $this->getLayout()->createBlock('adminhtml/page_menu')->toHtml() ?>
|
52 |
+
|
53 |
+
</div>
|
54 |
+
<div class="middle">
|
55 |
+
<ul class="breadcrumbs">
|
56 |
+
<li><a href="#">Home</a> »</li>
|
57 |
+
<li><a href="#">Customer</a> »</li>
|
58 |
+
<li>#0011234</li>
|
59 |
+
</ul>
|
60 |
+
<div class="container"><!-- accomodates the section-menu by border width (for IE bug) -->
|
61 |
+
<div class="main">
|
62 |
+
<div class="content-container"><!-- content positioning -->
|
63 |
+
<div class="content"><!-- content presentation -->
|
64 |
+
<div class="head">
|
65 |
+
<table cellspacing="0">
|
66 |
+
<tr>
|
67 |
+
<td style="width:50%;"><h2>Minu Oh - Customer View</h2></td>
|
68 |
+
<td class="buttons"><strong class="button"><span>Save</span></strong></td>
|
69 |
+
</tr>
|
70 |
+
</table>
|
71 |
+
</div>
|
72 |
+
<div class="box-left customer-personal">
|
73 |
+
<h3>Personal Information</h3>
|
74 |
+
<div class="box">
|
75 |
+
<p><strong>Last Logged in:</strong> June, 16, 2007 ( Currently <strong>OFFLINE</strong> )</p>
|
76 |
+
<p><strong>Account Created:</strong> April 1, 2001</p>
|
77 |
+
<address>
|
78 |
+
<strong>Contact Information</strong><br/>Minu Oh ( <a href="mailto:minu@varien.com">minu@varien.com</a>)<br/>
|
79 |
+
3402 Motor Ave Suite B<br/>
|
80 |
+
Los Angeles, CA 90034<br/>
|
81 |
+
United States<br/>
|
82 |
+
<small><strong>T</strong> |</small> (310) 123-1234</address>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
<div class="box-right sales-tally">
|
86 |
+
<h3>Sales Tally</h3>
|
87 |
+
<div class="box">
|
88 |
+
<table cellspacing="0" class="data">
|
89 |
+
<thead>
|
90 |
+
<tr>
|
91 |
+
<th> </th>
|
92 |
+
<th>Lifetime Sales</th>
|
93 |
+
<th>Average Sale</th>
|
94 |
+
</tr>
|
95 |
+
</thead>
|
96 |
+
<tfoot>
|
97 |
+
<tr>
|
98 |
+
<td class="label"><big>Total</big></td>
|
99 |
+
<td><big>$9000.82</big></td>
|
100 |
+
<td><big>$400.99</big></td>
|
101 |
+
</tr>
|
102 |
+
</tfoot>
|
103 |
+
<tbody>
|
104 |
+
<tr>
|
105 |
+
<td class="label">Site 1</td>
|
106 |
+
<td>$1899.82</td>
|
107 |
+
<td>$82.99</td>
|
108 |
+
</tr>
|
109 |
+
<tr class="even">
|
110 |
+
<td class="label">Site 1</td>
|
111 |
+
<td>$1899.82</td>
|
112 |
+
<td>$82.99</td>
|
113 |
+
</tr>
|
114 |
+
<tr>
|
115 |
+
<td class="label">Site 1</td>
|
116 |
+
<td>$1899.82</td>
|
117 |
+
<td>$82.99</td>
|
118 |
+
</tr>
|
119 |
+
<tr class="even">
|
120 |
+
<td class="label">Site 1</td>
|
121 |
+
<td>$1899.82</td>
|
122 |
+
<td>$82.99</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td class="label">Site 1</td>
|
126 |
+
<td>$1899.82</td>
|
127 |
+
<td>$82.99</td>
|
128 |
+
</tr>
|
129 |
+
<tr class="even">
|
130 |
+
<td class="label">Site 1</td>
|
131 |
+
<td>$1899.82</td>
|
132 |
+
<td>$82.99</td>
|
133 |
+
</tr>
|
134 |
+
</tbody>
|
135 |
+
</table>
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
<div class="clear"></div>
|
139 |
+
<br/>
|
140 |
+
<h3>Sales Stat</h3>
|
141 |
+
<dl class="accordion">
|
142 |
+
<dt><a href="#"><img src="<?php echo $this->getSkinUrl('images/accordion_open.png') ?>" alt="" class="v-mid"/></a><strong>Last 5 Orders</strong></dt>
|
143 |
+
<dd></dd>
|
144 |
+
<dt><a href="#"><img src="<?php echo $this->getSkinUrl('images/accordion_open.png') ?>" alt="" class="v-mid"/></a><strong>Wishlist</strong> (5 items)</dt>
|
145 |
+
<dd class="grid open">
|
146 |
+
<table cellspacing="0" class="data">
|
147 |
+
<thead>
|
148 |
+
<tr>
|
149 |
+
<th>Product ID</th>
|
150 |
+
<th>Product Name</th>
|
151 |
+
<th>Price</th>
|
152 |
+
</tr>
|
153 |
+
</thead>
|
154 |
+
<tfoot>
|
155 |
+
<tr>
|
156 |
+
<td colspan="2" class="a-right"><strong>Total</strong></td>
|
157 |
+
<td><strong>$400.99</strong></td>
|
158 |
+
</tr>
|
159 |
+
</tfoot>
|
160 |
+
<tbody>
|
161 |
+
<tr>
|
162 |
+
<td>00212</td>
|
163 |
+
<td>Some sort of product name goes here</td>
|
164 |
+
<td class="price">$82.99</td>
|
165 |
+
</tr>
|
166 |
+
<tr class="even">
|
167 |
+
<td>00212</td>
|
168 |
+
<td>Some sort of product name goes here</td>
|
169 |
+
<td class="price">$82.99</td>
|
170 |
+
</tr>
|
171 |
+
<tr>
|
172 |
+
<td>00212</td>
|
173 |
+
<td>Some sort of product name goes here</td>
|
174 |
+
<td class="price">$82.99</td>
|
175 |
+
</tr>
|
176 |
+
<tr class="even">
|
177 |
+
<td>00212</td>
|
178 |
+
<td>Some sort of product name goes here</td>
|
179 |
+
<td class="price">$82.99</td>
|
180 |
+
</tr>
|
181 |
+
<tr>
|
182 |
+
<td>00212</td>
|
183 |
+
<td>Some sort of product name goes here</td>
|
184 |
+
<td class="price">$82.99</td>
|
185 |
+
</tr>
|
186 |
+
<tr class="even">
|
187 |
+
<td>00212</td>
|
188 |
+
<td>Some sort of product name goes here</td>
|
189 |
+
<td class="price">$82.99</td>
|
190 |
+
</tr>
|
191 |
+
</tbody>
|
192 |
+
</table></dd>
|
193 |
+
<dt><a href="#"><img src="<?php echo $this->getSkinUrl('accordion_open.png') ?>" alt="" class="v-mid"/></a><strong>Gift Registries</strong> (0 items)</dt>
|
194 |
+
<dd></dd>
|
195 |
+
<dt><a href="#"><img src="<?php echo $this->getSkinUrl('images/accordion_open.png') ?>" alt="" class="v-mid"/></a><strong>Shopping Cart</strong> (1 item)</dt>
|
196 |
+
<dd></dd>
|
197 |
+
</dl>
|
198 |
+
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
<br/><br/><!-- The two <br/>s exist only for example show. Erase during production -->
|
204 |
+
<!-- [starts] address list -->
|
205 |
+
<div class="head">
|
206 |
+
<table cellspacing="0">
|
207 |
+
<tr>
|
208 |
+
<td style="width:50%;"><h2>Minu Oh - Addresses</h2></td>
|
209 |
+
<td class="buttons">
|
210 |
+
<strong class="button-alt"><span>Delete</span></strong>
|
211 |
+
<strong class="button"><span>Save</span></strong>
|
212 |
+
<strong class="button"><span>New Address</span></strong>
|
213 |
+
</td>
|
214 |
+
</tr>
|
215 |
+
</table>
|
216 |
+
</div>
|
217 |
+
<div class="address-list">
|
218 |
+
<h3>Customer Addresses</h3>
|
219 |
+
<ul>
|
220 |
+
<li class="on">
|
221 |
+
<address>Minu Oh<br/>
|
222 |
+
3402 Motor Ave Suite B<br/>
|
223 |
+
Los Angeles, CA 90034<br/>
|
224 |
+
T | 310-123-1234
|
225 |
+
</address>
|
226 |
+
</li>
|
227 |
+
<li>
|
228 |
+
<address>Minu Oh<br/>
|
229 |
+
3402 Motor Ave Suite B<br/>
|
230 |
+
Los Angeles, CA 90034<br/>
|
231 |
+
T | 310-123-1234
|
232 |
+
</address>
|
233 |
+
</li>
|
234 |
+
<li class="over">
|
235 |
+
<address>Minu Oh<br/>
|
236 |
+
3402 Motor Ave Suite B<br/>
|
237 |
+
Los Angeles, CA 90034<br/>
|
238 |
+
T | 310-123-1234
|
239 |
+
</address>
|
240 |
+
</li>
|
241 |
+
<li>
|
242 |
+
<address>Minu Oh<br/>
|
243 |
+
3402 Motor Ave Suite B<br/>
|
244 |
+
Los Angeles, CA 90034<br/>
|
245 |
+
T | 310-123-1234
|
246 |
+
</address>
|
247 |
+
</li>
|
248 |
+
</ul>
|
249 |
+
</div>
|
250 |
+
<div class="entry-edit">
|
251 |
+
<h3>Edit Address Entry</h3>
|
252 |
+
<form method="post" action="#">
|
253 |
+
<fieldset>
|
254 |
+
<ul>
|
255 |
+
<li><label for="input_name_0">Input item label</label><input type="text" class="input-text" name="input_name_0" id="input_name_0"/></li>
|
256 |
+
<li><label for="input_name_1">Input item label</label><input type="text" class="input-text" name="input_name_1" id="input_name_1"/></li>
|
257 |
+
<li><label for="input_name_2">Input item label</label><input type="text" class="input-text" name="input_name_2" id="input_name_2"/></li>
|
258 |
+
<li><label for="input_name_3">Input item label</label><input type="text" class="input-text" name="input_name_3" id="input_name_3"/></li>
|
259 |
+
<li><label for="input_name_4">Input item label</label><input type="text" class="input-text" name="input_name_4" id="input_name_4"/></li>
|
260 |
+
<li><label for="input_name_5">Input item label</label><input type="text" class="input-text" name="input_name_5" id="input_name_5"/></li>
|
261 |
+
</ul>
|
262 |
+
</fieldset>
|
263 |
+
</form>
|
264 |
+
</div>
|
265 |
+
<!-- [ends] address list -->
|
266 |
+
|
267 |
+
|
268 |
+
|
269 |
+
|
270 |
+
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
<!--[ends] .content-container -->
|
274 |
+
|
275 |
+
<div class="section-menu">
|
276 |
+
<h2>Customer Insight</h2>
|
277 |
+
<ul>
|
278 |
+
<li><a href="#"><span>Customer View</span></a></li>
|
279 |
+
<li><a href="#"><span>Account Information</span></a></li>
|
280 |
+
<li><a href="#"><span>Addresses</span></a></li>
|
281 |
+
<li><a href="#"><span>Orders</span></a></li>
|
282 |
+
<li><a href="#"><span>Gift Registries</span></a></li>
|
283 |
+
<li><a href="#"><span>Product Reviews</span></a></li>
|
284 |
+
<li><a href="#"><span>Wishlist</span></a></li>
|
285 |
+
<li><a href="#"><span>Shopping Cart</span></a></li>
|
286 |
+
<li><a href="#"><span>Newsletter</span></a></li>
|
287 |
+
</ul>
|
288 |
+
<div class="bottom"></div>
|
289 |
+
</div>
|
290 |
+
<!--[ends] .section-menu -->
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
</div>
|
294 |
+
<!--[ends] .middle -->
|
295 |
+
|
296 |
+
<div class="footer">
|
297 |
+
<p>Copyright © 2008 Magento Commerce. All Right Reserved.<br/>
|
298 |
+
<strong>Version 1.0</strong> | Powered by <a href="http://www.varien.com" target="varien">Varien</a></p>
|
299 |
+
</div>
|
300 |
+
</body>
|
301 |
+
</html>
|
app/design/adminhtml/default/default/template/forgotpassword.phtml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html lang="en">
|
29 |
+
<head>
|
30 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
31 |
+
<title><?php echo Mage::helper('adminhtml')->__('Log into Magento Admin Page'); ?></title>
|
32 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css'); ?>" media="all" />
|
33 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css'); ?>" media="all" />
|
34 |
+
<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico'); ?>" type="image/x-icon" />
|
35 |
+
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico'); ?>" type="image/x-icon" />
|
36 |
+
|
37 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl(); ?>index.php/x.js?f=prototype/prototype.js,prototype/validation.js,mage/adminhtml/events.js,mage/adminhtml/form.js,scriptaculous/effects.js"></script>
|
38 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>
|
39 |
+
|
40 |
+
<!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css'); ?>" type="text/css" media="all" /> <![endif]-->
|
41 |
+
<!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css'); ?>" type="text/css" media="all" /> <![endif]-->
|
42 |
+
<!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css'); ?>" type="text/css" media="all" /> <![endif]-->
|
43 |
+
</head>
|
44 |
+
<body id="page-login">
|
45 |
+
<div class="login-container">
|
46 |
+
<div class="login-box">
|
47 |
+
<form method="post" action="" id="loginForm">
|
48 |
+
<fieldset class="login-form">
|
49 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
|
50 |
+
<h2><?php echo Mage::helper('adminhtml')->__('Forgot your user name or password?'); ?></h2>
|
51 |
+
<div id="messages">
|
52 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
|
53 |
+
</div>
|
54 |
+
<div class="input-box forgot-password"><label for="email"><?php echo Mage::helper('adminhtml')->__('Email Address:'); ?></label><br />
|
55 |
+
<input type="text" id="email" name="email" value="" class="required-entry input-text forgot-password validate-email" style="width:461px;" />
|
56 |
+
</div>
|
57 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
58 |
+
<div class="clear"></div>
|
59 |
+
<div class="form-buttons">
|
60 |
+
<a class="left" href="<?php echo $this->getUrl('adminhtml', array('_nosecret' => true)); ?>">« <?php echo Mage::helper('adminhtml')->__('Back to Login'); ?></a>
|
61 |
+
<button class="forgot-password" onclick="loginForm.submit()" type="button"><span><span><span><?php echo Mage::helper('adminhtml')->__('Retrieve Password'); ?></span></span></span></button>
|
62 |
+
</div>
|
63 |
+
</fieldset>
|
64 |
+
<p class="legal"><?php echo Mage::helper('adminhtml')->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')); ?></p>
|
65 |
+
</form>
|
66 |
+
<div class="bottom"></div>
|
67 |
+
<script type="text/javascript">
|
68 |
+
var loginForm = new varienForm('loginForm');
|
69 |
+
</script>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</body>
|
73 |
+
</html>
|
74 |
+
|
app/design/adminhtml/default/default/template/formkey.phtml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div><input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" /></div>
|
app/design/adminhtml/default/default/template/giftmessage/form.phtml
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php echo $this->helper('core/js')->includeScript('mage/adminhtml/giftmessage.js') ?>
|
28 |
+
<?php if(!$this->getSaveMode()): ?>
|
29 |
+
<form action="<?php echo $this->getSaveUrl() ?>" id="message-form" method="post" class="a-left">
|
30 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
31 |
+
<?php echo $this->getFormHtml(); ?>
|
32 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
33 |
+
<?php echo $this->getCancelButtonHtml() ?>
|
34 |
+
<?php if($this->getMessage()->getGiftMessageId()): ?>
|
35 |
+
<?php echo $this->getRemoveButtonHtml() ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
</form>
|
38 |
+
<?php elseif($this->getSaveMode()=='save'): ?>
|
39 |
+
<h3><?php echo Mage::helper('giftmessage')->__('The gift message has been saved') ?></h3>
|
40 |
+
<br /><?php echo $this->getCloseButtonHtml() ?>
|
41 |
+
<?php else: ?>
|
42 |
+
<h3><?php echo Mage::helper('giftmessage')->__('The gift message has been removed') ?></h3>
|
43 |
+
<br /><?php echo $this->getCloseButtonHtml() ?>
|
44 |
+
<?php endif; ?>
|
45 |
+
<script type="text/javascript">
|
46 |
+
<!--
|
47 |
+
<?php if(!$this->getSaveMode()): ?>
|
48 |
+
var giftMessageWindowObject = new GiftMessageWindow('<?php echo $this->getUniqueId() ?>','message-form', '<?php echo $this->getRemoveUrl() ?>');
|
49 |
+
giftMessageWindowObject.confirmMessage = '<?php echo $this->getEscapedForJs(Mage::helper('giftmessage')->__('Are you sure?')) ?>';
|
50 |
+
<?php else: ?>
|
51 |
+
var giftMessageWindowObject = new GiftMessageWindow('<?php echo $this->getUniqueId() ?>', null, '<?php echo $this->getRemoveUrl() ?>');
|
52 |
+
Event.observe(window, 'load', function(evt) {
|
53 |
+
giftMessageWindowObject.updateParent('<?php echo $this->getEditUrl() ?>', '<?php echo $this->getButtonUrl() ?>');
|
54 |
+
});
|
55 |
+
<?php endif; ?>
|
56 |
+
//-->
|
57 |
+
</script>
|
app/design/adminhtml/default/default/template/giftmessage/giftoptionsform.phtml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($this->canDisplayGiftmessageForm()): ?>
|
29 |
+
<div id="gift_options_giftmessage">
|
30 |
+
<div class="giftcard-form">
|
31 |
+
<div class="giftcard-send-form">
|
32 |
+
<h4><?php echo Mage::helper('giftmessage')->__('Gift Message'); ?></h4>
|
33 |
+
<ul class="form-list">
|
34 |
+
<li class="fields">
|
35 |
+
<div class="field">
|
36 |
+
<label for="current_item_giftmessage_sender"><?php echo Mage::helper('giftmessage')->__('From'); ?></label>
|
37 |
+
<div class="input-box">
|
38 |
+
<input type="text" class="input-text" name="current_item_giftmessage_sender" id="current_item_giftmessage_sender" />
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</li>
|
42 |
+
<li class="fields">
|
43 |
+
<div class="field">
|
44 |
+
<label for="current_item_giftmessage_recipient"><?php echo Mage::helper('giftmessage')->__('To'); ?></label>
|
45 |
+
<div class="input-box">
|
46 |
+
<input type="text" class="input-text" name="current_item_giftmessage_recipient" id="current_item_giftmessage_recipient" />
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<li class="fields">
|
51 |
+
<div class="field">
|
52 |
+
<label for="current_item_giftmessage_message"><?php echo Mage::helper('giftmessage')->__('Message'); ?></label>
|
53 |
+
<div class="input-box">
|
54 |
+
<textarea class="textarea" cols="15" rows="2" name="current_item_giftmessage_message" id="current_item_giftmessage_message"></textarea>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</li>
|
58 |
+
</ul>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
<script type="text/javascript">
|
64 |
+
//<![CDATA[
|
65 |
+
var giftMessageSet = new GiftMessageSet();
|
66 |
+
//]]>
|
67 |
+
</script>
|
68 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/giftmessage/helper.phtml
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if($this->getType()!== 'main' && !$this->getScriptIncluded() && $this->getCanDisplayContainer()): ?>
|
28 |
+
<?php echo $this->helper('core/js')->includeScript('mage/adminhtml/giftmessage.js') ?>
|
29 |
+
<?php $this->setScriptIncluded(true); ?>
|
30 |
+
<?php endif; ?>
|
31 |
+
<?php if($this->getCanDisplayContainer()): ?>
|
32 |
+
<div id="<?php echo $this->getId() ?>">
|
33 |
+
<?php endif; ?>
|
34 |
+
<?php switch ($this->getType()): ?>
|
35 |
+
<?php case 'item': ?>
|
36 |
+
<a class="listen-for-click" href="#">
|
37 |
+
<?php if($this->hasGiftMessage()): ?>
|
38 |
+
<?php echo Mage::helper('giftmessage')->__('Edit') ?>
|
39 |
+
<?php else: ?>
|
40 |
+
<?php echo Mage::helper('giftmessage')->__('Add') ?>
|
41 |
+
<?php endif; ?>
|
42 |
+
</a>
|
43 |
+
<?php break; ?>
|
44 |
+
<?php case 'order_item': ?>
|
45 |
+
<a class="listen-for-click" href="#">
|
46 |
+
<?php if($this->hasGiftMessage()): ?>
|
47 |
+
<?php echo Mage::helper('giftmessage')->__('Edit') ?>
|
48 |
+
<?php else: ?>
|
49 |
+
<?php echo Mage::helper('giftmessage')->__('Add') ?>
|
50 |
+
<?php endif; ?>
|
51 |
+
</a>
|
52 |
+
<?php break; ?>
|
53 |
+
<?php case 'main': ?>
|
54 |
+
<?php if($this->hasGiftMessage()): ?>
|
55 |
+
<?php if($_giftMessage=$this->getMessage()): ?>
|
56 |
+
<span class="field-row">
|
57 |
+
<label><?php echo Mage::helper('giftmessage')->__('From') ?></label>
|
58 |
+
<?php echo $this->htmlEscape($_giftMessage->getSender()) ?>
|
59 |
+
</span>
|
60 |
+
<span class="field-row">
|
61 |
+
<label><?php echo Mage::helper('giftmessage')->__('To') ?></label>
|
62 |
+
<?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?>
|
63 |
+
</span>
|
64 |
+
<span class="field-row">
|
65 |
+
<label><?php echo Mage::helper('giftmessage')->__('Message') ?></label>
|
66 |
+
<div class="f-left"><?php echo $this->prepareAsIs($_giftMessage->getMessage()) ?></div>
|
67 |
+
</span>
|
68 |
+
<?php endif; ?>
|
69 |
+
<?php echo $this->getWidgetButtonHtml(Mage::helper('giftmessage')->__('Edit'), 'edit') ?>
|
70 |
+
<?php else: ?>
|
71 |
+
<?php echo $this->getWidgetButtonHtml(Mage::helper('giftmessage')->__('Add'), 'add') ?>
|
72 |
+
<?php endif; ?>
|
73 |
+
<?php break; ?>
|
74 |
+
<?php case 'order': ?>
|
75 |
+
<?php if($this->hasGiftMessage()): ?>
|
76 |
+
<?php if($_giftMessage=$this->getMessage()): ?>
|
77 |
+
|
78 |
+
<span class="field-row">
|
79 |
+
<label><?php echo Mage::helper('giftmessage')->__('From') ?></label>
|
80 |
+
<?php echo $this->htmlEscape($_giftMessage->getSender()) ?>
|
81 |
+
</span>
|
82 |
+
<span class="field-row">
|
83 |
+
<label><?php echo Mage::helper('giftmessage')->__('To') ?></label>
|
84 |
+
<?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?>
|
85 |
+
</span>
|
86 |
+
<span class="field-row">
|
87 |
+
<label><?php echo Mage::helper('giftmessage')->__('Message') ?></label>
|
88 |
+
<div class="f-left"><?php echo $this->prepareAsIs($_giftMessage->getMessage()) ?></div>
|
89 |
+
</span>
|
90 |
+
|
91 |
+
<?php endif; ?>
|
92 |
+
<?php echo $this->getWidgetButtonHtml(Mage::helper('giftmessage')->__('Edit'), 'edit') ?>
|
93 |
+
<?php else: ?>
|
94 |
+
<?php echo $this->getWidgetButtonHtml(Mage::helper('giftmessage')->__('Add'), 'add') ?>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php break; ?>
|
97 |
+
<?php endswitch ?>
|
98 |
+
<?php if($this->getCanDisplayContainer()): ?>
|
99 |
+
</div>
|
100 |
+
<script type="text/javascript">
|
101 |
+
var <?php echo $this->getJsObjectName() ?> = new GiftMessage('<?php echo $this->getId() ?>');
|
102 |
+
<?php echo $this->getJsObjectName() ?>.url = '<?php echo $this->getEditUrl() ?>';
|
103 |
+
</script>
|
104 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/giftmessage/popup.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($this->getChildHtml()) :?>
|
29 |
+
<div id="gift_options_window_mask" class="popup-window-mask" style="display: none;"></div>
|
30 |
+
<div id="gift_options_configure_new" class="gift_options-popup product-configure-popup" style="display: none;">
|
31 |
+
<div id="gift_options_form_contents">
|
32 |
+
<div class="entry-edit">
|
33 |
+
<div class="entry-edit-head">
|
34 |
+
<h4 class="icon-head fieldset-legend"><?php echo Mage::helper('giftmessage')->__('Gift Options for'); ?> <span id="gift_options_configure_title"></span></h4>
|
35 |
+
</div>
|
36 |
+
<div class="content">
|
37 |
+
<?php echo $this->getChildHtml();?>
|
38 |
+
</div>
|
39 |
+
<div class="buttons-set a-right">
|
40 |
+
<button type="button" class="scalable" id="gift_options_cancel_button"><span><span><span><?php echo Mage::helper('giftmessage')->__('Cancel'); ?></span></span></span></button>
|
41 |
+
<button type="button" class="scalable" id="gift_options_ok_button"><span><span><span><?php echo Mage::helper('giftmessage')->__('OK'); ?></span></span></span></button>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<div id="giftoptions_tooltip_window" class="gift-options-tooltip" style="display:none;">
|
47 |
+
<div id="giftoptions_tooltip_window_content"> </div>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<script type="text/javascript">
|
51 |
+
//<![CDATA[
|
52 |
+
_giftOptions = new GiftOptionsPopup();
|
53 |
+
giftOptionsTooltip.setTooltipWindow('giftoptions_tooltip_window','giftoptions_tooltip_window_content');
|
54 |
+
//]]>
|
55 |
+
</script>
|
56 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/giftmessage/sales/order/create/giftoptions.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php $_item = $this->getItem() ?>
|
29 |
+
<?php if ($_item): ?>
|
30 |
+
<?php $_childHtml = trim($this->getChildHtml('', false));?>
|
31 |
+
<?php if ($_childHtml): ?>
|
32 |
+
<tr class="border">
|
33 |
+
<td class="first">
|
34 |
+
<div>
|
35 |
+
<strong><a class="action-link" href="#" id="gift_options_link_<?php echo $_item->getId() ?>"><?php echo Mage::helper('sales')->__('Gift Options') ?></a></strong><br/>
|
36 |
+
</div>
|
37 |
+
<script type="text/javascript">
|
38 |
+
giftOptionsTooltip.addTargetLink('gift_options_link_<?php echo $_item->getId() ?>', <?php echo $_item->getId() ?>);
|
39 |
+
</script>
|
40 |
+
<div id="gift_options_data_<?php echo $_item->getId() ?>">
|
41 |
+
<?php echo $_childHtml ?>
|
42 |
+
</div>
|
43 |
+
</td>
|
44 |
+
<td></td>
|
45 |
+
<td></td>
|
46 |
+
<td></td>
|
47 |
+
<td></td>
|
48 |
+
<td></td>
|
49 |
+
<td></td>
|
50 |
+
<td class="last"></td>
|
51 |
+
</tr>
|
52 |
+
<?php endif ?>
|
53 |
+
<?php endif ?>
|
app/design/adminhtml/default/default/template/giftmessage/sales/order/create/items.phtml
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($this->canDisplayGiftMessage()): ?>
|
29 |
+
<div class="no-display">
|
30 |
+
<div id="gift-message-form-data-<?php echo $this->getItem()->getId(); ?>">
|
31 |
+
<?php echo $this->getFormHtml();?>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<?php if ($this->getMessageText()): ?>
|
35 |
+
<div class="gift-options-tooltip-content">
|
36 |
+
<div><strong><?php echo $this->helper('giftmessage')->__('Gift Message')?></strong>:</div>
|
37 |
+
<div><?php echo $this->getMessageText(); ?></div>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
40 |
+
</div>
|
41 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/giftmessage/sales/order/view/giftoptions.phtml
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php $_childHtml = trim($this->getChildHtml('', false)); ?>
|
29 |
+
<?php if ($_childHtml): ?>
|
30 |
+
<?php $_item = $this->getItem() ?>
|
31 |
+
<tr class="border">
|
32 |
+
<td>
|
33 |
+
<div class="action-link-holder">
|
34 |
+
<strong><a class="action-link" href="#" id="gift_options_link_<?php echo $_item->getId() ?>"><?php echo Mage::helper('sales')->__('Gift Options') ?></a></strong>
|
35 |
+
</div>
|
36 |
+
<script type="text/javascript">
|
37 |
+
giftOptionsTooltip.addTargetLink('gift_options_link_<?php echo $_item->getId() ?>', <?php echo $_item->getId() ?>);
|
38 |
+
</script>
|
39 |
+
<div id="gift_options_data_<?php echo $_item->getId() ?>">
|
40 |
+
<?php echo $_childHtml ?>
|
41 |
+
</div>
|
42 |
+
</td>
|
43 |
+
<td></td>
|
44 |
+
<td></td>
|
45 |
+
<td></td>
|
46 |
+
<td></td>
|
47 |
+
<td></td>
|
48 |
+
<td></td>
|
49 |
+
<td></td>
|
50 |
+
<td></td>
|
51 |
+
<td class="last"></td>
|
52 |
+
</tr>
|
53 |
+
<?php endif ?>
|
app/design/adminhtml/default/default/template/giftmessage/sales/order/view/items.phtml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($this->canDisplayGiftmessage()): ?>
|
29 |
+
<div id="gift-message-form-data-<?php echo $this->getItem()->getId(); ?>" class="no-display">
|
30 |
+
<form id="<?php echo $this->getFieldId('form') ?>" action="<?php echo $this->getSaveUrl() ?>">
|
31 |
+
<input type="hidden" id="<?php echo $this->getFieldId('type') ?>" name="<?php echo $this->getFieldName('type') ?>" value="order_item" />
|
32 |
+
<input type="hidden" id="<?php echo $this->getFieldId('sender') ?>" name="<?php echo $this->getFieldName('sender') ?>" value="<?php echo $this->getSender() ?>" />
|
33 |
+
<input type="hidden" id="<?php echo $this->getFieldId('recipient') ?>" name="<?php echo $this->getFieldName('recipient') ?>" value="<?php echo $this->getRecipient() ?>" />
|
34 |
+
<input type="hidden" id="<?php echo $this->getFieldId('message') ?>" name="<?php echo $this->getFieldName('message') ?>" value="<?php echo $this->getMessageText() ?>" />
|
35 |
+
</form>
|
36 |
+
|
37 |
+
<?php if ($this->getMessageText()): ?>
|
38 |
+
<div class="gift-options-tooltip-content">
|
39 |
+
<div><strong><?php echo $this->helper('giftmessage')->__('Gift Message')?></strong>: </div>
|
40 |
+
<div><?php echo $this->getMessageText() ?></div>
|
41 |
+
</div>
|
42 |
+
<?php endif; ?>
|
43 |
+
</div>
|
44 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/googlebase/captcha.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php if( $this->getGbaseCaptchaToken() && $this->getGbaseCaptchaUrl()): ?>
|
28 |
+
<ul class="messages">
|
29 |
+
<li class="error-msg">
|
30 |
+
<ul>
|
31 |
+
<li><img src="<?php echo $this->getGbaseCaptchaUrl() ?>"> <input type="text" id="user_confirm"> <?php echo $this->getConfirmButtonHtml() ?></li>
|
32 |
+
</ul>
|
33 |
+
</li>
|
34 |
+
</ul>
|
35 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/googlebase/items.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php echo $this->getCaptchaHtml() ?>
|
29 |
+
|
30 |
+
<?php echo $this->getStoreSwitcherHtml() ?>
|
31 |
+
|
32 |
+
<div class="entry-edit">
|
33 |
+
<div class="entry-edit-head">
|
34 |
+
<div style="float: right;"></div>
|
35 |
+
<h4 class="fieldset-legend"><?php echo $this->__('Google Base Items') ?></h4>
|
36 |
+
</div>
|
37 |
+
<?php echo $this->getChildHtml('item') ?>
|
38 |
+
</div>
|
39 |
+
<div class="entry-edit">
|
40 |
+
<div class="entry-edit-head">
|
41 |
+
<div style="float: right;"><?php echo $this->getAddButtonHtml() ?></div>
|
42 |
+
<h4 class="fieldset-legend"><?php echo $this->__('Available Products') ?></h4>
|
43 |
+
</div>
|
44 |
+
<?php echo $this->getChildHtml('product') ?>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
|
48 |
+
<script type="text/javascript">
|
49 |
+
var productsGridElement = $('<?php echo $this->getChild('product')->getId() ?>');
|
50 |
+
productsGridElement.hide();
|
51 |
+
$('products_grid_button').observe('click', function (event) {
|
52 |
+
var element = event.element();
|
53 |
+
productsGridElement.visible() ? productsGridElement.hide() : productsGridElement.show();
|
54 |
+
});
|
55 |
+
</script>
|
app/design/adminhtml/default/default/template/googlebase/types/edit/attributes.phtml
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if( $this->getAttributeSetSelected() ): ?>
|
29 |
+
<script type="text/javascript">
|
30 |
+
Gbase = {};
|
31 |
+
Gbase.Attribute = Class.create();
|
32 |
+
Gbase.Attribute.prototype = {
|
33 |
+
idLabel : '<?php echo $this->getFieldId() ?>',
|
34 |
+
top : '',
|
35 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
36 |
+
templateText : '',
|
37 |
+
itemsCount : 0,
|
38 |
+
initialize : function(template) {
|
39 |
+
this.templateText = template;
|
40 |
+
this.top = $('gbase_attribute_top');
|
41 |
+
},
|
42 |
+
|
43 |
+
add : function(data) {
|
44 |
+
if(!data){
|
45 |
+
data = {};
|
46 |
+
}
|
47 |
+
this.top = $('gbase_attribute_top');
|
48 |
+
|
49 |
+
data.index = this.itemsCount++;
|
50 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
51 |
+
Element.insert(this.top, {'after':this.template.evaluate(data)});
|
52 |
+
this.top = $(this.idLabel + '_' + data.index);
|
53 |
+
|
54 |
+
//set selected type
|
55 |
+
if (data.attribute_id) {
|
56 |
+
$A($(this.idLabel + '_'+data.index+'_attribute').options).each(function(option){
|
57 |
+
if (option.value==data.attribute_id) option.selected = true;
|
58 |
+
});
|
59 |
+
}
|
60 |
+
|
61 |
+
//set selected is_require
|
62 |
+
if (data.gbase_attribute) {
|
63 |
+
$A($(this.idLabel + '_'+data.index+'_gattribute').options).each(function(option){
|
64 |
+
if (option.value==data.gbase_attribute) option.selected = true;
|
65 |
+
});
|
66 |
+
}
|
67 |
+
return data.index;
|
68 |
+
},
|
69 |
+
|
70 |
+
remove : function(event){
|
71 |
+
var element = $(Event.findElement(event, 'div'));
|
72 |
+
if(element){
|
73 |
+
Element.select(element, '.delete').each(function(elem){elem.value='1'});
|
74 |
+
Element.select(element, ['input', 'select']).each(function(elem){elem.hide(); elem.className = '';});
|
75 |
+
Element.hide(element);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
var attributesSelectTemplate = '<div id="<?php echo $this->getFieldId() ?>_{{index}}" class="option-box"> ' +
|
81 |
+
'<table class="option-header" cellpadding="0" cellspacing="0">' +
|
82 |
+
'<thead>' +
|
83 |
+
'<tr>' +
|
84 |
+
'<th class="opt-type"><?php echo Mage::helper('googlebase')->__('Attribute') ?></th>' +
|
85 |
+
'<th class="opt-req"><?php echo Mage::helper('googlebase')->__('Google Base Attribute') ?></th>' +
|
86 |
+
'<th> </th>' +
|
87 |
+
'</tr>' +
|
88 |
+
'</thead>' +
|
89 |
+
'<tbody>' +
|
90 |
+
'<tr>' +
|
91 |
+
'<td><?php echo $this->getAttributesSelectHtml(true) ?>' +
|
92 |
+
'<input type="hidden" name="<?php echo $this->getFieldName() ?>[{{index}}][delete]" value="" class="delete">' +
|
93 |
+
'</td>' +
|
94 |
+
'<td><?php echo $this->getGbaseAttributesSelectHtml() ?></td>' +
|
95 |
+
'<td> <?php echo $this->getDeleteButtonHtml() ?></td>' +
|
96 |
+
'</tr>' +
|
97 |
+
'</tbody>' +
|
98 |
+
'</table>' +
|
99 |
+
'</div>';
|
100 |
+
var optionIndex = 0;
|
101 |
+
gBaseAttribute = new Gbase.Attribute(attributesSelectTemplate);
|
102 |
+
</script>
|
103 |
+
|
104 |
+
<div class="entry-edit custom-options bundle" id="gbase_attributes_container">
|
105 |
+
<div class="entry-edit-head">
|
106 |
+
<h4><?php echo $this->__('Attributes') ?></h4>
|
107 |
+
<div class="right"><?php echo $this->getAddButtonHtml() ?></div>
|
108 |
+
</div>
|
109 |
+
|
110 |
+
<div id="gbase_attribute" class="box">
|
111 |
+
<div id="gbase_attribute_top"></div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<?php if($attributes = $this->getAttributesData()): ?>
|
116 |
+
<script type="text/javascript">
|
117 |
+
<?php foreach ($attributes as $data): ?>
|
118 |
+
gBaseAttribute.add(<?php echo $this->_toJson($data) ?>);
|
119 |
+
<?php endforeach; ?>
|
120 |
+
</script>
|
121 |
+
<?php endif; ?>
|
122 |
+
|
123 |
+
<?php else: ?>
|
124 |
+
<?php echo Mage::helper('googlebase')->__("Please, select Attribute Set and Google Item Type to load attributes") ?>
|
125 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/importexport/busy.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<h3><?php echo $this->__('System busy'); ?></h3>
|
29 |
+
</div>
|
30 |
+
<div class="entry-edit">
|
31 |
+
<div class="entry-edit-head">
|
32 |
+
<h4><?php echo $this->__('Status'); ?></h4>
|
33 |
+
</div>
|
34 |
+
<div class="fieldset ">
|
35 |
+
<ul class="messages">
|
36 |
+
<li class="success-msg">
|
37 |
+
<ul>
|
38 |
+
<li><?php echo $this->getStatusMessage(); ?></li>
|
39 |
+
</ul>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
</div>
|
43 |
+
</div>
|
app/design/adminhtml/default/default/template/importexport/export/form/after.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit" id="export_filter_container" style="display:none;">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo $this->__('Entity Attributes'); ?></h4>
|
30 |
+
</div>
|
31 |
+
<form id="export_filter_form" action="<?php echo $this->getUrl('*/*/export') ?>" method="post">
|
32 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
33 |
+
<div id="export_filter_grid_container" class="fieldset"><!-- --></div>
|
34 |
+
</form>
|
35 |
+
<div class="a-right">
|
36 |
+
<button class="scalable" type="button" onclick="getFile();"><span><span><span><?php echo $this->__('Continue') ?></span></span></span></button>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<script type="text/javascript">
|
40 |
+
//<![CDATA[
|
41 |
+
$('entity').selectedIndex = 0; // forced resetting entity selector after page refresh
|
42 |
+
//]]>
|
43 |
+
</script>
|
app/design/adminhtml/default/default/template/importexport/export/form/before.phtml
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
/**
|
30 |
+
* Post form data and process response via AJAX.
|
31 |
+
*
|
32 |
+
* @return void
|
33 |
+
*/
|
34 |
+
varienForm.prototype.getFilter = function()
|
35 |
+
{
|
36 |
+
if ($('entity') && $F('entity')) {
|
37 |
+
var url = "<?php echo $this->getUrl('*/*/getFilter') ?>";
|
38 |
+
url += ((url.slice(-1) != '/') ? '/' : '') + 'entity/' + $F('entity');
|
39 |
+
|
40 |
+
new Ajax.Request(url, {
|
41 |
+
method: 'post',
|
42 |
+
//parameters: $(this.formId).serialize(),
|
43 |
+
evalScripts: true,
|
44 |
+
onComplete: function(transport) {
|
45 |
+
var responseText = transport.responseText.replace(/>\s+</g, '><');
|
46 |
+
$('export_filter_grid_container').update(responseText);
|
47 |
+
$('export_filter_container').show();
|
48 |
+
}
|
49 |
+
});
|
50 |
+
} else {
|
51 |
+
$('export_filter_container').hide();
|
52 |
+
}
|
53 |
+
};
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Continue export process after filter settings.
|
57 |
+
*
|
58 |
+
* return void
|
59 |
+
*/
|
60 |
+
function getFile()
|
61 |
+
{
|
62 |
+
if ($('entity') && $('file_format')) {
|
63 |
+
var form = $('export_filter_form');
|
64 |
+
var oldAction = form.action;
|
65 |
+
form.action = oldAction + ((oldAction.slice(-1) != '/') ? '/' : '') + 'entity/' + $F('entity') + '/file_format/' + $F('file_format');
|
66 |
+
form.submit();
|
67 |
+
form.action = oldAction;
|
68 |
+
} else {
|
69 |
+
alert('Invalid data');
|
70 |
+
}
|
71 |
+
}
|
72 |
+
//]]>
|
73 |
+
</script>
|
app/design/adminhtml/default/default/template/importexport/import/form/after.phtml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="entry-edit" id="import_validation_container" style="display:none;">
|
28 |
+
<div class="entry-edit-head">
|
29 |
+
<h4 class="icon-head head-edit-form fieldset-legend" id="import_validation_container_header"><?php echo $this->__('Validation Results'); ?></h4>
|
30 |
+
</div>
|
31 |
+
<div id="import_validation_messages" class="fieldset "><!-- --></div>
|
32 |
+
</div>
|
app/design/adminhtml/default/default/template/importexport/import/form/before.phtml
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
/**
|
30 |
+
* Name and ID for iframe for data POST-ing.
|
31 |
+
*
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
varienForm.prototype.ifrElemName = 'import_post_target_frame';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Post form data to dynamic iframe.
|
38 |
+
*
|
39 |
+
* @param string newActionUrl OPTIONAL Change form action to this if specified
|
40 |
+
* @return void
|
41 |
+
*/
|
42 |
+
varienForm.prototype.postToFrame = function(newActionUrl)
|
43 |
+
{
|
44 |
+
if(this.validate()){
|
45 |
+
// create dynamic frame
|
46 |
+
if (!$(this.ifrElemName)) {
|
47 |
+
$('html-body').insert({
|
48 |
+
bottom:'<iframe name="' + this.ifrElemName + '" id="' + this.ifrElemName + '" style="display:none;"/>'
|
49 |
+
});
|
50 |
+
}
|
51 |
+
|
52 |
+
// show mask, temporary set new target and submit form
|
53 |
+
var loadingMask = $('loading-mask');
|
54 |
+
var formElem = $(this.formId);
|
55 |
+
var oldTarget = formElem.target;
|
56 |
+
var oldAction = formElem.action;
|
57 |
+
|
58 |
+
Element.clonePosition(loadingMask, $$('#html-body .wrapper')[0], {offsetLeft:-2})
|
59 |
+
toggleSelectsUnderBlock(loadingMask, false);
|
60 |
+
loadingMask.show();
|
61 |
+
setLoaderPosition();
|
62 |
+
formElem.target = this.ifrElemName;
|
63 |
+
|
64 |
+
if (newActionUrl) {
|
65 |
+
formElem.action = newActionUrl;
|
66 |
+
}
|
67 |
+
formElem.action += (formElem.action.lastIndexOf('?') != -1 ? '&' : '?')
|
68 |
+
+ 'form_key=' + encodeURIComponent(formElem.form_key.value);
|
69 |
+
this._submit();
|
70 |
+
formElem.target = oldTarget;
|
71 |
+
formElem.action = oldAction;
|
72 |
+
}
|
73 |
+
};
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Actions after data post complete. Hide load mask, remove iframe, run response processing method.
|
77 |
+
*
|
78 |
+
* @param object response
|
79 |
+
* @return void
|
80 |
+
*/
|
81 |
+
varienForm.prototype.postToFrameComplete = function(response)
|
82 |
+
{
|
83 |
+
var loadingMask = $('loading-mask');
|
84 |
+
$(this.ifrElemName).remove();
|
85 |
+
toggleSelectsUnderBlock(loadingMask, true);
|
86 |
+
loadingMask.hide();
|
87 |
+
this.postToFrameProcessResponse(response);
|
88 |
+
};
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Process response JSON.
|
92 |
+
*
|
93 |
+
* @param object response
|
94 |
+
* @return void
|
95 |
+
*/
|
96 |
+
varienForm.prototype.postToFrameProcessResponse = function(response)
|
97 |
+
{
|
98 |
+
if ('object' != typeof(response)) {
|
99 |
+
return alert('Invalid response');
|
100 |
+
}
|
101 |
+
$H(response).each(function(pair) {
|
102 |
+
switch (pair.key) {
|
103 |
+
case 'show':
|
104 |
+
case 'clear':
|
105 |
+
case 'hide':
|
106 |
+
$H(pair.value).each(function(val) {if ($(val.value)) $(val.value)[pair.key]();});
|
107 |
+
break;
|
108 |
+
case 'innerHTML':
|
109 |
+
case 'value':
|
110 |
+
$H(pair.value).each(function(val) {if ($(val.key)) $(val.key)[pair.key] = val.value;});
|
111 |
+
break;
|
112 |
+
case 'removeClassName':
|
113 |
+
case 'addClassName':
|
114 |
+
$H(pair.value).each(function(val) {if ($(val.key)) $(val.key)[pair.key](val.value);});
|
115 |
+
break;
|
116 |
+
default:
|
117 |
+
alert(pair.key + ': ' + pair.value);
|
118 |
+
break;
|
119 |
+
}
|
120 |
+
});
|
121 |
+
};
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Send form data to Start action when file is validated.
|
125 |
+
*
|
126 |
+
* @param string newActionUrl
|
127 |
+
* @param string sourceFileField
|
128 |
+
* @return void
|
129 |
+
*/
|
130 |
+
varienForm.prototype.startImport = function(newActionUrl, sourceFileField)
|
131 |
+
{
|
132 |
+
$(sourceFileField).removeClassName('required-entry');
|
133 |
+
this.postToFrame(newActionUrl);
|
134 |
+
$(sourceFileField).addClassName('required-entry');
|
135 |
+
};
|
136 |
+
//]]>
|
137 |
+
</script>
|
app/design/adminhtml/default/default/template/importexport/import/frame/result.phtml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<script type='text/javascript'>
|
28 |
+
//<![CDATA[
|
29 |
+
top.editForm.postToFrameComplete(<?php echo $this->getResponseJson() ?>);
|
30 |
+
//]]>
|
31 |
+
</script>
|
app/design/adminhtml/default/default/template/index/notifications.phtml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_processes = $this->getProcessesForReindex()?>
|
28 |
+
<?php if($_processes):?>
|
29 |
+
<div class="notification-global">
|
30 |
+
<strong><?php echo $this->helper('index')->__('One or more of the Indexes are not up to date:') ?></strong>
|
31 |
+
<?php echo implode(', ', $_processes)?>.
|
32 |
+
<?php echo $this->helper('index')->__('Click here to go to <a href="%s">Index Management</a> and rebuild required indexes.', $this->getManageUrl());?>
|
33 |
+
</div>
|
34 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/login.phtml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html lang="en">
|
29 |
+
<head>
|
30 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
31 |
+
<title><?php echo Mage::helper('adminhtml')->__('Log into Magento Admin Page') ?></title>
|
32 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('reset.css') ?>" media="all" />
|
33 |
+
<link type="text/css" rel="stylesheet" href="<?php echo $this->getSkinUrl('boxes.css') ?>" media="all" />
|
34 |
+
<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon" />
|
35 |
+
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon" />
|
36 |
+
|
37 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/prototype.js') ?>"></script>
|
38 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('prototype/validation.js') ?>"></script>
|
39 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('scriptaculous/effects.js') ?>"></script>
|
40 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/adminhtml/form.js') ?>"></script>
|
41 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('mage/captcha.js') ?>"></script>
|
42 |
+
|
43 |
+
<!--[if IE]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('iestyles.css') ?>" type="text/css" media="all" /> <![endif]-->
|
44 |
+
<!--[if lt IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('below_ie7.css') ?>" type="text/css" media="all" /> <![endif]-->
|
45 |
+
<!--[if IE 7]> <link rel="stylesheet" href="<?php echo $this->getSkinUrl('ie7.css') ?>" type="text/css" media="all" /> <![endif]-->
|
46 |
+
</head>
|
47 |
+
<body id="page-login" onload="document.forms.loginForm.username.focus();">
|
48 |
+
<div class="login-container">
|
49 |
+
<div class="login-box">
|
50 |
+
<form method="post" action="" id="loginForm">
|
51 |
+
<div class="login-form">
|
52 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
53 |
+
<h2><?php echo Mage::helper('adminhtml')->__('Log in to Admin Panel') ?></h2>
|
54 |
+
<div id="messages">
|
55 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
56 |
+
</div>
|
57 |
+
<div class="input-box input-left"><label for="username"><?php echo Mage::helper('adminhtml')->__('User Name:') ?></label><br/>
|
58 |
+
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" /></div>
|
59 |
+
<div class="input-box input-right"><label for="login"><?php echo Mage::helper('adminhtml')->__('Password:') ?></label><br />
|
60 |
+
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" /></div>
|
61 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
62 |
+
<div class="clear"></div>
|
63 |
+
<div class="form-buttons">
|
64 |
+
<a class="left" href="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/index/forgotpassword', array('_nosecret' => true)) ?>"><?php echo Mage::helper('adminhtml')->__('Forgot your password?') ?></a>
|
65 |
+
<input type="submit" class="form-button" value="<?php echo Mage::helper('adminhtml')->__('Login') ?>" title="<?php echo Mage::helper('adminhtml')->__('Login') ?>" /></div>
|
66 |
+
</div>
|
67 |
+
<p class="legal"><?php echo Mage::helper('adminhtml')->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')) ?></p>
|
68 |
+
</form>
|
69 |
+
<div class="bottom"></div>
|
70 |
+
<script type="text/javascript">
|
71 |
+
var loginForm = new varienForm('loginForm');
|
72 |
+
</script>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
</body>
|
76 |
+
</html>
|
77 |
+
|
app/design/adminhtml/default/default/template/media/editor.phtml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('lib/flex.js') ?>
|
28 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('lib/FABridge.js') ?>
|
29 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('mage/adminhtml/image.js') ?>
|
30 |
+
<div id="<?php echo $this->getHtmlId() ?>" class="editor" style="width:100%; height:100%;">
|
31 |
+
<div class="buttons" style="margin-bottom: 20px;">
|
32 |
+
<?php echo $this->getRotatecwButtonHtml() ?>
|
33 |
+
<?php echo $this->getRotateccwButtonHtml() ?>
|
34 |
+
<input type="text" id="<?php echo $this->_getButtonId('width') ?>" size="7"/>
|
35 |
+
x
|
36 |
+
<input type="text" id="<?php echo $this->_getButtonId('height') ?>" size="7"/> px
|
37 |
+
<?php echo $this->getResizeButtonHtml() ?>
|
38 |
+
<?php echo $this->getImageButtonHtml() ?>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
|
42 |
+
</div>
|
43 |
+
<textarea id="<?php echo $this->_getButtonId('b64') ?>" rows="10" cols="50"></textarea>
|
44 |
+
<script type="text/javascript">
|
45 |
+
<?php echo $this->getJsObjectName() ?> = new Flex.ImageEditor('<?php echo $this->getHtmlId() ?>', '<?php echo $this->getSkinUrl('media/editor.swf') ?>', <?php echo $this->getConfigJson() ?>);
|
46 |
+
</script>
|
app/design/adminhtml/default/default/template/media/uploader.phtml
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Media_Uploader
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('lib/flex.js') ?>
|
34 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('mage/adminhtml/flexuploader.js') ?>
|
35 |
+
<?php echo $this->helper('adminhtml/js')->includeScript('lib/FABridge.js') ?>
|
36 |
+
|
37 |
+
<div id="<?php echo $this->getHtmlId() ?>" class="uploader">
|
38 |
+
<div class="buttons">
|
39 |
+
<?php /* buttons included in flex object */ ?>
|
40 |
+
<?php /*echo $this->getBrowseButtonHtml()*/ ?>
|
41 |
+
<?php /*echo $this->getUploadButtonHtml()*/ ?>
|
42 |
+
<div id="<?php echo $this->getHtmlId() ?>-install-flash" style="display:none">
|
43 |
+
<?php echo Mage::helper('media')->__('This content requires last version of Adobe Flash Player. <a href="%s">Get Flash</a>', 'http://www.adobe.com/go/getflash/') ?>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<div class="clear"></div>
|
47 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>-template">
|
48 |
+
<div id="{{id}}" class="file-row">
|
49 |
+
<span class="file-info">{{name}} ({{size}})</span>
|
50 |
+
<span class="delete-button"><?php echo $this->getDeleteButtonHtml() ?></span>
|
51 |
+
<span class="progress-text"></span>
|
52 |
+
<div class="clear"></div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<div class="no-display" id="<?php echo $this->getHtmlId() ?>-template-progress">
|
56 |
+
{{percent}}% {{uploaded}} / {{total}}
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
|
60 |
+
<script type="text/javascript">
|
61 |
+
//<![CDATA[
|
62 |
+
|
63 |
+
var maxUploadFileSizeInBytes = <?php echo $this->getDataMaxSizeInBytes() ?>;
|
64 |
+
var maxUploadFileSize = '<?php echo $this->getDataMaxSize() ?>';
|
65 |
+
|
66 |
+
<?php echo $this->getJsObjectName() ?> = new Flex.Uploader('<?php echo $this->getHtmlId() ?>', '<?php echo $this->getUploaderUrl('media/uploader.swf') ?>', <?php echo $this->getConfigJson() ?>);
|
67 |
+
|
68 |
+
if (varienGlobalEvents) {
|
69 |
+
varienGlobalEvents.attachEventHandler('tabChangeBefore', <?php echo $this->getJsObjectName() ?>.onContainerHideBefore);
|
70 |
+
}
|
71 |
+
|
72 |
+
//]]>
|
73 |
+
</script>
|
app/design/adminhtml/default/default/template/moneybookers/info.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category design
|
16 |
+
* @package default_default
|
17 |
+
* @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?><br />
|
22 |
+
<?php if ($this->getInfo()->getLastTransId() == ''): ?>
|
23 |
+
<?php echo Mage::helper('moneybookers')->__('Payment has not been processed yet.') ?><br />
|
24 |
+
<?php else: ?>
|
25 |
+
<?php echo Mage::helper('moneybookers')->__('Moneybookers Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) ?><br />
|
26 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/moneybookers/jsinit.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category design
|
16 |
+
* @package default_default
|
17 |
+
* @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
|
22 |
+
<script type="text/javascript">
|
23 |
+
//<![CDATA[
|
24 |
+
function initMoneybookers() {
|
25 |
+
if (!document.getElementById("moneybookers_settings_activationstatus")) {
|
26 |
+
// Don't perform for website and store view
|
27 |
+
return;
|
28 |
+
}
|
29 |
+
document.getElementById("moneybookers_settings_activationstatus").style.display = "none";
|
30 |
+
$('moneybookers_settings_activationstatus').up().insert('<button type="button" id="moneybookers_multifuncbutton" onclick="moneybookers.button()" style="display: none; margin-top: 1em;"><span id="moneybookers_multifuncbutton_label" style="display:block; margin-top:1em;"></span></button>');
|
31 |
+
$('moneybookers_settings_activationstatus').up().insert('<span id="moneybookers_inf_div" style="display:block; margin-top:1em;"></span>');
|
32 |
+
$('moneybookers_settings_activationstatus').up().insert('<input id="moneybookers_settings_customer_id_hidden" type="hidden"/>');
|
33 |
+
moneybookers = new Moneybookers('<?php echo $this->getSkinUrl('images/moneybookers/banner.jpg'); ?>', '<?php echo $this->getUrl('*/moneybookers/activateemail'); ?>', '<?php echo $this->getUrl('*/moneybookers/checksecret'); ?>', '<?php echo $this->getUrl('*/moneybookers/checkemail');?>');
|
34 |
+
}
|
35 |
+
//]]>
|
36 |
+
</script>
|
37 |
+
|
app/design/adminhtml/default/default/template/moneybookers/pdf/info.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* @category design
|
16 |
+
* @package default_default
|
17 |
+
* @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
?>
|
21 |
+
<?php echo $this->getMethod()->getTitle() ?>
|
22 |
+
{{pdf_row_separator}}
|
23 |
+
<?php echo Mage::helper('moneybookers')->__('Moneybookers Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) ?>
|
24 |
+
{{pdf_row_separator}}
|
app/design/adminhtml/default/default/template/newsletter/preview/iframeswitcher.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/* @var $this Mage_Core_Block_Template */
|
29 |
+
?>
|
30 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
31 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
32 |
+
<head>
|
33 |
+
<?php echo $this->getChildHtml('head') ?>
|
34 |
+
<style type="text/css">
|
35 |
+
html,body { height:100%; }
|
36 |
+
</style>
|
37 |
+
</head>
|
38 |
+
<body id="html-body" style="background:#fff;">
|
39 |
+
<div id="preview" class="cms-revision-preview">
|
40 |
+
<div class="toolbar">
|
41 |
+
<?php if (!Mage::app()->isSingleStoreMode()) :?>
|
42 |
+
<p class="switcher">
|
43 |
+
<?php echo $this->getChildHtml('store_switcher') ?>
|
44 |
+
<button class="button" onclick="preview();"><span><span><span><?php echo $this->__('Preview'); ?></span></span></span></button>
|
45 |
+
</p>
|
46 |
+
<?php endif;?>
|
47 |
+
</div>
|
48 |
+
<iframe name="preview_iframe" id="preview_iframe" frameborder="0"></iframe>
|
49 |
+
<?php echo $this->getChildHtml('preview_form'); ?>
|
50 |
+
</div>
|
51 |
+
<div id="loading-mask" style="display:none">
|
52 |
+
<p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo Mage::helper('adminhtml')->__('Please wait...') ?></p>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
var previewForm = $('preview_form');
|
58 |
+
var loadingMask = $('loading-mask');
|
59 |
+
var previewIframe = $('preview_iframe');
|
60 |
+
|
61 |
+
function preview() {
|
62 |
+
previewForm.writeAttribute('target', previewIframe.readAttribute('id'));
|
63 |
+
blockPreview();
|
64 |
+
previewForm.submit();
|
65 |
+
}
|
66 |
+
|
67 |
+
function blockPreview() {
|
68 |
+
var cumulativeOffset = $('preview').cumulativeOffset();
|
69 |
+
$('loading-mask').setStyle({
|
70 |
+
top: ( cumulativeOffset.top ) + 'px',
|
71 |
+
left: ( cumulativeOffset.left ) + 'px',
|
72 |
+
width: $('preview').getWidth() + 'px',
|
73 |
+
height: $('preview').getHeight() + 'px'
|
74 |
+
});
|
75 |
+
|
76 |
+
toggleSelectsUnderBlock($('loading-mask'), false);
|
77 |
+
Element.show('loading-mask');
|
78 |
+
setLoaderPosition();
|
79 |
+
}
|
80 |
+
|
81 |
+
function unBlockPreview() {
|
82 |
+
toggleSelectsUnderBlock(loadingMask, true);
|
83 |
+
Element.hide(loadingMask);
|
84 |
+
}
|
85 |
+
|
86 |
+
Event.observe(window, 'load', preview);
|
87 |
+
Event.observe(previewIframe, 'load', unBlockPreview);
|
88 |
+
//]]>
|
89 |
+
</script>
|
90 |
+
</body>
|
91 |
+
</html>
|
app/design/adminhtml/default/default/template/newsletter/preview/store.phtml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($websites = $this->getWebsites()): ?>
|
29 |
+
<label for="store_switcher"><?php echo $this->__('Choose Store View:') ?></label>
|
30 |
+
<select name="store_switcher" id="store_switcher">
|
31 |
+
<?php foreach ($websites as $website): ?>
|
32 |
+
<?php $showWebsite=false; ?>
|
33 |
+
<?php foreach ($website->getGroups() as $group): ?>
|
34 |
+
<?php $showGroup=false; ?>
|
35 |
+
<?php foreach ($this->getStores($group) as $store): ?>
|
36 |
+
<?php if ($showWebsite == false): ?>
|
37 |
+
<?php $showWebsite = true; ?>
|
38 |
+
<optgroup label="<?php echo $website->getName() ?>"></optgroup>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if ($showGroup == false): ?>
|
41 |
+
<?php $showGroup = true; ?>
|
42 |
+
<optgroup label=" <?php echo $group->getName() ?>">
|
43 |
+
<?php endif; ?>
|
44 |
+
<option value="<?php echo $store->getId() ?>"<?php if($this->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>> <?php echo $store->getName() ?></option>
|
45 |
+
<?php endforeach; ?>
|
46 |
+
<?php if ($showGroup): ?>
|
47 |
+
</optgroup>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
<?php endforeach; ?>
|
51 |
+
</select>
|
52 |
+
<?php echo $this->getHintHtml() ?>
|
53 |
+
<script type="text/javascript">
|
54 |
+
//<![CDATA[
|
55 |
+
Event.observe($('store_switcher'), 'change', function(event) {
|
56 |
+
var element = Event.element(event);
|
57 |
+
$('preview_store_id').value = element.value;
|
58 |
+
});
|
59 |
+
//]]>
|
60 |
+
</script>
|
61 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/newsletter/problem/list.phtml
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-newsletter-report"><?php echo Mage::helper('newsletter')->__('Newsletter Problem Reports') ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<div>
|
38 |
+
<?php echo $this->getChildHtml('grid') ?>
|
39 |
+
</div>
|
40 |
+
<?php if($this->getShowButtons()): ?>
|
41 |
+
<div class="form-buttons">
|
42 |
+
<?php echo $this->getUnsubscribeButtonHtml(); ?>
|
43 |
+
<?php echo $this->getDeleteButtonHtml(); ?>
|
44 |
+
</div>
|
45 |
+
<?php endif ?>
|
46 |
+
<script type="text/javascript">
|
47 |
+
<!--
|
48 |
+
var problemController = {
|
49 |
+
checkCheckboxes: function(controlCheckbox) {
|
50 |
+
var elements = $('problemGrid').getElementsByClassName('problemCheckbox');
|
51 |
+
elements.each(function(obj){
|
52 |
+
obj.checked = controlCheckbox.checked;
|
53 |
+
});
|
54 |
+
},
|
55 |
+
rowClick: function (e) {
|
56 |
+
if(!Event.element(e).hasClassName('problemCheckbox')) {
|
57 |
+
var elements = Event.findElement(e, 'tr').getElementsByClassName('problemCheckbox');
|
58 |
+
if(elements.length != 1) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
elements[0].checked = !elements[0].checked;
|
62 |
+
}
|
63 |
+
},
|
64 |
+
|
65 |
+
unsubscribe: function () {
|
66 |
+
var elements = $$('input.problemCheckbox');
|
67 |
+
var serializedElements = Form.serializeElements(elements, true);
|
68 |
+
serializedElements._unsubscribe = '1';
|
69 |
+
serializedElements.form_key = FORM_KEY;
|
70 |
+
var url = problemGridJsObject.url;
|
71 |
+
|
72 |
+
new Ajax.Updater('problemGrid', url + '?ajax=1',
|
73 |
+
{parameters: serializedElements,
|
74 |
+
evalScripts: true,
|
75 |
+
onComplete:problemGridJsObject.initGrid.bind(problemGridJsObject)});
|
76 |
+
},
|
77 |
+
|
78 |
+
deleteSelected: function () {
|
79 |
+
var elements = $$('input.problemCheckbox');
|
80 |
+
var serializedElements = Form.serializeElements(elements, true);
|
81 |
+
serializedElements._delete = '1';
|
82 |
+
serializedElements.form_key = FORM_KEY;
|
83 |
+
var url = problemGridJsObject.url;
|
84 |
+
|
85 |
+
new Ajax.Updater('problemGrid', url + '?ajax=1',
|
86 |
+
{parameters: serializedElements,
|
87 |
+
evalScripts: true,
|
88 |
+
onComplete:problemGridJsObject.initGrid.bind(problemGridJsObject)});
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
varienGlobalEvents.attachEventHandler('gridRowClick', problemController.rowClick.bind(problemController));
|
93 |
+
//-->
|
94 |
+
</script>
|
app/design/adminhtml/default/default/template/newsletter/queue/edit.phtml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/* @var $this Mage_Adminhtml_Block_Newsletter_Queue_Edit */
|
27 |
+
?>
|
28 |
+
<div class="content-header">
|
29 |
+
<table cellspacing="0">
|
30 |
+
<tr>
|
31 |
+
<td><h3><?php echo $this->getHeaderText() ?></h3></td>
|
32 |
+
<td class="form-buttons">
|
33 |
+
<?php echo $this->getBackButtonHtml() ?>
|
34 |
+
<?php echo $this->getPreviewButtonHtml(); ?>
|
35 |
+
<?php if(!$this->getIsPreview()): ?>
|
36 |
+
<?php echo $this->getResetButtonHtml() ?>
|
37 |
+
<?php echo $this->getSaveButtonHtml() ?>
|
38 |
+
<?php endif ?>
|
39 |
+
<?php if($this->getCanResume()): ?>
|
40 |
+
<?php echo $this->getResumeButtonHtml() ?>
|
41 |
+
<?php endif ?>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
</table>
|
45 |
+
</div>
|
46 |
+
<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="queue_edit_form">
|
47 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
48 |
+
<div class="no-display">
|
49 |
+
<input type="hidden" name="_resume" id="_resume_flag" value="" />
|
50 |
+
</div>
|
51 |
+
<?php echo $this->getChildHtml('form') ?>
|
52 |
+
</form>
|
53 |
+
<form action="<?php echo $this->getPreviewUrl() ?>" method="post" id="newsletter_queue_preview_form" target="_blank">
|
54 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
55 |
+
<div class="no-display">
|
56 |
+
<input type="hidden" id="preview_type" name="type" value="<?php echo $this->getIsTextType()?1:2 ?>" />
|
57 |
+
<input type="hidden" id="preview_text" name="text" value="" />
|
58 |
+
<input type="hidden" id="preview_styles" name="styles" value="" />
|
59 |
+
<input type="hidden" id="preview_id" name="id" value="" />
|
60 |
+
</div>
|
61 |
+
</form>
|
62 |
+
<script type="text/javascript">
|
63 |
+
//<![CDATA[
|
64 |
+
var queueForm = new varienForm('queue_edit_form');
|
65 |
+
var newsletterPreviewForm = new varienForm('newsletter_queue_preview_form');
|
66 |
+
|
67 |
+
var queueControl = {
|
68 |
+
id: 'text',
|
69 |
+
save: function() {
|
70 |
+
$('_resume_flag').value = '';
|
71 |
+
queueForm.submit();
|
72 |
+
},
|
73 |
+
preview: function() {
|
74 |
+
if (this.isEditor() && tinyMCE.get(this.id)) {
|
75 |
+
tinyMCE.triggerSave();
|
76 |
+
$('preview_text').value = $(this.id).value;
|
77 |
+
tinyMCE.triggerSave();
|
78 |
+
} else {
|
79 |
+
$('preview_text').value = $(this.id).value;
|
80 |
+
}
|
81 |
+
if ($('styles') != undefined) {
|
82 |
+
$('preview_styles').value = $('styles').value;
|
83 |
+
}
|
84 |
+
if ($('id') != undefined) {
|
85 |
+
$('preview_id').value = $('id').value;
|
86 |
+
}
|
87 |
+
newsletterPreviewForm.submit();
|
88 |
+
return false;
|
89 |
+
},
|
90 |
+
isEditor: function() {
|
91 |
+
return (typeof tinyMceEditors != 'undefined' && tinyMceEditors.get(this.id) != undefined)
|
92 |
+
},
|
93 |
+
resume: function() {
|
94 |
+
$('_resume_flag').value = '1';
|
95 |
+
queueForm.submit();
|
96 |
+
}
|
97 |
+
};
|
98 |
+
//]]>
|
99 |
+
</script>
|
app/design/adminhtml/default/default/template/newsletter/queue/list.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-newsletter-queue"><?php echo Mage::helper('newsletter')->__('Newsletter Queue') ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<div>
|
38 |
+
<?php echo $this->getChildHtml('grid') ?>
|
39 |
+
</div>
|
app/design/adminhtml/default/default/template/newsletter/queue/preview.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html lang="en">
|
29 |
+
<head>
|
30 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
31 |
+
<title><?php echo Mage::helper('newsletter')->__('Newsletter Message Preview'); ?></title>
|
32 |
+
</head>
|
33 |
+
<body>
|
34 |
+
<?php echo $this->getChildHtml('content') ?>
|
35 |
+
<?php echo $this->getChildHtml('profiler') ?>
|
36 |
+
</body>
|
37 |
+
</html>
|
app/design/adminhtml/default/default/template/newsletter/subscriber/list.phtml
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3><?php echo Mage::helper('newsletter')->__('Newsletter Subscribers') ?></h3></td>
|
31 |
+
</tr>
|
32 |
+
</table>
|
33 |
+
</div>
|
34 |
+
<div>
|
35 |
+
<?php echo $this->getChildHtml('grid') ?>
|
36 |
+
</div>
|
37 |
+
<?php if(count($this->getQueueAsOptions())>0 && $this->getShowQueueAdd()): ?>
|
38 |
+
<div class="form-buttons">
|
39 |
+
<select id="queueList" name="queue">
|
40 |
+
<?php foreach ($this->getQueueAsOptions() as $_queue): ?>
|
41 |
+
<option value="<?php echo $_queue['value'] ?>"><?php echo $_queue['label'] ?> #<?php echo $_queue['value'] ?></option>
|
42 |
+
<?php endforeach; ?>
|
43 |
+
</select>
|
44 |
+
<button class="scalable" onclick="subscriberController.addToQueue();"><span><span><span><?php echo Mage::helper('newsletter')->__('Add to Queue'); ?></span></span></span></button>
|
45 |
+
</div>
|
46 |
+
<?php endif ?>
|
47 |
+
<script type="text/javascript">
|
48 |
+
<!--
|
49 |
+
var subscriberController = {
|
50 |
+
checkCheckboxes: function(controlCheckbox) {
|
51 |
+
var elements = $('subscriberGrid').getElementsByClassName('subscriberCheckbox');
|
52 |
+
elements.each(function(obj){
|
53 |
+
obj.checked = controlCheckbox.checked;
|
54 |
+
});
|
55 |
+
},
|
56 |
+
rowClick: function (e) {
|
57 |
+
if(!Event.element(e).hasClassName('subscriberCheckbox')) {
|
58 |
+
var elements = Event.findElement(e, 'tr').getElementsByClassName('subscriberCheckbox');
|
59 |
+
if(elements.length != 1) {
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
elements[0].checked = !elements[0].checked;
|
63 |
+
}
|
64 |
+
},
|
65 |
+
addToQueue: function () {
|
66 |
+
var elements = $('subscriberGrid').getElementsByClassName('subscriberCheckbox');
|
67 |
+
elements.push($('queueList'));
|
68 |
+
var serializedElements = Form.serializeElements(elements, true);
|
69 |
+
serializedElements.add = 'subscribers';
|
70 |
+
serializedElements.form_key = FORM_KEY;
|
71 |
+
var url = subscriberGridJsObject.url;
|
72 |
+
|
73 |
+
new Ajax.Updater('subscriberGrid', url + '?ajax=1',
|
74 |
+
{parameters: serializedElements,
|
75 |
+
evalScripts: true,
|
76 |
+
onComplete:subscriberGridJsObject.initGrid.bind(subscriberGridJsObject)});
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
varienGlobalEvents.attachEventHandler('gridRowClick', subscriberController.rowClick.bind(subscriberController));
|
81 |
+
//-->
|
82 |
+
</script>
|
app/design/adminhtml/default/default/template/newsletter/template/edit.phtml
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/* @var $this Mage_Adminhtml_Block_Newsletter_Template_Edit */
|
27 |
+
?>
|
28 |
+
<div class="content-header">
|
29 |
+
<h3 class="icon-head head-newsletter-list"><?php echo $this->getHeaderText() ?></h3>
|
30 |
+
<p class="content-buttons form-buttons">
|
31 |
+
<?php echo $this->getBackButtonHtml(); ?>
|
32 |
+
<?php echo $this->getResetButtonHtml(); ?>
|
33 |
+
<?php if(!$this->isTextType()): ?>
|
34 |
+
<?php echo $this->getToPlainButtonHtml(); ?>
|
35 |
+
<?php echo $this->getToHtmlButtonHtml(); ?>
|
36 |
+
<?php endif ?>
|
37 |
+
<?php echo $this->getPreviewButtonHtml(); ?>
|
38 |
+
<?php if($this->getEditMode()): ?>
|
39 |
+
<?php echo $this->getDeleteButtonHtml(); ?>
|
40 |
+
<?php endif ?>
|
41 |
+
<?php if($this->getEditMode()): ?>
|
42 |
+
<?php echo $this->getSaveAsButtonHtml(); ?>
|
43 |
+
<?php endif ?>
|
44 |
+
<?php echo $this->getSaveButtonHtml(); ?>
|
45 |
+
</p>
|
46 |
+
</div>
|
47 |
+
<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="newsletter_template_edit_form">
|
48 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
49 |
+
<div class="no-display">
|
50 |
+
<input type="hidden" id="change_flag_element" name="_change_type_flag" value="" />
|
51 |
+
<input type="hidden" id="save_as_flag" name="_save_as_flag" value="<?php echo $this->getSaveAsFlag() ?>" />
|
52 |
+
</div>
|
53 |
+
<?php echo $this->getForm() ?>
|
54 |
+
</form>
|
55 |
+
<form action="<?php echo $this->getPreviewUrl() ?>" method="post" id="newsletter_template_preview_form" target="_blank">
|
56 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
57 |
+
<div class="no-display">
|
58 |
+
<input type="hidden" id="preview_type" name="type" value="<?php echo $this->isTextType()?1:2 ?>" />
|
59 |
+
<input type="hidden" id="preview_text" name="text" value="" />
|
60 |
+
<input type="hidden" id="preview_styles" name="styles" value="" />
|
61 |
+
<input type="hidden" id="preview_id" name="id" value="" />
|
62 |
+
</div>
|
63 |
+
</form>
|
64 |
+
<script type="text/javascript">
|
65 |
+
//<![CDATA[
|
66 |
+
var templateForm = new varienForm('newsletter_template_edit_form');
|
67 |
+
var templatePreviewForm = new varienForm('newsletter_template_preview_form');
|
68 |
+
var templateControl = {
|
69 |
+
|
70 |
+
unconvertedText: '',
|
71 |
+
typeChange: false,
|
72 |
+
templateName: false,
|
73 |
+
id: 'text',
|
74 |
+
|
75 |
+
init: function () {
|
76 |
+
if ($('convert_button_back')) {
|
77 |
+
$('convert_button_back').hide();
|
78 |
+
}
|
79 |
+
},
|
80 |
+
|
81 |
+
stripTags: function () {
|
82 |
+
if(!window.confirm("<?php echo Mage::helper('newsletter')->__('Are you sure that you want to strip all tags?') ?>")) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
if(this.isEditor()) {
|
86 |
+
this.getEditor().turnOff();
|
87 |
+
this.getEditor().getToggleButton().hide();
|
88 |
+
}
|
89 |
+
this.unconvertedText = $(this.id).value;
|
90 |
+
$('convert_button').hide();
|
91 |
+
$('convert_button_back').show();
|
92 |
+
$(this.id).value = $(this.id).value.stripScripts().stripTags();
|
93 |
+
$('field_template_styles').hide();
|
94 |
+
this.typeChange = true;
|
95 |
+
return false;
|
96 |
+
},
|
97 |
+
|
98 |
+
unStripTags: function () {
|
99 |
+
$('convert_button').show();
|
100 |
+
$('convert_button_back').hide();
|
101 |
+
$(this.id).value = this.unconvertedText;
|
102 |
+
if(this.isEditor()) {
|
103 |
+
this.getEditor().turnOn();
|
104 |
+
this.getEditor().getToggleButton().show();
|
105 |
+
}
|
106 |
+
this.typeChange = false;
|
107 |
+
$('field_template_styles').show();
|
108 |
+
return false;
|
109 |
+
},
|
110 |
+
|
111 |
+
save: function() {
|
112 |
+
if (this.typeChange) {
|
113 |
+
$('change_flag_element').value = '1';
|
114 |
+
}
|
115 |
+
if(this.isEditor()) {
|
116 |
+
tinyMCE.triggerSave();
|
117 |
+
}
|
118 |
+
templateForm.submit();
|
119 |
+
return false;
|
120 |
+
},
|
121 |
+
|
122 |
+
saveAs: function() {
|
123 |
+
if (this.typeChange) {
|
124 |
+
$('change_flag_element').value = '1';
|
125 |
+
}
|
126 |
+
|
127 |
+
if($F('code').blank() || $F('code')==templateControl.templateName) {
|
128 |
+
value = prompt('<?php echo Mage::helper('newsletter')->__('Please enter new template name') ?>', templateControl.templateName + '<?php echo Mage::helper('newsletter')->__(' Copy') ?>');
|
129 |
+
if(!value) {
|
130 |
+
if(value !== null) {
|
131 |
+
$('code').value = '';
|
132 |
+
templateForm.submit();
|
133 |
+
}
|
134 |
+
return false;
|
135 |
+
} else {
|
136 |
+
$('code').value = value;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
$('save_as_flag').value = '1';
|
141 |
+
|
142 |
+
if(this.isEditor()) {
|
143 |
+
tinyMCE.triggerSave();
|
144 |
+
}
|
145 |
+
templateForm.submit();
|
146 |
+
return false;
|
147 |
+
},
|
148 |
+
|
149 |
+
preview: function() {
|
150 |
+
if (this.typeChange) {
|
151 |
+
$('preview_type').value = 1;
|
152 |
+
} else {
|
153 |
+
$('preview_type').value = 2;
|
154 |
+
}
|
155 |
+
if (this.isEditor() && tinyMCE.get(this.id)) {
|
156 |
+
tinyMCE.triggerSave();
|
157 |
+
$('preview_text').value = $(this.id).value;
|
158 |
+
tinyMCE.triggerSave();
|
159 |
+
} else {
|
160 |
+
$('preview_text').value = $(this.id).value;
|
161 |
+
}
|
162 |
+
if ($('template_styles') != undefined) {
|
163 |
+
$('preview_styles').value = $('template_styles').value;
|
164 |
+
}
|
165 |
+
if ($('id') != undefined) {
|
166 |
+
$('preview_id').value = $('id').value;
|
167 |
+
}
|
168 |
+
templatePreviewForm.submit();
|
169 |
+
return false;
|
170 |
+
},
|
171 |
+
|
172 |
+
deleteTemplate: function() {
|
173 |
+
if(window.confirm("<?php echo Mage::helper('newsletter')->__('Are you sure that you want to delete this template?') ?>")) {
|
174 |
+
window.location.href = '<?php echo $this->getDeleteUrl() ?>';
|
175 |
+
}
|
176 |
+
},
|
177 |
+
|
178 |
+
isEditor: function() {
|
179 |
+
return (typeof tinyMceEditors != 'undefined' && tinyMceEditors.get(this.id) != undefined)
|
180 |
+
},
|
181 |
+
|
182 |
+
getEditor: function() {
|
183 |
+
return tinyMceEditors.get(this.id);
|
184 |
+
}
|
185 |
+
};
|
186 |
+
|
187 |
+
templateControl.init();
|
188 |
+
templateControl.templateName = "<?php echo $this->getJsTemplateName() ?>";
|
189 |
+
//]]>
|
190 |
+
</script>
|
app/design/adminhtml/default/default/template/newsletter/template/list.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="content-header">
|
28 |
+
<table cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td style="width:50%;"><h3 class="icon-head head-newsletter-list"><?php echo $this->getHeaderText() ?></h3></td>
|
31 |
+
<td class="form-buttons">
|
32 |
+
<button class="scalable add" onclick="window.location='<?php echo $this->getCreateUrl() ?>'"><span><span><span><?php echo Mage::helper('newsletter')->__('Add New Template'); ?></span></span></span></button>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
</table>
|
36 |
+
</div>
|
37 |
+
<div>
|
38 |
+
<?php echo $this->getChildHtml('grid') ?>
|
39 |
+
</div>
|
app/design/adminhtml/default/default/template/newsletter/template/preview.phtml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
28 |
+
<html lang="en">
|
29 |
+
<head>
|
30 |
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
31 |
+
<title><?php echo Mage::helper('newsletter')->__('Newsletter Message Preview'); ?></title>
|
32 |
+
</head>
|
33 |
+
<body>
|
34 |
+
<?php echo $this->getChildHtml('content') ?>
|
35 |
+
<?php echo $this->getChildHtml('profiler') ?>
|
36 |
+
</body>
|
37 |
+
</html>
|
app/design/adminhtml/default/default/template/notification/baseurl.phtml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/**
|
27 |
+
* @see Mage_Adminhtml_Block_Notification_Baseurl
|
28 |
+
*/
|
29 |
+
?>
|
30 |
+
<?php $_url = $this->getConfigUrl()?>
|
31 |
+
<?php if ($_url): ?>
|
32 |
+
<div class="notification-global notification-global-notice">
|
33 |
+
<?php echo $this->helper('adminhtml')->__('{{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 <a href="%s">configuration</a>.', $_url)?>
|
34 |
+
</div>
|
35 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/notification/security.phtml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
/**
|
27 |
+
* @see Mage_Adminhtml_Block_Notification_Baseurl
|
28 |
+
*/
|
29 |
+
?>
|
30 |
+
<div class="notification-global notification-global-notice">
|
31 |
+
<?php echo $this->helper('adminhtml')->__('Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.')?>
|
32 |
+
</div>
|
app/design/adminhtml/default/default/template/notification/survey.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Notification_Survey
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if ($this->canShow()): ?>
|
33 |
+
<script type="text/javascript">
|
34 |
+
function surveyAction(decision) {
|
35 |
+
if (decision == 'yes') {
|
36 |
+
var win = window.open('<?php echo $this->getSurveyUrl() ?>', '',
|
37 |
+
'width=900,height=600,resizable=1,scrollbars=1');
|
38 |
+
win.focus();
|
39 |
+
}
|
40 |
+
new Ajax.Request('<?php echo $this->getUrl('*/survey/index', array('_current' => true)); ?>', {
|
41 |
+
method: 'post',
|
42 |
+
params: {decision:decision},
|
43 |
+
onComplete: function(transport) {
|
44 |
+
if (200 == transport.status) {
|
45 |
+
if ($('survey_notification'))
|
46 |
+
$('survey_notification').remove();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
});
|
50 |
+
}
|
51 |
+
</script>
|
52 |
+
<div id="survey_notification" class="notification-global notification-global-notice">
|
53 |
+
<?php echo $this->helper('adminhtml')->__('We appreciate our merchants\' feedback, please <a href="#" onclick="surveyAction(\'yes\'); return false;">take our survey</a> to provide insight on the features you would like included in Magento. <a href="#" onclick="surveyAction(\'no\'); return false;">Remove this notification</a>') ?>
|
54 |
+
|
55 |
+
</div>
|
56 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/notification/toolbar.phtml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @var $this Mage_Adminhtml_Block_Notification_Toolbar
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if ($this->isShow()): ?>
|
33 |
+
<div class="notification-global">
|
34 |
+
<?php
|
35 |
+
$sParts = array();
|
36 |
+
|
37 |
+
if ($this->getCriticalCount()):
|
38 |
+
$sParts[] = '<span class="critical"><strong>'.$this->getCriticalCount().'</strong> '.$this->__('critical').'</span>';
|
39 |
+
endif;
|
40 |
+
|
41 |
+
if ($this->getMajorCount()):
|
42 |
+
$sParts[] = '<strong>'.$this->getMajorCount().'</strong> '.$this->__('major');
|
43 |
+
endif;
|
44 |
+
|
45 |
+
if ($this->getMinorCount()):
|
46 |
+
$sParts[] = '<strong>'.$this->getMinorCount().'</strong> '.$this->__('minor');
|
47 |
+
endif;
|
48 |
+
|
49 |
+
if ($this->getNoticeCount()):
|
50 |
+
$sParts[] = '<strong>'.$this->getNoticeCount().'</strong> '.$this->__('notice');
|
51 |
+
endif;
|
52 |
+
|
53 |
+
$msgStats = '';
|
54 |
+
$c = count($sParts);
|
55 |
+
for ($i = 0; $i < $c; $i++) {
|
56 |
+
$msgStats .= $sParts[$i] . ($i == $c-1 ? '' : ($i == $c-2 ? $this->__(' and ') : ', '));
|
57 |
+
}
|
58 |
+
|
59 |
+
$latestNoticeUrl = $this->getLatestNoticeUrl();
|
60 |
+
?>
|
61 |
+
<?php /*
|
62 |
+
<span class="f-right"><?php echo $this->__('You have %s unread message(s). <a href="%s">Go to messages inbox</a>.', $msgStats, $this->getNoticesInboxUrl());?></span>
|
63 |
+
*/?>
|
64 |
+
|
65 |
+
<span class="f-right">
|
66 |
+
<?php $goToBoxMessage = (!empty($latestNoticeUrl)) ? $this->__('Go to messages inbox') : $this->__('Go to notifications') ?>
|
67 |
+
<?php echo $this->__('You have %s unread message(s).', $msgStats) ?> <a href="<?php echo $this->getNoticesInboxUrl() ?>"><?php echo $goToBoxMessage ?></a>
|
68 |
+
</span>
|
69 |
+
<?php /* ********** temporary commented
|
70 |
+
<span class="f-right"><?php echo $this->__('You have %s, %s and %s unread messages. <a href="%s">Go to messages inbox</a>.', '<span class="critical"><strong>'.$this->getCriticalCount().'</strong> '.$this->__('critical').'</span>', '<strong>'.$this->getMajorCount().'</strong> '.$this->__('major'), '<strong>'.$this->getMinorCount().'</strong> '.$this->__('minor'), $this->getNoticesInboxUrl());?></span>
|
71 |
+
******** */?>
|
72 |
+
<?php if ($this->isMessageWindowAvailable()): ?>
|
73 |
+
<strong class="label clickable" onclick="openMessagePopup()">
|
74 |
+
<?php else: ?>
|
75 |
+
<strong class="label">
|
76 |
+
<?php endif; ?>
|
77 |
+
|
78 |
+
<?php echo $this->__('Latest Message:') ?></strong> <?php echo $this->getLatestNotice() ?>
|
79 |
+
<?php if (!empty($latestNoticeUrl)): ?>
|
80 |
+
<a href="<?php echo $latestNoticeUrl ?>" onclick="this.target='_blank';"><?php echo $this->__('Read details') ?></a>
|
81 |
+
<?php endif; ?>
|
82 |
+
</div>
|
83 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/notification/window.phtml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Block_Notification_Window
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if ($this->canShow()): ?>
|
33 |
+
<script type="text/javascript">
|
34 |
+
//<![CDATA[
|
35 |
+
var messagePopupClosed = false;
|
36 |
+
function openMessagePopup() {
|
37 |
+
var height = $('html-body').getHeight();
|
38 |
+
$('message-popup-window-mask').setStyle({'height':height+'px'});
|
39 |
+
toggleSelectsUnderBlock($('message-popup-window-mask'), false);
|
40 |
+
Element.show('message-popup-window-mask');
|
41 |
+
$('message-popup-window').addClassName('show');
|
42 |
+
}
|
43 |
+
|
44 |
+
function closeMessagePopup() {
|
45 |
+
toggleSelectsUnderBlock($('message-popup-window-mask'), true);
|
46 |
+
Element.hide('message-popup-window-mask');
|
47 |
+
$('message-popup-window').removeClassName('show');
|
48 |
+
messagePopupClosed = true;
|
49 |
+
}
|
50 |
+
|
51 |
+
Event.observe(window, 'load', openMessagePopup);
|
52 |
+
Event.observe(window, 'keyup', function(evt) {
|
53 |
+
if(messagePopupClosed) return;
|
54 |
+
var code;
|
55 |
+
if (evt.keyCode) code = evt.keyCode;
|
56 |
+
else if (evt.which) code = evt.which;
|
57 |
+
if (code == Event.KEY_ESC) {
|
58 |
+
closeMessagePopup();
|
59 |
+
}
|
60 |
+
});
|
61 |
+
//]]>
|
62 |
+
</script>
|
63 |
+
<div id="message-popup-window-mask" style="display:none;"></div>
|
64 |
+
<div id="message-popup-window" class="message-popup">
|
65 |
+
<div class="message-popup-head">
|
66 |
+
<a href="#" onclick="closeMessagePopup(); return false;" title="<?php echo $this->getCloseText(); ?>"><span><?php echo $this->getCloseText(); ?></span></a>
|
67 |
+
<h2><?php echo $this->getHeaderText(); ?></h2>
|
68 |
+
</div>
|
69 |
+
<div class="message-popup-content">
|
70 |
+
<div class="message">
|
71 |
+
<span class="message-icon message-<?php echo $this->getSeverityText();?>" style="background-image:url(<?php echo $this->getSeverityIconsUrl() ?>);"><?php echo $this->getSeverityText();?></span>
|
72 |
+
<p class="message-text"><?php echo $this->getNoticeMessageText(); ?></p>
|
73 |
+
</div>
|
74 |
+
<p class="read-more"><a href="<?php echo $this->getNoticeMessageUrl(); ?>" onclick="this.target='_blank';"><?php echo $this->getReadDetailsText(); ?></a></p>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/oauth/authorize/button-simple.phtml
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* "Grant Access" button
|
30 |
+
*
|
31 |
+
* @var $this Mage_Oauth_Block_Authorize_ButtonBaseAbstract
|
32 |
+
*/
|
33 |
+
$logo = $this->getSkinUrl('images/logo-large.gif', array('_area' => 'adminhtml', '_package' => 'default'));
|
34 |
+
?>
|
35 |
+
<div class="login-container">
|
36 |
+
<div class="login-box">
|
37 |
+
<div class="page-title">
|
38 |
+
<h1><?php echo $this->__('Authorize application') ?></h1>
|
39 |
+
</div>
|
40 |
+
<div class="form-box">
|
41 |
+
<div>
|
42 |
+
<div id="messages">
|
43 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
44 |
+
</div>
|
45 |
+
<?php if (!$this->getHasException()) : ?>
|
46 |
+
<h2><?php echo $this->__('<strong>%s</strong> requests access to your account', $this->escapeHtml($this->getConsumer()->getName())); ?></h2>
|
47 |
+
<p><?php echo $this->__('After authorization application will have access to you account.'); ?></p>
|
48 |
+
<form id="oauth_authorize_confirm" action="<?php echo $this->getConfirmUrl() ?>" method="get">
|
49 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>">
|
50 |
+
<button type="submit" class="button" title="<?php echo $this->__('Authorize') ?>">
|
51 |
+
<span><span><?php echo $this->__('Authorize') ?></span></span></button>
|
52 |
+
</form>
|
53 |
+
<form id="oauth_authorize_reject" action="<?php echo $this->getRejectUrl() ?>" method="get">
|
54 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>">
|
55 |
+
<button type="submit" class="button" title="<?php echo $this->__('Reject') ?>">
|
56 |
+
<span><span><?php echo $this->__('Reject') ?></span></span></button>
|
57 |
+
</form>
|
58 |
+
<?php endif; ?>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/button.phtml
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* "Grant Access" button
|
29 |
+
*
|
30 |
+
* @see Mage_Oauth_Block_Authorize
|
31 |
+
*/
|
32 |
+
|
33 |
+
/** @var $this Mage_Oauth_Block_Adminhtml_Oauth_Authorize_Button */
|
34 |
+
?>
|
35 |
+
<div class="login-container auth-confirm">
|
36 |
+
<div class="login-box">
|
37 |
+
<div class="login-form auth-confirm">
|
38 |
+
<div class="page-title">
|
39 |
+
<h1><?php echo $this->__('Authorize application') ?></h1>
|
40 |
+
</div>
|
41 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
42 |
+
|
43 |
+
<?php if (!$this->getHasException()) : ?>
|
44 |
+
<h2><?php echo $this->__('<strong>%s</strong> requests access to your account', $this->escapeHtml($this->getConsumer()->getName())); ?></h2>
|
45 |
+
<p><?php echo $this->__('After authorization application will have access to you account.'); ?></p>
|
46 |
+
<form id="oauth_authorize_confirm" action="<?php echo $this->getConfirmUrl() ?>" method="get">
|
47 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>">
|
48 |
+
<button type="submit" class="button" title="<?php echo $this->__('Authorize') ?>"><span><span><?php echo $this->__('Authorize') ?></span></span></button>
|
49 |
+
</form>
|
50 |
+
<form id="oauth_authorize_reject" action="<?php echo $this->getRejectUrl() ?>" method="get">
|
51 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>">
|
52 |
+
<button type="submit" class="button" title="<?php echo $this->__('Reject') ?>"><span><span><?php echo $this->__('Reject') ?></span></span></button>
|
53 |
+
</form>
|
54 |
+
<?php endif; ?>
|
55 |
+
</div>
|
56 |
+
<p class="legal"><?php echo $this->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')) ?></p>
|
57 |
+
<div class="bottom"></div>
|
58 |
+
</div>
|
59 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/confirm-simple.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Authorize confirmation simple template
|
29 |
+
*
|
30 |
+
* @var $this Mage_Oauth_Block_AuthorizeBaseAbstract
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<div class="login-container">
|
34 |
+
<div class="login-box">
|
35 |
+
<div class="page-title">
|
36 |
+
<h1><?php echo $this->__('Confirmation Of Authorization') ?></h1>
|
37 |
+
</div>
|
38 |
+
<div class="form-box">
|
39 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
40 |
+
<?php if ($this->getVerifier()): ?>
|
41 |
+
<h2><?php echo $this->__('Authorization confirmed') ?></h2>
|
42 |
+
<p><?php echo $this->__('Give the verifier code to application administrator') ?></p>
|
43 |
+
<p style="font-size: 14px;"><?php echo $this->__('Verifier code: %s', $this->getVerifier()) ?></p>
|
44 |
+
<?php endif; ?>
|
45 |
+
<button type="submit" class="button"
|
46 |
+
onclick="window.close();"
|
47 |
+
title="<?php echo $this->__('Close') ?>">
|
48 |
+
<span><span><?php echo $this->__('Close') ?></span></span>
|
49 |
+
</button>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/confirm.phtml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* "Grant Access" button
|
29 |
+
*
|
30 |
+
* @var $this Mage_Oauth_Block_Authorize
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<div class="login-container">
|
34 |
+
<div class="login-box">
|
35 |
+
<div class="login-form">
|
36 |
+
<h1><?php echo $this->__('Confirmation Of Authorization') ?></h1>
|
37 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
38 |
+
<?php if (!$this->getHasException()): ?>
|
39 |
+
<p><?php echo $this->__('Give the verifier code to application administrator') ?></p>
|
40 |
+
<p style="font-size: 14px;"><?php echo $this->__('Verifier code: %s', $this->getVerifier()) ?></p>
|
41 |
+
<?php endif; ?>
|
42 |
+
</div>
|
43 |
+
<p class="legal"><?php echo $this->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')) ?></p>
|
44 |
+
<div class="bottom"></div>
|
45 |
+
</div>
|
46 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/form/login-simple.phtml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Admin login form template
|
29 |
+
*
|
30 |
+
* @var $this Mage_Oauth_Block_AuthorizeBaseAbstract
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<div class="content-container">
|
34 |
+
<div class="login-box">
|
35 |
+
<div class="page-title">
|
36 |
+
<h1><?php echo $this->__('Log In') ?></h1>
|
37 |
+
</div>
|
38 |
+
<div class="form-box">
|
39 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
40 |
+
<?php if (!$this->getHasException()) : ?>
|
41 |
+
<form method="post" action="<?php echo $this->getPostActionUrl() ?>" id="loginForm">
|
42 |
+
<fieldset class="fieldset">
|
43 |
+
<h2 class="legend"><?php echo $this->getFormTitle() ?></h2>
|
44 |
+
<p class="description"><?php echo $this->__('Log in to use <strong>%s</strong>', $this->getConsumer()->getName()) ?></p>
|
45 |
+
<div class="login-form simple">
|
46 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>"/>
|
47 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>"/>
|
48 |
+
|
49 |
+
<div class="input-box input-left">
|
50 |
+
<label for="username">
|
51 |
+
<em class="required">*</em> <?php echo $this->getIdentityLabel(); ?>
|
52 |
+
</label>
|
53 |
+
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text"/>
|
54 |
+
</div>
|
55 |
+
<div class="clear"></div>
|
56 |
+
<div class="input-box input-right">
|
57 |
+
<label for="login">
|
58 |
+
<em class="required">*</em> <?php echo $this->__('Password') ?>
|
59 |
+
</label>
|
60 |
+
<input type="password" id="login" name="login[password]" class="required-entry input-text"
|
61 |
+
value=""/></div>
|
62 |
+
<div class="clear"></div>
|
63 |
+
<div class="form-buttons">
|
64 |
+
<button type="submit" class="form-button"
|
65 |
+
title="<?php echo $this->__('Login') ?>"/><?php echo $this->__('Login') ?></button>
|
66 |
+
<button type="button" onclick="document.location.href='<?php echo $this->getRejectUrl(); ?>';"
|
67 |
+
title="<?php echo $this->__('Reject') ?>"><?php echo $this->__('Reject') ?></button>
|
68 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</fieldset>
|
72 |
+
</form>
|
73 |
+
<?php endif; ?>
|
74 |
+
</div>
|
75 |
+
<div class="bottom"></div>
|
76 |
+
</div>
|
77 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/form/login.phtml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Admin login form template
|
29 |
+
*
|
30 |
+
* @var $this Mage_Oauth_Block_Adminhtml_Oauth_Authorize
|
31 |
+
* @see Mage_Oauth_Block_Adminhtml_Oauth_Authorize
|
32 |
+
*/
|
33 |
+
|
34 |
+
?>
|
35 |
+
<div class="login-container">
|
36 |
+
<div class="login-box">
|
37 |
+
<div class="login-form">
|
38 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
39 |
+
<?php if (!$this->getHasException()): ?>
|
40 |
+
<form method="post" action="<?php echo $this->getPostActionUrl() ?>" id="loginForm">
|
41 |
+
<fieldset>
|
42 |
+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey() ?>" />
|
43 |
+
<h2><?php echo $this->__('Log in to Admin Panel'); ?></h2>
|
44 |
+
<p class="description"><?php echo $this->__('Log in to use <strong>%s</strong>', $this->getConsumer()->getName()) ?></p>
|
45 |
+
<div class="input-box input-left"><label for="username"><?php echo $this->__('User Name:') ?></label><br/>
|
46 |
+
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" /></div>
|
47 |
+
<div class="input-box input-right"><label for="login"><?php echo $this->__('Password:') ?></label><br />
|
48 |
+
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" /></div>
|
49 |
+
<div class="clear"></div>
|
50 |
+
<div class="form-buttons">
|
51 |
+
<button type="submit" class="form-button" title="<?php echo $this->__('Login') ?>" ><?php echo $this->__('Login') ?></button>
|
52 |
+
<button onclick="document.location.href='<?php echo $this->getRejectUrl() ?>'; return false;" title="<?php echo $this->__('Reject') ?>"><?php echo $this->__('Reject') ?></button>
|
53 |
+
</div>
|
54 |
+
<input type="hidden" name="oauth_token" value="<?php echo $this->escapeHtml($this->getToken()) ?>"/>
|
55 |
+
</fieldset>
|
56 |
+
</form>
|
57 |
+
<script type="text/javascript">
|
58 |
+
//<![CDATA[
|
59 |
+
var loginForm = new varienForm('loginForm');
|
60 |
+
//]]>
|
61 |
+
</script>
|
62 |
+
<?php endif; ?>
|
63 |
+
</div>
|
64 |
+
<p class="legal"><?php echo $this->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')) ?></p>
|
65 |
+
<div class="bottom"></div>
|
66 |
+
</div>
|
67 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Head block Oauth simple pages
|
29 |
+
*
|
30 |
+
* @var $this Mage_Adminhtml_Block_Page_Head
|
31 |
+
*/
|
32 |
+
|
33 |
+
//Code partially copied from adminhtml/default/default/template/page/head.phtml
|
34 |
+
?>
|
35 |
+
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>"/>
|
36 |
+
<title><?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?></title>
|
37 |
+
<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon"/>
|
38 |
+
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon"/>
|
39 |
+
|
40 |
+
<script type="text/javascript">
|
41 |
+
//<![CDATA[
|
42 |
+
var BLANK_URL = '<?php echo $this->getJsUrl() ?>blank.html';
|
43 |
+
var BLANK_IMG = '<?php echo $this->getJsUrl() ?>spacer.gif';
|
44 |
+
var BASE_URL = '<?php echo $this->getUrl('*') ?>';
|
45 |
+
var SKIN_URL = '<?php echo $this->getSkinUrl() ?>';
|
46 |
+
var FORM_KEY = '<?php echo $this->getFormKey() ?>';
|
47 |
+
//]]>
|
48 |
+
</script>
|
49 |
+
|
50 |
+
<?php echo $this->getCssJsHtml() ?>
|
app/design/adminhtml/default/default/template/oauth/authorize/reject-simple.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Authorize rejection simple template
|
29 |
+
*
|
30 |
+
* @var $this Mage_Oauth_Block_AuthorizeBaseAbstract
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<div class="login-container">
|
34 |
+
<div class="login-box">
|
35 |
+
<div class="page-title">
|
36 |
+
<h1><?php echo $this->__('Rejection Of Authorization') ?></h1>
|
37 |
+
</div>
|
38 |
+
<div class="form-box">
|
39 |
+
<div id="messages">
|
40 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
41 |
+
</div>
|
42 |
+
<button type="submit" class="button" onclick="window.close();" title="<?php echo $this->__('Close') ?>">
|
43 |
+
<span><span><?php echo $this->__('Close') ?></span></span>
|
44 |
+
</button>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
</div>
|
app/design/adminhtml/default/default/template/oauth/authorize/reject.phtml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* "Grant Access" button
|
30 |
+
*
|
31 |
+
* @see Mage_Oauth_Block_Authorize
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php /** @var $this Mage_Core_Block_Template */ ?>
|
35 |
+
<div class="login-container">
|
36 |
+
<div class="login-box">
|
37 |
+
<div class="login-form">
|
38 |
+
<h1><?php echo $this->__('Rejection Of Authorization') ?></h1>
|
39 |
+
<?php echo $this->getMessagesBlock()->toHtml() ?>
|
40 |
+
</div>
|
41 |
+
<p class="legal"><?php echo $this->__('Magento is a trademark of Magento Inc. Copyright © %s Magento Inc.', date('Y')) ?></p>
|
42 |
+
<div class="bottom"></div>
|
43 |
+
</div>
|
44 |
+
</div>
|
app/design/adminhtml/default/default/template/overlay_popup.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<div class="wrapper-popup">
|
28 |
+
<div class="middle" id="anchor-content">
|
29 |
+
<div id="page:main-container">
|
30 |
+
<?php if($this->getChildHtml('left')): ?>
|
31 |
+
<div class="columns <?php echo $this->getContainerCssClass() ?>" id="page:container">
|
32 |
+
<div id="page:left" class="side-col">
|
33 |
+
<?php echo $this->getChildHtml('left') ?>
|
34 |
+
</div>
|
35 |
+
<div class="main-col" id="content">
|
36 |
+
<div class="main-col-inner">
|
37 |
+
<div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
38 |
+
<?php echo $this->getChildHtml('content') ?>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<?php else: ?>
|
43 |
+
<div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
44 |
+
<?php echo $this->getChildHtml('content') ?>
|
45 |
+
<?php endif; ?>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<?php if($this->getChildHtml('footer')): ?>
|
49 |
+
<div class="footer">
|
50 |
+
<?php echo $this->getChildHtml('footer') ?>
|
51 |
+
</div>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php echo $this->getChildHtml('js') ?>
|
54 |
+
<?php echo $this->getChildHtml('profiler') ?>
|
55 |
+
</div>
|
app/design/adminhtml/default/default/template/page.phtml
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /*{
|
28 |
+
"label":"Root page layout",
|
29 |
+
"type":"core/template",
|
30 |
+
"children":{
|
31 |
+
"header":{ "label":"Header", "type":"adminhtml/page_header" },
|
32 |
+
"menu":{ "label":"Top navigation", "type":"adminhtml/page_menu" },
|
33 |
+
"breadcrumbs":{ "label":"Breadcrumbs", "type":"adminhtml/widget_breadcrumbs" },
|
34 |
+
"content":{ "label":"Content block", "type":"core/template" },
|
35 |
+
"left":{ "label":"Left navigation", "type":"core/template" },
|
36 |
+
"footer":{ "label":"Footer", "type":"adminhtml/page_footer" }
|
37 |
+
},
|
38 |
+
"vars":{}
|
39 |
+
}*/ ?>
|
40 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
41 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
42 |
+
<head>
|
43 |
+
<?php echo $this->getChildHtml('head') ?>
|
44 |
+
</head>
|
45 |
+
|
46 |
+
<body id="html-body"<?php echo $this->getBodyClass() ? ' class="' . $this->getBodyClass() . '"' : ''; ?>>
|
47 |
+
<?php echo $this->getChildHtml('notification_window'); ?>
|
48 |
+
<div class="wrapper">
|
49 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
50 |
+
<div class="header">
|
51 |
+
<?php echo $this->getChildHtml('header') ?>
|
52 |
+
<div class="clear"></div>
|
53 |
+
<?php echo $this->getChildHtml('menu') ?>
|
54 |
+
</div>
|
55 |
+
<?php echo $this->getChildHtml('notifications'); ?>
|
56 |
+
<div class="middle" id="anchor-content">
|
57 |
+
<div id="page:main-container">
|
58 |
+
<?php if($this->getChildHtml('left')): ?>
|
59 |
+
|
60 |
+
<div class="columns <?php echo $this->getContainerCssClass() ?>">
|
61 |
+
<div class="side-col" id="page:left">
|
62 |
+
<?php echo $this->getChildHtml('left') ?>
|
63 |
+
</div>
|
64 |
+
<div class="main-col" id="content">
|
65 |
+
<div class="main-col-inner">
|
66 |
+
<div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
67 |
+
<?php echo $this->getChildHtml('content') ?>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<?php else: ?>
|
73 |
+
<div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
74 |
+
<?php echo $this->getChildHtml('content') ?>
|
75 |
+
<?php endif; ?>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
<div class="footer">
|
79 |
+
<?php echo $this->getChildHtml('footer') ?>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
<?php echo $this->getChildHtml('js') ?>
|
83 |
+
<?php echo $this->getChildHtml('profiler') ?>
|
84 |
+
<div id="loading-mask" style="display:none">
|
85 |
+
<p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo Mage::helper('adminhtml')->__('Please wait...') ?></p>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
89 |
+
|
90 |
+
</body>
|
91 |
+
</html>
|
app/design/adminhtml/default/default/template/page/footer.phtml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<p class="bug-report">
|
28 |
+
<a href="<?php echo $this->getBugreportUrl() ?>" id="footer_bug_tracking"><?php echo $this->__('Help Us Keep Magento Healthy - Report All Bugs') ?></a><br/>
|
29 |
+
<?php echo $this->__('Interface Locale: %s', $this->getLanguageSelect()) ?>
|
30 |
+
</p>
|
31 |
+
<p class="legality">
|
32 |
+
<a href="http://www.magentocommerce.com" id="footer_connect"><?php echo $this->__('Connect with the Magento Community') ?></a><br/>
|
33 |
+
<img src="<?php echo $this->getSkinUrl('images/varien_logo.gif') ?>" class="v-middle" alt="" />
|
34 |
+
<?php echo $this->__('Magento™ is a trademark of Magento Inc.<br/>Copyright © %s Magento Inc.', date('Y')) ?>
|
35 |
+
</p>
|
36 |
+
<?php echo $this->__('Magento ver. %s', Mage::getVersion()) ?>
|
37 |
+
<script type="text/javascript">
|
38 |
+
$('footer_bug_tracking').target = 'Varien_External';
|
39 |
+
$('footer_connect').target = 'Varien_External';
|
40 |
+
function setInterfaceLanguage(evt){
|
41 |
+
var elem = Event.element(evt);
|
42 |
+
if(elem){
|
43 |
+
setLocation('<?php echo $this->getChangeLocaleUrl() ?>locale/'+elem.value+'/<?php echo $this->getRefererParamName() ?>/<?php echo $this->getUrlForReferer() ?>');
|
44 |
+
}
|
45 |
+
}
|
46 |
+
Event.observe('interface_locale', 'change', setInterfaceLanguage)
|
47 |
+
</script>
|
app/design/adminhtml/default/default/template/page/head.phtml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>"/>
|
2 |
+
<title><?php echo htmlspecialchars(html_entity_decode($this->getTitle())) ?></title>
|
3 |
+
<link rel="icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon"/>
|
4 |
+
<link rel="shortcut icon" href="<?php echo $this->getSkinUrl('favicon.ico') ?>" type="image/x-icon"/>
|
5 |
+
|
6 |
+
<script type="text/javascript">
|
7 |
+
var BLANK_URL = '<?php echo $this->getJsUrl() ?>blank.html';
|
8 |
+
var BLANK_IMG = '<?php echo $this->getJsUrl() ?>spacer.gif';
|
9 |
+
var BASE_URL = '<?php echo $this->getUrl('*') ?>';
|
10 |
+
var SKIN_URL = '<?php echo $this->getSkinUrl() ?>';
|
11 |
+
var FORM_KEY = '<?php echo $this->getFormKey() ?>';
|
12 |
+
</script>
|
13 |
+
|
14 |
+
<?php echo $this->getCssJsHtml() ?>
|
15 |
+
|
16 |
+
<?php if($this->getCanLoadExtJs()): ?>
|
17 |
+
<script type="text/javascript">
|
18 |
+
Ext.BLANK_IMAGE_URL = BLANK_IMG;
|
19 |
+
Ext.UpdateManager.defaults.loadScripts = false;
|
20 |
+
Ext.UpdateManager.defaults.disableCaching = true;
|
21 |
+
</script>
|
22 |
+
<?php endif; ?>
|
23 |
+
|
24 |
+
<?php if($this->getCanLoadTinyMce()): // TinyMCE is broken when loaded through index.php ?>
|
25 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl() ?>tiny_mce/tiny_mce.js"></script>
|
26 |
+
<?php endif; ?>
|
27 |
+
|
28 |
+
<script type="text/javascript">
|
29 |
+
Fieldset.addToPrefix(<?php echo Mage::helper('adminhtml')->getCurrentUserId() ?>);
|
30 |
+
</script>
|
31 |
+
|
32 |
+
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
|
33 |
+
<?php echo $this->getChildHtml('calendar'); ?>
|
34 |
+
<?php echo $this->getChildHtml('optional_zip_countries'); ?>
|
app/design/adminhtml/default/default/template/page/header.phtml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/** @var $this Mage_Adminhtml_Block_Page_Header */
|
28 |
+
?>
|
29 |
+
<div class="header-top">
|
30 |
+
<a href="<?php echo $this->getHomeLink() ?>"><img src="<?php echo $this->getSkinUrl('images/logo.gif') ?>" alt="<?php echo $this->__('Magento Logo') ?>" class="logo"/></a>
|
31 |
+
<div class="header-right">
|
32 |
+
<p class="super">
|
33 |
+
<?php echo $this->__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())) ?><span class="separator">|</span><?php echo $this->formatDate(null, 'full') ?><span class="separator">|</span><a href="http://golinks.magento.com/CE15" onclick="this.target='_blank'" class="go-try"><?php echo $this->__('Try Magento Go for Free') ?></a><span class="separator">|</span><a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?></a>
|
34 |
+
</p>
|
35 |
+
<?php if ( Mage::getSingleton('admin/session')->isAllowed('admin/global_search') ): ?>
|
36 |
+
<fieldset>
|
37 |
+
<legend>Search</legend>
|
38 |
+
<span id="global_search_indicator" class="autocomplete-indicator" style="display: none">
|
39 |
+
<img src="<?php echo $this->getSkinUrl('images/ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading...') ?>" class="v-middle"/>
|
40 |
+
</span>
|
41 |
+
<?php $defSearch = $this->__('Global Record Search') ?>
|
42 |
+
<input id="global_search" name="query" type="text" class="input-text" value="<?php if(!empty($query)): ?><?php echo $query ?><?php else: ?><?php echo $defSearch ?><?php endif ?>" onfocus="if(this.value=='<?php echo $defSearch ?>')this.value=''; " onblur="if(this.value=='')this.value='<?php echo $defSearch ?>';" />
|
43 |
+
<div id="global_search_autocomplete" class="autocomplete"></div>
|
44 |
+
<script type="text/javascript">
|
45 |
+
new Ajax.Autocompleter(
|
46 |
+
'global_search',
|
47 |
+
'global_search_autocomplete',
|
48 |
+
'<?php echo $this->getUrl('adminhtml/index/globalSearch') ?>',
|
49 |
+
{
|
50 |
+
paramName:"query",
|
51 |
+
minChars:2,
|
52 |
+
indicator:"global_search_indicator",
|
53 |
+
updateElement:getSelectionId,
|
54 |
+
evalJSON:'force'
|
55 |
+
}
|
56 |
+
);
|
57 |
+
function getSelectionId(li) {
|
58 |
+
location.href = li.getAttribute('url');
|
59 |
+
}
|
60 |
+
</script>
|
61 |
+
</fieldset>
|
62 |
+
<?php endif; ?>
|
63 |
+
</div>
|
64 |
+
</div>
|
app/design/adminhtml/default/default/template/page/js/calendar.phtml
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
// no notice of license for now
|
27 |
+
?>
|
28 |
+
|
29 |
+
<?php
|
30 |
+
/**
|
31 |
+
* Calendar localization script. Should be put into page header.
|
32 |
+
*
|
33 |
+
* @see Mage_Core_Block_Html_Calendar
|
34 |
+
*/
|
35 |
+
?>
|
36 |
+
|
37 |
+
<script type="text/javascript">
|
38 |
+
//<![CDATA[
|
39 |
+
enUS = <?php echo $enUS?>; // en_US locale reference
|
40 |
+
Calendar._DN = <?php echo $days['wide']?>; // full day names
|
41 |
+
Calendar._SDN = <?php echo $days['abbreviated']?>; // short day names
|
42 |
+
Calendar._FD = <?php echo $firstDay?>; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
|
43 |
+
Calendar._MN = <?php echo $months['wide']?>; // full month names
|
44 |
+
Calendar._SMN = <?php echo $months['abbreviated']?>; // short month names
|
45 |
+
Calendar._am = <?php echo $am ?>; // am/pm
|
46 |
+
Calendar._pm = <?php echo $pm ?>;
|
47 |
+
|
48 |
+
// tooltips
|
49 |
+
Calendar._TT = {};
|
50 |
+
Calendar._TT["INFO"] = "<?php echo $this->__('About the calendar');?>";
|
51 |
+
|
52 |
+
Calendar._TT["ABOUT"] =
|
53 |
+
"<?php echo $this->__('DHTML Date/Time Selector')?>\n" +
|
54 |
+
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
55 |
+
"<?php echo $this->__('For latest version visit: %s', 'http://www.dynarch.com/projects/calendar/')?>\n" +
|
56 |
+
"<?php echo $this->__('Distributed under GNU LGPL. See %s for details.', 'http://gnu.org/licenses/lgpl.html')?>" +
|
57 |
+
"\n\n" +
|
58 |
+
"<?php echo $this->__('Date selection:')?>\n" +
|
59 |
+
"<?php echo $this->__('- Use the %s, %s buttons to select year', '\\xab', '\xbb')?>\n" +
|
60 |
+
"<?php echo $this->__('- Use the %s buttons to select month', '" + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "')?>\n" +
|
61 |
+
"<?php echo $this->__('- Hold mouse button on any of the above buttons for faster selection.')?>";
|
62 |
+
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
63 |
+
"<?php echo $this->__('Time selection:')?>\n" +
|
64 |
+
"<?php echo $this->__('- Click on any of the time parts to increase it')?>\n" +
|
65 |
+
"<?php echo $this->__('- or Shift-click to decrease it')?>\n" +
|
66 |
+
"<?php echo $this->__('- or click and drag for faster selection.')?>";
|
67 |
+
|
68 |
+
Calendar._TT["PREV_YEAR"] = "<?php echo $this->__('Prev. year (hold for menu)');?>";
|
69 |
+
Calendar._TT["PREV_MONTH"] = "<?php echo $this->__('Prev. month (hold for menu)');?>";
|
70 |
+
Calendar._TT["GO_TODAY"] = "<?php echo $this->__('Go Today');?>";
|
71 |
+
Calendar._TT["NEXT_MONTH"] = "<?php echo $this->__('Next month (hold for menu)');?>";
|
72 |
+
Calendar._TT["NEXT_YEAR"] = "<?php echo $this->__('Next year (hold for menu)');?>";
|
73 |
+
Calendar._TT["SEL_DATE"] = "<?php echo $this->__('Select date');?>";
|
74 |
+
Calendar._TT["DRAG_TO_MOVE"] = "<?php echo $this->__('Drag to move');?>";
|
75 |
+
Calendar._TT["PART_TODAY"] = ' (' + <?php echo $today ?> + ')';
|
76 |
+
|
77 |
+
// the following is to inform that "%s" is to be the first day of week
|
78 |
+
Calendar._TT["DAY_FIRST"] = "<?php echo $this->__('Display %s first', '%s');?>";
|
79 |
+
|
80 |
+
// This may be locale-dependent. It specifies the week-end days, as an array
|
81 |
+
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
82 |
+
// means Monday, etc.
|
83 |
+
Calendar._TT["WEEKEND"] = <?php echo $weekendDays?>;
|
84 |
+
|
85 |
+
Calendar._TT["CLOSE"] = "<?php echo $this->__('Close');?>";
|
86 |
+
Calendar._TT["TODAY"] = <?php echo $today ?>;
|
87 |
+
Calendar._TT["TIME_PART"] = "<?php echo $this->__('(Shift-)Click or drag to change value');?>";
|
88 |
+
|
89 |
+
// date formats
|
90 |
+
Calendar._TT["DEF_DATE_FORMAT"] = <?php echo $defaultFormat?>;
|
91 |
+
Calendar._TT["TT_DATE_FORMAT"] = <?php echo $toolTipFormat?>;
|
92 |
+
|
93 |
+
Calendar._TT["WK"] = <?php echo $week ?>;
|
94 |
+
Calendar._TT["TIME"] = "<?php echo $this->__('Time:');?>";
|
95 |
+
|
96 |
+
CalendarDateObject._LOCAL_TIMZEONE_OFFSET_SECONDS = <?php echo $this->getTimezoneOffsetSeconds() ?>;
|
97 |
+
CalendarDateObject._SERVER_TIMZEONE_SECONDS = <?php echo $this->getStoreTimestamp() ?>;
|
98 |
+
|
99 |
+
//]]>
|
100 |
+
</script>
|
app/design/adminhtml/default/default/template/page/js/translate.phtml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
/**
|
30 |
+
* @var $this Mage_Page_Block_Js_Translate
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php
|
34 |
+
$_data = array(
|
35 |
+
'Please select an option.' => $this->__('Please select an option.'),
|
36 |
+
'This is a required field.' => $this->__('This is a required field.'),
|
37 |
+
'Please enter a valid number in this field.' => $this->__('Please enter a valid number in this field.'),
|
38 |
+
'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.' => $this->__('Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.'),
|
39 |
+
'Please use letters only (a-z) in this field.' => $this->__('Please use letters only (a-z) in this field.'),
|
40 |
+
'Please use in this field only "a-z,0-9,_".' => $this->__('Please use in this field only "a-z,0-9,_".'),
|
41 |
+
'Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.' => $this->__('Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.'),
|
42 |
+
'Please use only letters (a-z) or numbers (0-9) or spaces and # only in this field.' => $this->__('Please use only letters (a-z) or numbers (0-9) or spaces and # only in this field.'),
|
43 |
+
'Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.' => $this->__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.'),
|
44 |
+
'Please enter a valid date.' => $this->__('Please enter a valid date.'),
|
45 |
+
'Please enter a valid email address. For example johndoe@domain.com.' => $this->__('Please enter a valid email address. For example johndoe@domain.com.'),
|
46 |
+
'Please enter 6 or more characters.' => $this->__('Please enter 6 or more characters.'),
|
47 |
+
'Please make sure your passwords match.' => $this->__('Please make sure your passwords match.'),
|
48 |
+
'Please enter a valid URL. http:// is required' => $this->__('Please enter a valid URL. http:// is required'),
|
49 |
+
'Please enter a valid URL. For example http://www.example.com or www.example.com' => $this->__('Please enter a valid URL. For example http://www.example.com or www.example.com'),
|
50 |
+
'Please enter a valid social security number. For example 123-45-6789.' => $this->__('Please enter a valid social security number. For example 123-45-6789.'),
|
51 |
+
'Please enter a valid zip code. For example 90602 or 90602-1234.' => $this->__('Please enter a valid zip code. For example 90602 or 90602-1234.'),
|
52 |
+
'Please enter a valid zip code.' => $this->__('Please enter a valid zip code.'),
|
53 |
+
'Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.' => $this->__('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.'),
|
54 |
+
'Please enter a valid $ amount. For example $100.00.' => $this->__('Please enter a valid $ amount. For example $100.00.'),
|
55 |
+
'Please select one of the above options.' => $this->__('Please select one of the above options.'),
|
56 |
+
'Please select one of the options.' => $this->__('Please select one of the options.'),
|
57 |
+
'Please enter a valid number in this field.' => $this->__('Please enter a valid number in this field.'),
|
58 |
+
'Please select State/Province.' => $this->__('Please select State/Province.'),
|
59 |
+
'Please enter valid password.' => $this->__('Please enter valid password.'),
|
60 |
+
'Please enter a number greater than 0 in this field.' => $this->__('Please enter a number greater than 0 in this field.'),
|
61 |
+
'Please enter a valid credit card number.' => $this->__('Please enter a valid credit card number.'),
|
62 |
+
'Please wait, loading...' => $this->__('Please wait, loading...')
|
63 |
+
);
|
64 |
+
?>
|
65 |
+
<script type="text/javascript">
|
66 |
+
var Translator = new Translate(<?php echo Zend_Json::encode($_data) ?>);
|
67 |
+
</script>
|
app/design/adminhtml/default/default/template/page/menu.phtml
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<div class="nav-bar">
|
29 |
+
<!-- menu start -->
|
30 |
+
<?php echo $this->getMenuLevel($this->getMenuArray()); ?>
|
31 |
+
<!-- menu end -->
|
32 |
+
|
33 |
+
<a id="page-help-link" href="<?php echo Mage::helper('adminhtml')->getPageHelpUrl() ?>"><?php echo $this->__('Get help for this page') ?></a>
|
34 |
+
<script type="text/javascript">$('page-help-link').target = 'magento_page_help'</script>
|
35 |
+
|
36 |
+
</div>
|
app/design/adminhtml/default/default/template/page/notices.phtml
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* @see Mage_Adminhtml_Page_Block_Notices
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if ($this->displayNoscriptNotice()): ?>
|
33 |
+
<noscript>
|
34 |
+
<div class="noscript">
|
35 |
+
<div class="noscript-inner">
|
36 |
+
<p><strong><?php echo $this->__('JavaScript seems to be disabled in your browser.'); ?></strong></p>
|
37 |
+
<p><?php echo $this->__('You must have JavaScript enabled in your browser to utilize the functionality of this website.'); ?></p>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
</noscript>
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php if ($this->displayDemoNotice()): ?>
|
43 |
+
<p class="demo-notice"><?php echo $this->__('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?></p>
|
44 |
+
<?php endif; ?>
|
app/design/adminhtml/default/default/template/pagecache/cache/additional.phtml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php if ($this->canShowButton()): ?>
|
29 |
+
<table class="form-list">
|
30 |
+
<tr>
|
31 |
+
<td class="scope-label">
|
32 |
+
<button onclick="setLocation('<?php echo $this->getCleanExternalCacheUrl()?>')" type="button" class="scalable"><span><?php echo Mage::helper('pagecache')->__('Flush External Page Cache') ?></span></button>
|
33 |
+
</td>
|
34 |
+
<td class="scope-label">
|
35 |
+
<?php echo Mage::helper('pagecache')->__('External full page cache.')?>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
<?php endif;?>
|
app/design/adminhtml/default/default/template/paygate/form/cc.phtml
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_formMessage=$this->getPartialAuthorizationFormMessage(); ?>
|
28 |
+
<?php $_isPartialAuthorization=$this->isPartialAuthorization(); ?>
|
29 |
+
<?php if ($_isPartialAuthorization || $_formMessage): ?>
|
30 |
+
<div class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>_before" style="display:none;">
|
31 |
+
<?php if ($_formMessage): ?>
|
32 |
+
<?php echo $this->showNoticeMessage($_formMessage) ?>
|
33 |
+
<?php endif;?>
|
34 |
+
|
35 |
+
<?php if ($_isPartialAuthorization): ?>
|
36 |
+
<?php echo $this->getChildHtml('cards') ?>
|
37 |
+
<div class="release-amounts">
|
38 |
+
<?php echo $this->getCancelButtonHtml()?>
|
39 |
+
<p class="note"><?php echo $this->__('To cancel pending authorizations and release amounts that have already been processed during this payment, click Cancel.') ?></p>
|
40 |
+
</div>
|
41 |
+
<?php echo $this->showNoticeMessage($this->__('Please enter another credit card number to complete your purchase.')) ?>
|
42 |
+
<script type="text/javascript">
|
43 |
+
//<![CDATA[
|
44 |
+
function cancelPaymentAuthorizations(){
|
45 |
+
new Ajax.Request('<?php echo $this->getAdminCancelUrl() ?>', {
|
46 |
+
onSuccess : function(transport) {
|
47 |
+
try{
|
48 |
+
response = eval('(' + transport.responseText + ')');
|
49 |
+
} catch (e) {
|
50 |
+
response = {};
|
51 |
+
}
|
52 |
+
|
53 |
+
if (response.success) {
|
54 |
+
order.loadArea(['billing_method','totals'], true, []);
|
55 |
+
} else {
|
56 |
+
var msg = response.error_message;
|
57 |
+
if (msg) {
|
58 |
+
alert(msg);
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
});
|
63 |
+
}
|
64 |
+
<?php if ($_message = $this->getPartialAuthorizationConfirmationMessage()): ?>
|
65 |
+
if (!confirm('<?php echo $_message ?>')) {
|
66 |
+
cancelPaymentAuthorizations();
|
67 |
+
}
|
68 |
+
<?php endif;?>
|
69 |
+
//]]>
|
70 |
+
</script>
|
71 |
+
<?php endif;?>
|
72 |
+
</div>
|
73 |
+
<?php endif;?>
|
74 |
+
<?php echo $this->getChildHtml('method_form_block') ?>
|
app/design/adminhtml/default/default/template/paygate/info/cc.phtml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<div class="cards-list">
|
29 |
+
|
30 |
+
<?php if (!$this->getHideTitle()): ?>
|
31 |
+
<div class="bold"><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></div>
|
32 |
+
<?php endif;?>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
$cards = $this->getCards();
|
36 |
+
$showCount = count($cards) > 1;
|
37 |
+
?>
|
38 |
+
|
39 |
+
<?php foreach ($cards as $key => $card): ?>
|
40 |
+
<?php if ($showCount): ?>
|
41 |
+
<span><?php echo sprintf($this->__('Credit Card %s'), $key + 1); ?></span>
|
42 |
+
<?php endif;?>
|
43 |
+
|
44 |
+
<table class="info-table<?php if ($showCount):?> offset<?php endif;?>">
|
45 |
+
<tbody>
|
46 |
+
<?php foreach ($card as $_label => $_value):?>
|
47 |
+
<tr>
|
48 |
+
<td><?php echo $this->escapeHtml($_label)?>:</td>
|
49 |
+
<td><?php echo nl2br(implode($this->getValueAsArray($_value, true), "\n"))?></td>
|
50 |
+
</tr>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</tbody>
|
53 |
+
</table>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
|
56 |
+
</div>
|
app/design/adminhtml/default/default/template/paygate/info/pdf.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
$cards = $this->getCards();
|
30 |
+
$showCount = count($cards) > 1;
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php echo $this->getMethod()->getTitle() ?>{{pdf_row_separator}}
|
34 |
+
<?php foreach ($cards as $key => $card): ?>
|
35 |
+
<?php if ($showCount): ?>
|
36 |
+
<?php echo sprintf($this->__('Credit Card %s'), $key + 1); ?>
|
37 |
+
{{pdf_row_separator}}
|
38 |
+
<?php endif;?>
|
39 |
+
|
40 |
+
<?php foreach ($card as $_label => $_value):?>
|
41 |
+
<?php echo $_label ?>: <?php echo implode($this->getValueAsArray($_value), ' ')?>{{pdf_row_separator}}
|
42 |
+
<?php endforeach; ?>
|
43 |
+
<?php endforeach; ?>
|
app/design/adminhtml/default/default/template/payment/form/cc.phtml
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_code=$this->getMethodCode() ?>
|
28 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
29 |
+
<li>
|
30 |
+
<div class="input-box">
|
31 |
+
<label for="<?php echo $_code ?>_cc_type"><?php echo Mage::helper('payment')->__('Credit Card Type') ?> <span class="required">*</span></label><br/>
|
32 |
+
<select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
|
33 |
+
<?php $_ccType = $this->getInfoData('cc_type') ?>
|
34 |
+
<option value=""></option>
|
35 |
+
<?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
36 |
+
<option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
37 |
+
<?php endforeach ?>
|
38 |
+
</select>
|
39 |
+
</div>
|
40 |
+
</li>
|
41 |
+
<li>
|
42 |
+
<div class="input-box">
|
43 |
+
<label for="<?php echo $_code ?>_cc_number"><?php echo Mage::helper('payment')->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
|
44 |
+
<input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo Mage::helper('payment')->__('Credit Card Number') ?>" class="input-text validate-cc-number" value="<?php echo $this->getInfoData('cc_number')?>"/>
|
45 |
+
</div>
|
46 |
+
</li>
|
47 |
+
<li>
|
48 |
+
<div class="input-box">
|
49 |
+
<label for="<?php echo $_code ?>_expiration"><?php echo Mage::helper('payment')->__('Expiration Date') ?> <span class="required">*</span></label><br/>
|
50 |
+
<select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="validate-cc-exp required-entry">
|
51 |
+
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
52 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
53 |
+
<option value="<?php echo $k ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
54 |
+
<?php endforeach ?>
|
55 |
+
</select>
|
56 |
+
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
57 |
+
<select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
|
58 |
+
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
59 |
+
<option value="<?php echo $k ? $k : '' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
60 |
+
<?php endforeach ?>
|
61 |
+
</select>
|
62 |
+
</div>
|
63 |
+
</li>
|
64 |
+
<?php if($this->hasVerification()): ?>
|
65 |
+
<li>
|
66 |
+
<div class="input-box">
|
67 |
+
<label for="<?php echo $_code ?>_cc_cid"><?php echo Mage::helper('payment')->__('Card Verification Number') ?> <span class="required">*</span></label><br/>
|
68 |
+
<input type="text" title="<?php echo Mage::helper('payment')->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="<?php echo $this->getInfoData('cc_cid')?>"/>
|
69 |
+
</div>
|
70 |
+
</li>
|
71 |
+
<?php endif; ?>
|
72 |
+
|
73 |
+
<?php if ($this->hasSsCardType()): ?>
|
74 |
+
<li id="<?php echo $_code ?>_cc_type_ss_div">
|
75 |
+
<ul class="inner-form">
|
76 |
+
<li class="form-alt"><label for="<?php echo $_code ?>_cc_issue" class="required"><em>*</em><?php echo $this->__('Switch/Solo/Maestro Only') ?></label></li>
|
77 |
+
<li>
|
78 |
+
<label for="<?php echo $_code ?>_cc_issue"><?php echo $this->__('Issue Number') ?>:</label>
|
79 |
+
<span class="input-box">
|
80 |
+
<input type="text" title="<?php echo $this->__('Issue Number') ?>" class="input-text validate-cc-ukss cvv" id="<?php echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value="" />
|
81 |
+
</span>
|
82 |
+
</li>
|
83 |
+
|
84 |
+
<li>
|
85 |
+
<label for="<?php echo $_code ?>_start_month"><?php echo $this->__('Start Date') ?>:</label>
|
86 |
+
<div class="input-box">
|
87 |
+
<select id="<?php echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss month">
|
88 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
89 |
+
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
90 |
+
<?php endforeach ?>
|
91 |
+
</select>
|
92 |
+
<select id="<?php echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss year">
|
93 |
+
<?php foreach ($this->getSsStartYears() as $k=>$v): ?>
|
94 |
+
<option value="<?php echo $k?$k:'' ?>"<?php if($k==$this->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
|
95 |
+
<?php endforeach ?>
|
96 |
+
</select>
|
97 |
+
</div>
|
98 |
+
</li>
|
99 |
+
<li class="adv-container"> </li>
|
100 |
+
</ul>
|
101 |
+
<script type="text/javascript">
|
102 |
+
//<![CDATA[
|
103 |
+
var SSChecked<?php echo $_code ?> = function() {
|
104 |
+
var elm = $('<?php echo $_code ?>_cc_type');
|
105 |
+
if (['SS','SM','SO'].indexOf(elm.value) != -1) {
|
106 |
+
$('<?php echo $_code ?>_cc_type_ss_div').show();
|
107 |
+
} else {
|
108 |
+
$('<?php echo $_code ?>_cc_type_ss_div').hide();
|
109 |
+
}
|
110 |
+
};
|
111 |
+
Event.observe($('<?php echo $_code ?>_cc_type'), 'change', SSChecked<?php echo $_code ?>);
|
112 |
+
SSChecked<?php echo $_code ?>();
|
113 |
+
//]]>
|
114 |
+
</script>
|
115 |
+
</li>
|
116 |
+
<?php endif; ?>
|
117 |
+
</ul>
|
app/design/adminhtml/default/default/template/payment/form/ccsave.phtml
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_code=$this->getMethodCode() ?>
|
28 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
29 |
+
<li>
|
30 |
+
<div class="input-box">
|
31 |
+
<label for="<?php echo $_code ?>_cc_owner"><?php echo Mage::helper('payment')->__('Name on Card') ?> <span class="required">*</span></label><br/>
|
32 |
+
<input type="text" title="<?php echo Mage::helper('payment')->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $this->getInfoData('cc_owner') ?>"/>
|
33 |
+
</div>
|
34 |
+
</li>
|
35 |
+
<li>
|
36 |
+
<div class="input-box">
|
37 |
+
<label for="<?php echo $_code ?>_cc_type"><?php echo Mage::helper('payment')->__('Credit Card Type') ?> <span class="required">*</span></label><br/>
|
38 |
+
<select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
|
39 |
+
<?php $_ccType = $this->getInfoData('cc_type') ?>
|
40 |
+
<option value=""></option>
|
41 |
+
<?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
|
42 |
+
<option value="<?php echo $_typeCode ?>" <?php if($_typeCode==$_ccType): ?>selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
|
43 |
+
<?php endforeach ?>
|
44 |
+
</select>
|
45 |
+
</div>
|
46 |
+
</li>
|
47 |
+
<li>
|
48 |
+
<div class="input-box">
|
49 |
+
<label for="<?php echo $_code ?>_cc_number"><?php echo Mage::helper('payment')->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
|
50 |
+
<input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo Mage::helper('payment')->__('Credit Card Number') ?>" class="input-text validate-cc-number" value="<?php echo $this->getInfoData('cc_number')?>"/>
|
51 |
+
</div>
|
52 |
+
</li>
|
53 |
+
<li>
|
54 |
+
<div class="input-box">
|
55 |
+
<label for="<?php echo $_code ?>_expiration"><?php echo Mage::helper('payment')->__('Expiration Date') ?> <span class="required">*</span></label><br/>
|
56 |
+
<select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="validate-cc-exp required-entry">
|
57 |
+
<?php $_ccExpMonth = $this->getInfoData('cc_exp_month') ?>
|
58 |
+
<?php foreach ($this->getCcMonths() as $k=>$v): ?>
|
59 |
+
<option value="<?php echo $k ?>" <?php if($k==$_ccExpMonth): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
60 |
+
<?php endforeach ?>
|
61 |
+
</select>
|
62 |
+
<?php $_ccExpYear = $this->getInfoData('cc_exp_year') ?>
|
63 |
+
<select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
|
64 |
+
<?php foreach ($this->getCcYears() as $k=>$v): ?>
|
65 |
+
<option value="<?php echo $k ? $k : '' ?>" <?php if($k==$_ccExpYear): ?>selected="selected"<?php endif ?>><?php echo $v ?></option>
|
66 |
+
<?php endforeach ?>
|
67 |
+
</se
|