Version Notes
Version number: 1.0 Stability: Stable Compatibility: 1.7, 1.8
Download this release
Release Info
Developer | Magenmarket.com |
Extension | Ma2_Juno_Theme |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit.php +90 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Edit.php +32 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Grid.php +344 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Renderer/Name.php +29 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Renderer/Visibility.php +21 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts.php +9 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit.php +29 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Form.php +18 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Tab/Form.php +108 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Tabs.php +23 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Grid.php +85 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/ApplyToFeatured.php +57 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/CategoryId.php +63 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/EnableDisable.php +57 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/NameTemplates.php +50 -0
- app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/Status.php +20 -0
- app/code/local/Ma2/FeaturedProducts/Block/FeaturedProducts.php +9 -0
- app/code/local/Ma2/FeaturedProducts/Block/Listing.php +68 -0
- app/code/local/Ma2/FeaturedProducts/Block/Product.php +19 -0
- app/code/local/Ma2/FeaturedProducts/Block/Product/List.php +85 -0
- app/code/local/Ma2/FeaturedProducts/Helper/Data.php +22 -0
- app/code/local/Ma2/FeaturedProducts/Model/Mysql4/FeaturedProducts.php +11 -0
- app/code/local/Ma2/FeaturedProducts/Model/Mysql4/FeaturedProducts/Collection.php +9 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/ApplyTo.php +13 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/ApplyToPage.php +14 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/Categoryid.php +33 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/EnableDisable.php +12 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/Numberaction.php +14 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/Selecttoview.php +13 -0
- app/code/local/Ma2/FeaturedProducts/Model/Source/Status.php +13 -0
- app/code/local/Ma2/FeaturedProducts/Model/System/Config/Source/Sort.php +14 -0
- app/code/local/Ma2/FeaturedProducts/controllers/Adminhtml/FeaturedController.php +115 -0
- app/code/local/Ma2/FeaturedProducts/controllers/Adminhtml/FeaturedProductController.php +113 -0
- app/code/local/Ma2/FeaturedProducts/controllers/IndexController.php +29 -0
- app/code/local/Ma2/FeaturedProducts/etc/adminhtml.xml +37 -0
- app/code/local/Ma2/FeaturedProducts/etc/config.xml +145 -0
- app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-install-1.0.1.php +29 -0
- app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-upgrade-1.0.1-1.1.1.php +7 -0
- app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-upgrade-1.1.1-1.2.3.php +33 -0
- app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/upgrade-1.2.3-2.0.0.php +7 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow.php +13 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit.php +45 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Form.php +19 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Tab/Form.php +130 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Tabs.php +27 -0
- app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Grid.php +169 -0
- app/code/local/Ma2/Slideshow/Block/Slideshow.php +18 -0
- app/code/local/Ma2/Slideshow/Helper/Data.php +18 -0
- app/code/local/Ma2/Slideshow/Model/Mysql4/Slideshow.php +10 -0
- app/code/local/Ma2/Slideshow/Model/Mysql4/Slideshow/Collection.php +15 -0
- app/code/local/Ma2/Slideshow/Model/Slideshow.php +25 -0
- app/code/local/Ma2/Slideshow/Model/Slideshowselect.php +19 -0
- app/code/local/Ma2/Slideshow/Model/Status.php +15 -0
- app/code/local/Ma2/Slideshow/Model/Transitiontype.php +12 -0
- app/code/local/Ma2/Slideshow/controllers/Adminhtml/SlideshowController.php +285 -0
- app/code/local/Ma2/Slideshow/controllers/IndexController.php +47 -0
- app/code/local/Ma2/Slideshow/etc/config.xml +191 -0
- app/code/local/Ma2/Slideshow/etc/system.xml +154 -0
- app/code/local/Ma2/Slideshow/etc/widget.xml +28 -0
- app/code/local/Ma2/Slideshow/sql/slideshow_setup/mysql4-install-0.1.0.php +25 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Font_unused.php +68 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fontpreview.php +127 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fonts_unused.php +176 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fontscript_unused.php +69 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Heading.php +16 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Images.php +63 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Imagessmall.php +63 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/OColor.php +17 -0
- app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Patern.php +62 -0
- app/code/local/Ma2/ThemeOptions/Block/ThemeOptions.php +12 -0
- app/code/local/Ma2/ThemeOptions/Controller/Observer.php +11 -0
- app/code/local/Ma2/ThemeOptions/Exception.php +36 -0
- app/code/local/Ma2/ThemeOptions/Helper/Data.php +30 -0
- app/code/local/Ma2/ThemeOptions/Model/Backgroundposition.php +19 -0
- app/code/local/Ma2/ThemeOptions/Model/Backgroundrepeat.php +14 -0
- app/code/local/Ma2/ThemeOptions/Model/Fontreplacement.php +12 -0
- app/code/local/Ma2/ThemeOptions/Model/Fonts.php +126 -0
- app/code/local/Ma2/ThemeOptions/Model/Gfont_unused.php +25 -0
- app/code/local/Ma2/ThemeOptions/Model/Presetstyles.php +13 -0
- app/code/local/Ma2/ThemeOptions/Model/Productpagelayout.php +14 -0
- app/code/local/Ma2/ThemeOptions/etc/adminhtml.xml +37 -0
- app/code/local/Ma2/ThemeOptions/etc/config.xml +150 -0
- app/code/local/Ma2/ThemeOptions/etc/system.xml +702 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/Catalog/Product/Widget/Chooser.php +380 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/Edit/Form.php +16 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/EnableDisable.php +48 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/InputNumber.php +21 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/InputText.php +15 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/SortBy.php +49 -0
- app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/TypeList.php +49 -0
- app/code/local/Ma2/WidgetProductList/Block/BestSelling.php +66 -0
- app/code/local/Ma2/WidgetProductList/Block/Custom.php +58 -0
- app/code/local/Ma2/WidgetProductList/Block/Featured.php +82 -0
- app/code/local/Ma2/WidgetProductList/Block/New.php +90 -0
- app/code/local/Ma2/WidgetProductList/Helper/Data.php +14 -0
- app/code/local/Ma2/WidgetProductList/Model/Source/TypeList.php +13 -0
- app/code/local/Ma2/WidgetProductList/Model/WidgetProductList.php +9 -0
- app/code/local/Ma2/WidgetProductList/controllers/Adminhtml/WidgetProductListController.php +37 -0
- app/code/local/Ma2/WidgetProductList/etc/config.xml +56 -0
- app/code/local/Ma2/WidgetProductList/etc/widget.xml +433 -0
- app/code/local/Ma2/WidgetTabs/Block/Adminhtml/System/Config/Form/Field/Editor.php +11 -0
- app/code/local/Ma2/WidgetTabs/Block/Adminhtml/System/Config/Form/Field/Tabitem.php +111 -0
- app/code/local/Ma2/WidgetTabs/Block/Widget/Wysiwyg.php +15 -0
- app/code/local/Ma2/WidgetTabs/Block/WidgetTabs.php +33 -0
- app/code/local/Ma2/WidgetTabs/Helper/Data.php +12 -0
- app/code/local/Ma2/WidgetTabs/Model/Mysql4/Widget/Instance/Collection.php +50 -0
- app/code/local/Ma2/WidgetTabs/Model/System/Config/Source/MultiInstances.php +21 -0
- app/code/local/Ma2/WidgetTabs/controllers/Adminhtml/WidgetTabsController.php +19 -0
- app/code/local/Ma2/WidgetTabs/controllers/IndexController.php +11 -0
- app/code/local/Ma2/WidgetTabs/etc/config.xml +84 -0
- app/code/local/Ma2/WidgetTabs/etc/widget.xml +29 -0
- app/design/adminhtml/default/default/layout/ma2featuredproducts.xml +10 -0
- app/design/adminhtml/default/default/layout/ma2slideshow.xml +8 -0
- app/design/adminhtml/default/default/layout/ma2themeoptions.xml +15 -0
- app/design/adminhtml/default/default/layout/ma2widgettabs.xml +10 -0
- app/design/frontend/ma2/default/etc/widget.xml +166 -0
- app/design/frontend/ma2/default/layout/local.xml +312 -0
- app/design/frontend/ma2/default/layout/ma2featuredproducts.xml +8 -0
- app/design/frontend/ma2/default/layout/ma2slideshow.xml +13 -0
- app/design/frontend/ma2/default/layout/ma2widgettabs.xml +13 -0
- app/design/frontend/ma2/default/template/catalog/category/page.phtml +36 -0
- app/design/frontend/ma2/default/template/catalog/category/view.phtml +71 -0
- app/design/frontend/ma2/default/template/catalog/category/widget/link/link_block.phtml +27 -0
- app/design/frontend/ma2/default/template/catalog/category/widget/link/link_inline.phtml +27 -0
- app/design/frontend/ma2/default/template/catalog/layer/filter.phtml +47 -0
- app/design/frontend/ma2/default/template/catalog/layer/state.phtml +55 -0
- app/design/frontend/ma2/default/template/catalog/layer/view.phtml +59 -0
- app/design/frontend/ma2/default/template/catalog/msrp/popup.phtml +59 -0
- app/design/frontend/ma2/default/template/catalog/navigation/left.phtml +59 -0
- app/design/frontend/ma2/default/template/catalog/navigation/right.phtml +91 -0
- app/design/frontend/ma2/default/template/catalog/navigation/top.phtml +49 -0
- app/design/frontend/ma2/default/template/catalog/product/compare/list.phtml +162 -0
- app/design/frontend/ma2/default/template/catalog/product/compare/sidebar.phtml +60 -0
- app/design/frontend/ma2/default/template/catalog/product/gallery.phtml +66 -0
- app/design/frontend/ma2/default/template/catalog/product/list.phtml +155 -0
- app/design/frontend/ma2/default/template/catalog/product/list/related.phtml +120 -0
- app/design/frontend/ma2/default/template/catalog/product/list/toolbar.phtml +99 -0
- app/design/frontend/ma2/default/template/catalog/product/list/upsell.phtml +52 -0
- app/design/frontend/ma2/default/template/catalog/product/new.phtml +83 -0
- app/design/frontend/ma2/default/template/catalog/product/price.phtml +428 -0
- app/design/frontend/ma2/default/template/catalog/product/price_msrp.phtml +69 -0
- app/design/frontend/ma2/default/template/catalog/product/price_msrp_item.phtml +106 -0
- app/design/frontend/ma2/default/template/catalog/product/price_msrp_noform.phtml +73 -0
- app/design/frontend/ma2/default/template/catalog/product/price_msrp_rss.phtml +42 -0
- app/design/frontend/ma2/default/template/catalog/product/view.phtml +263 -0
- app/design/frontend/ma2/default/template/catalog/product/view/additional.phtml +29 -0
- app/design/frontend/ma2/default/template/catalog/product/view/addto.phtml +41 -0
- app/design/frontend/ma2/default/template/catalog/product/view/addtocart.phtml +38 -0
- app/design/frontend/ma2/default/template/catalog/product/view/attributes.phtml +52 -0
- app/design/frontend/ma2/default/template/catalog/product/view/description.phtml +39 -0
- app/design/frontend/ma2/default/template/catalog/product/view/media.phtml +78 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options.phtml +193 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/js.phtml +89 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/type/date.phtml +92 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/type/default.phtml +30 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/type/file.phtml +103 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/type/select.phtml +40 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/type/text.phtml +41 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/wrapper.phtml +33 -0
- app/design/frontend/ma2/default/template/catalog/product/view/options/wrapper/bottom.phtml +29 -0
- app/design/frontend/ma2/default/template/catalog/product/view/price.phtml +34 -0
- app/design/frontend/ma2/default/template/catalog/product/view/price_clone.phtml +28 -0
- app/design/frontend/ma2/default/template/catalog/product/view/tierprices.phtml +232 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/configurable.phtml +31 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/default.phtml +36 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/grouped.phtml +91 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/options/configurable.phtml +48 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/simple.phtml +31 -0
- app/design/frontend/ma2/default/template/catalog/product/view/type/virtual.phtml +31 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/link/link_block.phtml +27 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/link/link_inline.phtml +27 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_default_list.phtml +55 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_images_list.phtml +46 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_names_list.phtml +46 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/new/content/new_grid.phtml +65 -0
- app/design/frontend/ma2/default/template/catalog/product/widget/new/content/new_list.phtml +62 -0
- app/design/frontend/ma2/default/template/catalog/rss/product/price.phtml +356 -0
- app/design/frontend/ma2/default/template/catalog/seo/sitemap.phtml +50 -0
- app/design/frontend/ma2/default/template/catalog/seo/sitemap/container.phtml +38 -0
- app/design/frontend/ma2/default/template/catalog/seo/tree.phtml +43 -0
- app/design/frontend/ma2/default/template/catalogsearch/advanced/form.phtml +96 -0
- app/design/frontend/ma2/default/template/catalogsearch/advanced/result.phtml +60 -0
- app/design/frontend/ma2/default/template/catalogsearch/form.mini.phtml +45 -0
- app/design/frontend/ma2/default/template/catalogsearch/result.phtml +55 -0
- app/design/frontend/ma2/default/template/catalogsearch/term.phtml +38 -0
- app/design/frontend/ma2/default/template/checkout/cart.phtml +163 -0
- app/design/frontend/ma2/default/template/checkout/cart/coupon.phtml +59 -0
- app/design/frontend/ma2/default/template/checkout/cart/crosssell.phtml +59 -0
- app/design/frontend/ma2/default/template/checkout/cart/item/configure/updatecart.phtml +39 -0
- app/design/frontend/ma2/default/template/checkout/cart/item/default.phtml +278 -0
- app/design/frontend/ma2/default/template/checkout/cart/noItems.phtml +36 -0
- app/design/frontend/ma2/default/template/checkout/cart/render/default.phtml +70 -0
- app/design/frontend/ma2/default/template/checkout/cart/render/simple.phtml +70 -0
- app/design/frontend/ma2/default/template/checkout/cart/shipping.phtml +139 -0
- app/design/frontend/ma2/default/template/checkout/cart/sidebar.phtml +90 -0
- app/design/frontend/ma2/default/template/checkout/cart/sidebar/default.phtml +145 -0
- app/design/frontend/ma2/default/template/checkout/cart/totals.phtml +48 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/address/select.phtml +58 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/addresses.phtml +81 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/agreements.phtml +49 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/billing.phtml +116 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/billing/items.phtml +54 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/item/default.phtml +45 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/link.phtml +27 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/overview.phtml +242 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/overview/item.phtml +238 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/shipping.phtml +130 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/state.phtml +39 -0
- app/design/frontend/ma2/default/template/checkout/multishipping/success.phtml +50 -0
- app/design/frontend/ma2/default/template/checkout/onepage.phtml +60 -0
- app/design/frontend/ma2/default/template/checkout/onepage/agreements.phtml +51 -0
- app/design/frontend/ma2/default/template/checkout/onepage/billing.phtml +216 -0
- app/design/frontend/ma2/default/template/checkout/onepage/failure.phtml +32 -0
- app/design/frontend/ma2/default/template/checkout/onepage/link.phtml +29 -0
- app/design/frontend/ma2/default/template/checkout/onepage/login.phtml +123 -0
- app/design/frontend/ma2/default/template/checkout/onepage/payment.phtml +73 -0
- app/design/frontend/ma2/default/template/checkout/onepage/payment/info.phtml +29 -0
- app/design/frontend/ma2/default/template/checkout/onepage/payment/methods.phtml +73 -0
- app/design/frontend/ma2/default/template/checkout/onepage/progress.phtml +59 -0
- app/design/frontend/ma2/default/template/checkout/onepage/progress/billing.phtml +40 -0
- app/design/frontend/ma2/default/template/checkout/onepage/progress/payment.phtml +41 -0
- app/design/frontend/ma2/default/template/checkout/onepage/progress/shipping.phtml +44 -0
- app/design/frontend/ma2/default/template/checkout/onepage/progress/shipping_method.phtml +57 -0
- app/design/frontend/ma2/default/template/checkout/onepage/review.phtml +29 -0
- app/design/frontend/ma2/default/template/checkout/onepage/review/button.phtml +27 -0
- app/design/frontend/ma2/default/template/checkout/onepage/review/info.phtml +84 -0
- app/design/frontend/ma2/default/template/checkout/onepage/review/item.phtml +239 -0
- app/design/frontend/ma2/default/template/checkout/onepage/review/totals.phtml +47 -0
- app/design/frontend/ma2/default/template/checkout/onepage/shipping.phtml +156 -0
- app/design/frontend/ma2/default/template/checkout/onepage/shipping_method.phtml +46 -0
- app/design/frontend/ma2/default/template/checkout/onepage/shipping_method/additional.phtml +29 -0
- app/design/frontend/ma2/default/template/checkout/onepage/shipping_method/available.phtml +101 -0
- app/design/frontend/ma2/default/template/checkout/success.phtml +64 -0
- app/design/frontend/ma2/default/template/checkout/total/default.phtml +38 -0
- app/design/frontend/ma2/default/template/checkout/total/nominal.phtml +56 -0
- app/design/frontend/ma2/default/template/checkout/total/tax.phtml +68 -0
- app/design/frontend/ma2/default/template/cms/content.phtml +27 -0
- app/design/frontend/ma2/default/template/cms/content_heading.phtml +31 -0
- app/design/frontend/ma2/default/template/cms/default/home.phtml +27 -0
- app/design/frontend/ma2/default/template/cms/default/no-route.phtml +27 -0
- app/design/frontend/ma2/default/template/cms/meta.phtml +32 -0
- app/design/frontend/ma2/default/template/cms/widget/link/link_block.phtml +27 -0
- app/design/frontend/ma2/default/template/cms/widget/link/link_inline.phtml +27 -0
- app/design/frontend/ma2/default/template/cms/widget/static_block/default.phtml +32 -0
- app/design/frontend/ma2/default/template/ma2featureproducts/featuredproducts.phtml +163 -0
- app/design/frontend/ma2/default/template/ma2slideshow/slideshow.phtml +58 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/default.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/template1.phtml +120 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/template2.phtml +153 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/default.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/template1.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/template2.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/default.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/template1.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/template2.phtml +153 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/new/default.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/new/template1.phtml +138 -0
- app/design/frontend/ma2/default/template/ma2widgetproductlist/new/template2.phtml +153 -0
- app/design/frontend/ma2/default/template/ma2widgettabs/widgettabs.phtml +43 -0
- app/design/frontend/ma2/default/template/page/1column.phtml +64 -0
- app/design/frontend/ma2/default/template/page/2columns-left.phtml +67 -0
- app/design/frontend/ma2/default/template/page/2columns-right.phtml +67 -0
- app/design/frontend/ma2/default/template/page/3columns.phtml +68 -0
- app/design/frontend/ma2/default/template/page/empty.phtml +46 -0
- app/design/frontend/ma2/default/template/page/html/bottomBlock1.phtml +55 -0
- app/design/frontend/ma2/default/template/page/html/bottomBlock2.phtml +60 -0
- app/design/frontend/ma2/default/template/page/html/bottomBlock3.phtml +54 -0
- app/design/frontend/ma2/default/template/page/html/breadcrumbs.phtml +46 -0
- app/design/frontend/ma2/default/template/page/html/footer.phtml +31 -0
- app/design/frontend/ma2/default/template/page/html/footerBlock1.phtml +55 -0
- app/design/frontend/ma2/default/template/page/html/footerBlock2.phtml +54 -0
- app/design/frontend/ma2/default/template/page/html/head.phtml +274 -0
- app/design/frontend/ma2/default/template/page/html/header.phtml +72 -0
- app/design/frontend/ma2/default/template/page/html/maintopBlock1.phtml +54 -0
- app/design/frontend/ma2/default/template/page/html/maintopBlock2.phtml +54 -0
- app/design/frontend/ma2/default/template/page/html/maintopBlock3.phtml +54 -0
- app/design/frontend/ma2/default/template/page/html/notices.phtml +69 -0
- app/design/frontend/ma2/default/template/page/html/pager.phtml +124 -0
- app/design/frontend/ma2/default/template/page/html/presetstyles.phtml +71 -0
- app/design/frontend/ma2/default/template/page/html/top.links.phtml +39 -0
- app/design/frontend/ma2/default/template/page/html/topBlock1.phtml +28 -0
- app/design/frontend/ma2/default/template/page/html/topBlock2.phtml +28 -0
- app/design/frontend/ma2/default/template/page/html/topMenu.phtml +41 -0
- app/design/frontend/ma2/default/template/page/html/wrapper.phtml +50 -0
- app/design/frontend/ma2/default/template/page/js/calendar.phtml +94 -0
- app/design/frontend/ma2/default/template/page/js/cookie.phtml +40 -0
- app/design/frontend/ma2/default/template/page/popup.phtml +45 -0
- app/design/frontend/ma2/default/template/page/print.phtml +52 -0
- app/design/frontend/ma2/default/template/page/redirect.phtml +36 -0
- app/design/frontend/ma2/default/template/page/switch/flags.phtml +37 -0
- app/design/frontend/ma2/default/template/page/switch/languages.phtml +44 -0
- app/design/frontend/ma2/default/template/page/switch/stores.phtml +47 -0
- app/design/frontend/ma2/default/template/page/template/container.phtml +35 -0
- app/design/frontend/ma2/default/template/page/template/links.phtml +43 -0
- app/design/frontend/ma2/default/template/page/template/linksblock.phtml +32 -0
- app/etc/modules/Ma2_FeaturedProducts.xml +9 -0
- app/etc/modules/Ma2_Slideshow.xml +0 -0
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_Edit extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
3 |
+
|
4 |
+
protected $_saveButtonLabel = 'Save Featured Products';
|
5 |
+
protected $_ma2Url = 'http://www.omegatheme.com';
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
|
9 |
+
|
10 |
+
$this->_blockGroup = 'FeaturedProducts';
|
11 |
+
$this->_controller = 'adminhtml_edit';
|
12 |
+
|
13 |
+
|
14 |
+
$this->_headerText = Mage::helper('adminhtml')->__('Featured products');
|
15 |
+
|
16 |
+
parent::__construct();
|
17 |
+
|
18 |
+
$this->_removeButton('add');
|
19 |
+
|
20 |
+
$this->_addButton('save', array(
|
21 |
+
'label' => $this->_saveButtonLabel,
|
22 |
+
'onclick' => 'categorySubmit(\'' . $this->getSaveUrl() . '\')',
|
23 |
+
'class' => 'Save',
|
24 |
+
));
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getSaveUrl() {
|
28 |
+
return $this->getUrl('*/*/save', array('store' => $this->getRequest()->getParam('store')));
|
29 |
+
}
|
30 |
+
|
31 |
+
protected function _afterToHtml($html) {
|
32 |
+
return $this->_prependHtml() . parent::_afterToHtml($html) . $this->_appendHtml();
|
33 |
+
}
|
34 |
+
|
35 |
+
private function _prependHtml() {
|
36 |
+
$html = '
|
37 |
+
|
38 |
+
<form id="featured_edit_form" action="' . $this->getSaveUrl() . '" method="post" enctype="multipart/form-data">
|
39 |
+
<input name="form_key" type="hidden" value="' . $this->getFormKey() . '" />
|
40 |
+
<div class="no-display">
|
41 |
+
<input type="hidden" name="featured_products" id="in_featured_products" value="" />
|
42 |
+
</div>
|
43 |
+
</form>
|
44 |
+
';
|
45 |
+
|
46 |
+
return $html;
|
47 |
+
}
|
48 |
+
|
49 |
+
private function _appendHtml() {
|
50 |
+
$html =
|
51 |
+
'
|
52 |
+
<style type="text/css">
|
53 |
+
<!--
|
54 |
+
#logo_wrapp a{
|
55 |
+
display:block;
|
56 |
+
width:75px;
|
57 |
+
float:right;
|
58 |
+
padding:0px 0px 0px 0px;
|
59 |
+
margin:5px 0px 0px 0px;
|
60 |
+
background:url(' . $this->getSkinUrl('images/omega-logo.png') . ') no-repeat 0px 0px;
|
61 |
+
text-indent: -9999px;
|
62 |
+
font-size: 0px;
|
63 |
+
line-height: 0px; settingp
|
64 |
+
height:13px;
|
65 |
+
}
|
66 |
+
#logo_wrapp a:hover {background:url(' . $this->getSkinUrl('images/omega-logo.png') . ') no-repeat 0px -13px; }
|
67 |
+
-->
|
68 |
+
</style>
|
69 |
+
<div style="text-align:right;">Community version of <a href="' . $this->_ma2Url . '/ecommerce/magento/featured-products-on-magento-frontpage/" target="_blank">Featured Products Extension</a></div>
|
70 |
+
<div id="logo_wrapp"><a href="' . $this->_ma2Url . '" target="_blank">Ma2</a></div>
|
71 |
+
';
|
72 |
+
return $html;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function getHeaderHtml() {
|
76 |
+
return '<h3 style="background-image: url(' . $this->getSkinUrl('images/golden_star.png') . ');" class="' . $this->getHeaderCssClass() . '">' . $this->getHeaderText() . '</h3>';
|
77 |
+
}
|
78 |
+
|
79 |
+
protected function _prepareLayout() {
|
80 |
+
$this->setChild('store_switcher', $this->getLayout()->createBlock('adminhtml/store_switcher', 'store_switcher')->setUseConfirm(false)
|
81 |
+
);
|
82 |
+
return parent::_prepareLayout();
|
83 |
+
}
|
84 |
+
|
85 |
+
public function getGridHtml() {
|
86 |
+
|
87 |
+
return $this->getChildHtml('store_switcher') . $this->getChildHtml('grid');
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Edit.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_Edit extends Mage_Adminhtml_Block_Widget_Form_Container{
|
3 |
+
public function __construct()
|
4 |
+
{
|
5 |
+
//vwe assign the same blockGroup as the Grid Container
|
6 |
+
$this->_blockGroup = 'FeaturedProducts';
|
7 |
+
|
8 |
+
//and the same controller
|
9 |
+
$this->_controller = 'adminhtml_FeaturedProducts';
|
10 |
+
|
11 |
+
parent::__construct();
|
12 |
+
$this->_objectId = 'id';
|
13 |
+
|
14 |
+
//define the label for the save and delete button
|
15 |
+
$this->_updateButton('save', 'label','save reference');
|
16 |
+
$this->_updateButton('delete', 'label', 'delete reference');
|
17 |
+
}
|
18 |
+
/* Here, we're looking if we have transmitted a form object,
|
19 |
+
to update the good text in the header of the page (edit or add) */
|
20 |
+
public function getHeaderText()
|
21 |
+
{
|
22 |
+
if( Mage::registry('FeaturedProducts_data')&&Mage::registry('FeaturedProducts_data')->getId())
|
23 |
+
{
|
24 |
+
return 'Editer la reference '.$this->htmlEscape(
|
25 |
+
Mage::registry('FeaturedProducts_data')->getTitle()).'<br />';
|
26 |
+
}
|
27 |
+
else
|
28 |
+
{
|
29 |
+
return $this->__('New contact');
|
30 |
+
}
|
31 |
+
}
|
32 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Grid.php
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_Edit_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
public function __construct() {
|
5 |
+
parent::__construct();
|
6 |
+
|
7 |
+
$this->setId('ma2_featured_products');
|
8 |
+
$this->setDefaultSort('entity_id');
|
9 |
+
$this->setUseAjax(true);
|
10 |
+
|
11 |
+
$this->setRowClickCallback('FeaturedRowClick');
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getProduct() {
|
15 |
+
return Mage::registry('product');
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _getStore() {
|
19 |
+
$storeId = (int) $this->getRequest()->getParam('store', 0);
|
20 |
+
return Mage::app()->getStore($storeId);
|
21 |
+
}
|
22 |
+
|
23 |
+
protected function _addColumnFilterToCollection($column) {
|
24 |
+
|
25 |
+
if ($this->getCollection()) {
|
26 |
+
if ($column->getId() == 'websites') {
|
27 |
+
|
28 |
+
$this->getCollection()->joinField('websites', 'catalog/product_website', 'website_id', 'product_id=entity_id', null, 'left');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
if ($column->getId() == "featured") {
|
34 |
+
$productIds = $this->_getSelectedProducts();
|
35 |
+
|
36 |
+
if (empty($productIds)) {
|
37 |
+
$productIds = 0;
|
38 |
+
}
|
39 |
+
if ($column->getFilter()->getValue()) {
|
40 |
+
$this->getCollection()->addFieldToFilter('entity_id', array('in' => $productIds));
|
41 |
+
} elseif (!empty($productIds)) {
|
42 |
+
$this->getCollection()->addFieldToFilter('entity_id', array('nin' => $productIds));
|
43 |
+
}
|
44 |
+
} else {
|
45 |
+
|
46 |
+
parent::_addColumnFilterToCollection($column);
|
47 |
+
}
|
48 |
+
|
49 |
+
return $this;
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _prepareCollection() {
|
53 |
+
|
54 |
+
$store = $this->_getStore();
|
55 |
+
|
56 |
+
$collection = Mage::getModel('catalog/product')->getCollection()
|
57 |
+
->addAttributeToSelect('name')
|
58 |
+
->addAttributeToSelect('sku')
|
59 |
+
->addAttributeToSelect('ma2_featured_product')
|
60 |
+
->addAttributeToSelect('type_id')
|
61 |
+
->addAttributeToFilter('visibility', array('nin' => array(1, 3)));
|
62 |
+
|
63 |
+
|
64 |
+
if ($store->getId()) {
|
65 |
+
//$collection->setStoreId($store->getId());
|
66 |
+
$collection->addStoreFilter($store);
|
67 |
+
$collection->joinAttribute('custom_name', 'catalog_product/name', 'entity_id', null, 'inner', $store->getId());
|
68 |
+
$collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner', $store->getId());
|
69 |
+
$collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', 1, 'inner', $store->getId());
|
70 |
+
$collection->joinAttribute('price', 'catalog_product/price', 'entity_id', null, 'left', $store->getId());
|
71 |
+
} else {
|
72 |
+
$collection->addAttributeToSelect('price');
|
73 |
+
$collection->addAttributeToSelect('status');
|
74 |
+
$collection->addAttributeToSelect('visibility');
|
75 |
+
}
|
76 |
+
|
77 |
+
$action_name = $this->getRequest()->getActionName();
|
78 |
+
|
79 |
+
if ($action_name == 'exportCsv' || $action_name == 'exportXml') {
|
80 |
+
$collection->addAttributeToFilter('ma2_featured_product', array('eq' => true));
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
+
$this->setCollection($collection);
|
85 |
+
|
86 |
+
parent::_prepareCollection();
|
87 |
+
|
88 |
+
$this->getCollection()->addWebsiteNamesToResult();
|
89 |
+
|
90 |
+
return $this;
|
91 |
+
}
|
92 |
+
|
93 |
+
protected function _prepareColumns() {
|
94 |
+
|
95 |
+
$action_name = $this->getRequest()->getActionName();
|
96 |
+
|
97 |
+
if ($action_name != 'exportCsv' && $action_name != 'exportXml') {
|
98 |
+
|
99 |
+
$this->addColumn('featured', array(
|
100 |
+
'header_css_class' => 'a-center',
|
101 |
+
'type' => 'checkbox',
|
102 |
+
'name' => 'featured',
|
103 |
+
'values' => $this->_getSelectedProducts(),
|
104 |
+
'align' => 'center',
|
105 |
+
'index' => 'entity_id'
|
106 |
+
));
|
107 |
+
}
|
108 |
+
|
109 |
+
$this->addColumn('entity_id', array(
|
110 |
+
'header' => Mage::helper('catalog')->__('ID'),
|
111 |
+
'sortable' => true,
|
112 |
+
'width' => '24px',
|
113 |
+
'index' => 'entity_id',
|
114 |
+
'type' => 'number'
|
115 |
+
));
|
116 |
+
|
117 |
+
$this->addColumn('image', array(
|
118 |
+
'header' => Mage::helper('catalog')->__('Image'),
|
119 |
+
'name' => 'image',
|
120 |
+
'width' => '268px',
|
121 |
+
'index' => 'entity_id',
|
122 |
+
'renderer' => 'Ma2_FeaturedProducts_Block_Product'
|
123 |
+
));
|
124 |
+
|
125 |
+
$this->addColumn('name', array(
|
126 |
+
'header' => Mage::helper('catalog')->__('Name'),
|
127 |
+
'index' => 'name',
|
128 |
+
'width' => '268px',
|
129 |
+
));
|
130 |
+
|
131 |
+
$this->addColumn('type', array(
|
132 |
+
'header' => Mage::helper('catalog')->__('Type'),
|
133 |
+
'width' => '126px',
|
134 |
+
'index' => 'type_id',
|
135 |
+
'type' => 'options',
|
136 |
+
'options' => Mage::getSingleton('catalog/product_type')->getOptionArray(),
|
137 |
+
));
|
138 |
+
|
139 |
+
$this->addColumn('sku', array(
|
140 |
+
'header' => Mage::helper('catalog')->__('SKU'),
|
141 |
+
'width' => '140px',
|
142 |
+
'index' => 'sku'
|
143 |
+
));
|
144 |
+
|
145 |
+
$this->addColumn('visibility', array(
|
146 |
+
'header' => Mage::helper('catalog')->__('Visibility'),
|
147 |
+
'width' => '89px',
|
148 |
+
'index' => 'visibility',
|
149 |
+
'filter' => false,
|
150 |
+
//'renderer' => 'ma2FeaturedProducts/adminhtml_edit_renderer_visibility',
|
151 |
+
));
|
152 |
+
|
153 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
154 |
+
$this->addColumn('websites', array(
|
155 |
+
'header' => Mage::helper('catalog')->__('Websites'),
|
156 |
+
'sortable' => false,
|
157 |
+
'index' => 'websites',
|
158 |
+
'type' => 'options',
|
159 |
+
'options' => Mage::getModel('core/website')->getCollection()->toOptionHash(),
|
160 |
+
));
|
161 |
+
}
|
162 |
+
|
163 |
+
$store = $this->_getStore();
|
164 |
+
$this->addColumn('price', array(
|
165 |
+
'header' => Mage::helper('catalog')->__('Price'),
|
166 |
+
'type' => 'price',
|
167 |
+
'currency_code' => $store->getBaseCurrency()->getCode(),
|
168 |
+
'index' => 'price',
|
169 |
+
));
|
170 |
+
|
171 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('FeaturedProducts')->__('CSV'));
|
172 |
+
$this->addExportType('*/*/exportXml', Mage::helper('FeaturedProducts')->__('Excel XML'));
|
173 |
+
|
174 |
+
return parent::_prepareColumns();
|
175 |
+
}
|
176 |
+
|
177 |
+
public function getGridUrl() {
|
178 |
+
return $this->getUrl('*/*/grid', array('_current' => true));
|
179 |
+
}
|
180 |
+
|
181 |
+
protected function _getSelectedProducts($json = false) {
|
182 |
+
$temp = $this->getRequest()->getPost('featured_ids');
|
183 |
+
$store = $this->_getStore();
|
184 |
+
|
185 |
+
if ($temp) {
|
186 |
+
parse_str($temp, $featured_ids);
|
187 |
+
}
|
188 |
+
|
189 |
+
$_prod = Mage::getModel('catalog/product')->getCollection()
|
190 |
+
->joinAttribute('ma2_featured_product', 'catalog_product/ma2_featured_product', 'entity_id', null, 'left', $store->getId())
|
191 |
+
->addAttributeToFilter('ma2_featured_product', '1');
|
192 |
+
|
193 |
+
$products = $_prod->getColumnValues('entity_id');
|
194 |
+
$selected_products = array();
|
195 |
+
|
196 |
+
|
197 |
+
if ($json == true) {
|
198 |
+
foreach ($products as $key => $value) {
|
199 |
+
$selected_products[$value] = '1';
|
200 |
+
}
|
201 |
+
return Zend_Json::encode($selected_products);
|
202 |
+
} else {
|
203 |
+
|
204 |
+
foreach ($products as $key => $value) {
|
205 |
+
if ((isset($featured_ids[$value])) && ($featured_ids[$value] == 0)) {
|
206 |
+
|
207 |
+
}else
|
208 |
+
$selected_products[$value] = '0';
|
209 |
+
}
|
210 |
+
|
211 |
+
if (isset($featured_ids))
|
212 |
+
foreach ($featured_ids as $key => $value) {
|
213 |
+
if ($value == 1)
|
214 |
+
$selected_products[$key] = '0';
|
215 |
+
}
|
216 |
+
|
217 |
+
return array_keys($selected_products);
|
218 |
+
}
|
219 |
+
|
220 |
+
return $products;
|
221 |
+
}
|
222 |
+
|
223 |
+
//add javascript before/after grid html
|
224 |
+
protected function _afterToHtml($html) {
|
225 |
+
return $this->_prependHtml() . parent::_afterToHtml($html) . $this->_appendHtml();
|
226 |
+
}
|
227 |
+
|
228 |
+
private function _prependHtml() {
|
229 |
+
$gridName = $this->getJsObjectName();
|
230 |
+
|
231 |
+
$html =
|
232 |
+
<<<EndHTML
|
233 |
+
<script type="text/javascript">
|
234 |
+
//<![CDATA[
|
235 |
+
|
236 |
+
categoryForm = new varienForm('featured_edit_form');
|
237 |
+
categoryForm.submit= function (url) {
|
238 |
+
|
239 |
+
this._submit();
|
240 |
+
|
241 |
+
return true;
|
242 |
+
|
243 |
+
|
244 |
+
};
|
245 |
+
|
246 |
+
document.observe("dom:loaded", function() {
|
247 |
+
|
248 |
+
var everycheckbox = $$("#ma2_featured_products_table tbody input.checkbox");
|
249 |
+
|
250 |
+
everycheckbox.each(function(element, index) {
|
251 |
+
element.onclick = function(e)
|
252 |
+
{
|
253 |
+
var val = element.value;
|
254 |
+
if(element.checked)
|
255 |
+
{
|
256 |
+
element.checked = false;
|
257 |
+
checkBoxes.set(val, 0);
|
258 |
+
}
|
259 |
+
else
|
260 |
+
{
|
261 |
+
element.checked = "checked";
|
262 |
+
checkBoxes.set(val, 1);
|
263 |
+
}
|
264 |
+
}
|
265 |
+
});
|
266 |
+
|
267 |
+
});
|
268 |
+
|
269 |
+
|
270 |
+
function categorySubmit(url) {
|
271 |
+
|
272 |
+
var params = {};
|
273 |
+
var fields = $('featured_edit_form').getElementsBySelector('input', 'select');
|
274 |
+
|
275 |
+
categoryForm.submit();
|
276 |
+
}
|
277 |
+
|
278 |
+
function FeaturedRowClick(grid, event)
|
279 |
+
{
|
280 |
+
|
281 |
+
var trElement = Event.findElement(event, 'tr');
|
282 |
+
var isInput = Event.element(event).tagName == 'INPUT';
|
283 |
+
|
284 |
+
var checkbox = Element.getElementsBySelector(trElement, 'input.checkbox').first();
|
285 |
+
|
286 |
+
if(!checkbox) return;
|
287 |
+
|
288 |
+
var val = checkbox.value;
|
289 |
+
|
290 |
+
if(checkbox.checked)
|
291 |
+
{
|
292 |
+
checkbox.checked = false;
|
293 |
+
checkBoxes.set(val, 0);
|
294 |
+
}
|
295 |
+
else
|
296 |
+
{
|
297 |
+
checkbox.checked = "checked";
|
298 |
+
checkBoxes.set(val, 1);
|
299 |
+
}
|
300 |
+
|
301 |
+
$("in_featured_products").value = checkBoxes.toQueryString();
|
302 |
+
console.log("Products", checkBoxes);
|
303 |
+
$gridName.reloadParams = {'featured_ids':checkBoxes.toQueryString()};
|
304 |
+
}
|
305 |
+
|
306 |
+
//]]>
|
307 |
+
|
308 |
+
</script>
|
309 |
+
EndHTML;
|
310 |
+
|
311 |
+
return $html;
|
312 |
+
}
|
313 |
+
|
314 |
+
private function _appendHtml() {
|
315 |
+
$html = '<script type="text/javascript">
|
316 |
+
var checkBoxes = $H();
|
317 |
+
|
318 |
+
var checkbox_all = $$("#ma2_featured_products_table thead input.checkbox").first();
|
319 |
+
var everycheckbox = $$("#ma2_featured_products_table tbody input.checkbox");
|
320 |
+
|
321 |
+
checkbox_all.observe("click", function(event) {
|
322 |
+
|
323 |
+
if(checkbox_all.checked)
|
324 |
+
{
|
325 |
+
everycheckbox.each(function(element, index) {
|
326 |
+
|
327 |
+
checkBoxes.set(element.value, 1)
|
328 |
+
|
329 |
+
});
|
330 |
+
} else
|
331 |
+
{
|
332 |
+
everycheckbox.each(function(element, index) {
|
333 |
+
checkBoxes.set(element.value, 0)
|
334 |
+
});
|
335 |
+
}
|
336 |
+
$("in_featured_products").value = checkBoxes.toQueryString();
|
337 |
+
});
|
338 |
+
|
339 |
+
</script>';
|
340 |
+
|
341 |
+
return $html;
|
342 |
+
}
|
343 |
+
|
344 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Renderer/Name.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Mas_FeaturedProducts_Block_Adminhtml_Edit_Renderer_Name extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
3 |
+
|
4 |
+
protected $_values;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Renders grid column
|
8 |
+
*
|
9 |
+
* @param Varien_Object $row
|
10 |
+
* @return string
|
11 |
+
*/
|
12 |
+
public function render(Varien_Object $row) {
|
13 |
+
|
14 |
+
$action_name = $this->getRequest()->getActionName();
|
15 |
+
|
16 |
+
if ($action_name == 'exportCsv' || $action_name == 'exportXml') {
|
17 |
+
return $row->getName();
|
18 |
+
}
|
19 |
+
|
20 |
+
$href = $this->getUrl('*/catalog_product/edit', array(
|
21 |
+
'store' => $this->getRequest()->getParam('store'),
|
22 |
+
'id' => $row->getId()));
|
23 |
+
|
24 |
+
$html = '<a href="' . $href . '">' . $row->getName() . '</a>';
|
25 |
+
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/Edit/Renderer/Visibility.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_Edit_Renderer_Visibility extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
3 |
+
{
|
4 |
+
protected $_values;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Renders grid column
|
8 |
+
*
|
9 |
+
* @param Varien_Object $row
|
10 |
+
* @return string
|
11 |
+
*/
|
12 |
+
public function render(Varien_Object $row)
|
13 |
+
{
|
14 |
+
|
15 |
+
$this->_values = Mage::getModel('catalog/product_visibility')->getOptionArray();
|
16 |
+
|
17 |
+
$html = $this->_values[$row->getData($this->getColumn()->getIndex())];
|
18 |
+
|
19 |
+
return $html;
|
20 |
+
}
|
21 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
Mage::__construct();
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts_Edit extends Mage_Adminhtml_Block_Widget_Form_Container{
|
3 |
+
public function __construct()
|
4 |
+
{
|
5 |
+
parent::__construct();
|
6 |
+
$this->_objectId = 'id';
|
7 |
+
//vwe assign the same blockGroup as the Grid Container
|
8 |
+
$this->_blockGroup = 'FeaturedProducts';
|
9 |
+
//and the same controller
|
10 |
+
$this->_controller = 'adminhtml_FeaturedProducts';
|
11 |
+
//define the label for the save and delete button
|
12 |
+
$this->_updateButton('save', 'label','save reference');
|
13 |
+
$this->_updateButton('delete', 'label', 'delete reference');
|
14 |
+
}
|
15 |
+
/* Here, we're looking if we have transmitted a form object,
|
16 |
+
to update the good text in the header of the page (edit or add) */
|
17 |
+
public function getHeaderText()
|
18 |
+
{
|
19 |
+
if( Mage::registry('FeaturedProducts_data')&&Mage::registry('FeaturedProducts_data')->getId())
|
20 |
+
{
|
21 |
+
return 'Editer la reference '.$this->htmlEscape(
|
22 |
+
Mage::registry('FeaturedProducts_data')->getTitle()).'<br />';
|
23 |
+
}
|
24 |
+
else
|
25 |
+
{
|
26 |
+
return 'Add a contact';
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Form.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
9 |
+
'method' => 'post',
|
10 |
+
'enctype' => 'multipart/form-data'
|
11 |
+
));
|
12 |
+
|
13 |
+
$form->setUseContainer(true);
|
14 |
+
$this->setForm($form);
|
15 |
+
return parent::_prepareForm();
|
16 |
+
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form();
|
7 |
+
$this->setForm($form);
|
8 |
+
$fieldset = $form->addFieldset('FeaturedProducts_form', array('legend'=>Mage::helper('FeaturedProducts')->__('Item information')));
|
9 |
+
|
10 |
+
$fieldset->addField('title', 'text', array(
|
11 |
+
'label' => Mage::helper('FeaturedProducts')->__('Title'),
|
12 |
+
'class' => 'required-entry',
|
13 |
+
'required' => true,
|
14 |
+
'name' => 'title',
|
15 |
+
));
|
16 |
+
|
17 |
+
$fieldset->addField('numberaction', 'select', array(
|
18 |
+
'label' => Mage::helper('FeaturedProducts')->__('Display Number'),
|
19 |
+
'name' => 'numberaction',
|
20 |
+
'values' => array(
|
21 |
+
array(
|
22 |
+
'value' => 62,
|
23 |
+
'label' => Mage::helper('FeaturedProducts')->__('62'),
|
24 |
+
),
|
25 |
+
array(
|
26 |
+
'value' => 54,
|
27 |
+
'label' => Mage::helper('FeaturedProducts')->__('54'),
|
28 |
+
),
|
29 |
+
array(
|
30 |
+
'value' => 42,
|
31 |
+
'label' => Mage::helper('FeaturedProducts')->__('42'),
|
32 |
+
),
|
33 |
+
array(
|
34 |
+
'value' => 36,
|
35 |
+
'label' => Mage::helper('FeaturedProducts')->__('36'),
|
36 |
+
),
|
37 |
+
array(
|
38 |
+
'value' => 33,
|
39 |
+
'label' => Mage::helper('FeaturedProducts')->__('33'),
|
40 |
+
),
|
41 |
+
array(
|
42 |
+
'value' => 30,
|
43 |
+
'label' => Mage::helper('FeaturedProducts')->__('30'),
|
44 |
+
),
|
45 |
+
array(
|
46 |
+
'value' => 27,
|
47 |
+
'label' => Mage::helper('FeaturedProducts')->__('27'),
|
48 |
+
),
|
49 |
+
array(
|
50 |
+
'value' => 21,
|
51 |
+
'label' => Mage::helper('FeaturedProducts')->__('21'),
|
52 |
+
),
|
53 |
+
array(
|
54 |
+
'value' => 18,
|
55 |
+
'label' => Mage::helper('FeaturedProducts')->__('18'),
|
56 |
+
),
|
57 |
+
array(
|
58 |
+
'value' => 15,
|
59 |
+
'label' => Mage::helper('FeaturedProducts')->__('15'),
|
60 |
+
),
|
61 |
+
array(
|
62 |
+
'value' => 12,
|
63 |
+
'label' => Mage::helper('FeaturedProducts')->__('12'),
|
64 |
+
),
|
65 |
+
array(
|
66 |
+
'value' => 9,
|
67 |
+
'label' => Mage::helper('FeaturedProducts')->__('9'),
|
68 |
+
),
|
69 |
+
array(
|
70 |
+
'value' => 6,
|
71 |
+
'label' => Mage::helper('FeaturedProducts')->__('6'),
|
72 |
+
),
|
73 |
+
|
74 |
+
array(
|
75 |
+
'value' => 3,
|
76 |
+
'label' => Mage::helper('FeaturedProducts')->__('3'),
|
77 |
+
),
|
78 |
+
),
|
79 |
+
));
|
80 |
+
|
81 |
+
|
82 |
+
$fieldset->addField('status', 'select', array(
|
83 |
+
'label' => Mage::helper('FeaturedProducts')->__('Status'),
|
84 |
+
'name' => 'status',
|
85 |
+
'values' => array(
|
86 |
+
array(
|
87 |
+
'value' => 1,
|
88 |
+
'label' => Mage::helper('FeaturedProducts')->__('Active'),
|
89 |
+
),
|
90 |
+
|
91 |
+
array(
|
92 |
+
'value' => 0,
|
93 |
+
'label' => Mage::helper('FeaturedProducts')->__('Inactive'),
|
94 |
+
),
|
95 |
+
),
|
96 |
+
));
|
97 |
+
|
98 |
+
|
99 |
+
if ( Mage::getSingleton('adminhtml/session')->getFeaturedProductsData() )
|
100 |
+
{
|
101 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->setFeaturedProductsData());
|
102 |
+
Mage::getSingleton('adminhtml/session')->setFeaturedProductsData(null);
|
103 |
+
} elseif ( Mage::registry('FeaturedProducts_data') ) {
|
104 |
+
$form->setValues(Mage::registry('FeaturedProducts_data')->getData());
|
105 |
+
}
|
106 |
+
return parent::_prepareForm();
|
107 |
+
}
|
108 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Edit/Tabs.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('FeaturedProducts_tabs');
|
8 |
+
$this->setDestElementId('edit_form');
|
9 |
+
$this->setTitle(Mage::helper('FeaturedProducts')->__('News Information'));
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _beforeToHtml()
|
13 |
+
{
|
14 |
+
$this->addTab('form_section', array(
|
15 |
+
'label' => Mage::helper('FeaturedProducts')->__('Item Information'),
|
16 |
+
'title' => Mage::helper('FeaturedProducts')->__('Item Information'),
|
17 |
+
'numberaction' => Mage::helper('FeaturedProducts')->__('Item Information'),
|
18 |
+
'content' => $this->getLayout()->createBlock('FeaturedProducts/adminhtml_FeaturedProducts_edit_tab_form')->toHtml(),
|
19 |
+
));
|
20 |
+
|
21 |
+
return parent::_beforeToHtml();
|
22 |
+
}
|
23 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/FeaturedProducts/Grid.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_FeaturedProducts_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
3 |
+
{
|
4 |
+
public function __construct()
|
5 |
+
{
|
6 |
+
parent::__construct();
|
7 |
+
$this->setId('FeaturedProductsGrid');
|
8 |
+
// This is the primary key of the database
|
9 |
+
$this->setDefaultSort('FeaturedProducts_id');
|
10 |
+
$this->setDefaultDir('ASC');
|
11 |
+
$this->setSaveParametersInSession(true);
|
12 |
+
$this->setUseAjax(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('FeaturedProducts/FeaturedProducts')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('FeaturedProducts_id', array(
|
25 |
+
'header' => Mage::helper('FeaturedProducts')->__('ID'),
|
26 |
+
'align' =>'right',
|
27 |
+
'width' => '50px',
|
28 |
+
'index' => 'FeaturedProducts_id',
|
29 |
+
));
|
30 |
+
|
31 |
+
$this->addColumn('title', array(
|
32 |
+
'header' => Mage::helper('FeaturedProducts')->__('Title'),
|
33 |
+
'align' =>'left',
|
34 |
+
'index' => 'title',
|
35 |
+
));
|
36 |
+
|
37 |
+
$this->addColumn('numberaction', array(
|
38 |
+
'header' => Mage::helper('FeaturedProducts')->__('Display'),
|
39 |
+
'align' => 'left',
|
40 |
+
'width' => '80px',
|
41 |
+
'index' => 'numberaction',
|
42 |
+
'type' => 'options',
|
43 |
+
'options' => array(
|
44 |
+
62 => '62',
|
45 |
+
54 => '54',
|
46 |
+
42 => '42',
|
47 |
+
36 => '36',
|
48 |
+
33 => '33',
|
49 |
+
30 => '30',
|
50 |
+
27 => '27',
|
51 |
+
21 => '21',
|
52 |
+
18 => '18',
|
53 |
+
15 => '15',
|
54 |
+
12 => '12',
|
55 |
+
9 => '9',
|
56 |
+
6 => '6',
|
57 |
+
3 => '3',
|
58 |
+
),
|
59 |
+
));
|
60 |
+
|
61 |
+
$this->addColumn('status', array(
|
62 |
+
|
63 |
+
'header' => Mage::helper('FeaturedProducts')->__('Status'),
|
64 |
+
'align' => 'left',
|
65 |
+
'width' => '80px',
|
66 |
+
'index' => 'status',
|
67 |
+
'type' => 'options',
|
68 |
+
'options' => array(
|
69 |
+
1 => 'Active',
|
70 |
+
0 => 'Inactive',
|
71 |
+
),
|
72 |
+
));
|
73 |
+
return parent::_prepareColumns();
|
74 |
+
}
|
75 |
+
|
76 |
+
public function getRowUrl($row)
|
77 |
+
{
|
78 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
79 |
+
}
|
80 |
+
|
81 |
+
public function getGridUrl()
|
82 |
+
{
|
83 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
84 |
+
}
|
85 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/ApplyToFeatured.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_System_Config_Form_Field_ApplyToFeatured extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
public function setInitStoreValueModule()
|
5 |
+
{
|
6 |
+
$InitInputValueModule = array( "featured"=>"List Featured Products",
|
7 |
+
"list"=>"List Any Products",
|
8 |
+
"listproduct"=>"Catalog Products List"
|
9 |
+
); // declare function and value.
|
10 |
+
return $InitInputValueModule;
|
11 |
+
}
|
12 |
+
|
13 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
14 |
+
{
|
15 |
+
$helper_data = $this->helper('FeaturedProducts');
|
16 |
+
|
17 |
+
$apply_cate_para = $helper_data->getValueUseStoreConfig('getValueAppliedFeatured');
|
18 |
+
$apply_selected = $helper_data->getSupportStoreConfig($apply_cate_para);
|
19 |
+
|
20 |
+
|
21 |
+
//foreach($getValueStore as $title=>$value)
|
22 |
+
//{
|
23 |
+
//echo $getValueStore[$title];
|
24 |
+
//echo $value;
|
25 |
+
//}
|
26 |
+
|
27 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
28 |
+
$html = '';
|
29 |
+
|
30 |
+
//$helper = $this->helper('widgetcategory');
|
31 |
+
// $template_selected = $helper->getTypeList();
|
32 |
+
|
33 |
+
$getValueStore = $this->setInitStoreValueModule();
|
34 |
+
|
35 |
+
$html .= '<select name="'.$element->getName().'" class="small-select" id="'.$element->getId().'">';
|
36 |
+
$title = '';
|
37 |
+
|
38 |
+
//var_dump($template_selected);
|
39 |
+
//var_dump($getValueStore);
|
40 |
+
|
41 |
+
foreach ($getValueStore as $value=>$title)
|
42 |
+
{
|
43 |
+
//$getValueStore[$value],$title
|
44 |
+
//$value,$title
|
45 |
+
if($value == $id_selected)
|
46 |
+
{
|
47 |
+
$html .= '<option selected="selected" id="item-selected" value="'.$value.'" class="childrent">'.$title.'</option>';
|
48 |
+
}
|
49 |
+
else
|
50 |
+
{
|
51 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
52 |
+
}
|
53 |
+
}
|
54 |
+
$html .= '</select>';
|
55 |
+
return $html;
|
56 |
+
}
|
57 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/CategoryId.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_System_Config_Form_Field_CategoryId extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* $element->setStyle('width:282px; border:1px solid #EB5E00; color:#333;')
|
8 |
+
* ->setName($element->getName() . '[]');
|
9 |
+
|
10 |
+
* if ($element->getValue()) {
|
11 |
+
* $values = explode(',', $element->getValue());
|
12 |
+
* } else {
|
13 |
+
* $values = array();
|
14 |
+
* }
|
15 |
+
|
16 |
+
* $selectme = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
|
17 |
+
*/
|
18 |
+
$nonEscapableNbspChar = html_entity_decode('    ', ENT_NOQUOTES, 'UTF-8');
|
19 |
+
//$output = array();
|
20 |
+
//$output[] = array('value' => '', 'label' => 'Select');
|
21 |
+
$html = '';
|
22 |
+
|
23 |
+
$helper_data = $this->helper('FeaturedProducts');
|
24 |
+
$id_cate_para = $helper_data->getValueUseStoreConfig('getIDCategorySelected');
|
25 |
+
$id_selected = $helper_data->getSupportStoreConfig($id_cate_para);
|
26 |
+
|
27 |
+
$categories = Mage::getModel('catalog/category')
|
28 |
+
->getCollection()
|
29 |
+
->addAttributeToSelect('entity_id')
|
30 |
+
->addAttributeToSelect('name')
|
31 |
+
->addAttributeToSelect('level')
|
32 |
+
->addFieldToFilter('is_active', array('eq'=>'1'))
|
33 |
+
->addAttributeToSort('path', 'asc')
|
34 |
+
->getItems();
|
35 |
+
$html .= '<select name="'.$element->getName().'" id="'.$element->getId().'">';
|
36 |
+
$title = '';
|
37 |
+
|
38 |
+
if (count($categories) > 0){
|
39 |
+
foreach ($categories as $category){
|
40 |
+
if ($category->getName() != ''){
|
41 |
+
$indent = str_repeat($nonEscapableNbspChar, $category->getLevel());
|
42 |
+
$title = $category->getName();
|
43 |
+
$value=$category->getEntityId();
|
44 |
+
if($value == $id_selected)
|
45 |
+
{
|
46 |
+
$html .= '<option value="'.$value.'" '.($category->getChildrenCount() > 0 ? 'class="parent"' : 'class="childrent"').'selected="selected" id="item-selected">'.$indent.$title.' (ID: '.$category->getId().')'.$nonEscapableNbspChar. $this->__('<span id="support-tip">selected</span>').'</option>';
|
47 |
+
//$output[] = array('value' => $value, 'label' => $indent.$title.' (ID: '.$category->getId().')');
|
48 |
+
}
|
49 |
+
else
|
50 |
+
{
|
51 |
+
$html .= '<option value="'.$value.'" '.($category->getChildrenCount() > 0 ? 'class="parent"' : 'class="childrent"').'>'.$indent.$title.' (ID: '.$category->getId().')'.'</option>';
|
52 |
+
//$output[] = array('value' => $value, 'label' => $indent.$title.' (ID: '.$category->getId().')');
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
$html .= '</select>';
|
58 |
+
return $html;
|
59 |
+
//$to = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
|
60 |
+
//return $selectme;
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/EnableDisable.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_System_Config_Form_Field_EnableDisable extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
public function setInitStoreValueModule()
|
5 |
+
{
|
6 |
+
$InitInputValueModule = array( "enable"=>"Enable",
|
7 |
+
"disable"=>"Disable"
|
8 |
+
); // declare function and value.
|
9 |
+
return $InitInputValueModule;
|
10 |
+
}
|
11 |
+
|
12 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
13 |
+
{
|
14 |
+
$helper_data = $this->helper('FeaturedProducts');
|
15 |
+
|
16 |
+
$ED_cate_para = $helper_data->getValueUseStoreConfig('getEnableDisable');
|
17 |
+
$ED_selected = $helper_data->getSupportStoreConfig($ED_cate_para);
|
18 |
+
|
19 |
+
|
20 |
+
//foreach($getValueStore as $title=>$value)
|
21 |
+
//{
|
22 |
+
//echo $getValueStore[$title];
|
23 |
+
//echo $value;
|
24 |
+
//}
|
25 |
+
|
26 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
27 |
+
$html = '';
|
28 |
+
|
29 |
+
//$helper = $this->helper('widgetcategory');
|
30 |
+
// $template_selected = $helper->getTypeList();
|
31 |
+
|
32 |
+
$getValueStore = $this->setInitStoreValueModule();
|
33 |
+
|
34 |
+
$html .= '<select name="'.$element->getName().'" class="small-select" id="'.$element->getId().'">';
|
35 |
+
$title = '';
|
36 |
+
|
37 |
+
//var_dump($template_selected);
|
38 |
+
//var_dump($getValueStore);
|
39 |
+
|
40 |
+
foreach ($getValueStore as $value=>$title)
|
41 |
+
{
|
42 |
+
//$getValueStore[$value],$title
|
43 |
+
//$value,$title
|
44 |
+
if($value == $id_selected)
|
45 |
+
{
|
46 |
+
$html .= '<option selected="selected" id="item-selected" value="'.$value.'" class="childrent">'.$title.'</option>';
|
47 |
+
}
|
48 |
+
else
|
49 |
+
{
|
50 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
51 |
+
}
|
52 |
+
}
|
53 |
+
$html .= '</select>';
|
54 |
+
return $html;
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/NameTemplates.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_System_Config_Form_Field_NameTemplates extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
public function setInitStoreValueModule()
|
5 |
+
{
|
6 |
+
$InitInputValueModule = array( "template1"=>"Template1",
|
7 |
+
"template2"=>"Template2",
|
8 |
+
"template3"=>"Template3",
|
9 |
+
"template4"=>"Template4",
|
10 |
+
"template5"=>"Template5",
|
11 |
+
"template6"=>"Template6"
|
12 |
+
// declare function and value.
|
13 |
+
);
|
14 |
+
return $InitInputValueModule;
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
18 |
+
{
|
19 |
+
//foreach($getValueStore as $title=>$value)
|
20 |
+
//{
|
21 |
+
//echo $getValueStore[$title];
|
22 |
+
//echo $value;
|
23 |
+
//}
|
24 |
+
|
25 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
26 |
+
$html = '';
|
27 |
+
$helper_data = $this->helper('FeaturedProducts');
|
28 |
+
$name_temp = $helper_data->getValueUseStoreConfig('getTemplateSelected');
|
29 |
+
$template_selected = $helper_data->getSupportStoreConfig($name_temp);
|
30 |
+
|
31 |
+
$getValueStore = $this->setInitStoreValueModule();
|
32 |
+
$html .= '<select name="'.$element->getName().'" id="'.$element->getId().'">';
|
33 |
+
$title = '';
|
34 |
+
foreach ($getValueStore as $value=>$title)
|
35 |
+
{
|
36 |
+
//$getValueStore[$value],$title
|
37 |
+
//$value,$title
|
38 |
+
if($value == $template_selected)
|
39 |
+
{
|
40 |
+
$html .= '<option value="'.$value.'" selected="selected" class="childrent" id="item-selected">'.$title.$nonEscapableNbspChar.$this->__('<span id="support-tip">selected</span>').'</option>';
|
41 |
+
}
|
42 |
+
else
|
43 |
+
{
|
44 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
$html .= '</select>';
|
48 |
+
return $html;
|
49 |
+
}
|
50 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Adminhtml/System/Config/Form/Field/Status.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Adminhtml_System_Config_Form_Field_Status extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
+
{
|
6 |
+
$element->setStyle('width:22px; border:1px solid #CCC; color:#333;')
|
7 |
+
->setName($element->getName() . '[]');
|
8 |
+
|
9 |
+
if ($element->getValue()) {
|
10 |
+
$values = explode(',', $element->getValue());
|
11 |
+
} else {
|
12 |
+
$values = array();
|
13 |
+
}
|
14 |
+
|
15 |
+
$selectme = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
|
16 |
+
//$to = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
|
17 |
+
return $selectme;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/FeaturedProducts.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_FeaturedProducts extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
public function _prepareLayout()
|
5 |
+
{
|
6 |
+
return parent::_prepareLayout();
|
7 |
+
}
|
8 |
+
|
9 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Listing.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Listing extends Mage_Catalog_Block_Product_Abstract
|
3 |
+
{
|
4 |
+
public function __construct() {
|
5 |
+
|
6 |
+
$this->setTemplate('ma2/featuredproducts/block_featured_products.phtml');
|
7 |
+
|
8 |
+
$this->setLimit((int) Mage::getStoreConfig("FeaturedProducts/cmspage/number_of_items"));
|
9 |
+
$sort_by = Mage::getStoreConfig("FeaturedProducts/cmspage/product_sort_by");
|
10 |
+
$this->setItemsPerRow((int) Mage::getStoreConfig("FeaturedProducts/cmspage/number_of_items_per_row"));
|
11 |
+
|
12 |
+
switch ($sort_by) {
|
13 |
+
case 0:
|
14 |
+
$this->setSortBy("rand()");
|
15 |
+
break;
|
16 |
+
case 1:
|
17 |
+
$this->setSortBy("created_at desc");
|
18 |
+
break;
|
19 |
+
default:
|
20 |
+
$this->setSortBy("rand()");
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
/*
|
25 |
+
* Load featured products collection
|
26 |
+
* */
|
27 |
+
|
28 |
+
protected function _beforeToHtml() {
|
29 |
+
$collection = Mage::getResourceModel('catalog/product_collection');
|
30 |
+
|
31 |
+
$attributes = Mage::getSingleton('catalog/config')
|
32 |
+
->getProductAttributes();
|
33 |
+
|
34 |
+
$collection->addAttributeToSelect($attributes)
|
35 |
+
->addMinimalPrice()
|
36 |
+
->addFinalPrice()
|
37 |
+
->addTaxPercents()
|
38 |
+
->addAttributeToFilter('ma2_featured_product', 1, 'left')
|
39 |
+
->addStoreFilter()
|
40 |
+
->getSelect()->order($this->getSortBy())->limit($this->getLimit());
|
41 |
+
|
42 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
43 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
44 |
+
|
45 |
+
$this->_productCollection = $collection;
|
46 |
+
|
47 |
+
$this->setProductCollection($collection);
|
48 |
+
return parent::_beforeToHtml();
|
49 |
+
}
|
50 |
+
|
51 |
+
protected function _toHtml() {
|
52 |
+
|
53 |
+
if (!$this->helper('FeaturedProducts')->getIsActive()) {
|
54 |
+
return '';
|
55 |
+
}
|
56 |
+
|
57 |
+
return parent::_toHtml();
|
58 |
+
}
|
59 |
+
|
60 |
+
/*
|
61 |
+
* Return label for CMS block output
|
62 |
+
* */
|
63 |
+
|
64 |
+
protected function getBlockLabel() {
|
65 |
+
return $this->helper('FeaturedProducts')->getCmsBlockLabel();
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Product.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Product
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
public function render(Varien_Object $row)
|
7 |
+
{
|
8 |
+
$productId = $row->getData($this->getColumn()->getIndex());
|
9 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
10 |
+
|
11 |
+
$value = '<img src="">';
|
12 |
+
if($product->getImage()!= 'noselection')
|
13 |
+
{
|
14 |
+
$value='<img src="' . $product->getImageUrl() . '" width="100" height="100" />';
|
15 |
+
}
|
16 |
+
|
17 |
+
return $value;
|
18 |
+
}
|
19 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Block/Product/List.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Block_Product_List extends Mage_Catalog_Block_Product_List
|
3 |
+
{
|
4 |
+
protected $_productCollection;
|
5 |
+
protected $_sort_by;
|
6 |
+
|
7 |
+
protected function _prepareLayout()
|
8 |
+
{
|
9 |
+
if ($breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs'))
|
10 |
+
{
|
11 |
+
$breadcrumbsBlock->addCrumb('home', array(
|
12 |
+
'label'=>Mage::helper('catalog')->__('Home'),
|
13 |
+
'title'=>Mage::helper('catalog')->__('Go to Home Page'),
|
14 |
+
'link'=>Mage::getBaseUrl()
|
15 |
+
));
|
16 |
+
}
|
17 |
+
parent::_prepareLayout();
|
18 |
+
}
|
19 |
+
|
20 |
+
/*
|
21 |
+
* Remove "Position" option from Sort By dropdown
|
22 |
+
* */
|
23 |
+
protected function _beforeToHtml()
|
24 |
+
{
|
25 |
+
parent::_beforeToHtml();
|
26 |
+
$toolbar = $this->getToolbarBlock();
|
27 |
+
$toolbar->removeOrderFromAvailableOrders('position');
|
28 |
+
return $this;
|
29 |
+
}
|
30 |
+
|
31 |
+
|
32 |
+
/*
|
33 |
+
* Load featured products collection
|
34 |
+
* */
|
35 |
+
protected function _getProductCollection()
|
36 |
+
{
|
37 |
+
if (is_null($this->_productCollection)) {
|
38 |
+
$collection = Mage::getModel('catalog/product')->getCollection();
|
39 |
+
|
40 |
+
$attributes = Mage::getSingleton('catalog/config')
|
41 |
+
->getProductAttributes();
|
42 |
+
|
43 |
+
$collection->addAttributeToSelect($attributes)
|
44 |
+
->addMinimalPrice()
|
45 |
+
->addFinalPrice()
|
46 |
+
->addTaxPercents()
|
47 |
+
->addAttributeToFilter('ma2_featured_product', 1, 'left')
|
48 |
+
->addStoreFilter();
|
49 |
+
|
50 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
51 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
52 |
+
$this->_productCollection = $collection;
|
53 |
+
}
|
54 |
+
return $this->_productCollection;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Retrieve loaded featured products collection
|
59 |
+
*
|
60 |
+
* @return Mage_Eav_Model_Entity_Collection_Abstract
|
61 |
+
*/
|
62 |
+
public function getFeaturedProductCollection()
|
63 |
+
{
|
64 |
+
return $this->_getProductCollection();
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get HTML if there's anything to show
|
71 |
+
*/
|
72 |
+
protected function _toHtml()
|
73 |
+
{
|
74 |
+
if ($this->_getProductCollection()->count()){
|
75 |
+
return parent::_toHtml();
|
76 |
+
}
|
77 |
+
return '';
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Company: NETQ Company
|
82 |
+
* Website: http://www.omegatheme.com/
|
83 |
+
*/
|
84 |
+
|
85 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Helper/Data.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
const PATH_PAGE_HEADING = 'featuredproducts/standalone/heading';
|
6 |
+
const PATH_CMS_HEADING = 'featuredproducts/cmspage/heading_block';
|
7 |
+
const DEFAULT_LABEL = 'Featured Products';
|
8 |
+
|
9 |
+
public function getCmsBlockLabel() {
|
10 |
+
$configValue = Mage::getStoreConfig(self::PATH_CMS_HEADING);
|
11 |
+
return strlen($configValue) > 0 ? $configValue : self::DEFAULT_LABEL;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getPageLabel() {
|
15 |
+
$configValue = Mage::getStoreConfig(self::PATH_PAGE_HEADING);
|
16 |
+
return strlen($configValue) > 0 ? $configValue : self::DEFAULT_LABEL;
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getIsActive() {
|
20 |
+
return (bool) Mage::getStoreConfig('featuredproducts/general/active');
|
21 |
+
}
|
22 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Mysql4/FeaturedProducts.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Model_Mysql4_FeaturedProducts extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('catalog/product', 'entity_id');
|
7 |
+
// here test_id is the primary of the table test.
|
8 |
+
// And test/test, is the magento table name as mentioned in the
|
9 |
+
// config.xml file.
|
10 |
+
}
|
11 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Mysql4/FeaturedProducts/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Model_Mysql4_FeaturedProducts_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('catalog/product');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/ApplyTo.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_ApplyTo
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => '1', 'label' => 'apply'),
|
10 |
+
array('value' => '0', 'label' => 'unapply')
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/ApplyToPage.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_ApplyToPage
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => 'featured', 'label' => 'List Featured Products'),
|
10 |
+
array('value' => 'list', 'label' => 'List Any Products'),
|
11 |
+
array('value' => 'listproduct', 'label' => 'Catalog Products List')
|
12 |
+
);
|
13 |
+
}
|
14 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/Categoryid.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_Categoryid
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
$nonEscapableNbspChar = html_entity_decode('      ', ENT_NOQUOTES, 'UTF-8');
|
8 |
+
$output = array();
|
9 |
+
$output[] = array('value' => '', 'label' => 'Select');
|
10 |
+
|
11 |
+
$categories = Mage::getModel('catalog/category')
|
12 |
+
->getCollection()
|
13 |
+
->addAttributeToSelect('entity_id')
|
14 |
+
->addAttributeToSelect('name')
|
15 |
+
->addAttributeToSelect('level')
|
16 |
+
->addFieldToFilter('is_active', array('eq'=>'1'))
|
17 |
+
->addAttributeToSort('path', 'asc')
|
18 |
+
->getItems();
|
19 |
+
|
20 |
+
$title = '';
|
21 |
+
if (count($categories) > 0){
|
22 |
+
foreach ($categories as $category){
|
23 |
+
if ($category->getName() != ''){
|
24 |
+
$indent = str_repeat($nonEscapableNbspChar, $category->getLevel());
|
25 |
+
$title = $category->getName();
|
26 |
+
$value=$category->getEntityId();
|
27 |
+
$output[] = array('value' => $value, 'label' => $indent.$title.' (ID: '.$category->getId().')');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
}
|
31 |
+
return $output;
|
32 |
+
}
|
33 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/EnableDisable.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Model_Source_EnableDisable
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
//Ease in-out
|
8 |
+
array('value' => 'enable', 'label' => 'Enable'),
|
9 |
+
array('value' => 'disable', 'label' => 'Disable')
|
10 |
+
);
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/Numberaction.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_Numberaction
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => '9', 'label' => '9 products'),
|
10 |
+
array('value' => '15', 'label' => '15 products'),
|
11 |
+
array('value' => '30', 'label' => '30 products')
|
12 |
+
);
|
13 |
+
}
|
14 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/Selecttoview.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_Selecttoview
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => 'home', 'label' => 'home'),
|
10 |
+
array('value' => 'product', 'label' => 'product')
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/Source/Status.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_Model_Source_Status
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => '1', 'label' => 'active'),
|
10 |
+
array('value' => '0', 'label' => 'unactive')
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Ma2/FeaturedProducts/Model/System/Config/Source/Sort.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Model_System_Config_Source_Sort
|
3 |
+
{
|
4 |
+
/*
|
5 |
+
* Prepare data for System->Configuration dropdown
|
6 |
+
* */
|
7 |
+
public function toOptionArray()
|
8 |
+
{
|
9 |
+
return array(
|
10 |
+
0 => Mage::helper('adminhtml')->__('Random'),
|
11 |
+
1 => Mage::helper('adminhtml')->__('Last Added')
|
12 |
+
);
|
13 |
+
}
|
14 |
+
}
|
app/code/local/Ma2/FeaturedProducts/controllers/Adminhtml/FeaturedController.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Adminhtml_FeaturedController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
protected function _initProduct() {
|
5 |
+
$product = Mage::getModel('catalog/product')
|
6 |
+
->setStoreId($this->getRequest()->getParam('store', 0));
|
7 |
+
if ($setId = (int) $this->getRequest()->getParam('set')) {
|
8 |
+
$product->setAttributeSetId($setId);
|
9 |
+
}
|
10 |
+
if ($typeId = $this->getRequest()->getParam('type')) {
|
11 |
+
$product->setTypeId($typeId);
|
12 |
+
}
|
13 |
+
$product->setData('_edit_mode', true);
|
14 |
+
Mage::register('product', $product);
|
15 |
+
|
16 |
+
return $product;
|
17 |
+
}
|
18 |
+
|
19 |
+
public function indexAction() {
|
20 |
+
$this->_initProduct();
|
21 |
+
|
22 |
+
$this->loadLayout()->_setActiveMenu('catalog/featuredproduct');
|
23 |
+
|
24 |
+
$this->_addContent($this->getLayout()->createBlock('FeaturedProducts/adminhtml_edit'));
|
25 |
+
|
26 |
+
$this->renderLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function gridAction() {
|
30 |
+
|
31 |
+
$this->getResponse()->setBody(
|
32 |
+
$this->getLayout()->createBlock('FeaturedProducts/adminhtml_edit_grid')->toHtml()
|
33 |
+
);
|
34 |
+
}
|
35 |
+
|
36 |
+
public function saveAction() {
|
37 |
+
$data = $this->getRequest()->getPost();
|
38 |
+
$collection = Mage::getModel('catalog/product')->getCollection();
|
39 |
+
$storeId = $this->getRequest()->getParam('store', 0);
|
40 |
+
|
41 |
+
|
42 |
+
parse_str($data['featured_products'], $featured_products);
|
43 |
+
|
44 |
+
|
45 |
+
$collection->addIdFilter(array_keys($featured_products));
|
46 |
+
|
47 |
+
try {
|
48 |
+
|
49 |
+
foreach ($collection->getItems() as $product) {
|
50 |
+
|
51 |
+
$product->setData('ma2_featured_product', $featured_products[$product->getEntityId()]);
|
52 |
+
$product->setStoreId($storeId);
|
53 |
+
$product->save();
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
+
$this->_getSession()->addSuccess($this->__('Featured product was successfully saved.'));
|
58 |
+
$this->_redirect('*/*/index', array('store' => $this->getRequest()->getParam('store')));
|
59 |
+
} catch (Exception $e) {
|
60 |
+
$this->_getSession()->addError($e->getMessage());
|
61 |
+
$this->_redirect('*/*/index', array('store' => $this->getRequest()->getParam('store')));
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
protected function _validateSecretKey() {
|
66 |
+
return true;
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function _isAllowed() {
|
70 |
+
return Mage::getSingleton('admin/session')->isAllowed('admin/catalog/featuredproduct');
|
71 |
+
}
|
72 |
+
|
73 |
+
private function _getExportFileName($extension='csv') {
|
74 |
+
|
75 |
+
$store_id = $this->getRequest()->getParam('store');
|
76 |
+
|
77 |
+
$name = 'featured_products_';
|
78 |
+
|
79 |
+
if ($store_id) {
|
80 |
+
$store = Mage::getModel('core/store')->load($store_id);
|
81 |
+
|
82 |
+
if ($store && $store->getId()) {
|
83 |
+
return $name . $store->getName() . '.' . $extension;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
return $name . 'AllStores.' . $extension;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Export stylist grid to CSV format
|
92 |
+
*/
|
93 |
+
public function exportCsvAction() {
|
94 |
+
|
95 |
+
$fileName = $this->_getExportFileName('csv');
|
96 |
+
|
97 |
+
$content = $this->getLayout()->createBlock('FeaturedProducts/adminhtml_edit_grid')
|
98 |
+
->getCsvFile();
|
99 |
+
|
100 |
+
$this->_prepareDownloadResponse($fileName, $content);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Export stylist grid to XML format
|
105 |
+
*/
|
106 |
+
public function exportXmlAction() {
|
107 |
+
|
108 |
+
$fileName = $this->_getExportFileName('xml');
|
109 |
+
|
110 |
+
$content = $this->getLayout()->createBlock('FeaturedProducts/adminhtml_edit_grid')
|
111 |
+
->getExcelFile();
|
112 |
+
|
113 |
+
$this->_prepareDownloadResponse($fileName, $content);
|
114 |
+
}
|
115 |
+
}
|
app/code/local/Ma2/FeaturedProducts/controllers/Adminhtml/FeaturedProductController.php
ADDED
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_FeaturedProducts_Adminhtml_FeaturedProductsController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
protected function _initAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout()
|
7 |
+
->_setActiveMenu('FeaturedProducts/items')
|
8 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
9 |
+
return $this;
|
10 |
+
}
|
11 |
+
public function indexAction()
|
12 |
+
{
|
13 |
+
$this->_initAction();
|
14 |
+
$this->_addContent($this->getLayout()->createBlock('FeaturedProducts/adminhtml_FeaturedProducts'));
|
15 |
+
$this->renderLayout();
|
16 |
+
}
|
17 |
+
public function editAction()
|
18 |
+
{
|
19 |
+
$FeaturedProductsId = $this->getRequest()->getParam('id');
|
20 |
+
$FeaturedProductsModel = Mage::getModel('FeaturedProducts/FeaturedProducts')->load($FeaturedProductsId);
|
21 |
+
|
22 |
+
if ($FeaturedProductsModel->getId() || FeaturedProductsId == 0) {
|
23 |
+
Mage::register('FeaturedProducts_data', $FeaturedProductsModel);
|
24 |
+
$this->loadLayout();
|
25 |
+
$this->_setActiveMenu('FeaturedProducts/items');
|
26 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
27 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
28 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
29 |
+
$this->_addContent($this->getLayout()->createBlock('FeaturedProducts/adminhtml_FeaturedProducts_edit'))
|
30 |
+
->_addLeft($this->getLayout()->createBlock('FeaturedProducts/adminhtml_FeaturedProducts_edit_tabs'));
|
31 |
+
$this->renderLayout();
|
32 |
+
} else {
|
33 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('FeaturedProducts')->__('Item does not exist'));
|
34 |
+
$this->_redirect('*/*/');
|
35 |
+
}
|
36 |
+
}
|
37 |
+
public function newAction()
|
38 |
+
{
|
39 |
+
$this->_forward('edit');
|
40 |
+
}
|
41 |
+
public function saveAction()
|
42 |
+
{
|
43 |
+
if ($data = $this->getRequest()->getPost() ) {
|
44 |
+
try {
|
45 |
+
$postData = $this->getRequest()->getPost();
|
46 |
+
$FeaturedProductsModel = Mage::getModel('FeaturedProducts/FeaturedProducts');
|
47 |
+
|
48 |
+
$FeaturedProductsModel->setId($this->getRequest()->getParam('id'))
|
49 |
+
->setTitle($postData['title'])
|
50 |
+
->setNumberaction($postData['numberaction'])
|
51 |
+
->setStatus($postData['status'])
|
52 |
+
->save();
|
53 |
+
|
54 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully saved'));
|
55 |
+
Mage::getSingleton('adminhtml/session')->setFeaturedProductsData(false);
|
56 |
+
|
57 |
+
$this->_redirect('*/*/');
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
catch (Exception $e) {
|
61 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
62 |
+
Mage::getSingleton('adminhtml/session')->setFeaturedProductsData($this->getRequest()->getPost());
|
63 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
else {
|
68 |
+
if(isset($data['numberaction']['delete']) && $data['numberaction']['delete'] == 1){
|
69 |
+
$data['FeaturedProducts_main'] = '';
|
70 |
+
}
|
71 |
+
else{
|
72 |
+
unset($data['numberaction']);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
$this->_redirect('*/*/');
|
76 |
+
}
|
77 |
+
public function deleteAction()
|
78 |
+
{
|
79 |
+
if($this->getRequest()->getParam('id') > 0)
|
80 |
+
{
|
81 |
+
try
|
82 |
+
{
|
83 |
+
$FeaturedProductsModel = Mage::getModel('FeaturedProducts/FeaturedProducts');
|
84 |
+
$FeaturedProductsModel->setId($this->getRequest()
|
85 |
+
->getParam('id'))
|
86 |
+
->delete();
|
87 |
+
Mage::getSingleton('adminhtml/session')
|
88 |
+
->addSuccess('successfully deleted');
|
89 |
+
$this->_redirect('*/*/');
|
90 |
+
|
91 |
+
|
92 |
+
}
|
93 |
+
catch (Exception $e)
|
94 |
+
{
|
95 |
+
Mage::getSingleton('adminhtml/session')
|
96 |
+
->addError($e->getMessage());
|
97 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
98 |
+
}
|
99 |
+
}
|
100 |
+
$this->_redirect('*/*/');
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Product grid for AJAX request.
|
104 |
+
* Sort and filter result for example.
|
105 |
+
*/
|
106 |
+
public function gridAction()
|
107 |
+
{
|
108 |
+
$this->loadLayout();
|
109 |
+
$this->getResponse()->setBody(
|
110 |
+
$this->getLayout()->createBlock('FeaturedProducts/adminhtml_FeaturedProducts_grid')->toHtml()
|
111 |
+
);
|
112 |
+
}
|
113 |
+
}
|
app/code/local/Ma2/FeaturedProducts/controllers/IndexController.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_FeaturedProducts_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
if (!Mage::helper('FeaturedProducts')->getIsActive()) {
|
8 |
+
$this->_forward('noRoute');
|
9 |
+
return;
|
10 |
+
}
|
11 |
+
|
12 |
+
$template = Mage::getConfig()->getNode('global/page/layouts/' . Mage::getStoreConfig("FeaturedProducts/standalone/layout") . '/template');
|
13 |
+
|
14 |
+
$this->loadLayout();
|
15 |
+
|
16 |
+
$this->getLayout()->getBlock('root')->setTemplate($template);
|
17 |
+
$this->getLayout()->getBlock('head')->setTitle($this->__(Mage::getStoreConfig("FeaturedProducts/standalone/meta_title")));
|
18 |
+
$this->getLayout()->getBlock('head')->setDescription($this->__(Mage::getStoreConfig("FeaturedProducts/standalone/meta_description")));
|
19 |
+
$this->getLayout()->getBlock('head')->setKeywords($this->__(Mage::getStoreConfig("FeaturedProducts/standalone/meta_keywords")));
|
20 |
+
|
21 |
+
$breadcrumbsBlock = $this->getLayout()->getBlock('breadcrumbs');
|
22 |
+
$breadcrumbsBlock->addCrumb('FeaturedProducts', array(
|
23 |
+
'label' => Mage::helper('FeaturedProducts')->__(Mage::helper('FeaturedProducts')->getPageLabel()),
|
24 |
+
'title' => Mage::helper('FeaturedProducts')->__(Mage::helper('FeaturedProducts')->getPageLabel()),
|
25 |
+
));
|
26 |
+
|
27 |
+
$this->renderLayout();
|
28 |
+
}
|
29 |
+
}
|
app/code/local/Ma2/FeaturedProducts/etc/adminhtml.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<menu>
|
4 |
+
<ma2>
|
5 |
+
<children>
|
6 |
+
<FeaturedProducts translate="title" module="FeaturedProducts">
|
7 |
+
<title>Featured Products</title>
|
8 |
+
<sort_order>2</sort_order>
|
9 |
+
<action>FeaturedProducts/adminhtml_featured</action>
|
10 |
+
</FeaturedProducts>
|
11 |
+
</children>
|
12 |
+
</ma2>
|
13 |
+
</menu>
|
14 |
+
<acl>
|
15 |
+
<resources>
|
16 |
+
<all>
|
17 |
+
<title>Allow Everything</title>
|
18 |
+
</all>
|
19 |
+
<admin>
|
20 |
+
<children>
|
21 |
+
<system>
|
22 |
+
<children>
|
23 |
+
<config>
|
24 |
+
<children>
|
25 |
+
<FeaturedProducts translate="title" module="FeaturedProducts">
|
26 |
+
<title>Featured Products</title>
|
27 |
+
<sort_order>50</sort_order>
|
28 |
+
</FeaturedProducts>
|
29 |
+
</children>
|
30 |
+
</config>
|
31 |
+
</children>
|
32 |
+
</system>
|
33 |
+
</children>
|
34 |
+
</admin>
|
35 |
+
</resources>
|
36 |
+
</acl>
|
37 |
+
</config>
|
app/code/local/Ma2/FeaturedProducts/etc/config.xml
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!-- OMG&VDH -->
|
3 |
+
<config>
|
4 |
+
<!-- Modules -->
|
5 |
+
<modules>
|
6 |
+
<Ma2_FeaturedProducts>
|
7 |
+
<version>2.0.0</version>
|
8 |
+
</Ma2_FeaturedProducts>
|
9 |
+
</modules>
|
10 |
+
|
11 |
+
<!-- FrontEnd -->
|
12 |
+
<frontend>
|
13 |
+
<routers>
|
14 |
+
<FeaturedProducts>
|
15 |
+
<use>standard</use>
|
16 |
+
<args>
|
17 |
+
<module>Ma2_FeaturedProducts</module>
|
18 |
+
<frontName>FeaturedProducts</frontName>
|
19 |
+
</args>
|
20 |
+
</FeaturedProducts>
|
21 |
+
</routers>
|
22 |
+
<layout>
|
23 |
+
<updates>
|
24 |
+
<FeaturedProducts>
|
25 |
+
<file>ma2featuredproducts.xml</file>
|
26 |
+
</FeaturedProducts>
|
27 |
+
</updates>
|
28 |
+
</layout>
|
29 |
+
</frontend>
|
30 |
+
|
31 |
+
<!-- Admin -->
|
32 |
+
<admin>
|
33 |
+
<routers>
|
34 |
+
<FeaturedProducts>
|
35 |
+
<use>admin</use>
|
36 |
+
<args>
|
37 |
+
<module>Ma2_FeaturedProducts</module>
|
38 |
+
<frontName>FeaturedProducts</frontName>
|
39 |
+
</args>
|
40 |
+
</FeaturedProducts>
|
41 |
+
</routers>
|
42 |
+
</admin>
|
43 |
+
|
44 |
+
<!-- AdminHtml -->
|
45 |
+
<adminhtml>
|
46 |
+
|
47 |
+
<!-- Menu -->
|
48 |
+
<menu>
|
49 |
+
<ma2>
|
50 |
+
<children>
|
51 |
+
<FeaturedProducts translate="title" module="FeaturedProducts">
|
52 |
+
<title>Featured Products</title>
|
53 |
+
<sort_order>1</sort_order>
|
54 |
+
<action>FeaturedProducts/adminhtml_featured</action>
|
55 |
+
</FeaturedProducts>
|
56 |
+
</children>
|
57 |
+
</ma2>
|
58 |
+
</menu>
|
59 |
+
|
60 |
+
<!-- acl -->
|
61 |
+
<acl>
|
62 |
+
<resources>
|
63 |
+
<all>
|
64 |
+
<title>Allow Everything</title>
|
65 |
+
</all>
|
66 |
+
<admin>
|
67 |
+
<children>
|
68 |
+
<FeaturedProducts>
|
69 |
+
<title>Featured Products</title>
|
70 |
+
<sort_order>200</sort_order>
|
71 |
+
</FeaturedProducts>
|
72 |
+
</children>
|
73 |
+
</admin>
|
74 |
+
</resources>
|
75 |
+
</acl>
|
76 |
+
|
77 |
+
<!-- layout -->
|
78 |
+
<layout>
|
79 |
+
<updates>
|
80 |
+
<FeaturedProducts>
|
81 |
+
<file>ma2featuredproduct.xml</file>
|
82 |
+
</FeaturedProducts>
|
83 |
+
</updates>
|
84 |
+
</layout>
|
85 |
+
</adminhtml>
|
86 |
+
|
87 |
+
<!-- Global -->
|
88 |
+
<global>
|
89 |
+
<!-- Models -->
|
90 |
+
<models>
|
91 |
+
<FeaturedProducts>
|
92 |
+
<class>Ma2_FeatureProducts_Model</class>
|
93 |
+
<resourceModel>FeaturedProducts_mysql4</resourceModel>
|
94 |
+
</FeaturedProducts>
|
95 |
+
<FeaturedProducts_mysql4>
|
96 |
+
<class>Ma2_FeaturedProducts_Model_Mysql4</class>
|
97 |
+
<entities>
|
98 |
+
<FeaturedProducts>
|
99 |
+
<table>FeaturedProducts</table>
|
100 |
+
<!-- Actual table name in sql -->
|
101 |
+
</FeaturedProducts>
|
102 |
+
</entities>
|
103 |
+
</FeaturedProducts_mysql4>
|
104 |
+
</models>
|
105 |
+
|
106 |
+
<!-- Resources -->
|
107 |
+
<resources>
|
108 |
+
<!-- These are resource setting giving access to module,
|
109 |
+
read/write permission on database -->
|
110 |
+
<FeaturedProducts_setup>
|
111 |
+
<setup>
|
112 |
+
<module>Ma2_FeaturedProducts</module>
|
113 |
+
<class>Mage_Eav_Model_Entity_Setup</class>
|
114 |
+
</setup>
|
115 |
+
<connection>
|
116 |
+
<use>core_setup</use>
|
117 |
+
</connection>
|
118 |
+
</FeaturedProducts_setup>
|
119 |
+
<FeaturedProducts_write>
|
120 |
+
<connection>
|
121 |
+
<use>core_write</use>
|
122 |
+
</connection>
|
123 |
+
</FeaturedProducts_write>
|
124 |
+
<FeaturedProducts_read>
|
125 |
+
<connection>
|
126 |
+
<use>core_read</use>
|
127 |
+
</connection>
|
128 |
+
</FeaturedProducts_read>
|
129 |
+
</resources>
|
130 |
+
|
131 |
+
<!-- Blocks -->
|
132 |
+
<blocks>
|
133 |
+
<FeaturedProducts>
|
134 |
+
<class>Ma2_FeaturedProducts_Block</class>
|
135 |
+
</FeaturedProducts>
|
136 |
+
</blocks>
|
137 |
+
|
138 |
+
<!-- Helper -->
|
139 |
+
<helpers>
|
140 |
+
<FeaturedProducts>
|
141 |
+
<class>Ma2_FeaturedProducts_Helper</class>
|
142 |
+
</FeaturedProducts>
|
143 |
+
</helpers>
|
144 |
+
</global>
|
145 |
+
</config>
|
app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-install-1.0.1.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
|
6 |
+
$installer->addAttribute('catalog_product', 'ma2_featured_product', array(
|
7 |
+
'group' => 'General',
|
8 |
+
'type' => 'int',
|
9 |
+
'backend' => '',
|
10 |
+
'frontend' => '',
|
11 |
+
'label' => 'Featured product',
|
12 |
+
'input' => 'boolean',
|
13 |
+
'class' => '',
|
14 |
+
'source' => '',
|
15 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
|
16 |
+
'visible' => true,
|
17 |
+
'required' => false,
|
18 |
+
'user_defined' => true,
|
19 |
+
'default' => '0',
|
20 |
+
'searchable' => false,
|
21 |
+
'filterable' => false,
|
22 |
+
'comparable' => false,
|
23 |
+
'visible_on_front' => false,
|
24 |
+
'unique' => false,
|
25 |
+
'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
|
26 |
+
'is_configurable' => false
|
27 |
+
));
|
28 |
+
|
29 |
+
$installer->endSetup();
|
app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-upgrade-1.0.1-1.1.1.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
$installer->removeAttribute('catalog_product', 'ma2_featured_product');
|
6 |
+
|
7 |
+
$installer->endSetup();
|
app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/mysql4-upgrade-1.1.1-1.2.3.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
|
6 |
+
$installer->addAttribute('catalog_product', 'ma2_featured_product', array(
|
7 |
+
'group' => 'General',
|
8 |
+
'type' => 'int',
|
9 |
+
'backend' => '',
|
10 |
+
'frontend' => '',
|
11 |
+
'label' => 'Featured product',
|
12 |
+
'input' => 'boolean',
|
13 |
+
'class' => '',
|
14 |
+
'source' => '',
|
15 |
+
'is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
|
16 |
+
'visible' => true,
|
17 |
+
'required' => false,
|
18 |
+
'user_defined' => false,
|
19 |
+
'default' => '0',
|
20 |
+
'searchable' => false,
|
21 |
+
'filterable' => false,
|
22 |
+
'comparable' => false,
|
23 |
+
'visible_on_front' => false,
|
24 |
+
'unique' => false,
|
25 |
+
'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
|
26 |
+
'is_configurable' => false,
|
27 |
+
'used_in_product_listing', '1'
|
28 |
+
));
|
29 |
+
|
30 |
+
|
31 |
+
$installer->updateAttribute('catalog_product', 'ma2_featured_product', 'used_in_product_listing', '1');
|
32 |
+
|
33 |
+
$installer->endSetup();
|
app/code/local/Ma2/FeaturedProducts/sql/FeaturedProducts_setup/upgrade-1.2.3-2.0.0.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
|
5 |
+
$installer->updateAttribute('catalog_product', 'ma2_featured_product', 'is_global', '0');
|
6 |
+
|
7 |
+
$installer->endSetup();
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
$this->_controller = 'adminhtml_slideshow';
|
8 |
+
$this->_blockGroup = 'slideshow';
|
9 |
+
$this->_headerText = Mage::helper('slideshow')->__('Items Manager');
|
10 |
+
$this->_addButtonLabel = Mage::helper('slideshow')->__('Add Item');
|
11 |
+
parent::__construct();
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
|
9 |
+
$this->_objectId = 'id';
|
10 |
+
$this->_blockGroup = 'slideshow';
|
11 |
+
$this->_controller = 'adminhtml_slideshow';
|
12 |
+
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('slideshow')->__('Save Item'));
|
14 |
+
$this->_updateButton('delete', 'label', Mage::helper('slideshow')->__('Delete Item'));
|
15 |
+
|
16 |
+
$this->_addButton('saveandcontinue', array(
|
17 |
+
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
18 |
+
'onclick' => 'saveAndContinueEdit()',
|
19 |
+
'class' => 'save',
|
20 |
+
), -100);
|
21 |
+
|
22 |
+
$this->_formScripts[] = "
|
23 |
+
function toggleEditor() {
|
24 |
+
if (tinyMCE.getInstanceById('slideshow_content') == null) {
|
25 |
+
tinyMCE.execCommand('mceAddControl', false, 'slideshow_content');
|
26 |
+
} else {
|
27 |
+
tinyMCE.execCommand('mceRemoveControl', false, 'slideshow_content');
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
function saveAndContinueEdit(){
|
32 |
+
editForm.submit($('edit_form').action+'back/edit/');
|
33 |
+
}
|
34 |
+
";
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getHeaderText()
|
38 |
+
{
|
39 |
+
if( Mage::registry('slideshow_data') && Mage::registry('slideshow_data')->getId() ) {
|
40 |
+
return Mage::helper('slideshow')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('slideshow_data')->getTitle()));
|
41 |
+
} else {
|
42 |
+
return Mage::helper('slideshow')->__('Add Item');
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareForm()
|
6 |
+
{
|
7 |
+
$form = new Varien_Data_Form(array(
|
8 |
+
'id' => 'edit_form',
|
9 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
+
'method' => 'post',
|
11 |
+
'enctype' => 'multipart/form-data'
|
12 |
+
)
|
13 |
+
);
|
14 |
+
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
+
{
|
5 |
+
protected function _prepareLayout()
|
6 |
+
{
|
7 |
+
parent::_prepareLayout();
|
8 |
+
if(Mage::getSingleton('cms/wysiwyg_config')->isEnabled())
|
9 |
+
{
|
10 |
+
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareForm()
|
15 |
+
{
|
16 |
+
$form = new Varien_Data_Form();
|
17 |
+
$form->setHtmlIdPrefix('slideshow_');
|
18 |
+
$this->setForm($form);
|
19 |
+
$fieldset = $form->addFieldset('slideshow_form', array('legend'=>Mage::helper('slideshow')->__('Item information')));
|
20 |
+
|
21 |
+
$slideshow = Mage::getModel('slideshow/slideshow')->load( $this->getRequest()->getParam('id') );
|
22 |
+
$after_html = '';
|
23 |
+
if( $slideshow->getFilename() )
|
24 |
+
{
|
25 |
+
$path = Mage::getBaseUrl('media')."ma2slideshow/".$slideshow->getFilename();
|
26 |
+
$after_html = '<a onclick="imagePreview(ma2slideshow); return false;" href="'.$path.'">
|
27 |
+
<img height="22" width="22" class="small-image-preview v-middle" alt="'.$slideshow->getFilename().'" title="'.$slideshow->getFilename().'" id="ma2slideshow" src="'.$path.'"/>
|
28 |
+
</a>';
|
29 |
+
}
|
30 |
+
|
31 |
+
try {
|
32 |
+
$config = Mage::getSingleton('cms/wysiwyg_config')->getConfig();
|
33 |
+
$config->setData(
|
34 |
+
Mage::helper('slideshow')->recursiveReplace('/slideshow/', '/' . (string) Mage::app()->getConfig()->getNode('admin/routers/adminhtml/args/frontName') . '/', $config->getData()
|
35 |
+
)
|
36 |
+
);
|
37 |
+
} catch (Exception $ex) {
|
38 |
+
$config = null;
|
39 |
+
}
|
40 |
+
|
41 |
+
$fieldset->addField('title', 'text', array(
|
42 |
+
'label' => Mage::helper('slideshow')->__('Title'),
|
43 |
+
'class' => 'required-entry',
|
44 |
+
'required' => true,
|
45 |
+
'name' => 'title',
|
46 |
+
));
|
47 |
+
|
48 |
+
$fieldset->addField('category', 'text', array(
|
49 |
+
'label' => Mage::helper('slideshow')->__('Category'),
|
50 |
+
'class' => 'required-entry',
|
51 |
+
'required' => true,
|
52 |
+
'name' => 'category',
|
53 |
+
));
|
54 |
+
|
55 |
+
$fieldset->addField('slideshow_url', 'text', array(
|
56 |
+
'label' => Mage::helper('slideshow')->__('Url'),
|
57 |
+
'name' => 'slideshow_url',
|
58 |
+
'note' => Mage::helper('slideshow')->__('Example: http://www.example.com'),
|
59 |
+
));
|
60 |
+
|
61 |
+
$fieldset->addField('filename', 'file', array(
|
62 |
+
'label' => Mage::helper('slideshow')->__('File'),
|
63 |
+
'name' => 'filename',
|
64 |
+
'after_element_html' => $after_html,
|
65 |
+
'class' => (($slideshow->getfilename()) ? '' : 'required-entry'),
|
66 |
+
'required' => (($slideshow->getfilename()) ? false : true),
|
67 |
+
));
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Check is single store mode
|
71 |
+
*/
|
72 |
+
/* if (!Mage::app()->isSingleStoreMode()) {
|
73 |
+
$fieldset->addField('store_id', 'multiselect',
|
74 |
+
array (
|
75 |
+
'name' => 'stores[]',
|
76 |
+
'label' => Mage::helper('cms')->__('Store view'),
|
77 |
+
'title' => Mage::helper('cms')->__('Store view'),
|
78 |
+
'required' => true,
|
79 |
+
'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true) ));
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$fieldset->addField('store_id', 'hidden', array (
|
83 |
+
'name' => 'stores[]',
|
84 |
+
'value' => Mage::app()->getStore(true)->getId() ));
|
85 |
+
$fieldset->setStoreId(Mage::app()->getStore(true)->getId());
|
86 |
+
} */
|
87 |
+
|
88 |
+
$fieldset->addField('status', 'radios', array(
|
89 |
+
'label' => Mage::helper('slideshow')->__('Status'),
|
90 |
+
'name' => 'status',
|
91 |
+
'values' => array(
|
92 |
+
array(
|
93 |
+
'value' => 1,
|
94 |
+
'label' => Mage::helper('slideshow')->__('Enabled'),
|
95 |
+
),
|
96 |
+
|
97 |
+
array(
|
98 |
+
'value' => 2,
|
99 |
+
'label' => Mage::helper('slideshow')->__('Disabled'),
|
100 |
+
),
|
101 |
+
),
|
102 |
+
));
|
103 |
+
|
104 |
+
$fieldset->addField('sortorder', 'text', array(
|
105 |
+
'label' => Mage::helper('slideshow')->__('Sort Order'),
|
106 |
+
'class' => 'required-entry validate-digits',
|
107 |
+
'required' => true,
|
108 |
+
'name' => 'sortorder',
|
109 |
+
));
|
110 |
+
|
111 |
+
$fieldset->addField('content', 'editor', array(
|
112 |
+
'name' => 'content',
|
113 |
+
'label' => Mage::helper('slideshow')->__('Content'),
|
114 |
+
'title' => Mage::helper('slideshow')->__('Content'),
|
115 |
+
'style' => 'width:666px; height:255px;',
|
116 |
+
'wysiwyg' => true,
|
117 |
+
'config' => $config,
|
118 |
+
'required' => true,
|
119 |
+
));
|
120 |
+
|
121 |
+
if ( Mage::getSingleton('adminhtml/session')->getSlideshowData() )
|
122 |
+
{
|
123 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getSlideshowData());
|
124 |
+
Mage::getSingleton('adminhtml/session')->setSlideshowData(null);
|
125 |
+
} elseif ( Mage::registry('slideshow_data') ) {
|
126 |
+
$form->setValues(Mage::registry('slideshow_data')->getData());
|
127 |
+
}
|
128 |
+
return parent::_prepareForm();
|
129 |
+
}
|
130 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Edit/Tabs.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
+
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('slideshow_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('slideshow')->__('Item Information'));
|
12 |
+
}
|
13 |
+
|
14 |
+
protected function _prepareLayout()
|
15 |
+
{
|
16 |
+
//$return = parent::_prepareLayout();
|
17 |
+
|
18 |
+
$this->addTab('main_section', array(
|
19 |
+
'label' => Mage::helper('slideshow')->__('Item Information'),
|
20 |
+
'title' => Mage::helper('slideshow')->__('Item Information'),
|
21 |
+
'content' => $this->getLayout()->createBlock('slideshow/adminhtml_slideshow_edit_tab_form')->toHtml(),
|
22 |
+
'active' => true,
|
23 |
+
));
|
24 |
+
|
25 |
+
return parent::_prepareLayout();
|
26 |
+
}
|
27 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Adminhtml/Slideshow/Grid.php
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Block_Adminhtml_Slideshow_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
+
{
|
5 |
+
public function __construct()
|
6 |
+
{
|
7 |
+
parent::__construct();
|
8 |
+
$this->setId('slideshowGrid');
|
9 |
+
// This is the primary key of the database
|
10 |
+
$this->setDefaultSort('slideshow_id');
|
11 |
+
$this->setDefaultDir('ASC');
|
12 |
+
$this->setSaveParametersInSession(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('slideshow/slideshow')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('slideshow_id', array(
|
25 |
+
'header' => Mage::helper('slideshow')->__('ID'),
|
26 |
+
'align' =>'center',
|
27 |
+
'width' => '50px',
|
28 |
+
'index' => 'slideshow_id',
|
29 |
+
'type' => ''
|
30 |
+
));
|
31 |
+
|
32 |
+
$this->addColumn('title', array(
|
33 |
+
'header' => Mage::helper('slideshow')->__('Title'),
|
34 |
+
'align' =>'left',
|
35 |
+
'index' => 'title',
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('category', array(
|
39 |
+
'header' => Mage::helper('slideshow')->__('Category'),
|
40 |
+
'align' =>'left',
|
41 |
+
'index' => 'category',
|
42 |
+
));
|
43 |
+
|
44 |
+
$this->addColumn('content', array(
|
45 |
+
'header' => Mage::helper('slideshow')->__('Item Content'),
|
46 |
+
'width' => '355px',
|
47 |
+
'index' => 'content',
|
48 |
+
));
|
49 |
+
|
50 |
+
$this->addColumn('created_time', array(
|
51 |
+
'header' => Mage::helper('slideshow')->__('Creation Time'),
|
52 |
+
'align' => 'left',
|
53 |
+
'width' => '120px',
|
54 |
+
'type' => 'date',
|
55 |
+
'default' => '--',
|
56 |
+
'index' => 'created_time',
|
57 |
+
));
|
58 |
+
|
59 |
+
$this->addColumn('update_time', array(
|
60 |
+
'header' => Mage::helper('slideshow')->__('Update Time'),
|
61 |
+
'align' => 'left',
|
62 |
+
'width' => '120px',
|
63 |
+
'type' => 'date',
|
64 |
+
'default' => '--',
|
65 |
+
'index' => 'update_time',
|
66 |
+
));
|
67 |
+
|
68 |
+
$this->addColumn('status', array(
|
69 |
+
'header' => Mage::helper('slideshow')->__('Status'),
|
70 |
+
'align' => 'left',
|
71 |
+
'width' => '80px',
|
72 |
+
'index' => 'status',
|
73 |
+
'type' => 'options',
|
74 |
+
'options' => array(
|
75 |
+
1 => 'Enabled',
|
76 |
+
2 => 'Disabled',
|
77 |
+
),
|
78 |
+
));
|
79 |
+
|
80 |
+
$this->addColumn('action',
|
81 |
+
array(
|
82 |
+
'header' => Mage::helper('slideshow')->__('Action'),
|
83 |
+
'width' => '100',
|
84 |
+
'type' => 'action',
|
85 |
+
'getter' => 'getId',
|
86 |
+
'actions' => array(
|
87 |
+
array(
|
88 |
+
'caption' => Mage::helper('slideshow')->__('Edit'),
|
89 |
+
'url' => array('base'=> '*/*/edit'),
|
90 |
+
'field' => 'id'
|
91 |
+
)
|
92 |
+
),
|
93 |
+
'filter' => false,
|
94 |
+
'sortable' => false,
|
95 |
+
'index' => 'stores',
|
96 |
+
'is_system' => true,
|
97 |
+
));
|
98 |
+
|
99 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('slideshow')->__('CSV'));
|
100 |
+
$this->addExportType('*/*/exportXml', Mage::helper('slideshow')->__('XML'));
|
101 |
+
|
102 |
+
return parent::_prepareColumns();
|
103 |
+
}
|
104 |
+
|
105 |
+
protected function _prepareMassaction()
|
106 |
+
{
|
107 |
+
$this->setMassactionIdField('slideshow_id');
|
108 |
+
$this->getMassactionBlock()->setFormFieldName('slideshow');
|
109 |
+
|
110 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
111 |
+
'label' => Mage::helper('slideshow')->__('Delete'),
|
112 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
113 |
+
'confirm' => Mage::helper('slideshow')->__('Are you sure?')
|
114 |
+
));
|
115 |
+
|
116 |
+
$statuses = Mage::getSingleton('slideshow/status')->getOptionArray();
|
117 |
+
|
118 |
+
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
119 |
+
$this->getMassactionBlock()->addItem('status', array(
|
120 |
+
'label'=> Mage::helper('slideshow')->__('Change status'),
|
121 |
+
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
122 |
+
'additional' => array(
|
123 |
+
'visibility' => array(
|
124 |
+
'name' => 'status',
|
125 |
+
'type' => 'select',
|
126 |
+
'class' => 'required-entry',
|
127 |
+
'label' => Mage::helper('slideshow')->__('Status'),
|
128 |
+
'values' => $statuses
|
129 |
+
)
|
130 |
+
)
|
131 |
+
));
|
132 |
+
return $this;
|
133 |
+
}
|
134 |
+
|
135 |
+
public function getRowUrl($row)
|
136 |
+
{
|
137 |
+
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
138 |
+
}
|
139 |
+
|
140 |
+
public function getGridUrl()
|
141 |
+
{
|
142 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Helper function to do after load modifications
|
147 |
+
*
|
148 |
+
*/
|
149 |
+
protected function _afterLoadCollection()
|
150 |
+
{
|
151 |
+
$this->getCollection()->walk('afterLoad');
|
152 |
+
parent::_afterLoadCollection();
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Helper function to add store filter condition
|
157 |
+
*
|
158 |
+
* @param Mage_Core_Model_Mysql4_Collection_Abstract $collection Data collection
|
159 |
+
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column Column information to be filtered
|
160 |
+
*/
|
161 |
+
protected function _filterStoreCondition($collection, $column)
|
162 |
+
{
|
163 |
+
if (!$value = $column->getFilter()->getValue()) {
|
164 |
+
return;
|
165 |
+
}
|
166 |
+
|
167 |
+
$this->getCollection()->addStoreFilter($value);
|
168 |
+
}
|
169 |
+
}
|
app/code/local/Ma2/Slideshow/Block/Slideshow.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_Slideshow_Block_Slideshow extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface
|
3 |
+
{
|
4 |
+
protected function _toHtml()
|
5 |
+
{
|
6 |
+
$slideshow_ids = $this->getData('slideshow_ids');
|
7 |
+
|
8 |
+
$collection = Mage::getModel('slideshow/slideshow')
|
9 |
+
->getCollection()
|
10 |
+
->addFieldToFilter('slideshow_id', array('in' => explode(',', $slideshow_ids)));
|
11 |
+
|
12 |
+
$this->assign('items', $collection);
|
13 |
+
$this->assign('options', json_decode(json_encode(Mage::getStoreConfig('slideshow_options/general'))));
|
14 |
+
|
15 |
+
|
16 |
+
return parent::_toHtml();
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Ma2/Slideshow/Helper/Data.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
public function recursiveReplace($search, $replace, $subject)
|
6 |
+
{
|
7 |
+
if (!is_array($subject))
|
8 |
+
return $subject;
|
9 |
+
|
10 |
+
foreach ($subject as $key => $value)
|
11 |
+
if (is_string($value))
|
12 |
+
$subject[$key] = str_replace($search, $replace, $value);
|
13 |
+
elseif (is_array($value))
|
14 |
+
$subject[$key] = self::recursiveReplace($search, $replace, $value);
|
15 |
+
|
16 |
+
return $subject;
|
17 |
+
}
|
18 |
+
}
|
app/code/local/Ma2/Slideshow/Model/Mysql4/Slideshow.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Model_Mysql4_Slideshow extends Mage_Core_Model_Mysql4_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
// Note that the slideshow_id refers to the key field in your database table.
|
8 |
+
$this->_init('slideshow/slideshow', 'slideshow_id');
|
9 |
+
}
|
10 |
+
}
|
app/code/local/Ma2/Slideshow/Model/Mysql4/Slideshow/Collection.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Model_Mysql4_Slideshow_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('slideshow/slideshow');
|
9 |
+
}
|
10 |
+
|
11 |
+
public function orderBySort(){
|
12 |
+
$this->getSelect()->order('sortorder');
|
13 |
+
return $this;
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Ma2/Slideshow/Model/Slideshow.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Model_Slideshow extends Mage_Core_Model_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
parent::_construct();
|
8 |
+
$this->_init('slideshow/slideshow');
|
9 |
+
}
|
10 |
+
|
11 |
+
public function getCollectionSlideshowData() {
|
12 |
+
|
13 |
+
$collection = $this->getCollection()
|
14 |
+
->addFieldToFilter('status',1)
|
15 |
+
->orderBySort()
|
16 |
+
/* ->addStoreFilter(Mage::app()->getStore()) */
|
17 |
+
;
|
18 |
+
if(Mage::getStoreConfig('slideshow_options/general/limited'))
|
19 |
+
{
|
20 |
+
$collection->setPageSize(Mage::getStoreConfig('slideshow_options/general/limited'));
|
21 |
+
}
|
22 |
+
|
23 |
+
return $collection;
|
24 |
+
}
|
25 |
+
}
|
app/code/local/Ma2/Slideshow/Model/Slideshowselect.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_Slideshow_Model_Slideshowselect
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
$options = array();
|
7 |
+
$collection = Mage::getModel('slideshow/slideshow')
|
8 |
+
->getCollection()
|
9 |
+
->addFieldToSelect('slideshow_id')
|
10 |
+
->addFieldToSelect('title')
|
11 |
+
->addFieldToFilter('status',1);
|
12 |
+
|
13 |
+
foreach ($collection as $item){
|
14 |
+
$options[] = array('value' => $item->getData('slideshow_id'), 'label' => $item->getData('title'));
|
15 |
+
}
|
16 |
+
return $options;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
|
app/code/local/Ma2/Slideshow/Model/Status.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Model_Status extends Varien_Object
|
4 |
+
{
|
5 |
+
const STATUS_ENABLED = 1;
|
6 |
+
const STATUS_DISABLED = 2;
|
7 |
+
|
8 |
+
static public function getOptionArray()
|
9 |
+
{
|
10 |
+
return array(
|
11 |
+
self::STATUS_ENABLED => Mage::helper('slideshow')->__('Enabled'),
|
12 |
+
self::STATUS_DISABLED => Mage::helper('slideshow')->__('Disabled')
|
13 |
+
);
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Ma2/Slideshow/Model/Transitiontype.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Model_Transitiontype
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
array('value' => 'fade', 'label' => Mage::helper('slideshow')->__('Fade')),
|
9 |
+
array('value' => 'slide', 'label' => Mage::helper('slideshow')->__('Slide'))
|
10 |
+
);
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Ma2/Slideshow/controllers/Adminhtml/SlideshowController.php
ADDED
@@ -0,0 +1,285 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_Slideshow_Adminhtml_SlideshowController extends Mage_Adminhtml_Controller_action
|
4 |
+
{
|
5 |
+
|
6 |
+
protected function _initAction() {
|
7 |
+
$this->loadLayout()
|
8 |
+
->_setActiveMenu('slideshow/items')
|
9 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('Slideshow Manager'), Mage::helper('adminhtml')->__('Slideshow Manager'));
|
10 |
+
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction() {
|
15 |
+
$this->_initAction();
|
16 |
+
//$this->_addContent($this->getLayout()->createBlock('slideshow/adminhtml_slideshow'));
|
17 |
+
$this->renderLayout();
|
18 |
+
}
|
19 |
+
|
20 |
+
public function editAction() {
|
21 |
+
$id = $this->getRequest()->getParam('id');
|
22 |
+
$model = Mage::getModel('slideshow/slideshow')->load($id);
|
23 |
+
|
24 |
+
if ($model->getId() || $id == 0) {
|
25 |
+
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
26 |
+
if (!empty($data)) {
|
27 |
+
$model->setData($data);
|
28 |
+
}
|
29 |
+
|
30 |
+
Mage::register('slideshow_data', $model);
|
31 |
+
|
32 |
+
$this->loadLayout();
|
33 |
+
$this->_setActiveMenu('slideshow/items');
|
34 |
+
|
35 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Slideshow Manager'), Mage::helper('adminhtml')->__('Slideshow Manager'));
|
36 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Slideshow News'), Mage::helper('adminhtml')->__('Slideshow News'));
|
37 |
+
|
38 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
39 |
+
|
40 |
+
$this->_addContent($this->getLayout()->createBlock('slideshow/adminhtml_slideshow_edit'))
|
41 |
+
->_addLeft($this->getLayout()->createBlock('slideshow/adminhtml_slideshow_edit_tabs'));
|
42 |
+
|
43 |
+
$this->renderLayout();
|
44 |
+
} else {
|
45 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('slideshow')->__('Slideshow does not exist'));
|
46 |
+
$this->_redirect('*/*/');
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
public function newAction() {
|
51 |
+
$this->_forward('edit');
|
52 |
+
}
|
53 |
+
|
54 |
+
public function saveAction()
|
55 |
+
{
|
56 |
+
if ($data = $this->getRequest()->getPost())
|
57 |
+
{
|
58 |
+
$collection = Mage::getModel('slideshow/slideshow')->getCollection();
|
59 |
+
$collection->addFieldToFilter('title',$data['title']);
|
60 |
+
$collection->addFieldToFilter('category',$data['category']);
|
61 |
+
if($this->getRequest()->getParam('id'))
|
62 |
+
{
|
63 |
+
$collection->addFieldToFilter('slideshow_id',array('neq' => $this->getRequest()->getParam('id')));
|
64 |
+
}
|
65 |
+
|
66 |
+
if($collection->getData())
|
67 |
+
{
|
68 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('slideshow')->__('Slideshow with same title "%s" already exist.', $data['title']));
|
69 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
70 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
|
74 |
+
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '')
|
75 |
+
{
|
76 |
+
if( $this->getRequest()->getParam('id') > 0 )
|
77 |
+
{
|
78 |
+
$model = Mage::getModel('slideshow/slideshow')->load($this->getRequest()->getParam('id'));
|
79 |
+
if($model->getfilename() != "")
|
80 |
+
{
|
81 |
+
// path of the resized image to be saved
|
82 |
+
// remove file if it already exist
|
83 |
+
$imageUrl = Mage::getBaseDir('media').DS."ma2slideshow".DS.$model->getfilename();
|
84 |
+
$imageResized = Mage::getBaseDir('media').DS."ma2slideshow".DS."thumbnail".DS.$model->getfilename();
|
85 |
+
|
86 |
+
if(file_exists($imageUrl))
|
87 |
+
{
|
88 |
+
unlink($imageUrl);
|
89 |
+
unlink($imageResized);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
try
|
94 |
+
{
|
95 |
+
$date = date('Ymdhis');
|
96 |
+
/* Starting upload */
|
97 |
+
$uploader = new Varien_File_Uploader('filename');
|
98 |
+
|
99 |
+
// Any extention would work
|
100 |
+
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
101 |
+
$uploader->setAllowRenameFiles(false);
|
102 |
+
|
103 |
+
// Set the file upload mode
|
104 |
+
// false -> get the file directly in the specified folder
|
105 |
+
// true -> get the file in the product like folders (file.jpg will go in something like /media/f/i/file.jpg)
|
106 |
+
$uploader->setFilesDispersion(false);
|
107 |
+
|
108 |
+
$filedet = pathinfo($_FILES['filename']['name']);
|
109 |
+
|
110 |
+
// We set media as the upload dir
|
111 |
+
$path = Mage::getBaseDir('media').DS.'ma2slideshow'.DS;
|
112 |
+
$uploader->save($path, $filedet['filename'].$date.'.'.$filedet['extension'] );
|
113 |
+
|
114 |
+
// actual path of image
|
115 |
+
$imageUrl = Mage::getBaseDir('media').DS."ma2slideshow".DS.$filedet['filename'].$date.'.'.$filedet['extension'];
|
116 |
+
|
117 |
+
// path of the resized image to be saved
|
118 |
+
// here, the resized image is saved in media/resized folder
|
119 |
+
$imageResized = Mage::getBaseDir('media').DS."ma2slideshow".DS."thumbnail".DS.$filedet['filename'].$date.'.'.$filedet['extension'];
|
120 |
+
|
121 |
+
// resize image only if the image file exists and the resized image file doesn't exist
|
122 |
+
// the image is resized proportionally with the width/height 135px
|
123 |
+
if (!file_exists($imageResized)&&file_exists($imageUrl))
|
124 |
+
{
|
125 |
+
$imageObj = new Varien_Image($imageUrl);
|
126 |
+
$imageObj->constrainOnly(TRUE);
|
127 |
+
$imageObj->keepAspectRatio(TRUE);
|
128 |
+
$imageObj->keepFrame(FALSE);
|
129 |
+
$imageObj->resize(100, 100);
|
130 |
+
$imageObj->save($imageResized);
|
131 |
+
}
|
132 |
+
|
133 |
+
}
|
134 |
+
catch (Exception $e){
|
135 |
+
}
|
136 |
+
|
137 |
+
//this way the name is saved in DB
|
138 |
+
$data['filename'] = $filedet['filename'].$date.'.'.$filedet['extension'];
|
139 |
+
}
|
140 |
+
|
141 |
+
$model = Mage::getModel('slideshow/slideshow');
|
142 |
+
$model->setData($data)->setId($this->getRequest()->getParam('id'));
|
143 |
+
|
144 |
+
try
|
145 |
+
{
|
146 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
147 |
+
$model->setCreatedTime(now())
|
148 |
+
->setUpdateTime(now());
|
149 |
+
} else {
|
150 |
+
$model->setUpdateTime(now());
|
151 |
+
}
|
152 |
+
|
153 |
+
$model->save();
|
154 |
+
|
155 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('slideshow')->__('Item was successfully saved'));
|
156 |
+
//Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Slideshow was successfully saved'));
|
157 |
+
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
158 |
+
//Mage::getSingleton('adminhtml/session')->setSlideShowData(false);
|
159 |
+
|
160 |
+
if ($this->getRequest()->getParam('back')) {
|
161 |
+
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
162 |
+
return;
|
163 |
+
}
|
164 |
+
$this->_redirect('*/*/');
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
catch (Exception $e)
|
168 |
+
{
|
169 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
170 |
+
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
171 |
+
//Mage::getSingleton('adminhtml/session')->setSlideShowData($data);
|
172 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
}
|
176 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('slideshow')->__('Unable to find item to save'));
|
177 |
+
$this->_redirect('*/*/');
|
178 |
+
}
|
179 |
+
|
180 |
+
public function deleteAction()
|
181 |
+
{
|
182 |
+
if( $this->getRequest()->getParam('id') > 0 )
|
183 |
+
{
|
184 |
+
try
|
185 |
+
{
|
186 |
+
$model = Mage::getModel('slideshow/slideshow')->load($this->getRequest()->getParam('id'));
|
187 |
+
if($model->getfilename() != "")
|
188 |
+
{
|
189 |
+
$imageUrl = Mage::getBaseDir('media').DS."ma2slideshow".DS.$model->getfilename();
|
190 |
+
|
191 |
+
// path of the resized image to be saved
|
192 |
+
// here, the resized image is saved in media/resized folder
|
193 |
+
$imageResized = Mage::getBaseDir('media').DS."ma2slideshow".DS."thumbnail".DS.$model->getfilename();
|
194 |
+
|
195 |
+
if(file_exists($imageUrl))
|
196 |
+
{
|
197 |
+
unlink($imageUrl);
|
198 |
+
unlink($imageResized);
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
$model->setId($this->getRequest()->getParam('id'))
|
203 |
+
->delete();
|
204 |
+
|
205 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
206 |
+
$this->_redirect('*/*/');
|
207 |
+
}
|
208 |
+
catch (Exception $e)
|
209 |
+
{
|
210 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
211 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
212 |
+
}
|
213 |
+
}
|
214 |
+
$this->_redirect('*/*/');
|
215 |
+
}
|
216 |
+
|
217 |
+
public function massDeleteAction()
|
218 |
+
{
|
219 |
+
$slideshowIds = $this->getRequest()->getParam('slideshow');
|
220 |
+
if(!is_array($slideshowIds)) {
|
221 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
222 |
+
} else {
|
223 |
+
try {
|
224 |
+
foreach ($slideshowIds as $slideshowId) {
|
225 |
+
$slideshow = Mage::getModel('slideshow/slideshow')->load($slideshowId);
|
226 |
+
$slideshow->delete();
|
227 |
+
}
|
228 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
229 |
+
Mage::helper('adminhtml')->__(
|
230 |
+
'Total of %d record(s) were successfully deleted', count($slideshowIds)
|
231 |
+
)
|
232 |
+
);
|
233 |
+
} catch (Exception $e) {
|
234 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
235 |
+
}
|
236 |
+
}
|
237 |
+
$this->_redirect('*/*/index');
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Product grid for AJAX request.
|
242 |
+
* Sort and filter result for example.
|
243 |
+
*/
|
244 |
+
public function gridAction()
|
245 |
+
{
|
246 |
+
$this->loadLayout();
|
247 |
+
$this->getResponse()->setBody(
|
248 |
+
$this->getLayout()->createBlock('slideshow/adminhtml_slideshow_grid')->toHtml()
|
249 |
+
);
|
250 |
+
}
|
251 |
+
|
252 |
+
public function exportCsvAction()
|
253 |
+
{
|
254 |
+
$fileName = 'ma2slideshow.csv';
|
255 |
+
$content = $this->getLayout()->createBlock('slideshow/adminhtml_slideshow_grid')
|
256 |
+
->getCsv();
|
257 |
+
|
258 |
+
$this->_sendUploadResponse($fileName, $content);
|
259 |
+
}
|
260 |
+
|
261 |
+
public function exportXmlAction()
|
262 |
+
{
|
263 |
+
$fileName = 'ma2slideshow.xml';
|
264 |
+
$content = $this->getLayout()->createBlock('slideshow/adminhtml_slideshow_grid')
|
265 |
+
->getXml();
|
266 |
+
|
267 |
+
$this->_sendUploadResponse($fileName, $content);
|
268 |
+
}
|
269 |
+
|
270 |
+
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
271 |
+
{
|
272 |
+
$response = $this->getResponse();
|
273 |
+
$response->setHeader('HTTP/1.1 200 OK','');
|
274 |
+
$response->setHeader('Pragma', 'public', true);
|
275 |
+
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
276 |
+
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
277 |
+
$response->setHeader('Last-Modified', date('r'));
|
278 |
+
$response->setHeader('Accept-Ranges', 'bytes');
|
279 |
+
$response->setHeader('Content-Length', strlen($content));
|
280 |
+
$response->setHeader('Content-type', $contentType);
|
281 |
+
$response->setBody($content);
|
282 |
+
$response->sendResponse();
|
283 |
+
die;
|
284 |
+
}
|
285 |
+
}
|
app/code/local/Ma2/Slideshow/controllers/IndexController.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_Slideshow_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
|
7 |
+
/*
|
8 |
+
* Load an object by id
|
9 |
+
* Request looking like:
|
10 |
+
* http://site.com/slideshow?id=15
|
11 |
+
* or
|
12 |
+
* http://site.com/slideshow/id/15
|
13 |
+
*/
|
14 |
+
/*
|
15 |
+
$slideshow_id = $this->getRequest()->getParam('id');
|
16 |
+
|
17 |
+
if($slideshow_id != null && $slideshow_id != '') {
|
18 |
+
$slideshow = Mage::getModel('slideshow/slideshow')->load($slideshow_id)->getData();
|
19 |
+
} else {
|
20 |
+
$slideshow = null;
|
21 |
+
}
|
22 |
+
*/
|
23 |
+
|
24 |
+
/*
|
25 |
+
* If no param we load a the last created item
|
26 |
+
*/
|
27 |
+
/*
|
28 |
+
if($slideshow == null) {
|
29 |
+
$resource = Mage::getSingleton('core/resource');
|
30 |
+
$read= $resource->getConnection('core_read');
|
31 |
+
$slideshowTable = $resource->getTableName('slideshow');
|
32 |
+
|
33 |
+
$select = $read->select()
|
34 |
+
->from($slideshowTable,array('slideshow_id','title','content','status'))
|
35 |
+
->where('status',1)
|
36 |
+
->order('created_time DESC') ;
|
37 |
+
|
38 |
+
$slideshow = $read->fetchRow($select);
|
39 |
+
}
|
40 |
+
Mage::register('slideshow', $slideshow);
|
41 |
+
*/
|
42 |
+
|
43 |
+
|
44 |
+
$this->loadLayout();
|
45 |
+
$this->renderLayout();
|
46 |
+
}
|
47 |
+
}
|
app/code/local/Ma2/Slideshow/etc/config.xml
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ma2_Slideshow>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Ma2_Slideshow>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<slideshow>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Ma2_Slideshow</module>
|
14 |
+
<frontName>slideshow</frontName>
|
15 |
+
</args>
|
16 |
+
</slideshow>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<slideshow>
|
21 |
+
<file>ma2slideshow.xml</file>
|
22 |
+
</slideshow>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<slideshow>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Ma2_Slideshow</module>
|
32 |
+
<frontName>slideshow</frontName>
|
33 |
+
</args>
|
34 |
+
</slideshow>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<admin>
|
38 |
+
<routers>
|
39 |
+
<!-- Includes our controller, so when we add the adminhtml menu item below, it is found! -->
|
40 |
+
<adminhtml>
|
41 |
+
<args>
|
42 |
+
<slideshow>
|
43 |
+
<slideshow_options before="Mage_Adminhtml">Ma2_Slideshow_Adminhtml</slideshow_options>
|
44 |
+
</slideshow>
|
45 |
+
</args>
|
46 |
+
</adminhtml>
|
47 |
+
</routers>
|
48 |
+
</admin>
|
49 |
+
<adminhtml>
|
50 |
+
<menu>
|
51 |
+
<ma2 translate="title" module="ThemeOptions">
|
52 |
+
<title>MA2</title>
|
53 |
+
<sort_order>9999</sort_order>
|
54 |
+
<children>
|
55 |
+
<slideshow_options translate="title" module="slideshow">
|
56 |
+
<title>Slideshow Options</title>
|
57 |
+
<sort_order>2</sort_order>
|
58 |
+
<children>
|
59 |
+
<items translate="title" module="slideshow">
|
60 |
+
<title>Manage Items</title>
|
61 |
+
<sort_order>1</sort_order>
|
62 |
+
<action>slideshow/adminhtml_slideshow</action>
|
63 |
+
</items>
|
64 |
+
<config translate="title" module="slideshow">
|
65 |
+
<title>Slideshow Config</title>
|
66 |
+
<sort_order>3</sort_order>
|
67 |
+
<action>adminhtml/system_config/edit/section/slideshow_options</action>
|
68 |
+
</config>
|
69 |
+
</children>
|
70 |
+
</slideshow_options>
|
71 |
+
</children>
|
72 |
+
</ma2>
|
73 |
+
</menu>
|
74 |
+
<!-- <acl>
|
75 |
+
<resources>
|
76 |
+
<all>
|
77 |
+
<title>Allow Everything</title>
|
78 |
+
</all>
|
79 |
+
<admin>
|
80 |
+
<children>
|
81 |
+
<Ma2_Slideshow>
|
82 |
+
<title>Slideshow Module</title>
|
83 |
+
<sort_order>10</sort_order>
|
84 |
+
</Ma2_Slideshow>
|
85 |
+
</children>
|
86 |
+
</admin>
|
87 |
+
</resources>
|
88 |
+
</acl> -->
|
89 |
+
<acl>
|
90 |
+
<resources>
|
91 |
+
<all>
|
92 |
+
<title>Allow Everything</title>
|
93 |
+
</all>
|
94 |
+
<admin>
|
95 |
+
<children>
|
96 |
+
<!-- <children>
|
97 |
+
<Ma2_Slideshow>
|
98 |
+
<title>Ma2 Slideshow</title>
|
99 |
+
<sort_order>11</sort_order>
|
100 |
+
</Ma2_Slideshow>
|
101 |
+
</children> -->
|
102 |
+
<system>
|
103 |
+
<children>
|
104 |
+
<config>
|
105 |
+
<children>
|
106 |
+
<slideshow_options translate="title" module="slideshow">
|
107 |
+
<title>Ma2 Slideshow</title>
|
108 |
+
</slideshow_options>
|
109 |
+
</children>
|
110 |
+
</config>
|
111 |
+
</children>
|
112 |
+
</system>
|
113 |
+
</children>
|
114 |
+
</admin>
|
115 |
+
</resources>
|
116 |
+
</acl>
|
117 |
+
<layout>
|
118 |
+
<updates>
|
119 |
+
<slideshow>
|
120 |
+
<file>ma2slideshow.xml</file>
|
121 |
+
</slideshow>
|
122 |
+
</updates>
|
123 |
+
</layout>
|
124 |
+
</adminhtml>
|
125 |
+
<global>
|
126 |
+
<models>
|
127 |
+
<slideshow>
|
128 |
+
<class>Ma2_Slideshow_Model</class>
|
129 |
+
<resourceModel>slideshow_mysql4</resourceModel>
|
130 |
+
</slideshow>
|
131 |
+
<slideshow_mysql4>
|
132 |
+
<class>Ma2_Slideshow_Model_Mysql4</class>
|
133 |
+
<entities>
|
134 |
+
<slideshow>
|
135 |
+
<table>ma2_slideshow</table>
|
136 |
+
<!-- <table>ma2_slideshow_category</table> -->
|
137 |
+
</slideshow>
|
138 |
+
<!-- <slideshow_store>
|
139 |
+
<table>slideshow_store</table>
|
140 |
+
</slideshow_store> -->
|
141 |
+
</entities>
|
142 |
+
</slideshow_mysql4>
|
143 |
+
</models>
|
144 |
+
<resources>
|
145 |
+
<slideshow_setup>
|
146 |
+
<setup>
|
147 |
+
<module>Ma2_Slideshow</module>
|
148 |
+
</setup>
|
149 |
+
<connection>
|
150 |
+
<use>core_setup</use>
|
151 |
+
</connection>
|
152 |
+
</slideshow_setup>
|
153 |
+
<slideshow_write>
|
154 |
+
<connection>
|
155 |
+
<use>core_write</use>
|
156 |
+
</connection>
|
157 |
+
</slideshow_write>
|
158 |
+
<slideshow_read>
|
159 |
+
<connection>
|
160 |
+
<use>core_read</use>
|
161 |
+
</connection>
|
162 |
+
</slideshow_read>
|
163 |
+
</resources>
|
164 |
+
<blocks>
|
165 |
+
<slideshow>
|
166 |
+
<class>Ma2_Slideshow_Block</class>
|
167 |
+
</slideshow>
|
168 |
+
</blocks>
|
169 |
+
<helpers>
|
170 |
+
<slideshow>
|
171 |
+
<class>Ma2_Slideshow_Helper</class>
|
172 |
+
</slideshow>
|
173 |
+
</helpers>
|
174 |
+
</global>
|
175 |
+
<default>
|
176 |
+
<slideshow_options>
|
177 |
+
<general>
|
178 |
+
<slide_height>300</slide_height>
|
179 |
+
<display_title>1</display_title>
|
180 |
+
<display_content>1</display_content>
|
181 |
+
<interval>3000</interval>
|
182 |
+
<transitionType>slide</transitionType>
|
183 |
+
<transitionTime>1.5</transitionTime>
|
184 |
+
<manTransitionTime>0.5</manTransitionTime>
|
185 |
+
<navigation>1</navigation>
|
186 |
+
<controls>1</controls>
|
187 |
+
<pauseOnHover>0</pauseOnHover>
|
188 |
+
</general>
|
189 |
+
</slideshow_options>
|
190 |
+
</default>
|
191 |
+
</config>
|
app/code/local/Ma2/Slideshow/etc/system.xml
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<!-- <tabs>
|
4 |
+
<slideshowtab translate="label" module="slideshow">
|
5 |
+
<label>Ma2 Slideshow</label>
|
6 |
+
<sort_order>101</sort_order>
|
7 |
+
</slideshowtab>
|
8 |
+
</tabs> -->
|
9 |
+
<tabs>
|
10 |
+
<ma2 translate="label" module="ThemeOptions">
|
11 |
+
<label>MagenMarket Extension</label>
|
12 |
+
<sort_order>168</sort_order>
|
13 |
+
</ma2>
|
14 |
+
</tabs>
|
15 |
+
<sections>
|
16 |
+
<slideshow_options translate="label" module="slideshow">
|
17 |
+
<label>Slideshow Config</label>
|
18 |
+
<class>separator-top</class>
|
19 |
+
<tab>ma2</tab>
|
20 |
+
<frontend_type>text</frontend_type>
|
21 |
+
<sort_order>10001</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>1</show_in_store>
|
25 |
+
<groups>
|
26 |
+
<general translate="label" module="slideshow">
|
27 |
+
<label>General</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>50</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<fields>
|
34 |
+
<slide_height translate="label" module="slideshow">
|
35 |
+
<label>Slider height (px)</label>
|
36 |
+
<frontend_type>text</frontend_type>
|
37 |
+
<validate>validate-digits validate-greater-than-zero</validate>
|
38 |
+
<sort_order>1</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</slide_height>
|
43 |
+
|
44 |
+
<display_title translate="label" module="slideshow">
|
45 |
+
<label>Display title slide?</label>
|
46 |
+
<frontend_type>radios</frontend_type>
|
47 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
48 |
+
<sort_order>2</sort_order>
|
49 |
+
<show_in_default>1</show_in_default>
|
50 |
+
<show_in_website>1</show_in_website>
|
51 |
+
<show_in_store>1</show_in_store>
|
52 |
+
</display_title>
|
53 |
+
|
54 |
+
<display_content translate="label" module="slideshow">
|
55 |
+
<label>Display content slide?</label>
|
56 |
+
<frontend_type>radios</frontend_type>
|
57 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
58 |
+
<sort_order>3</sort_order>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>1</show_in_store>
|
62 |
+
</display_content>
|
63 |
+
|
64 |
+
<auto_play translate="label" module="slideshow">
|
65 |
+
<label>Auto play?</label>
|
66 |
+
<frontend_type>select</frontend_type>
|
67 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
+
<comment>Decides whether to start the show automatically</comment>
|
69 |
+
<sort_order>5</sort_order>
|
70 |
+
<show_in_default>1</show_in_default>
|
71 |
+
<show_in_website>1</show_in_website>
|
72 |
+
<show_in_store>1</show_in_store>
|
73 |
+
</auto_play>
|
74 |
+
|
75 |
+
<interval translate="label" module="slideshow">
|
76 |
+
<label>Interval</label>
|
77 |
+
<frontend_type>text</frontend_type>
|
78 |
+
<validate>validate-digits validate-greater-than-zero</validate>
|
79 |
+
<comment>Time interval between each slide transition. Example: 2000, 3000</comment>
|
80 |
+
<sort_order>6</sort_order>
|
81 |
+
<show_in_default>1</show_in_default>
|
82 |
+
<show_in_website>1</show_in_website>
|
83 |
+
<show_in_store>1</show_in_store>
|
84 |
+
</interval>
|
85 |
+
|
86 |
+
<transitionType translate="label" module="slideshow">
|
87 |
+
<label>Transition type</label>
|
88 |
+
<frontend_type>select</frontend_type>
|
89 |
+
<source_model>slideshow/transitiontype</source_model>
|
90 |
+
<comment>Type of transition. Either a fading slideshow or a slider.</comment>
|
91 |
+
<sort_order>8</sort_order>
|
92 |
+
<show_in_default>1</show_in_default>
|
93 |
+
<show_in_website>1</show_in_website>
|
94 |
+
<show_in_store>1</show_in_store>
|
95 |
+
</transitionType>
|
96 |
+
|
97 |
+
<transitionTime translate="label" module="slideshow">
|
98 |
+
<label>Transition time</label>
|
99 |
+
<frontend_type>text</frontend_type>
|
100 |
+
<comment>Time taken to animate transition from one slide to the next.</comment>
|
101 |
+
<sort_order>9</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</transitionTime>
|
106 |
+
|
107 |
+
<manTransitionTime translate="label" module="slideshow">
|
108 |
+
<label>manTransition time</label>
|
109 |
+
<frontend_type>text</frontend_type>
|
110 |
+
<comment>Time taken to animate transition from one slide to the next when the user has initiated the transition.</comment>
|
111 |
+
<sort_order>10</sort_order>
|
112 |
+
<show_in_default>1</show_in_default>
|
113 |
+
<show_in_website>1</show_in_website>
|
114 |
+
<show_in_store>1</show_in_store>
|
115 |
+
</manTransitionTime>
|
116 |
+
|
117 |
+
<navigation translate="label" module="slideshow">
|
118 |
+
<label>Navigation?</label>
|
119 |
+
<frontend_type>select</frontend_type>
|
120 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
121 |
+
<comment>Whether to generate/use navigation elements (eg: 1,2,3,4...etc) for each slide for quick navigation.</comment>
|
122 |
+
<sort_order>11</sort_order>
|
123 |
+
<show_in_default>1</show_in_default>
|
124 |
+
<show_in_website>1</show_in_website>
|
125 |
+
<show_in_store>1</show_in_store>
|
126 |
+
</navigation>
|
127 |
+
|
128 |
+
<controls translate="label" module="slideshow">
|
129 |
+
<label>Controls?</label>
|
130 |
+
<frontend_type>select</frontend_type>
|
131 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
132 |
+
<comment>Whether to generate/use control elements for forward,backward and stop/start.</comment>
|
133 |
+
<sort_order>12</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
</controls>
|
138 |
+
|
139 |
+
<pauseOnHover translate="label" module="slideshow">
|
140 |
+
<label>Pause on hover?</label>
|
141 |
+
<frontend_type>select</frontend_type>
|
142 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
143 |
+
<comment>Pause the show when mouse is hovered over the show element.</comment>
|
144 |
+
<sort_order>13</sort_order>
|
145 |
+
<show_in_default>1</show_in_default>
|
146 |
+
<show_in_website>1</show_in_website>
|
147 |
+
<show_in_store>1</show_in_store>
|
148 |
+
</pauseOnHover>
|
149 |
+
</fields>
|
150 |
+
</general>
|
151 |
+
</groups>
|
152 |
+
</slideshow_options>
|
153 |
+
</sections>
|
154 |
+
</config>
|
app/code/local/Ma2/Slideshow/etc/widget.xml
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<widgets>
|
3 |
+
<slideshow_widget type="slideshow/slideshow" translate="name description" module="slideshow">
|
4 |
+
<name>Ma2 Slideshow</name>
|
5 |
+
<description>Ma2 slideshow</description>
|
6 |
+
<parameters>
|
7 |
+
<slideshow_ids>
|
8 |
+
<label>Select items</label>
|
9 |
+
<visible>1</visible>
|
10 |
+
<required>1</required>
|
11 |
+
<type>multiselect</type>
|
12 |
+
<source_model>slideshow/slideshowselect</source_model>
|
13 |
+
</slideshow_ids>
|
14 |
+
<template translate="label">
|
15 |
+
<label>Frontend template</label>
|
16 |
+
<visible>1</visible>
|
17 |
+
<required>1</required>
|
18 |
+
<type>select</type>
|
19 |
+
<values>
|
20 |
+
<default translate="label">
|
21 |
+
<value>ma2slideshow/slideshow.phtml</value>
|
22 |
+
<label>Default template</label>
|
23 |
+
</default>
|
24 |
+
</values>
|
25 |
+
</template>
|
26 |
+
</parameters>
|
27 |
+
</slideshow_widget>
|
28 |
+
</widgets>
|
app/code/local/Ma2/Slideshow/sql/slideshow_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$installer->run("
|
7 |
+
|
8 |
+
-- DROP TABLE IF EXISTS {$this->getTable('ma2_slideshow')};
|
9 |
+
CREATE TABLE {$this->getTable('ma2_slideshow')} (
|
10 |
+
`slideshow_id` int(11) unsigned NOT NULL auto_increment,
|
11 |
+
`title` varchar(255) NOT NULL default '',
|
12 |
+
`category` varchar(255) NOT NULL default '',
|
13 |
+
`slideshow_url` varchar(255) NOT NULL default '',
|
14 |
+
`filename` varchar(255) NOT NULL default '',
|
15 |
+
`sortorder` int(11) NOT NULL default '0',
|
16 |
+
`content` text NOT NULL default '',
|
17 |
+
`status` smallint(6) NOT NULL default '0',
|
18 |
+
`created_time` datetime NULL,
|
19 |
+
`update_time` datetime NULL,
|
20 |
+
PRIMARY KEY (`slideshow_id`)
|
21 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
22 |
+
|
23 |
+
");
|
24 |
+
|
25 |
+
$installer->endSetup();
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Font_unused.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class OMG_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_Font extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override field method to add js
|
6 |
+
*
|
7 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
8 |
+
* @return String
|
9 |
+
*/
|
10 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
11 |
+
{
|
12 |
+
// Get the default HTML for this option
|
13 |
+
$html = parent::_getElementHtml($element);
|
14 |
+
|
15 |
+
$html .= '<br/><div id="themeoptions_gfont_preview" style="font-size:20px; margin-top:5px;">The quick brown fox jumps over the lazy dog</div>';
|
16 |
+
/*
|
17 |
+
$html .= '<br/><div id="themeoptions_gfont_preview" style="font-size:20px; margin-top:5px;">The quick brown fox jumps over the lazy dog</div>
|
18 |
+
|
19 |
+
<script>
|
20 |
+
var googleFontPreviewModel = Class.create();
|
21 |
+
|
22 |
+
googleFontPreviewModel.prototype = {
|
23 |
+
initialize : function()
|
24 |
+
{
|
25 |
+
this.fontElement = $("meigee_general_appearance_gfont");
|
26 |
+
this.previewElement = $("themeoptions_gfont_preview");
|
27 |
+
this.loadedFonts = "";
|
28 |
+
|
29 |
+
this.refreshPreview();
|
30 |
+
this.bindFontChange();
|
31 |
+
},
|
32 |
+
bindFontChange : function()
|
33 |
+
{
|
34 |
+
Event.observe(this.fontElement, "change", this.refreshPreview.bind(this));
|
35 |
+
Event.observe(this.fontElement, "keyup", this.refreshPreview.bind(this));
|
36 |
+
Event.observe(this.fontElement, "keydown", this.refreshPreview.bind(this));
|
37 |
+
},
|
38 |
+
refreshPreview : function()
|
39 |
+
{
|
40 |
+
if ( this.loadedFonts.indexOf( this.fontElement.value ) > -1 ) {
|
41 |
+
this.updateFontFamily();
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
|
45 |
+
var ss = document.createElement("link");
|
46 |
+
ss.type = "text/css";
|
47 |
+
ss.rel = "stylesheet";
|
48 |
+
ss.href = "http://fonts.googleapis.com/css?family=" + this.fontElement.value;
|
49 |
+
document.getElementsByTagName("head")[0].appendChild(ss);
|
50 |
+
|
51 |
+
this.updateFontFamily();
|
52 |
+
|
53 |
+
this.loadedFonts += this.fontElement.value + ",";
|
54 |
+
},
|
55 |
+
updateFontFamily : function()
|
56 |
+
{
|
57 |
+
$(this.previewElement).setStyle({ fontFamily: this.fontElement.value });
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
googleFontPreview = new googleFontPreviewModel();
|
62 |
+
</script>
|
63 |
+
|
64 |
+
';
|
65 |
+
*/
|
66 |
+
return $html;
|
67 |
+
}
|
68 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fontpreview.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_FontPreview extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override field method to add js
|
6 |
+
*
|
7 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
8 |
+
* @return String
|
9 |
+
*/
|
10 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
11 |
+
{
|
12 |
+
// Get the default HTML for this option
|
13 |
+
$html = parent::_getElementHtml($element);
|
14 |
+
//Zend_Debug::dump(Mage::app()->getStore()->isCurrentlySecure());
|
15 |
+
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
|
16 |
+
$selectId = $element->getHtmlId();
|
17 |
+
$previewId = $selectId.'_preview';
|
18 |
+
|
19 |
+
$html .= '<div class="font-preview rounded" id="'.$previewId.'"><span class="span-font-preview">The quick brown fox jumps over the lazy dog</span></div>';
|
20 |
+
|
21 |
+
// css for font preview
|
22 |
+
$css = '
|
23 |
+
div.font-preview{
|
24 |
+
background-color: #f8f8f8;
|
25 |
+
border: 1px solid #CCC;
|
26 |
+
width: 260px;
|
27 |
+
padding: 8px;
|
28 |
+
overflow: hidden;
|
29 |
+
-webkit-box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2); /* Safari, Chrome */
|
30 |
+
-moz-box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2); /* Firefox */
|
31 |
+
box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.2);
|
32 |
+
}
|
33 |
+
span.span-font-preview{
|
34 |
+
float: left;
|
35 |
+
width: 100%;
|
36 |
+
text-align: center;
|
37 |
+
font-size: 18px;
|
38 |
+
line-height: normal;
|
39 |
+
}
|
40 |
+
';
|
41 |
+
$savedFont = explode(':', $element->getValue());
|
42 |
+
if (isset($savedFont[0]) && $savedFont[1] && $savedFont[0] == "w"){
|
43 |
+
$css .= '
|
44 |
+
#'.$previewId.' { font-family: "'.$savedFont[1].'";}
|
45 |
+
';
|
46 |
+
}
|
47 |
+
else{
|
48 |
+
$css .= '
|
49 |
+
#'.$previewId.' { font-family: '.str_replace(array('s:', 'w:'), '', $element->getValue()).';}
|
50 |
+
';
|
51 |
+
}
|
52 |
+
|
53 |
+
$html .= '
|
54 |
+
<style type="text/css">
|
55 |
+
'.$css.'
|
56 |
+
</style>
|
57 |
+
';
|
58 |
+
|
59 |
+
// script for font preview
|
60 |
+
$html .= '
|
61 |
+
<script type="text/javascript">
|
62 |
+
var ma2FontPreviewModel = Class.create();
|
63 |
+
|
64 |
+
ma2FontPreviewModel.prototype = {
|
65 |
+
initialize : function()
|
66 |
+
{
|
67 |
+
this.fontSelect = $("'.$selectId.'");
|
68 |
+
this.fontPreviewElement = $("'.$previewId.'");
|
69 |
+
this.loadedFonts = "";
|
70 |
+
|
71 |
+
this.loadPreviewFont();
|
72 |
+
this.bindFontChange();
|
73 |
+
},
|
74 |
+
bindFontChange : function()
|
75 |
+
{
|
76 |
+
Event.observe(this.fontSelect, "change", this.loadPreviewFont.bind(this));
|
77 |
+
Event.observe(this.fontSelect, "keyup", this.loadPreviewFont.bind(this));
|
78 |
+
Event.observe(this.fontSelect, "keydown", this.loadPreviewFont.bind(this));
|
79 |
+
},
|
80 |
+
loadPreviewFont : function()
|
81 |
+
{
|
82 |
+
if ( this.loadedFonts.indexOf( this.fontSelect.value ) > -1 ) {
|
83 |
+
this.updatePreview();
|
84 |
+
return;
|
85 |
+
}
|
86 |
+
var font = this.fontSelect.value.split(":");
|
87 |
+
var fontfamily = font[1];
|
88 |
+
if (font[0] == "w"){
|
89 |
+
/*
|
90 |
+
WebFont.load({
|
91 |
+
google: {
|
92 |
+
families: [ fontfamily ]
|
93 |
+
}
|
94 |
+
});
|
95 |
+
*/
|
96 |
+
// use synchronous method
|
97 |
+
var fcs = document.createElement("link");
|
98 |
+
fcs.type = "text/css";
|
99 |
+
fcs.rel = "stylesheet";
|
100 |
+
fcs.href = "'.($isSecure ? 'https:' : 'http:').'//fonts.googleapis.com/css?family=" + fontfamily;
|
101 |
+
document.getElementsByTagName("head")[0].appendChild(fcs);
|
102 |
+
|
103 |
+
this.updatePreview();
|
104 |
+
this.loadedFonts += this.fontSelect.value + ",";
|
105 |
+
}
|
106 |
+
},
|
107 |
+
updatePreview : function()
|
108 |
+
{
|
109 |
+
var font = this.fontSelect.value.split(":");
|
110 |
+
var fontfamily = font[1];
|
111 |
+
if (font[0] == "w"){
|
112 |
+
$(this.fontPreviewElement).setStyle({ fontFamily: "\'"+fontfamily+"\'" });
|
113 |
+
}
|
114 |
+
else{
|
115 |
+
$(this.fontPreviewElement).setStyle({ fontFamily: fontfamily });
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
backendFontPreview = new ma2FontPreviewModel();
|
121 |
+
|
122 |
+
</script>
|
123 |
+
';
|
124 |
+
|
125 |
+
return $html;
|
126 |
+
}
|
127 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fonts_unused.php
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class OMG_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_Fonts extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override field method to add js
|
6 |
+
*
|
7 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
8 |
+
* @return String
|
9 |
+
*/
|
10 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
11 |
+
{
|
12 |
+
// Get the default HTML for this option
|
13 |
+
$sans_safe = array(
|
14 |
+
"Arial, Helvetica, sans-serif",
|
15 |
+
"'Arial Black', Gadget, sans-serif",
|
16 |
+
"Impact, Charcoal, sans-serif",
|
17 |
+
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
|
18 |
+
"'MS Sans Serif', Geneva, sans-serif",
|
19 |
+
"Tahoma, Geneva, sans-serif",
|
20 |
+
"'Trebuchet MS', Helvetica, sans-serif",
|
21 |
+
"Verdana, Geneva, sans-serif"
|
22 |
+
);
|
23 |
+
$serif_safe = array(
|
24 |
+
"'Book Antiqua', 'Palatino Linotype', Palatino, serif",
|
25 |
+
"Bookman, serif",
|
26 |
+
"Garamond, serif",
|
27 |
+
"Georgia, serif",
|
28 |
+
"'MS Serif', 'New York', serif",
|
29 |
+
"'Times New Roman', Times, serif"
|
30 |
+
);
|
31 |
+
$monospace_safe = array(
|
32 |
+
"Courier, monospace",
|
33 |
+
"'Courier New', Courier, monospace",
|
34 |
+
"'Lucida Console', Monaco, monospace"
|
35 |
+
);
|
36 |
+
|
37 |
+
$options = array();
|
38 |
+
|
39 |
+
$font_default_Opt = array();
|
40 |
+
$font_default_Opt[] = array(
|
41 |
+
'label' => htmlentities("'Helvetica Neue', Helvetica, Arial, sans-serif"),
|
42 |
+
'value' => htmlentities("s:'Helvetica Neue',Helvetica,Arial,sans-serif")
|
43 |
+
);
|
44 |
+
|
45 |
+
$sans_safe_Opt = array();
|
46 |
+
foreach($sans_safe as $sansfont){
|
47 |
+
//$selected = ($this->value == 's:'.htmlentities($sansfont)) ? ' selected="selected"' : '';
|
48 |
+
$sans_safe_Opt[] = array(
|
49 |
+
'label' => htmlentities($sansfont),
|
50 |
+
'value' => 's:'.htmlentities($sansfont)
|
51 |
+
);
|
52 |
+
}
|
53 |
+
$serif_safe_Opt = array();
|
54 |
+
foreach($serif_safe as $seriffont){
|
55 |
+
//$selected = ($this->value == 's:'.htmlentities($seriffont)) ? ' selected="selected"' : '';
|
56 |
+
$serif_safe_Opt[] = array(
|
57 |
+
'label' => htmlentities($seriffont),
|
58 |
+
'value' => 's:'.htmlentities($seriffont)
|
59 |
+
);
|
60 |
+
}
|
61 |
+
$monospace_safe_Opt = array();
|
62 |
+
foreach($monospace_safe as $monospace_font){
|
63 |
+
//$selected = ($this->value == 's:'.htmlentities($monospace_font)) ? ' selected="selected"' : '';
|
64 |
+
$monospace_safe_Opt[] = array(
|
65 |
+
'label' => htmlentities($monospace_font),
|
66 |
+
'value' => 's:'.htmlentities($monospace_font)
|
67 |
+
);
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
$options[] = array(
|
72 |
+
'label' => 'Default',
|
73 |
+
'value' => $font_default_Opt
|
74 |
+
);
|
75 |
+
$options[] = array(
|
76 |
+
'label' => 'Safe Fonts: Sans-Serif',
|
77 |
+
'value' => $sans_safe_Opt
|
78 |
+
);
|
79 |
+
$options[] = array(
|
80 |
+
'label' => 'Safe Fonts: Serif',
|
81 |
+
'value' => $serif_safe_Opt
|
82 |
+
);
|
83 |
+
$options[] = array(
|
84 |
+
'label' => 'Safe Fonts: Monospace',
|
85 |
+
'value' => $monospace_safe_Opt
|
86 |
+
);
|
87 |
+
|
88 |
+
$element->setValues($options);
|
89 |
+
//$element->setClass('');
|
90 |
+
|
91 |
+
$html = parent::_getElementHtml($element);
|
92 |
+
return $html;
|
93 |
+
|
94 |
+
$sans_safe = array(
|
95 |
+
"Arial, Helvetica, sans-serif",
|
96 |
+
"'Arial Black', Gadget, sans-serif",
|
97 |
+
"Impact, Charcoal, sans-serif",
|
98 |
+
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
|
99 |
+
"'MS Sans Serif', Geneva, sans-serif",
|
100 |
+
"Tahoma, Geneva, sans-serif",
|
101 |
+
"'Trebuchet MS', Helvetica, sans-serif",
|
102 |
+
"Verdana, Geneva, sans-serif"
|
103 |
+
);
|
104 |
+
$serif_safe = array(
|
105 |
+
"'Book Antiqua', 'Palatino Linotype', Palatino, serif",
|
106 |
+
"Bookman, serif",
|
107 |
+
"Garamond, serif",
|
108 |
+
"Georgia, serif",
|
109 |
+
"'MS Serif', 'New York', serif",
|
110 |
+
"'Times New Roman', Times, serif"
|
111 |
+
);
|
112 |
+
$monospace_safe = array(
|
113 |
+
"Courier, monospace",
|
114 |
+
"'Courier New', Courier, monospace",
|
115 |
+
"'Lucida Console', Monaco, monospace"
|
116 |
+
);
|
117 |
+
|
118 |
+
$html = array();
|
119 |
+
$optionsHtml = array();
|
120 |
+
|
121 |
+
$optionsHtml[] = '<optgroup label="Default">';
|
122 |
+
$optionsHtml[] = '<option value="s:\'Helvetica Neue\',Helvetica,Arial,sans-serif">\'Helvetica Neue\', Arial, Helvetica, sans-serif</option>';
|
123 |
+
$optionsHtml[] = '</optgroup>';
|
124 |
+
|
125 |
+
$optionsHtml[] = '<optgroup label="Safe Fonts: Sans-Serif">';
|
126 |
+
foreach($sans_safe as $sansfont){
|
127 |
+
$selected = ($this->value == 's:'.htmlentities($sansfont)) ? ' selected="selected"' : '';
|
128 |
+
$optionsHtml[] = '<option value="s:'.htmlentities($sansfont).'" '.$selected.'>'.htmlentities($sansfont).'</option>';
|
129 |
+
}
|
130 |
+
|
131 |
+
$optionsHtml[] = '<optgroup label="Safe Fonts: Serif">';
|
132 |
+
foreach($serif_safe as $seriffont){
|
133 |
+
$selected = ($this->value == 's:'.htmlentities($seriffont)) ? ' selected="selected"' : '';
|
134 |
+
$optionsHtml[] = '<option value="s:'.htmlentities($seriffont).'" '.$selected.'>'.htmlentities($seriffont).'</option>';
|
135 |
+
}
|
136 |
+
|
137 |
+
$optionsHtml[] = '<optgroup label="Safe Fonts: Monospace">';
|
138 |
+
foreach($monospace_safe as $monospace_font){
|
139 |
+
$selected = ($this->value == 's:'.htmlentities($monospace_font)) ? ' selected="selected"' : '';
|
140 |
+
$optionsHtml[] = '<option value="s:'.htmlentities($monospace_font).'" '.$selected.'>'.htmlentities($monospace_font).'</option>';
|
141 |
+
}
|
142 |
+
|
143 |
+
$optionsHtml[] = '</optgroup>';
|
144 |
+
/*
|
145 |
+
$optionsHtml[] = '<optgroup label="Google WebFonts">';
|
146 |
+
|
147 |
+
if (!isset($_SESSION["gfontlist"]) || empty($_SESSION["gfontlist"])){
|
148 |
+
$webfontJFile = JPATH_LIBRARIES . DS . 'omg' . DS . '3rd'. DS . 'webfonts' . DS .'gwebfonts.json';
|
149 |
+
$fontsJson = $this->file_include_contents($webfontJFile);
|
150 |
+
$_SESSION["gfontlist"] = $fontsJson;
|
151 |
+
}
|
152 |
+
$webfonts = $_SESSION["gfontlist"] ? $_SESSION["gfontlist"] : $fontsJson;
|
153 |
+
|
154 |
+
|
155 |
+
$webfonts = @json_decode($webfonts, true);
|
156 |
+
$wfontArray = $webfonts["items"];
|
157 |
+
if (is_array($wfontArray) && count($wfontArray) > 0){
|
158 |
+
foreach($wfontArray as $idx => $wfont){
|
159 |
+
$subsets = implode(',', (array)$wfont["subsets"]);
|
160 |
+
$selected = ($this->value == 'w:'.$wfont["family"]) ? ' selected="selected"' : '';
|
161 |
+
$optionsHtml[] = '<option value="w:'.$wfont["family"].'" '.$selected.'>'.$wfont["family"] . ' (' .$subsets . ')'.'</option>';
|
162 |
+
}
|
163 |
+
}
|
164 |
+
$optionsHtml[] = '</optgroup>';
|
165 |
+
*/
|
166 |
+
/*
|
167 |
+
$html[] = '<div class="select-wrapper '.($this->element['class'] ? trim($this->element['class']->__toString()) : '').'">';
|
168 |
+
$html[] = '<span class="savedValue rounded-6">'.str_replace(array('w:','s:'), '', $this->value).'</span>';
|
169 |
+
$html[] = ' <select id="' . $this->id . '" data-value="' . $this->value . '" name="' . $this->name . '" class="selectbox-real" onchange="fontPreview(this.value);">';
|
170 |
+
$html[] = implode("\n", $optionsHtml);
|
171 |
+
$html[] = ' </select>';
|
172 |
+
$html[] = '</div>';
|
173 |
+
|
174 |
+
return implode('', $html); */
|
175 |
+
}
|
176 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Fontscript_unused.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class OMG_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_FontScript extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/*
|
5 |
+
* Overide field method to remove label, scope-label
|
6 |
+
*/
|
7 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
8 |
+
{
|
9 |
+
// we remove the scope label for this element
|
10 |
+
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
|
11 |
+
// we remove the label for this element
|
12 |
+
$element->unsLabel()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
|
13 |
+
return parent::render($element);
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Override field method to add js code
|
18 |
+
*
|
19 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
20 |
+
* @return String
|
21 |
+
*/
|
22 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
23 |
+
{
|
24 |
+
// Get the default HTML for this option
|
25 |
+
//$html = parent::_getElementHtml($element);
|
26 |
+
$html = '';
|
27 |
+
/*
|
28 |
+
$html .= '
|
29 |
+
<script type="text/javascript">
|
30 |
+
WebFont.load({
|
31 |
+
google: {
|
32 |
+
families: [ "Abel" ]
|
33 |
+
}});
|
34 |
+
|
35 |
+
function fontPreview(value){
|
36 |
+
var font = value.split(":");
|
37 |
+
var fontfamily = font[1];
|
38 |
+
if (font[0] == "w"){
|
39 |
+
WebFont.load({
|
40 |
+
google: {
|
41 |
+
families: [ fontfamily ]
|
42 |
+
}
|
43 |
+
});
|
44 |
+
}
|
45 |
+
|
46 |
+
if (font[0] == "w"){
|
47 |
+
$$("span.span-font-preview").setStyle({"font-family": "\'"+fontfamily+"\'"});
|
48 |
+
}
|
49 |
+
else{
|
50 |
+
$$("span.span-font-preview").setStyle({"font-family": ""+fontfamily});
|
51 |
+
}
|
52 |
+
|
53 |
+
$$("span.span-font-preview").html("The quick brown fox jumps over the lazy dog");
|
54 |
+
|
55 |
+
$$("div.font-preview").setStyle({"display": "block"});
|
56 |
+
if(value == "none"){
|
57 |
+
$$("div.font-preview").setStyle({"display": "none"});
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
function closePreview(){
|
62 |
+
$$("div.font-preview").setStyle({"display": "none"});
|
63 |
+
}
|
64 |
+
</script>
|
65 |
+
';
|
66 |
+
*/
|
67 |
+
return $html;
|
68 |
+
}
|
69 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Heading.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_Heading extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override field method to add js
|
6 |
+
*
|
7 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
8 |
+
* @return String
|
9 |
+
*/
|
10 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
11 |
+
{
|
12 |
+
//var_dump($element->getData());
|
13 |
+
$html = '<p class="'.$element->getClass().'">'.$element->getLabel().'</p>';
|
14 |
+
return $html;
|
15 |
+
}
|
16 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Images.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_Images extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Override method to output our custom image omg
|
7 |
+
*
|
8 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
9 |
+
* @return String
|
10 |
+
*/
|
11 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
12 |
+
{
|
13 |
+
// Get the default HTML for this option
|
14 |
+
$html = parent::_getElementHtml($element);
|
15 |
+
|
16 |
+
$html = '<div class="sidebars-row">';
|
17 |
+
$value = $element->getValue();
|
18 |
+
if ($values = $element->getValues()) {
|
19 |
+
foreach ($values as $option) {
|
20 |
+
$html.= $this->_optionToHtml($element, $option, $value);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
$html.= $element->getAfterElementHtml();
|
24 |
+
$html.= '</div>';
|
25 |
+
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Override method to output wrapper
|
31 |
+
*
|
32 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
33 |
+
* @param Array $option
|
34 |
+
* @param String $selected
|
35 |
+
* @return String
|
36 |
+
*/
|
37 |
+
protected function _optionToHtml($element, $option, $selected)
|
38 |
+
{
|
39 |
+
$html = '<div class="ma2-radio">';
|
40 |
+
$html .= '<div class="ma2-thumb"><img src="'.Mage::getDesign()->getSkinUrl('images/'.$option['value'].'.png').'" /></div>';
|
41 |
+
$html .= '<input type="radio"'.$element->serialize(array('name', 'class', 'style'));
|
42 |
+
if (is_array($option)) {
|
43 |
+
$html.= 'value="'.htmlspecialchars($option['value'], ENT_COMPAT).'" id="'.$element->getHtmlId().$value.'"';
|
44 |
+
if ($option['value'] == $selected) {
|
45 |
+
$html.= ' checked="checked"';
|
46 |
+
}
|
47 |
+
$html.= ' />';
|
48 |
+
$html.= '<label class="inline" for="'.$element->getHtmlId().$option['value'].'">'.$option['label'].'</label>';
|
49 |
+
}
|
50 |
+
elseif ($option instanceof Varien_Object) {
|
51 |
+
$html.= 'id="'.$element->getHtmlId().$option->getValue().'"'.$option->serialize(array('label', 'title', 'value', 'class', 'style'));
|
52 |
+
if (in_array($option->getValue(), $selected)) {
|
53 |
+
$html.= ' checked="checked"';
|
54 |
+
}
|
55 |
+
$html.= ' />';
|
56 |
+
$html.= '<label class="inline" for="'.$element->getHtmlId().$option->getValue().'">'.$option->getLabel().'</label>';
|
57 |
+
}
|
58 |
+
$html.= '</div>';
|
59 |
+
$html.= $element->getSeparator() . "\n";
|
60 |
+
return $html;
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Imagessmall.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_Imagessmall extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Override method to output our custom image Omg
|
7 |
+
*
|
8 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
9 |
+
* @return String
|
10 |
+
*/
|
11 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
12 |
+
{
|
13 |
+
// Get the default HTML for this option
|
14 |
+
$html = parent::_getElementHtml($element);
|
15 |
+
|
16 |
+
$html = '<div class="sidebars-row">';
|
17 |
+
$value = $element->getValue();
|
18 |
+
if ($values = $element->getValues()) {
|
19 |
+
foreach ($values as $option) {
|
20 |
+
$html.= $this->_optionToHtml($element, $option, $value);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
$html.= $element->getAfterElementHtml();
|
24 |
+
$html.= '</div>';
|
25 |
+
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Override method to output wrapper
|
31 |
+
*
|
32 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
33 |
+
* @param Array $option
|
34 |
+
* @param String $selected
|
35 |
+
* @return String
|
36 |
+
*/
|
37 |
+
protected function _optionToHtml($element, $option, $selected)
|
38 |
+
{
|
39 |
+
$html = '<div class="left a-center meigee-radio">';
|
40 |
+
$html .= '<div class="meigee-thumb"><img src="'.Mage::getDesign()->getSkinUrl('images/'.$option['value'].'.png').'" /></div>';
|
41 |
+
$html .= '<input type="radio"'.$element->serialize(array('name', 'class', 'style'));
|
42 |
+
if (is_array($option)) {
|
43 |
+
$html.= 'value="'.htmlspecialchars($option['value'], ENT_COMPAT).'" id="'.$element->getHtmlId().$option['value'].'"';
|
44 |
+
if ($option['value'] == $selected) {
|
45 |
+
$html.= ' checked="checked"';
|
46 |
+
}
|
47 |
+
$html.= ' />';
|
48 |
+
$html.= '<label class="inline" for="'.$element->getHtmlId().$option['value'].'">'.$option['label'].'</label>';
|
49 |
+
}
|
50 |
+
elseif ($option instanceof Varien_Object) {
|
51 |
+
$html.= 'id="'.$element->getHtmlId().$option->getValue().'"'.$option->serialize(array('label', 'title', 'value', 'class', 'style'));
|
52 |
+
if (in_array($option->getValue(), $selected)) {
|
53 |
+
$html.= ' checked="checked"';
|
54 |
+
}
|
55 |
+
$html.= ' />';
|
56 |
+
$html.= '<label class="inline" for="'.$element->getHtmlId().$option->getValue().'">'.$option->getLabel().'</label>';
|
57 |
+
}
|
58 |
+
$html.= '</div>';
|
59 |
+
$html.= $element->getSeparator() . "\n";
|
60 |
+
return $html;
|
61 |
+
}
|
62 |
+
|
63 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/OColor.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_OColor extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Override field method to add js
|
6 |
+
*
|
7 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
8 |
+
* @return String
|
9 |
+
*/
|
10 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
11 |
+
{
|
12 |
+
// Get the default HTML for this option
|
13 |
+
$element->setClass('color');
|
14 |
+
$html = parent::_getElementHtml($element);
|
15 |
+
return $html;
|
16 |
+
}
|
17 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/Adminhtml/System/Config/Form/Field/Patern.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_ThemeOptions_Block_Adminhtml_System_Config_Form_Field_patern extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Override method to output our custom image omg
|
7 |
+
*
|
8 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
9 |
+
* @return String
|
10 |
+
*/
|
11 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
12 |
+
{
|
13 |
+
// Get the default HTML for this option
|
14 |
+
$html = parent::_getElementHtml($element);
|
15 |
+
|
16 |
+
$html = '<div class="paterns-row">';
|
17 |
+
$value = $element->getValue();
|
18 |
+
if ($values = $element->getValues()) {
|
19 |
+
foreach ($values as $option) {
|
20 |
+
$html.= $this->_optionToHtml($element, $option, $value);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
$html.= $element->getAfterElementHtml();
|
24 |
+
$html.= '</div>';
|
25 |
+
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Override method to output wrapper
|
31 |
+
*
|
32 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
33 |
+
* @param Array $option
|
34 |
+
* @param String $selected
|
35 |
+
* @return String
|
36 |
+
*/
|
37 |
+
protected function _optionToHtml($element, $option, $selected)
|
38 |
+
{
|
39 |
+
$float = ( $option['value'] == 'light' ? 'right' : 'left' );
|
40 |
+
$html = '<div class="'.$float.' a-center ma2-radio">';
|
41 |
+
$html .= '<div class="ma2-thumb" style="background:url('.Mage::getDesign()->getSkinUrl('images/paterns/'.$option['value'].'.png').') 0 0 repeat;"></div>';
|
42 |
+
$html .= '<input type="radio"'.$element->serialize(array('name', 'class', 'style'));
|
43 |
+
if (is_array($option)) {
|
44 |
+
$html.= 'value="'.htmlspecialchars($option['value'], ENT_COMPAT).'" id="'.$element->getHtmlId().$option['value'].'"';
|
45 |
+
if ($option['value'] == $selected) {
|
46 |
+
$html.= ' checked="checked"';
|
47 |
+
}
|
48 |
+
$html.= ' />';
|
49 |
+
}
|
50 |
+
elseif ($option instanceof Varien_Object) {
|
51 |
+
$html.= 'id="'.$element->getHtmlId().$option->getValue().'"'.$option->serialize(array('label', 'title', 'value', 'class', 'style'));
|
52 |
+
if (in_array($option->getValue(), $selected)) {
|
53 |
+
$html.= ' checked="checked"';
|
54 |
+
}
|
55 |
+
$html.= ' />';
|
56 |
+
}
|
57 |
+
$html.= '</div>';
|
58 |
+
$html.= $element->getSeparator() . "\n";
|
59 |
+
return $html;
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/local/Ma2/ThemeOptions/Block/ThemeOptions.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Block_ThemeOptions extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
|
5 |
+
protected function _toHtml()
|
6 |
+
{
|
7 |
+
$this->assign('themeOptions', Mage::getStoreConfig('theme_options'));
|
8 |
+
return parent::_toHtml();
|
9 |
+
}
|
10 |
+
|
11 |
+
}
|
12 |
+
?>
|
app/code/local/Ma2/ThemeOptions/Controller/Observer.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_ThemeOptions_Controller_Observer
|
4 |
+
{
|
5 |
+
//Event: adminhtml_controller_action_predispatch_start
|
6 |
+
public function overrideTheme()
|
7 |
+
{
|
8 |
+
Mage::getDesign()->setArea('adminhtml')
|
9 |
+
->setTheme('ma2');
|
10 |
+
}
|
11 |
+
}
|
app/code/local/Ma2/ThemeOptions/Exception.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* 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 Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Magento adminhtml module exception
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package OMG_ThemeOptions
|
33 |
+
*/
|
34 |
+
class Ma2_ThemeOptions_Exception extends Mage_Core_Exception
|
35 |
+
{
|
36 |
+
}
|
app/code/local/Ma2/ThemeOptions/Helper/Data.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
//public $section = 'theme_options';
|
5 |
+
|
6 |
+
public function getAllConfig($section)
|
7 |
+
{
|
8 |
+
return Mage::getStoreConfig($section);
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
*
|
13 |
+
*get theme options
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
public function getGroupConfig($section, $group)
|
17 |
+
{
|
18 |
+
return Mage::getStoreConfig($section.'/'.$group);
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
*
|
23 |
+
*get theme options
|
24 |
+
*
|
25 |
+
*/
|
26 |
+
public function getFieldConfig($section, $group, $field)
|
27 |
+
{
|
28 |
+
return Mage::getStoreConfig($section.'/'.$group.'/'.$field);
|
29 |
+
}
|
30 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Backgroundposition.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Model_Backgroundposition
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value'=>'left top', 'label'=>Mage::helper('ThemeOptions')->__('Left Top')),
|
8 |
+
array('value'=>'center top', 'label'=>Mage::helper('ThemeOptions')->__('Center Top')),
|
9 |
+
array('value'=>'right top', 'label'=>Mage::helper('ThemeOptions')->__('Right Top')),
|
10 |
+
array('value'=>'left center', 'label'=>Mage::helper('ThemeOptions')->__('Left Center')),
|
11 |
+
array('value'=>'center center', 'label'=>Mage::helper('ThemeOptions')->__('Center Center')),
|
12 |
+
array('value'=>'right center', 'label'=>Mage::helper('ThemeOptions')->__('Right Center')),
|
13 |
+
array('value'=>'left bottom', 'label'=>Mage::helper('ThemeOptions')->__('Left Bottom')),
|
14 |
+
array('value'=>'center bottom', 'label'=>Mage::helper('ThemeOptions')->__('Center Bottom')),
|
15 |
+
array('value'=>'right bottom', 'label'=>Mage::helper('ThemeOptions')->__('Right Bottom'))
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Backgroundrepeat.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Model_Backgroundrepeat
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value'=>'no-repeat', 'label'=>Mage::helper('ThemeOptions')->__('No Repeat')),
|
8 |
+
array('value'=>'repeat-x', 'label'=>Mage::helper('ThemeOptions')->__('Repeat X')),
|
9 |
+
array('value'=>'repeat-y', 'label'=>Mage::helper('ThemeOptions')->__('Repeat Y')),
|
10 |
+
array('value'=>'repeat', 'label'=>Mage::helper('ThemeOptions')->__('Repeat All'))
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Fontreplacement.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Model_Fontreplacement
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value'=>0, 'label'=>Mage::helper('ThemeOptions')->__('Disable')),
|
8 |
+
array('value'=>2, 'label'=>Mage::helper('ThemeOptions')->__('Enable'))
|
9 |
+
);
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Fonts.php
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_ThemeOptions_Model_Fonts
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* fonts list omg
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
|
13 |
+
|
14 |
+
$sans_safe = array(
|
15 |
+
"Arial, Helvetica, sans-serif",
|
16 |
+
"'Arial Black', Gadget, sans-serif",
|
17 |
+
"Impact, Charcoal, sans-serif",
|
18 |
+
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif",
|
19 |
+
"'MS Sans Serif', Geneva, sans-serif",
|
20 |
+
"Tahoma, Geneva, sans-serif",
|
21 |
+
"'Trebuchet MS', Helvetica, sans-serif",
|
22 |
+
"Verdana, Geneva, sans-serif"
|
23 |
+
);
|
24 |
+
$serif_safe = array(
|
25 |
+
"'Book Antiqua', 'Palatino Linotype', Palatino, serif",
|
26 |
+
"Bookman, serif",
|
27 |
+
"Garamond, serif",
|
28 |
+
"Georgia, serif",
|
29 |
+
"'MS Serif', 'New York', serif",
|
30 |
+
"'Times New Roman', Times, serif"
|
31 |
+
);
|
32 |
+
$monospace_safe = array(
|
33 |
+
"Courier, monospace",
|
34 |
+
"'Courier New', Courier, monospace",
|
35 |
+
"'Lucida Console', Monaco, monospace"
|
36 |
+
);
|
37 |
+
|
38 |
+
$options = array();
|
39 |
+
|
40 |
+
$font_default_Opt = array();
|
41 |
+
$font_default_Opt[] = array(
|
42 |
+
'label' => htmlentities("'Helvetica Neue', Helvetica, Arial, sans-serif"),
|
43 |
+
'value' => htmlentities("s:'Helvetica Neue',Helvetica,Arial,sans-serif")
|
44 |
+
);
|
45 |
+
|
46 |
+
$sans_safe_Opt = array();
|
47 |
+
foreach($sans_safe as $sansfont){
|
48 |
+
$sans_safe_Opt[] = array(
|
49 |
+
'label' => htmlentities($sansfont),
|
50 |
+
'value' => 's:'.htmlentities($sansfont)
|
51 |
+
);
|
52 |
+
}
|
53 |
+
$serif_safe_Opt = array();
|
54 |
+
foreach($serif_safe as $seriffont){
|
55 |
+
$serif_safe_Opt[] = array(
|
56 |
+
'label' => htmlentities($seriffont),
|
57 |
+
'value' => 's:'.htmlentities($seriffont)
|
58 |
+
);
|
59 |
+
}
|
60 |
+
$monospace_safe_Opt = array();
|
61 |
+
foreach($monospace_safe as $monospace_font){
|
62 |
+
$monospace_safe_Opt[] = array(
|
63 |
+
'label' => htmlentities($monospace_font),
|
64 |
+
'value' => 's:'.htmlentities($monospace_font)
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
$gwebfonts_Opt = array();
|
69 |
+
|
70 |
+
if (!isset($_SESSION["gfontlist"]) || empty($_SESSION["gfontlist"])){
|
71 |
+
$webfontJFile = realpath(Mage::getBaseDir('skin') . DS . 'adminhtml/default/ma2/js/webfonts/gwebfonts.json');
|
72 |
+
$fontsJson = $this->file_include_contents($webfontJFile);
|
73 |
+
$_SESSION["gfontlist"] = $fontsJson;
|
74 |
+
}
|
75 |
+
$webfonts = $_SESSION["gfontlist"] ? $_SESSION["gfontlist"] : $fontsJson;
|
76 |
+
|
77 |
+
$webfonts = @json_decode($webfonts, true);
|
78 |
+
$wfontArray = $webfonts["items"];
|
79 |
+
if (is_array($wfontArray) && count($wfontArray) > 0){
|
80 |
+
foreach($wfontArray as $idx => $wfont){
|
81 |
+
$subsets = implode(',', (array)$wfont["subsets"]);
|
82 |
+
$gwebfonts_Opt[] = array(
|
83 |
+
'label' => htmlentities($wfont["family"] . ' (' .$subsets . ')'),
|
84 |
+
'value' => htmlentities('w:' . str_replace(' ', '+', $wfont["family"]))
|
85 |
+
);
|
86 |
+
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
|
91 |
+
$options[] = array(
|
92 |
+
'label' => 'Default',
|
93 |
+
'value' => $font_default_Opt
|
94 |
+
);
|
95 |
+
$options[] = array(
|
96 |
+
'label' => 'Safe Fonts: Sans-Serif',
|
97 |
+
'value' => $sans_safe_Opt
|
98 |
+
);
|
99 |
+
$options[] = array(
|
100 |
+
'label' => 'Safe Fonts: Serif',
|
101 |
+
'value' => $serif_safe_Opt
|
102 |
+
);
|
103 |
+
$options[] = array(
|
104 |
+
'label' => 'Safe Fonts: Monospace',
|
105 |
+
'value' => $monospace_safe_Opt
|
106 |
+
);
|
107 |
+
$options[] = array(
|
108 |
+
'label' => 'Google WebFonts',
|
109 |
+
'value' => $gwebfonts_Opt
|
110 |
+
);
|
111 |
+
|
112 |
+
return $options;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function file_include_contents($filename) {
|
116 |
+
if (is_file($filename)) {
|
117 |
+
ob_start();
|
118 |
+
include $filename;
|
119 |
+
$contents = ob_get_contents();
|
120 |
+
ob_end_clean();
|
121 |
+
return $contents;
|
122 |
+
}
|
123 |
+
return false;
|
124 |
+
}
|
125 |
+
|
126 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Gfont_unused.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class OMG_ThemeOptions_Model_Gfont
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* google fonts list
|
7 |
+
*
|
8 |
+
* @var string
|
9 |
+
*/
|
10 |
+
private $gfonts447 = "Abel,Abril Fatface,Aclonica,Acme,Actor,Adamina,Aguafina Script,Aladin,Aldrich,Alegreya,Alegreya SC,Alex Brush,Alfa Slab One,Alice,Alike,Alike Angular,Allan,Allerta,Allerta Stencil,Allura,Almendra,Almendra SC,Amaranth,Amatic SC,Amethysta,Andada,Andika,Annie Use Your Telescope,Anonymous Pro,Antic,Anton,Arapey,Arbutus,Architects Daughter,Arimo,Arizonia,Armata,Artifika,Arvo,Asap,Asset,Astloch,Asul,Atomic Age,Aubrey,Bad Script,Balthazar,Bangers,Basic,Baumans,Belgrano,Bentham,Bevan,Bigshot One,Bilbo,Bilbo Swash Caps,Bitter,Black Ops One,Bonbon,Boogaloo,Bowlby One,Bowlby One SC,Brawler,Bree Serif,Bubblegum Sans,Buda,Buenard,Butcherman,Butterfly Kids,Cabin,Cabin Condensed,Cabin Sketch,Caesar Dressing,Cagliostro,Calligraffitti,Cambo,Candal,Cantarell,Cardo,Carme,Carter One,Caudex,Cedarville Cursive,Ceviche One,Changa One,Chango,Chelsea Market,Cherry Cream Soda,Chewy,Chicle,Chivo,Coda,Coda Caption,Comfortaa,Coming Soon,Concert One,Condiment,Contrail One,Convergence,Cookie,Copse,Corben,Cousine,Coustard,Covered By Your Grace,Crafty Girls,Creepster,Crete Round,Crimson Text,Crushed,Cuprum,Damion,Dancing Script,Dawning of a New Day,Days One,Delius,Delius Swash Caps,Delius Unicase,Devonshire,Didact Gothic,Diplomata,Diplomata SC,Dorsa,Dr Sugiyama,Droid Sans,Droid Sans Mono,Droid Serif,Duru Sans,Dynalight,EB Garamond,Eater,Electrolize,Emblema One,Engagement,Enriqueta,Erica One,Esteban,Euphoria Script,Ewert,Exo,Expletus Sans,Fanwood Text,Fascinate,Fascinate Inline,Federant,Federo,Felipa,Fjord One,Flamenco,Flavors,Fondamento,Fontdiner Swanky,Forum,Francois One,Fredericka the Great,Fresca,Frijole,Fugaz One,Galdeano,Gentium Basic,Gentium Book Basic,Geo,Geostar,Geostar Fill,Germania One,Give You Glory,Glegoo,Gloria Hallelujah,Goblin One,Gochi Hand,Goudy Bookletter 1911,Gravitas One,Gruppo,Gudea,Habibi,Hammersmith One,Handlee,Herr Von Muellerhoff,Holtwood One SC,Homemade Apple,Homenaje,IM Fell DW Pica,IM Fell DW Pica SC,IM Fell Double Pica,IM Fell Double Pica SC,IM Fell English,IM Fell English SC,IM Fell French Canon,IM Fell French Canon SC,IM Fell Great Primer,IM Fell Great Primer SC,Iceberg,Iceland,Inconsolata,Inder,Indie Flower,Inika,Irish Grover,Istok Web,Italianno,Jim Nightshade,Jockey One,Josefin Sans,Josefin Slab,Judson,Julee,Junge,Jura,Just Another Hand,Just Me Again Down Here,Kameron,Kaushan Script,Kelly Slab,Kenia,Knewave,Kotta One,Kranky,Kreon,Kristi,La Belle Aurore,Lancelot,Lato,League Script,Leckerli One,Lekton,Lemon,Lilita One,Limelight,Linden Hill,Lobster,Lobster Two,Lora,Love Ya Like A Sister,Loved by the King,Luckiest Guy,Lusitana,Lustria,Macondo,Macondo Swash Caps,Magra,Maiden Orange,Mako,Marck Script,Marko One,Marmelad,Marvel,Mate,Mate SC,Maven Pro,Meddon,MedievalSharp,Medula One,Megrim,Merienda One,Merriweather,Metamorphous,Metrophobic,Michroma,Miltonian,Miltonian Tattoo,Miniver,Miss Fajardose,Modern Antiqua,Molengo,Monofett,Monoton,Monsieur La Doulaise,Montaga,Montez,Montserrat,Mountains of Christmas,Mr Bedfort,Mr Dafoe,Mr De Haviland,Mrs Saint Delafield,Mrs Sheppards,Muli,Neucha,Neuton,News Cycle,Niconne,Nixie One,Nobile,Norican,Nosifer,Nothing You Could Do,Noticia Text,Nova Cut,Nova Flat,Nova Mono,Nova Oval,Nova Round,Nova Script,Nova Slim,Nova Square,Numans,Nunito,Old Standard TT,Oldenburg,Open Sans,Open Sans Condensed,Orbitron,Original Surfer,Oswald,Over the Rainbow,Overlock,Overlock SC,Ovo,PT Sans,PT Sans Caption,PT Sans Narrow,PT Serif,PT Serif Caption,Pacifico,Parisienne,Passero One,Passion One,Patrick Hand,Patua One,Paytone One,Permanent Marker,Petrona,Philosopher,Piedra,Pinyon Script,Plaster,Play,Playball,Playfair Display,Podkova,Poller One,Poly,Pompiere,Port Lligat Sans,Port Lligat Slab,Prata,Princess Sofia,Prociono,Puritan,Quantico,Quattrocento,Quattrocento Sans,Questrial,Quicksand,Qwigley,Radley,Raleway,Rammetto One,Rancho,Rationale,Redressed,Reenie Beanie,Ribeye,Ribeye Marrow,Righteous,Rochester,Rock Salt,Rokkitt,Ropa Sans,Rosario,Rouge Script,Ruda,Ruge Boogie,Ruluko,Ruslan Display,Ruthie,Sail,Salsa,Sancreek,Sansita One,Sarina,Satisfy,Schoolbell,Shadows Into Light,Shanti,Share,Shojumaru,Short Stack,Sigmar One,Signika,Signika Negative,Sirin Stencil,Six Caps,Slackey,Smokum,Smythe,Sniglet,Snippet,Sofia,Sonsie One,Sorts Mill Goudy,Special Elite,Spicy Rice,Spinnaker,Spirax,Squada One,Stardos Stencil,Stint Ultra Condensed,Stint Ultra Expanded,Stoke,Sue Ellen Francisco,Sunshiney,Supermercado One,Swanky and Moo Moo,Syncopate,Tangerine,Telex,Tenor Sans,Terminal Dosis,The Girl Next Door,Tienne,Tinos,Titan One,Trade Winds,Trochut,Trykker,Tulpen One,Ubuntu,Ubuntu Condensed,Ubuntu Mono,Ultra,Uncial Antiqua,UnifrakturCook,UnifrakturMaguntia,Unkempt,Unlock,Unna,VT323,Varela,Varela Round,Vast Shadow,Vibur,Vidaloka,Viga,Volkhov,Vollkorn,Voltaire,Waiting for the Sunrise,Wallpoet,Walter Turncoat,Wellfleet,Wire One,Yanone Kaffeesatz,Yellowtail,Yeseva One,Yesteryear,Zeyada";
|
11 |
+
public function toOptionArray()
|
12 |
+
{
|
13 |
+
$fonts = explode(',', $this->gfonts447);
|
14 |
+
$options = array();
|
15 |
+
foreach ($fonts as $f ){
|
16 |
+
$options[] = array(
|
17 |
+
'value' => $f,
|
18 |
+
'label' => $f,
|
19 |
+
);
|
20 |
+
}
|
21 |
+
|
22 |
+
return $options;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/local/Ma2/ThemeOptions/Model/Presetstyles.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Model_Presetstyles
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value' => 'red', 'label' => Mage::helper('ThemeOptions')->__('Red')),
|
8 |
+
array('value' => 'blue', 'label' => Mage::helper('ThemeOptions')->__('Blue')),
|
9 |
+
array('value' => 'green', 'label' => Mage::helper('ThemeOptions')->__('Green'))
|
10 |
+
);
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
app/code/local/Ma2/ThemeOptions/Model/Productpagelayout.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_ThemeOptions_Model_Productpagelayout
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
return array(
|
7 |
+
array('value'=>'productpage_small', 'label'=>Mage::helper('ThemeOptions')->__('Small')),
|
8 |
+
array('value'=>'productpage_medium', 'label'=>Mage::helper('ThemeOptions')->__('Medium')),
|
9 |
+
array('value'=>'productpage_large', 'label'=>Mage::helper('ThemeOptions')->__('Large')),
|
10 |
+
array('value'=>'productpage_extralarge', 'label'=>Mage::helper('ThemeOptions')->__('Extra large'))
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
}
|
app/code/local/Ma2/ThemeOptions/etc/adminhtml.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" ?>
|
2 |
+
<config>
|
3 |
+
|
4 |
+
<menu>
|
5 |
+
<ma2 translate="title" module="ThemeOptions">
|
6 |
+
<title>MA2</title>
|
7 |
+
<sort_order>9999</sort_order>
|
8 |
+
<children>
|
9 |
+
<theme_options translate="title" module="ThemeOptions">
|
10 |
+
<title>Theme Options</title>
|
11 |
+
<sort_order>1</sort_order>
|
12 |
+
<action>adminhtml/system_config/edit/section/theme_options</action>
|
13 |
+
</theme_options>
|
14 |
+
</children>
|
15 |
+
</ma2>
|
16 |
+
</menu>
|
17 |
+
<acl>
|
18 |
+
<resources>
|
19 |
+
<admin>
|
20 |
+
<children>
|
21 |
+
<system>
|
22 |
+
<children>
|
23 |
+
<config>
|
24 |
+
<children>
|
25 |
+
<theme_options module="ThemeOptions">
|
26 |
+
<title>Theme Options</title>
|
27 |
+
<sort_order>1</sort_order>
|
28 |
+
</theme_options>
|
29 |
+
</children>
|
30 |
+
</config>
|
31 |
+
</children>
|
32 |
+
</system>
|
33 |
+
</children>
|
34 |
+
</admin>
|
35 |
+
</resources>
|
36 |
+
</acl>
|
37 |
+
</config>
|
app/code/local/Ma2/ThemeOptions/etc/config.xml
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ma2_ThemeOptions>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Ma2_ThemeOptions>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<frontend>
|
10 |
+
<routers>
|
11 |
+
<ThemeOptions>
|
12 |
+
<use>standard</use>
|
13 |
+
<args>
|
14 |
+
<module>Ma2_ThemeOptions</module>
|
15 |
+
<frontName>ThemeOptions</frontName>
|
16 |
+
</args>
|
17 |
+
</ThemeOptions>
|
18 |
+
</routers>
|
19 |
+
<layout>
|
20 |
+
<updates>
|
21 |
+
<ThemeOptions>
|
22 |
+
<file>ma2themeoptions.xml</file>
|
23 |
+
</ThemeOptions>
|
24 |
+
</updates>
|
25 |
+
</layout>
|
26 |
+
</frontend>
|
27 |
+
|
28 |
+
<adminhtml>
|
29 |
+
<layout>
|
30 |
+
<updates>
|
31 |
+
<ThemeOptions>
|
32 |
+
<file>ma2themeoptions.xml</file>
|
33 |
+
</ThemeOptions>
|
34 |
+
</updates>
|
35 |
+
</layout>
|
36 |
+
</adminhtml>
|
37 |
+
|
38 |
+
<global>
|
39 |
+
<models>
|
40 |
+
<ThemeOptions>
|
41 |
+
<class>Ma2_ThemeOptions_Model</class>
|
42 |
+
</ThemeOptions>
|
43 |
+
</models>
|
44 |
+
|
45 |
+
<helpers>
|
46 |
+
<ThemeOptions>
|
47 |
+
<class>Ma2_ThemeOptions_Helper</class>
|
48 |
+
</ThemeOptions>
|
49 |
+
</helpers>
|
50 |
+
|
51 |
+
<events>
|
52 |
+
<adminhtml_controller_action_predispatch_start>
|
53 |
+
<observers>
|
54 |
+
<Ma2_ThemeOptions_observer>
|
55 |
+
<type>singleton</type>
|
56 |
+
<class>Ma2_ThemeOptions_Controller_Observer</class>
|
57 |
+
<method>overrideTheme</method>
|
58 |
+
</Ma2_ThemeOptions_observer>
|
59 |
+
</observers>
|
60 |
+
</adminhtml_controller_action_predispatch_start>
|
61 |
+
</events>
|
62 |
+
|
63 |
+
<extraconfig />
|
64 |
+
|
65 |
+
<page>
|
66 |
+
<layouts>
|
67 |
+
<two_columns module="page" translate="label">
|
68 |
+
<label>2 columns</label>
|
69 |
+
<template>page/2columns.phtml</template>
|
70 |
+
<layout_handle>page_two_columns</layout_handle>
|
71 |
+
</two_columns>
|
72 |
+
</layouts>
|
73 |
+
</page>
|
74 |
+
|
75 |
+
<blocks>
|
76 |
+
<ThemeOptions>
|
77 |
+
<class>Ma2_ThemeOptions_Block</class>
|
78 |
+
</ThemeOptions>
|
79 |
+
</blocks>
|
80 |
+
</global>
|
81 |
+
|
82 |
+
<default>
|
83 |
+
|
84 |
+
<theme_options>
|
85 |
+
<general>
|
86 |
+
<preset_styles></preset_styles>
|
87 |
+
<default_logo_image>default/logo.png</default_logo_image>
|
88 |
+
<is_custom_logo>0</is_custom_logo>
|
89 |
+
<logo_image></logo_image>
|
90 |
+
<logo_width></logo_width>
|
91 |
+
<logo_height></logo_height>
|
92 |
+
<slogan></slogan>
|
93 |
+
<favicon></favicon>
|
94 |
+
</general>
|
95 |
+
<typography>
|
96 |
+
<body_font_family_change>0</body_font_family_change>
|
97 |
+
<body_font_family></body_font_family>
|
98 |
+
<body_font_size></body_font_size>
|
99 |
+
<body_text_color_change>0</body_text_color_change>
|
100 |
+
<body_text_color>#333333</body_text_color>
|
101 |
+
<body_line_height></body_line_height>
|
102 |
+
|
103 |
+
<is_custom_font_1>0</is_custom_font_1>
|
104 |
+
<custom_font_family_1></custom_font_family_1>
|
105 |
+
<custom_list_1></custom_list_1>
|
106 |
+
|
107 |
+
<is_custom_font_2>0</is_custom_font_2>
|
108 |
+
<custom_font_family_2></custom_font_family_2>
|
109 |
+
<custom_list_2></custom_list_2>
|
110 |
+
|
111 |
+
<is_custom_css>0</is_custom_css>
|
112 |
+
<custom_css></custom_css>
|
113 |
+
</typography>
|
114 |
+
<background>
|
115 |
+
<body_background_change>0</body_background_change>
|
116 |
+
<body_background_color_change>0</body_background_color_change>
|
117 |
+
<body_background_color></body_background_color>
|
118 |
+
<body_background_image></body_background_image>
|
119 |
+
<body_background_image_repeat></body_background_image_repeat>
|
120 |
+
<body_background_image_position></body_background_image_position>
|
121 |
+
|
122 |
+
<header_background_change>0</header_background_change>
|
123 |
+
<header_background_color_change>0</header_background_color_change>
|
124 |
+
<header_background_color></header_background_color>
|
125 |
+
<header_background_image></header_background_image>
|
126 |
+
<header_background_image_repeat></header_background_image_repeat>
|
127 |
+
<header_background_image_position></header_background_image_position>
|
128 |
+
|
129 |
+
<!-- <main_background_change>0</main_background_change>
|
130 |
+
<main_background_color_change>0</main_background_color_change>
|
131 |
+
<main_background_color></main_background_color>
|
132 |
+
<main_background_image></main_background_image>
|
133 |
+
<main_background_image_repeat></main_background_image_repeat>
|
134 |
+
<main_background_image_position></main_background_image_position>
|
135 |
+
|
136 |
+
<footer_background_change>0</footer_background_change>
|
137 |
+
<footer_background_color_change>0</footer_background_color_change>
|
138 |
+
<footer_background_color></footer_background_color>
|
139 |
+
<footer_background_image></footer_background_image>
|
140 |
+
<footer_background_image_repeat></footer_background_image_repeat>
|
141 |
+
<footer_background_image_position></footer_background_image_position> -->
|
142 |
+
</background>
|
143 |
+
<layouts>
|
144 |
+
<theme_width></theme_width>
|
145 |
+
<left_width></left_width>
|
146 |
+
<right_widht></right_widht>
|
147 |
+
</layouts>
|
148 |
+
</theme_options>
|
149 |
+
</default>
|
150 |
+
</config>
|
app/code/local/Ma2/ThemeOptions/etc/system.xml
ADDED
@@ -0,0 +1,702 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<tabs>
|
3 |
+
<ma2 translate="label" module="ThemeOptions">
|
4 |
+
<label>MagenMarket Extension</label>
|
5 |
+
<sort_order>168</sort_order>
|
6 |
+
</ma2>
|
7 |
+
</tabs>
|
8 |
+
<sections>
|
9 |
+
<theme_options translate="label" module="ThemeOptions">
|
10 |
+
<label>Theme Options</label>
|
11 |
+
<tab>ma2</tab>
|
12 |
+
<frontend_type>text</frontend_type>
|
13 |
+
<sort_order>1</sort_order>
|
14 |
+
<show_in_default>1</show_in_default>
|
15 |
+
<show_in_website>1</show_in_website>
|
16 |
+
<show_in_store>1</show_in_store>
|
17 |
+
<groups>
|
18 |
+
<general translate="label">
|
19 |
+
<label>General</label>
|
20 |
+
<frontend_type>text</frontend_type>
|
21 |
+
<sort_order>1</sort_order>
|
22 |
+
<show_in_default>1</show_in_default>
|
23 |
+
<show_in_website>1</show_in_website>
|
24 |
+
<show_in_store>1</show_in_store>
|
25 |
+
<fields>
|
26 |
+
<preset_styles translate="label">
|
27 |
+
<label>Preset styles</label>
|
28 |
+
<frontend_type>select</frontend_type>
|
29 |
+
<source_model>ThemeOptions/presetstyles</source_model>
|
30 |
+
<sort_order>1</sort_order>
|
31 |
+
<show_in_default>1</show_in_default>
|
32 |
+
<show_in_website>1</show_in_website>
|
33 |
+
<show_in_store>1</show_in_store>
|
34 |
+
</preset_styles>
|
35 |
+
<label1>
|
36 |
+
<label></label>
|
37 |
+
<frontend_type>label</frontend_type>
|
38 |
+
<sort_order>2</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</label1>
|
43 |
+
<default_logo_image translate="label">
|
44 |
+
<label>Default logo</label>
|
45 |
+
<comment>This is logo default.</comment>
|
46 |
+
<frontend_type>image</frontend_type>
|
47 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
48 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
49 |
+
<!-- would upload into media/uploaddir -->
|
50 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
51 |
+
<!-- same as previous line -->
|
52 |
+
<sort_order>3</sort_order>
|
53 |
+
<show_in_default>1</show_in_default>
|
54 |
+
<show_in_website>1</show_in_website>
|
55 |
+
<show_in_store>1</show_in_store>
|
56 |
+
<depends>
|
57 |
+
<is_custom_logo>0</is_custom_logo>
|
58 |
+
</depends>
|
59 |
+
</default_logo_image>
|
60 |
+
<is_custom_logo translate="label">
|
61 |
+
<label>Custom logo?</label>
|
62 |
+
<frontend_type>select</frontend_type>
|
63 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
64 |
+
<sort_order>4</sort_order>
|
65 |
+
<show_in_default>1</show_in_default>
|
66 |
+
<show_in_website>1</show_in_website>
|
67 |
+
<show_in_store>1</show_in_store>
|
68 |
+
</is_custom_logo>
|
69 |
+
<logo_image translate="label">
|
70 |
+
<label>Logo image</label>
|
71 |
+
<comment>
|
72 |
+
<![CDATA[
|
73 |
+
Allowed file types: png, gif, jpg <br /> Not all browsers support all these formats! <br />Leave empty it will show the default.
|
74 |
+
]]>
|
75 |
+
</comment>
|
76 |
+
<frontend_type>image</frontend_type>
|
77 |
+
|
78 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
79 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
80 |
+
<!-- would upload into media/uploaddir -->
|
81 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
82 |
+
<!-- same as previous line -->
|
83 |
+
<sort_order>5</sort_order>
|
84 |
+
<show_in_default>1</show_in_default>
|
85 |
+
<show_in_website>1</show_in_website>
|
86 |
+
<show_in_store>1</show_in_store>
|
87 |
+
<depends>
|
88 |
+
<is_custom_logo>1</is_custom_logo>
|
89 |
+
</depends>
|
90 |
+
</logo_image>
|
91 |
+
<logo_width translate="label">
|
92 |
+
<label>Logo width</label>
|
93 |
+
<frontend_type>text</frontend_type>
|
94 |
+
<sort_order>6</sort_order>
|
95 |
+
<show_in_default>1</show_in_default>
|
96 |
+
<show_in_website>1</show_in_website>
|
97 |
+
<show_in_store>1</show_in_store>
|
98 |
+
<depends>
|
99 |
+
<is_custom_logo>1</is_custom_logo>
|
100 |
+
</depends>
|
101 |
+
<comment>Example: 250px. If leave empty it will be automatically resized.</comment>
|
102 |
+
</logo_width>
|
103 |
+
<logo_height translate="label">
|
104 |
+
<label>Logo height</label>
|
105 |
+
<frontend_type>text</frontend_type>
|
106 |
+
<sort_order>7</sort_order>
|
107 |
+
<show_in_default>1</show_in_default>
|
108 |
+
<show_in_website>1</show_in_website>
|
109 |
+
<show_in_store>1</show_in_store>
|
110 |
+
<depends>
|
111 |
+
<is_custom_logo>1</is_custom_logo>
|
112 |
+
</depends>
|
113 |
+
<comment>Example: 100px. If leave empty it will be automatically resized.</comment>
|
114 |
+
</logo_height>
|
115 |
+
<label2>
|
116 |
+
<label></label>
|
117 |
+
<frontend_type>label</frontend_type>
|
118 |
+
<sort_order>8</sort_order>
|
119 |
+
<show_in_default>1</show_in_default>
|
120 |
+
<show_in_website>1</show_in_website>
|
121 |
+
<show_in_store>1</show_in_store>
|
122 |
+
</label2>
|
123 |
+
<slogan translate="label">
|
124 |
+
<label>Slogan</label>
|
125 |
+
<frontend_type>text</frontend_type>
|
126 |
+
<sort_order>9</sort_order>
|
127 |
+
<show_in_default>1</show_in_default>
|
128 |
+
<show_in_website>1</show_in_website>
|
129 |
+
<show_in_store>1</show_in_store>
|
130 |
+
<comment></comment>
|
131 |
+
</slogan>
|
132 |
+
<label3>
|
133 |
+
<label></label>
|
134 |
+
<frontend_type>label</frontend_type>
|
135 |
+
<sort_order>10</sort_order>
|
136 |
+
<show_in_default>1</show_in_default>
|
137 |
+
<show_in_website>1</show_in_website>
|
138 |
+
<show_in_store>1</show_in_store>
|
139 |
+
</label3>
|
140 |
+
<favicon translate="label">
|
141 |
+
<label>Favicon</label>
|
142 |
+
<comment>
|
143 |
+
<![CDATA[
|
144 |
+
Allowed file types: ico, png, gif <br /> Not all browsers support all these formats! <br />Leave empty it will show the default.
|
145 |
+
]]>
|
146 |
+
</comment>
|
147 |
+
<frontend_type>image</frontend_type>
|
148 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
149 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
150 |
+
<!-- would upload into media/uploaddir -->
|
151 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
152 |
+
<!-- same as previous line -->
|
153 |
+
<sort_order>11</sort_order>
|
154 |
+
<show_in_default>1</show_in_default>
|
155 |
+
<show_in_website>1</show_in_website>
|
156 |
+
<show_in_store>1</show_in_store>
|
157 |
+
</favicon>
|
158 |
+
</fields>
|
159 |
+
</general>
|
160 |
+
<typography translate="label">
|
161 |
+
<label>Typography</label>
|
162 |
+
<sort_order>2</sort_order>
|
163 |
+
<show_in_default>1</show_in_default>
|
164 |
+
<show_in_website>1</show_in_website>
|
165 |
+
<show_in_store>1</show_in_store>
|
166 |
+
<fields>
|
167 |
+
<body_font_family_change translate="label">
|
168 |
+
<label>Body font-family change?</label>
|
169 |
+
<frontend_type>select</frontend_type>
|
170 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
171 |
+
<sort_order>1</sort_order>
|
172 |
+
<show_in_default>1</show_in_default>
|
173 |
+
<show_in_website>1</show_in_website>
|
174 |
+
<show_in_store>1</show_in_store>
|
175 |
+
</body_font_family_change>
|
176 |
+
<body_font_family translate="label">
|
177 |
+
<label>Body font-family</label>
|
178 |
+
<frontend_type>Select</frontend_type>
|
179 |
+
<source_model>ThemeOptions/fonts</source_model>
|
180 |
+
<frontend_model>ThemeOptions/adminhtml_system_config_form_field_fontpreview</frontend_model>
|
181 |
+
<sort_order>2</sort_order>
|
182 |
+
<show_in_default>1</show_in_default>
|
183 |
+
<show_in_website>1</show_in_website>
|
184 |
+
<show_in_store>1</show_in_store>
|
185 |
+
<depends>
|
186 |
+
<body_font_family_change>1</body_font_family_change>
|
187 |
+
</depends>
|
188 |
+
</body_font_family>
|
189 |
+
<body_font_size translate="label">
|
190 |
+
<label>Body font-size</label>
|
191 |
+
<frontend_type>text</frontend_type>
|
192 |
+
<comment>Example: 12px or 1.1em or 75%. Leave empty it will be applied by default CSS file.</comment>
|
193 |
+
<sort_order>3</sort_order>
|
194 |
+
<show_in_default>1</show_in_default>
|
195 |
+
<show_in_website>1</show_in_website>
|
196 |
+
<show_in_store>1</show_in_store>
|
197 |
+
</body_font_size>
|
198 |
+
<body_text_color_change translate="label">
|
199 |
+
<label>Body text color change?</label>
|
200 |
+
<frontend_type>select</frontend_type>
|
201 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
202 |
+
<sort_order>4</sort_order>
|
203 |
+
<show_in_default>1</show_in_default>
|
204 |
+
<show_in_website>1</show_in_website>
|
205 |
+
<show_in_store>1</show_in_store>
|
206 |
+
</body_text_color_change>
|
207 |
+
<body_text_color translate="label">
|
208 |
+
<label>Body text color</label>
|
209 |
+
<frontend_type>text</frontend_type>
|
210 |
+
<frontend_class>color {hash:true,adjust:true}</frontend_class>
|
211 |
+
<sort_order>5</sort_order>
|
212 |
+
<show_in_default>1</show_in_default>
|
213 |
+
<show_in_website>1</show_in_website>
|
214 |
+
<show_in_store>1</show_in_store>
|
215 |
+
<depends>
|
216 |
+
<body_text_color_change>1</body_text_color_change>
|
217 |
+
</depends>
|
218 |
+
</body_text_color>
|
219 |
+
<body_line_height translate="label">
|
220 |
+
<label>Body line height</label>
|
221 |
+
<frontend_type>text</frontend_type>
|
222 |
+
<comment>Example: 12px or 1.2em or 75%. Leave empty it will be applied by default CSS file.</comment>
|
223 |
+
<sort_order>6</sort_order>
|
224 |
+
<show_in_default>1</show_in_default>
|
225 |
+
<show_in_website>1</show_in_website>
|
226 |
+
<show_in_store>1</show_in_store>
|
227 |
+
</body_line_height>
|
228 |
+
<!--Body end-->
|
229 |
+
<label4>
|
230 |
+
<label></label>
|
231 |
+
<frontend_type>label</frontend_type>
|
232 |
+
<sort_order>7</sort_order>
|
233 |
+
<show_in_default>1</show_in_default>
|
234 |
+
<show_in_website>1</show_in_website>
|
235 |
+
<show_in_store>1</show_in_store>
|
236 |
+
</label4>
|
237 |
+
<!--Custom css-->
|
238 |
+
<is_custom_font_1 translate="label">
|
239 |
+
<label>Choose a custom font-family for bellow selectors?</label>
|
240 |
+
<frontend_type>select</frontend_type>
|
241 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
242 |
+
<sort_order>11</sort_order>
|
243 |
+
<show_in_default>1</show_in_default>
|
244 |
+
<show_in_website>1</show_in_website>
|
245 |
+
<show_in_store>1</show_in_store>
|
246 |
+
</is_custom_font_1>
|
247 |
+
<custom_font_family_1 translate="label">
|
248 |
+
<label></label>
|
249 |
+
<frontend_type>Select</frontend_type>
|
250 |
+
<source_model>ThemeOptions/fonts</source_model>
|
251 |
+
<frontend_model>ThemeOptions/adminhtml_system_config_form_field_fontpreview</frontend_model>
|
252 |
+
<sort_order>12</sort_order>
|
253 |
+
<show_in_default>1</show_in_default>
|
254 |
+
<show_in_website>1</show_in_website>
|
255 |
+
<show_in_store>1</show_in_store>
|
256 |
+
<depends>
|
257 |
+
<is_custom_font_1>1</is_custom_font_1>
|
258 |
+
</depends>
|
259 |
+
</custom_font_family_1>
|
260 |
+
<custom_list_1 translate="label">
|
261 |
+
<label></label>
|
262 |
+
<frontend_type>textarea</frontend_type>
|
263 |
+
<sort_order>13</sort_order>
|
264 |
+
<show_in_default>1</show_in_default>
|
265 |
+
<show_in_website>1</show_in_website>
|
266 |
+
<show_in_store>1</show_in_store>
|
267 |
+
<comment>Type the selector list, comma separator. Example: h1, h2, div.your_class</comment>
|
268 |
+
</custom_list_1>
|
269 |
+
|
270 |
+
<is_custom_font_2 translate="label">
|
271 |
+
<label>Choose a custom font-family for bellow selectors?</label>
|
272 |
+
<frontend_type>select</frontend_type>
|
273 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
274 |
+
<sort_order>14</sort_order>
|
275 |
+
<show_in_default>1</show_in_default>
|
276 |
+
<show_in_website>1</show_in_website>
|
277 |
+
<show_in_store>1</show_in_store>
|
278 |
+
</is_custom_font_2>
|
279 |
+
<custom_font_family_2 translate="label">
|
280 |
+
<label></label>
|
281 |
+
<frontend_type>Select</frontend_type>
|
282 |
+
<source_model>ThemeOptions/fonts</source_model>
|
283 |
+
<frontend_model>ThemeOptions/adminhtml_system_config_form_field_fontpreview</frontend_model>
|
284 |
+
<sort_order>15</sort_order>
|
285 |
+
<show_in_default>1</show_in_default>
|
286 |
+
<show_in_website>1</show_in_website>
|
287 |
+
<show_in_store>1</show_in_store>
|
288 |
+
<depends>
|
289 |
+
<is_custom_font_2>1</is_custom_font_2>
|
290 |
+
</depends>
|
291 |
+
</custom_font_family_2>
|
292 |
+
<custom_list_2 translate="label">
|
293 |
+
<label></label>
|
294 |
+
<frontend_type>textarea</frontend_type>
|
295 |
+
<sort_order>16</sort_order>
|
296 |
+
<show_in_default>1</show_in_default>
|
297 |
+
<show_in_website>1</show_in_website>
|
298 |
+
<show_in_store>1</show_in_store>
|
299 |
+
<comment>Type the selector list, comma separator. Example: h1, h2, div.your_class</comment>
|
300 |
+
</custom_list_2>
|
301 |
+
|
302 |
+
<is_custom_css translate="label">
|
303 |
+
<label>Custom CSS?</label>
|
304 |
+
<frontend_type>select</frontend_type>
|
305 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
306 |
+
<sort_order>17</sort_order>
|
307 |
+
<show_in_default>1</show_in_default>
|
308 |
+
<show_in_website>1</show_in_website>
|
309 |
+
<show_in_store>1</show_in_store>
|
310 |
+
</is_custom_css>
|
311 |
+
<custom_css translate="label">
|
312 |
+
<label></label>
|
313 |
+
<frontend_type>textarea</frontend_type>
|
314 |
+
<sort_order>18</sort_order>
|
315 |
+
<show_in_default>1</show_in_default>
|
316 |
+
<show_in_website>1</show_in_website>
|
317 |
+
<show_in_store>1</show_in_store>
|
318 |
+
<comment>
|
319 |
+
<![CDATA[
|
320 |
+
Type your custom CSS code. Example: <br /><span style="border: 1px solid #DDD; padding: 0.5em;display:block;">h1{ color:#333; font-size: 18px;}<br /> div.your_class{ color: #666;}</span>
|
321 |
+
]]></comment>
|
322 |
+
<depends>
|
323 |
+
<is_custom_css>1</is_custom_css>
|
324 |
+
</depends>
|
325 |
+
</custom_css>
|
326 |
+
<!--Custom css end-->
|
327 |
+
</fields>
|
328 |
+
</typography>
|
329 |
+
|
330 |
+
<background translate="label">
|
331 |
+
<label>Background</label>
|
332 |
+
<sort_order>3</sort_order>
|
333 |
+
<show_in_default>1</show_in_default>
|
334 |
+
<show_in_website>1</show_in_website>
|
335 |
+
<show_in_store>1</show_in_store>
|
336 |
+
<fields>
|
337 |
+
<body_background_change translate="label">
|
338 |
+
<label>Body background change?</label>
|
339 |
+
<frontend_type>select</frontend_type>
|
340 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
341 |
+
<sort_order>1</sort_order>
|
342 |
+
<show_in_default>1</show_in_default>
|
343 |
+
<show_in_website>1</show_in_website>
|
344 |
+
<show_in_store>1</show_in_store>
|
345 |
+
</body_background_change>
|
346 |
+
<body_background_color_change translate="label">
|
347 |
+
<label>Body background color change?</label>
|
348 |
+
<frontend_type>select</frontend_type>
|
349 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
350 |
+
<sort_order>2</sort_order>
|
351 |
+
<show_in_default>1</show_in_default>
|
352 |
+
<show_in_website>1</show_in_website>
|
353 |
+
<show_in_store>1</show_in_store>
|
354 |
+
<depends>
|
355 |
+
<body_background_change>1</body_background_change>
|
356 |
+
</depends>
|
357 |
+
</body_background_color_change>
|
358 |
+
<body_background_color translate="label">
|
359 |
+
<label>Body background color</label>
|
360 |
+
<frontend_type>text</frontend_type>
|
361 |
+
<frontend_class>color {hash:true,adjust:true}</frontend_class>
|
362 |
+
<sort_order>3</sort_order>
|
363 |
+
<show_in_default>1</show_in_default>
|
364 |
+
<show_in_website>1</show_in_website>
|
365 |
+
<show_in_store>1</show_in_store>
|
366 |
+
<depends>
|
367 |
+
<body_background_color_change>1</body_background_color_change>
|
368 |
+
<body_background_change>1</body_background_change>
|
369 |
+
</depends>
|
370 |
+
</body_background_color>
|
371 |
+
<body_background_image translate="label">
|
372 |
+
<label>Body background image</label>
|
373 |
+
<frontend_type>image</frontend_type>
|
374 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
375 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
376 |
+
<!-- would upload into media/uploaddir -->
|
377 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
378 |
+
<!-- same as previous line -->
|
379 |
+
<comment>Allowed file types: png, gif, jpg, jpeg. Not all browsers support all these formats!</comment>
|
380 |
+
<sort_order>4</sort_order>
|
381 |
+
<show_in_default>1</show_in_default>
|
382 |
+
<show_in_website>1</show_in_website>
|
383 |
+
<show_in_store>1</show_in_store>
|
384 |
+
<depends>
|
385 |
+
<body_background_change>1</body_background_change>
|
386 |
+
</depends>
|
387 |
+
</body_background_image>
|
388 |
+
<body_background_image_repeat translate="label">
|
389 |
+
<label>Body background repeat</label>
|
390 |
+
<frontend_type>select</frontend_type>
|
391 |
+
<source_model>ThemeOptions/backgroundrepeat</source_model>
|
392 |
+
<sort_order>5</sort_order>
|
393 |
+
<show_in_default>1</show_in_default>
|
394 |
+
<show_in_website>1</show_in_website>
|
395 |
+
<show_in_store>1</show_in_store>
|
396 |
+
<depends>
|
397 |
+
<body_background_change>1</body_background_change>
|
398 |
+
</depends>
|
399 |
+
</body_background_image_repeat>
|
400 |
+
<body_background_image_position translate="label">
|
401 |
+
<label>Body background position</label>
|
402 |
+
<frontend_type>select</frontend_type>
|
403 |
+
<source_model>ThemeOptions/backgroundposition</source_model>
|
404 |
+
<sort_order>6</sort_order>
|
405 |
+
<show_in_default>1</show_in_default>
|
406 |
+
<show_in_website>1</show_in_website>
|
407 |
+
<show_in_store>1</show_in_store>
|
408 |
+
<depends>
|
409 |
+
<body_background_change>1</body_background_change>
|
410 |
+
</depends>
|
411 |
+
</body_background_image_position>
|
412 |
+
<!-- Body end -->
|
413 |
+
<label5>
|
414 |
+
<label></label>
|
415 |
+
<frontend_type>label</frontend_type>
|
416 |
+
<sort_order>7</sort_order>
|
417 |
+
<show_in_default>1</show_in_default>
|
418 |
+
<show_in_website>1</show_in_website>
|
419 |
+
<show_in_store>1</show_in_store>
|
420 |
+
</label5>
|
421 |
+
<header_background_change translate="label">
|
422 |
+
<label>Header background change?</label>
|
423 |
+
<frontend_type>select</frontend_type>
|
424 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
425 |
+
<sort_order>8</sort_order>
|
426 |
+
<show_in_default>1</show_in_default>
|
427 |
+
<show_in_website>1</show_in_website>
|
428 |
+
<show_in_store>1</show_in_store>
|
429 |
+
</header_background_change>
|
430 |
+
<header_background_color_change translate="label">
|
431 |
+
<label>Header background color change?</label>
|
432 |
+
<frontend_type>select</frontend_type>
|
433 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
434 |
+
<sort_order>9</sort_order>
|
435 |
+
<show_in_default>1</show_in_default>
|
436 |
+
<show_in_website>1</show_in_website>
|
437 |
+
<show_in_store>1</show_in_store>
|
438 |
+
<depends>
|
439 |
+
<header_background_change>1</header_background_change>
|
440 |
+
</depends>
|
441 |
+
</header_background_color_change>
|
442 |
+
<header_background_color translate="label">
|
443 |
+
<label>Header background color</label>
|
444 |
+
<frontend_type>text</frontend_type>
|
445 |
+
<frontend_class>color {hash:true,adjust:true}</frontend_class>
|
446 |
+
<sort_order>10</sort_order>
|
447 |
+
<show_in_default>1</show_in_default>
|
448 |
+
<show_in_website>1</show_in_website>
|
449 |
+
<show_in_store>1</show_in_store>
|
450 |
+
<depends>
|
451 |
+
<header_background_color_change>1</header_background_color_change>
|
452 |
+
<header_background_change>1</header_background_change>
|
453 |
+
</depends>
|
454 |
+
</header_background_color>
|
455 |
+
<header_background_image translate="label">
|
456 |
+
<label>Header background image</label>
|
457 |
+
<frontend_type>image</frontend_type>
|
458 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
459 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
460 |
+
<!-- would upload into media/uploaddir -->
|
461 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
462 |
+
<!-- same as previous line -->
|
463 |
+
<comment>Allowed file types: png, gif, jpg, jpeg. Not all browsers support all these formats!</comment>
|
464 |
+
<sort_order>11</sort_order>
|
465 |
+
<show_in_default>1</show_in_default>
|
466 |
+
<show_in_website>1</show_in_website>
|
467 |
+
<show_in_store>1</show_in_store>
|
468 |
+
<depends>
|
469 |
+
<header_background_change>1</header_background_change>
|
470 |
+
</depends>
|
471 |
+
</header_background_image>
|
472 |
+
<header_background_image_repeat translate="label">
|
473 |
+
<label>Header background repeat</label>
|
474 |
+
<frontend_type>select</frontend_type>
|
475 |
+
<source_model>ThemeOptions/backgroundrepeat</source_model>
|
476 |
+
<sort_order>12</sort_order>
|
477 |
+
<show_in_default>1</show_in_default>
|
478 |
+
<show_in_website>1</show_in_website>
|
479 |
+
<show_in_store>1</show_in_store>
|
480 |
+
<depends>
|
481 |
+
<header_background_change>1</header_background_change>
|
482 |
+
</depends>
|
483 |
+
</header_background_image_repeat>
|
484 |
+
<header_background_image_position translate="label">
|
485 |
+
<label>Header background position</label>
|
486 |
+
<frontend_type>select</frontend_type>
|
487 |
+
<source_model>ThemeOptions/backgroundposition</source_model>
|
488 |
+
<sort_order>13</sort_order>
|
489 |
+
<show_in_default>1</show_in_default>
|
490 |
+
<show_in_website>1</show_in_website>
|
491 |
+
<show_in_store>1</show_in_store>
|
492 |
+
<depends>
|
493 |
+
<header_background_change>1</header_background_change>
|
494 |
+
</depends>
|
495 |
+
</header_background_image_position>
|
496 |
+
<!-- Header end -->
|
497 |
+
<!-- <label6>
|
498 |
+
<label></label>
|
499 |
+
<frontend_type>label</frontend_type>
|
500 |
+
<sort_order>14</sort_order>
|
501 |
+
<show_in_default>1</show_in_default>
|
502 |
+
<show_in_website>1</show_in_website>
|
503 |
+
<show_in_store>1</show_in_store>
|
504 |
+
</label6>
|
505 |
+
<main_background_change translate="label">
|
506 |
+
<label>Main background change?</label>
|
507 |
+
<frontend_type>select</frontend_type>
|
508 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
509 |
+
<sort_order>15</sort_order>
|
510 |
+
<show_in_default>1</show_in_default>
|
511 |
+
<show_in_website>1</show_in_website>
|
512 |
+
<show_in_store>1</show_in_store>
|
513 |
+
</main_background_change>
|
514 |
+
<main_background_color_change translate="label">
|
515 |
+
<label>Main background color change?</label>
|
516 |
+
<frontend_type>select</frontend_type>
|
517 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
518 |
+
<sort_order>16</sort_order>
|
519 |
+
<show_in_default>1</show_in_default>
|
520 |
+
<show_in_website>1</show_in_website>
|
521 |
+
<show_in_store>1</show_in_store>
|
522 |
+
<depends>
|
523 |
+
<main_background_change>1</main_background_change>
|
524 |
+
</depends>
|
525 |
+
</main_background_color_change>
|
526 |
+
<main_background_color translate="label">
|
527 |
+
<label>Main background color</label>
|
528 |
+
<frontend_type>text</frontend_type>
|
529 |
+
<frontend_class>color {hash:true,adjust:true}</frontend_class>
|
530 |
+
<sort_order>17</sort_order>
|
531 |
+
<show_in_default>1</show_in_default>
|
532 |
+
<show_in_website>1</show_in_website>
|
533 |
+
<show_in_store>1</show_in_store>
|
534 |
+
<depends>
|
535 |
+
<main_background_color_change>1</main_background_color_change>
|
536 |
+
<main_background_change>1</main_background_change>
|
537 |
+
</depends>
|
538 |
+
</main_background_color>
|
539 |
+
<main_background_image translate="label">
|
540 |
+
<label>Main background image</label>
|
541 |
+
<frontend_type>image</frontend_type>
|
542 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
543 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
544 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
545 |
+
<comment>Allowed file types: png, gif, jpg, jpeg. Not all browsers support all these formats!</comment>
|
546 |
+
<sort_order>18</sort_order>
|
547 |
+
<show_in_default>1</show_in_default>
|
548 |
+
<show_in_website>1</show_in_website>
|
549 |
+
<show_in_store>1</show_in_store>
|
550 |
+
<depends>
|
551 |
+
<main_background_change>1</main_background_change>
|
552 |
+
</depends>
|
553 |
+
</main_background_image>
|
554 |
+
<main_background_image_repeat translate="label">
|
555 |
+
<label>Main background repeat</label>
|
556 |
+
<frontend_type>select</frontend_type>
|
557 |
+
<source_model>ThemeOptions/backgroundrepeat</source_model>
|
558 |
+
<sort_order>19</sort_order>
|
559 |
+
<show_in_default>1</show_in_default>
|
560 |
+
<show_in_website>1</show_in_website>
|
561 |
+
<show_in_store>1</show_in_store>
|
562 |
+
<depends>
|
563 |
+
<main_background_change>1</main_background_change>
|
564 |
+
</depends>
|
565 |
+
</main_background_image_repeat>
|
566 |
+
<main_background_image_position translate="label">
|
567 |
+
<label>Main background position</label>
|
568 |
+
<frontend_type>select</frontend_type>
|
569 |
+
<source_model>ThemeOptions/backgroundposition</source_model>
|
570 |
+
<sort_order>20</sort_order>
|
571 |
+
<show_in_default>1</show_in_default>
|
572 |
+
<show_in_website>1</show_in_website>
|
573 |
+
<show_in_store>1</show_in_store>
|
574 |
+
<depends>
|
575 |
+
<main_background_change>1</main_background_change>
|
576 |
+
</depends>
|
577 |
+
</main_background_image_position> -->
|
578 |
+
<!-- Main end -->
|
579 |
+
<!-- <label7>
|
580 |
+
<label></label>
|
581 |
+
<frontend_type>label</frontend_type>
|
582 |
+
<sort_order>21</sort_order>
|
583 |
+
<show_in_default>1</show_in_default>
|
584 |
+
<show_in_website>1</show_in_website>
|
585 |
+
<show_in_store>1</show_in_store>
|
586 |
+
</label7>
|
587 |
+
<footer_background_change translate="label">
|
588 |
+
<label>Footer background change?</label>
|
589 |
+
<frontend_type>select</frontend_type>
|
590 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
591 |
+
<sort_order>22</sort_order>
|
592 |
+
<show_in_default>1</show_in_default>
|
593 |
+
<show_in_website>1</show_in_website>
|
594 |
+
<show_in_store>1</show_in_store>
|
595 |
+
</footer_background_change>
|
596 |
+
<footer_background_color_change translate="label">
|
597 |
+
<label>Footer background color change?</label>
|
598 |
+
<frontend_type>select</frontend_type>
|
599 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
600 |
+
<sort_order>23</sort_order>
|
601 |
+
<show_in_default>1</show_in_default>
|
602 |
+
<show_in_website>1</show_in_website>
|
603 |
+
<show_in_store>1</show_in_store>
|
604 |
+
<depends>
|
605 |
+
<footer_background_change>1</footer_background_change>
|
606 |
+
</depends>
|
607 |
+
</footer_background_color_change>
|
608 |
+
<footer_background_color translate="label">
|
609 |
+
<label>Footer background color</label>
|
610 |
+
<frontend_type>text</frontend_type>
|
611 |
+
<frontend_class>color {hash:true,adjust:true}</frontend_class>
|
612 |
+
<sort_order>24</sort_order>
|
613 |
+
<show_in_default>1</show_in_default>
|
614 |
+
<show_in_website>1</show_in_website>
|
615 |
+
<show_in_store>1</show_in_store>
|
616 |
+
<depends>
|
617 |
+
<footer_background_color_change>1</footer_background_color_change>
|
618 |
+
<footer_background_change>1</footer_background_change>
|
619 |
+
</depends>
|
620 |
+
</footer_background_color>
|
621 |
+
<footer_background_image translate="label">
|
622 |
+
<label>Footer background image</label>
|
623 |
+
<frontend_type>image</frontend_type>
|
624 |
+
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
625 |
+
<upload_dir config="system/filesystem/media" scope_info="1">ma2/images</upload_dir>
|
626 |
+
<base_url type="media" scope_info="1">ma2/images</base_url>
|
627 |
+
<comment>Allowed file types: png, gif, jpg, jpeg. Not all browsers support all these formats!</comment>
|
628 |
+
<sort_order>25</sort_order>
|
629 |
+
<show_in_default>1</show_in_default>
|
630 |
+
<show_in_website>1</show_in_website>
|
631 |
+
<show_in_store>1</show_in_store>
|
632 |
+
<depends>
|
633 |
+
<footer_background_change>1</footer_background_change>
|
634 |
+
</depends>
|
635 |
+
</footer_background_image>
|
636 |
+
<footer_background_image_repeat translate="label">
|
637 |
+
<label>Footer background repeat</label>
|
638 |
+
<frontend_type>select</frontend_type>
|
639 |
+
<source_model>ThemeOptions/backgroundrepeat</source_model>
|
640 |
+
<sort_order>26</sort_order>
|
641 |
+
<show_in_default>1</show_in_default>
|
642 |
+
<show_in_website>1</show_in_website>
|
643 |
+
<show_in_store>1</show_in_store>
|
644 |
+
<depends>
|
645 |
+
<footer_background_change>1</footer_background_change>
|
646 |
+
</depends>
|
647 |
+
</footer_background_image_repeat>
|
648 |
+
<footer_background_image_position translate="label">
|
649 |
+
<label>Footer background position</label>
|
650 |
+
<frontend_type>select</frontend_type>
|
651 |
+
<source_model>ThemeOptions/backgroundposition</source_model>
|
652 |
+
<sort_order>27</sort_order>
|
653 |
+
<show_in_default>1</show_in_default>
|
654 |
+
<show_in_website>1</show_in_website>
|
655 |
+
<show_in_store>1</show_in_store>
|
656 |
+
<depends>
|
657 |
+
<footer_background_change>1</footer_background_change>
|
658 |
+
</depends>
|
659 |
+
</footer_background_image_position> -->
|
660 |
+
<!-- Footer end -->
|
661 |
+
</fields>
|
662 |
+
</background>
|
663 |
+
|
664 |
+
<layouts translate="label">
|
665 |
+
<label>Layouts</label>
|
666 |
+
<sort_order>4</sort_order>
|
667 |
+
<show_in_default>1</show_in_default>
|
668 |
+
<show_in_website>1</show_in_website>
|
669 |
+
<show_in_store>1</show_in_store>
|
670 |
+
<fields>
|
671 |
+
<right_widht translate="label">
|
672 |
+
<label>Right column width</label>
|
673 |
+
<frontend_type>text</frontend_type>
|
674 |
+
<comment>Example: 250px. Leave empty it will be applied by default CSS file.</comment>
|
675 |
+
<show_in_default>1</show_in_default>
|
676 |
+
<show_in_website>1</show_in_website>
|
677 |
+
<show_in_store>1</show_in_store>
|
678 |
+
</right_widht>
|
679 |
+
|
680 |
+
<left_width translate="label">
|
681 |
+
<label>Left column width</label>
|
682 |
+
<frontend_type>text</frontend_type>
|
683 |
+
<comment>Example: 250px. Leave empty it will be applied by default CSS file.</comment>
|
684 |
+
<show_in_default>1</show_in_default>
|
685 |
+
<show_in_website>1</show_in_website>
|
686 |
+
<show_in_store>1</show_in_store>
|
687 |
+
</left_width>
|
688 |
+
|
689 |
+
<theme_width translate="label">
|
690 |
+
<label>Site width</label>
|
691 |
+
<frontend_type>text</frontend_type>
|
692 |
+
<comment>Example: 980px. Leave empty it will be applied by default CSS file.</comment>
|
693 |
+
<show_in_default>1</show_in_default>
|
694 |
+
<show_in_website>1</show_in_website>
|
695 |
+
<show_in_store>1</show_in_store>
|
696 |
+
</theme_width>
|
697 |
+
</fields>
|
698 |
+
</layouts>
|
699 |
+
</groups>
|
700 |
+
</theme_options>
|
701 |
+
</sections>
|
702 |
+
</config>
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/Catalog/Product/Widget/Chooser.php
ADDED
@@ -0,0 +1,380 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_WidgetProductList_Block_Adminhtml_Catalog_Product_Widget_Chooser
|
4 |
+
extends Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser
|
5 |
+
{
|
6 |
+
|
7 |
+
protected $_selectedProducts = array();
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Block construction, prepare grid params
|
11 |
+
*
|
12 |
+
* @param array $arguments Object data
|
13 |
+
*/
|
14 |
+
public function __construct($arguments = array()) {
|
15 |
+
parent::__construct($arguments);
|
16 |
+
$this->setUseMassaction(true);
|
17 |
+
}
|
18 |
+
|
19 |
+
protected function _prepareLayout() {
|
20 |
+
$this->setChild('choose_button', $this->getLayout()->createBlock('adminhtml/widget_button')
|
21 |
+
->setData(array(
|
22 |
+
'label' => Mage::helper('adminhtml')->__('Choose selected'),
|
23 |
+
'onclick' => $this->getJsObjectName() . '.doChoose()'
|
24 |
+
))
|
25 |
+
);
|
26 |
+
return parent::_prepareLayout();
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getChooseButtonHtml() {
|
30 |
+
return $this->getChildHtml('choose_button');
|
31 |
+
}
|
32 |
+
|
33 |
+
public function getMainButtonsHtml() {
|
34 |
+
$html = '';
|
35 |
+
if ($this->getFilterVisibility()) {
|
36 |
+
$html.= $this->getResetFilterButtonHtml();
|
37 |
+
$html.= $this->getSearchButtonHtml();
|
38 |
+
$html .= '<br /><br />';
|
39 |
+
$html.= $this->getChooseButtonHtml();
|
40 |
+
}
|
41 |
+
return $html;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Prepare chooser element HTML
|
46 |
+
*
|
47 |
+
* @param Varien_Data_Form_Element_Abstract $element Form Element
|
48 |
+
* @return Varien_Data_Form_Element_Abstract
|
49 |
+
*/
|
50 |
+
public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
51 |
+
$uniqId = Mage::helper('core')->uniqHash($element->getId());
|
52 |
+
$sourceUrl = $this->getUrl('*/WidgetProductList/chooser', array(
|
53 |
+
'uniq_id' => $uniqId,
|
54 |
+
'use_massaction' => true,
|
55 |
+
));
|
56 |
+
|
57 |
+
$chooser = $this->getLayout()->createBlock('widget/adminhtml_widget_chooser')
|
58 |
+
->setElement($element)
|
59 |
+
->setTranslationHelper($this->getTranslationHelper())
|
60 |
+
->setConfig($this->getConfig())
|
61 |
+
->setFieldsetId($this->getFieldsetId())
|
62 |
+
->setSourceUrl($sourceUrl)
|
63 |
+
->setUniqId($uniqId);
|
64 |
+
|
65 |
+
if ($element->getValue()) {
|
66 |
+
$label = "";
|
67 |
+
$ids = explode('}{', $element->getValue());
|
68 |
+
$cleanIds = array();
|
69 |
+
foreach ($ids as $id) {
|
70 |
+
$id = str_replace('{', '', $id);
|
71 |
+
$id = str_replace('}', '', $id);
|
72 |
+
$cleanIds[] = $id;
|
73 |
+
}
|
74 |
+
$products = $this->_getProductsByIDs($cleanIds);
|
75 |
+
if ($products) {
|
76 |
+
$label .= '<ul>';
|
77 |
+
foreach ($products as $product) {
|
78 |
+
$label .= '<li>' . $product->getName() . '</li>';
|
79 |
+
}
|
80 |
+
$label .= '</ul>';
|
81 |
+
$chooser->setLabel($label);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
$element->setData('after_element_html', $chooser->toHtml());
|
85 |
+
return $element;
|
86 |
+
}
|
87 |
+
|
88 |
+
protected function _getProductsByIDs($ids) {
|
89 |
+
$products = Mage::getModel('catalog/product')->getResourceCollection();
|
90 |
+
$products->addAttributeToSelect('*');
|
91 |
+
$products->addStoreFilter(Mage::app()->getStore()->getId());
|
92 |
+
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($products);
|
93 |
+
//Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
|
94 |
+
$products->addFieldToFilter('entity_id', array('in' => $ids));
|
95 |
+
$products->load();
|
96 |
+
return $products;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Checkbox Check JS Callback
|
101 |
+
*
|
102 |
+
* @return string
|
103 |
+
*/
|
104 |
+
public function getCheckboxCheckCallback() {
|
105 |
+
if ($this->getUseMassaction()) {
|
106 |
+
return "function (grid, element) {
|
107 |
+
$(grid.containerId).fire('product:changed', {element: element});
|
108 |
+
}";
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Grid Row JS Callback
|
114 |
+
*
|
115 |
+
* @return string
|
116 |
+
*/
|
117 |
+
public function getRowClickCallback() {
|
118 |
+
if (!$this->getUseMassaction()) {
|
119 |
+
$chooserJsObject = $this->getId();
|
120 |
+
return '
|
121 |
+
function (grid, event) {
|
122 |
+
var trElement = Event.findElement(event, "tr");
|
123 |
+
var productId = trElement.down("td").innerHTML;
|
124 |
+
var productName = trElement.down("td").next().next().innerHTML;
|
125 |
+
var optionLabel = productName;
|
126 |
+
var optionValue = "product/" + productId.replace(/^\s+|\s+$/g,"");
|
127 |
+
if (grid.categoryId) {
|
128 |
+
optionValue += "/" + grid.categoryId;
|
129 |
+
}
|
130 |
+
if (grid.categoryName) {
|
131 |
+
optionLabel = grid.categoryName + " / " + optionLabel;
|
132 |
+
}
|
133 |
+
' . $chooserJsObject . '.setElementValue(optionValue);
|
134 |
+
' . $chooserJsObject . '.setElementLabel(optionLabel);
|
135 |
+
' . $chooserJsObject . '.close();
|
136 |
+
}
|
137 |
+
';
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Category Tree node onClick listener js function
|
143 |
+
*
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
+
public function getCategoryClickListenerJs() {
|
147 |
+
$js = '
|
148 |
+
function (node, e) {
|
149 |
+
{jsObject}.addVarToUrl("category_id", node.attributes.id);
|
150 |
+
{jsObject}.reload({jsObject}.url);
|
151 |
+
{jsObject}.categoryId = node.attributes.id != "none" ? node.attributes.id : false;
|
152 |
+
{jsObject}.categoryName = node.attributes.id != "none" ? node.text : false;
|
153 |
+
}
|
154 |
+
';
|
155 |
+
$js = str_replace('{jsObject}', $this->getJsObjectName(), $js);
|
156 |
+
return $js;
|
157 |
+
}
|
158 |
+
|
159 |
+
public function canDisplayContainer() {
|
160 |
+
return true;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
*
|
165 |
+
*/
|
166 |
+
public function getAdditionalJavascript() {
|
167 |
+
$chooserJsObject = $this->getId();
|
168 |
+
$js = '
|
169 |
+
{jsObject}.initChecked = function(){
|
170 |
+
$$("#' . $chooserJsObject . '_table tbody input:checkbox").each(function(element, i){
|
171 |
+
var values = ' . $chooserJsObject . '.getElementValue();
|
172 |
+
var capture = values.replace("{"+element.value+"}", "match");
|
173 |
+
var searchValue = "match";
|
174 |
+
if(capture.search(searchValue) != -1){
|
175 |
+
element.checked = true;
|
176 |
+
}
|
177 |
+
});
|
178 |
+
}
|
179 |
+
{jsObject}.initChecked();
|
180 |
+
var values = ' . $chooserJsObject . '.getElementValue();
|
181 |
+
$("' . $chooserJsObject . '").insert({bottom: "<div class=\"filter\"><input type=\"hidden\" value="+values+" name=\"selected_products\" /></div>"});
|
182 |
+
$$("#' . $chooserJsObject . '_table tbody input:checkbox").invoke("observe", "change", function(event){
|
183 |
+
var element = Event.element(event);
|
184 |
+
var label = element.up("td").next().next().next().innerHTML;
|
185 |
+
label = label.replace(/^\s\s*/, "").replace(/\s\s*$/, "");
|
186 |
+
if(element.checked)
|
187 |
+
{
|
188 |
+
{jsObject}.addValue(element.value);
|
189 |
+
{jsObject}.addLabel(label);
|
190 |
+
}
|
191 |
+
else
|
192 |
+
{
|
193 |
+
{jsObject}.removeValue(element.value);
|
194 |
+
{jsObject}.removeLabel(label);
|
195 |
+
}
|
196 |
+
});
|
197 |
+
{jsObject}.removeValue = function(value){
|
198 |
+
var currentValue = ' . $chooserJsObject . '.getElementValue();
|
199 |
+
currentValue = currentValue.replace("{"+value+"}", "");
|
200 |
+
' . $chooserJsObject . '.setElementValue(currentValue);
|
201 |
+
}
|
202 |
+
{jsObject}.addValue = function(value){
|
203 |
+
var currentValue = ' . $chooserJsObject . '.getElementValue();
|
204 |
+
currentValue = currentValue.replace("{"+value+"}", "");
|
205 |
+
currentValue = currentValue + "{"+value+"}";
|
206 |
+
' . $chooserJsObject . '.setElementValue(currentValue);
|
207 |
+
}
|
208 |
+
{jsObject}.removeLabel = function(label){
|
209 |
+
var currentLabel = ' . $chooserJsObject . '.getElementLabelText();
|
210 |
+
currentLabel = currentLabel.replace("<li>"+label+"</li>", "");
|
211 |
+
' . $chooserJsObject . '.setElementLabel(currentLabel);
|
212 |
+
}
|
213 |
+
{jsObject}.addLabel = function(label){
|
214 |
+
var currentLabel = ' . $chooserJsObject . '.getElementLabelText();
|
215 |
+
if(currentLabel.search("ul") != -1){
|
216 |
+
currentLabel = currentLabel.replace("</ul>", "");
|
217 |
+
currentLabel = currentLabel.replace("<li>"+label+"</li>", "");
|
218 |
+
}
|
219 |
+
else{
|
220 |
+
currentLabel = "<ul>";
|
221 |
+
}
|
222 |
+
currentLabel = currentLabel +"<li>"+label+"</li></ul>";
|
223 |
+
' . $chooserJsObject . '.setElementLabel(currentLabel);
|
224 |
+
}
|
225 |
+
|
226 |
+
{jsObject}.doChoose = function(node,e){
|
227 |
+
' . $chooserJsObject . '.close();
|
228 |
+
}
|
229 |
+
';
|
230 |
+
$js = str_replace('{jsObject}', $this->getJsObjectName(), $js);
|
231 |
+
return $js;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Filter checked/unchecked rows in grid
|
236 |
+
*
|
237 |
+
* @param Mage_Adminhtml_Block_Widget_Grid_Column $column
|
238 |
+
* @return Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser
|
239 |
+
*/
|
240 |
+
protected function _addColumnFilterToCollection($column) {
|
241 |
+
if ($column->getId() == 'in_products') {
|
242 |
+
$selected = $this->getSelectedProducts();
|
243 |
+
if ($column->getFilter()->getValue()) {
|
244 |
+
$this->getCollection()->addFieldToFilter('entity_id', array('in' => $selected));
|
245 |
+
} else {
|
246 |
+
$this->getCollection()->addFieldToFilter('entity_id', array('nin' => $selected));
|
247 |
+
}
|
248 |
+
} else {
|
249 |
+
parent::_addColumnFilterToCollection($column);
|
250 |
+
}
|
251 |
+
return $this;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Prepare products collection, defined collection filters (category, product type)
|
256 |
+
*
|
257 |
+
* @return Mage_Adminhtml_Block_Widget_Grid
|
258 |
+
*/
|
259 |
+
protected function _prepareCollection() {
|
260 |
+
/* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection */
|
261 |
+
$collection = Mage::getResourceModel('catalog/product_collection')
|
262 |
+
->setStoreId(0)
|
263 |
+
->addAttributeToSelect('name');
|
264 |
+
|
265 |
+
if ($categoryId = $this->getCategoryId()) {
|
266 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
267 |
+
if ($category->getId()) {
|
268 |
+
// $collection->addCategoryFilter($category);
|
269 |
+
$productIds = $category->getProductsPosition();
|
270 |
+
$productIds = array_keys($productIds);
|
271 |
+
if (empty($productIds)) {
|
272 |
+
$productIds = 0;
|
273 |
+
}
|
274 |
+
$collection->addFieldToFilter('entity_id', array('in' => $productIds));
|
275 |
+
}
|
276 |
+
}
|
277 |
+
|
278 |
+
if ($productTypeId = $this->getProductTypeId()) {
|
279 |
+
$collection->addAttributeToFilter('type_id', $productTypeId);
|
280 |
+
}
|
281 |
+
|
282 |
+
$this->setCollection($collection);
|
283 |
+
return parent::_prepareCollection();
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Prepare columns for products grid
|
288 |
+
*
|
289 |
+
* @return Mage_Adminhtml_Block_Widget_Grid
|
290 |
+
*/
|
291 |
+
protected function _prepareColumns() {
|
292 |
+
if ($this->getUseMassaction()) {
|
293 |
+
$this->addColumn('in_products', array(
|
294 |
+
'header_css_class' => 'a-center',
|
295 |
+
'type' => 'checkbox',
|
296 |
+
'name' => 'in_products',
|
297 |
+
'inline_css' => 'checkbox entities',
|
298 |
+
'field_name' => 'in_products',
|
299 |
+
'values' => $this->getSelectedProducts(),
|
300 |
+
'align' => 'center',
|
301 |
+
'index' => 'entity_id',
|
302 |
+
'use_index' => true,
|
303 |
+
));
|
304 |
+
}
|
305 |
+
|
306 |
+
$this->addColumn('entity_id', array(
|
307 |
+
'header' => Mage::helper('catalog')->__('ID'),
|
308 |
+
'sortable' => true,
|
309 |
+
'width' => '60px',
|
310 |
+
'index' => 'entity_id'
|
311 |
+
));
|
312 |
+
$this->addColumn('chooser_sku', array(
|
313 |
+
'header' => Mage::helper('catalog')->__('SKU'),
|
314 |
+
'name' => 'chooser_sku',
|
315 |
+
'width' => '80px',
|
316 |
+
'index' => 'sku'
|
317 |
+
));
|
318 |
+
$this->addColumn('chooser_name', array(
|
319 |
+
'header' => Mage::helper('catalog')->__('Product Name'),
|
320 |
+
'name' => 'chooser_name',
|
321 |
+
'index' => 'name'
|
322 |
+
));
|
323 |
+
|
324 |
+
return parent::_prepareColumns();
|
325 |
+
}
|
326 |
+
|
327 |
+
/**
|
328 |
+
* Adds additional parameter to URL for loading only products grid
|
329 |
+
*
|
330 |
+
* @return string
|
331 |
+
*/
|
332 |
+
public function getGridUrl() {
|
333 |
+
return $this->getUrl('*/WidgetProductList/chooser', array(
|
334 |
+
'products_grid' => true,
|
335 |
+
'_current' => true,
|
336 |
+
'uniq_id' => $this->getId(),
|
337 |
+
'use_massaction' => $this->getUseMassaction(),
|
338 |
+
'product_type_id' => $this->getProductTypeId()
|
339 |
+
));
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* Setter
|
344 |
+
*
|
345 |
+
* @param array $selectedProducts
|
346 |
+
* @return Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser
|
347 |
+
*/
|
348 |
+
public function setSelectedProducts($selectedProducts) {
|
349 |
+
$this->_selectedProducts = $selectedProducts;
|
350 |
+
return $this;
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Getter
|
355 |
+
*
|
356 |
+
* @return array
|
357 |
+
*/
|
358 |
+
public function getSelectedProducts() {
|
359 |
+
if ($this->getRequest()->getParam('filter')) {
|
360 |
+
$filter = base64_decode($this->getRequest()->getParam('filter'));
|
361 |
+
$filterBag = explode('&', $filter);
|
362 |
+
$filters = array();
|
363 |
+
foreach ($filterBag as $subfilter) {
|
364 |
+
$subfilter = explode('=', $subfilter);
|
365 |
+
$filters[$subfilter[0]] = $subfilter[1];
|
366 |
+
}
|
367 |
+
if (array_key_exists("in_products", $filters)) {
|
368 |
+
$selectedProducts = $filters['selected_products'];
|
369 |
+
$selectedProducts = urldecode($selectedProducts);
|
370 |
+
$selectedProducts = str_replace('{', '', $selectedProducts);
|
371 |
+
$selectedProducts = str_replace('}', ',', $selectedProducts);
|
372 |
+
$selectedProducts = explode(',', $selectedProducts);
|
373 |
+
$this->setSelectedProducts($selectedProducts);
|
374 |
+
}
|
375 |
+
return $this->_selectedProducts;
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
}
|
380 |
+
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/Edit/Form.php
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
+
{
|
4 |
+
protected function _prepareForm()
|
5 |
+
{
|
6 |
+
$form = new Varien_Data_Form(array(
|
7 |
+
'id' => 'edit_form',
|
8 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'),'store' => $this->getRequest()->getParam('store'))),
|
9 |
+
'method' => 'post',
|
10 |
+
'enctype' => 'multipart/form-data'
|
11 |
+
));
|
12 |
+
$form->setUseContainer(true);
|
13 |
+
$this->setForm($form);
|
14 |
+
return parent::_prepareForm();
|
15 |
+
}
|
16 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/EnableDisable.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_System_Config_Form_Field_EnableDisable
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
|
6 |
+
public function setInitStoreValueModule()
|
7 |
+
{
|
8 |
+
$InitInputValueModule = array( "enable"=>"Enable",
|
9 |
+
"disable"=>"Disable"
|
10 |
+
);
|
11 |
+
|
12 |
+
// declare function and value.
|
13 |
+
return $InitInputValueModule;
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
17 |
+
{
|
18 |
+
//foreach($getValueStore as $title=>$value)
|
19 |
+
//{
|
20 |
+
//echo $getValueStore[$title];
|
21 |
+
//echo $value;
|
22 |
+
//}
|
23 |
+
|
24 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
25 |
+
$html = '';
|
26 |
+
|
27 |
+
//$helper = $this->helper('WidgetProductList');
|
28 |
+
// $template_selected = $helper->getTypeList();
|
29 |
+
|
30 |
+
$getValueStore = $this->setInitStoreValueModule();
|
31 |
+
|
32 |
+
$html .= '<select name="'.$element->getName().'" class="small-select" id="'.$element->getId().'">';
|
33 |
+
$title = '';
|
34 |
+
|
35 |
+
//var_dump($template_selected);
|
36 |
+
//var_dump($getValueStore);
|
37 |
+
|
38 |
+
foreach ($getValueStore as $value=>$title)
|
39 |
+
{
|
40 |
+
//$getValueStore[$value],$title
|
41 |
+
//$value,$title
|
42 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
43 |
+
}
|
44 |
+
$html .= '</select>';
|
45 |
+
return $html;
|
46 |
+
}
|
47 |
+
|
48 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/InputNumber.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_System_Config_Form_Field_InputNumber extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
+
{
|
6 |
+
//$element->setStyle('background-color:#EBEBEB; width:89px !important; height:26px;')->setName($element->getName() . '[]');
|
7 |
+
|
8 |
+
$element->setClass('small-input-number')->setName($element->getName() . '[]');
|
9 |
+
if ($element->getValue()) {
|
10 |
+
$values = $element->getValue();
|
11 |
+
} else {
|
12 |
+
$values = array();
|
13 |
+
}
|
14 |
+
$selectme = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
|
15 |
+
|
16 |
+
return $selectme;
|
17 |
+
|
18 |
+
// $html = '<input id="'.$element->getId().'" type="text" value="'.$element->getValue().'" class="small-input-text" name="'.$element->getName().'">';
|
19 |
+
// return $html;
|
20 |
+
}
|
21 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/InputText.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_System_Config_Form_Field_InputText extends Mage_Adminhtml_Block_System_Config_Form_Field
|
3 |
+
{
|
4 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
5 |
+
{
|
6 |
+
$element->setStyle('background-color:#EBEBEB; width:89px !important; height:26px;')->setName($element->getName() . '[]');
|
7 |
+
if ($element->getValue()) {
|
8 |
+
$values = $element->getValue();
|
9 |
+
} else {
|
10 |
+
$values = array();
|
11 |
+
}
|
12 |
+
$selectme = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
|
13 |
+
return $selectme;
|
14 |
+
}
|
15 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/SortBy.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_System_Config_Form_Field_SortBy
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
|
6 |
+
public function setInitStoreValueModule()
|
7 |
+
{
|
8 |
+
$InitInputValueModule = array( "asc"=>"Price ASC",
|
9 |
+
"desc"=>"Price Desc",
|
10 |
+
"any"=>"Any"
|
11 |
+
);
|
12 |
+
|
13 |
+
// declare function and value.
|
14 |
+
return $InitInputValueModule;
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
18 |
+
{
|
19 |
+
//foreach($getValueStore as $title=>$value)
|
20 |
+
//{
|
21 |
+
//echo $getValueStore[$title];
|
22 |
+
//echo $value;
|
23 |
+
//}
|
24 |
+
|
25 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
26 |
+
$html = '';
|
27 |
+
|
28 |
+
//$helper = $this->helper('WidgetProductList');
|
29 |
+
// $template_selected = $helper->getTypeList();
|
30 |
+
|
31 |
+
$getValueStore = $this->setInitStoreValueModule();
|
32 |
+
|
33 |
+
$html .= '<select name="'.$element->getName().'" class="small-select" id="'.$element->getId().'">';
|
34 |
+
$title = '';
|
35 |
+
|
36 |
+
//var_dump($template_selected);
|
37 |
+
//var_dump($getValueStore);
|
38 |
+
|
39 |
+
foreach ($getValueStore as $value=>$title)
|
40 |
+
{
|
41 |
+
//$getValueStore[$value],$title
|
42 |
+
//$value,$title
|
43 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
44 |
+
}
|
45 |
+
$html .= '</select>';
|
46 |
+
return $html;
|
47 |
+
}
|
48 |
+
|
49 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Adminhtml/System/Config/Form/Field/TypeList.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Adminhtml_System_Config_Form_Field_TypeList
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
{
|
5 |
+
|
6 |
+
public function setInitStoreValueModule()
|
7 |
+
{
|
8 |
+
$InitInputValueModule = array( "grid"=>"Grid",
|
9 |
+
"list"=>"List"
|
10 |
+
);
|
11 |
+
|
12 |
+
// declare function and value.
|
13 |
+
return $InitInputValueModule;
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
17 |
+
{
|
18 |
+
//foreach($getValueStore as $title=>$value)
|
19 |
+
//{
|
20 |
+
//echo $getValueStore[$title];
|
21 |
+
//echo $value;
|
22 |
+
//}
|
23 |
+
|
24 |
+
$nonEscapableNbspChar = html_entity_decode('        ', ENT_NOQUOTES, 'UTF-8');
|
25 |
+
$html = '';
|
26 |
+
|
27 |
+
//$helper = $this->helper('WidgetProductList');
|
28 |
+
// $template_selected = $helper->getTypeList();
|
29 |
+
|
30 |
+
$getValueStore = $this->setInitStoreValueModule();
|
31 |
+
|
32 |
+
$html .= '<select name="'.$element->getName().'" class="small-select" id="'.$element->getId().'">';
|
33 |
+
$title = '';
|
34 |
+
|
35 |
+
//var_dump($template_selected);
|
36 |
+
//var_dump($getValueStore);
|
37 |
+
|
38 |
+
foreach ($getValueStore as $value=>$title)
|
39 |
+
{
|
40 |
+
//$getValueStore[$value],$title
|
41 |
+
//$value,$title
|
42 |
+
|
43 |
+
$html .= '<option value="'.$value.'" class="childrent">'.$title.'</option>';
|
44 |
+
|
45 |
+
}
|
46 |
+
$html .= '</select>';
|
47 |
+
return $html;
|
48 |
+
}
|
49 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/BestSelling.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_BestSelling
|
3 |
+
extends Mage_Catalog_Block_Product_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* A model to serialize attributes
|
8 |
+
* @var Varien_Object
|
9 |
+
*/
|
10 |
+
protected $_serializer = null;
|
11 |
+
|
12 |
+
protected $_final = null;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Initialization
|
16 |
+
*/
|
17 |
+
protected function _construct()
|
18 |
+
{
|
19 |
+
$this->_serializer = new Varien_Object();
|
20 |
+
parent::_construct();
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Get products collection
|
25 |
+
*/
|
26 |
+
protected function _getProductCollection()
|
27 |
+
{
|
28 |
+
if (is_null($this->_productCollection))
|
29 |
+
{
|
30 |
+
$visibility = array(
|
31 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
|
32 |
+
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG);
|
33 |
+
|
34 |
+
$storeId = Mage::app()->getStore()->getId();
|
35 |
+
$collection = Mage::getResourceModel('reports/product_collection')
|
36 |
+
->addAttributeToSelect('*')
|
37 |
+
->addOrderedQty()
|
38 |
+
->addAttributeToFilter('visibility', $visibility)
|
39 |
+
->setStoreId($storeId)
|
40 |
+
->addStoreFilter($storeId)
|
41 |
+
->setPageSize($this->getData('products_count'))
|
42 |
+
->setOrder('ordered_qty', 'DESC'); $this->_productCollection = $collection;
|
43 |
+
}
|
44 |
+
return $this->_productCollection;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* To html
|
49 |
+
*/
|
50 |
+
public function _toHtml()
|
51 |
+
{
|
52 |
+
/* $this->assign('WidgetBestSellingProductCollection',$this->_getProductCollection());
|
53 |
+
$this->assign('widget_title',$this->getData('widget_title'));
|
54 |
+
$this->assign('products_count',$this->getData('products_count'));
|
55 |
+
$this->assign('list_type',$this->getData('list_type'));
|
56 |
+
$this->assign('show_addtocart',$this->getData('show_addtocart'));
|
57 |
+
$this->assign('show_price',$this->getData('show_price'));
|
58 |
+
$this->assign('show_short_description',$this->getData('show_short_description'));
|
59 |
+
*/
|
60 |
+
|
61 |
+
$this->assign('_bestsellingCollection',$this->_getProductCollection());
|
62 |
+
$this->assign('params', json_decode(json_encode($this->getData())));
|
63 |
+
|
64 |
+
return parent::_toHtml();
|
65 |
+
}
|
66 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Custom.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Custom
|
3 |
+
extends Mage_Catalog_Block_Product_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
protected function _beforeToHtml() {
|
7 |
+
|
8 |
+
$ids = $this->getData('ids');
|
9 |
+
if ($ids) {
|
10 |
+
$ids = explode('}{', $ids);
|
11 |
+
$cleanIds = array();
|
12 |
+
foreach ($ids as $id) {
|
13 |
+
$id = str_replace('{', '', $id);
|
14 |
+
$id = str_replace('}', '', $id);
|
15 |
+
$cleanIds[] = $id;
|
16 |
+
}
|
17 |
+
if (count($cleanIds)) {
|
18 |
+
$products = $this->_getProductsByIDs($cleanIds);
|
19 |
+
if ($products) {
|
20 |
+
$this->setProductCollection($products);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
return parent::_beforeToHtml();
|
26 |
+
}
|
27 |
+
|
28 |
+
protected function _getProductsByIDs($ids) {
|
29 |
+
|
30 |
+
$products = Mage::getModel('catalog/product')->getResourceCollection()
|
31 |
+
->addAttributeToSelect('*')
|
32 |
+
->addStoreFilter(Mage::app()->getStore()->getId())
|
33 |
+
->setOrder($this->getData('sort_by'), $this->getData('sort_dir'));
|
34 |
+
|
35 |
+
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($products);
|
36 |
+
$products->addFieldToFilter('entity_id', array('in' => $ids));
|
37 |
+
$products->load();
|
38 |
+
|
39 |
+
return $products;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function _toHtml()
|
43 |
+
{
|
44 |
+
/* $this->assign('widget_title',$this->getData('widget_title'));
|
45 |
+
$this->assign('ids',$this->getData('ids'));
|
46 |
+
$this->assign('sort_by',$this->getData('sort_by'));
|
47 |
+
$this->assign('sort_dir',$this->getData('sort_dir'));
|
48 |
+
$this->assign('list_type',$this->getData('list_type'));
|
49 |
+
$this->assign('show_addtocart',$this->getData('show_addtocart'));
|
50 |
+
$this->assign('show_price',$this->getData('show_price'));
|
51 |
+
$this->assign('show_short_description',$this->getData('show_short_description'));
|
52 |
+
*/
|
53 |
+
|
54 |
+
$this->assign('params', json_decode(json_encode($this->getData())));
|
55 |
+
|
56 |
+
return parent::_toHtml();
|
57 |
+
}
|
58 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/Featured.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_Featured
|
3 |
+
extends Mage_Catalog_Block_Product_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* A model to serialize attributes
|
8 |
+
* @var Varien_Object
|
9 |
+
*/
|
10 |
+
protected $_serializer = null;
|
11 |
+
|
12 |
+
protected $_final = null;
|
13 |
+
/**
|
14 |
+
* Initialization
|
15 |
+
*/
|
16 |
+
protected function _construct()
|
17 |
+
{
|
18 |
+
$this->_serializer = new Varien_Object();
|
19 |
+
parent::_construct();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get products collection
|
24 |
+
*/
|
25 |
+
protected function _getProductCollection()
|
26 |
+
{
|
27 |
+
if (is_null($this->_productCollection))
|
28 |
+
{
|
29 |
+
$attributes = Mage::getSingleton('catalog/config')
|
30 |
+
->getProductAttributes();
|
31 |
+
$collection = Mage::getModel('catalog/product')->getCollection();
|
32 |
+
$collection->addAttributeToSelect($attributes)
|
33 |
+
->addMinimalPrice()
|
34 |
+
->addFinalPrice()
|
35 |
+
->addTaxPercents()
|
36 |
+
->addAttributeToFilter('ma2_featured_product', 1, 'left')
|
37 |
+
->addStoreFilter()
|
38 |
+
->getSelect();
|
39 |
+
|
40 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
41 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
42 |
+
|
43 |
+
if(isset($sort_dir) && (!empty($sort_dir) && ($sort_dir == "asc" || $sort_dir="desc")))
|
44 |
+
{
|
45 |
+
$_collection = $collection->clear()
|
46 |
+
->setPageSize($this->getData('products_count'))
|
47 |
+
->setOrder($sort_by, $sort_dir)
|
48 |
+
->load();
|
49 |
+
$this->_productCollection = $_collection;
|
50 |
+
}
|
51 |
+
else
|
52 |
+
{
|
53 |
+
$_collection = $collection->clear()
|
54 |
+
->setPageSize($this->getData('products_count'))
|
55 |
+
->load();
|
56 |
+
$this->_productCollection = $_collection;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
return $this->_productCollection;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* To html
|
64 |
+
*/
|
65 |
+
protected function _toHtml()
|
66 |
+
{
|
67 |
+
/* $this->assign('WidgetFeaturedProductCollection',$this->_getProductCollection());
|
68 |
+
$this->assign('widget_title', $this->getData('widget_title'));
|
69 |
+
$this->assign('products_count', $this->getData('products_count'));
|
70 |
+
$this->assign('sort_by', $this->getData('sort_by')); // name, price, created_at
|
71 |
+
$this->assign('sort_dir', $this->getData('sort_dir')); // asc, desc
|
72 |
+
$this->assign('list_type', $this->getData('list_type'));
|
73 |
+
$this->assign('show_addtocart', $this->getData('show_addtocart'));
|
74 |
+
$this->assign('show_price',$this->getData('show_price'));
|
75 |
+
$this->assign('show_short_description',$this->getData('show_short_description'));
|
76 |
+
*/
|
77 |
+
$this->assign('_featuredCollection',$this->_getProductCollection());
|
78 |
+
$this->assign('params', json_decode(json_encode($this->getData())));
|
79 |
+
|
80 |
+
return parent::_toHtml();
|
81 |
+
}
|
82 |
+
}
|
app/code/local/Ma2/WidgetProductList/Block/New.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Block_New
|
3 |
+
extends Mage_Catalog_Block_Product_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* A model to serialize attributes
|
8 |
+
* @var Varien_Object
|
9 |
+
*/
|
10 |
+
protected $_serializer = null;
|
11 |
+
|
12 |
+
protected $_final = null;
|
13 |
+
/**
|
14 |
+
* Initialization
|
15 |
+
*/
|
16 |
+
protected function _construct()
|
17 |
+
{
|
18 |
+
$this->_serializer = new Varien_Object();
|
19 |
+
parent::_construct();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get products collection
|
24 |
+
*/
|
25 |
+
protected function _getProductCollection()
|
26 |
+
{
|
27 |
+
if (is_null($this->_productCollection))
|
28 |
+
{
|
29 |
+
$productIds = $this->getProductIdsByCategories($catIds);
|
30 |
+
$todayDate = Mage::app()->getLocale()->date()
|
31 |
+
->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
32 |
+
$storeId = Mage::app()->getStore()->getId();
|
33 |
+
|
34 |
+
$collection = Mage::getResourceModel('catalog/product_collection')
|
35 |
+
->addAttributeToSelect(Mage::getSingleton('catalog/config')
|
36 |
+
->getProductAttributes())
|
37 |
+
->setStoreId($storeId)
|
38 |
+
->addStoreFilter($storeId)
|
39 |
+
->addMinimalPrice()
|
40 |
+
->addTaxPercents();
|
41 |
+
Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
|
42 |
+
Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection);
|
43 |
+
|
44 |
+
$collection->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))->addAttributeToFilter('news_to_date', array('or'=> array(
|
45 |
+
0 => array('date' => true, 'from' => $todayDate),
|
46 |
+
1 => array('is' => new Zend_Db_Expr('null')))
|
47 |
+
), 'left');
|
48 |
+
|
49 |
+
if(count($productIds)) {
|
50 |
+
$collection->addFieldToFilter('entity_id', array('in'=>$productIds));
|
51 |
+
}
|
52 |
+
if(isset($sort_dir) && (!empty($sort_dir) && ($sort_dir == "asc" || $sort_dir="desc")))
|
53 |
+
{
|
54 |
+
$this->_productCollection = $collection->clear()
|
55 |
+
->setPageSize($this->getData('products_count'))
|
56 |
+
->setOrder($sort_by, $sort_dir)
|
57 |
+
->load();
|
58 |
+
}
|
59 |
+
else
|
60 |
+
{
|
61 |
+
$this->_productCollection = $collection->clear()
|
62 |
+
->setPageSize($this->getData('products_count'))
|
63 |
+
->load();
|
64 |
+
}
|
65 |
+
}
|
66 |
+
return $this->_productCollection;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* To html
|
71 |
+
*/
|
72 |
+
public function _toHtml()
|
73 |
+
{
|
74 |
+
/*
|
75 |
+
$this->assign('WidgetNewProductCollection',$this->_getProductCollection());
|
76 |
+
$this->assign('widget_title',$this->getData('widget_title'));
|
77 |
+
$this->assign('products_count',$this->getData('products_count'));
|
78 |
+
$this->assign('sort_by',$this->getData('sort_by'));
|
79 |
+
$this->assign('sort_dir',$this->getData('sort_dir'));
|
80 |
+
$this->assign('list_type',$this->getData('list_type'));
|
81 |
+
$this->assign('show_addtocart',$this->getData('show_addtocart'));
|
82 |
+
$this->assign('show_price',$this->getData('show_price'));
|
83 |
+
$this->assign('show_short_description',$this->getData('show_short_description'));
|
84 |
+
*/
|
85 |
+
$this->assign('_newCollection',$this->_getProductCollection());
|
86 |
+
$this->assign('params', json_decode(json_encode($this->getData())));
|
87 |
+
|
88 |
+
return parent::_toHtml();
|
89 |
+
}
|
90 |
+
}
|
app/code/local/Ma2/WidgetProductList/Helper/Data.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
public function randomkeys($length) {
|
6 |
+
$pattern = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
7 |
+
$key = '';
|
8 |
+
for($i = 0; $i < $length; $i++) {
|
9 |
+
$key .= $pattern{rand(0,strlen($pattern)-1)};
|
10 |
+
}
|
11 |
+
return $key;
|
12 |
+
}
|
13 |
+
|
14 |
+
}
|
app/code/local/Ma2/WidgetProductList/Model/Source/TypeList.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_WidgetProductList_Model_Source_TypeList
|
4 |
+
{
|
5 |
+
public function toOptionArray()
|
6 |
+
{
|
7 |
+
return array(
|
8 |
+
//Ease in-out
|
9 |
+
array('value' => 'grid', 'label' => 'Grid'),
|
10 |
+
array('value' => 'list', 'label' => 'List')
|
11 |
+
);
|
12 |
+
}
|
13 |
+
}
|
app/code/local/Ma2/WidgetProductList/Model/WidgetProductList.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetProductList_Model_WidgetProductList extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('catalog/product'); // this is location of the resource file.
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Ma2/WidgetProductList/controllers/Adminhtml/WidgetProductListController.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Ma2_WidgetProductList_Adminhtml_WidgetProductListController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
/**
|
6 |
+
* Chooser Source action
|
7 |
+
*/
|
8 |
+
public function chooserAction()
|
9 |
+
{
|
10 |
+
$uniqId = $this->getRequest()->getParam('uniq_id');
|
11 |
+
$massAction = $this->getRequest()->getParam('use_massaction', false);
|
12 |
+
$productTypeId = $this->getRequest()->getParam('product_type_id', null);
|
13 |
+
$productsGrid = $this->getLayout()->createBlock('WidgetProductList/adminhtml_catalog_product_widget_chooser', '', array(
|
14 |
+
'id' => $uniqId,
|
15 |
+
'use_massaction' => $massAction,
|
16 |
+
'product_type_id' => $productTypeId,
|
17 |
+
'category_id' => $this->getRequest()->getParam('category_id')
|
18 |
+
));
|
19 |
+
|
20 |
+
$html = $productsGrid->toHtml();
|
21 |
+
|
22 |
+
if (!$this->getRequest()->getParam('products_grid')) {
|
23 |
+
$categoriesTree = $this->getLayout()->createBlock('adminhtml/catalog_category_widget_chooser', '', array(
|
24 |
+
'id' => $uniqId.'Tree',
|
25 |
+
'node_click_listener' => $productsGrid->getCategoryClickListenerJs(),
|
26 |
+
'with_empty_node' => true
|
27 |
+
));
|
28 |
+
|
29 |
+
$html = $this->getLayout()->createBlock('adminhtml/catalog_product_widget_chooser_container')
|
30 |
+
->setTreeHtml($categoriesTree->toHtml())
|
31 |
+
->setGridHtml($html)
|
32 |
+
->toHtml();
|
33 |
+
}
|
34 |
+
|
35 |
+
$this->getResponse()->setBody($html);
|
36 |
+
}
|
37 |
+
}
|
app/code/local/Ma2/WidgetProductList/etc/config.xml
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ma2_WidgetProductList>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Ma2_WidgetProductList>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<helpers>
|
10 |
+
<WidgetProductList>
|
11 |
+
<class>Ma2_WidgetProductList_Helper</class>
|
12 |
+
</WidgetProductList>
|
13 |
+
</helpers>
|
14 |
+
<blocks>
|
15 |
+
<WidgetProductList>
|
16 |
+
<class>Ma2_WidgetProductList_Block</class>
|
17 |
+
</WidgetProductList>
|
18 |
+
</blocks>
|
19 |
+
<models>
|
20 |
+
<WidgetProductList>
|
21 |
+
<class>Ma2_WidgetProductList_Model</class>
|
22 |
+
</WidgetProductList>
|
23 |
+
</models>
|
24 |
+
<resources>
|
25 |
+
<WidgetProductList_setup>
|
26 |
+
<setup>
|
27 |
+
<module>Ma2_WidgetProductList</module>
|
28 |
+
</setup>
|
29 |
+
<connection>
|
30 |
+
<use>core_setup</use>
|
31 |
+
</connection>
|
32 |
+
</WidgetProductList_setup>
|
33 |
+
<WidgetProductList_write>
|
34 |
+
<connection>
|
35 |
+
<use>core_write</use>
|
36 |
+
</connection>
|
37 |
+
</WidgetProductList_write>
|
38 |
+
<WidgetProductList_read>
|
39 |
+
<connection>
|
40 |
+
<use>core_read</use>
|
41 |
+
</connection>
|
42 |
+
</WidgetProductList_read>
|
43 |
+
</resources>
|
44 |
+
</global>
|
45 |
+
<admin>
|
46 |
+
<routers>
|
47 |
+
<adminhtml>
|
48 |
+
<args>
|
49 |
+
<modules>
|
50 |
+
<Ma2_WidgetProductList before="Mage_Adminhtml">Ma2_WidgetProductList_Adminhtml</Ma2_WidgetProductList>
|
51 |
+
</modules>
|
52 |
+
</args>
|
53 |
+
</adminhtml>
|
54 |
+
</routers>
|
55 |
+
</admin>
|
56 |
+
</config>
|
app/code/local/Ma2/WidgetProductList/etc/widget.xml
ADDED
@@ -0,0 +1,433 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<widgets>
|
3 |
+
<Featured type="WidgetProductList/Featured" module="WidgetProductList">
|
4 |
+
<name>Ma2 Featured Products</name>
|
5 |
+
<description>List of featured products</description>
|
6 |
+
<parameters>
|
7 |
+
<widget_title translate="label">
|
8 |
+
<required>1</required>
|
9 |
+
<visible>1</visible>
|
10 |
+
<label>Title</label>
|
11 |
+
<value>Featured Products</value>
|
12 |
+
<type>text</type>
|
13 |
+
</widget_title>
|
14 |
+
<show_title translate="label">
|
15 |
+
<visible>1</visible>
|
16 |
+
<label>Show title</label>
|
17 |
+
<type>radios</type>
|
18 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
19 |
+
</show_title>
|
20 |
+
<products_count translate="label">
|
21 |
+
<required>1</required>
|
22 |
+
<visible>1</visible>
|
23 |
+
<label>Number of products to display</label>
|
24 |
+
<value>6</value>
|
25 |
+
<type>text</type>
|
26 |
+
</products_count>
|
27 |
+
<sort_by translate="label">
|
28 |
+
<visible>1</visible>
|
29 |
+
<label>Sort by</label>
|
30 |
+
<type>select</type>
|
31 |
+
<values>
|
32 |
+
<price translate="label">
|
33 |
+
<value>price</value>
|
34 |
+
<label>Price</label>
|
35 |
+
</price>
|
36 |
+
<name translate="label">
|
37 |
+
<value>name</value>
|
38 |
+
<label>Name</label>
|
39 |
+
</name>
|
40 |
+
<created_at translate="label">
|
41 |
+
<value>created_at</value>
|
42 |
+
<label>Created date</label>
|
43 |
+
</created_at>
|
44 |
+
</values>
|
45 |
+
</sort_by>
|
46 |
+
<sort_dir translate="label">
|
47 |
+
<visible>1</visible>
|
48 |
+
<label>Sort direction</label>
|
49 |
+
<type>select</type>
|
50 |
+
<values>
|
51 |
+
<asc translate="label">
|
52 |
+
<value>ASC</value><label>ASC</label>
|
53 |
+
</asc>
|
54 |
+
<desc translate="label">
|
55 |
+
<value>DESC</value><label>DESC</label>
|
56 |
+
</desc>
|
57 |
+
</values>
|
58 |
+
</sort_dir>
|
59 |
+
<list_type translate="label">
|
60 |
+
<visible>1</visible>
|
61 |
+
<label>Input Type (grid, list)</label>
|
62 |
+
<type>select</type>
|
63 |
+
<values>
|
64 |
+
<grid_type translate="label">
|
65 |
+
<label>Grid</label>
|
66 |
+
<value>grid</value>
|
67 |
+
</grid_type>
|
68 |
+
<list_type translate="label">
|
69 |
+
<label>List</label>
|
70 |
+
<value>list</value>
|
71 |
+
</list_type>
|
72 |
+
</values>
|
73 |
+
</list_type>
|
74 |
+
<featured_products_per_row translate="label">
|
75 |
+
<required>1</required>
|
76 |
+
<visible>1</visible>
|
77 |
+
<label>Number of products per row</label>
|
78 |
+
<value>4</value>
|
79 |
+
<type>text</type>
|
80 |
+
</featured_products_per_row>
|
81 |
+
<show_addtocart translate="label">
|
82 |
+
<visible>1</visible>
|
83 |
+
<label> Show Add To Cart button</label>
|
84 |
+
<type>select</type>
|
85 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
86 |
+
</show_addtocart>
|
87 |
+
<show_price translate="label">
|
88 |
+
<visible>1</visible>
|
89 |
+
<label>Show Price</label>
|
90 |
+
<type>select</type>
|
91 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
92 |
+
</show_price>
|
93 |
+
<show_short_description translate="label">
|
94 |
+
<visible>1</visible>
|
95 |
+
<label>Show short description</label>
|
96 |
+
<type>select</type>
|
97 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
98 |
+
</show_short_description>
|
99 |
+
<template>
|
100 |
+
<required>1</required>
|
101 |
+
<visible>1</visible>
|
102 |
+
<label>Select template</label>
|
103 |
+
<type>select</type>
|
104 |
+
<values>
|
105 |
+
<default translate="label">
|
106 |
+
<value>ma2widgetproductlist/featured/default.phtml</value>
|
107 |
+
<label>Default Template</label>
|
108 |
+
</default>
|
109 |
+
<template1 translate="label">
|
110 |
+
<value>ma2widgetproductlist/featured/template1.phtml</value>
|
111 |
+
<label>Template1</label>
|
112 |
+
</template1>
|
113 |
+
</values>
|
114 |
+
</template>
|
115 |
+
</parameters>
|
116 |
+
</Featured>
|
117 |
+
<New type="WidgetProductList/New" module="WidgetProductList">
|
118 |
+
<name>Ma2 New Products</name>
|
119 |
+
<description>List of new products</description>
|
120 |
+
<parameters>
|
121 |
+
<widget_title translate="label">
|
122 |
+
<required>1</required>
|
123 |
+
<visible>1</visible>
|
124 |
+
<label>Title</label>
|
125 |
+
<value>New Products</value>
|
126 |
+
<type>text</type>
|
127 |
+
</widget_title>
|
128 |
+
<show_title translate="label">
|
129 |
+
<visible>1</visible>
|
130 |
+
<label>Show title</label>
|
131 |
+
<type>radios</type>
|
132 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
133 |
+
</show_title>
|
134 |
+
<products_count translate="label">
|
135 |
+
<required>1</required>
|
136 |
+
<visible>1</visible>
|
137 |
+
<label>Number of products to display</label>
|
138 |
+
<value>6</value>
|
139 |
+
<type>text</type>
|
140 |
+
</products_count>
|
141 |
+
<sort_by translate="label">
|
142 |
+
<visible>1</visible>
|
143 |
+
<label>Sort by</label>
|
144 |
+
<type>select</type>
|
145 |
+
<values>
|
146 |
+
<price translate="label">
|
147 |
+
<value>price</value>
|
148 |
+
<label>Price</label>
|
149 |
+
</price>
|
150 |
+
<name translate="label">
|
151 |
+
<value>name</value>
|
152 |
+
<label>Name</label>
|
153 |
+
</name>
|
154 |
+
<created_at translate="label">
|
155 |
+
<value>created_at</value>
|
156 |
+
<label>Created date</label>
|
157 |
+
</created_at>
|
158 |
+
</values>
|
159 |
+
</sort_by>
|
160 |
+
<sort_dir translate="label">
|
161 |
+
<visible>1</visible>
|
162 |
+
<label>Sort direction</label>
|
163 |
+
<type>select</type>
|
164 |
+
<values>
|
165 |
+
<asc translate="label">
|
166 |
+
<value>asc</value><label>ASC</label>
|
167 |
+
</asc>
|
168 |
+
<desc translate="label">
|
169 |
+
<value>desc</value><label>DESC</label>
|
170 |
+
</desc>
|
171 |
+
</values>
|
172 |
+
</sort_dir>
|
173 |
+
<list_type translate="label">
|
174 |
+
<visible>1</visible>
|
175 |
+
<label>Input Type (grid, list)</label>
|
176 |
+
<type>select</type>
|
177 |
+
<values>
|
178 |
+
<grid_type translate="label">
|
179 |
+
<label>Grid</label>
|
180 |
+
<value>grid</value>
|
181 |
+
</grid_type>
|
182 |
+
<list_type translate="label">
|
183 |
+
<label>List</label>
|
184 |
+
<value>list</value>
|
185 |
+
</list_type>
|
186 |
+
</values>
|
187 |
+
</list_type>
|
188 |
+
<new_products_per_row translate="label">
|
189 |
+
<required>1</required>
|
190 |
+
<visible>1</visible>
|
191 |
+
<label>Number of products per row</label>
|
192 |
+
<value>4</value>
|
193 |
+
<type>text</type>
|
194 |
+
</new_products_per_row>
|
195 |
+
<show_addtocart translate="label">
|
196 |
+
<visible>1</visible>
|
197 |
+
<label> Show Add To Cart button</label>
|
198 |
+
<type>select</type>
|
199 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
200 |
+
</show_addtocart>
|
201 |
+
<show_price translate="label">
|
202 |
+
<visible>1</visible>
|
203 |
+
<label>Show Price</label>
|
204 |
+
<type>select</type>
|
205 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
206 |
+
</show_price>
|
207 |
+
<show_short_description translate="label">
|
208 |
+
<visible>1</visible>
|
209 |
+
<label>Show short description</label>
|
210 |
+
<type>select</type>
|
211 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
212 |
+
</show_short_description>
|
213 |
+
<template>
|
214 |
+
<required>1</required>
|
215 |
+
<visible>1</visible>
|
216 |
+
<label>Select template</label>
|
217 |
+
<type>select</type>
|
218 |
+
<values>
|
219 |
+
<default translate="label">
|
220 |
+
<value>ma2widgetproductlist/new/default.phtml</value>
|
221 |
+
<label>Default Template</label>
|
222 |
+
</default>
|
223 |
+
<template1 translate="label">
|
224 |
+
<value>ma2widgetproductlist/new/template1.phtml</value>
|
225 |
+
<label>Template1</label>
|
226 |
+
</template1>
|
227 |
+
</values>
|
228 |
+
</template>
|
229 |
+
</parameters>
|
230 |
+
</New>
|
231 |
+
<BestSelling type="WidgetProductList/BestSelling" module="WidgetProductList">
|
232 |
+
<name>Ma2 Best Selling Products</name>
|
233 |
+
<description>List of best selling products</description>
|
234 |
+
<parameters>
|
235 |
+
<widget_title translate="label">
|
236 |
+
<required>1</required>
|
237 |
+
<visible>1</visible>
|
238 |
+
<label>Title</label>
|
239 |
+
<value>Best Selling Products</value>
|
240 |
+
<type>text</type>
|
241 |
+
</widget_title>
|
242 |
+
<show_title translate="label">
|
243 |
+
<visible>1</visible>
|
244 |
+
<label>Show title</label>
|
245 |
+
<type>radios</type>
|
246 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
247 |
+
</show_title>
|
248 |
+
<products_count translate="label">
|
249 |
+
<required>1</required>
|
250 |
+
<visible>1</visible>
|
251 |
+
<label>Number of products to display</label>
|
252 |
+
<value>6</value>
|
253 |
+
<type>text</type>
|
254 |
+
</products_count>
|
255 |
+
<list_type translate="label">
|
256 |
+
<visible>1</visible>
|
257 |
+
<label>Input Type (grid, list)</label>
|
258 |
+
<type>select</type>
|
259 |
+
<values>
|
260 |
+
<grid_type translate="label">
|
261 |
+
<label>Grid</label>
|
262 |
+
<value>grid</value>
|
263 |
+
</grid_type>
|
264 |
+
<list_type translate="label">
|
265 |
+
<label>List</label>
|
266 |
+
<value>list</value>
|
267 |
+
</list_type>
|
268 |
+
</values>
|
269 |
+
</list_type>
|
270 |
+
<bestselling_products_per_row translate="label">
|
271 |
+
<required>1</required>
|
272 |
+
<visible>1</visible>
|
273 |
+
<label>Number of products per row</label>
|
274 |
+
<value>4</value>
|
275 |
+
<type>text</type>
|
276 |
+
</bestselling_products_per_row>
|
277 |
+
<show_addtocart translate="label">
|
278 |
+
<visible>1</visible>
|
279 |
+
<label> Show Add To Cart button</label>
|
280 |
+
<type>select</type>
|
281 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
282 |
+
</show_addtocart>
|
283 |
+
<show_price translate="label">
|
284 |
+
<visible>1</visible>
|
285 |
+
<label>Show Price</label>
|
286 |
+
<type>select</type>
|
287 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
288 |
+
</show_price>
|
289 |
+
<show_short_description translate="label">
|
290 |
+
<visible>1</visible>
|
291 |
+
<label>Show short description</label>
|
292 |
+
<type>select</type>
|
293 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
294 |
+
</show_short_description>
|
295 |
+
<template>
|
296 |
+
<required>1</required>
|
297 |
+
<visible>1</visible>
|
298 |
+
<label>Select template</label>
|
299 |
+
<type>select</type>
|
300 |
+
<values>
|
301 |
+
<default translate="label">
|
302 |
+
<value>ma2widgetproductlist/bestselling/default.phtml</value>
|
303 |
+
<label>Default Template</label>
|
304 |
+
</default>
|
305 |
+
<template1 translate="label">
|
306 |
+
<value>ma2widgetproductlist/bestselling/template1.phtml</value>
|
307 |
+
<label>Template1</label>
|
308 |
+
</template1>
|
309 |
+
</values>
|
310 |
+
</template>
|
311 |
+
</parameters>
|
312 |
+
</BestSelling>
|
313 |
+
|
314 |
+
<CustomProducts type="WidgetProductList/Custom" module="WidgetProductList">
|
315 |
+
<name>Ma2 Custom Products</name>
|
316 |
+
<description>List of custom products</description>
|
317 |
+
<parameters>
|
318 |
+
<widget_title translate="label">
|
319 |
+
<required>1</required>
|
320 |
+
<visible>1</visible>
|
321 |
+
<label>Title</label>
|
322 |
+
<value>Custom Products</value>
|
323 |
+
<type>text</type>
|
324 |
+
</widget_title>
|
325 |
+
<show_title translate="label">
|
326 |
+
<visible>1</visible>
|
327 |
+
<label>Show title</label>
|
328 |
+
<type>radios</type>
|
329 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
330 |
+
</show_title>
|
331 |
+
<ids translate="label">
|
332 |
+
<visible>1</visible>
|
333 |
+
<required>1</required>
|
334 |
+
<label>Select products</label>
|
335 |
+
<type>label</type>
|
336 |
+
<helper_block>
|
337 |
+
<type>WidgetProductList/adminhtml_catalog_product_widget_chooser</type>
|
338 |
+
<data>
|
339 |
+
<button translate="open">
|
340 |
+
<open>Select Products...</open>
|
341 |
+
</button>
|
342 |
+
</data>
|
343 |
+
</helper_block>
|
344 |
+
</ids>
|
345 |
+
<sort_by translate="label">
|
346 |
+
<visible>1</visible>
|
347 |
+
<label>Sort by</label>
|
348 |
+
<type>select</type>
|
349 |
+
<values>
|
350 |
+
<price translate="label">
|
351 |
+
<value>price</value><label>Price</label>
|
352 |
+
</price>
|
353 |
+
<name translate="label">
|
354 |
+
<value>name</value><label>Name</label>
|
355 |
+
</name>
|
356 |
+
<created_at translate="label">
|
357 |
+
<value>created_at</value><label>Created date</label>
|
358 |
+
</created_at>
|
359 |
+
</values>
|
360 |
+
</sort_by>
|
361 |
+
<sort_dir translate="label">
|
362 |
+
<visible>1</visible>
|
363 |
+
<label>Sort direction</label>
|
364 |
+
<type>select</type>
|
365 |
+
<values>
|
366 |
+
<asc translate="label">
|
367 |
+
<value>asc</value><label>ASC</label>
|
368 |
+
</asc>
|
369 |
+
<desc translate="label">
|
370 |
+
<value>desc</value><label>DESC</label>
|
371 |
+
</desc>
|
372 |
+
</values>
|
373 |
+
</sort_dir>
|
374 |
+
<list_type translate="label">
|
375 |
+
<visible>1</visible>
|
376 |
+
<label>Input Type (grid, list)</label>
|
377 |
+
<type>select</type>
|
378 |
+
<values>
|
379 |
+
<grid_type translate="label">
|
380 |
+
<label>Grid</label>
|
381 |
+
<value>grid</value>
|
382 |
+
</grid_type>
|
383 |
+
<list_type translate="label">
|
384 |
+
<label>List</label>
|
385 |
+
<value>list</value>
|
386 |
+
</list_type>
|
387 |
+
</values>
|
388 |
+
</list_type>
|
389 |
+
<custom_products_per_row translate="label">
|
390 |
+
<required>1</required>
|
391 |
+
<visible>1</visible>
|
392 |
+
<label>Number of products per row</label>
|
393 |
+
<value>4</value>
|
394 |
+
<type>text</type>
|
395 |
+
</custom_products_per_row>
|
396 |
+
<show_addtocart translate="label">
|
397 |
+
<visible>1</visible>
|
398 |
+
<label> Show Add To Cart button</label>
|
399 |
+
<type>select</type>
|
400 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
401 |
+
</show_addtocart>
|
402 |
+
<show_price translate="label">
|
403 |
+
<visible>1</visible>
|
404 |
+
<label>Show Price</label>
|
405 |
+
<type>select</type>
|
406 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
407 |
+
</show_price>
|
408 |
+
<show_short_description translate="label">
|
409 |
+
<visible>1</visible>
|
410 |
+
<label>Show short description</label>
|
411 |
+
<type>select</type>
|
412 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
413 |
+
</show_short_description>
|
414 |
+
<template>
|
415 |
+
<required>1</required>
|
416 |
+
<visible>1</visible>
|
417 |
+
<label>Select template</label>
|
418 |
+
<type>select</type>
|
419 |
+
<values>
|
420 |
+
<default translate="label">
|
421 |
+
<value>ma2widgetproductlist/custom/default.phtml</value>
|
422 |
+
<label>Default Template</label>
|
423 |
+
</default>
|
424 |
+
<template1 translate="label">
|
425 |
+
<value>ma2widgetproductlist/custom/template1.phtml</value>
|
426 |
+
<label>Template1</label>
|
427 |
+
</template1>
|
428 |
+
</values>
|
429 |
+
</template>
|
430 |
+
</parameters>
|
431 |
+
</CustomProducts>
|
432 |
+
|
433 |
+
</widgets>
|
app/code/local/Ma2/WidgetTabs/Block/Adminhtml/System/Config/Form/Field/Editor.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Block_Adminhtml_System_Config_Form_Field_Editor
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
5 |
+
{
|
6 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element){
|
7 |
+
$element->setWysiwyg(true);
|
8 |
+
$element->setConfig(Mage::getSingleton('cms/wysiwyg_config')->getConfig());
|
9 |
+
return parent::_getElementHtml($element);
|
10 |
+
}
|
11 |
+
}
|
app/code/local/Ma2/WidgetTabs/Block/Adminhtml/System/Config/Form/Field/Tabitem.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Block_Adminhtml_System_Config_Form_Field_Tabitem
|
3 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
4 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
5 |
+
{
|
6 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
7 |
+
{
|
8 |
+
$html = '';
|
9 |
+
//echo $editorField->getElementHtml();
|
10 |
+
$wids = Mage::getModel('WidgetTabs/System_Config_Source_MultiInstances')
|
11 |
+
->toOptionArray();
|
12 |
+
|
13 |
+
$html .= '<script>
|
14 |
+
function removeTabItem(idtab,idinput,idcontent)
|
15 |
+
{
|
16 |
+
$(idtab).style.display = "none";
|
17 |
+
$(idinput).value = "";
|
18 |
+
$(idcontent).value = "";
|
19 |
+
}
|
20 |
+
</script>';
|
21 |
+
$html .= '<form id="tab-items" name="tab-items">';
|
22 |
+
$html .= '<div id="tab-items-wrapper">';
|
23 |
+
$savedTabs = json_decode($element->getValue(),true);
|
24 |
+
if(is_array($savedTabs) && count($savedTabs) > 0)
|
25 |
+
{
|
26 |
+
foreach($savedTabs as $idx => $savedTab)
|
27 |
+
{
|
28 |
+
$html .= '<div class="tab-item" id="tab-item-'.$idx.'">';
|
29 |
+
$html .= '<div class="flt-lft w50percent"><label>'.$this->__('Tab title').'</label><input id="input-item-'.$idx.'" type="text" name="tabs['.$idx.'][title]" value="'.(isset($savedTab['title']) ? $this->escapeHtml($savedTab['title']) : '').'"/></div>';
|
30 |
+
$html .= '<div class="flt-lft w50percent"><label>'.$this->__('Tab Content').'</label>';
|
31 |
+
$html .= '
|
32 |
+
<textarea id="tabs_'.$idx.'_text" name="tabs['.$idx.'][text]" cols="20" rows="16">'.(isset($savedTab['text']) ? $this->escapeHtml($savedTab['text']) : '').'</textarea>
|
33 |
+
<button style="" onclick="widgetTools.openDialog(\''.Mage::getBaseUrl().'admin/widget/index/widget_target_id/tabs_'.$idx.'_text\')" class="scalable add-widget plugin" type="button"><span><span><span>Insert Widget...</span></span></span></button>
|
34 |
+
<a href="javascript: void(0)" id="tab-item-remove" onclick="javascript:removeTabItem(\'tab-item-'.$idx.'\',\'input-item-'.$idx.'\',\'tabs_'.$idx.'_text\')">'.$this->__('Remove tab').'</a>';
|
35 |
+
$html .= '</div></div>';
|
36 |
+
}
|
37 |
+
}
|
38 |
+
else{
|
39 |
+
$html .= '<div class="tab-item" id="tab-item-0">';
|
40 |
+
$html .= '<div class="flt-lft w50percent"><label>'.$this->__('Tab title').'</label><input type="text" name="tabs[0][title]" id="input-item-0" value=""/></div>';
|
41 |
+
$html .= '<div class="flt-lft w50percent"><label>'.$this->__('Tab Content').'</label>';
|
42 |
+
$html .= '
|
43 |
+
<textarea id="tabs_0_text" name="tabs[0][text]" cols="20" rows="8"></textarea>
|
44 |
+
<button style="" onclick="widgetTools.openDialog(\''.Mage::getBaseUrl().'admin/widget/index/widget_target_id/tabs_0_text\')" class="scalable add-widget plugin" type="button"><span><span><span>Insert Widget...</span></span></span></button>
|
45 |
+
<a href="javascript: void(0)" id="tab-item-remove" onclick="javascript:removeTabItem(\'tab-item-0\',\'input-item-0\',\'tabs_tabs_0_text\')">'.$this->__('Remove tab').'</a>';
|
46 |
+
$html .= '</div></div>';
|
47 |
+
}
|
48 |
+
$html .= '</div>';
|
49 |
+
$html .= '<a id="tab-item-add" onclick="addTabItem()">'.$this->__('Add more tabs...').'</a>';
|
50 |
+
$html .= '</form>';
|
51 |
+
$html .= '<a id="tab-items-save" onclick="saveTabItems()">'.$this->__('Save tabs').'</a>';
|
52 |
+
$html .= '<input id="'.$element->getId().'" type="hidden" name="'.$element->getName().'" value="'.$this->escapeHtml($element->getValue()).'" />';
|
53 |
+
$html .= '
|
54 |
+
<script type="text/javascript">
|
55 |
+
String.prototype.replaceAll = function(target, replacement) {
|
56 |
+
return this.split(target).join(replacement);
|
57 |
+
};
|
58 |
+
function addTabItem(){
|
59 |
+
var addId = $$(".tab-item").length;
|
60 |
+
var mystring = ""
|
61 |
+
+ "<div class=\"tab-item\" id=\"tab-item-zero-'.$idx.'\"><div class=\"flt-lft w50percent\"><label>'.$this->__('Tab title').'</label><input id=\"input-item-zero\" type=\"text\" name=\"tabs[REPLACE][title]\" value=\"\"/></div>"
|
62 |
+
+ "<div class=\"flt-lft w50percent\"><label>'.$this->__('Tab Content').'</label>"';
|
63 |
+
|
64 |
+
$html .= '
|
65 |
+
+ "<textarea id=\"tabs_REPLACE_text\" name=\"tabs[REPLACE][text]\" cols=\"20\" rows=\"8\"></textarea><button onclick=\"widgetTools.openDialog(\''.Mage::getBaseUrl().'admin/widget/index/widget_target_id/tabs_REPLACE_text\')\" class=\"scalable add-widget plugin\" type=\"button\"><span><span><span>Insert Widget...</span></span></span></button><a href=\"javascript: void(0)\" id=\"tab-item-remove\" onclick=\"javascript:removeTabItem(\'tab-item-" + addId + "\',\'input-item-zero\',\'tabs_REPLACE_text\')\">'.$this->__('Remove tab').'</a></div></div>";
|
66 |
+
var newElement = document.createElement("div");
|
67 |
+
newElement.className = "tab-item";
|
68 |
+
newElement.id = "tab-item-" + addId;
|
69 |
+
newElement.innerHTML = mystring.replaceAll("REPLACE", addId + "");
|
70 |
+
$("tab-items-wrapper").appendChild(newElement);
|
71 |
+
}
|
72 |
+
function saveTabItems()
|
73 |
+
{
|
74 |
+
new Ajax.Request("'.Mage::getBaseUrl().'WidgetTabs/adminhtml_widgettabs/save/", {
|
75 |
+
method:"post",
|
76 |
+
parameters:$("tab-items").serialize(),
|
77 |
+
onSuccess: function(transport) {
|
78 |
+
var response = transport.responseText || "no response text";
|
79 |
+
//alert("Success! \n\n" + response);
|
80 |
+
$("'.$element->getId().'").setValue(response);
|
81 |
+
confirmAfterSave();
|
82 |
+
},
|
83 |
+
onFailure: function() { alert("'.$this->__('Saving failure!').'"); }
|
84 |
+
});
|
85 |
+
}
|
86 |
+
function confirmAfterSave(){
|
87 |
+
Dialog.confirm("'.$this->__('Tabs added. Please click Save now to save the widget now or click Save later to save the widget later!').'", {
|
88 |
+
className:"magento",
|
89 |
+
closable:true,
|
90 |
+
resizable:false,
|
91 |
+
draggable:true,
|
92 |
+
modal: true,
|
93 |
+
title:"'.$this->__('Tabs added successfully').'",
|
94 |
+
width:268,
|
95 |
+
okLabel: "'.$this->__('Save now').'",
|
96 |
+
cancelLabel: "'.$this->__('Save later').'",
|
97 |
+
buttonClass: "scalable",
|
98 |
+
id: "myDialogId",
|
99 |
+
cancel:function(win) {},
|
100 |
+
ok:function(win) {
|
101 |
+
saveAndContinueEdit();
|
102 |
+
return false;
|
103 |
+
}
|
104 |
+
});
|
105 |
+
}
|
106 |
+
</script>
|
107 |
+
';
|
108 |
+
return $html;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
?>
|
app/code/local/Ma2/WidgetTabs/Block/Widget/Wysiwyg.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Block_Widget_Wysiwyg
|
3 |
+
extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
|
4 |
+
{
|
5 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
6 |
+
{
|
7 |
+
$editor = new Varien_Data_Form_Element_Editor($element->getData());
|
8 |
+
$editor->setId($element->getId());
|
9 |
+
$editor->setForm($element->getForm());
|
10 |
+
$editor->setWysiwyg(true);
|
11 |
+
$editor->setForceLoad(true);
|
12 |
+
return parent::render($editor);
|
13 |
+
}
|
14 |
+
}
|
15 |
+
?>
|
app/code/local/Ma2/WidgetTabs/Block/WidgetTabs.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Block_WidgetTabs
|
3 |
+
extends Mage_Catalog_Block_Product_Abstract
|
4 |
+
implements Mage_Widget_Block_Interface
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* A model to serialize attributes
|
8 |
+
* @var Varien_Object
|
9 |
+
*/
|
10 |
+
protected $_serializer = null;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Initialization
|
14 |
+
*/
|
15 |
+
protected function _construct()
|
16 |
+
{
|
17 |
+
$this->_serializer = new Varien_Object();
|
18 |
+
parent::_construct();
|
19 |
+
}
|
20 |
+
|
21 |
+
protected function _toHtml()
|
22 |
+
{
|
23 |
+
//echo "<pre>";
|
24 |
+
//var_dump(json_decode($this->getData('tab_item'),true));
|
25 |
+
//$data = json_decode($this->getData('tab_item'),true);
|
26 |
+
//return $data;
|
27 |
+
|
28 |
+
$this->assign('tabsData',json_decode($this->getData('tab_item'),true));
|
29 |
+
return parent::_toHtml();
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
}
|
app/code/local/Ma2/WidgetTabs/Helper/Data.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
public function randomkeys($length) {
|
5 |
+
$pattern = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
6 |
+
$key = '';
|
7 |
+
for($i = 0; $i < $length; $i++) {
|
8 |
+
$key .= $pattern{rand(0,strlen($pattern)-1)};
|
9 |
+
}
|
10 |
+
return $key;
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Ma2/WidgetTabs/Model/Mysql4/Widget/Instance/Collection.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Model_Mysql4_Widget_Instance_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Constructor
|
6 |
+
*/
|
7 |
+
protected function _construct()
|
8 |
+
{
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('widget/widget_instance');
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Filter by store ids
|
15 |
+
*
|
16 |
+
* @param array|integer $storeIds
|
17 |
+
* @param boolean $withDefaultStore if TRUE also filter by store id '0'
|
18 |
+
* @return Mage_Widget_Model_Mysql4_Widget_Instance_Collection
|
19 |
+
*/
|
20 |
+
public function addStoreFilter($storeIds = array(), $withDefaultStore = true)
|
21 |
+
{
|
22 |
+
if (!is_array($storeIds)) {
|
23 |
+
$storeIds = array($storeIds);
|
24 |
+
}
|
25 |
+
if ($withDefaultStore && !in_array(0, $storeIds)) {
|
26 |
+
array_unshift($storeIds, 0);
|
27 |
+
}
|
28 |
+
$select = $this->getSelect();
|
29 |
+
foreach ($storeIds as $storeId) {
|
30 |
+
$select->orWhere('FIND_IN_SET(?, `store_ids`)', $storeId);
|
31 |
+
}
|
32 |
+
return $this;
|
33 |
+
}
|
34 |
+
|
35 |
+
public function addTypeFilter($type) {
|
36 |
+
$this->getSelect()->where('type=?', $type);
|
37 |
+
return $this;
|
38 |
+
}
|
39 |
+
|
40 |
+
public function addTitleFilter($type) {
|
41 |
+
$this->getSelect()->where('title=?', $type);
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function addAttributeToSort($attribute, $dir='asc') {
|
46 |
+
$this->getSelect()->order("{$attribute} {$dir}");
|
47 |
+
return $this;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
?>
|
app/code/local/Ma2/WidgetTabs/Model/System/Config/Source/MultiInstances.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Model_System_Config_Source_MultiInstances
|
3 |
+
{
|
4 |
+
public function toOptionArray()
|
5 |
+
{
|
6 |
+
$wids = Mage::getModel('widget/widget_instance')
|
7 |
+
->getCollection()
|
8 |
+
->load();
|
9 |
+
|
10 |
+
$output = array();
|
11 |
+
$output[] = array('value' => "", 'label' => '-- Select widget instance --');
|
12 |
+
foreach($wids as $wid)
|
13 |
+
{
|
14 |
+
$label = $wid->getTitle();
|
15 |
+
$value = $wid->getId();
|
16 |
+
$output[] = array('value' => $value, 'label' => " ".$label);
|
17 |
+
}
|
18 |
+
return $output;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
?>
|
app/code/local/Ma2/WidgetTabs/controllers/Adminhtml/WidgetTabsController.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_Adminhtml_WidgetTabsController
|
3 |
+
extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public function saveAction()
|
6 |
+
{
|
7 |
+
$tabs = $this->getRequest()->getPost('tabs');
|
8 |
+
$newTabs = array();
|
9 |
+
foreach($tabs as $tab)
|
10 |
+
{
|
11 |
+
if(trim($tab["title"]) != "" && trim($tab["text"]) != "")
|
12 |
+
{
|
13 |
+
$newTabs[] = $tab;
|
14 |
+
}
|
15 |
+
}
|
16 |
+
echo json_encode($newTabs);
|
17 |
+
}
|
18 |
+
}
|
19 |
+
?>
|
app/code/local/Ma2/WidgetTabs/controllers/IndexController.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Ma2_WidgetTabs_IndexController
|
3 |
+
extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public function indexAction()
|
6 |
+
{
|
7 |
+
$this->loadLayout();
|
8 |
+
$this->renderLayout();
|
9 |
+
}
|
10 |
+
}
|
11 |
+
?>
|
app/code/local/Ma2/WidgetTabs/etc/config.xml
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ma2_WidgetTabs>
|
5 |
+
<version>1.0.0</version>
|
6 |
+
</Ma2_WidgetTabs>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<WidgetTabs>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Ma2_WidgetTabs</module>
|
14 |
+
<frontName>WidgetTabs</frontName>
|
15 |
+
</args>
|
16 |
+
</WidgetTabs>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<WidgetTabs>
|
21 |
+
<file>ma2widgettabs.xml</file>
|
22 |
+
</WidgetTabs>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<admin>
|
27 |
+
<routers>
|
28 |
+
<WidgetTabs>
|
29 |
+
<use>admin</use>
|
30 |
+
<args>
|
31 |
+
<module>Ma2_WidgetTabs</module>
|
32 |
+
<frontName>WidgetTabs</frontName>
|
33 |
+
</args>
|
34 |
+
</WidgetTabs>
|
35 |
+
</routers>
|
36 |
+
</admin>
|
37 |
+
<adminhtml>
|
38 |
+
<layout>
|
39 |
+
<updates>
|
40 |
+
<WidgetTabs>
|
41 |
+
<file>ma2widgettabs.xml</file>
|
42 |
+
</WidgetTabs>
|
43 |
+
</updates>
|
44 |
+
</layout>
|
45 |
+
</adminhtml>
|
46 |
+
<global>
|
47 |
+
<helpers>
|
48 |
+
<WidgetTabs>
|
49 |
+
<class>Ma2_WidgetTabs_Helper</class>
|
50 |
+
</WidgetTabs>
|
51 |
+
</helpers>
|
52 |
+
<blocks>
|
53 |
+
<WidgetTabs>
|
54 |
+
<class>Ma2_WidgetTabs_Block</class>
|
55 |
+
</WidgetTabs>
|
56 |
+
</blocks>
|
57 |
+
<models>
|
58 |
+
<WidgetTabs>
|
59 |
+
<class>Ma2_WidgetTabs_Model</class>
|
60 |
+
</WidgetTabs>
|
61 |
+
</models>
|
62 |
+
<resources>
|
63 |
+
<WidgetTabs_setup>
|
64 |
+
<setup>
|
65 |
+
<module>Ma2_WidgetTabs</module>
|
66 |
+
<class>Mage_Eav_Model_Entity_Setup</class>
|
67 |
+
</setup>
|
68 |
+
<connection>
|
69 |
+
<use>core_setup</use>
|
70 |
+
</connection>
|
71 |
+
</WidgetTabs_setup>
|
72 |
+
<WidgetTabs_write>
|
73 |
+
<connection>
|
74 |
+
<use>core_write</use>
|
75 |
+
</connection>
|
76 |
+
</WidgetTabs_write>
|
77 |
+
<WidgetTabs_read>
|
78 |
+
<connection>
|
79 |
+
<use>core_read</use>
|
80 |
+
</connection>
|
81 |
+
</WidgetTabs_read>
|
82 |
+
</resources>
|
83 |
+
</global>
|
84 |
+
</config>
|
app/code/local/Ma2/WidgetTabs/etc/widget.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<widgets>
|
3 |
+
<widgettabs type="WidgetTabs/WidgetTabs" module="WidgetTabs">
|
4 |
+
<name>Ma2 Widget Tabs</name>
|
5 |
+
<description>Widget tabs</description>
|
6 |
+
<parameters>
|
7 |
+
<tab_item translate="label">
|
8 |
+
<visible>1</visible>
|
9 |
+
<required>1</required>
|
10 |
+
<label></label>
|
11 |
+
<type>WidgetTabs/adminhtml_system_config_form_field_tabitem</type>
|
12 |
+
<sort_order>1</sort_order>
|
13 |
+
</tab_item>
|
14 |
+
<template>
|
15 |
+
<required>1</required>
|
16 |
+
<visible>1</visible>
|
17 |
+
<label>Select template</label>
|
18 |
+
<type>select</type>
|
19 |
+
<value>ma2widgettabs/widgettabs.phtml</value>
|
20 |
+
<values>
|
21 |
+
<default translate="label">
|
22 |
+
<value>ma2widgettabs/widgettabs.phtml</value>
|
23 |
+
<label>Default Template</label>
|
24 |
+
</default>
|
25 |
+
</values>
|
26 |
+
</template>
|
27 |
+
</parameters>
|
28 |
+
</widgettabs>
|
29 |
+
</widgets>
|
app/design/adminhtml/default/default/layout/ma2featuredproducts.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.1">
|
3 |
+
<adminhtml_system_config_edit>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addJs">
|
6 |
+
<file>jscolor/jscolor.js</file>
|
7 |
+
</action>
|
8 |
+
</reference>
|
9 |
+
</adminhtml_system_config_edit>
|
10 |
+
</layout>
|
app/design/adminhtml/default/default/layout/ma2slideshow.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<slideshow_adminhtml_slideshow_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="slideshow/adminhtml_slideshow" name="slideshow" />
|
6 |
+
</reference>
|
7 |
+
</slideshow_adminhtml_slideshow_index>
|
8 |
+
</layout>
|
app/design/adminhtml/default/default/layout/ma2themeoptions.xml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem">
|
6 |
+
<type>skin_js</type>
|
7 |
+
<name>js/colorchooser/jscolor.js</name>
|
8 |
+
</action>
|
9 |
+
<action method="addItem">
|
10 |
+
<type>skin_js</type>
|
11 |
+
<name>js/webfonts/webfont.js</name>
|
12 |
+
</action>
|
13 |
+
</reference>
|
14 |
+
</default>
|
15 |
+
</layout>
|
app/design/adminhtml/default/default/layout/ma2widgettabs.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.1">
|
3 |
+
<default>
|
4 |
+
<update handle="editor"/>
|
5 |
+
<reference name="head">
|
6 |
+
<action method="addCss"><stylesheet>/ma2widgettabs/custom.css</stylesheet></action>
|
7 |
+
<action method="setCanLoadTinyMce"><load>1</load></action>
|
8 |
+
</reference>
|
9 |
+
</default>
|
10 |
+
</layout>
|
app/design/frontend/ma2/default/etc/widget.xml
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category design
|
23 |
+
* @package base_default
|
24 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<widgets>
|
29 |
+
<new_products>
|
30 |
+
<parameters>
|
31 |
+
<template>
|
32 |
+
<values>
|
33 |
+
<list_default translate="label">
|
34 |
+
<value>catalog/product/widget/new/column/new_default_list.phtml</value>
|
35 |
+
<label>New Products Images and Names Template</label>
|
36 |
+
</list_default>
|
37 |
+
<list_names translate="label">
|
38 |
+
<value>catalog/product/widget/new/column/new_names_list.phtml</value>
|
39 |
+
<label>New Products Names Only Template</label>
|
40 |
+
</list_names>
|
41 |
+
<list_images translate="label">
|
42 |
+
<value>catalog/product/widget/new/column/new_images_list.phtml</value>
|
43 |
+
<label>New Products Images Only Template</label>
|
44 |
+
</list_images>
|
45 |
+
</values>
|
46 |
+
</template>
|
47 |
+
</parameters>
|
48 |
+
<supported_blocks>
|
49 |
+
<left_column>
|
50 |
+
<block_name>left</block_name>
|
51 |
+
<template>
|
52 |
+
<default>list_default</default>
|
53 |
+
<names_only>list_names</names_only>
|
54 |
+
<images_only>list_images</images_only>
|
55 |
+
</template>
|
56 |
+
</left_column>
|
57 |
+
<main_content>
|
58 |
+
<block_name>content</block_name>
|
59 |
+
<template>
|
60 |
+
<grid>default</grid>
|
61 |
+
<list>list</list>
|
62 |
+
</template>
|
63 |
+
</main_content>
|
64 |
+
<right_column>
|
65 |
+
<block_name>right</block_name>
|
66 |
+
<template>
|
67 |
+
<default>list_default</default>
|
68 |
+
<names_only>list_names</names_only>
|
69 |
+
<images_only>list_images</images_only>
|
70 |
+
</template>
|
71 |
+
</right_column>
|
72 |
+
</supported_blocks>
|
73 |
+
</new_products>
|
74 |
+
|
75 |
+
<recently_viewed>
|
76 |
+
<parameters>
|
77 |
+
<template>
|
78 |
+
<values>
|
79 |
+
<list_default translate="label">
|
80 |
+
<value>reports/widget/viewed/column/viewed_default_list.phtml</value>
|
81 |
+
<label>Viewed Products Images and Names Template</label>
|
82 |
+
</list_default>
|
83 |
+
<list_names translate="label">
|
84 |
+
<value>reports/widget/viewed/column/viewed_names_list.phtml</value>
|
85 |
+
<label>Viewed Products Names Only Template</label>
|
86 |
+
</list_names>
|
87 |
+
<list_images translate="label">
|
88 |
+
<value>reports/widget/viewed/column/viewed_images_list.phtml</value>
|
89 |
+
<label>Viewed Products Images Only Template</label>
|
90 |
+
</list_images>
|
91 |
+
</values>
|
92 |
+
</template>
|
93 |
+
</parameters>
|
94 |
+
<supported_blocks>
|
95 |
+
<left_column>
|
96 |
+
<block_name>left</block_name>
|
97 |
+
<template>
|
98 |
+
<default>list_default</default>
|
99 |
+
<names_only>list_names</names_only>
|
100 |
+
<images_only>list_images</images_only>
|
101 |
+
</template>
|
102 |
+
</left_column>
|
103 |
+
<main_content>
|
104 |
+
<block_name>content</block_name>
|
105 |
+
<template>
|
106 |
+
<grid>default</grid>
|
107 |
+
<list>list</list>
|
108 |
+
</template>
|
109 |
+
</main_content>
|
110 |
+
<right_column>
|
111 |
+
<block_name>right</block_name>
|
112 |
+
<template>
|
113 |
+
<default>list_default</default>
|
114 |
+
<names_only>list_names</names_only>
|
115 |
+
<images_only>list_images</images_only>
|
116 |
+
</template>
|
117 |
+
</right_column>
|
118 |
+
</supported_blocks>
|
119 |
+
</recently_viewed>
|
120 |
+
|
121 |
+
<recently_compared>
|
122 |
+
<parameters>
|
123 |
+
<template>
|
124 |
+
<values>
|
125 |
+
<list_default translate="label">
|
126 |
+
<value>reports/widget/compared/column/compared_default_list.phtml</value>
|
127 |
+
<label>Compared Products Images and Names Template</label>
|
128 |
+
</list_default>
|
129 |
+
<list_names translate="label">
|
130 |
+
<value>reports/widget/compared/column/compared_names_list.phtml</value>
|
131 |
+
<label>Compared Product Names Only Template</label>
|
132 |
+
</list_names>
|
133 |
+
<list_images translate="label">
|
134 |
+
<value>reports/widget/compared/column/compared_images_list.phtml</value>
|
135 |
+
<label>Compared Product Images Only Template</label>
|
136 |
+
</list_images>
|
137 |
+
</values>
|
138 |
+
</template>
|
139 |
+
</parameters>
|
140 |
+
<supported_blocks>
|
141 |
+
<left_column>
|
142 |
+
<block_name>left</block_name>
|
143 |
+
<template>
|
144 |
+
<default>list_default</default>
|
145 |
+
<names_only>list_names</names_only>
|
146 |
+
<images_only>list_images</images_only>
|
147 |
+
</template>
|
148 |
+
</left_column>
|
149 |
+
<main_content>
|
150 |
+
<block_name>content</block_name>
|
151 |
+
<template>
|
152 |
+
<grid>default</grid>
|
153 |
+
<list>list</list>
|
154 |
+
</template>
|
155 |
+
</main_content>
|
156 |
+
<right_column>
|
157 |
+
<block_name>right</block_name>
|
158 |
+
<template>
|
159 |
+
<default>list_default</default>
|
160 |
+
<names_only>list_names</names_only>
|
161 |
+
<images_only>list_images</images_only>
|
162 |
+
</template>
|
163 |
+
</right_column>
|
164 |
+
</supported_blocks>
|
165 |
+
</recently_compared>
|
166 |
+
</widgets>
|
app/design/frontend/ma2/default/layout/local.xml
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout>
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addJs"><script>prototype/prototype.js</script></action>
|
6 |
+
<action method="addJs"><script>lib/ccard.js</script></action>
|
7 |
+
<action method="addJs"><script>prototype/validation.js</script></action>
|
8 |
+
<action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
|
9 |
+
<action method="addJs"><script>scriptaculous/builder.js</script></action>
|
10 |
+
<action method="addJs"><script>scriptaculous/effects.js</script></action>
|
11 |
+
<action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
|
12 |
+
<action method="addJs"><script>scriptaculous/controls.js</script></action>
|
13 |
+
<action method="addJs"><script>scriptaculous/slider.js</script></action>
|
14 |
+
<action method="addJs"><script>varien/js.js</script></action>
|
15 |
+
<action method="addJs"><script>varien/form.js</script></action>
|
16 |
+
<action method="addJs"><script>varien/menu.js</script></action>
|
17 |
+
<action method="addJs"><script>mage/translate.js</script></action>
|
18 |
+
<action method="addJs"><script>mage/cookies.js</script></action>
|
19 |
+
|
20 |
+
<block type="page/js_cookie" name="js_cookies" template="page/js/cookie.phtml"/>
|
21 |
+
|
22 |
+
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action>
|
23 |
+
<action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 9</if></action>
|
24 |
+
<action method="addCss"><stylesheet>css/widgets.css</stylesheet></action>
|
25 |
+
<action method="addCss"><stylesheet>css/print.css</stylesheet><params>media="print"</params></action>
|
26 |
+
|
27 |
+
<action method="addCss"><stylesheet>css/navmain.css</stylesheet></action>
|
28 |
+
<action method="addCss"><stylesheet>css/template.css</stylesheet></action>
|
29 |
+
<action method="addCss"><stylesheet>css/custom.css</stylesheet></action>
|
30 |
+
|
31 |
+
<action method="addItem"><type>js</type><name>lib/ds-sleight.js</name><params/><if>lt IE 7</if></action>
|
32 |
+
<action method="addItem"><type>skin_js</type><name>js/ie6.js</name><params/><if>lt IE 7</if></action>
|
33 |
+
</reference>
|
34 |
+
|
35 |
+
<reference name="root">
|
36 |
+
<action method="setTemplate">
|
37 |
+
<template>page/1column.phtml</template>
|
38 |
+
</action>
|
39 |
+
<action method="setIsHandle">
|
40 |
+
<applied>1</applied>
|
41 |
+
</action>
|
42 |
+
|
43 |
+
<block type="page/html_maintopblock1" name="maintop.block1" as="maintopBlock1" template="page/html/maintopBlock1.phtml">
|
44 |
+
<label>Main top block 1</label>
|
45 |
+
</block>
|
46 |
+
<block type="page/html_maintopblock2" name="maintop.block2" as="maintopBlock2" template="page/html/maintopBlock2.phtml">
|
47 |
+
<label>Main top block 2</label>
|
48 |
+
</block>
|
49 |
+
<block type="page/html_maintopblock3" name="maintop.block3" as="maintopBlock3" template="page/html/maintopBlock3.phtml">
|
50 |
+
<label>Main top block 3</label>
|
51 |
+
</block>
|
52 |
+
|
53 |
+
<block type="page/html_bottomblock1" name="bottom.block1" as="bottomBlock1" template="page/html/bottomBlock1.phtml">
|
54 |
+
<label>Bottom block 1</label>
|
55 |
+
</block>
|
56 |
+
<block type="page/html_bottomblock2" name="bottom.block2" as="bottomBlock2" template="page/html/bottomBlock2.phtml">
|
57 |
+
<label>Bottom block 2</label>
|
58 |
+
</block>
|
59 |
+
<block type="page/html_bottomblock3" name="bottom.block3" as="bottomBlock3" template="page/html/bottomBlock3.phtml">
|
60 |
+
<label>Bottom block 3</label>
|
61 |
+
</block>
|
62 |
+
</reference>
|
63 |
+
|
64 |
+
<reference name="header">
|
65 |
+
<block type="core/template" name="preset.styles.box" as="presetStylesBox" template="page/html/presetstyles.phtml"/>
|
66 |
+
|
67 |
+
<block type="page/html_topblock1" name="top.block1" as="topBlock1" template="page/html/topBlock1.phtml">
|
68 |
+
<label>Top1 blocks</label>
|
69 |
+
<block type="checkout/cart_sidebar" name="header.cart_sidebar" template="checkout/cart/sidebar.phtml" after="-">
|
70 |
+
</block>
|
71 |
+
</block>
|
72 |
+
<block type="page/html_topblock2" name="top.block2" as="topBlock2" template="page/html/topBlock2.phtml">
|
73 |
+
<label>Top2 blocks</label>
|
74 |
+
<block type="core/template" name="top.search" as="topSearch" before="-" template="catalogsearch/form.mini.phtml"/>
|
75 |
+
</block>
|
76 |
+
<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
|
77 |
+
<block type="page/html_topmenu" name="catalog.topnav" template="page/html/topMenu.phtml"/>
|
78 |
+
</block>
|
79 |
+
</reference>
|
80 |
+
|
81 |
+
<reference name="left">
|
82 |
+
<remove name="left.permanent.callout"/>
|
83 |
+
<remove name="catalog.leftnav"/>
|
84 |
+
<remove name="left.newsletter"/>
|
85 |
+
</reference>
|
86 |
+
|
87 |
+
<reference name="right">
|
88 |
+
<remove name="cart_sidebar"/>
|
89 |
+
<remove name="catalog.compare.sidebar"/>
|
90 |
+
<remove name="right.permanent.callout"/>
|
91 |
+
<remove name="right.poll"/>
|
92 |
+
<remove name="paypal.partner.right.logo"/>
|
93 |
+
</reference>
|
94 |
+
|
95 |
+
<reference name="content">
|
96 |
+
|
97 |
+
</reference>
|
98 |
+
|
99 |
+
<reference name="footer">
|
100 |
+
<remove name="store_switcher"/>
|
101 |
+
<remove name="footer_links"/>
|
102 |
+
|
103 |
+
<block type="page/html_footerblock1" name="footer.block1" as="footerBlock1" template="page/html/footerBlock1.phtml">
|
104 |
+
<label>Footer block 1</label>
|
105 |
+
</block>
|
106 |
+
<block type="page/html_footerblock2" name="footer.block2" as="footerBlock2" template="page/html/footerBlock2.phtml">
|
107 |
+
<label>Footer block 2</label>
|
108 |
+
</block>
|
109 |
+
</reference>
|
110 |
+
|
111 |
+
<reference name="top.links">
|
112 |
+
<!-- <remove name="wishlist_link"/>
|
113 |
+
<remove name="checkout_cart_link"/>
|
114 |
+
<action method="removeLinkByUrl"><url helper="customer/getAccountUrl"/></action>
|
115 |
+
<action method="removeLinkByUrl"><url helper="checkout/cart/getCartUrl"/></action>
|
116 |
+
<action after="-" method="addLink" translate="label title" module="customer"><label>Create an account</label><url helper="customer/getRegisterUrl"/><title>Create an account</title><prepare/><urlParams/><position>100</position></action> -->
|
117 |
+
</reference>
|
118 |
+
</default>
|
119 |
+
|
120 |
+
<!--
|
121 |
+
Category default layout
|
122 |
+
-->
|
123 |
+
<catalog_category_default>
|
124 |
+
<reference name="root">
|
125 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
126 |
+
</reference>
|
127 |
+
<reference name="right">
|
128 |
+
<remove name="sale.reorder.sidebar"/>
|
129 |
+
<remove name="wishlist_sidebar"/>
|
130 |
+
<remove name="catalog.compare.sidebar"/>
|
131 |
+
<remove name="catalog.product.related"/>
|
132 |
+
<remove name="right.reports.product.viewed"/>
|
133 |
+
<remove name="left.reports.product.viewed"/>
|
134 |
+
<block type="catalog/navigation" name="catalog.rightnav" before="-" template="catalog/navigation/right.phtml"/>
|
135 |
+
</reference>
|
136 |
+
</catalog_category_default>
|
137 |
+
|
138 |
+
<!--
|
139 |
+
Category layered navigation layout
|
140 |
+
-->
|
141 |
+
<catalog_category_layered>
|
142 |
+
<reference name="root">
|
143 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
144 |
+
</reference>
|
145 |
+
<reference name="right">
|
146 |
+
<remove name="catalog.product.related"/>
|
147 |
+
<remove name="right.reports.product.viewed"/>
|
148 |
+
</reference>
|
149 |
+
<reference name="content">
|
150 |
+
|
151 |
+
</reference>
|
152 |
+
</catalog_category_layered>
|
153 |
+
|
154 |
+
<!--
|
155 |
+
Compare products page
|
156 |
+
-->
|
157 |
+
<catalog_product_compare_index>
|
158 |
+
<!-- Mage_Catalog -->
|
159 |
+
<reference name="root">
|
160 |
+
<action method="setTemplate"><template>page/popup.phtml</template></action>
|
161 |
+
</reference>
|
162 |
+
<reference name="head">
|
163 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
164 |
+
</reference>
|
165 |
+
<reference name="right">
|
166 |
+
<remove name="catalog.product.related"/>
|
167 |
+
<remove name="right.reports.product.viewed"/>
|
168 |
+
</reference>
|
169 |
+
<reference name="content">
|
170 |
+
|
171 |
+
</reference>
|
172 |
+
</catalog_product_compare_index>
|
173 |
+
|
174 |
+
<!--
|
175 |
+
Product view
|
176 |
+
-->
|
177 |
+
<catalog_product_view>
|
178 |
+
<!-- Mage_Catalog -->
|
179 |
+
<reference name="root">
|
180 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
181 |
+
</reference>
|
182 |
+
<reference name="head">
|
183 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
184 |
+
<action method="addJs"><script>varien/configurable.js</script></action>
|
185 |
+
|
186 |
+
<action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/></action>
|
187 |
+
<action method="addItem"><type>skin_css</type><name>css/producttabs.css</name><params/></action>
|
188 |
+
<action method="addItem"><type>js</type><name>calendar/calendar.js</name></action>
|
189 |
+
<action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name></action>
|
190 |
+
<action method="addItem"><type>js</type><name>ma2/widgettabs.js</name></action>
|
191 |
+
</reference>
|
192 |
+
<reference name="right">
|
193 |
+
<remove name="sale.reorder.sidebar"/>
|
194 |
+
<remove name="catalog.product.related"/>
|
195 |
+
<remove name="right.reports.product.viewed"/>
|
196 |
+
<block type="catalog/navigation" name="catalog.rightnav" before="-" template="catalog/navigation/right.phtml"/>
|
197 |
+
</reference>
|
198 |
+
<reference name="content">
|
199 |
+
<block type="catalog/product_list_related" name="product.view.related" after="-" template="catalog/product/list/related.phtml"/>
|
200 |
+
</reference>
|
201 |
+
</catalog_product_view>
|
202 |
+
|
203 |
+
<catalogsearch_result_index>
|
204 |
+
<remove name="right"/>
|
205 |
+
</catalogsearch_result_index>
|
206 |
+
|
207 |
+
<!--
|
208 |
+
Checkout page default layout, loads most of the pages
|
209 |
+
-->
|
210 |
+
<checkout_cart_index>
|
211 |
+
<reference name="root">
|
212 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
213 |
+
</reference>
|
214 |
+
<remove name="right"/>
|
215 |
+
<!--
|
216 |
+
<reference name="right">
|
217 |
+
<remove name="sale.reorder.sidebar"/>
|
218 |
+
<remove name="wishlist_sidebar"/>
|
219 |
+
<remove name="catalog.compare.sidebar"/>
|
220 |
+
<remove name="catalog.product.related"/>
|
221 |
+
<remove name="right.reports.product.viewed"/>
|
222 |
+
<remove name="left.reports.product.viewed"/>
|
223 |
+
</reference> -->
|
224 |
+
</checkout_cart_index>
|
225 |
+
|
226 |
+
<checkout_onepage_index>
|
227 |
+
<reference name="root">
|
228 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
229 |
+
</reference>
|
230 |
+
<remove name="left"/>
|
231 |
+
<remove name="right"/>
|
232 |
+
</checkout_onepage_index>
|
233 |
+
|
234 |
+
<checkout_onepage_success>
|
235 |
+
<reference name="root">
|
236 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
237 |
+
</reference>
|
238 |
+
<remove name="right"/>
|
239 |
+
<!-- <reference name="right">
|
240 |
+
<remove name="sale.reorder.sidebar"/>
|
241 |
+
<remove name="wishlist_sidebar"/>
|
242 |
+
<remove name="catalog.compare.sidebar"/>
|
243 |
+
<remove name="catalog.product.related"/>
|
244 |
+
<remove name="right.reports.product.viewed"/>
|
245 |
+
<remove name="left.reports.product.viewed"/>
|
246 |
+
</reference> -->
|
247 |
+
</checkout_onepage_success>
|
248 |
+
|
249 |
+
<review_product_list>
|
250 |
+
<reference name="right">
|
251 |
+
<remove name="sale.reorder.sidebar"/>
|
252 |
+
<remove name="wishlist_sidebar"/>
|
253 |
+
<remove name="catalog.compare.sidebar"/>
|
254 |
+
<remove name="catalog.product.related"/>
|
255 |
+
<remove name="right.reports.product.viewed"/>
|
256 |
+
<remove name="left.reports.product.viewed"/>
|
257 |
+
</reference>
|
258 |
+
</review_product_list>
|
259 |
+
|
260 |
+
<!--
|
261 |
+
Wishlist pages
|
262 |
+
-->
|
263 |
+
<wishlist_index_index>
|
264 |
+
<reference name="right">
|
265 |
+
<remove name="sale.reorder.sidebar"/>
|
266 |
+
<remove name="wishlist_sidebar"/>
|
267 |
+
<remove name="catalog.compare.sidebar"/>
|
268 |
+
<remove name="catalog.product.related"/>
|
269 |
+
<remove name="right.reports.product.viewed"/>
|
270 |
+
<remove name="left.reports.product.viewed"/>
|
271 |
+
</reference>
|
272 |
+
</wishlist_index_index>
|
273 |
+
|
274 |
+
<!--
|
275 |
+
CMS page default layout, loads most of the pages
|
276 |
+
-->
|
277 |
+
<cms_page>
|
278 |
+
<reference name="root">
|
279 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
280 |
+
</reference>
|
281 |
+
<reference name="right">
|
282 |
+
<remove name="sale.reorder.sidebar"/>
|
283 |
+
<remove name="wishlist_sidebar"/>
|
284 |
+
<remove name="catalog.compare.sidebar"/>
|
285 |
+
<remove name="catalog.product.related"/>
|
286 |
+
<remove name="right.reports.product.viewed"/>
|
287 |
+
<remove name="left.reports.product.viewed"/>
|
288 |
+
<!-- <block type="catalog/navigation" name="catalog.rightnav" before="-" template="catalog/navigation/right.phtml"/> -->
|
289 |
+
</reference>
|
290 |
+
<reference name="content">
|
291 |
+
|
292 |
+
</reference>
|
293 |
+
</cms_page>
|
294 |
+
|
295 |
+
<!--
|
296 |
+
Load this update on every page when customer is logged in
|
297 |
+
-->
|
298 |
+
<customer_logged_in>
|
299 |
+
<reference name="top.links">
|
300 |
+
<!-- <action method="removeLinkByUrl"><url helper="customer/getRegisterUrl"/></action> -->
|
301 |
+
</reference>
|
302 |
+
</customer_logged_in>
|
303 |
+
|
304 |
+
<!--
|
305 |
+
Load this update on every page when customer is logged out
|
306 |
+
-->
|
307 |
+
<customer_logged_out>
|
308 |
+
<reference name="top.links">
|
309 |
+
|
310 |
+
</reference>
|
311 |
+
</customer_logged_out>
|
312 |
+
</layout>
|
app/design/frontend/ma2/default/layout/ma2featuredproducts.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<featuredproducts_index_index>
|
4 |
+
<reference name="content">
|
5 |
+
<block type="featuredproducts/product_list" name="featured_product_list" template="ma2featuredproducts/featuredproducts.phtml" />
|
6 |
+
</reference>
|
7 |
+
</featuredproducts_index_index>
|
8 |
+
</layout>
|
app/design/frontend/ma2/default/layout/ma2slideshow.xml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem"><type>skin_css</type><stylesheet>css/ma2slideshow/protoshow.css</stylesheet></action>
|
6 |
+
<action method="addItem"><type>skin_css</type><stylesheet>css/ma2slideshow/styles.css</stylesheet></action>
|
7 |
+
<action method="addItem"><type>skin_js</type><name>js/ma2slideshow/protoshow.js</name></action>
|
8 |
+
</reference>
|
9 |
+
<!-- <reference name="root">
|
10 |
+
<block type="slideshow/slideshow" name="ma2slideshow" template="ma2slideshow/slideshow.phtml" />
|
11 |
+
</reference> -->
|
12 |
+
</default>
|
13 |
+
</layout>
|
app/design/frontend/ma2/default/layout/ma2widgettabs.xml
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<!-- <action method="addItem"><type>skin_css</type><stylesheet>css/ma2tabs/magento.css</stylesheet></action> -->
|
6 |
+
<action method="addItem"><type>skin_css</type><stylesheet>css/ma2widgettabs/widgettabs.css</stylesheet></action>
|
7 |
+
<action method="addItem"><type>skin_js</type><name>js/ma2widgettabs/widgettabs.js</name></action>
|
8 |
+
</reference>
|
9 |
+
<!-- <reference name="root">
|
10 |
+
<block type="WidgetTabs/WidgetTabs" name="ma2WidgetTabs" template="ma2widgettabs/widgettabs.phtml" />
|
11 |
+
</reference> -->
|
12 |
+
</default>
|
13 |
+
</layout>
|
app/design/frontend/ma2/default/template/catalog/category/page.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 base_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 |
+
* @deprecated after 1.4.0.0-alpha3
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<div class="page-title">
|
32 |
+
<h1><?php echo $this->getTitle() ?></h1>
|
33 |
+
</div>
|
34 |
+
<div>
|
35 |
+
<?php echo $this->getContent() ?>
|
36 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/category/view.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 base_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 |
+
* Category view template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Category_View
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_helper = $this->helper('catalog/output');
|
36 |
+
$_category = $this->getCurrentCategory();
|
37 |
+
$_imgHtml = '';
|
38 |
+
if ($_imgUrl = $_category->getImageUrl()) {
|
39 |
+
$_imgHtml = '<p class="category-image"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
|
40 |
+
$_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
|
41 |
+
}
|
42 |
+
?>
|
43 |
+
<div class="page-title category-title">
|
44 |
+
<?php if($this->IsRssCatalogEnable() && $this->IsTopCategory()): ?>
|
45 |
+
<a href="<?php echo $this->getRssLink() ?>" class="link-rss"><?php echo $this->__('Subscribe to RSS Feed') ?></a>
|
46 |
+
<?php endif; ?>
|
47 |
+
<h1><?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?></h1>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
51 |
+
|
52 |
+
<?php if($_imgUrl): ?>
|
53 |
+
<?php echo $_imgHtml ?>
|
54 |
+
<?php endif; ?>
|
55 |
+
|
56 |
+
<?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
|
57 |
+
<div class="category-description std">
|
58 |
+
<?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
|
59 |
+
</div>
|
60 |
+
<?php endif; ?>
|
61 |
+
|
62 |
+
<?php if($this->isContentMode()): ?>
|
63 |
+
<?php echo $this->getCmsBlockHtml() ?>
|
64 |
+
|
65 |
+
<?php elseif($this->isMixedMode()): ?>
|
66 |
+
<?php echo $this->getCmsBlockHtml() ?>
|
67 |
+
<?php echo $this->getProductListHtml() ?>
|
68 |
+
|
69 |
+
<?php else: ?>
|
70 |
+
<?php echo $this->getProductListHtml() ?>
|
71 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/category/widget/link/link_block.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 base_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 |
+
<span class="widget widget-category-link"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
|
app/design/frontend/ma2/default/template/catalog/category/widget/link/link_inline.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 base_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 |
+
<span class="widget widget-category-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
|
app/design/frontend/ma2/default/template/catalog/layer/filter.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 base_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 filter items block
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Layer_Filter
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<ol>
|
36 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
37 |
+
<li>
|
38 |
+
<?php if ($_item->getCount() > 0): ?>
|
39 |
+
<a href="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></a>
|
40 |
+
<?php else: echo $_item->getLabel() ?>
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php if ($this->shouldDisplayProductCount()): ?>
|
43 |
+
(<?php echo $_item->getCount() ?>)
|
44 |
+
<?php endif; ?>
|
45 |
+
</li>
|
46 |
+
<?php endforeach ?>
|
47 |
+
</ol>
|
app/design/frontend/ma2/default/template/catalog/layer/state.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 base_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 |
+
* Category layered navigation state
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Layer_State
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $_filters = $this->getActiveFilters() ?>
|
35 |
+
<?php if(!empty($_filters)): ?>
|
36 |
+
<div class="currently">
|
37 |
+
<p class="block-subtitle"><?php echo $this->__('Currently Shopping by:') ?></p>
|
38 |
+
<ol>
|
39 |
+
<?php foreach ($_filters as $_filter): ?>
|
40 |
+
<li>
|
41 |
+
<span class="label"><?php echo $this->__($_filter->getName()) ?>:</span> <span class="value"><?php echo $this->stripTags($_filter->getLabel()) ?></span>
|
42 |
+
<?php
|
43 |
+
$clearLinkUrl = $_filter->getClearLinkUrl();
|
44 |
+
if ($clearLinkUrl):
|
45 |
+
?>
|
46 |
+
<a class="btn-previous" href="<?php echo $_filter->getRemoveUrl() ?>" title="<?php echo $this->__('Previous') ?>"><?php echo $this->__('Previous') ?></a>
|
47 |
+
<a class="btn-remove" title="<?php echo $this->escapeHtml($_filter->getFilter()->getClearLinkText()) ?>" href="<?php echo $clearLinkUrl ?>"><?php echo $this->escapeHtml($_filter->getFilter()->getClearLinkText()) ?></a>
|
48 |
+
<?php else: ?>
|
49 |
+
<a class="btn-remove" href="<?php echo $_filter->getRemoveUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>"><?php echo $this->__('Remove This Item') ?></a>
|
50 |
+
<?php endif; ?>
|
51 |
+
</li>
|
52 |
+
<?php endforeach; ?>
|
53 |
+
</ol>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/layer/view.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 base_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 |
+
* Category layered navigation
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Layer_View
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->canShowBlock()): ?>
|
35 |
+
<div class="block block-layered-nav">
|
36 |
+
<div class="block-title">
|
37 |
+
<strong><span><?php echo $this->__('Shop By') ?></span></strong>
|
38 |
+
</div>
|
39 |
+
<div class="block-content">
|
40 |
+
<?php echo $this->getStateHtml() ?>
|
41 |
+
<?php if ($this->getLayer()->getState()->getFilters()): ?>
|
42 |
+
<div class="actions"><a href="<?php echo $this->getClearUrl() ?>"><?php echo $this->__('Clear All') ?></a></div>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php if($this->canShowOptions()): ?>
|
45 |
+
<p class="block-subtitle"><?php echo $this->__('Shopping Options') ?></p>
|
46 |
+
<dl id="narrow-by-list">
|
47 |
+
<?php $_filters = $this->getFilters() ?>
|
48 |
+
<?php foreach ($_filters as $_filter): ?>
|
49 |
+
<?php if($_filter->getItemsCount()): ?>
|
50 |
+
<dt><?php echo $this->__($_filter->getName()) ?></dt>
|
51 |
+
<dd><?php echo $_filter->getHtml() ?></dd>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php endforeach; ?>
|
54 |
+
</dl>
|
55 |
+
<script type="text/javascript">decorateDataList('narrow-by-list')</script>
|
56 |
+
<?php endif; ?>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/msrp/popup.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 base_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 MAP popup
|
30 |
+
*
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php if (Mage::helper('catalog')->isMsrpEnabled()): ?>
|
34 |
+
<div id="map-popup" class="map-popup" style="display:none;">
|
35 |
+
<a href="#" class="map-popup-close" id="map-popup-close">x</a>
|
36 |
+
<div class="map-popup-arrow"></div>
|
37 |
+
<div class="map-popup-heading"><h2 id="map-popup-heading"></h2></div>
|
38 |
+
<div class="map-popup-content" id="map-popup-content">
|
39 |
+
<div class="map-popup-checkout">
|
40 |
+
<form action="" method="POST" id="product_addtocart_form_from_popup">
|
41 |
+
<input type="hidden" name="product" class="product_id" value="" id="map-popup-product-id" />
|
42 |
+
<div class="additional-addtocart-box">
|
43 |
+
<?php echo $this->getChildHtml(); ?>
|
44 |
+
</div>
|
45 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" id="map-popup-button"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
46 |
+
</form>
|
47 |
+
</div>
|
48 |
+
<div class="map-popup-msrp" id="map-popup-msrp-box"><strong><?php echo $this->__('Price'); ?>:</strong> <span style="text-decoration:line-through;" id="map-popup-msrp"></span></div>
|
49 |
+
<div class="map-popup-price" id="map-popup-price-box"><strong><?php echo $this->__('Actual Price'); ?>:</strong> <span id="map-popup-price"></span></div>
|
50 |
+
<script type="text/javascript">
|
51 |
+
//<![CDATA[
|
52 |
+
document.observe("dom:loaded", Catalog.Map.bindProductForm);
|
53 |
+
//]]>
|
54 |
+
</script>
|
55 |
+
</div>
|
56 |
+
<div class="map-popup-text" id="map-popup-text"><?php echo Mage::helper('catalog')->getMsrpExplanationMessage(); ?></div>
|
57 |
+
<div class="map-popup-text" id="map-popup-text-what-this"><?php echo Mage::helper('catalog')->getMsrpExplanationMessageWhatsThis(); ?></div>
|
58 |
+
</div>
|
59 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/navigation/left.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 base_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 |
+
* Category left navigation
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Navigation
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php if (!Mage::registry('current_category')) return ?>
|
34 |
+
<?php $_categories = $this->getCurrentChildCategories() ?>
|
35 |
+
<?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
|
36 |
+
<?php if($_count): ?>
|
37 |
+
<div class="block block-layered-nav">
|
38 |
+
<div class="block-title">
|
39 |
+
<strong><span><?php echo $this->__('Browse By') ?></span></strong>
|
40 |
+
</div>
|
41 |
+
<div class="block-content">
|
42 |
+
<dl id="narrow-by-list2">
|
43 |
+
<dt><?php echo $this->__('Category') ?></dt>
|
44 |
+
<dd>
|
45 |
+
<ol>
|
46 |
+
<?php foreach ($_categories as $_category): ?>
|
47 |
+
<?php if($_category->getIsActive()): ?>
|
48 |
+
<li>
|
49 |
+
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
|
50 |
+
</li>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php endforeach ?>
|
53 |
+
</ol>
|
54 |
+
</dd>
|
55 |
+
</dl>
|
56 |
+
<script type="text/javascript">decorateDataList('narrow-by-list2')</script>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/navigation/right.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 base_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 |
+
* Category left navigation
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Navigation
|
31 |
+
*/
|
32 |
+
|
33 |
+
//get all children
|
34 |
+
function displaySubCategories($navBlock, $categries){
|
35 |
+
$_helper = Mage::helper('catalog/category');
|
36 |
+
if (count($categries) > 0){
|
37 |
+
echo '<ul>';
|
38 |
+
foreach($categries as $_subcategory){
|
39 |
+
if($_subcategory->getIsActive()){
|
40 |
+
if ($navBlock->isCategoryActive($_subcategory)) {
|
41 |
+
$current = 'class="current"';
|
42 |
+
} else {
|
43 |
+
$current = '';
|
44 |
+
}
|
45 |
+
if($_subcategory->hasChildren()){
|
46 |
+
$parent = 'class="parent"';
|
47 |
+
} else {
|
48 |
+
$parent = '';
|
49 |
+
}
|
50 |
+
echo '<li id="item-'.$_subcategory->getId().'" '. $parent .'>';
|
51 |
+
echo ' <a '. $current .' href="'.$_helper->getCategoryUrl($_subcategory).'">
|
52 |
+
'.$_subcategory->getName().'<span class="product-count">('.$_subcategory->getProductCount().')</span>
|
53 |
+
</a>';
|
54 |
+
|
55 |
+
$_subcategories = $_subcategory->getChildrenCategories();
|
56 |
+
displaySubCategories($navBlock, $_subcategories);
|
57 |
+
echo '</li>';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
echo '</ul>';
|
61 |
+
}
|
62 |
+
}
|
63 |
+
?>
|
64 |
+
<?php $_helper = Mage::helper('catalog/category') ?>
|
65 |
+
<?php $_categories = $_helper->getStoreCategories() ?>
|
66 |
+
<?php if (count($_categories) > 0): ?>
|
67 |
+
<div class="widget reference-block">
|
68 |
+
<div class="block-title">
|
69 |
+
<span>Browse Categories</span>
|
70 |
+
</div>
|
71 |
+
<ul class="list-category">
|
72 |
+
<?php foreach($_categories as $_category): ?>
|
73 |
+
<?php if($_category->getIsActive()): ?>
|
74 |
+
<li id="item-<?php echo $_category->getId(); ?>" <?php echo $_category->hasChildren() ? 'class="parent"' : '' ?>>
|
75 |
+
<?php $_category = Mage::getModel('catalog/category')
|
76 |
+
->load($_category->getId()) ?>
|
77 |
+
|
78 |
+
<a href="<?php echo $_helper->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>>
|
79 |
+
<?php echo $_category->getName() ?><span class="product-count">(<?php echo $_category->getProductCount() ?>)</span>
|
80 |
+
</a>
|
81 |
+
<?php
|
82 |
+
$_subcategories = $_category->getChildrenCategories();
|
83 |
+
displaySubCategories($this, $_subcategories);
|
84 |
+
?>
|
85 |
+
</li>
|
86 |
+
<?php endif; ?>
|
87 |
+
<?php endforeach; ?>
|
88 |
+
</ul>
|
89 |
+
</div>
|
90 |
+
<?php endif; ?>
|
91 |
+
|
app/design/frontend/ma2/default/template/catalog/navigation/top.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 base_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 |
+
* Top menu for store
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Navigation
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
/**
|
36 |
+
* $this->renderCategoriesMenuHtml() supports optional arguments:
|
37 |
+
* int Level number for list item class to start from
|
38 |
+
* string Extra class of outermost list items
|
39 |
+
* string If specified wraps children list in div with this class
|
40 |
+
*/
|
41 |
+
?>
|
42 |
+
<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
|
43 |
+
<?php if($_menu): ?>
|
44 |
+
<div class="nav-container">
|
45 |
+
<ul id="nav">
|
46 |
+
<?php echo $_menu ?>
|
47 |
+
</ul>
|
48 |
+
</div>
|
49 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalog/product/compare/list.phtml
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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_Catalog_Block_Product_Compare_List */
|
27 |
+
?>
|
28 |
+
<div class="page-title title-buttons">
|
29 |
+
<h1><?php echo $this->__('Compare Products') ?></h1>
|
30 |
+
<a href="#" onclick="window.print(); return false;" class="link-print"><?php echo $this->__('Print This Page') ?></a>
|
31 |
+
</div>
|
32 |
+
<?php $_total=$this->getItems()->getSize() ?>
|
33 |
+
<?php if($_total): ?>
|
34 |
+
<table class="data-table compare-table" id="product_comparison">
|
35 |
+
<?php $_i=0 ?>
|
36 |
+
<?php foreach($this->getItems() as $_item): ?>
|
37 |
+
<?php if($_i++%10==0): ?>
|
38 |
+
<col width="1" />
|
39 |
+
<?php endif; ?>
|
40 |
+
<col width="<?php echo floor(100/$_total); ?>%" />
|
41 |
+
<?php endforeach; ?>
|
42 |
+
<?php if ($_total>2): ?>
|
43 |
+
<thead>
|
44 |
+
<tr>
|
45 |
+
<?php $_i=0 ?>
|
46 |
+
<?php foreach($this->getItems() as $_item): ?>
|
47 |
+
<?php if($_i++%10==0): ?>
|
48 |
+
<th> </th>
|
49 |
+
<?php endif; ?>
|
50 |
+
<td class="a-right"><a href="#" class="btn-remove" onclick="removeItem('<?php echo $this->helper('catalog/product_compare')->getRemoveUrl($_item) ?>');" title="<?php echo $this->__('Remove This Item') ?>"><?php echo $this->__('Remove This Item') ?></a></td>
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</tr>
|
53 |
+
</thead>
|
54 |
+
<?php endif ?>
|
55 |
+
<tbody>
|
56 |
+
<tr class="product-shop-row">
|
57 |
+
<?php $_i=0 ?>
|
58 |
+
<?php foreach($this->getItems() as $_item): ?>
|
59 |
+
<?php if($_i++%10==0): ?>
|
60 |
+
<th> </th>
|
61 |
+
<?php endif; ?>
|
62 |
+
<td>
|
63 |
+
<a class="product-image" href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->stripTags($_item->getName(), null, true) ?>" /></a>
|
64 |
+
<h2 class="product-name"><a href="#" onclick="setPLocation('<?php echo $this->getProductUrl($_item) ?>', true)" title="<?php echo $this->stripTags($_item->getName(), null, true) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a></h2>
|
65 |
+
<?php echo $this->getReviewsSummaryHtml($_item, 'short') ?>
|
66 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-top') ?>
|
67 |
+
<?php if($_item->isSaleable()): ?>
|
68 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
69 |
+
<?php else: ?>
|
70 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
71 |
+
<?php endif; ?>
|
72 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
73 |
+
<ul class="add-to-links">
|
74 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
75 |
+
</ul>
|
76 |
+
<?php endif; ?>
|
77 |
+
</td>
|
78 |
+
<?php endforeach; ?>
|
79 |
+
</tr>
|
80 |
+
</tbody>
|
81 |
+
<tbody>
|
82 |
+
<?php foreach ($this->getAttributes() as $_attribute): ?>
|
83 |
+
<tr>
|
84 |
+
<?php $_i=0 ?>
|
85 |
+
<?php foreach($this->getItems() as $_item): ?>
|
86 |
+
<?php if($_i++%10==0): ?>
|
87 |
+
<th><span class="nobr"><?php echo $_attribute->getStoreLabel() ?></span></th>
|
88 |
+
<?php endif; ?>
|
89 |
+
<td>
|
90 |
+
<?php switch ($_attribute->getAttributeCode()) {
|
91 |
+
case "price": ?>
|
92 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-' . $_attribute->getCode()) ?>
|
93 |
+
<?php break;
|
94 |
+
case "small_image": ?>
|
95 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(125, 125); ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" />
|
96 |
+
<?php break;
|
97 |
+
case "date":
|
98 |
+
echo substr($this->getProductAttributeValue($_item, $_attribute),0,10);
|
99 |
+
break;
|
100 |
+
default: ?>
|
101 |
+
<div class="std">
|
102 |
+
<?php echo $this->helper('catalog/output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?>
|
103 |
+
</div>
|
104 |
+
<?php break;
|
105 |
+
} ?>
|
106 |
+
</td>
|
107 |
+
<?php endforeach; ?>
|
108 |
+
</tr>
|
109 |
+
<?php endforeach; ?>
|
110 |
+
</tbody>
|
111 |
+
<tbody>
|
112 |
+
<tr class="add-to-row">
|
113 |
+
<?php $_i=0 ?>
|
114 |
+
<?php foreach($this->getItems() as $_item): ?>
|
115 |
+
<?php if($_i++%10==0): ?>
|
116 |
+
<th> </th>
|
117 |
+
<?php endif; ?>
|
118 |
+
<td>
|
119 |
+
<?php echo $this->getPriceHtml($_item, true, '-compare-list-bottom') ?>
|
120 |
+
<?php if($_item->isSaleable()): ?>
|
121 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setPLocation('<?php echo $this->helper('catalog/product_compare')->getAddToCartUrl($_item) ?>', true)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
122 |
+
<?php else: ?>
|
123 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
124 |
+
<?php endif; ?>
|
125 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
126 |
+
<ul class="add-to-links">
|
127 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item);?>" class="link-wishlist" onclick="setPLocation(this.href, true)"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
128 |
+
</ul>
|
129 |
+
<?php endif; ?>
|
130 |
+
</td>
|
131 |
+
<?php endforeach; ?>
|
132 |
+
</tr>
|
133 |
+
</tbody>
|
134 |
+
</table>
|
135 |
+
<div class="buttons-set">
|
136 |
+
<button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
|
137 |
+
<span class="please-wait" id="compare-list-please-wait" style="display:none;">
|
138 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Please wait...') ?>" title="<?php echo $this->__('Please wait...') ?>" class="v-middle" /> <?php echo $this->__('Please wait...') ?>
|
139 |
+
</span>
|
140 |
+
</div>
|
141 |
+
<script type="text/javascript">
|
142 |
+
decorateTable('product_comparison');
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Send remove item request, after that reload windows
|
146 |
+
*/
|
147 |
+
function removeItem(url)
|
148 |
+
{
|
149 |
+
new Ajax.Request(url, {
|
150 |
+
parameters: {isAjax: 1, method: 'POST'},
|
151 |
+
onLoading: function(){$('compare-list-please-wait').show();},
|
152 |
+
onSuccess: function(transport) {
|
153 |
+
$('compare-list-please-wait').hide();
|
154 |
+
window.location.reload();
|
155 |
+
window.opener.location.reload();
|
156 |
+
}
|
157 |
+
});
|
158 |
+
}
|
159 |
+
</script>
|
160 |
+
<?php else: ?>
|
161 |
+
<script type="text/javascript">window.close();</script>
|
162 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/compare/sidebar.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 base_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_Catalog_Block_Product_Compare_Sidebar */
|
27 |
+
?>
|
28 |
+
<?php
|
29 |
+
$_helper = $this->helper('catalog/product_compare');
|
30 |
+
$_items = $_helper->getItemCount() > 0 ? $_helper->getItemCollection() : null;
|
31 |
+
?>
|
32 |
+
<div class="block block-list block-compare">
|
33 |
+
<div class="block-title">
|
34 |
+
<strong><span><?php echo $this->__('Compare Products') ?>
|
35 |
+
<?php if($_helper->getItemCount() > 0): ?>
|
36 |
+
<small><?php echo $this->__('(%d)', $_helper->getItemCount()) ?></small>
|
37 |
+
<?php endif; ?>
|
38 |
+
</span></strong>
|
39 |
+
</div>
|
40 |
+
<div class="block-content">
|
41 |
+
<?php if($_helper->getItemCount() > 0): ?>
|
42 |
+
<ol id="compare-items">
|
43 |
+
<?php foreach($_items as $_index => $_item): ?>
|
44 |
+
<li class="item">
|
45 |
+
<input type="hidden" class="compare-item-id" value="<?php echo $_item->getId() ?>" />
|
46 |
+
<a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the compare products?') ?>');"><?php echo $this->__('Remove This Item') ?></a>
|
47 |
+
<p class="product-name"><a href="<?php echo $this->getProductUrl($_item) ?>"><?php echo $this->helper('catalog/output')->productAttribute($_item, $_item->getName(), 'name') ?></a></p>
|
48 |
+
</li>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
</ol>
|
51 |
+
<script type="text/javascript">decorateList('compare-items')</script>
|
52 |
+
<div class="actions">
|
53 |
+
<a href="<?php echo $_helper->getClearListUrl() ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove all products from your comparison?') ?>');"><?php echo $this->__('Clear All') ?></a>
|
54 |
+
<button type="button" title="<?php echo $this->__('Compare') ?>" class="button" onclick="popWin('<?php echo $_helper->getListUrl() ?>','compare','top:0,left:0,width=820,height=600,resizable=yes,scrollbars=yes')"><span><span><?php echo $this->__('Compare') ?></span></span></button>
|
55 |
+
</div>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="empty"><?php echo $this->__('You have no items to compare.') ?></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
</div>
|
60 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/gallery.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 base_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 $_width=$this->getImageWidth() ?>
|
28 |
+
<div class="product-image-popup" style="width:<?php echo $_width; ?>px;">
|
29 |
+
<div class="buttons-set"><a href="#" onclick="window.close(); return false;" class="button"><span><?php echo $this->__('Close Window') ?></span></a></div>
|
30 |
+
<?php if($this->getPreviusImageUrl() || $this->getNextImageUrl()): ?>
|
31 |
+
<div class="nav">
|
32 |
+
<?php if($_prevUrl = $this->getPreviusImageUrl()): ?>
|
33 |
+
<a href="<?php echo $_prevUrl ?>" class="prev">« <?php echo $this->__('Prev') ?></a>
|
34 |
+
<?php endif; ?>
|
35 |
+
<?php if($_nextUrl = $this->getNextImageUrl()): ?>
|
36 |
+
<a href="<?php echo $_nextUrl ?>" class="next"><?php echo $this->__('Next') ?> »</a>
|
37 |
+
<?php endif; ?>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
40 |
+
<?php if($_imageTitle = $this->htmlEscape($this->getCurrentImage()->getLabel())): ?>
|
41 |
+
<h1 class="image-label"><?php echo $_imageTitle ?></h1>
|
42 |
+
<?php endif; ?>
|
43 |
+
<img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $this->getImageFile()); ?>"<?php if($_width): ?> width="<?php echo $_width ?>"<?php endif; ?> alt="<?php echo $this->htmlEscape($this->getCurrentImage()->getLabel()) ?>" title="<?php echo $this->htmlEscape($this->getCurrentImage()->getLabel()) ?>" id="product-gallery-image" class="image" />
|
44 |
+
<div class="buttons-set"><a href="#" onclick="window.close(); return false;" class="button"><span><?php echo $this->__('Close Window') ?></span></a></div>
|
45 |
+
<?php if($this->getPreviusImageUrl() || $this->getNextImageUrl()): ?>
|
46 |
+
<div class="nav">
|
47 |
+
<?php if($_prevUrl = $this->getPreviusImageUrl()): ?>
|
48 |
+
<a href="<?php echo $_prevUrl ?>" class="prev">« <?php echo $this->__('Prev') ?></a>
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php if($_nextUrl = $this->getNextImageUrl()): ?>
|
51 |
+
<a href="<?php echo $_nextUrl ?>" class="next"><?php echo $this->__('Next') ?> »</a>
|
52 |
+
<?php endif; ?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
55 |
+
</div>
|
56 |
+
<script type="text/javascript">
|
57 |
+
//<![CDATA[
|
58 |
+
Event.observe(window, 'load', function(){
|
59 |
+
var demensions = $('product-gallery-image').getDimensions();
|
60 |
+
if (demensions.width < 300) {
|
61 |
+
demensions.width = 300
|
62 |
+
}
|
63 |
+
window.resizeTo(demensions.width+90, demensions.height+210);
|
64 |
+
});
|
65 |
+
//]]>
|
66 |
+
</script>
|
app/design/frontend/ma2/default/template/catalog/product/list.phtml
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
* Product list template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php
|
35 |
+
$_productCollection=$this->getLoadedProductCollection();
|
36 |
+
$_helper = $this->helper('catalog/output');
|
37 |
+
?>
|
38 |
+
<?php if(!$_productCollection->count()): ?>
|
39 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
40 |
+
<?php else: ?>
|
41 |
+
<div class="category-products">
|
42 |
+
<div class="toolbar-top">
|
43 |
+
<?php echo $this->getToolbarHtml() ?>
|
44 |
+
</div>
|
45 |
+
<?php // List mode ?>
|
46 |
+
<?php if($this->getMode()!='grid'): ?>
|
47 |
+
<?php $_iterator = 0; ?>
|
48 |
+
<ol class="products-list" id="products-list">
|
49 |
+
<?php foreach ($_productCollection as $_product): ?>
|
50 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
51 |
+
<?php // Product Image ?>
|
52 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
53 |
+
<?php // Product description ?>
|
54 |
+
<div class="product-shop">
|
55 |
+
<div class="f-fix">
|
56 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
57 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
58 |
+
<?php if($_product->getRatingSummary()): ?>
|
59 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
62 |
+
<div class="desc std">
|
63 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
64 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
65 |
+
</div>
|
66 |
+
<ul class="add-to-links">
|
67 |
+
<?php if($_product->isSaleable()): ?>
|
68 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
69 |
+
<?php else: ?>
|
70 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
71 |
+
<?php endif; ?>
|
72 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
73 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
74 |
+
<?php endif; ?>
|
75 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
76 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
77 |
+
<?php endif; ?>
|
78 |
+
</ul>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</li>
|
82 |
+
<?php endforeach; ?>
|
83 |
+
</ol>
|
84 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
85 |
+
|
86 |
+
<?php else: ?>
|
87 |
+
|
88 |
+
<?php // Grid Mode ?>
|
89 |
+
|
90 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
91 |
+
<?php
|
92 |
+
$_columnCount = $this->getColumnCount();
|
93 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
94 |
+
?>
|
95 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
96 |
+
<?php if ($i++%$_columnCount==0): ?>
|
97 |
+
<ul class="products-grid">
|
98 |
+
<?php endif ?>
|
99 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
100 |
+
<div class="spacer">
|
101 |
+
<div class="product-image">
|
102 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
103 |
+
<?php
|
104 |
+
//product percent sale-off
|
105 |
+
$firstPrice = (float)$_product->getPrice();
|
106 |
+
$finalPrice = (float)$_product->getFinalPrice();
|
107 |
+
if ($firstPrice != $finalPrice) :
|
108 |
+
if ($finalPrice < $firstPrice) {
|
109 |
+
$percent = (($firstPrice - $finalPrice)/$firstPrice) * 100;
|
110 |
+
} elseif ($finalPrice > $firstPrice) {
|
111 |
+
$percent = (($finalPrice - $firstPrice)/$finalPrice) * 100;
|
112 |
+
}
|
113 |
+
?>
|
114 |
+
<div class="product-sale-off">
|
115 |
+
<span class="sale-off-percent"><?php echo number_format($percent, 0); ?>%</span>
|
116 |
+
<span class="sale-off-label"><?php echo $this->__('Sale <br> Off'); ?></span>
|
117 |
+
</div>
|
118 |
+
<?php endif; ?>
|
119 |
+
</div>
|
120 |
+
<div class="product-more">
|
121 |
+
<h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h3>
|
122 |
+
<?php //if($_product->getRatingSummary()): ?>
|
123 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true) ?>
|
124 |
+
<?php //endif; ?>
|
125 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
126 |
+
<div class="actions">
|
127 |
+
<?php if($_product->isSaleable()): ?>
|
128 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
129 |
+
<?php else: ?>
|
130 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
131 |
+
<?php endif; ?>
|
132 |
+
<ul class="add-to-links">
|
133 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
134 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
135 |
+
<?php endif; ?>
|
136 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
137 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
138 |
+
<?php endif; ?>
|
139 |
+
</ul>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</li>
|
144 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
145 |
+
</ul>
|
146 |
+
<?php endif ?>
|
147 |
+
<?php endforeach ?>
|
148 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
149 |
+
<?php endif; ?>
|
150 |
+
|
151 |
+
<div class="toolbar-bottom">
|
152 |
+
<?php echo $this->getToolbarHtml() ?>
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/list/related.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 base_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->getItems()->getSize()): ?>
|
28 |
+
<?php
|
29 |
+
$total = $this->getItems()->count();
|
30 |
+
$_columnCount = $this->getColumnCount();
|
31 |
+
$pwidth = ' width'. floor(100 / $_columnCount);
|
32 |
+
$i = 0;
|
33 |
+
?>
|
34 |
+
<div class="block block-related">
|
35 |
+
<div class="block-title">
|
36 |
+
<strong><span><?php echo $this->__('Related Products') ?></span></strong>
|
37 |
+
</div>
|
38 |
+
<div class="block-content">
|
39 |
+
<p class="block-subtitle"><?php echo $this->__('Check items to add to the cart or') ?> <a href="#" onclick="selectAllRelated(this); return false;"><?php echo $this->__('select all') ?></a></p>
|
40 |
+
<ol class="mini-products-list" id="block-related">
|
41 |
+
<?php foreach($this->getItems() as $_item): ?>
|
42 |
+
<?php if($i++%$_columnCount==0) : ?>
|
43 |
+
<ul class="related-row-list">
|
44 |
+
<?php endif; ?>
|
45 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
46 |
+
<?php if(!$_item->isComposite() && $_item->isSaleable()): ?>
|
47 |
+
<?php if (!$_item->getRequiredOptions()): ?>
|
48 |
+
<input type="checkbox" class="checkbox related-checkbox" id="related-checkbox<?php echo $_item->getId() ?>" name="related_products[]" value="<?php echo $_item->getId() ?>" />
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php endif; ?>
|
51 |
+
<div class="product">
|
52 |
+
<?php // Product Image ?>
|
53 |
+
<a href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_item->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'small_image')->resize(135) ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" /></a>
|
54 |
+
<?php // Product description ?>
|
55 |
+
<div class="product-details">
|
56 |
+
<p class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->htmlEscape($_item->getName()) ?></a></p>
|
57 |
+
<?php echo $this->getPriceHtml($_item, true, '-related') ?>
|
58 |
+
<?php if($_item->isSaleable()): ?>
|
59 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
60 |
+
<?php else: ?>
|
61 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
62 |
+
<?php endif; ?>
|
63 |
+
<ul class="add-to-links">
|
64 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
65 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
66 |
+
<?php endif; ?>
|
67 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
|
68 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
69 |
+
<?php endif; ?>
|
70 |
+
</ul>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</li>
|
74 |
+
<?php if($i%$_columnCount==0 || $i==$total) : ?>
|
75 |
+
</ul>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php endforeach; ?>
|
78 |
+
<script type="text/javascript">decorateGeneric($$('ul.related-row-list'), ['odd','even','first','last'])</script>
|
79 |
+
<?php //endif; ?>
|
80 |
+
</ol>
|
81 |
+
<script type="text/javascript">decorateList('block-related', 'none-recursive')</script>
|
82 |
+
</div>
|
83 |
+
<script type="text/javascript">
|
84 |
+
//<![CDATA[
|
85 |
+
$$('.related-checkbox').each(function(elem){
|
86 |
+
Event.observe(elem, 'click', addRelatedToProduct)
|
87 |
+
});
|
88 |
+
|
89 |
+
var relatedProductsCheckFlag = false;
|
90 |
+
function selectAllRelated(txt){
|
91 |
+
if (relatedProductsCheckFlag == false) {
|
92 |
+
$$('.related-checkbox').each(function(elem){
|
93 |
+
elem.checked = true;
|
94 |
+
});
|
95 |
+
relatedProductsCheckFlag = true;
|
96 |
+
txt.innerHTML="<?php echo $this->__('unselect all') ?>";
|
97 |
+
} else {
|
98 |
+
$$('.related-checkbox').each(function(elem){
|
99 |
+
elem.checked = false;
|
100 |
+
});
|
101 |
+
relatedProductsCheckFlag = false;
|
102 |
+
txt.innerHTML="<?php echo $this->__('select all') ?>";
|
103 |
+
}
|
104 |
+
addRelatedToProduct();
|
105 |
+
}
|
106 |
+
|
107 |
+
function addRelatedToProduct(){
|
108 |
+
var checkboxes = $$('.related-checkbox');
|
109 |
+
var values = [];
|
110 |
+
for(var i=0;i<checkboxes.length;i++){
|
111 |
+
if(checkboxes[i].checked) values.push(checkboxes[i].value);
|
112 |
+
}
|
113 |
+
if($('related-products-field')){
|
114 |
+
$('related-products-field').value = values.join(',');
|
115 |
+
}
|
116 |
+
}
|
117 |
+
//]]>
|
118 |
+
</script>
|
119 |
+
</div>
|
120 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalog/product/list/toolbar.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 base_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 |
+
* Product list toolbar
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List_Toolbar
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->getCollection()->getSize()): ?>
|
35 |
+
<div class="toolbar">
|
36 |
+
<?php if( $this->isExpanded() ): ?>
|
37 |
+
<div class="view-mode">
|
38 |
+
<?php if( $this->isEnabledViewSwitcher() ): ?>
|
39 |
+
<div class="swich-mode">
|
40 |
+
<?php $_modes = $this->getModes(); ?>
|
41 |
+
<?php if($_modes && count($_modes)>1): ?>
|
42 |
+
<label><?php echo $this->__('View as') ?>:</label>
|
43 |
+
<?php foreach ($this->getModes() as $_code=>$_label): ?>
|
44 |
+
<?php if($this->isModeActive($_code)): ?>
|
45 |
+
<strong title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></strong>
|
46 |
+
<?php else: ?>
|
47 |
+
<a href="<?php echo $this->getModeUrl($_code) ?>" title="<?php echo $_label ?>" class="<?php echo strtolower($_code); ?>"><?php echo $_label ?></a>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
<?php endif; ?>
|
51 |
+
</div>
|
52 |
+
<?php endif; ?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
55 |
+
|
56 |
+
<div class="limiter">
|
57 |
+
<label><?php echo $this->__('Show') ?></label>
|
58 |
+
<select onchange="setLocation(this.value)">
|
59 |
+
<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
|
60 |
+
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
|
61 |
+
<?php echo $_limit ?>
|
62 |
+
</option>
|
63 |
+
<?php endforeach; ?>
|
64 |
+
</select> <?php echo $this->__('per page') ?>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<?php if( $this->isExpanded() ): ?>
|
68 |
+
<div class="sort-by">
|
69 |
+
<label><?php echo $this->__('Sort By') ?></label>
|
70 |
+
<select onchange="setLocation(this.value)">
|
71 |
+
<?php foreach($this->getAvailableOrders() as $_key=>$_order): ?>
|
72 |
+
<option value="<?php echo $this->getOrderUrl($_key, 'asc') ?>"<?php if($this->isOrderCurrent($_key)): ?> selected="selected"<?php endif; ?>>
|
73 |
+
<?php echo $this->__($_order) ?>
|
74 |
+
</option>
|
75 |
+
<?php endforeach; ?>
|
76 |
+
</select>
|
77 |
+
<?php if($this->getCurrentDirection() == 'desc'): ?>
|
78 |
+
<a href="<?php echo $this->getOrderUrl(null, 'asc') ?>" title="<?php echo $this->__('Set Ascending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_desc_arrow.gif') ?>" alt="<?php echo $this->__('Set Ascending Direction') ?>" class="v-middle" /></a>
|
79 |
+
<?php else: ?>
|
80 |
+
<a href="<?php echo $this->getOrderUrl(null, 'desc') ?>" title="<?php echo $this->__('Set Descending Direction') ?>"><img src="<?php echo $this->getSkinUrl('images/i_asc_arrow.gif') ?>" alt="<?php echo $this->__('Set Descending Direction') ?>" class="v-middle" /></a>
|
81 |
+
<?php endif; ?>
|
82 |
+
</div>
|
83 |
+
<?php endif; ?>
|
84 |
+
|
85 |
+
<div class="pager">
|
86 |
+
<!--
|
87 |
+
<p class="amount">
|
88 |
+
<?php if($this->getLastPageNum()>1): ?>
|
89 |
+
<?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
|
90 |
+
<?php else: ?>
|
91 |
+
<strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
|
92 |
+
<?php endif; ?>
|
93 |
+
</p>
|
94 |
+
-->
|
95 |
+
|
96 |
+
<?php echo $this->getPagerHtml() ?>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalog/product/list/upsell.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 base_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(count($this->getItemCollection()->getItems())): ?>
|
28 |
+
<div class="box-collateral box-up-sell">
|
29 |
+
<h2><?php echo $this->__('You may also be interested in the following product(s)') ?></h2>
|
30 |
+
<table class="products-grid" id="upsell-product-table">
|
31 |
+
<?php // $this->setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?>
|
32 |
+
<?php $this->resetItemsIterator() ?>
|
33 |
+
<?php for($_i=0;$_i<$this->getRowCount();$_i++): ?>
|
34 |
+
<tr>
|
35 |
+
<?php for($_j=0;$_j<$this->getColumnCount();$_j++): ?>
|
36 |
+
<?php if($_link=$this->getIterableItem()): ?>
|
37 |
+
<td>
|
38 |
+
<a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_link, 'small_image')->resize(125) ?>" width="125" height="125" alt="<?php echo $this->htmlEscape($_link->getName()) ?>" /></a>
|
39 |
+
<h3 class="product-name"><a href="<?php echo $_link->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_link->getName()) ?>"><?php echo $this->htmlEscape($_link->getName()) ?></a></h3>
|
40 |
+
<?php echo $this->getPriceHtml($_link, true, '-upsell') ?>
|
41 |
+
<?php echo $this->getReviewsSummaryHtml($_link) ?>
|
42 |
+
</td>
|
43 |
+
<?php else: ?>
|
44 |
+
<td class="empty"> </td>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php endfor; ?>
|
47 |
+
</tr>
|
48 |
+
<?php endfor; ?>
|
49 |
+
</table>
|
50 |
+
<script type="text/javascript">decorateTable('upsell-product-table')</script>
|
51 |
+
</div>
|
52 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalog/product/new.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 base_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 |
+
$_columnCount = $this->getColumnCount();
|
29 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
30 |
+
?>
|
31 |
+
<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
32 |
+
<h2 class="subtitle"><?php echo $this->__('New Products') ?></h2>
|
33 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
34 |
+
<?php if ($i++%$_columnCount==0): ?>
|
35 |
+
<ul class="products-grid">
|
36 |
+
<?php endif ?>
|
37 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
38 |
+
<div class="spacer">
|
39 |
+
<div class="product-image"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135) ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a>
|
40 |
+
<?php
|
41 |
+
//product percent sale-off
|
42 |
+
$firstPrice = (float)$_product->getPrice();
|
43 |
+
$finalPrice = (float)$_product->getFinalPrice();
|
44 |
+
if ($firstPrice != $finalPrice) :
|
45 |
+
if ($finalPrice < $firstPrice) {
|
46 |
+
$percent = (($firstPrice - $finalPrice)/$firstPrice) * 100;
|
47 |
+
} elseif ($finalPrice > $firstPrice) {
|
48 |
+
$percent = (($finalPrice - $firstPrice)/$finalPrice) * 100;
|
49 |
+
}
|
50 |
+
?>
|
51 |
+
<div class="product-sale-off">
|
52 |
+
<span class="sale-off-percent"><?php echo number_format($percent, 0); ?>%</span>
|
53 |
+
<span class="sale-off-label"><?php echo $this->__('Sale <br> Off'); ?></span>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
</div>
|
57 |
+
<div class="product-more">
|
58 |
+
<h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
|
59 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
60 |
+
<?php echo $this->getPriceHtml($_product, true, '-new') ?>
|
61 |
+
<div class="actions">
|
62 |
+
<?php if($_product->isSaleable()): ?>
|
63 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
64 |
+
<?php else: ?>
|
65 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
66 |
+
<?php endif; ?>
|
67 |
+
<ul class="add-to-links">
|
68 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
69 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
70 |
+
<?php endif; ?>
|
71 |
+
<?php if ($_compareUrl = $this->getAddToCompareUrl($_product)): ?>
|
72 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
73 |
+
<?php endif; ?>
|
74 |
+
</ul>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
</li>
|
79 |
+
<?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
|
80 |
+
</ul>
|
81 |
+
<?php endif ?>
|
82 |
+
<?php endforeach; ?>
|
83 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/price.phtml
ADDED
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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_Catalog_Block_Product_Abstract
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
$_coreHelper = $this->helper('core');
|
37 |
+
$_weeeHelper = $this->helper('weee');
|
38 |
+
$_taxHelper = $this->helper('tax');
|
39 |
+
/* @var $_coreHelper Mage_Core_Helper_Data */
|
40 |
+
/* @var $_weeeHelper Mage_Weee_Helper_Data */
|
41 |
+
/* @var $_taxHelper Mage_Tax_Helper_Data */
|
42 |
+
|
43 |
+
$_product = $this->getProduct();
|
44 |
+
$_storeId = $_product->getStoreId();
|
45 |
+
$_id = $_product->getId();
|
46 |
+
$_weeeSeparator = '';
|
47 |
+
$_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
|
48 |
+
$_minimalPriceValue = $_product->getMinimalPrice();
|
49 |
+
$_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
|
50 |
+
?>
|
51 |
+
|
52 |
+
<?php if (!$_product->isGrouped()): ?>
|
53 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
|
54 |
+
<?php if ($_weeeHelper->typeOfDisplay($_product, array(Mage_Weee_Model_Tax::DISPLAY_INCL_DESCR, Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
|
55 |
+
<?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
|
56 |
+
<?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
|
57 |
+
<?php endif; ?>
|
58 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
|
59 |
+
<?php if ($_weeeHelper->isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?>
|
60 |
+
<?php $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
|
61 |
+
<?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes); ?>
|
62 |
+
<?php endif; ?>
|
63 |
+
|
64 |
+
<div class="price-box">
|
65 |
+
<?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
|
66 |
+
<?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
|
67 |
+
<?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
|
68 |
+
<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
|
69 |
+
<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
|
70 |
+
<?php if ($_finalPrice >= $_price): ?>
|
71 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
72 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
73 |
+
<span class="price-excluding-tax">
|
74 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
75 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
76 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
|
77 |
+
</span>
|
78 |
+
</span>
|
79 |
+
<span class="price-including-tax">
|
80 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
81 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
82 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
83 |
+
</span>
|
84 |
+
</span>
|
85 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
86 |
+
<span class="price-excluding-tax">
|
87 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
88 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
89 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
|
90 |
+
</span>
|
91 |
+
</span>
|
92 |
+
<span class="price-including-tax">
|
93 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
94 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
95 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
96 |
+
</span>
|
97 |
+
<span class="weee">(
|
98 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
99 |
+
<?php echo $_weeeSeparator; ?>
|
100 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
101 |
+
<?php $_weeeSeparator = ' + '; ?>
|
102 |
+
<?php endforeach; ?>
|
103 |
+
)</span>
|
104 |
+
</span>
|
105 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
106 |
+
<span class="price-excluding-tax">
|
107 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
108 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
109 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
|
110 |
+
</span>
|
111 |
+
</span>
|
112 |
+
<span class="price-including-tax">
|
113 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
114 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
115 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
116 |
+
</span>
|
117 |
+
<span class="weee">(
|
118 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
119 |
+
<?php echo $_weeeSeparator; ?>
|
120 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
121 |
+
<?php $_weeeSeparator = ' + '; ?>
|
122 |
+
<?php endforeach; ?>
|
123 |
+
)</span>
|
124 |
+
</span>
|
125 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
126 |
+
<span class="price-excluding-tax">
|
127 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
128 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
129 |
+
<?php echo $_coreHelper->currency($_price, true, false) ?>
|
130 |
+
</span>
|
131 |
+
</span>
|
132 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
133 |
+
<span class="weee">
|
134 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
135 |
+
</span>
|
136 |
+
<?php endforeach; ?>
|
137 |
+
<span class="price-including-tax">
|
138 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
139 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
140 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
141 |
+
</span>
|
142 |
+
</span>
|
143 |
+
<?php else: ?>
|
144 |
+
<span class="price-excluding-tax">
|
145 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
146 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
147 |
+
<?php if ($_finalPrice == $_price): ?>
|
148 |
+
<?php echo $_coreHelper->currency($_price, true, false) ?>
|
149 |
+
<?php else: ?>
|
150 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
151 |
+
<?php endif; ?>
|
152 |
+
</span>
|
153 |
+
</span>
|
154 |
+
<span class="price-including-tax">
|
155 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
156 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
157 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
|
158 |
+
</span>
|
159 |
+
</span>
|
160 |
+
<?php endif; ?>
|
161 |
+
<?php else: ?>
|
162 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
163 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
164 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
165 |
+
</span>
|
166 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
167 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
168 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
169 |
+
</span>
|
170 |
+
<span class="weee">(
|
171 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
172 |
+
<?php echo $_weeeSeparator; ?>
|
173 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
174 |
+
<?php $_weeeSeparator = ' + '; ?>
|
175 |
+
<?php endforeach; ?>
|
176 |
+
)</span>
|
177 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
178 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
179 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
180 |
+
</span>
|
181 |
+
<span class="weee">(
|
182 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
183 |
+
<?php echo $_weeeSeparator; ?>
|
184 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
185 |
+
<?php $_weeeSeparator = ' + '; ?>
|
186 |
+
<?php endforeach; ?>
|
187 |
+
)</span>
|
188 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
189 |
+
<span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
|
190 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
191 |
+
<span class="weee">
|
192 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
193 |
+
</span>
|
194 |
+
<?php endforeach; ?>
|
195 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
196 |
+
<?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
|
197 |
+
</span>
|
198 |
+
<?php else: ?>
|
199 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
200 |
+
<?php if ($_finalPrice == $_price): ?>
|
201 |
+
<?php echo $_coreHelper->currency($_price, true, true) ?>
|
202 |
+
<?php else: ?>
|
203 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
|
204 |
+
<?php endif; ?>
|
205 |
+
</span>
|
206 |
+
<?php endif; ?>
|
207 |
+
<?php endif; ?>
|
208 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
209 |
+
<?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
|
210 |
+
|
211 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
|
212 |
+
<p class="old-price">
|
213 |
+
<!--<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>-->
|
214 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
215 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
216 |
+
</span>
|
217 |
+
</p>
|
218 |
+
|
219 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
220 |
+
<p class="special-price">
|
221 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
222 |
+
<span class="price-excluding-tax">
|
223 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
224 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
225 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
226 |
+
</span>
|
227 |
+
</span>
|
228 |
+
<span class="price-including-tax">
|
229 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
230 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
231 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
232 |
+
</span>
|
233 |
+
</span>
|
234 |
+
</p>
|
235 |
+
<?php else: ?>
|
236 |
+
<p class="special-price">
|
237 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
238 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
239 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
|
240 |
+
</span>
|
241 |
+
</p>
|
242 |
+
<?php endif; ?>
|
243 |
+
|
244 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
245 |
+
<p class="old-price">
|
246 |
+
<!--<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>-->
|
247 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
248 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
249 |
+
</span>
|
250 |
+
</p>
|
251 |
+
|
252 |
+
<p class="special-price">
|
253 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
254 |
+
<span class="price-excluding-tax">
|
255 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
256 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
257 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
258 |
+
</span>
|
259 |
+
</span>
|
260 |
+
<span class="weee">(
|
261 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
262 |
+
<?php echo $_weeeSeparator; ?>
|
263 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
264 |
+
<?php $_weeeSeparator = ' + '; ?>
|
265 |
+
<?php endforeach; ?>
|
266 |
+
)</span>
|
267 |
+
<span class="price-including-tax">
|
268 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
269 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
270 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
271 |
+
</span>
|
272 |
+
</span>
|
273 |
+
</p>
|
274 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
275 |
+
<p class="old-price">
|
276 |
+
<!--<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>-->
|
277 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
278 |
+
<?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
|
279 |
+
</span>
|
280 |
+
</p>
|
281 |
+
|
282 |
+
<p class="special-price">
|
283 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
284 |
+
<span class="price-excluding-tax">
|
285 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
286 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
287 |
+
<?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
|
288 |
+
</span>
|
289 |
+
</span>
|
290 |
+
<span class="weee">(
|
291 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
292 |
+
<?php echo $_weeeSeparator; ?>
|
293 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
294 |
+
<?php $_weeeSeparator = ' + '; ?>
|
295 |
+
<?php endforeach; ?>
|
296 |
+
)</span>
|
297 |
+
<span class="price-including-tax">
|
298 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
299 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
300 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
301 |
+
</span>
|
302 |
+
</span>
|
303 |
+
</p>
|
304 |
+
<?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
305 |
+
<p class="old-price">
|
306 |
+
<!--<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>-->
|
307 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
308 |
+
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
|
309 |
+
</span>
|
310 |
+
</p>
|
311 |
+
|
312 |
+
<p class="special-price">
|
313 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
314 |
+
<span class="price-excluding-tax">
|
315 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
316 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
317 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
318 |
+
</span>
|
319 |
+
</span>
|
320 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
321 |
+
<span class="weee">
|
322 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
323 |
+
</span>
|
324 |
+
<?php endforeach; ?>
|
325 |
+
<span class="price-including-tax">
|
326 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
327 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
328 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
|
329 |
+
</span>
|
330 |
+
</span>
|
331 |
+
</p>
|
332 |
+
<?php else: // excl. ?>
|
333 |
+
<p class="old-price">
|
334 |
+
<!--<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>-->
|
335 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
336 |
+
<?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
|
337 |
+
</span>
|
338 |
+
</p>
|
339 |
+
|
340 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
341 |
+
<p class="special-price">
|
342 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
343 |
+
<span class="price-excluding-tax">
|
344 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
345 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
346 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
347 |
+
</span>
|
348 |
+
</span>
|
349 |
+
<span class="price-including-tax">
|
350 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
351 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
352 |
+
<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
|
353 |
+
</span>
|
354 |
+
</span>
|
355 |
+
</p>
|
356 |
+
<?php else: ?>
|
357 |
+
<p class="special-price">
|
358 |
+
<!--<span class="price-label"><?php echo $this->__('Special Price:') ?></span>-->
|
359 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
360 |
+
<?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
|
361 |
+
</span>
|
362 |
+
</p>
|
363 |
+
<?php endif; ?>
|
364 |
+
<?php endif; ?>
|
365 |
+
|
366 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
367 |
+
|
368 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
|
369 |
+
|
370 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
371 |
+
<?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
372 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
|
373 |
+
<?php endif; ?>
|
374 |
+
|
375 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
376 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
377 |
+
<?php else:?>
|
378 |
+
<span class="minimal-price-link">
|
379 |
+
<?php endif?>
|
380 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
381 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
382 |
+
<?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
|
383 |
+
</span>
|
384 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
385 |
+
</a>
|
386 |
+
<?php else:?>
|
387 |
+
</span>
|
388 |
+
<?php endif?>
|
389 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
390 |
+
</div>
|
391 |
+
|
392 |
+
<?php else: /* if (!$_product->isGrouped()): */ ?>
|
393 |
+
<?php
|
394 |
+
$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
|
395 |
+
$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
|
396 |
+
?>
|
397 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
|
398 |
+
<div class="price-box">
|
399 |
+
<p class="minimal-price">
|
400 |
+
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
|
401 |
+
<?php if ($_taxHelper->displayBothPrices()): ?>
|
402 |
+
<span class="price-excluding-tax">
|
403 |
+
<span class="label"><?php echo $this->helper('tax')->__('Excl. Tax:') ?></span>
|
404 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
405 |
+
<?php echo $_coreHelper->currency($_exclTax, true, false) ?>
|
406 |
+
</span>
|
407 |
+
</span>
|
408 |
+
<span class="price-including-tax">
|
409 |
+
<span class="label"><?php echo $this->helper('tax')->__('Incl. Tax:') ?></span>
|
410 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
411 |
+
<?php echo $_coreHelper->currency($_inclTax, true, false) ?>
|
412 |
+
</span>
|
413 |
+
</span>
|
414 |
+
<?php else: ?>
|
415 |
+
<?php
|
416 |
+
$_showPrice = $_inclTax;
|
417 |
+
if (!$_taxHelper->displayPriceIncludingTax()) {
|
418 |
+
$_showPrice = $_exclTax;
|
419 |
+
}
|
420 |
+
?>
|
421 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
|
422 |
+
<?php echo $_coreHelper->currency($_showPrice, true, false) ?>
|
423 |
+
</span>
|
424 |
+
<?php endif; ?>
|
425 |
+
</p>
|
426 |
+
</div>
|
427 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
|
428 |
+
<?php endif; /* if (!$_product->isGrouped()): */ ?>
|
app/design/frontend/ma2/default/template/catalog/product/price_msrp.phtml
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 at catalog and sidebars
|
31 |
+
*
|
32 |
+
* @var $this Mage_Catalog_Block_Product_Price
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
/** @var $_product Mage_Catalog_Model_Product */
|
37 |
+
$_product = $this->getProduct();
|
38 |
+
$_msrpPrice = "";
|
39 |
+
?>
|
40 |
+
<div class="price-box map-info">
|
41 |
+
<?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
|
42 |
+
<?php if ($_product->getMsrp()): ?>
|
43 |
+
<?php $_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true) ?>
|
44 |
+
<span class="old-price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
|
47 |
+
<a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a>
|
48 |
+
<script type="text/javascript">
|
49 |
+
<?php if ($this->helper('catalog')->isShowPriceOnGesture($_product)): ?>
|
50 |
+
var newLink = Catalog.Map.addHelpLink(
|
51 |
+
$('<?php echo $helpLinkId ?>'),
|
52 |
+
"<?php echo $_product->getName() ?>",
|
53 |
+
<?php echo $this->getRealPriceJs($_product) ?>,
|
54 |
+
'<?php echo $_msrpPrice ?>',
|
55 |
+
"<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>"
|
56 |
+
);
|
57 |
+
newLink.product_id = '<?php echo $_product->getId() ?>';
|
58 |
+
<?php else: ?>
|
59 |
+
Catalog.Map.addHelpLink(
|
60 |
+
$('<?php echo $helpLinkId ?>'),
|
61 |
+
null,
|
62 |
+
null,
|
63 |
+
null,
|
64 |
+
"<?php echo $_product->getProductUrl() ?>"
|
65 |
+
);
|
66 |
+
<?php endif; ?>
|
67 |
+
|
68 |
+
</script>
|
69 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/price_msrp_item.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 base_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 at product view page, gift registry and wishlist
|
31 |
+
*
|
32 |
+
* @var $this Mage_Catalog_Block_Product_Price
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
/** @var $_coreHelper Mage_Core_Helper_Data */
|
37 |
+
$_coreHelper = $this->helper('core');
|
38 |
+
/** @var $_catalogHelper Mage_Catalog_Helper_Data */
|
39 |
+
$_catalogHelper = $this->helper('catalog');
|
40 |
+
|
41 |
+
/** @var $_product Mage_Catalog_Model_Product */
|
42 |
+
$_product = $this->getProduct();
|
43 |
+
$_id = $_product->getId();
|
44 |
+
$_msrpPrice = '';
|
45 |
+
$priceElementIdPrefix = $this->getPriceElementIdPrefix() ? $this->getPriceElementIdPrefix() : 'product-price-';
|
46 |
+
?>
|
47 |
+
<div class="price-box map-info">
|
48 |
+
<?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
|
49 |
+
<?php if($_product->getMsrp()): ?>
|
50 |
+
<?php $_msrpPrice = $_coreHelper->currency($_product->getMsrp(),true,true) ?>
|
51 |
+
<span class="old-price" ><?php echo $_msrpPrice ?></span>
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
<?php if ($_catalogHelper->isShowPriceOnGesture($_product)): ?>
|
55 |
+
<?php $priceElementId = $priceElementIdPrefix . $_id . $this->getIdSuffix(); ?>
|
56 |
+
<span id="<?php echo $priceElementId ?>" style="display:none"></span>
|
57 |
+
<?php $popupId = 'msrp-popup-' . $_id . $_coreHelper->getRandomString(20); ?>
|
58 |
+
<a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a>
|
59 |
+
<script type="text/javascript">
|
60 |
+
Event.observe(window, 'load', function() {
|
61 |
+
var priceElement = $("<?php echo $priceElementId ?>"),
|
62 |
+
realPrice = <?php echo $this->getRealPriceJs($_product) ?>,
|
63 |
+
priceHtml = realPrice.stripScripts();
|
64 |
+
|
65 |
+
priceElement.innerHTML = priceHtml;
|
66 |
+
realPrice.evalScripts();
|
67 |
+
var originalOptionPriceReload;
|
68 |
+
if (typeof(optionsPrice) != 'undefined' && optionsPrice && optionsPrice.reload) {
|
69 |
+
originalOptionPriceReload = optionsPrice.reload;
|
70 |
+
Product.OptionsPrice.prototype.reload = function() {
|
71 |
+
if (originalOptionPriceReload) {
|
72 |
+
originalOptionPriceReload.call(this);
|
73 |
+
}
|
74 |
+
if ($('<?php echo $popupId ?>') == Catalog.Map.active) {
|
75 |
+
Element.update(
|
76 |
+
$('map-popup-price'),
|
77 |
+
$("<?php echo $priceElementId ?>").innerHTML
|
78 |
+
);
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
});
|
83 |
+
|
84 |
+
Catalog.Map.addHelpLink(
|
85 |
+
$('<?php echo $popupId ?>'),
|
86 |
+
"<?php echo $_product->getName() ?>",
|
87 |
+
$("<?php echo $priceElementId ?>"),
|
88 |
+
'<?php echo $_msrpPrice ?>',
|
89 |
+
"<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>"
|
90 |
+
);
|
91 |
+
</script>
|
92 |
+
<?php else: ?>
|
93 |
+
<span class="msrp-price-hide-message">
|
94 |
+
<?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
|
95 |
+
</span>
|
96 |
+
<?php endif; ?>
|
97 |
+
|
98 |
+
<?php $helpLinkId = 'msrp-help-' . $_id . $_coreHelper->getRandomString(20); ?>
|
99 |
+
<a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__("What's this?"); ?></a>
|
100 |
+
<script type="text/javascript">
|
101 |
+
Catalog.Map.addHelpLink(
|
102 |
+
$('<?php echo $helpLinkId ?>'),
|
103 |
+
"<?php echo $this->__("What's this?"); ?>"
|
104 |
+
);
|
105 |
+
</script>
|
106 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/price_msrp_noform.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 base_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 at catalog and sidebars
|
31 |
+
*
|
32 |
+
* @var $this Mage_Catalog_Block_Product_Price
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
/** @var $_product Mage_Catalog_Model_Product */
|
37 |
+
$_product = $this->getProduct();
|
38 |
+
$_msrpPrice = "";
|
39 |
+
?>
|
40 |
+
<div class="price-box map-info">
|
41 |
+
<?php $_price = $this->helper('tax')->getPrice($_product, $_product->getMsrp()) ?>
|
42 |
+
<?php if ($_product->getMsrp()): ?>
|
43 |
+
<?php $_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true) ?>
|
44 |
+
<span class="old-price" id="product-price-<?php echo $_product->getId() ?><?php echo $this->getIdSuffix() ?>"><?php echo $_msrpPrice ?></span>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php $helpLinkId = 'msrp-click-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
|
47 |
+
<a href="#" id="<?php echo($helpLinkId);?>"><?php echo $this->__('Click for price') ?></a>
|
48 |
+
<script type="text/javascript">
|
49 |
+
<?php if ($this->helper('catalog')->isShowPriceOnGesture($_product)): ?>
|
50 |
+
var productLink = {
|
51 |
+
url: "<?php echo $_product->isSalable() ? $_product->getAddToCartUrl() : '' ?>",
|
52 |
+
notUseForm: true
|
53 |
+
};
|
54 |
+
var newLink = Catalog.Map.addHelpLink(
|
55 |
+
$('<?php echo $helpLinkId ?>'),
|
56 |
+
"<?php echo $_product->getName() ?>",
|
57 |
+
<?php echo $this->getRealPriceJs($_product) ?>,
|
58 |
+
'<?php echo $_msrpPrice ?>',
|
59 |
+
productLink
|
60 |
+
);
|
61 |
+
newLink.product_id = '<?php echo $_product->getId() ?>';
|
62 |
+
<?php else: ?>
|
63 |
+
Catalog.Map.addHelpLink(
|
64 |
+
$('<?php echo $helpLinkId ?>'),
|
65 |
+
null,
|
66 |
+
null,
|
67 |
+
null,
|
68 |
+
"<?php echo $_product->getProductUrl() ?>"
|
69 |
+
);
|
70 |
+
<?php endif; ?>
|
71 |
+
|
72 |
+
</script>
|
73 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/price_msrp_rss.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 base_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 displaying product price at rss feeds pages
|
30 |
+
*
|
31 |
+
* @var $this Mage_Catalog_Block_Product_Price
|
32 |
+
*/
|
33 |
+
|
34 |
+
/** @var $_product Mage_Catalog_Model_Product */
|
35 |
+
$_product = $this->getProduct();
|
36 |
+
?>
|
37 |
+
<div class="price-box map-info">
|
38 |
+
|
39 |
+
<?php if ($this->helper('catalog')->canApplyMsrp($_product)): ?>
|
40 |
+
<a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('Click for price'); ?></a>
|
41 |
+
<?php endif; ?>
|
42 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/view.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 base_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 |
+
* Product view template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View
|
31 |
+
* @see Mage_Review_Block_Product_View
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $_helper = $this->helper('catalog/output'); ?>
|
35 |
+
<?php $_product = $this->getProduct(); ?>
|
36 |
+
<script type="text/javascript">
|
37 |
+
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
|
38 |
+
</script>
|
39 |
+
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
40 |
+
<div class="product-view">
|
41 |
+
<div class="product-essential">
|
42 |
+
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
43 |
+
<div class="no-display">
|
44 |
+
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
45 |
+
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<div class="product-shop">
|
49 |
+
<div class="product-name">
|
50 |
+
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
<?php if ($_product->getShortDescription()):?>
|
54 |
+
<div class="short-description">
|
55 |
+
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
56 |
+
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
57 |
+
</div>
|
58 |
+
<?php endif;?>
|
59 |
+
|
60 |
+
<div class="product-img-add">
|
61 |
+
<div class="product-img-box">
|
62 |
+
<?php echo $this->getChildHtml('media') ?>
|
63 |
+
</div>
|
64 |
+
<div class="product-addtocart-area">
|
65 |
+
<div class="product-info">
|
66 |
+
<p class="product-sku"><?php echo $this->__('Product code: ').'<span>'.$_product->getSku().'</span>'; ?></p>
|
67 |
+
<?php echo $this->getChildHtml('alert_urls') ?>
|
68 |
+
<?php if($_product->isSaleable()): ?>
|
69 |
+
<p class="availability">
|
70 |
+
<span class="label">
|
71 |
+
<?php echo $this->__('Availability') ?>:
|
72 |
+
</span>
|
73 |
+
<span class="in-stock">
|
74 |
+
<?php echo $this->__('In stock') ?>
|
75 |
+
</span>
|
76 |
+
</p>
|
77 |
+
|
78 |
+
<?php else: ?>
|
79 |
+
<p class="availability">
|
80 |
+
<span class="label">
|
81 |
+
<?php echo $this->__('Availability') ?>:
|
82 |
+
</span>
|
83 |
+
<span class="out-of-stock">
|
84 |
+
<?php echo $this->__('Out of stock') ?>
|
85 |
+
</span>
|
86 |
+
</p>
|
87 |
+
<?php endif; ?>
|
88 |
+
<?php if($_product->getCategory() != null) : ?>
|
89 |
+
<p class="product-cat"><?php echo $this->__('Brand: ').'<span>'.$_product->getCategory()->getName().'</span>'; ?></p>
|
90 |
+
<?php endif; ?>
|
91 |
+
<?php //echo $this->getChildHtml('product_type_data') ?>
|
92 |
+
</div>
|
93 |
+
<?php echo $this->getPriceHtml($_product) ?>
|
94 |
+
<?php echo $this->getTierPriceHtml() ?>
|
95 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true) ?>
|
96 |
+
<?php echo $this->getChildHtml('extrahint') ?>
|
97 |
+
<!-- Social sharing -->
|
98 |
+
<div class="productSocialSharing">
|
99 |
+
<!-- Facebook Button -->
|
100 |
+
<div class="socialSharing facebookButton">
|
101 |
+
<div id="fb-root"></div>
|
102 |
+
<script type="text/javascript">
|
103 |
+
(function(d, s, id) {
|
104 |
+
var js, fjs = d.getElementsByTagName(s)[0];
|
105 |
+
if (d.getElementById(id)) return;
|
106 |
+
js = d.createElement(s); js.id = id;
|
107 |
+
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
108 |
+
fjs.parentNode.insertBefore(js, fjs);
|
109 |
+
}(document, 'script', 'facebook-jssdk'));
|
110 |
+
</script>
|
111 |
+
<!--<div class="fb-like" data-send="false" data-width="100" data-show-faces="true"></div>-->
|
112 |
+
<fb:like href="<?php echo $this->getUrl(); ?>" layout="button_count" show_faces="false" send="false"></fb:like>
|
113 |
+
</div>
|
114 |
+
<!-- Twitter Button -->
|
115 |
+
<div class="socialSharing twitterButton">
|
116 |
+
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="omegatheme">
|
117 |
+
<?php echo $this->__('Twitter'); ?>
|
118 |
+
</a>
|
119 |
+
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
|
120 |
+
</div>
|
121 |
+
<!-- Google +1 Button -->
|
122 |
+
<div class="socialSharing googlePlusOneButton">
|
123 |
+
<g:plusone annotation="inline" width="100" size="medium"></g:plusone>
|
124 |
+
<script type="text/javascript">
|
125 |
+
(function() {
|
126 |
+
window.___gcfg = {lang: 'en'}; // Define button default language here
|
127 |
+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
128 |
+
po.src = 'https://apis.google.com/js/plusone.js';
|
129 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
130 |
+
})();
|
131 |
+
</script>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
<?php if (!$this->hasOptions()):?>
|
135 |
+
<div class="add-to-box">
|
136 |
+
<?php if($_product->isSaleable()): ?>
|
137 |
+
<?php echo $this->getChildHtml('addtocart') ?>
|
138 |
+
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
139 |
+
<span class="or"><?php echo $this->__('OR') ?></span>
|
140 |
+
<?php endif; ?>
|
141 |
+
<?php endif; ?>
|
142 |
+
<?php echo $this->getChildHtml('addto') ?>
|
143 |
+
</div>
|
144 |
+
<?php echo $this->getChildHtml('extra_buttons') ?>
|
145 |
+
<?php elseif (!$_product->isSaleable()): ?>
|
146 |
+
<div class="add-to-box">
|
147 |
+
<?php echo $this->getChildHtml('addto') ?>
|
148 |
+
</div>
|
149 |
+
<?php endif; ?>
|
150 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
151 |
+
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
152 |
+
<?php endif;?>
|
153 |
+
<?php if ($this->canEmailToFriend()): ?>
|
154 |
+
<p class="email-friend <?php echo $this->hasOptions() ? "has-options" : "no-options" ?>"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
155 |
+
<?php endif; ?>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
|
159 |
+
<?php echo $this->getChildHtml('other');?>
|
160 |
+
|
161 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
162 |
+
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
163 |
+
<?php endif;?>
|
164 |
+
|
165 |
+
</div>
|
166 |
+
|
167 |
+
<div class="clearer"></div>
|
168 |
+
|
169 |
+
</form>
|
170 |
+
<script type="text/javascript">
|
171 |
+
//<![CDATA[
|
172 |
+
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
173 |
+
productAddToCartForm.submit = function(button, url) {
|
174 |
+
if (this.validator.validate()) {
|
175 |
+
var form = this.form;
|
176 |
+
var oldUrl = form.action;
|
177 |
+
|
178 |
+
if (url) {
|
179 |
+
form.action = url;
|
180 |
+
}
|
181 |
+
var e = null;
|
182 |
+
try {
|
183 |
+
this.form.submit();
|
184 |
+
} catch (e) {
|
185 |
+
}
|
186 |
+
this.form.action = oldUrl;
|
187 |
+
if (e) {
|
188 |
+
throw e;
|
189 |
+
}
|
190 |
+
|
191 |
+
if (button && button != 'undefined') {
|
192 |
+
button.disabled = true;
|
193 |
+
}
|
194 |
+
}
|
195 |
+
}.bind(productAddToCartForm);
|
196 |
+
|
197 |
+
productAddToCartForm.submitLight = function(button, url){
|
198 |
+
if(this.validator) {
|
199 |
+
var nv = Validation.methods;
|
200 |
+
delete Validation.methods['required-entry'];
|
201 |
+
delete Validation.methods['validate-one-required'];
|
202 |
+
delete Validation.methods['validate-one-required-by-name'];
|
203 |
+
// Remove custom datetime validators
|
204 |
+
for (var methodName in Validation.methods) {
|
205 |
+
if (methodName.match(/^validate-datetime-.*/i)) {
|
206 |
+
delete Validation.methods[methodName];
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
if (this.validator.validate()) {
|
211 |
+
if (url) {
|
212 |
+
this.form.action = url;
|
213 |
+
}
|
214 |
+
this.form.submit();
|
215 |
+
}
|
216 |
+
Object.extend(Validation.methods, nv);
|
217 |
+
}
|
218 |
+
}.bind(productAddToCartForm);
|
219 |
+
//]]>
|
220 |
+
</script>
|
221 |
+
</div>
|
222 |
+
<?php //var_dump($this->getChildGroup('detailed_info', 'getChildHtml')); ?>
|
223 |
+
<div class="product-collateral">
|
224 |
+
<dl id="product-collateral-tabs" class="collateral-tabs">
|
225 |
+
<?php if($this->getChildGroup('detailed_info', 'getChildHtml')) : ?>
|
226 |
+
<dt id="tab_1" class="tab"><span><?php echo $this->__('Details') ?></span></dt>
|
227 |
+
<dd id="tab_1_contents" class="tab-container">
|
228 |
+
<div class="tab-content">
|
229 |
+
<?php foreach ($this->getChildGroup('detailed_info', 'getChildHtml') as $alias => $html):?>
|
230 |
+
<div class="box-collateral <?php echo "box-{$alias}"?>">
|
231 |
+
<?php if ($title = $this->getChildData($alias, 'title')):?>
|
232 |
+
<h2><?php echo $this->escapeHtml($title); ?></h2>
|
233 |
+
<?php endif;?>
|
234 |
+
<?php echo $html; ?>
|
235 |
+
</div>
|
236 |
+
<?php endforeach;?>
|
237 |
+
</div>
|
238 |
+
</dd>
|
239 |
+
<?php endif; ?>
|
240 |
+
<?php if($this->getChildHtml('upsell_products') != '') : ?>
|
241 |
+
<dt id="tab_2" class="tab"><span><?php echo $this->__('Upsell products') ?></span></dt>
|
242 |
+
<dd id="tab_2_contents" class="tab-container">
|
243 |
+
<div class="tab-content">
|
244 |
+
<?php echo $this->getChildHtml('upsell_products') ?>
|
245 |
+
</div>
|
246 |
+
</dd>
|
247 |
+
<?php endif; ?>
|
248 |
+
<dt id="tab_3" class="tab"><span><?php echo $this->__('Additional info') ?></span></dt>
|
249 |
+
<dd id="tab_3_contents" class="tab-container">
|
250 |
+
<div class="tab-content">
|
251 |
+
<?php echo $this->getChildHtml('product_additional_data') ?>
|
252 |
+
</div>
|
253 |
+
</dd>
|
254 |
+
</div>
|
255 |
+
<script type="text/javascript">
|
256 |
+
//<![CDATA[
|
257 |
+
var productTabs = new Ma2All.Tabs('product-collateral-tabs');
|
258 |
+
Event.observe(window, 'load', function() {
|
259 |
+
productTabs.select();
|
260 |
+
});
|
261 |
+
//]]>
|
262 |
+
</script>
|
263 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/view/additional.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 base_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 foreach ($this->getChildHtmlList() as $_html): ?>
|
28 |
+
<?php echo $_html ?>
|
29 |
+
<?php endforeach; ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/addto.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 base_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 $_product = $this->getProduct(); ?>
|
29 |
+
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
|
30 |
+
|
31 |
+
<ul class="add-to-links">
|
32 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
33 |
+
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
34 |
+
<?php endif; ?>
|
35 |
+
<?php
|
36 |
+
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
|
37 |
+
?>
|
38 |
+
<?php if($_compareUrl) : ?>
|
39 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
40 |
+
<?php endif; ?>
|
41 |
+
</ul>
|
app/design/frontend/ma2/default/template/catalog/product/view/addtocart.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 base_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 $_product = $this->getProduct(); ?>
|
28 |
+
<?php $buttonTitle = $this->__('Add to Cart'); ?>
|
29 |
+
<?php if($_product->isSaleable()): ?>
|
30 |
+
<div class="add-to-cart">
|
31 |
+
<?php if(!$_product->isGrouped()): ?>
|
32 |
+
<label for="qty"><?php echo $this->__('Quantity') ?></label>
|
33 |
+
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
34 |
+
<?php endif; ?>
|
35 |
+
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
|
36 |
+
<?php echo $this->getChildHtml('', true, true) ?>
|
37 |
+
</div>
|
38 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/attributes.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 base_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 |
+
* Product additional attributes template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Attributes
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php
|
34 |
+
$_helper = $this->helper('catalog/output');
|
35 |
+
$_product = $this->getProduct()
|
36 |
+
?>
|
37 |
+
<?php if($_additional = $this->getAdditionalData()): ?>
|
38 |
+
<h2><?php echo $this->__('Additional Information') ?></h2>
|
39 |
+
<table class="data-table" id="product-attribute-specs-table">
|
40 |
+
<col width="25%" />
|
41 |
+
<col />
|
42 |
+
<tbody>
|
43 |
+
<?php foreach ($_additional as $_data): ?>
|
44 |
+
<tr>
|
45 |
+
<th class="label"><?php echo $this->htmlEscape($this->__($_data['label'])) ?></th>
|
46 |
+
<td class="data"><?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?></td>
|
47 |
+
</tr>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
</tbody>
|
50 |
+
</table>
|
51 |
+
<script type="text/javascript">decorateTable('product-attribute-specs-table')</script>
|
52 |
+
<?php endif;?>
|
app/design/frontend/ma2/default/template/catalog/product/view/description.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 base_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 |
+
* Product description template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Description
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php $_description = $this->getProduct()->getDescription(); ?>
|
34 |
+
<?php if ($_description): ?>
|
35 |
+
<h2><?php echo $this->__('Details') ?></h2>
|
36 |
+
<div class="std">
|
37 |
+
<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/media.phtml
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
* Product media data template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Media
|
31 |
+
*/
|
32 |
+
?>
|
33 |
+
<?php
|
34 |
+
$_product = $this->getProduct();
|
35 |
+
$_helper = $this->helper('catalog/output');
|
36 |
+
?>
|
37 |
+
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
38 |
+
<div class="product-large-image">
|
39 |
+
<?php
|
40 |
+
$_img = '<img id="product-large-image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
|
41 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
42 |
+
?>
|
43 |
+
</div>
|
44 |
+
<?php else: ?>
|
45 |
+
<div class="product-large-image">
|
46 |
+
<?php
|
47 |
+
$_img = '<img id="product-large-image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(456, null).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
|
48 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
49 |
+
?>
|
50 |
+
</div>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php $idx = 0; ?>
|
53 |
+
<?php if (count($this->getGalleryImages()) > 0): ?>
|
54 |
+
<div class="small-images">
|
55 |
+
<ul class="thumb-list">
|
56 |
+
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
57 |
+
<li>
|
58 |
+
<a class="item <?php echo ($idx == 0) ? 'first active' : ''; ?>" href="javascript:void(0)"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(456, null); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
|
59 |
+
</li>
|
60 |
+
<?php $idx++; ?>
|
61 |
+
<?php endforeach; ?>
|
62 |
+
</ul>
|
63 |
+
</div>
|
64 |
+
<?php endif; ?>
|
65 |
+
<script type="text/javascript">
|
66 |
+
//<![CDATA[
|
67 |
+
Event.observe(window, 'load', function(){
|
68 |
+
$$('.thumb-list li a').each(function(element){
|
69 |
+
element.observe('click', function(event){
|
70 |
+
$$('.thumb-list li a').each(function(ele){ele.removeClassName('active');});
|
71 |
+
var thisImgs = $(this).childElements('img');
|
72 |
+
$('product-large-image').writeAttribute('src', thisImgs[0].readAttribute('src'));
|
73 |
+
$(this).addClassName('active');
|
74 |
+
});
|
75 |
+
});
|
76 |
+
});
|
77 |
+
//]]>
|
78 |
+
</script>
|
app/design/frontend/ma2/default/template/catalog/product/view/options.phtml
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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_Catalog_Block_Product_View_Options */
|
27 |
+
?>
|
28 |
+
|
29 |
+
<?php $_options = Mage::helper('core')->decorateArray($this->getOptions()) ?>
|
30 |
+
<?php if (count($_options)):?>
|
31 |
+
<script type="text/javascript">
|
32 |
+
//<![CDATA[
|
33 |
+
var optionFileUpload = {
|
34 |
+
productForm : $('product_addtocart_form'),
|
35 |
+
formAction : '',
|
36 |
+
formElements : {},
|
37 |
+
upload : function(element){
|
38 |
+
this.formElements = this.productForm.select('input', 'select', 'textarea', 'button');
|
39 |
+
this.removeRequire(element.readAttribute('id').sub('option_', ''));
|
40 |
+
|
41 |
+
template = '<iframe id="upload_target" name="upload_target" style="width:0; height:0; border:0;"><\/iframe>';
|
42 |
+
|
43 |
+
Element.insert($('option_'+element.readAttribute('id').sub('option_', '')+'_uploaded_file'), {after: template});
|
44 |
+
|
45 |
+
this.formAction = this.productForm.action;
|
46 |
+
|
47 |
+
var baseUrl = '<?php echo $this->getUrl('*/product/upload') ?>';
|
48 |
+
var urlExt = 'option_id/'+element.readAttribute('id').sub('option_', '');
|
49 |
+
|
50 |
+
this.productForm.action = parseSidUrl(baseUrl, urlExt);
|
51 |
+
this.productForm.target = 'upload_target';
|
52 |
+
this.productForm.submit();
|
53 |
+
this.productForm.target = '';
|
54 |
+
this.productForm.action = this.formAction;
|
55 |
+
},
|
56 |
+
removeRequire : function(skipElementId){
|
57 |
+
for(var i=0; i<this.formElements.length; i++){
|
58 |
+
if (this.formElements[i].readAttribute('id') != 'option_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
|
59 |
+
this.formElements[i].disabled='disabled';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
},
|
63 |
+
addRequire : function(skipElementId){
|
64 |
+
for(var i=0; i<this.formElements.length; i++){
|
65 |
+
if (this.formElements[i].readAttribute('name') != 'options_'+skipElementId+'_file' && this.formElements[i].type != 'button') {
|
66 |
+
this.formElements[i].disabled='';
|
67 |
+
}
|
68 |
+
}
|
69 |
+
},
|
70 |
+
uploadCallback : function(data){
|
71 |
+
this.addRequire(data.optionId);
|
72 |
+
$('upload_target').remove();
|
73 |
+
|
74 |
+
if (data.error) {
|
75 |
+
|
76 |
+
} else {
|
77 |
+
$('option_'+data.optionId+'_uploaded_file').value = data.fileName;
|
78 |
+
$('option_'+data.optionId+'_file').value = '';
|
79 |
+
$('option_'+data.optionId+'_file').hide();
|
80 |
+
$('option_'+data.optionId+'').hide();
|
81 |
+
template = '<div id="option_'+data.optionId+'_file_box"><a href="#"><img src="var/options/'+data.fileName+'" alt=""><\/a><a href="#" onclick="optionFileUpload.removeFile('+data.optionId+')" title="Remove file" \/>Remove file<\/a>';
|
82 |
+
|
83 |
+
Element.insert($('option_'+data.optionId+'_uploaded_file'), {after: template});
|
84 |
+
}
|
85 |
+
},
|
86 |
+
removeFile : function(optionId)
|
87 |
+
{
|
88 |
+
$('option_'+optionId+'_uploaded_file').value= '';
|
89 |
+
$('option_'+optionId+'_file').show();
|
90 |
+
$('option_'+optionId+'').show();
|
91 |
+
|
92 |
+
$('option_'+optionId+'_file_box').remove();
|
93 |
+
}
|
94 |
+
}
|
95 |
+
var optionTextCounter = {
|
96 |
+
count : function(field,cntfield,maxlimit){
|
97 |
+
if (field.value.length > maxlimit){
|
98 |
+
field.value = field.value.substring(0, maxlimit);
|
99 |
+
} else {
|
100 |
+
cntfield.innerHTML = maxlimit - field.value.length;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
Product.Options = Class.create();
|
106 |
+
Product.Options.prototype = {
|
107 |
+
initialize : function(config) {
|
108 |
+
this.config = config;
|
109 |
+
this.reloadPrice();
|
110 |
+
document.observe("dom:loaded", this.reloadPrice.bind(this));
|
111 |
+
},
|
112 |
+
reloadPrice : function() {
|
113 |
+
var config = this.config;
|
114 |
+
var skipIds = [];
|
115 |
+
$$('body .product-custom-option').each(function(element){
|
116 |
+
var optionId = 0;
|
117 |
+
element.name.sub(/[0-9]+/, function(match){
|
118 |
+
optionId = parseInt(match[0], 10);
|
119 |
+
});
|
120 |
+
if (config[optionId]) {
|
121 |
+
var configOptions = config[optionId];
|
122 |
+
var curConfig = {price: 0};
|
123 |
+
if (element.type == 'checkbox' || element.type == 'radio') {
|
124 |
+
if (element.checked) {
|
125 |
+
if (typeof configOptions[element.getValue()] != 'undefined') {
|
126 |
+
curConfig = configOptions[element.getValue()];
|
127 |
+
}
|
128 |
+
}
|
129 |
+
} else if(element.hasClassName('datetime-picker') && !skipIds.include(optionId)) {
|
130 |
+
dateSelected = true;
|
131 |
+
$$('.product-custom-option[id^="options_' + optionId + '"]').each(function(dt){
|
132 |
+
if (dt.getValue() == '') {
|
133 |
+
dateSelected = false;
|
134 |
+
}
|
135 |
+
});
|
136 |
+
if (dateSelected) {
|
137 |
+
curConfig = configOptions;
|
138 |
+
skipIds[optionId] = optionId;
|
139 |
+
}
|
140 |
+
} else if(element.type == 'select-one' || element.type == 'select-multiple') {
|
141 |
+
if ('options' in element) {
|
142 |
+
$A(element.options).each(function(selectOption){
|
143 |
+
if ('selected' in selectOption && selectOption.selected) {
|
144 |
+
if (typeof(configOptions[selectOption.value]) != 'undefined') {
|
145 |
+
curConfig = configOptions[selectOption.value];
|
146 |
+
}
|
147 |
+
}
|
148 |
+
});
|
149 |
+
}
|
150 |
+
} else {
|
151 |
+
if (element.getValue().strip() != '') {
|
152 |
+
curConfig = configOptions;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
if(element.type == 'select-multiple' && ('options' in element)) {
|
156 |
+
$A(element.options).each(function(selectOption) {
|
157 |
+
if (('selected' in selectOption) && typeof(configOptions[selectOption.value]) != 'undefined') {
|
158 |
+
if (selectOption.selected) {
|
159 |
+
curConfig = configOptions[selectOption.value];
|
160 |
+
} else {
|
161 |
+
curConfig = {price: 0};
|
162 |
+
}
|
163 |
+
optionsPrice.addCustomPrices(optionId + '-' + selectOption.value, curConfig);
|
164 |
+
optionsPrice.reload();
|
165 |
+
}
|
166 |
+
});
|
167 |
+
} else {
|
168 |
+
optionsPrice.addCustomPrices(element.id || optionId, curConfig);
|
169 |
+
optionsPrice.reload();
|
170 |
+
}
|
171 |
+
}
|
172 |
+
});
|
173 |
+
}
|
174 |
+
}
|
175 |
+
function validateOptionsCallback(elmId, result) {
|
176 |
+
var container = $(elmId).up('ul.options-list');
|
177 |
+
if (result == 'failed') {
|
178 |
+
container.removeClassName('validation-passed');
|
179 |
+
container.addClassName('validation-failed');
|
180 |
+
} else {
|
181 |
+
container.removeClassName('validation-failed');
|
182 |
+
container.addClassName('validation-passed');
|
183 |
+
}
|
184 |
+
}
|
185 |
+
var opConfig = new Product.Options(<?php echo $this->getJsonConfig() ?>);
|
186 |
+
//]]>
|
187 |
+
</script>
|
188 |
+
<dl>
|
189 |
+
<?php foreach($_options as $_option): ?>
|
190 |
+
<?php echo $this->getOptionHtml($_option) ?>
|
191 |
+
<?php endforeach; ?>
|
192 |
+
</dl>
|
193 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/js.phtml
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
var DateOption = Class.create({
|
30 |
+
|
31 |
+
getDaysInMonth: function(month, year)
|
32 |
+
{
|
33 |
+
var curDate = new Date();
|
34 |
+
if (!month) {
|
35 |
+
month = curDate.getMonth();
|
36 |
+
}
|
37 |
+
if (2 == month && !year) { // leap year assumption for unknown year
|
38 |
+
return 29;
|
39 |
+
}
|
40 |
+
if (!year) {
|
41 |
+
year = curDate.getFullYear();
|
42 |
+
}
|
43 |
+
return 32 - new Date(year, month - 1, 32).getDate();
|
44 |
+
},
|
45 |
+
|
46 |
+
reloadMonth: function(event)
|
47 |
+
{
|
48 |
+
var selectEl = event.findElement();
|
49 |
+
var idParts = selectEl.id.split("_");
|
50 |
+
if (idParts.length != 3) {
|
51 |
+
return false;
|
52 |
+
}
|
53 |
+
var optionIdPrefix = idParts[0] + "_" + idParts[1];
|
54 |
+
var month = parseInt($(optionIdPrefix + "_month").value);
|
55 |
+
var year = parseInt($(optionIdPrefix + "_year").value);
|
56 |
+
var dayEl = $(optionIdPrefix + "_day");
|
57 |
+
|
58 |
+
var days = this.getDaysInMonth(month, year);
|
59 |
+
|
60 |
+
//remove days
|
61 |
+
for (var i = dayEl.options.length - 1; i >= 0; i--) {
|
62 |
+
if (dayEl.options[i].value > days) {
|
63 |
+
dayEl.remove(dayEl.options[i].index);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
// add days
|
68 |
+
var lastDay = parseInt(dayEl.options[dayEl.options.length-1].value);
|
69 |
+
for (i = lastDay + 1; i <= days; i++) {
|
70 |
+
this.addOption(dayEl, i, i);
|
71 |
+
}
|
72 |
+
},
|
73 |
+
|
74 |
+
addOption: function(select, text, value)
|
75 |
+
{
|
76 |
+
var option = document.createElement('OPTION');
|
77 |
+
option.value = value;
|
78 |
+
option.text = text;
|
79 |
+
|
80 |
+
if (select.options.add) {
|
81 |
+
select.options.add(option);
|
82 |
+
} else {
|
83 |
+
select.appendChild(option);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
});
|
87 |
+
dateOption = new DateOption();
|
88 |
+
//]]>
|
89 |
+
</script>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/type/date.phtml
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 $_optionId = $_option->getId() ?>
|
29 |
+
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
|
30 |
+
<?php echo $this->getFormatedPrice() ?></dt>
|
31 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
32 |
+
|
33 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
|
34 |
+
|| $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE): ?>
|
35 |
+
|
36 |
+
<?php echo $this->getDateHtml() ?>
|
37 |
+
|
38 |
+
<?php if (!$this->useCalendar()): ?>
|
39 |
+
<script type="text/javascript">
|
40 |
+
//<![CDATA[
|
41 |
+
Event.observe('options_<?php echo $_optionId ?>_month', 'change', dateOption.reloadMonth.bind(dateOption));
|
42 |
+
Event.observe('options_<?php echo $_optionId ?>_year', 'change', dateOption.reloadMonth.bind(dateOption));
|
43 |
+
//]]>
|
44 |
+
</script>
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
<?php endif; ?>
|
48 |
+
|
49 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DATE_TIME
|
50 |
+
|| $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_TIME): ?>
|
51 |
+
<span class="time-picker"><?php echo $this->getTimeHtml() ?></span>
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
<input type="hidden" name="validate_datetime_<?php echo $_optionId ?>" class="validate-datetime-<?php echo $_optionId ?>" value="" />
|
55 |
+
<script type="text/javascript">
|
56 |
+
//<![CDATA[
|
57 |
+
<?php if ($_option->getIsRequire()): ?>
|
58 |
+
Validation.addAllThese(
|
59 |
+
[
|
60 |
+
['validate-datetime-<?php echo $_optionId ?>', '<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('This is a required option') )?>', function(v) {
|
61 |
+
var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
|
62 |
+
for (var i=0; i < dateTimeParts.length; i++) {
|
63 |
+
if (dateTimeParts[i].value == "") return false;
|
64 |
+
}
|
65 |
+
return true;
|
66 |
+
}]
|
67 |
+
]
|
68 |
+
);
|
69 |
+
<?php else: ?>
|
70 |
+
Validation.add(
|
71 |
+
'validate-datetime-<?php echo $_optionId ?>',
|
72 |
+
'<?php echo $this->jsQuoteEscape( Mage::helper('catalog')->__('Field is not complete') )?>',
|
73 |
+
function(v) {
|
74 |
+
var dateTimeParts = $$('.datetime-picker[id^="options_<?php echo $_optionId ?>"]');
|
75 |
+
var hasWithValue = false, hasWithNoValue = false;
|
76 |
+
var pattern = /day_part$/i;
|
77 |
+
for (var i=0; i < dateTimeParts.length; i++) {
|
78 |
+
if (! pattern.test(dateTimeParts[i].id)) {
|
79 |
+
if (dateTimeParts[i].value === "") {
|
80 |
+
hasWithValue = true;
|
81 |
+
} else {
|
82 |
+
hasWithNoValue = true;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
return hasWithValue ^ hasWithNoValue;
|
87 |
+
}
|
88 |
+
);
|
89 |
+
<?php endif; ?>
|
90 |
+
//]]>
|
91 |
+
</script>
|
92 |
+
</dd>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/type/default.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 base_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 |
+
<dt>
|
29 |
+
<label><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
|
30 |
+
</dt>
|
app/design/frontend/ma2/default/template/catalog/product/view/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 base_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'))" />
|
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' : '' ?>" <?php echo $_fileExists ? 'disabled="disabled"' : '' ?> onchange="opConfig.reloadPrice()" />
|
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/frontend/ma2/default/template/catalog/product/view/options/type/select.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 base_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_Catalog_Block_Product_View_Options_Type_Select */ ?>
|
29 |
+
<?php $_option = $this->getOption() ?>
|
30 |
+
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label></dt>
|
31 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
32 |
+
<div class="input-box">
|
33 |
+
<?php echo $this->getValuesHtml() ?>
|
34 |
+
<?php if ($_option->getIsRequire()): ?>
|
35 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO || $_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX): ?>
|
36 |
+
<span id="options-<?php echo $_option->getId() ?>-container"></span>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php endif;?>
|
39 |
+
</div>
|
40 |
+
</dd>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/type/text.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 base_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 |
+
<dt><label<?php if ($_option->getIsRequire()) echo ' class="required"' ?>><?php if ($_option->getIsRequire()) echo '<em>*</em>' ?><?php echo $this->htmlEscape($_option->getTitle()) ?></label>
|
29 |
+
<?php echo $this->getFormatedPrice() ?></dt>
|
30 |
+
<dd<?php if ($_option->decoratedIsLast){?> class="last"<?php }?>>
|
31 |
+
<div class="input-box">
|
32 |
+
<?php if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD): ?>
|
33 |
+
<input type="text" onchange="opConfig.reloadPrice()" 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()) ?>" />
|
34 |
+
<?php elseif ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA): ?>
|
35 |
+
<textarea id="options_<?php echo $_option->getId() ?>_text" onchange="opConfig.reloadPrice()" 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"><?php echo $this->escapeHtml($this->getDefaultValue()) ?></textarea>
|
36 |
+
<?php endif; ?>
|
37 |
+
<?php if ($_option->getMaxCharacters()): ?>
|
38 |
+
<p class="note"><?php echo Mage::helper('catalog')->__('Maximum number of characters:')?> <strong><?php echo $_option->getMaxCharacters() ?></strong></p>
|
39 |
+
<?php endif; ?>
|
40 |
+
</div>
|
41 |
+
</dd>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/wrapper.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 base_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="product-options" id="product-options-wrapper">
|
28 |
+
<?php echo $this->getChildHtml('', true, true);?>
|
29 |
+
<?php if ($this->hasRequiredOptions()):?>
|
30 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
31 |
+
<?php endif;?>
|
32 |
+
</div>
|
33 |
+
<script type="text/javascript">decorateGeneric($$('#product-options-wrapper dl'), ['last']);</script>
|
app/design/frontend/ma2/default/template/catalog/product/view/options/wrapper/bottom.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 base_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="product-options-bottom">
|
28 |
+
<?php echo $this->getChildHtml('', true, true);?>
|
29 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/view/price.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 base_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 |
+
* @deprecated after 1.4.0.0-alpha3
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<div class="price-box" id="product_price">
|
32 |
+
<p class="old-price"><?php echo $this->__('Old Price:') ?> <?php echo $this->getPrice() ?></p>
|
33 |
+
<p class="special-price"><?php echo $this->getPrice() ?></p>
|
34 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/product/view/price_clone.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 base_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 $_product = $this->getProduct() ?>
|
28 |
+
<?php echo $this->getPriceHtml($_product, false, '_clone') ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/tierprices.phtml
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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_Catalog_Block_Product_View
|
31 |
+
*/
|
32 |
+
$_product = $this->getProduct();
|
33 |
+
$_tierPrices = $this->getTierPrices();
|
34 |
+
$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true);
|
35 |
+
|
36 |
+
/** @var $_catalogHelper Mage_Catalog_Helper_Data */
|
37 |
+
$_catalogHelper = Mage::helper('catalog');
|
38 |
+
|
39 |
+
$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product);
|
40 |
+
if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) {
|
41 |
+
$_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product);
|
42 |
+
}
|
43 |
+
|
44 |
+
?>
|
45 |
+
<?php if (count($_tierPrices) > 0): ?>
|
46 |
+
<ul class="<?php echo ($this->getInGrouped() ? 'tier-prices-grouped product-pricing-grouped' : 'tier-prices product-pricing'); ?>">
|
47 |
+
<?php if ($this->getInGrouped()): ?>
|
48 |
+
<?php $_tierPrices = $this->getTierPrices($_product); ?>
|
49 |
+
<?php endif; ?>
|
50 |
+
<?php Mage::helper('weee')->processTierPrices($_product, $_tierPrices); ?>
|
51 |
+
<?php foreach ($_tierPrices as $_index => $_price): ?>
|
52 |
+
<li>
|
53 |
+
<?php if ($_catalogHelper->canApplyMsrp($_product)): ?>
|
54 |
+
<?php if ($this->getInGrouped()): ?>
|
55 |
+
<?php echo $this->__('Buy %1$s for', $_price['price_qty']) ?>:
|
56 |
+
<?php else: ?>
|
57 |
+
<?php echo $this->__('Buy %1$s', $_price['price_qty']) ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
<?php else: ?>
|
60 |
+
|
61 |
+
<?php if ($this->helper('tax')->displayBothPrices()): ?>
|
62 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
|
63 |
+
<?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?>
|
64 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
|
65 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
|
66 |
+
<?php if ($_weeeTaxAttributes): ?>
|
67 |
+
(<small>
|
68 |
+
<?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
|
69 |
+
<?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
70 |
+
<?php echo $separator; ?>
|
71 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</small>)
|
74 |
+
<?php endif; ?>
|
75 |
+
<?php echo $this->__('each') ?>
|
76 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
|
77 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
|
78 |
+
<?php if ($_weeeTaxAttributes): ?>
|
79 |
+
(<small>
|
80 |
+
<?php echo $this->__('%1$s incl tax.', $_price['formated_price_incl_weee']); ?>
|
81 |
+
<?php $separator = ' + '; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
82 |
+
<?php echo $separator; ?>
|
83 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
|
84 |
+
<?php endforeach; ?>
|
85 |
+
</small>)
|
86 |
+
<?php endif; ?>
|
87 |
+
<?php echo $this->__('each') ?>
|
88 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
|
89 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
|
90 |
+
<?php if ($_weeeTaxAttributes): ?>
|
91 |
+
(<small>
|
92 |
+
<?php foreach ($_weeeTaxAttributes as $_attribute): ?>
|
93 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
94 |
+
<?php endforeach; ?>
|
95 |
+
<?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
|
96 |
+
</small>)
|
97 |
+
<?php endif; ?>
|
98 |
+
<?php echo $this->__('each') ?>
|
99 |
+
<?php else: ?>
|
100 |
+
<?php echo $this->__('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?>
|
101 |
+
<?php endif; ?>
|
102 |
+
<?php else: ?>
|
103 |
+
<?php if ($this->helper('tax')->displayPriceIncludingTax()): ?>
|
104 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
|
105 |
+
<?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?>
|
106 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
|
107 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
|
108 |
+
<?php if ($_weeeTaxAttributes): ?>
|
109 |
+
(<small>
|
110 |
+
<?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
111 |
+
<?php echo $separator; ?>
|
112 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
113 |
+
<?php $separator = ' + '; endforeach; ?>
|
114 |
+
</small>)
|
115 |
+
<?php endif; ?>
|
116 |
+
<?php echo $this->__('each') ?>
|
117 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
|
118 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?>
|
119 |
+
<?php if ($_weeeTaxAttributes): ?>
|
120 |
+
(<small>
|
121 |
+
<?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
122 |
+
<?php echo $separator; ?>
|
123 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
|
124 |
+
<?php $separator = ' + '; endforeach; ?>
|
125 |
+
</small>)
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php echo $this->__('each') ?>
|
128 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
|
129 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?>
|
130 |
+
<?php if ($_weeeTaxAttributes): ?>
|
131 |
+
(<small>
|
132 |
+
<?php foreach ($_weeeTaxAttributes as $_attribute): ?>
|
133 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
134 |
+
<?php endforeach; ?>
|
135 |
+
<?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?>
|
136 |
+
</small>)
|
137 |
+
<?php endif; ?>
|
138 |
+
<?php echo $this->__('each') ?>
|
139 |
+
<?php else: ?>
|
140 |
+
<?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?>
|
141 |
+
<?php endif; ?>
|
142 |
+
<?php else: ?>
|
143 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_product, 0)): ?>
|
144 |
+
<?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?>
|
145 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 1)): ?>
|
146 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
|
147 |
+
<?php if ($_weeeTaxAttributes): ?>
|
148 |
+
(<small>
|
149 |
+
<?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
150 |
+
<?php echo $separator; ?>
|
151 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
152 |
+
<?php $separator = ' + '; endforeach; ?>
|
153 |
+
</small>)
|
154 |
+
<?php endif; ?>
|
155 |
+
<?php echo $this->__('each') ?>
|
156 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 4)): ?>
|
157 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?>
|
158 |
+
<?php if ($_weeeTaxAttributes): ?>
|
159 |
+
(<small>
|
160 |
+
<?php $separator = ''; foreach ($_weeeTaxAttributes as $_attribute): ?>
|
161 |
+
<?php echo $separator; ?>
|
162 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?>
|
163 |
+
<?php $separator = ' + '; endforeach; ?>
|
164 |
+
</small>)
|
165 |
+
<?php endif; ?>
|
166 |
+
<?php echo $this->__('each') ?>
|
167 |
+
<?php elseif(Mage::helper('weee')->typeOfDisplay($_product, 2)): ?>
|
168 |
+
<?php echo $this->__('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?>
|
169 |
+
<?php if ($_weeeTaxAttributes): ?>
|
170 |
+
(<small>
|
171 |
+
<?php foreach ($_weeeTaxAttributes as $_attribute): ?>
|
172 |
+
<?php echo $_attribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_attribute->getAmount()); ?>
|
173 |
+
<?php endforeach; ?>
|
174 |
+
<?php echo $this->__('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?>
|
175 |
+
</small>)
|
176 |
+
<?php endif; ?>
|
177 |
+
<?php echo $this->__('each') ?>
|
178 |
+
<?php else: ?>
|
179 |
+
<?php echo $this->__('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?>
|
180 |
+
<?php endif; ?>
|
181 |
+
<?php endif; ?>
|
182 |
+
<?php endif; ?>
|
183 |
+
|
184 |
+
<?php endif; // Can apply MSRP ?>
|
185 |
+
|
186 |
+
<?php if (!$this->getInGrouped()): ?>
|
187 |
+
<?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
|
188 |
+
|| ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?>
|
189 |
+
<?php echo $this->__('and') ?> <strong class="benefit"><?php echo $this->__('save')?> <span class="percent tier-<?php echo $_index;?>"><?php echo $_price['savePercent']?></span>%
|
190 |
+
<?php endif ?></strong>
|
191 |
+
<?php endif; ?>
|
192 |
+
|
193 |
+
<?php if ($_catalogHelper->isShowPriceOnGesture($_product)):?>
|
194 |
+
<?php $popupId = 'msrp-popup-' . $_product->getId() . $this->helper('core')->getRandomString(20); ?>
|
195 |
+
<a href="#" id="<?php echo($popupId);?>"><?php echo $this->__('Click for price'); ?></a>
|
196 |
+
<script type="text/javascript">
|
197 |
+
<?php
|
198 |
+
$addToCartUrl = $this->getProduct()->isSalable()
|
199 |
+
? $this->getAddToCartUrl($_product, array('qty' => $_price['price_qty']))
|
200 |
+
: '';
|
201 |
+
?>
|
202 |
+
<?php if (!$this->getInGrouped()): ?>
|
203 |
+
var newLink = {
|
204 |
+
url: "<?php echo $addToCartUrl; ?>",
|
205 |
+
qty: "<?php echo $_price['price_qty']?>"
|
206 |
+
};
|
207 |
+
<?php else: ?>
|
208 |
+
var newLink = {
|
209 |
+
url: "<?php echo $addToCartUrl; ?>",
|
210 |
+
notUseForm: true
|
211 |
+
};
|
212 |
+
<?php endif ?>
|
213 |
+
Catalog.Map.addHelpLink(
|
214 |
+
$('<?php echo $popupId ?>'),
|
215 |
+
"<?php echo $_product->getName() ?>",
|
216 |
+
<?php echo json_encode($_price['real_price_html']) ?>,
|
217 |
+
"<?php echo $this->helper('core')->currency($_product->getMsrp(),true,false) ?>",
|
218 |
+
newLink
|
219 |
+
);
|
220 |
+
</script>
|
221 |
+
<?php else: ?>
|
222 |
+
<span class="msrp-price-hide-message">
|
223 |
+
<?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
|
224 |
+
</span>
|
225 |
+
<?php endif; ?>
|
226 |
+
|
227 |
+
|
228 |
+
</li>
|
229 |
+
|
230 |
+
<?php endforeach ?>
|
231 |
+
</ul>
|
232 |
+
<?php endif;?>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/configurable.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 base_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 |
+
* @deprecated after 1.4.1.0 in favor of default.phtml
|
30 |
+
*/
|
31 |
+
?>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/default.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 base_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_Abstract */?>
|
28 |
+
<?php $_product = $this->getProduct() ?>
|
29 |
+
|
30 |
+
<?php if ($_product->isAvailable()): ?>
|
31 |
+
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
|
32 |
+
<?php else: ?>
|
33 |
+
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
|
34 |
+
<?php endif; ?>
|
35 |
+
<?php echo $this->getChildHtml('product_type_data_extra') ?>
|
36 |
+
<?php echo $this->getPriceHtml($_product) ?>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/grouped.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 base_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 |
+
* Grouped product data template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Media
|
31 |
+
* @see Mage_Catalog_Block_Product_View_Type_Grouped
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $this->setPreconfiguredValue(); ?>
|
35 |
+
<?php $_product = $this->getProduct(); ?>
|
36 |
+
<?php $_associatedProducts = $this->getAssociatedProducts(); ?>
|
37 |
+
<?php $_hasAssociatedProducts = count($_associatedProducts) > 0; ?>
|
38 |
+
<?php if ($_product->isAvailable() && $_hasAssociatedProducts): ?>
|
39 |
+
<p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p>
|
40 |
+
<?php else: ?>
|
41 |
+
<p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php echo $this->getChildHtml('product_type_data_extra') ?>
|
44 |
+
<table class="data-table grouped-items-table" id="super-product-table">
|
45 |
+
<col />
|
46 |
+
<col />
|
47 |
+
<col width="1" />
|
48 |
+
<thead>
|
49 |
+
<tr>
|
50 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
51 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
52 |
+
<th class="a-right"><?php echo $this->__('Price') ?></th>
|
53 |
+
<?php endif; ?>
|
54 |
+
<?php if ($_product->isSaleable()): ?>
|
55 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
56 |
+
<?php endif; ?>
|
57 |
+
</tr>
|
58 |
+
</thead>
|
59 |
+
<tbody>
|
60 |
+
<?php if ($_hasAssociatedProducts): ?>
|
61 |
+
<?php foreach ($_associatedProducts as $_item): ?>
|
62 |
+
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_item, $_item->getFinalPrice(), true) ?>
|
63 |
+
<tr>
|
64 |
+
<td><?php echo $this->htmlEscape($_item->getName()) ?></td>
|
65 |
+
<?php if ($this->getCanShowProductPrice($_product)): ?>
|
66 |
+
<td class="a-right">
|
67 |
+
<?php if ($this->getCanShowProductPrice($_item)): ?>
|
68 |
+
<?php echo $this->getPriceHtml($_item, true) ?>
|
69 |
+
<?php echo $this->getTierPriceHtml($_item) ?>
|
70 |
+
<?php endif; ?>
|
71 |
+
</td>
|
72 |
+
<?php endif; ?>
|
73 |
+
<?php if ($_product->isSaleable()): ?>
|
74 |
+
<td class="a-center">
|
75 |
+
<?php if ($_item->isSaleable()) : ?>
|
76 |
+
<input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
77 |
+
<?php else: ?>
|
78 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
79 |
+
<?php endif; ?>
|
80 |
+
</td>
|
81 |
+
<?php endif; ?>
|
82 |
+
</tr>
|
83 |
+
<?php endforeach; ?>
|
84 |
+
<?php else: ?>
|
85 |
+
<tr>
|
86 |
+
<td colspan="<?php if ($_product->isSaleable()): ?>4<?php else : ?>3<?php endif; ?>"><?php echo $this->__('No options of this product are available.') ?></td>
|
87 |
+
</tr>
|
88 |
+
<?php endif; ?>
|
89 |
+
</tbody>
|
90 |
+
</table>
|
91 |
+
<script type="text/javascript">decorateTable('super-product-table')</script>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/options/configurable.phtml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
$_product = $this->getProduct();
|
30 |
+
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
|
31 |
+
?>
|
32 |
+
<?php if ($_product->isSaleable() && count($_attributes)):?>
|
33 |
+
<dl>
|
34 |
+
<?php foreach($_attributes as $_attribute): ?>
|
35 |
+
<dt><label class="required"><em>*</em><?php echo $_attribute->getLabel() ?></label></dt>
|
36 |
+
<dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>
|
37 |
+
<div class="input-box">
|
38 |
+
<select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
|
39 |
+
<option><?php echo $this->__('Choose an Option...') ?></option>
|
40 |
+
</select>
|
41 |
+
</div>
|
42 |
+
</dd>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</dl>
|
45 |
+
<script type="text/javascript">
|
46 |
+
var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
|
47 |
+
</script>
|
48 |
+
<?php endif;?>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/simple.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 base_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 |
+
* @deprecated after 1.4.1.0 in favor of default.phtml
|
30 |
+
*/
|
31 |
+
?>
|
app/design/frontend/ma2/default/template/catalog/product/view/type/virtual.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 base_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 |
+
* @deprecated after 1.4.1.0 in favor of default.phtml
|
30 |
+
*/
|
31 |
+
?>
|
app/design/frontend/ma2/default/template/catalog/product/widget/link/link_block.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 base_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 |
+
<span class="widget widget-product-link"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
|
app/design/frontend/ma2/default/template/catalog/product/widget/link/link_inline.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 base_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 |
+
<span class="widget widget-product-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></span>
|
app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_default_list.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 base_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 (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
28 |
+
<div class="widget widget-new-products">
|
29 |
+
<div class="block block-products">
|
30 |
+
<div class="block-title">
|
31 |
+
<strong><span><?php echo $this->__('New Products') ?></span></strong>
|
32 |
+
</div>
|
33 |
+
<div class="block-content">
|
34 |
+
<?php $suffix = $this->getNameInLayout(); ?>
|
35 |
+
<ol class="mini-products-list" id="widget-new-products-<?php echo $suffix; ?>">
|
36 |
+
<?php foreach ($_products->getItems() as $_product): ?>
|
37 |
+
<li class="item">
|
38 |
+
<a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(50) ?>" width="50" height="50" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
|
39 |
+
<div class="product-details">
|
40 |
+
<p class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
|
41 |
+
<?php echo $this->getPriceHtml($_product, true, '-widget-new-'.$suffix) ?>
|
42 |
+
<?php if ($_product->getIsSalable()): ?>
|
43 |
+
<a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Cart') ?></a>
|
44 |
+
<?php else: ?>
|
45 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
46 |
+
<?php endif; ?>
|
47 |
+
</div>
|
48 |
+
</li>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
</ol>
|
51 |
+
<script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_images_list.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 base_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 (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
28 |
+
<div class="widget widget-new-products">
|
29 |
+
<div class="block block-list">
|
30 |
+
<div class="block-title">
|
31 |
+
<strong><span><?php echo $this->__('New Products') ?></span></strong>
|
32 |
+
</div>
|
33 |
+
<div class="block-content">
|
34 |
+
<?php $suffix = $this->getNameInLayout(); ?>
|
35 |
+
<ol class="mini-products-images-list" id="widget-new-products-<?php echo $suffix; ?>">
|
36 |
+
<?php foreach ($_products->getItems() as $_product): ?>
|
37 |
+
<li class="item">
|
38 |
+
<a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(76) ?>" width="76" height="76" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
|
39 |
+
</li>
|
40 |
+
<?php endforeach; ?>
|
41 |
+
</ol>
|
42 |
+
<script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/widget/new/column/new_names_list.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 base_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 (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
28 |
+
<div class="widget widget-new-products">
|
29 |
+
<div class="block block-list">
|
30 |
+
<div class="block-title">
|
31 |
+
<strong><span><?php echo $this->__('New Products') ?></span></strong>
|
32 |
+
</div>
|
33 |
+
<div class="block-content">
|
34 |
+
<?php $suffix = $this->getNameInLayout(); ?>
|
35 |
+
<ol id="widget-new-products-<?php echo $suffix; ?>">
|
36 |
+
<?php foreach ($_products->getItems() as $_product): ?>
|
37 |
+
<li class="item">
|
38 |
+
<p class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></p>
|
39 |
+
</li>
|
40 |
+
<?php endforeach; ?>
|
41 |
+
</ol>
|
42 |
+
<script type="text/javascript">decorateList('widget-new-products-<?php echo $suffix; ?>', 'none-recursive')</script>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/widget/new/content/new_grid.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 base_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 (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
28 |
+
<div class="widget widget-new-products">
|
29 |
+
<div class="widget-title">
|
30 |
+
<h2><?php echo $this->__('New Products') ?></h2>
|
31 |
+
</div>
|
32 |
+
<div class="widget-products">
|
33 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
34 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
35 |
+
<?php if ($i++%$_columnCount==0): ?>
|
36 |
+
<ul class="products-grid">
|
37 |
+
<?php endif ?>
|
38 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
39 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(85) ?>" width="85" height="85" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
|
40 |
+
<h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
|
41 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
42 |
+
<?php echo $this->getPriceHtml($_product, true, '-widget-new-grid') ?>
|
43 |
+
<div class="actions">
|
44 |
+
<?php if ($_product->isSaleable()): ?>
|
45 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
46 |
+
<?php else: ?>
|
47 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
48 |
+
<?php endif; ?>
|
49 |
+
<ul class="add-to-links">
|
50 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
51 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
54 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
55 |
+
<?php endif; ?>
|
56 |
+
</ul>
|
57 |
+
</div>
|
58 |
+
</li>
|
59 |
+
<?php if ($i%$_columnCount==0 || $i==count($_products)): ?>
|
60 |
+
</ul>
|
61 |
+
<?php endif ?>
|
62 |
+
<?php endforeach; ?>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/product/widget/new/content/new_list.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 base_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 (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
|
28 |
+
<div class="widget widget-new-products">
|
29 |
+
<div class="widget-title">
|
30 |
+
<h2><?php echo $this->__('New Products') ?></h2>
|
31 |
+
</div>
|
32 |
+
<div class="widget-products">
|
33 |
+
<ol class="products-list">
|
34 |
+
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
|
35 |
+
<li class="item<?php echo (++$i == count($_products))?' last':''; ?>">
|
36 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(85) ?>" width="85" height="85" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" /></a>
|
37 |
+
<div class="product-shop">
|
38 |
+
<div class="f-fix">
|
39 |
+
<h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>)"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
|
40 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
41 |
+
<?php echo $this->getPriceHtml($_product, true, '-widget-new-list') ?>
|
42 |
+
<?php if ($_product->isSaleable()): ?>
|
43 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
44 |
+
<?php else: ?>
|
45 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
46 |
+
<?php endif; ?>
|
47 |
+
<ul class="add-to-links">
|
48 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
49 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
50 |
+
<?php endif; ?>
|
51 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
52 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
53 |
+
<?php endif; ?>
|
54 |
+
</ul>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</li>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</ol>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalog/rss/product/price.phtml
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 RSS feeds
|
31 |
+
*
|
32 |
+
* @see Mage_Catalog_Block_Product_Price
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
|
36 |
+
<?php $_product = $this->getProduct() ?>
|
37 |
+
<?php $_id = $_product->getId() ?>
|
38 |
+
<?php if ($_product->getCanShowPrice() !== false):?>
|
39 |
+
|
40 |
+
<?php $_weeeSeparator = ''; ?>
|
41 |
+
|
42 |
+
<?php $simplePricesTax = ($this->helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?>
|
43 |
+
|
44 |
+
<?php $_minimalPriceValue = $_product->getMinimalPrice() ?>
|
45 |
+
<?php $_minimalPrice = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?>
|
46 |
+
|
47 |
+
<?php if (!$_product->isGrouped()): ?>
|
48 |
+
<?php $_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); ?>
|
49 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))): ?>
|
50 |
+
<?php $_weeeTaxAmount = Mage::helper('weee')->getAmount($_product); ?>
|
51 |
+
<?php $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); ?>
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
<div class="price-box">
|
55 |
+
<?php $_price = $this->helper('tax')->getPrice($_product, $_product->getPrice()) ?>
|
56 |
+
<?php $_regularPrice = $this->helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?>
|
57 |
+
<?php $_finalPrice = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?>
|
58 |
+
<?php $_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?>
|
59 |
+
<?php $_weeeDisplayType = Mage::helper('weee')->getPriceDisplayType(); ?>
|
60 |
+
<?php if ($_finalPrice == $_price): ?>
|
61 |
+
<?php if ($this->helper('tax')->displayBothPrices()): ?>
|
62 |
+
<?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
|
63 |
+
<span class="price-excluding-tax">
|
64 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
65 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
|
66 |
+
</span>
|
67 |
+
<span class="price-including-tax">
|
68 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
69 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
70 |
+
</span>
|
71 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
72 |
+
<span class="price-excluding-tax">
|
73 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
74 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
|
75 |
+
</span>
|
76 |
+
<span class="price-including-tax">
|
77 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
78 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
79 |
+
<br />
|
80 |
+
<span class="weee">(<small>
|
81 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
82 |
+
<?php echo $_weeeSeparator; ?>
|
83 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
84 |
+
<?php $_weeeSeparator = ' + '; ?>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
</small>)</span>
|
87 |
+
</span>
|
88 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
89 |
+
<span class="price-excluding-tax">
|
90 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
91 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,false) ?></span>
|
92 |
+
</span>
|
93 |
+
<span class="price-including-tax">
|
94 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
95 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
96 |
+
<br />
|
97 |
+
<span class="weee">(<small>
|
98 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
99 |
+
<?php echo $_weeeSeparator; ?>
|
100 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
101 |
+
<?php $_weeeSeparator = ' + '; ?>
|
102 |
+
<?php endforeach; ?>
|
103 |
+
</small>)</span>
|
104 |
+
</span>
|
105 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
106 |
+
<span class="price-excluding-tax">
|
107 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
108 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,false) ?></span>
|
109 |
+
</span>
|
110 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
111 |
+
<span class="weee">
|
112 |
+
<small>
|
113 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
114 |
+
</small>
|
115 |
+
</span>
|
116 |
+
<br />
|
117 |
+
<?php endforeach; ?>
|
118 |
+
<span class="price-including-tax">
|
119 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
120 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
121 |
+
</span>
|
122 |
+
<?php else: ?>
|
123 |
+
<span class="price-excluding-tax">
|
124 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
125 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,false) ?></span>
|
126 |
+
</span>
|
127 |
+
<span class="price-including-tax">
|
128 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
129 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
|
130 |
+
</span>
|
131 |
+
<?php endif; ?>
|
132 |
+
<?php else: ?>
|
133 |
+
<?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
|
134 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
|
135 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
136 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
|
137 |
+
<br />
|
138 |
+
<span class="weee">(<small>
|
139 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
140 |
+
<?php echo $_weeeSeparator; ?>
|
141 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
142 |
+
<?php $_weeeSeparator = ' + '; ?>
|
143 |
+
<?php endforeach; ?>
|
144 |
+
</small>)</span>
|
145 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
146 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
|
147 |
+
<br />
|
148 |
+
<span class="weee">(<small>
|
149 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
150 |
+
<?php echo $_weeeSeparator; ?>
|
151 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
152 |
+
<?php $_weeeSeparator = ' + '; ?>
|
153 |
+
<?php endforeach; ?>
|
154 |
+
</small>)</span>
|
155 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
156 |
+
<span class="regular-price"><?php echo Mage::helper('core')->currency($_price,true,true) ?></span><br />
|
157 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
158 |
+
<span class="weee">
|
159 |
+
<small>
|
160 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
161 |
+
</small>
|
162 |
+
</span>
|
163 |
+
<br />
|
164 |
+
<?php endforeach; ?>
|
165 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price+$_weeeTaxAmount,true,true) ?></span>
|
166 |
+
<?php else: ?>
|
167 |
+
<span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_price,true,true) ?></span>
|
168 |
+
<?php endif; ?>
|
169 |
+
<?php endif; ?>
|
170 |
+
<?php else: /* if ($_finalPrice == $_price): */ ?>
|
171 |
+
<?php $_originalWeeeTaxAmount = Mage::helper('weee')->getOriginalAmount($_product); ?>
|
172 |
+
|
173 |
+
<?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 0)): // including ?>
|
174 |
+
<p class="old-price">
|
175 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
176 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
|
177 |
+
</p>
|
178 |
+
|
179 |
+
<?php if ($this->helper('tax')->displayBothPrices()): ?>
|
180 |
+
<p class="special-price">
|
181 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
182 |
+
<span class="price-excluding-tax">
|
183 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
184 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
|
185 |
+
</span>
|
186 |
+
<span class="price-including-tax">
|
187 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
188 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
189 |
+
</span>
|
190 |
+
</p>
|
191 |
+
<?php else: ?>
|
192 |
+
<p class="special-price">
|
193 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
194 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
|
195 |
+
</p>
|
196 |
+
<?php endif; ?>
|
197 |
+
|
198 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 1)): // incl. + weee ?>
|
199 |
+
<p class="old-price">
|
200 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
201 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
|
202 |
+
</p>
|
203 |
+
|
204 |
+
<p class="special-price">
|
205 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
206 |
+
<span class="price-excluding-tax">
|
207 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
208 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
|
209 |
+
</span>
|
210 |
+
<br />
|
211 |
+
<span class="weee">(<small>
|
212 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
213 |
+
<?php echo $_weeeSeparator; ?>
|
214 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
215 |
+
<?php $_weeeSeparator = ' + '; ?>
|
216 |
+
<?php endforeach; ?>
|
217 |
+
</small>)</span>
|
218 |
+
<span class="price-including-tax">
|
219 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
220 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
221 |
+
</span>
|
222 |
+
</p>
|
223 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 4)): // incl. + weee ?>
|
224 |
+
<p class="old-price">
|
225 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
226 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
|
227 |
+
</p>
|
228 |
+
|
229 |
+
<p class="special-price">
|
230 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
231 |
+
<span class="price-excluding-tax">
|
232 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
233 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice+$_weeeTaxAmount,true,false) ?></span>
|
234 |
+
</span>
|
235 |
+
<br />
|
236 |
+
<span class="weee">(<small>
|
237 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
238 |
+
<?php echo $_weeeSeparator; ?>
|
239 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?>
|
240 |
+
<?php $_weeeSeparator = ' + '; ?>
|
241 |
+
<?php endforeach; ?>
|
242 |
+
</small>)</span>
|
243 |
+
<span class="price-including-tax">
|
244 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
245 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
246 |
+
</span>
|
247 |
+
</p>
|
248 |
+
<?php elseif ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
|
249 |
+
<p class="old-price">
|
250 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
251 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice,true,false) ?></span>
|
252 |
+
</p>
|
253 |
+
|
254 |
+
<p class="special-price">
|
255 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
256 |
+
<span class="price-excluding-tax">
|
257 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
258 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
|
259 |
+
</span>
|
260 |
+
<?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
|
261 |
+
<span class="weee">
|
262 |
+
<small>
|
263 |
+
<?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo Mage::helper('core')->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
|
264 |
+
</small>
|
265 |
+
</span>
|
266 |
+
<br />
|
267 |
+
<?php endforeach; ?>
|
268 |
+
<span class="price-including-tax">
|
269 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
270 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?></span>
|
271 |
+
</span>
|
272 |
+
</p>
|
273 |
+
<?php else: // excl. ?>
|
274 |
+
<p class="old-price">
|
275 |
+
<span class="price-label"><?php echo $this->__('Regular Price:') ?></span>
|
276 |
+
<span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_regularPrice,true,false) ?></span>
|
277 |
+
</p>
|
278 |
+
|
279 |
+
<?php if ($this->helper('tax')->displayBothPrices()): ?>
|
280 |
+
<p class="special-price">
|
281 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
282 |
+
<span class="price-excluding-tax">
|
283 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
284 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
|
285 |
+
</span>
|
286 |
+
<span class="price-including-tax">
|
287 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
288 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPriceInclTax,true,false) ?></span>
|
289 |
+
</span>
|
290 |
+
</p>
|
291 |
+
<?php else: ?>
|
292 |
+
<p class="special-price">
|
293 |
+
<span class="price-label"><?php echo $this->__('Special Price:') ?></span>
|
294 |
+
<span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_finalPrice,true,false) ?></span>
|
295 |
+
</p>
|
296 |
+
<?php endif; ?>
|
297 |
+
<?php endif; ?>
|
298 |
+
|
299 |
+
<?php endif; /* if ($_finalPrice == $_price): */ ?>
|
300 |
+
|
301 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
|
302 |
+
|
303 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
|
304 |
+
<?php if ($_weeeTaxAmount && Mage::helper('weee')->typeOfDisplay($_product, array(0, 1, 4))): ?>
|
305 |
+
<?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
|
306 |
+
<?php endif; ?>
|
307 |
+
|
308 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
309 |
+
<a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
|
310 |
+
<?php else:?>
|
311 |
+
<span class="minimal-price-link">
|
312 |
+
<?php endif?>
|
313 |
+
<span class="label"><?php echo $this->__('As low as:') ?></span>
|
314 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_minimalPriceDisplayValue,true,false) ?></span>
|
315 |
+
<?php if ($this->getUseLinkForAsLowAs()):?>
|
316 |
+
</a>
|
317 |
+
<?php else:?>
|
318 |
+
</span>
|
319 |
+
<?php endif?>
|
320 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
|
321 |
+
</div>
|
322 |
+
|
323 |
+
<?php else: /* if (!$_product->isGrouped()): */ ?>
|
324 |
+
<?php
|
325 |
+
$_exclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null);
|
326 |
+
$_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true);
|
327 |
+
?>
|
328 |
+
<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
|
329 |
+
<div class="price-box">
|
330 |
+
<p class="minimal-price">
|
331 |
+
<span class="price-label"><?php echo $this->__('Starting at:') ?></span>
|
332 |
+
<?php if ($this->helper('tax')->displayBothPrices()): ?>
|
333 |
+
<span class="price-excluding-tax">
|
334 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax:') ?></span>
|
335 |
+
<span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_exclTax, true, false) ?></span>
|
336 |
+
</span>
|
337 |
+
<span class="price-including-tax">
|
338 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax:') ?></span>
|
339 |
+
<span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_inclTax, true, false) ?></span>
|
340 |
+
</span>
|
341 |
+
<?php else: ?>
|
342 |
+
<?php
|
343 |
+
$_showPrice = $_inclTax;
|
344 |
+
if (!$this->helper('tax')->displayPriceIncludingTax()) {
|
345 |
+
$_showPrice = $_exclTax;
|
346 |
+
}
|
347 |
+
?>
|
348 |
+
<span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo Mage::helper('core')->currency($_showPrice, true, false) ?></span>
|
349 |
+
<?php endif; ?>
|
350 |
+
</p>
|
351 |
+
</div>
|
352 |
+
<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
|
353 |
+
<?php endif; /* if (!$_product->isGrouped()): */ ?>
|
354 |
+
<?php else: ?>
|
355 |
+
<?php //echo $this->helper('catalog')->__('Price is not available');?>
|
356 |
+
<?php endif; /* if (!$_product->getCanShowPrice()): */?>
|
app/design/frontend/ma2/default/template/catalog/seo/sitemap.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 base_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_Catalog_Block_Seo_Sitemap_
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php $_items = $this->getCollection(); ?>
|
33 |
+
<?php if($_items->getSize()): ?>
|
34 |
+
<ul class="sitemap">
|
35 |
+
<?php foreach ($_items as $_item): ?>
|
36 |
+
<li><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->escapeHtml($_item->name) ?></a></li>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</ul>
|
39 |
+
<?php else: ?>
|
40 |
+
<p class="note-msg">
|
41 |
+
<?php echo $this->__('There are no %s available.', $this->getItemsTitle()); ?>
|
42 |
+
</p>
|
43 |
+
<script type="text/javascript">
|
44 |
+
//<![CDATA[
|
45 |
+
if ($('sitemap_top_links') != undefined) {
|
46 |
+
$('sitemap_top_links').hide();
|
47 |
+
}
|
48 |
+
//]]>
|
49 |
+
</script>
|
50 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalog/seo/sitemap/container.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 base_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="page-sitemap">
|
28 |
+
<div class="page-title">
|
29 |
+
<h1><?php echo $this->getTitle() ?></h1>
|
30 |
+
</div>
|
31 |
+
<div id="sitemap_top_links">
|
32 |
+
<?php echo $this->getChildHtml('links') ?>
|
33 |
+
</div>
|
34 |
+
<?php echo $this->getChildHtml('pager_top') ?>
|
35 |
+
<?php echo $this->getChildHtml('sitemap') ?>
|
36 |
+
<?php echo $this->getChildHtml('links') ?>
|
37 |
+
<?php echo $this->getChildHtml('pager_bottom') ?>
|
38 |
+
</div>
|
app/design/frontend/ma2/default/template/catalog/seo/tree.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 base_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_Catalog_Block_Seo_Sitemap_
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php $_items = $this->getCollection(); ?>
|
33 |
+
<?php if($_items->getSize()): ?>
|
34 |
+
<ul class="sitemap">
|
35 |
+
<?php foreach ($_items as $_item): ?>
|
36 |
+
<li class="level-<?php echo $this->getLevel($_item) ?>" <?php echo $this->getLevel($_item)?'style="padding-left:' . $this->getLevel($_item, 2) . '0px;"':'' ?>><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $_item->name ?></a></li>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</ul>
|
39 |
+
<?php else: ?>
|
40 |
+
<p class="note-msg">
|
41 |
+
<?php echo $this->__('There are no %s available.', $this->getItemsTitle()); ?>
|
42 |
+
</p>
|
43 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/catalogsearch/advanced/form.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 base_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 |
+
* Catalog advanced search form
|
30 |
+
*
|
31 |
+
* @see Mage_CatalogSearch_Block_Advanced_Form
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $maxQueryLength= $this->helper('catalogsearch')->getMaxQueryLength();?>
|
35 |
+
<div class="page-title">
|
36 |
+
<h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
|
37 |
+
</div>
|
38 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
39 |
+
<form action="<?php echo $this->getSearchPostUrl() ?>" method="get" id="form-validate">
|
40 |
+
<div class="fieldset advanced-search">
|
41 |
+
<h2 class="legend"><?php echo $this->__('Search Settings') ?></h2>
|
42 |
+
<ul class="form-list" id="advanced-search-list">
|
43 |
+
<?php foreach ($this->getSearchableAttributes() as $_attribute): ?>
|
44 |
+
<?php $_code = $_attribute->getAttributeCode() ?>
|
45 |
+
<li>
|
46 |
+
<label for="<?php echo $_code ?>"><?php echo $this->getAttributeLabel($_attribute) ?></label>
|
47 |
+
<?php switch($this->getAttributeInputType($_attribute)):
|
48 |
+
case 'number': ?>
|
49 |
+
<div class="input-range">
|
50 |
+
<input type="text" name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" />
|
51 |
+
<span class="separator">-</span>
|
52 |
+
<input type="text" name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" maxlength="<?php echo $maxQueryLength;?>" />
|
53 |
+
</div>
|
54 |
+
<?php break;
|
55 |
+
case 'price': ?>
|
56 |
+
<div class="input-range">
|
57 |
+
<input name="<?php echo $_code ?>[from]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'from')) ?>" id="<?php echo $_code ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" />
|
58 |
+
<span class="separator">-</span>
|
59 |
+
<input name="<?php echo $_code ?>[to]" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute, 'to')) ?>" id="<?php echo $_code ?>_to" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text validate-number" type="text" maxlength="<?php echo $maxQueryLength;?>" />
|
60 |
+
<small>(<?php echo $this->getCurrency($_attribute); ?>)</small>
|
61 |
+
</div>
|
62 |
+
<?php break;
|
63 |
+
case 'select': ?>
|
64 |
+
<div class="input-box">
|
65 |
+
<?php echo $this->getAttributeSelectElement($_attribute) ?>
|
66 |
+
</div>
|
67 |
+
<?php break;
|
68 |
+
case 'yesno': ?>
|
69 |
+
<?php echo $this->getAttributeYesNoElement($_attribute) ?>
|
70 |
+
<?php break;
|
71 |
+
case 'date': ?>
|
72 |
+
<div class="input-range">
|
73 |
+
<?php echo $this->getDateInput($_attribute, 'from') ?>
|
74 |
+
<span class="separator">-</span>
|
75 |
+
<?php echo $this->getDateInput($_attribute, 'to') ?>
|
76 |
+
</div>
|
77 |
+
<?php break;
|
78 |
+
default: ?>
|
79 |
+
<div class="input-box">
|
80 |
+
<input type="text" name="<?php echo $_code ?>" id="<?php echo $_code ?>" value="<?php echo $this->escapeHtml($this->getAttributeValue($_attribute)) ?>" title="<?php echo $this->escapeHtml($this->getAttributeLabel($_attribute)) ?>" class="input-text <?php echo $this->getAttributeValidationClass($_attribute) ?>" maxlength="<?php echo $maxQueryLength;?>" />
|
81 |
+
</div>
|
82 |
+
<?php endswitch; ?>
|
83 |
+
</li>
|
84 |
+
<?php endforeach; ?>
|
85 |
+
</ul>
|
86 |
+
<script type="text/javascript">decorateList('advanced-search-list')</script>
|
87 |
+
</div>
|
88 |
+
<div class="buttons-set">
|
89 |
+
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
90 |
+
</div>
|
91 |
+
</form>
|
92 |
+
<script type="text/javascript">
|
93 |
+
//<![CDATA[
|
94 |
+
var dataForm = new VarienForm('form-validate', true);
|
95 |
+
//]]>
|
96 |
+
</script>
|
app/design/frontend/ma2/default/template/catalogsearch/advanced/result.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 base_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="page-title">
|
28 |
+
<h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
31 |
+
<?php if($this->getResultCount()): ?>
|
32 |
+
<p class="advanced-search-amount">
|
33 |
+
<?php echo $this->helper('catalogsearch')->__('<strong>%d item(s)</strong> were found using the following search criteria', $this->getResultCount()); ?>
|
34 |
+
</p>
|
35 |
+
<?php else: ?>
|
36 |
+
<p class="error-msg"><?php echo $this->helper('catalogsearch')->__('No items were found using the following search criteria.');?> <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a></p>
|
37 |
+
<?php endif; ?>
|
38 |
+
|
39 |
+
<div class="advanced-search-summary">
|
40 |
+
<?php $searchCriterias=$this->getSearchCriterias(); ?>
|
41 |
+
<?php foreach (array('left', 'right') as $side): ?>
|
42 |
+
<?php if(@$searchCriterias[$side]): ?>
|
43 |
+
<ul>
|
44 |
+
<?php foreach($searchCriterias[$side] as $criteria): ?>
|
45 |
+
<li><strong><?php echo $this->htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>:</strong> <?php echo $this->htmlEscape($criteria['value']); ?></li>
|
46 |
+
<?php endforeach; ?>
|
47 |
+
</ul>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php endforeach; ?>
|
50 |
+
<?php if($this->getResultCount()): ?>
|
51 |
+
<p>
|
52 |
+
<?php echo $this->helper('catalogsearch')->__("Don't see what you're looking for?"); ?>
|
53 |
+
<a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a>
|
54 |
+
</p>
|
55 |
+
<?php endif; ?>
|
56 |
+
</div>
|
57 |
+
<?php if($this->getResultCount()): ?>
|
58 |
+
<?php echo $this->getProductListHtml() ?>
|
59 |
+
<?php endif; ?>
|
60 |
+
<?php $this->getSearchCriterias(); ?>
|
app/design/frontend/ma2/default/template/catalogsearch/form.mini.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 base_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_Core_Block_Template */
|
27 |
+
/* @var $catalogSearchHelper Mage_Catalogsearch_Helper_Data */
|
28 |
+
$catalogSearchHelper = $this->helper('catalogsearch');
|
29 |
+
?>
|
30 |
+
<div class="block block-search">
|
31 |
+
<form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">
|
32 |
+
<div class="form-search">
|
33 |
+
<!--<label for="search"><?php echo $this->__('Search:') ?></label>-->
|
34 |
+
<input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text" maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" />
|
35 |
+
<button type="submit" title="<?php echo $this->__('Search') ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
|
36 |
+
<div id="search_autocomplete" class="search-autocomplete"></div>
|
37 |
+
<script type="text/javascript">
|
38 |
+
//<![CDATA[
|
39 |
+
var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo $this->__('Search entire store here...') ?>');
|
40 |
+
searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
|
41 |
+
//]]>
|
42 |
+
</script>
|
43 |
+
</div>
|
44 |
+
</form>
|
45 |
+
</div>
|
app/design/frontend/ma2/default/template/catalogsearch/result.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 base_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->getResultCount()): ?>
|
28 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
29 |
+
<div class="page-title">
|
30 |
+
<?php if ($this->helper('rss/catalog')->getTagFeedUrl()): ?>
|
31 |
+
<a href="<?php echo $this->helper('rss/catalog')->getTagFeedUrl() ?>" class="nobr link-rss"><?php echo $this->__('Subscribe to Feed') ?></a>
|
32 |
+
<?php endif; ?>
|
33 |
+
<h1><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
|
34 |
+
</div>
|
35 |
+
<?php if ($messages = $this->getNoteMessages()):?>
|
36 |
+
<p class="note-msg">
|
37 |
+
<?php foreach ($messages as $message):?>
|
38 |
+
<?php echo $message?><br />
|
39 |
+
<?php endforeach;?>
|
40 |
+
</p>
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php echo $this->getProductListHtml() ?>
|
43 |
+
<?php else: ?>
|
44 |
+
<div class="page-title">
|
45 |
+
<h1><?php echo ($this->getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?></h1>
|
46 |
+
</div>
|
47 |
+
<p class="note-msg">
|
48 |
+
<?php echo ($this->getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?>
|
49 |
+
<?php if ($messages = $this->getNoteMessages()):?>
|
50 |
+
<?php foreach ($messages as $message):?>
|
51 |
+
<br /><?php echo $message?>
|
52 |
+
<?php endforeach;?>
|
53 |
+
<?php endif; ?>
|
54 |
+
</p>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/catalogsearch/term.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 base_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="page-title">
|
28 |
+
<h1><?php echo $this->__('Popular Search Terms') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php if( sizeof($this->getTerms()) > 0 ): ?>
|
31 |
+
<ul class="tags-list">
|
32 |
+
<?php foreach ($this->getTerms() as $_term): ?>
|
33 |
+
<li><a href="<?php echo $this->getSearchUrl($_term) ?>" style="font-size:<?php echo $_term->getRatio()*70+75 ?>%;"><?php echo $this->htmlEscape($_term->getName()) ?></a></li>
|
34 |
+
<?php endforeach; ?>
|
35 |
+
</ul>
|
36 |
+
<?php else: ?>
|
37 |
+
<p class="note-msg"><?php echo $this->__('There are no search terms available.'); ?></p>
|
38 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/cart.phtml
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Shopping cart template
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Cart
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div class="cart">
|
35 |
+
<div class="page-title title-buttons">
|
36 |
+
<h1><?php echo $this->__('Shopping Cart') ?></h1>
|
37 |
+
<?php if(!$this->hasError()): ?>
|
38 |
+
<ul class="checkout-types">
|
39 |
+
<?php foreach ($this->getMethods('top_methods') as $method): ?>
|
40 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
41 |
+
<li><?php echo $methodHtml; ?></li>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</ul>
|
45 |
+
<?php endif; ?>
|
46 |
+
</div>
|
47 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
48 |
+
<?php echo $this->getChildHtml('form_before') ?>
|
49 |
+
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
|
50 |
+
<fieldset>
|
51 |
+
<table id="shopping-cart-table" class="data-table cart-table">
|
52 |
+
<col width="1" />
|
53 |
+
<col />
|
54 |
+
<col width="1" />
|
55 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
56 |
+
<col width="1" />
|
57 |
+
<?php endif ?>
|
58 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
59 |
+
<col width="1" />
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
62 |
+
<col width="1" />
|
63 |
+
<?php endif; ?>
|
64 |
+
<col width="1" />
|
65 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
66 |
+
<col width="1" />
|
67 |
+
<?php endif; ?>
|
68 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
69 |
+
<col width="1" />
|
70 |
+
<?php endif; ?>
|
71 |
+
<col width="1" />
|
72 |
+
|
73 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
74 |
+
<thead>
|
75 |
+
<tr>
|
76 |
+
<th rowspan="<?php echo $mergedCells; ?>"> </th>
|
77 |
+
<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
|
78 |
+
<th rowspan="<?php echo $mergedCells; ?>"></th>
|
79 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
80 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"><span class="nobr"><?php echo $this->__('Move to Wishlist') ?></span></th>
|
81 |
+
<?php endif ?>
|
82 |
+
<th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
|
83 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
|
84 |
+
<th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
|
85 |
+
<th rowspan="<?php echo $mergedCells; ?>" class="a-center"> </th>
|
86 |
+
</tr>
|
87 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
88 |
+
<tr>
|
89 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
90 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
91 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
92 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
93 |
+
</tr>
|
94 |
+
<?php endif; ?>
|
95 |
+
</thead>
|
96 |
+
<tfoot>
|
97 |
+
<tr>
|
98 |
+
<td colspan="50" class="a-right">
|
99 |
+
<?php if($this->getContinueShoppingUrl()): ?>
|
100 |
+
<button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
101 |
+
<?php endif; ?>
|
102 |
+
<button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
|
103 |
+
<button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-empty" id="empty_cart_button"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>
|
104 |
+
<!--[if lt IE 8]>
|
105 |
+
<input type="hidden" id="update_cart_action_container" />
|
106 |
+
<script type="text/javascript">
|
107 |
+
//<![CDATA[
|
108 |
+
Event.observe(window, 'load', function()
|
109 |
+
{
|
110 |
+
// Internet Explorer (lt 8) does not support value attribute in button elements
|
111 |
+
$emptyCartButton = $('empty_cart_button');
|
112 |
+
$cartActionContainer = $('update_cart_action_container');
|
113 |
+
if ($emptyCartButton && $cartActionContainer) {
|
114 |
+
Event.observe($emptyCartButton, 'click', function()
|
115 |
+
{
|
116 |
+
$emptyCartButton.setAttribute('name', 'update_cart_action_temp');
|
117 |
+
$cartActionContainer.setAttribute('name', 'update_cart_action');
|
118 |
+
$cartActionContainer.setValue('empty_cart');
|
119 |
+
});
|
120 |
+
}
|
121 |
+
|
122 |
+
});
|
123 |
+
//]]>
|
124 |
+
</script>
|
125 |
+
<![endif]-->
|
126 |
+
</td>
|
127 |
+
</tr>
|
128 |
+
</tfoot>
|
129 |
+
<tbody>
|
130 |
+
<?php foreach($this->getItems() as $_item): ?>
|
131 |
+
<?php echo $this->getItemHtml($_item) ?>
|
132 |
+
<?php endforeach ?>
|
133 |
+
</tbody>
|
134 |
+
</table>
|
135 |
+
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
136 |
+
</fieldset>
|
137 |
+
</form>
|
138 |
+
<div class="cart-collaterals">
|
139 |
+
<div class="col2-set">
|
140 |
+
<div class="col-1">
|
141 |
+
<?php echo $this->getChildHtml('crosssell') ?>
|
142 |
+
</div>
|
143 |
+
<div class="col-2">
|
144 |
+
<?php /* Extensions placeholder */ ?>
|
145 |
+
<?php echo $this->getChildHtml('checkout.cart.extra') ?>
|
146 |
+
<?php echo $this->getChildHtml('coupon') ?>
|
147 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<div class="totals">
|
151 |
+
<?php echo $this->getChildHtml('totals'); ?>
|
152 |
+
<?php if(!$this->hasError()): ?>
|
153 |
+
<ul class="checkout-types">
|
154 |
+
<?php foreach ($this->getMethods('methods') as $method): ?>
|
155 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
156 |
+
<li><?php echo $methodHtml; ?></li>
|
157 |
+
<?php endif; ?>
|
158 |
+
<?php endforeach; ?>
|
159 |
+
</ul>
|
160 |
+
<?php endif; ?>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/cart/coupon.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 id="discount-coupon-form" action="<?php echo $this->getUrl('checkout/cart/couponPost') ?>" method="post">
|
28 |
+
<div class="discount">
|
29 |
+
<h2><?php echo $this->__('Discount Codes') ?></h2>
|
30 |
+
<div class="discount-form">
|
31 |
+
<label for="coupon_code"><?php echo $this->__('Enter your coupon code if you have one.') ?></label>
|
32 |
+
<input type="hidden" name="remove" id="remove-coupone" value="0" />
|
33 |
+
<div class="input-box">
|
34 |
+
<input class="input-text" id="coupon_code" name="coupon_code" value="<?php echo $this->escapeHtml($this->getCouponCode()) ?>" />
|
35 |
+
</div>
|
36 |
+
<div class="buttons-set">
|
37 |
+
<button type="button" title="<?php echo $this->__('Apply Coupon') ?>" class="button" onclick="discountForm.submit(false)" value="<?php echo $this->__('Apply Coupon') ?>"><span><span><?php echo $this->__('Apply Coupon') ?></span></span></button>
|
38 |
+
<?php if(strlen($this->getCouponCode())): ?>
|
39 |
+
<button type="button" title="<?php echo $this->__('Cancel Coupon') ?>" class="button" onclick="discountForm.submit(true)" value="<?php echo $this->__('Cancel Coupon') ?>"><span><span><?php echo $this->__('Cancel Coupon') ?></span></span></button>
|
40 |
+
<?php endif;?>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</form>
|
45 |
+
<script type="text/javascript">
|
46 |
+
//<![CDATA[
|
47 |
+
var discountForm = new VarienForm('discount-coupon-form');
|
48 |
+
discountForm.submit = function (isRemove) {
|
49 |
+
if (isRemove) {
|
50 |
+
$('coupon_code').removeClassName('required-entry');
|
51 |
+
$('remove-coupone').value = "1";
|
52 |
+
} else {
|
53 |
+
$('coupon_code').addClassName('required-entry');
|
54 |
+
$('remove-coupone').value = "0";
|
55 |
+
}
|
56 |
+
return VarienForm.prototype.submit.bind(discountForm)();
|
57 |
+
}
|
58 |
+
//]]>
|
59 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/cart/crosssell.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Cart cross sell items template
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Cart_Crosssell
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->getItemCount()): ?>
|
35 |
+
<div class="crosssell">
|
36 |
+
<h2><?php echo $this->__('Based on your selection, you may be interested in the following items:') ?></h2>
|
37 |
+
<ul id="crosssell-products-list">
|
38 |
+
<?php foreach ($this->getItems() as $_item): ?>
|
39 |
+
<li class="item">
|
40 |
+
<a class="product-image" href="<?php echo $_item->getProductUrl() ?>" title="<?php echo $this->escapeHtml($_item->getName()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($_item, 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($_item->getName()) ?>" /></a>
|
41 |
+
<div class="product-details">
|
42 |
+
<h3 class="product-name"><a href="<?php echo $_item->getProductUrl() ?>"><?php echo $this->escapeHtml($_item->getName()) ?></a></h3>
|
43 |
+
<?php echo $this->getPriceHtml($_item, true) ?>
|
44 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_item) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
45 |
+
<ul class="add-to-links">
|
46 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
47 |
+
<li><a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_item)): ?>
|
50 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
51 |
+
<?php endif; ?>
|
52 |
+
</ul>
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
<?php endforeach; ?>
|
56 |
+
</ul>
|
57 |
+
<script type="text/javascript">decorateList('crosssell-products-list', 'none-recursive')</script>
|
58 |
+
</div>
|
59 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/cart/item/configure/updatecart.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 $_product = $this->getProduct(); ?>
|
29 |
+
<?php $buttonTitle = $this->__('Update Cart'); ?>
|
30 |
+
<?php if ($_product->isSaleable()): ?>
|
31 |
+
<div class="add-to-cart">
|
32 |
+
<?php if (!$_product->isGrouped()): ?>
|
33 |
+
<label for="qty"><?php echo $this->__('Qty:') ?></label>
|
34 |
+
<input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
|
35 |
+
<?php endif; ?>
|
36 |
+
<button type="button" title="<?php echo $buttonTitle ?>" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>
|
37 |
+
<?php echo $this->getChildHtml('', true, true) ?>
|
38 |
+
</div>
|
39 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/cart/item/default.phtml
ADDED
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
$_item = $this->getItem();
|
29 |
+
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
30 |
+
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
+
?>
|
32 |
+
<tr>
|
33 |
+
<td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
|
34 |
+
<td>
|
35 |
+
<h2 class="product-name">
|
36 |
+
<?php if ($this->hasProductUrl()):?>
|
37 |
+
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
|
38 |
+
<?php else: ?>
|
39 |
+
<?php echo $this->escapeHtml($this->getProductName()) ?>
|
40 |
+
<?php endif; ?>
|
41 |
+
</h2>
|
42 |
+
<?php if ($_options = $this->getOptionList()):?>
|
43 |
+
<dl class="item-options">
|
44 |
+
<?php foreach ($_options as $_option) : ?>
|
45 |
+
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
46 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
47 |
+
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
48 |
+
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
49 |
+
<div class="truncated_full_value">
|
50 |
+
<dl class="item-options">
|
51 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
52 |
+
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
53 |
+
</dl>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
</dd>
|
57 |
+
<?php endforeach; ?>
|
58 |
+
</dl>
|
59 |
+
<?php endif;?>
|
60 |
+
<?php if ($messages = $this->getMessages()): ?>
|
61 |
+
<?php foreach ($messages as $message): ?>
|
62 |
+
<p class="item-msg <?php echo $message['type'] ?>">* <?php echo $this->escapeHtml($message['text']) ?></p>
|
63 |
+
<?php endforeach; ?>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
66 |
+
<?php if ($addInfoBlock): ?>
|
67 |
+
<?php echo $addInfoBlock->setItem($_item)->toHtml() ?>
|
68 |
+
<?php endif;?>
|
69 |
+
</td>
|
70 |
+
<td class="a-center">
|
71 |
+
<?php if ($isVisibleProduct): ?>
|
72 |
+
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
|
73 |
+
<?php endif ?>
|
74 |
+
</td>
|
75 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
76 |
+
<td class="a-center">
|
77 |
+
<?php if ($isVisibleProduct): ?>
|
78 |
+
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move'); ?></a>
|
79 |
+
<?php endif ?>
|
80 |
+
</td>
|
81 |
+
<?php endif ?>
|
82 |
+
|
83 |
+
<?php if ($canApplyMsrp): ?>
|
84 |
+
<td class="a-right"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
|
85 |
+
<span class="cart-price">
|
86 |
+
<span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
87 |
+
<?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
|
88 |
+
<a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
|
89 |
+
<script type="text/javascript">
|
90 |
+
Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
|
91 |
+
</script>
|
92 |
+
</span>
|
93 |
+
</td>
|
94 |
+
<?php else: ?>
|
95 |
+
|
96 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
97 |
+
<td class="a-right">
|
98 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
99 |
+
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
100 |
+
<?php else: ?>
|
101 |
+
<span class="cart-price">
|
102 |
+
<?php endif; ?>
|
103 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
104 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
105 |
+
<?php else: ?>
|
106 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
107 |
+
<?php endif; ?>
|
108 |
+
|
109 |
+
</span>
|
110 |
+
|
111 |
+
|
112 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
113 |
+
|
114 |
+
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
115 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
116 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
117 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
118 |
+
<?php endforeach; ?>
|
119 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
120 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
121 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
122 |
+
<?php endforeach; ?>
|
123 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
124 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
125 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
126 |
+
<?php endforeach; ?>
|
127 |
+
<?php endif; ?>
|
128 |
+
</div>
|
129 |
+
|
130 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
131 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
132 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
133 |
+
</div>
|
134 |
+
<?php endif; ?>
|
135 |
+
<?php endif; ?>
|
136 |
+
</td>
|
137 |
+
<?php endif; ?>
|
138 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
139 |
+
<td>
|
140 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
141 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
142 |
+
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
143 |
+
<?php else: ?>
|
144 |
+
<span class="cart-price">
|
145 |
+
<?php endif; ?>
|
146 |
+
|
147 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
148 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
149 |
+
<?php else: ?>
|
150 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
151 |
+
<?php endif; ?>
|
152 |
+
|
153 |
+
</span>
|
154 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
155 |
+
|
156 |
+
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
157 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
158 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
159 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
160 |
+
<?php endforeach; ?>
|
161 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
162 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
163 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
164 |
+
<?php endforeach; ?>
|
165 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
166 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
167 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
168 |
+
<?php endforeach; ?>
|
169 |
+
<?php endif; ?>
|
170 |
+
</div>
|
171 |
+
|
172 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
173 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
174 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
175 |
+
</div>
|
176 |
+
<?php endif; ?>
|
177 |
+
<?php endif; ?>
|
178 |
+
</td>
|
179 |
+
<?php endif; ?>
|
180 |
+
<?php endif; ?>
|
181 |
+
<td class="a-center">
|
182 |
+
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" />
|
183 |
+
</td>
|
184 |
+
<?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
185 |
+
<td class="a-right">
|
186 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
187 |
+
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
188 |
+
<?php else: ?>
|
189 |
+
<span class="cart-price">
|
190 |
+
<?php endif; ?>
|
191 |
+
|
192 |
+
<?php if ($canApplyMsrp): ?>
|
193 |
+
<span class="cart-msrp-subtotal">--</span>
|
194 |
+
<?php else: ?>
|
195 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
196 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
197 |
+
<?php else: ?>
|
198 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
199 |
+
<?php endif; ?>
|
200 |
+
<?php endif; ?>
|
201 |
+
|
202 |
+
</span>
|
203 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
204 |
+
|
205 |
+
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
206 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
207 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
208 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
209 |
+
<?php endforeach; ?>
|
210 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
211 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
212 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
213 |
+
<?php endforeach; ?>
|
214 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
215 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
216 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
217 |
+
<?php endforeach; ?>
|
218 |
+
<?php endif; ?>
|
219 |
+
</div>
|
220 |
+
|
221 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
222 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
223 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
224 |
+
</div>
|
225 |
+
<?php endif; ?>
|
226 |
+
<?php endif; ?>
|
227 |
+
</td>
|
228 |
+
<?php endif; ?>
|
229 |
+
<?php if (($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
230 |
+
<td>
|
231 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
232 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
233 |
+
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
234 |
+
<?php else: ?>
|
235 |
+
<span class="cart-price">
|
236 |
+
<?php endif; ?>
|
237 |
+
|
238 |
+
<?php if ($canApplyMsrp): ?>
|
239 |
+
<span class="cart-msrp-subtotal">--</span>
|
240 |
+
<?php else: ?>
|
241 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
242 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
243 |
+
<?php else: ?>
|
244 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
245 |
+
<?php endif; ?>
|
246 |
+
<?php endif; ?>
|
247 |
+
|
248 |
+
</span>
|
249 |
+
|
250 |
+
|
251 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
252 |
+
|
253 |
+
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
254 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
255 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
256 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
257 |
+
<?php endforeach; ?>
|
258 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
259 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
260 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
261 |
+
<?php endforeach; ?>
|
262 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
263 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
264 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
265 |
+
<?php endforeach; ?>
|
266 |
+
<?php endif; ?>
|
267 |
+
</div>
|
268 |
+
|
269 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
270 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
271 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
272 |
+
</div>
|
273 |
+
<?php endif; ?>
|
274 |
+
<?php endif; ?>
|
275 |
+
</td>
|
276 |
+
<?php endif; ?>
|
277 |
+
<td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item')?></a></td>
|
278 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/cart/noItems.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="page-title">
|
28 |
+
<h1><?php echo $this->__('Shopping Cart is Empty') ?></h1>
|
29 |
+
</div>
|
30 |
+
<div class="cart-empty">
|
31 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
32 |
+
<?php echo $this->getChildHtml('checkout_cart_empty_widget'); ?>
|
33 |
+
<p><?php echo $this->__('You have no items in your shopping cart.') ?></p>
|
34 |
+
<p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
|
35 |
+
<?php echo $this->getChildHtml('shopping.cart.table.after'); ?>
|
36 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/cart/render/default.phtml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* @deprecated after 1.4.0.0-alpha3
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php $_item = $this->getItem() ?>
|
32 |
+
<tr>
|
33 |
+
<td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item')?>" class="btn-remove2"><?php echo $this->__('Remove Item')?></a></td>
|
34 |
+
<td><a href="<?php echo $this->getItemUrl($_item) ?>" title="<?php echo $this->escapeHtml($this->getItemName($_item)) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($this->getItemProductForThumbnail($_item), 'thumbnail')->resize(75); ?>" width="75" alt="<?php echo $this->escapeHtml($this->getItemName($_item)) ?>" /></a></td>
|
35 |
+
<td>
|
36 |
+
<h3 class="product-name"><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->getItemName($_item) ?></a></h3>
|
37 |
+
<?php echo $this->getItemDescription($_item) ?>
|
38 |
+
<?php if($_item->getMessage()): ?>
|
39 |
+
<p class="item-msg <?php if($_item->getHasError()): ?>error<?php else: ?>notice<?php endif; ?>">* <?php echo $_item->getMessage() ?></p>
|
40 |
+
<?php endif; ?>
|
41 |
+
</td>
|
42 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
43 |
+
<td class="a-center">
|
44 |
+
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist"><?php echo $this->__('Move'); ?></a>
|
45 |
+
</td>
|
46 |
+
<?php endif ?>
|
47 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
48 |
+
<td class="a-right">
|
49 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
50 |
+
</td>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
+
<td class="a-right">
|
54 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
55 |
+
</td>
|
56 |
+
<?php endif; ?>
|
57 |
+
<td class="a-center">
|
58 |
+
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getItemQty($_item) ?>" size="4" class="input-text qty" maxlength="12" />
|
59 |
+
</td>
|
60 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
61 |
+
<td class="a-right">
|
62 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
63 |
+
</td>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
66 |
+
<td class="a-right">
|
67 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
68 |
+
</td>
|
69 |
+
<?php endif; ?>
|
70 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/cart/render/simple.phtml
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* @deprecated after 1.4.0.0-alpha3
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php $_item = $this->getItem() ?>
|
32 |
+
<tr>
|
33 |
+
<td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item')?>" class="btn-remove2"><?php echo $this->__('Remove Item')?></a></td>
|
34 |
+
<td><a href="<?php echo $this->getItemUrl($_item) ?>" title="<?php echo $this->escapeHtml($this->getItemName($_item)) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($this->getItemProductForThumbnail($_item), 'thumbnail')->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($this->getItemName($_item)) ?>" /></a></td>
|
35 |
+
<td>
|
36 |
+
<h3 class="product-name"><a href="<?php echo $this->getItemUrl($_item) ?>"><?php echo $this->getItemName($_item) ?></a></h3>
|
37 |
+
<?php echo $this->getItemDescription($_item) ?>
|
38 |
+
<?php if($_item->getMessage()): ?>
|
39 |
+
<p class="item-msg <?php if($_item->getHasError()): ?>error<?php else: ?>notice<?php endif; ?>">* <?php echo $_item->getMessage() ?></p>
|
40 |
+
<?php endif; ?>
|
41 |
+
</td>
|
42 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
43 |
+
<td class="a-center">
|
44 |
+
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist"><?php echo $this->__('Move'); ?></a>
|
45 |
+
</td>
|
46 |
+
<?php endif ?>
|
47 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
48 |
+
<td class="a-right">
|
49 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
50 |
+
</td>
|
51 |
+
<?php endif; ?>
|
52 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
+
<td class="a-right">
|
54 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?>
|
55 |
+
</td>
|
56 |
+
<?php endif; ?>
|
57 |
+
<td class="a-center">
|
58 |
+
<input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getItemQty($_item) ?>" size="4" class="input-text qty" maxlength="12" />
|
59 |
+
</td>
|
60 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
61 |
+
<td class="a-right">
|
62 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
63 |
+
</td>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
66 |
+
<td class="a-right">
|
67 |
+
<?php echo $this->helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?>
|
68 |
+
</td>
|
69 |
+
<?php endif; ?>
|
70 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/cart/shipping.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Cart_Shipping */ ?>
|
28 |
+
<div class="shipping">
|
29 |
+
<h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
|
30 |
+
<div class="shipping-form">
|
31 |
+
<form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
|
32 |
+
<p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
|
33 |
+
<ul class="form-list">
|
34 |
+
<li>
|
35 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
36 |
+
<div class="input-box">
|
37 |
+
<?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
|
38 |
+
</div>
|
39 |
+
</li>
|
40 |
+
<?php //if($this->getStateActive()): ?>
|
41 |
+
<li>
|
42 |
+
<label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('State/Province') ?></label>
|
43 |
+
<div class="input-box">
|
44 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
|
45 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
46 |
+
</select>
|
47 |
+
<script type="text/javascript">
|
48 |
+
//<![CDATA[
|
49 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
|
50 |
+
//]]>
|
51 |
+
</script>
|
52 |
+
<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
<?php //endif; ?>
|
56 |
+
<?php if($this->getCityActive()): ?>
|
57 |
+
<li>
|
58 |
+
<label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
|
59 |
+
<div class="input-box">
|
60 |
+
<input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" />
|
61 |
+
</div>
|
62 |
+
</li>
|
63 |
+
<?php endif; ?>
|
64 |
+
<li>
|
65 |
+
<label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
|
66 |
+
<div class="input-box">
|
67 |
+
<input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" />
|
68 |
+
</div>
|
69 |
+
</li>
|
70 |
+
</ul>
|
71 |
+
<div class="buttons-set">
|
72 |
+
<button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
|
73 |
+
</div>
|
74 |
+
</form>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
|
78 |
+
//]]>
|
79 |
+
</script>
|
80 |
+
|
81 |
+
<?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
|
82 |
+
<form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
|
83 |
+
<dl class="sp-methods">
|
84 |
+
<?php foreach ($_shippingRateGroups as $code => $_rates): ?>
|
85 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
86 |
+
<dd>
|
87 |
+
<ul>
|
88 |
+
<?php foreach ($_rates as $_rate): ?>
|
89 |
+
<li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
|
90 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
91 |
+
<?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
|
92 |
+
<?php else: ?>
|
93 |
+
<input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
|
94 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
95 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
96 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
97 |
+
<?php echo $_excl; ?>
|
98 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
99 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
100 |
+
<?php endif; ?>
|
101 |
+
</label>
|
102 |
+
<?php endif ?>
|
103 |
+
</li>
|
104 |
+
<?php endforeach; ?>
|
105 |
+
</ul>
|
106 |
+
</dd>
|
107 |
+
<?php endforeach; ?>
|
108 |
+
</dl>
|
109 |
+
<div class="buttons-set">
|
110 |
+
<button type="submit" title="<?php echo $this->__('Update Total') ?>" class="button" name="do" value="<?php echo $this->__('Update Total') ?>"><span><span><?php echo $this->__('Update Total') ?></span></span></button>
|
111 |
+
</div>
|
112 |
+
</form>
|
113 |
+
<?php endif; ?>
|
114 |
+
<script type="text/javascript">
|
115 |
+
//<![CDATA[
|
116 |
+
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
117 |
+
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
118 |
+
|
119 |
+
coShippingMethodForm.submit = function () {
|
120 |
+
var country = $F('country');
|
121 |
+
var optionalZip = false;
|
122 |
+
|
123 |
+
for (i=0; i < countriesWithOptionalZip.length; i++) {
|
124 |
+
if (countriesWithOptionalZip[i] == country) {
|
125 |
+
optionalZip = true;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
if (optionalZip) {
|
129 |
+
$('postcode').removeClassName('required-entry');
|
130 |
+
}
|
131 |
+
else {
|
132 |
+
$('postcode').addClassName('required-entry');
|
133 |
+
}
|
134 |
+
return VarienForm.prototype.submit.bind(coShippingMethodForm)();
|
135 |
+
}
|
136 |
+
//]]>
|
137 |
+
</script>
|
138 |
+
</div>
|
139 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/cart/sidebar.phtml
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
* Shoping cart sidebar
|
29 |
+
*
|
30 |
+
* @see Mage_Checkout_Block_Cart_Sidebar
|
31 |
+
*/
|
32 |
+
|
33 |
+
?>
|
34 |
+
<?php if ($this->getIsNeedToDisplaySideBar()):?>
|
35 |
+
<div class="block block-cart">
|
36 |
+
<?php $_cartQty = $this->getSummaryCount() ?>
|
37 |
+
<!-- <div class="block-title">
|
38 |
+
<strong><span><?php echo $this->__('My Cart') ?></span></strong>
|
39 |
+
</div> -->
|
40 |
+
<div class="block-content">
|
41 |
+
<?php if ($_cartQty>0): ?>
|
42 |
+
<div class="summary">
|
43 |
+
<?php if ($_cartQty==1): ?>
|
44 |
+
<span class="amount"><?php echo $this->__('<a href="%s">1 item</a>', $this->getUrl('checkout/cart')) ?></span>
|
45 |
+
<?php else: ?>
|
46 |
+
<span class="amount"><?php echo $this->__('<a href="%s">%s items</a>', $this->getUrl('checkout/cart'), $_cartQty) ?></span>
|
47 |
+
<?php endif ?>
|
48 |
+
<span class="subtotal">
|
49 |
+
<?php if ($this->canApplyMsrp()): ?>
|
50 |
+
<span class="map-cart-sidebar-total"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></span>
|
51 |
+
<?php else: ?>
|
52 |
+
<!--<span class="label"><?php echo $this->__('') ?></span> --><?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
|
53 |
+
<?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
|
54 |
+
<br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
|
55 |
+
<?php endif; ?>
|
56 |
+
<?php endif; ?>
|
57 |
+
</span>
|
58 |
+
</div>
|
59 |
+
<?php endif ?>
|
60 |
+
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
|
61 |
+
<div class="actions">
|
62 |
+
<?php echo $this->getChildHtml('extra_actions') ?>
|
63 |
+
<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
|
64 |
+
</div>
|
65 |
+
<?php endif ?>
|
66 |
+
<?php if ($_cartQty < 1) : ?>
|
67 |
+
<div class="summary">
|
68 |
+
<p class="empty"><?php echo $this->__('0 item(s) - $0.00') ?></p>
|
69 |
+
</div>
|
70 |
+
<div class="actions">
|
71 |
+
<p class="empty"><?php echo $this->__('Checkout') ?></p>
|
72 |
+
</div>
|
73 |
+
<?php endif; ?>
|
74 |
+
<!--
|
75 |
+
<?php $_items = $this->getRecentItems() ?>
|
76 |
+
<?php if(count($_items)): ?>
|
77 |
+
<p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
|
78 |
+
<ol id="cart-sidebar" class="mini-products-list">
|
79 |
+
<?php foreach($_items as $_item): ?>
|
80 |
+
<?php echo $this->getItemHtml($_item) ?>
|
81 |
+
<?php endforeach; ?>
|
82 |
+
</ol>
|
83 |
+
<script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
|
84 |
+
<?php else: ?>
|
85 |
+
<p class="empty"><?php echo $this->__('0 item') ?></p>
|
86 |
+
<?php endif ?>
|
87 |
+
-->
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
<?php endif;?>
|
app/design/frontend/ma2/default/template/checkout/cart/sidebar/default.phtml
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
$_item = $this->getItem();
|
29 |
+
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
30 |
+
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
31 |
+
?>
|
32 |
+
<li class="item">
|
33 |
+
<?php if ($this->hasProductUrl()): ?>
|
34 |
+
<a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></a>
|
35 |
+
<?php else: ?>
|
36 |
+
<span class="product-image"><img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /></span>
|
37 |
+
<?php endif; ?>
|
38 |
+
<div class="product-details">
|
39 |
+
<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" onclick="return confirm('<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>');" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
|
40 |
+
<?php if ($isVisibleProduct): ?>
|
41 |
+
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item') ?>" class="btn-edit"><?php echo $this->__('Edit item')?></a>
|
42 |
+
<?php endif ?>
|
43 |
+
<p class="product-name"><?php if ($this->hasProductUrl()): ?><a href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?></a><?php endif; ?></p>
|
44 |
+
<strong><?php echo $this->getQty() ?></strong> x
|
45 |
+
|
46 |
+
<?php if ($canApplyMsrp): ?>
|
47 |
+
|
48 |
+
<span class="map-cart-sidebar-item"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
49 |
+
|
50 |
+
<?php else: ?>
|
51 |
+
|
52 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
54 |
+
<?php echo $this->__('Excl. Tax'); ?>:
|
55 |
+
<?php endif; ?>
|
56 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
57 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
58 |
+
<?php else: ?>
|
59 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
62 |
+
<br />
|
63 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
64 |
+
<small>
|
65 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
66 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
67 |
+
<?php endforeach; ?>
|
68 |
+
</small>
|
69 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
70 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
71 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
72 |
+
<?php endforeach; ?>
|
73 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
74 |
+
<small>
|
75 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
76 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
77 |
+
<?php endforeach; ?>
|
78 |
+
</small>
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
81 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php endif; ?>
|
84 |
+
<?php endif; ?>
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
89 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
90 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
91 |
+
<br /><?php echo $this->__('Incl. Tax'); ?>:
|
92 |
+
<?php endif; ?>
|
93 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?>
|
94 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
95 |
+
<?php else: ?>
|
96 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
97 |
+
<?php endif; ?>
|
98 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
99 |
+
<br />
|
100 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales')): ?>
|
101 |
+
<small>
|
102 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
103 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
104 |
+
<?php endforeach; ?>
|
105 |
+
</small>
|
106 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
107 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
108 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
109 |
+
<?php endforeach; ?>
|
110 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales')): ?>
|
111 |
+
<small>
|
112 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
113 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
114 |
+
<?php endforeach; ?>
|
115 |
+
</small>
|
116 |
+
<?php endif; ?>
|
117 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales')): ?>
|
118 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
119 |
+
<?php endif; ?>
|
120 |
+
<?php endif; ?>
|
121 |
+
<?php endif; ?>
|
122 |
+
|
123 |
+
<?php endif; //Can apply MSRP ?>
|
124 |
+
|
125 |
+
<?php if ($_options = $this->getOptionList()):?>
|
126 |
+
<div class="truncated">
|
127 |
+
<div class="truncated_full_value">
|
128 |
+
<dl class="item-options">
|
129 |
+
<?php foreach ($_options as $_option) : ?>
|
130 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
131 |
+
<dd>
|
132 |
+
<?php if (is_array($_option['value'])): ?>
|
133 |
+
<?php echo nl2br(implode("\n", $_option['value'])) ?>
|
134 |
+
<?php else: ?>
|
135 |
+
<?php echo $_option['value'] ?>
|
136 |
+
<?php endif; ?>
|
137 |
+
</dd>
|
138 |
+
<?php endforeach; ?>
|
139 |
+
</dl>
|
140 |
+
</div>
|
141 |
+
<a href="#" onclick="return false;" class="details"><?php echo $this->__('Details') ?></a>
|
142 |
+
</div>
|
143 |
+
<?php endif; ?>
|
144 |
+
</div>
|
145 |
+
</li>
|
app/design/frontend/ma2/default/template/checkout/cart/totals.phtml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Shopping cart totals template
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Cart_Totals
|
32 |
+
* @var $this Mage_Checkout_Block_Cart_Totals
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<?php if ($this->canApplyMsrp()): ?>
|
36 |
+
<div class="cart-msrp-totals"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></div>
|
37 |
+
<?php else: ?>
|
38 |
+
<table id="shopping-cart-totals-table">
|
39 |
+
<col />
|
40 |
+
<col width="1" />
|
41 |
+
<tfoot>
|
42 |
+
<?php echo $this->renderTotals('footer'); ?>
|
43 |
+
</tfoot>
|
44 |
+
<tbody>
|
45 |
+
<?php echo $this->renderTotals(); ?>
|
46 |
+
</tbody>
|
47 |
+
</table>
|
48 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/multishipping/address/select.phtml
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="multiple-checkout">
|
28 |
+
<div class="page-title title-buttons">
|
29 |
+
<h1><?php echo $this->__('Change Billing Address') ?></h1>
|
30 |
+
<button type="button" title="<?php echo $this->__('Add New Address') ?>" class="button" onclick="setLocation('<?php echo $this->getAddNewUrl() ?>')"><span><span><?php echo $this->__('Add New Address') ?></span></span></button>
|
31 |
+
</div>
|
32 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
33 |
+
<?php $_index=0 ?>
|
34 |
+
<?php foreach ($this->getAddressCollection() as $_address): ?>
|
35 |
+
<?php if($_index%3==0): ?><div class="col3-set"><?php endif; ?>
|
36 |
+
<div class="col-<?php echo ($_index%3+1) ?>">
|
37 |
+
<p class="actions">
|
38 |
+
<a href="<?php echo $this->getEditAddressUrl($_address) ?>"><?php echo $this->__('Edit Address') ?></a> <span class="separator">|</span>
|
39 |
+
<a href="<?php echo $this->getSetAddressUrl($_address) ?>"><strong><?php echo $this->__('Select Address') ?></strong></a>
|
40 |
+
</p>
|
41 |
+
<address>
|
42 |
+
<?php echo $_address->format('html') ?>
|
43 |
+
</address>
|
44 |
+
<?php if($this->isAddressDefaultBilling($_address)): ?>
|
45 |
+
<strong><?php echo $this->__('Default Billing') ?></strong>
|
46 |
+
<?php endif; ?>
|
47 |
+
<?php if($this->isAddressDefaultShipping($_address)): ?>
|
48 |
+
<br /><strong><?php echo $this->__('Default Shipping') ?></strong>
|
49 |
+
<?php endif; ?>
|
50 |
+
</div>
|
51 |
+
<?php $_index++ ?>
|
52 |
+
<?php if($_index && $_index%3==0): ?></div><?php endif; ?>
|
53 |
+
<?php endforeach; ?>
|
54 |
+
<?php if(!$_index || $_index%3!=0): ?></div><?php endif; ?>
|
55 |
+
<div class="buttons-set">
|
56 |
+
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo $this->__('Back to Billing Information') ?></a></p>
|
57 |
+
</div>
|
58 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/multishipping/addresses.phtml
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Ship to multiple address template
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Multishipping_Addresses
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
35 |
+
<form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post">
|
36 |
+
<div class="multiple-checkout">
|
37 |
+
<div class="page-title title-buttons">
|
38 |
+
<h1><?php echo $this->__('Ship to Multiple Addresses') ?></h1>
|
39 |
+
<button type="button" title="<?php echo $this->__('Enter a New Address') ?>" class="button" onclick="$('add_new_address_flag').value=1; $('checkout_multishipping_form').submit();"><span><span><?php echo $this->__('Enter a New Address') ?></span></span></button>
|
40 |
+
</div>
|
41 |
+
<input type="hidden" name="continue" value="0" id="can_continue_flag" />
|
42 |
+
<input type="hidden" name="new_address" value="0" id="add_new_address_flag" />
|
43 |
+
<h2><?php echo $this->__('Please select shipping address for applicable items') ?></h2>
|
44 |
+
<table class="data-table" id="multiship-addresses-table">
|
45 |
+
<col />
|
46 |
+
<col width="1" />
|
47 |
+
<col width="1" />
|
48 |
+
<col width="1" />
|
49 |
+
<thead>
|
50 |
+
<tr>
|
51 |
+
<th><?php echo $this->__('Product') ?></th>
|
52 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
53 |
+
<th><?php echo $this->__('Send To') ?></th>
|
54 |
+
<th> </th>
|
55 |
+
</tr>
|
56 |
+
</thead>
|
57 |
+
<tfoot>
|
58 |
+
<tr>
|
59 |
+
<td colspan="100" class="a-right"><button type="submit" title="<?php echo $this->__('Update Qty & Addresses') ?>" class="button" onclick="$('can_continue_flag').value=0"><span><span><?php echo $this->__('Update Qty & Addresses') ?></span></span></button></td>
|
60 |
+
</tr>
|
61 |
+
</tfoot>
|
62 |
+
<tbody>
|
63 |
+
<?php foreach ($this->getItems() as $_index => $_item): ?>
|
64 |
+
<?php if ($_item->getQuoteItem()) :?>
|
65 |
+
<tr>
|
66 |
+
<td><?php echo $this->getItemHtml($_item->getQuoteItem())?></td>
|
67 |
+
<td><input type="text" name="ship[<?php echo $_index ?>][<?php echo $_item->getQuoteItemId() ?>][qty]" value="<?php echo $this->escapeHtml($_item->getQty()) ?>" size="2" class="input-text qty" /></td>
|
68 |
+
<td><?php if ($_item->getProduct()->getIsVirtual()): echo $this->__('Shipping selection is not applicable.'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?></td>
|
69 |
+
<td class="a-center"><a href="<?php echo $this->getItemDeleteUrl($_item) ?>" title="<?php echo $this->__('Remove Item') ?>" class="btn-remove2"><?php echo $this->__('Remove Item') ?></a></td>
|
70 |
+
</tr>
|
71 |
+
<?php endif; ?>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</tbody>
|
74 |
+
</table>
|
75 |
+
<script type="text/javascript">decorateTable('multiship-addresses-table')</script>
|
76 |
+
<div class="buttons-set">
|
77 |
+
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo $this->__('Back to Shopping Cart') ?></a></p>
|
78 |
+
<button type="submit" title="<?php echo $this->__('Continue to Shipping Information') ?>" class="button<?php if ($this->isContinueDisabled()):?> disabled<?php endif; ?>" onclick="$('can_continue_flag').value=1"<?php if ($this->isContinueDisabled()):?> disabled="disabled"<?php endif; ?>><span><span><?php echo $this->__('Continue to Shipping Information') ?></span></span></button>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</form>
|
app/design/frontend/ma2/default/template/checkout/multishipping/agreements.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Agreements
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php if (!$this->getAgreements()) return; ?>
|
34 |
+
<ol id="checkout-agreements" class="checkout-agreements">
|
35 |
+
<?php foreach ($this->getAgreements() as $_a): ?>
|
36 |
+
<li>
|
37 |
+
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
|
38 |
+
<?php if ($_a->getIsHtml()):?>
|
39 |
+
<?php echo $_a->getContent() ?>
|
40 |
+
<?php else:?>
|
41 |
+
<?php echo nl2br($this->escapeHtml($_a->getContent())) ?>
|
42 |
+
<?php endif; ?>
|
43 |
+
</div>
|
44 |
+
<p class="agree">
|
45 |
+
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></label>
|
46 |
+
</p>
|
47 |
+
</li>
|
48 |
+
<?php endforeach ?>
|
49 |
+
</ol>
|
app/design/frontend/ma2/default/template/checkout/multishipping/billing.phtml
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Multishipping checkout billing information
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Multishipping_Billing
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<div class="multiple-checkout">
|
35 |
+
<div class="page-title">
|
36 |
+
<h1><?php echo $this->__('Billing Information') ?></h1>
|
37 |
+
</div>
|
38 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
39 |
+
<script src="<?php echo Mage::getBaseUrl('js') ?>varien/payment.js" type="text/javascript"></script>
|
40 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form">
|
41 |
+
<div class="col2-set">
|
42 |
+
<div class="col-1 col-narrow">
|
43 |
+
<div class="box">
|
44 |
+
<div class="box-title">
|
45 |
+
<h2><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getSelectAddressUrl() ?>"><?php echo $this->__('Change') ?></a></h2>
|
46 |
+
</div>
|
47 |
+
<div class="box-content">
|
48 |
+
<?php $_address=$this->getAddress() ?>
|
49 |
+
<address><?php echo $_address->format('html') ?></address>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="col-2 col-wide">
|
54 |
+
<div class="box">
|
55 |
+
<div class="box-title">
|
56 |
+
<h2><?php echo $this->__('Payment Method') ?></h2>
|
57 |
+
</div>
|
58 |
+
<div class="box-content">
|
59 |
+
<div class="tool-tip" id="payment-tool-tip" style="display:none;">
|
60 |
+
<div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
|
61 |
+
<div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
|
62 |
+
</div>
|
63 |
+
<!-- Payment methods forms list -->
|
64 |
+
<dl class="sp-methods">
|
65 |
+
<?php
|
66 |
+
$_methods = $this->getMethods();
|
67 |
+
$_methodsCount = count($_methods);
|
68 |
+
?>
|
69 |
+
<?php foreach ($_methods as $_method): $_code = $_method->getCode() ?>
|
70 |
+
<dt>
|
71 |
+
<?php if ($_methodsCount > 1): ?>
|
72 |
+
<input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
73 |
+
<?php else :?>
|
74 |
+
<span class="no-display"><input type="radio" id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" name="payment[method]" checked="checked" class="radio" /></span>
|
75 |
+
<?php endif;?>
|
76 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($_method->getTitle()) ?></label>
|
77 |
+
</dt>
|
78 |
+
<?php if($html = $this->getChildHtml('payment.method.'.$_code)) : ?>
|
79 |
+
<dd>
|
80 |
+
<?php echo $html; ?>
|
81 |
+
</dd>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php endforeach; ?>
|
84 |
+
</dl>
|
85 |
+
<?php echo $this->getChildHtml('checkout_billing_items') ?>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
<div class="buttons-set">
|
91 |
+
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo $this->__('Back to Shipping Information') ?></a></p>
|
92 |
+
<button type="submit" title="<?php echo $this->__('Continue to Review Your Order') ?>" class="button"><span><span><?php echo $this->__('Continue to Review Your Order') ?></span></span></button>
|
93 |
+
</div>
|
94 |
+
</form>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
var payment = new paymentForm('multishipping-billing-form');
|
98 |
+
function toggleToolTip(event){
|
99 |
+
if($('payment-tool-tip')){
|
100 |
+
/*$('payment-tool-tip').setStyle({
|
101 |
+
top: (Event.pointerY(event)-510)+'px',
|
102 |
+
left: (Event.pointerX(event)-800)+'px'
|
103 |
+
})*/
|
104 |
+
$('payment-tool-tip').toggle();
|
105 |
+
}
|
106 |
+
Event.stop(event);
|
107 |
+
}
|
108 |
+
if($('payment-tool-tip-close')){
|
109 |
+
Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
|
110 |
+
}
|
111 |
+
$$('.cvv-what-is-this').each(function(element){
|
112 |
+
Event.observe(element, 'click', toggleToolTip);
|
113 |
+
});
|
114 |
+
//]]>
|
115 |
+
</script>
|
116 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/multishipping/billing/items.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getQuote()->hasVirtualItems()): ?>
|
28 |
+
<div class="col2-set">
|
29 |
+
<h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
|
30 |
+
<div class="col-1 col-narrow"></div>
|
31 |
+
<div class="col-2 col-wide">
|
32 |
+
<h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
|
33 |
+
<table class="data-table" id="unavailable-shipping-table">
|
34 |
+
<col />
|
35 |
+
<col width="1" />
|
36 |
+
<thead>
|
37 |
+
<tr>
|
38 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
39 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
40 |
+
</tr>
|
41 |
+
</thead>
|
42 |
+
<tbody>
|
43 |
+
<?php foreach ($this->getVirtualQuoteItems() as $_item): ?>
|
44 |
+
<tr>
|
45 |
+
<td><?php echo $this->getItemHtml($_item) ?></td>
|
46 |
+
<td class="a-center"><?php echo $_item->getQty() ?></td>
|
47 |
+
</tr>
|
48 |
+
<?php endforeach; ?>
|
49 |
+
</tbody>
|
50 |
+
</table>
|
51 |
+
<script type="text/javascript">decorateTable('unavailable-shipping-table')</script>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/multishipping/item/default.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 class="product-name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></h3>
|
28 |
+
<?php if ($_options = $this->getOptionList()):?>
|
29 |
+
<dl class="item-options">
|
30 |
+
<?php foreach ($_options as $_option) : ?>
|
31 |
+
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
32 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
33 |
+
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
34 |
+
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
35 |
+
<div class="truncated_full_value">
|
36 |
+
<dl class="item-options">
|
37 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
38 |
+
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
39 |
+
</dl>
|
40 |
+
</div>
|
41 |
+
<?php endif; ?>
|
42 |
+
</dd>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</dl>
|
45 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/multishipping/link.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
<a href="<?php echo $this->getCheckoutUrl()?>" title="<?php echo Mage::helper('checkout')->__('Checkout with Multiple Addresses');?>"><?php echo Mage::helper('checkout')->__('Checkout with Multiple Addresses');?></a>
|
app/design/frontend/ma2/default/template/checkout/multishipping/overview.phtml
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Multishipping_Overview */ ?>
|
28 |
+
<div class="multiple-checkout">
|
29 |
+
<div class="page-title">
|
30 |
+
<h1><?php echo $this->__('Review Order') ?></h1>
|
31 |
+
</div>
|
32 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
33 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" onsubmit="return showLoader();">
|
34 |
+
<div class="col2-set">
|
35 |
+
<h2 class="legend"><?php echo $this->__('Billing Information') ?></h2>
|
36 |
+
<div class="col-1">
|
37 |
+
<div class="box">
|
38 |
+
<?php $_address=$this->getBillingAddress() ?>
|
39 |
+
<div class="box-title">
|
40 |
+
<h3><?php echo $this->__('Billing Address') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
|
41 |
+
</div>
|
42 |
+
<div class="box-content">
|
43 |
+
<address>
|
44 |
+
<?php echo $_address->format('html') ?>
|
45 |
+
</address>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<div class="col-2">
|
50 |
+
<div class="box">
|
51 |
+
<div class="box-title">
|
52 |
+
<h3><?php echo $this->__('Payment Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditBillingUrl() ?>"><?php echo $this->__('Change') ?></a></h3>
|
53 |
+
</div>
|
54 |
+
<div class="box-content">
|
55 |
+
<input type="hidden" name="payment[cc_number]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcNumber())?>" />
|
56 |
+
<input type="hidden" name="payment[cc_cid]" value="<?php echo $this->escapeHtml($this->getPayment()->getCcCid())?>" />
|
57 |
+
<?php echo $this->getPaymentHtml() ?>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
63 |
+
<div class="col2-set">
|
64 |
+
<h2 class="legend"><?php echo $this->__('Shipping Information') ?></h2>
|
65 |
+
<?php foreach ($this->getShippingAddresses() as $_index => $_address): ?>
|
66 |
+
<h3 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getShippingAddressCount()) ?></h3>
|
67 |
+
<div class="col-1 col-narrow">
|
68 |
+
<div class="box">
|
69 |
+
<div class="box-title">
|
70 |
+
<h4><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingAddressUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h4>
|
71 |
+
</div>
|
72 |
+
<div class="box-content">
|
73 |
+
<address>
|
74 |
+
<?php echo $_address->format('html') ?>
|
75 |
+
</address>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
<div class="box">
|
79 |
+
<div class="box-title">
|
80 |
+
<h4><?php echo $this->__('Shipping Method') ?> <span class="separator">|</span> <a href="<?php echo $this->getEditShippingUrl() ?>"><?php echo $this->__('Change') ?></a></h4>
|
81 |
+
</div>
|
82 |
+
<div class="box-content">
|
83 |
+
<?php if($_rate=$this->getShippingAddressRate($_address)): ?>
|
84 |
+
<p>
|
85 |
+
<?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?> - <?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
86 |
+
<?php $_excl = $this->getShippingPriceExclTax($_address); ?>
|
87 |
+
<?php $_incl = $this->getShippingPriceInclTax($_address); ?>
|
88 |
+
<?php echo $_excl; ?>
|
89 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
90 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
91 |
+
<?php endif; ?>
|
92 |
+
</p>
|
93 |
+
<?php endif; ?>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
<div class="col-2 col-wide">
|
98 |
+
<h4><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressesEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h4>
|
99 |
+
<table class="data-table" id="overview-table-<?php echo $_address->getId() ?>">
|
100 |
+
<col />
|
101 |
+
<col width="1" />
|
102 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
103 |
+
<col width="1" />
|
104 |
+
<?php endif; ?>
|
105 |
+
<col width="1" />
|
106 |
+
<col width="1" />
|
107 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
108 |
+
<col width="1" />
|
109 |
+
<?php endif; ?>
|
110 |
+
<thead>
|
111 |
+
<tr>
|
112 |
+
<th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
|
113 |
+
<th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
|
114 |
+
<th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
|
115 |
+
<th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
|
116 |
+
</tr>
|
117 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
118 |
+
<tr>
|
119 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
120 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
121 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
122 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
123 |
+
</tr>
|
124 |
+
<?php endif; ?>
|
125 |
+
</thead>
|
126 |
+
<tfoot>
|
127 |
+
<?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?>
|
128 |
+
</tfoot>
|
129 |
+
<tbody>
|
130 |
+
<?php foreach ($this->getShippingAddressItems($_address) as $_item): ?>
|
131 |
+
<?php echo $this->getRowItemHtml($_item); ?>
|
132 |
+
<?php endforeach; ?>
|
133 |
+
</tbody>
|
134 |
+
</table>
|
135 |
+
<script type="text/javascript">decorateTable('overview-table-<?php echo $_address->getId() ?>')</script>
|
136 |
+
</div>
|
137 |
+
<?php if($this->getShippingAddressCount()!=$_index+1): ?>
|
138 |
+
<div class="divider"></div>
|
139 |
+
<?php endif; ?>
|
140 |
+
<?php endforeach; ?>
|
141 |
+
</div>
|
142 |
+
<?php if ($this->getQuote()->hasVirtualItems()): ?>
|
143 |
+
<div class="col2-set">
|
144 |
+
<h2 class="legend"><?php echo $this->__('Other Items in Your Order') ?></h2>
|
145 |
+
<div class="col-1 col-narrow"></div>
|
146 |
+
<div class="col-2 col-wide">
|
147 |
+
<h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getVirtualProductEditUrl() ?>"><?php echo $this->__('Edit Items') ?></a></h3>
|
148 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
149 |
+
<table class="data-table" id="virtual-overview-table">
|
150 |
+
<col />
|
151 |
+
<col width="1" />
|
152 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
153 |
+
<col width="1" />
|
154 |
+
<?php endif; ?>
|
155 |
+
<col width="1" />
|
156 |
+
<col width="1" />
|
157 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
158 |
+
<col width="70" />
|
159 |
+
<?php endif; ?>
|
160 |
+
<thead>
|
161 |
+
<tr>
|
162 |
+
<th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Product Name') ?></th>
|
163 |
+
<th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Price') ?></th>
|
164 |
+
<th rowspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Qty') ?></th>
|
165 |
+
<th colspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
|
166 |
+
</tr>
|
167 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
168 |
+
<tr>
|
169 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
170 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
171 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
172 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
173 |
+
</tr>
|
174 |
+
<?php endif; ?>
|
175 |
+
</thead>
|
176 |
+
<tfoot>
|
177 |
+
<?php echo $this->renderTotals($this->getBillinAddressTotals()); ?>
|
178 |
+
</tfoot>
|
179 |
+
<tbody>
|
180 |
+
<?php foreach ($this->getVirtualItems() as $_item): ?>
|
181 |
+
<?php echo $this->getRowItemHtml($_item); ?>
|
182 |
+
<?php endforeach; ?>
|
183 |
+
</tbody>
|
184 |
+
</table>
|
185 |
+
<script type="text/javascript">decorateTable('virtual-overview-table')</script>
|
186 |
+
</div>
|
187 |
+
</div>
|
188 |
+
<?php endif; ?>
|
189 |
+
|
190 |
+
<?php echo $this->getChildHtml('items_after'); ?>
|
191 |
+
|
192 |
+
<div id="checkout-review-submit">
|
193 |
+
<?php echo $this->getChildHtml('agreements') ?>
|
194 |
+
<div class="place-order">
|
195 |
+
<div class="grand-total">
|
196 |
+
<div class="inner">
|
197 |
+
<big><?php echo $this->__('Grand Total:') ?> <?php echo $this->helper('checkout')->formatPrice($this->getTotal()) ?></big>
|
198 |
+
<div id="review-buttons-container">
|
199 |
+
<button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" id="review-button"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
+
<span class="please-wait" id="review-please-wait" style="display:none;">
|
204 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
|
205 |
+
</span>
|
206 |
+
</div>
|
207 |
+
</div>
|
208 |
+
<div class="buttons-set">
|
209 |
+
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo $this->__('Back to Billing Information') ?></a></p>
|
210 |
+
</div>
|
211 |
+
</form>
|
212 |
+
<script type="text/javascript">
|
213 |
+
//<![CDATA[
|
214 |
+
var submitted = false;
|
215 |
+
|
216 |
+
function showLoader()
|
217 |
+
{
|
218 |
+
if (submitted) {
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
if ($('checkout-agreements')) {
|
222 |
+
var checkboxes = $$('#checkout-agreements input');
|
223 |
+
for (var i=0, l=checkboxes.length; i<l; i++) {
|
224 |
+
if (!checkboxes[i].checked) {
|
225 |
+
alert("<?php echo $this->__('Please agree to all Terms and Conditions before placing the orders.')?>");
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
submitted = true;
|
232 |
+
var step='review';
|
233 |
+
Element.show(step+'-please-wait');
|
234 |
+
$(step+'-buttons-container').setStyle({opacity:.5});
|
235 |
+
$(step+'-buttons-container').descendants().each(function(s) {
|
236 |
+
s.disabled = true;
|
237 |
+
});
|
238 |
+
return true;
|
239 |
+
}
|
240 |
+
//]]>
|
241 |
+
</script>
|
242 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/multishipping/overview/item.phtml
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Quote Item row html
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Cart_Item_Renderer
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $_item = $this->getItem() ?>
|
35 |
+
<tr>
|
36 |
+
<td><?php echo $this->getRenderedBlock()->getItemHtml($_item) ?></td>
|
37 |
+
|
38 |
+
<!--- Excluding Tax -->
|
39 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
40 |
+
<td class="a-right">
|
41 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
42 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
43 |
+
<?php else: ?>
|
44 |
+
<div class="cart-price">
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
49 |
+
<?php else: ?>
|
50 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
51 |
+
<?php endif; ?>
|
52 |
+
|
53 |
+
</div>
|
54 |
+
|
55 |
+
|
56 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
57 |
+
|
58 |
+
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
|
59 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
60 |
+
<small>
|
61 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
62 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
63 |
+
<?php endforeach; ?>
|
64 |
+
</small>
|
65 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
66 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
67 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
68 |
+
<?php endforeach; ?>
|
69 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
70 |
+
<small>
|
71 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
72 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
73 |
+
<?php endforeach; ?>
|
74 |
+
</small>
|
75 |
+
<?php endif; ?>
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
79 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
80 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
81 |
+
</div>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php endif; ?>
|
84 |
+
</td>
|
85 |
+
<?php endif; ?>
|
86 |
+
<!--- // Excluding Tax -->
|
87 |
+
|
88 |
+
<!--- Including Tax -->
|
89 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
90 |
+
<td>
|
91 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
92 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
93 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
94 |
+
<?php else: ?>
|
95 |
+
<div class="cart-price">
|
96 |
+
<?php endif; ?>
|
97 |
+
|
98 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
99 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
100 |
+
<?php else: ?>
|
101 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
102 |
+
<?php endif; ?>
|
103 |
+
|
104 |
+
</div>
|
105 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
106 |
+
|
107 |
+
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
|
108 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
109 |
+
<small>
|
110 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
111 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
112 |
+
<?php endforeach; ?>
|
113 |
+
</small>
|
114 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
115 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
116 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
117 |
+
<?php endforeach; ?>
|
118 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
119 |
+
<small>
|
120 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
121 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
122 |
+
<?php endforeach; ?>
|
123 |
+
</small>
|
124 |
+
<?php endif; ?>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
128 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
129 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
130 |
+
</div>
|
131 |
+
<?php endif; ?>
|
132 |
+
<?php endif; ?>
|
133 |
+
|
134 |
+
</td>
|
135 |
+
<?php endif; ?>
|
136 |
+
<!--- // Including Tax -->
|
137 |
+
|
138 |
+
<td class="a-center"><?php echo $_item->getQty()*1 ?></td>
|
139 |
+
|
140 |
+
<!--- Excluding Tax Subtotal -->
|
141 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
142 |
+
<td class="a-right">
|
143 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
144 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
145 |
+
<?php else: ?>
|
146 |
+
<div class="cart-price">
|
147 |
+
<?php endif; ?>
|
148 |
+
|
149 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
150 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
151 |
+
<?php else: ?>
|
152 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
153 |
+
<?php endif; ?>
|
154 |
+
|
155 |
+
</div>
|
156 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
157 |
+
|
158 |
+
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
|
159 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
160 |
+
<small>
|
161 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
162 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
163 |
+
<?php endforeach; ?>
|
164 |
+
</small>
|
165 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
166 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
167 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
168 |
+
<?php endforeach; ?>
|
169 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
170 |
+
<small>
|
171 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
172 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
173 |
+
<?php endforeach; ?>
|
174 |
+
</small>
|
175 |
+
<?php endif; ?>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
179 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
180 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
181 |
+
</div>
|
182 |
+
<?php endif; ?>
|
183 |
+
<?php endif; ?>
|
184 |
+
</td>
|
185 |
+
<?php endif; ?>
|
186 |
+
<!--- //Excluding Tax Subtotal -->
|
187 |
+
|
188 |
+
<!--- Including Tax Subtotal -->
|
189 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
190 |
+
<td>
|
191 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
192 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
193 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
194 |
+
<?php else: ?>
|
195 |
+
<div class="cart-price">
|
196 |
+
<?php endif; ?>
|
197 |
+
|
198 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
199 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
200 |
+
<?php else: ?>
|
201 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
202 |
+
<?php endif; ?>
|
203 |
+
|
204 |
+
</div>
|
205 |
+
|
206 |
+
|
207 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
208 |
+
|
209 |
+
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display: none;">
|
210 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
211 |
+
<small>
|
212 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
213 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
214 |
+
<?php endforeach; ?>
|
215 |
+
</small>
|
216 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
217 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
218 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
219 |
+
<?php endforeach; ?>
|
220 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
221 |
+
<small>
|
222 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
223 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
224 |
+
<?php endforeach; ?>
|
225 |
+
</small>
|
226 |
+
<?php endif; ?>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
230 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
231 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
232 |
+
</div>
|
233 |
+
<?php endif; ?>
|
234 |
+
<?php endif; ?>
|
235 |
+
</td>
|
236 |
+
<?php endif; ?>
|
237 |
+
<!--- //Including Tax Subtotal -->
|
238 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/multishipping/shipping.phtml
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Multishipping checkout shipping template
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Multishipping_Shipping
|
32 |
+
* @var $this Mage_Checkout_Block_Multishipping_Shipping
|
33 |
+
*/
|
34 |
+
?>
|
35 |
+
<div class="multiple-checkout">
|
36 |
+
<div class="page-title">
|
37 |
+
<h1><?php echo $this->__('Select Shipping Method') ?></h1>
|
38 |
+
</div>
|
39 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
40 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form">
|
41 |
+
<?php foreach ($this->getAddresses() as $_index => $_address): ?>
|
42 |
+
<div class="col2-set">
|
43 |
+
<h2 class="legend"><?php echo $this->__('Address %s of %s', ($_index+1), $this->getAddressCount()) ?></h2>
|
44 |
+
<div class="col-1 col-narrow">
|
45 |
+
<div class="box">
|
46 |
+
<div class="box-title">
|
47 |
+
<h3><?php echo $this->__('Shipping To') ?> <span class="separator">|</span> <a href="<?php echo $this->getAddressEditUrl($_address) ?>"><?php echo $this->__('Change') ?></a></h3>
|
48 |
+
</div>
|
49 |
+
<div class="box-content">
|
50 |
+
<address><?php echo $_address->format('html') ?></address>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
<div class="box box-sp-methods">
|
54 |
+
<div class="pointer"></div>
|
55 |
+
<div class="box-title">
|
56 |
+
<h3><?php echo $this->__('Shipping Method') ?></h3>
|
57 |
+
</div>
|
58 |
+
<div class="box-content">
|
59 |
+
<?php if (!($_shippingRateGroups = $this->getShippingRates($_address))): ?>
|
60 |
+
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
61 |
+
<?php else: ?>
|
62 |
+
<dl class="sp-methods">
|
63 |
+
<?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
|
64 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
65 |
+
<dd>
|
66 |
+
<ul>
|
67 |
+
<?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
|
68 |
+
<li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"' ?>>
|
69 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
70 |
+
<?php echo $this->escapeHtml($_rate->getCarrierTitle()) ?>: <?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
|
71 |
+
<?php else: ?>
|
72 |
+
<?php if ($_sole) : ?>
|
73 |
+
<span class="no-display"><input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>" checked="checked"/></span>
|
74 |
+
<?php else: ?>
|
75 |
+
<input type="radio" name="shipping_method[<?php echo $_address->getId() ?>]" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?> class="radio" />
|
76 |
+
<?php endif; ?>
|
77 |
+
<label for="s_method_<?php echo $_address->getId() ?>_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
78 |
+
<?php $_excl = $this->getShippingPrice($_address, $_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
79 |
+
<?php $_incl = $this->getShippingPrice($_address, $_rate->getPrice(), true); ?>
|
80 |
+
<?php echo $_excl; ?>
|
81 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
82 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
83 |
+
<?php endif; ?>
|
84 |
+
</label>
|
85 |
+
<?php endif ?>
|
86 |
+
</li>
|
87 |
+
<?php endforeach; ?>
|
88 |
+
</ul>
|
89 |
+
</dd>
|
90 |
+
<?php endforeach; ?>
|
91 |
+
</dl>
|
92 |
+
<?php endif; ?>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<div class="col-2 col-wide">
|
97 |
+
<?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?>
|
98 |
+
<h3><?php echo $this->__('Items') ?> <span class="separator">|</span> <a href="<?php echo $this->getItemsEditUrl($_address) ?>"><?php echo $this->__('Edit Items') ?></a></h3>
|
99 |
+
<table class="data-table" id="shipping-table-<?php echo $_address->getId() ?>">
|
100 |
+
<col />
|
101 |
+
<col width="1" />
|
102 |
+
<thead>
|
103 |
+
<tr>
|
104 |
+
<th><?php echo $this->__('Product Name') ?></th>
|
105 |
+
<th class="a-center"><?php echo $this->__('Qty') ?></th>
|
106 |
+
</tr>
|
107 |
+
</thead>
|
108 |
+
<tbody>
|
109 |
+
<?php foreach ($this->getAddressItems($_address) as $_item): ?>
|
110 |
+
<tr>
|
111 |
+
<td>
|
112 |
+
<?php echo $this->getItemHtml($_item->getQuoteItem()) ?>
|
113 |
+
</td>
|
114 |
+
<td class="a-center"><?php echo $_item->getQty() ?></td>
|
115 |
+
</tr>
|
116 |
+
<?php endforeach; ?>
|
117 |
+
</tbody>
|
118 |
+
</table>
|
119 |
+
<script type="text/javascript">decorateTable('shipping-table-<?php echo $_address->getId() ?>')</script>
|
120 |
+
<?php echo $this->helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
<?php endforeach; ?>
|
124 |
+
<?php echo $this->getChildHtml('checkout_billing_items') ?>
|
125 |
+
<div class="buttons-set">
|
126 |
+
<p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>« </small><?php echo $this->__('Back to Select Addresses') ?></a></p>
|
127 |
+
<button type="submit" title="<?php echo $this->__('Continue to Billing Information') ?>" class="button"><span><span><?php echo $this->__('Continue to Billing Information') ?></span></span></button>
|
128 |
+
</div>
|
129 |
+
</form>
|
130 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/multishipping/state.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* Mustishipping state
|
30 |
+
*
|
31 |
+
* @see Mage_Checkout_Block_Multishipping_State
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<ul class="checkout-progress" id="checkout-progress-state">
|
35 |
+
<?php foreach ($this->getSteps() as $_step): ?>
|
36 |
+
<li title="<?php echo $_step->getLabel() ?>"<?php if($_step->getIsActive()): ?> class="active"<?php endif; ?>><span><?php echo $_step->getLabel() ?></span></li>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</ul>
|
39 |
+
<script type="text/javascript">decorateGeneric($$('#checkout-progress-state li'), ['first','last']);</script>
|
app/design/frontend/ma2/default/template/checkout/multishipping/success.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="multiple-checkout">
|
28 |
+
<div class="page-title">
|
29 |
+
<h1><?php echo $this->__('Order Success') ?></h1>
|
30 |
+
</div>
|
31 |
+
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
|
32 |
+
<p><?php echo $this->__('We are processing your order and you will soon receive an email with details of the order. Once the order has shipped you will receive another email with a link to track its progress.') ?></p>
|
33 |
+
<?php if($_orderIds = $this->getOrderIds()): ?>
|
34 |
+
<p>
|
35 |
+
<?php $flag = false ?>
|
36 |
+
<?php echo $this->__('Your order number is ') ?>
|
37 |
+
<?php foreach ($_orderIds as $orderId=>$incrementId): ?>
|
38 |
+
<?php if ($flag): ?>
|
39 |
+
<?php echo ', ' ?>
|
40 |
+
<?php endif; ?>
|
41 |
+
<?php $flag = true ?>
|
42 |
+
<a href="<?php echo $this->getViewOrderUrl($orderId) ?>"><?php echo $incrementId ?></a>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</p>
|
45 |
+
<?php endif; ?>
|
46 |
+
<?php echo $this->getChildHtml() ?>
|
47 |
+
<div class="buttons-set">
|
48 |
+
<button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button" onclick="setLocation('<?php echo $this->getContinueUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
49 |
+
</div>
|
50 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/onepage.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="page-title">
|
28 |
+
<h1><?php echo $this->__('Checkout') ?></h1>
|
29 |
+
</div>
|
30 |
+
<script type="text/javascript" src="<?php echo $this->getJsUrl('varien/accordion.js') ?>"></script>
|
31 |
+
<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout.js') ?>"></script>
|
32 |
+
<ol class="opc" id="checkoutSteps">
|
33 |
+
<?php $i=0; foreach($this->getSteps() as $_stepId => $_stepInfo): ?>
|
34 |
+
<?php if (!$this->getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
|
35 |
+
<li id="opc-<?php echo $_stepId ?>" class="section<?php echo !empty($_stepInfo['allow'])?' allow':'' ?><?php echo !empty($_stepInfo['complete'])?' saved':'' ?>">
|
36 |
+
<div class="step-title">
|
37 |
+
<span class="number"><?php echo $i ?></span>
|
38 |
+
<h2><?php echo $_stepInfo['label'] ?></h2>
|
39 |
+
<a href="#"><?php echo $this->__('Edit') ?></a>
|
40 |
+
</div>
|
41 |
+
<div id="checkout-step-<?php echo $_stepId ?>" class="step a-item" style="display:none;">
|
42 |
+
<?php echo $this->getChildHtml($_stepId) ?>
|
43 |
+
</div>
|
44 |
+
</li>
|
45 |
+
<?php endforeach ?>
|
46 |
+
</ol>
|
47 |
+
<script type="text/javascript">
|
48 |
+
//<![CDATA[
|
49 |
+
var accordion = new Accordion('checkoutSteps', '.step-title', true);
|
50 |
+
<?php if($this->getActiveStep()): ?>
|
51 |
+
accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
|
52 |
+
<?php endif ?>
|
53 |
+
var checkout = new Checkout(accordion,{
|
54 |
+
progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
|
55 |
+
review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
|
56 |
+
saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
|
57 |
+
failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
|
58 |
+
);
|
59 |
+
//]]>
|
60 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/agreements.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Agreements
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php if (!$this->getAgreements()) return; ?>
|
34 |
+
<form action="" id="checkout-agreements" onsubmit="return false;">
|
35 |
+
<ol class="checkout-agreements">
|
36 |
+
<?php foreach ($this->getAgreements() as $_a): ?>
|
37 |
+
<li>
|
38 |
+
<div class="agreement-content"<?php echo ($_a->getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>>
|
39 |
+
<?php if ($_a->getIsHtml()):?>
|
40 |
+
<?php echo $_a->getContent() ?>
|
41 |
+
<?php else:?>
|
42 |
+
<?php echo nl2br($this->escapeHtml($_a->getContent())) ?>
|
43 |
+
<?php endif; ?>
|
44 |
+
</div>
|
45 |
+
<p class="agree">
|
46 |
+
<input type="checkbox" id="agreement-<?php echo $_a->getId()?>" name="agreement[<?php echo $_a->getId()?>]" value="1" title="<?php echo $this->escapeHtml($_a->getCheckboxText()) ?>" class="checkbox" /><label for="agreement-<?php echo $_a->getId()?>"><?php echo $_a->getIsHtml() ? $_a->getCheckboxText() : $this->escapeHtml($_a->getCheckboxText()) ?></label>
|
47 |
+
</p>
|
48 |
+
</li>
|
49 |
+
<?php endforeach ?>
|
50 |
+
</ol>
|
51 |
+
</form>
|
app/design/frontend/ma2/default/template/checkout/onepage/billing.phtml
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 id="co-billing-form" action="">
|
28 |
+
<fieldset>
|
29 |
+
<ul class="form-list">
|
30 |
+
<?php if ($this->customerHasAddresses()): ?>
|
31 |
+
<li class="wide">
|
32 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
33 |
+
<div class="input-box">
|
34 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
35 |
+
</div>
|
36 |
+
</li>
|
37 |
+
<?php endif; ?>
|
38 |
+
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
39 |
+
<fieldset>
|
40 |
+
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
41 |
+
<ul>
|
42 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
43 |
+
<li class="fields">
|
44 |
+
<div class="field">
|
45 |
+
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
46 |
+
<div class="input-box">
|
47 |
+
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
51 |
+
<div class="field">
|
52 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
53 |
+
<div class="input-box">
|
54 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
</li>
|
59 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
60 |
+
<li class="wide">
|
61 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
62 |
+
<div class="input-box">
|
63 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
67 |
+
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
68 |
+
<li class="wide">
|
69 |
+
<div class="input-box">
|
70 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
71 |
+
</div>
|
72 |
+
</li>
|
73 |
+
<?php endfor; ?>
|
74 |
+
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
75 |
+
<li class="wide">
|
76 |
+
<label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
|
77 |
+
<div class="input-box">
|
78 |
+
<input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
79 |
+
</div>
|
80 |
+
</li>
|
81 |
+
<?php endif; ?>
|
82 |
+
<li class="fields">
|
83 |
+
<div class="field">
|
84 |
+
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
85 |
+
<div class="input-box">
|
86 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="field">
|
90 |
+
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
91 |
+
<div class="input-box">
|
92 |
+
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
93 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
94 |
+
</select>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
98 |
+
//]]>
|
99 |
+
</script>
|
100 |
+
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
</li>
|
104 |
+
<li class="fields">
|
105 |
+
<div class="field">
|
106 |
+
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
107 |
+
<div class="input-box">
|
108 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
<div class="field">
|
112 |
+
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
113 |
+
<div class="input-box">
|
114 |
+
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
</li>
|
118 |
+
<li class="fields">
|
119 |
+
<div class="field">
|
120 |
+
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
121 |
+
<div class="input-box">
|
122 |
+
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
<div class="field">
|
126 |
+
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
127 |
+
<div class="input-box">
|
128 |
+
<input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</li>
|
132 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
133 |
+
|
134 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
135 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
136 |
+
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
137 |
+
<li class="fields">
|
138 |
+
<?php if ($_dob->isEnabled()): ?>
|
139 |
+
<div class="field">
|
140 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
141 |
+
</div>
|
142 |
+
<?php endif; ?>
|
143 |
+
<?php if ($_gender->isEnabled()): ?>
|
144 |
+
<div class="field">
|
145 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
146 |
+
</div>
|
147 |
+
<?php endif ?>
|
148 |
+
</li>
|
149 |
+
<?php endif ?>
|
150 |
+
|
151 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
152 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
153 |
+
<li>
|
154 |
+
<?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
155 |
+
</li>
|
156 |
+
<?php endif ?>
|
157 |
+
|
158 |
+
<li class="fields" id="register-customer-password">
|
159 |
+
<div class="field">
|
160 |
+
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
161 |
+
<div class="input-box">
|
162 |
+
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
<div class="field">
|
166 |
+
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
167 |
+
<div class="input-box">
|
168 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
</li>
|
172 |
+
<?php endif; ?>
|
173 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
174 |
+
<li class="control">
|
175 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
176 |
+
</li>
|
177 |
+
<?php else:?>
|
178 |
+
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
179 |
+
<?php endif; ?>
|
180 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
181 |
+
</ul>
|
182 |
+
</fieldset>
|
183 |
+
</li>
|
184 |
+
<?php /* Extensions placeholder */ ?>
|
185 |
+
<?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
|
186 |
+
<?php if ($this->canShip()): ?>
|
187 |
+
<li class="control">
|
188 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
|
189 |
+
<li class="control">
|
190 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
|
191 |
+
</li>
|
192 |
+
<?php endif; ?>
|
193 |
+
</ul>
|
194 |
+
<?php if (!$this->canShip()): ?>
|
195 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
196 |
+
<?php endif; ?>
|
197 |
+
<div class="buttons-set" id="billing-buttons-container">
|
198 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
199 |
+
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
200 |
+
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
201 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
202 |
+
</span>
|
203 |
+
</div>
|
204 |
+
</fieldset>
|
205 |
+
</form>
|
206 |
+
<script type="text/javascript">
|
207 |
+
//<![CDATA[
|
208 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
209 |
+
var billingForm = new VarienForm('co-billing-form');
|
210 |
+
|
211 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
212 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
213 |
+
|
214 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
|
215 |
+
//]]>
|
216 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/failure.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="page-title">
|
28 |
+
<h1><?php echo $this->__('An error occurred in the process of payment') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php if ($this->getRealOrderId()) : ?><p><?php echo $this->__('Order #') . $this->getRealOrderId() ?></p><?php endif ?>
|
31 |
+
<?php if ($error = $this->getErrorMessage()) : ?><p><?php echo $error ?></p><?php endif ?>
|
32 |
+
<p><?php echo $this->__('Click <a href="%s">here</a> to continue shopping.', $this->getContinueShoppingUrl()) ?></p>
|
app/design/frontend/ma2/default/template/checkout/onepage/link.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->isPossibleOnepageCheckout()):?>
|
28 |
+
<button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
|
29 |
+
<?php endif?>
|
app/design/frontend/ma2/default/template/checkout/onepage/login.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 /* Extensions placeholder */ ?>
|
28 |
+
<?php echo $this->getChildHtml('checkout.onepage.login.extra')?>
|
29 |
+
<div class="col2-set">
|
30 |
+
<?php echo $this->getChildHtml('login_before')?>
|
31 |
+
<div class="col-1">
|
32 |
+
<h3><?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?><?php echo $this->__('Checkout as a Guest or Register') ?><?php else: ?><?php echo $this->__('Register to Create an Account') ?><?php endif; ?></h3>
|
33 |
+
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
|
34 |
+
<p><?php echo $this->__('Register with us for future convenience:') ?></p>
|
35 |
+
<?php else: ?>
|
36 |
+
<p><strong><?php echo $this->__('Register and save time!') ?></strong><br />
|
37 |
+
<?php echo $this->__('Register with us for future convenience:') ?></p>
|
38 |
+
<ul>
|
39 |
+
<li><?php echo $this->__('Fast and easy check out') ?></li>
|
40 |
+
<li><?php echo $this->__('Easy access to your order history and status') ?></li>
|
41 |
+
</ul>
|
42 |
+
<?php endif; ?>
|
43 |
+
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
|
44 |
+
<ul class="form-list">
|
45 |
+
<?php if( $this->getQuote()->isAllowedGuestCheckout() ): ?>
|
46 |
+
<li class="control">
|
47 |
+
<input type="radio" name="checkout_method" id="login:guest" value="guest"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"<?php endif; ?> class="radio" /><label for="login:guest"><?php echo $this->__('Checkout as Guest') ?></label>
|
48 |
+
</li>
|
49 |
+
<?php endif; ?>
|
50 |
+
<li class="control">
|
51 |
+
<input type="radio" name="checkout_method" id="login:register" value="register"<?php if($this->getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"<?php endif ?> class="radio" /><label for="login:register"><?php echo $this->__('Register') ?></label>
|
52 |
+
</li>
|
53 |
+
</ul>
|
54 |
+
<h4><?php echo $this->__('Register and save time!') ?></h4>
|
55 |
+
<p><?php echo $this->__('Register with us for future convenience:') ?></p>
|
56 |
+
<ul class="ul">
|
57 |
+
<li><?php echo $this->__('Fast and easy check out') ?></li>
|
58 |
+
<li><?php echo $this->__('Easy access to your order history and status') ?></li>
|
59 |
+
</ul>
|
60 |
+
<?php else: ?>
|
61 |
+
<input type="hidden" name="checkout_method" id="login:register" value="register" checked="checked" />
|
62 |
+
<?php endif; ?>
|
63 |
+
</div>
|
64 |
+
<div class="col-2">
|
65 |
+
<h3><?php echo $this->__('Login') ?></h3>
|
66 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
67 |
+
<form id="login-form" action="<?php echo $this->getPostAction() ?>" method="post">
|
68 |
+
<fieldset>
|
69 |
+
<h4><?php echo $this->__('Already registered?') ?></h4>
|
70 |
+
<p><?php echo $this->__('Please log in below:') ?></p>
|
71 |
+
<ul class="form-list">
|
72 |
+
<li>
|
73 |
+
<label for="login-email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
74 |
+
<div class="input-box">
|
75 |
+
<input type="text" class="input-text required-entry validate-email" id="login-email" name="login[username]" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" />
|
76 |
+
</div>
|
77 |
+
</li>
|
78 |
+
<li>
|
79 |
+
<label for="login-password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
80 |
+
<div class="input-box">
|
81 |
+
<input type="password" class="input-text required-entry" id="login-password" name="login[password]" />
|
82 |
+
</div>
|
83 |
+
</li>
|
84 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
85 |
+
</ul>
|
86 |
+
</fieldset>
|
87 |
+
</form>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
<div class="col2-set">
|
91 |
+
<div class="col-1">
|
92 |
+
<div class="buttons-set">
|
93 |
+
<p class="required"> </p>
|
94 |
+
<button type="button" class="button" onclick="checkout.setMethod();"><span><span><?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?></span></span></button>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
<div class="col-2">
|
98 |
+
<div class="buttons-set">
|
99 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
100 |
+
<a href="<?php echo $this->getUrl('customer/account/forgotpassword') ?>" class="f-left"><?php echo $this->__('Forgot your password?') ?></a>
|
101 |
+
<button type="submit" class="button" onclick="onepageLogin(this)"><span><span><?php echo $this->__('Login') ?></span></span></button>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
<script type="text/javascript">
|
106 |
+
//<![CDATA[
|
107 |
+
var loginForm = new VarienForm('login-form', true);
|
108 |
+
$('login-email').observe('keypress', bindLoginPost);
|
109 |
+
$('login-password').observe('keypress', bindLoginPost);
|
110 |
+
function bindLoginPost(evt){
|
111 |
+
if (evt.keyCode == Event.KEY_RETURN) {
|
112 |
+
loginForm.submit();
|
113 |
+
}
|
114 |
+
}
|
115 |
+
function onepageLogin(button)
|
116 |
+
{
|
117 |
+
if(loginForm.validator && loginForm.validator.validate()){
|
118 |
+
button.disabled = true;
|
119 |
+
loginForm.submit();
|
120 |
+
}
|
121 |
+
}
|
122 |
+
//]]>
|
123 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/payment.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
var quoteBaseGrandTotal = <?php echo (float)$this->getQuoteBaseGrandTotal(); ?>;
|
30 |
+
var checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
31 |
+
var payment = new Payment('co-payment-form', '<?php echo $this->getUrl('checkout/onepage/savePayment') ?>');
|
32 |
+
var lastPrice;
|
33 |
+
//]]>
|
34 |
+
</script>
|
35 |
+
<form action="" id="co-payment-form">
|
36 |
+
<fieldset>
|
37 |
+
<?php echo $this->getChildHtml('methods') ?>
|
38 |
+
</fieldset>
|
39 |
+
</form>
|
40 |
+
<div class="tool-tip" id="payment-tool-tip" style="display:none;">
|
41 |
+
<div class="btn-close"><a href="#" id="payment-tool-tip-close" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></a></div>
|
42 |
+
<div class="tool-tip-content"><img src="<?php echo $this->getSkinUrl('images/cvv.gif') ?>" alt="<?php echo $this->__('Card Verification Number Visual Reference') ?>" title="<?php echo $this->__('Card Verification Number Visual Reference') ?>" /></div>
|
43 |
+
</div>
|
44 |
+
<div class="buttons-set" id="payment-buttons-container">
|
45 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
46 |
+
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
47 |
+
<button type="button" class="button" onclick="payment.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
48 |
+
<span class="please-wait" id="payment-please-wait" style="display:none;">
|
49 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
50 |
+
</span>
|
51 |
+
</div>
|
52 |
+
<script type="text/javascript">
|
53 |
+
//<![CDATA[
|
54 |
+
function toggleToolTip(event){
|
55 |
+
if($('payment-tool-tip')){
|
56 |
+
$('payment-tool-tip').setStyle({
|
57 |
+
top: (Event.pointerY(event)-560)+'px'//,
|
58 |
+
//left: (Event.pointerX(event)+100)+'px'
|
59 |
+
})
|
60 |
+
$('payment-tool-tip').toggle();
|
61 |
+
}
|
62 |
+
Event.stop(event);
|
63 |
+
}
|
64 |
+
if($('payment-tool-tip-close')){
|
65 |
+
Event.observe($('payment-tool-tip-close'), 'click', toggleToolTip);
|
66 |
+
}
|
67 |
+
//]]>
|
68 |
+
</script>
|
69 |
+
<script type="text/javascript">
|
70 |
+
//<![CDATA[
|
71 |
+
payment.currentMethod = "<?php echo $this->getChild('methods')->getSelectedMethodCode() ?>";
|
72 |
+
//]]>
|
73 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/payment/info.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
<dl class="sp-methods" id="checkout-payment-method-load">
|
28 |
+
<!-- Content dynamically loaded. Content from the methods.phtml is loaded during the ajax call -->
|
29 |
+
</dl>
|
app/design/frontend/ma2/default/template/checkout/onepage/payment/methods.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
* One page checkout payment methods
|
30 |
+
*
|
31 |
+
* @var $this Mage_Checkout_Block_Onepage_Payment_Methods
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<?php
|
36 |
+
$methods = $this->getMethods();
|
37 |
+
$oneMethod = count($methods) <= 1;
|
38 |
+
?>
|
39 |
+
<?php if (empty($methods)): ?>
|
40 |
+
<dt>
|
41 |
+
<?php echo $this->__('No Payment Methods') ?>
|
42 |
+
</dt>
|
43 |
+
<?php else:
|
44 |
+
foreach ($methods as $_method):
|
45 |
+
$_code = $_method->getCode();
|
46 |
+
?>
|
47 |
+
<dt>
|
48 |
+
<?php if(!$oneMethod): ?>
|
49 |
+
<input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
|
50 |
+
<?php else: ?>
|
51 |
+
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
|
52 |
+
<?php $oneMethod = $_code; ?>
|
53 |
+
<?php endif; ?>
|
54 |
+
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
|
55 |
+
</dt>
|
56 |
+
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
|
57 |
+
<dd>
|
58 |
+
<?php echo $html; ?>
|
59 |
+
</dd>
|
60 |
+
<?php endif; ?>
|
61 |
+
<?php endforeach;
|
62 |
+
endif;
|
63 |
+
?>
|
64 |
+
<?php echo $this->getChildChildHtml('additional'); ?>
|
65 |
+
<script type="text/javascript">
|
66 |
+
//<![CDATA[
|
67 |
+
<?php echo $this->getChildChildHtml('scripts'); ?>
|
68 |
+
payment.init();
|
69 |
+
<?php if (is_string($oneMethod)): ?>
|
70 |
+
payment.switchMethod('<?php echo $oneMethod ?>');
|
71 |
+
<?php endif; ?>
|
72 |
+
//]]>
|
73 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/progress.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="block block-progress opc-block-progress">
|
28 |
+
<div class="block-title">
|
29 |
+
<strong><span><?php echo $this->__('Your Checkout Progress') ?></span></strong>
|
30 |
+
</div>
|
31 |
+
<div class="block-content">
|
32 |
+
<dl>
|
33 |
+
<?php if ($this->getCheckout()->getStepData('billing', 'is_show')): ?>
|
34 |
+
<div id="billing-progress-opcheckout">
|
35 |
+
<?php echo $this->getChildHtml('billing.progress') ?>
|
36 |
+
</div>
|
37 |
+
<?php endif; ?>
|
38 |
+
|
39 |
+
<?php if ($this->getCheckout()->getStepData('shipping', 'is_show')): ?>
|
40 |
+
<div id="shipping-progress-opcheckout">
|
41 |
+
<?php echo $this->getChildHtml('shipping.progress') ?>
|
42 |
+
</div>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
<?php if ($this->getCheckout()->getStepData('shipping_method', 'is_show')): ?>
|
46 |
+
<div id="shipping_method-progress-opcheckout">
|
47 |
+
<?php echo $this->getChildHtml('shippingmethod.progress') ?>
|
48 |
+
</div>
|
49 |
+
<?php endif; ?>
|
50 |
+
|
51 |
+
<?php if ($this->getCheckout()->getStepData('payment', 'is_show')): ?>
|
52 |
+
<div id="payment-progress-opcheckout">
|
53 |
+
<?php echo $this->getChildHtml('payment.progress') ?>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
</dl>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
|
app/design/frontend/ma2/default/template/checkout/onepage/progress/billing.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getCheckout()->getStepData('billing', 'complete')): ?>
|
28 |
+
<dt class="complete">
|
29 |
+
<?php echo $this->__('Billing Address') ?><span class="changelink"> <span class="separator">|</span> <a
|
30 |
+
href="#billing"
|
31 |
+
onclick="checkout.changeSection('opc-billing'); return false;"><?php echo $this->__('Change') ?></a></span>
|
32 |
+
</dt>
|
33 |
+
<dd class="complete">
|
34 |
+
<address><?php echo $this->getBilling()->format('html') ?></address>
|
35 |
+
</dd>
|
36 |
+
<?php else: ?>
|
37 |
+
<dt>
|
38 |
+
<?php echo $this->__('Billing Address') ?>
|
39 |
+
</dt>
|
40 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/onepage/progress/payment.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getCheckout()->getStepData('payment', 'complete')): ?>
|
28 |
+
<dt class="complete">
|
29 |
+
<?php echo $this->__('Payment Method') ?><span class="changelink"> <span class="separator">|</span> <a
|
30 |
+
href="#payment"
|
31 |
+
onclick="checkout.changeSection('opc-payment'); return false;"><?php echo $this->__('Change') ?></a></span>
|
32 |
+
</dt>
|
33 |
+
<dd class="complete">
|
34 |
+
<?php echo $this->getPaymentHtml() ?>
|
35 |
+
</dd>
|
36 |
+
<?php else: ?>
|
37 |
+
<dt>
|
38 |
+
<?php echo $this->__('Payment Method') ?>
|
39 |
+
</dt>
|
40 |
+
<?php endif; ?>
|
41 |
+
|
app/design/frontend/ma2/default/template/checkout/onepage/progress/shipping.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getCheckout()->getStepData('shipping', 'complete')): ?>
|
28 |
+
<?php $completeClass = $this->getCheckout()->getStepData('shipping', 'complete') ? 'complete' : ''; ?>
|
29 |
+
<dt class="<?php echo $completeClass ?>">
|
30 |
+
<?php echo $this->__('Shipping Address') ?> <span class="changelink"><span class="separator">|</span> <a
|
31 |
+
href="#payment"
|
32 |
+
onclick="checkout.changeSection('opc-shipping');return false;"><?php echo $this->__('Change') ?></a></span>
|
33 |
+
</dt>
|
34 |
+
<dd class="<?php echo $completeClass ?>">
|
35 |
+
<?php if ($this->getCheckout()->getStepData('shipping', 'complete')): ?>
|
36 |
+
<address><?php echo $this->getShipping()->format('html') ?></address>
|
37 |
+
<?php endif; ?>
|
38 |
+
</dd>
|
39 |
+
<?php else: ?>
|
40 |
+
<dt>
|
41 |
+
<?php echo $this->__('Shipping Address') ?>
|
42 |
+
</dt>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
app/design/frontend/ma2/default/template/checkout/onepage/progress/shipping_method.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getCheckout()->getStepData('shipping_method', 'complete')): ?>
|
28 |
+
<dt class="complete">
|
29 |
+
<?php echo $this->__('Shipping Method') ?> <span class="changelink"><span class="separator">|</span> <a
|
30 |
+
href="#shipping_method"
|
31 |
+
onclick="checkout.changeSection('opc-shipping_method'); return false;"><?php echo $this->__('Change') ?></a></span>
|
32 |
+
</dt>
|
33 |
+
<dd class="complete">
|
34 |
+
<?php if ($this->getShippingMethod()): ?>
|
35 |
+
<?php echo $this->getShippingDescription() ?>
|
36 |
+
|
37 |
+
<?php $_excl = $this->getShippingPriceExclTax(); ?>
|
38 |
+
<?php $_incl = $this->getShippingPriceInclTax(); ?>
|
39 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
40 |
+
<?php echo $_incl; ?>
|
41 |
+
<?php else: ?>
|
42 |
+
<?php echo $_excl; ?>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
45 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
46 |
+
<?php endif; ?>
|
47 |
+
|
48 |
+
<?php else: ?>
|
49 |
+
<?php echo $this->__('Shipping method has not been selected yet') ?>
|
50 |
+
<?php endif; ?>
|
51 |
+
</dd>
|
52 |
+
<?php else: ?>
|
53 |
+
<dt>
|
54 |
+
<?php echo $this->__('Shipping Method') ?>
|
55 |
+
</dt>
|
56 |
+
<?php endif; ?>
|
57 |
+
|
app/design/frontend/ma2/default/template/checkout/onepage/review.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="order-review" id="checkout-review-load">
|
28 |
+
<!-- Content loaded dynamically -->
|
29 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/onepage/review/button.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
<button type="submit" title="<?php echo $this->__('Place Order') ?>" class="button btn-checkout" onclick="review.save();"><span><span><?php echo $this->__('Place Order') ?></span></span></button>
|
app/design/frontend/ma2/default/template/checkout/onepage/review/info.phtml
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getChildHtml('items_before'); ?>
|
28 |
+
<div id="checkout-review-table-wrapper">
|
29 |
+
<table class="data-table" id="checkout-review-table">
|
30 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?>
|
31 |
+
<col />
|
32 |
+
<col width="1" />
|
33 |
+
<col width="1" />
|
34 |
+
<col width="1" />
|
35 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
36 |
+
<col width="1" />
|
37 |
+
<col width="1" />
|
38 |
+
<?php endif; ?>
|
39 |
+
<thead>
|
40 |
+
<tr>
|
41 |
+
<th rowspan="<?php echo $rowspan ?>"><?php echo $this->__('Product Name') ?></th>
|
42 |
+
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Price') ?></th>
|
43 |
+
<th rowspan="<?php echo $rowspan ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
|
44 |
+
<th colspan="<?php echo $colspan ?>" class="a-center"><?php echo $this->__('Subtotal') ?></th>
|
45 |
+
</tr>
|
46 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
47 |
+
<tr>
|
48 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
49 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
50 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
51 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
52 |
+
</tr>
|
53 |
+
<?php endif; ?>
|
54 |
+
</thead>
|
55 |
+
<?php echo $this->getChildHtml('totals'); ?>
|
56 |
+
<tbody>
|
57 |
+
<?php foreach($this->getItems() as $_item): ?>
|
58 |
+
<?php echo $this->getItemHtml($_item)?>
|
59 |
+
<?php endforeach ?>
|
60 |
+
</tbody>
|
61 |
+
</table>
|
62 |
+
</div>
|
63 |
+
<?php echo $this->getChildHtml('items_after'); ?>
|
64 |
+
<script type="text/javascript">
|
65 |
+
//<![CDATA[
|
66 |
+
decorateTable('checkout-review-table');
|
67 |
+
truncateOptions();
|
68 |
+
//]]>
|
69 |
+
</script>
|
70 |
+
<div id="checkout-review-submit">
|
71 |
+
<?php echo $this->getChildHtml('agreements') ?>
|
72 |
+
<div class="buttons-set" id="review-buttons-container">
|
73 |
+
<p class="f-left"><?php echo $this->__('Forgot an Item?') ?> <a href="<?php echo $this->getUrl('checkout/cart') ?>"><?php echo $this->__('Edit Your Cart') ?></a></p>
|
74 |
+
<?php echo $this->getChildHtml('button') ?>
|
75 |
+
<span class="please-wait" id="review-please-wait" style="display:none;">
|
76 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Submitting order information...') ?>" title="<?php echo $this->__('Submitting order information...') ?>" class="v-middle" /> <?php echo $this->__('Submitting order information...') ?>
|
77 |
+
</span>
|
78 |
+
</div>
|
79 |
+
<script type="text/javascript">
|
80 |
+
//<![CDATA[
|
81 |
+
review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));
|
82 |
+
//]]>
|
83 |
+
</script>
|
84 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/onepage/review/item.phtml
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
<tr>
|
29 |
+
<td><h3 class="product-name"><?php echo $this->escapeHtml($this->getProductName()) ?></h3>
|
30 |
+
<?php if ($_options = $this->getOptionList()):?>
|
31 |
+
<dl class="item-options">
|
32 |
+
<?php foreach ($_options as $_option) : ?>
|
33 |
+
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
34 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
35 |
+
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
36 |
+
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
37 |
+
<div class="truncated_full_value">
|
38 |
+
<dl class="item-options">
|
39 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
40 |
+
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
41 |
+
</dl>
|
42 |
+
</div>
|
43 |
+
<?php endif; ?>
|
44 |
+
</dd>
|
45 |
+
<?php endforeach; ?>
|
46 |
+
</dl>
|
47 |
+
<?php endif;?>
|
48 |
+
<?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
|
49 |
+
<?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
|
50 |
+
<?php endif;?>
|
51 |
+
</td>
|
52 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
53 |
+
<td class="a-right">
|
54 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
55 |
+
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
56 |
+
<?php else: ?>
|
57 |
+
<span class="cart-price">
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
61 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
62 |
+
<?php else: ?>
|
63 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
64 |
+
<?php endif; ?>
|
65 |
+
|
66 |
+
</span>
|
67 |
+
|
68 |
+
|
69 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
70 |
+
|
71 |
+
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
72 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
73 |
+
<small>
|
74 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
75 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
76 |
+
<?php endforeach; ?>
|
77 |
+
</small>
|
78 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
79 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
80 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
81 |
+
<?php endforeach; ?>
|
82 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
83 |
+
<small>
|
84 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
85 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
86 |
+
<?php endforeach; ?>
|
87 |
+
</small>
|
88 |
+
<?php endif; ?>
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
92 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
93 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
94 |
+
</div>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php endif; ?>
|
97 |
+
</td>
|
98 |
+
<?php endif; ?>
|
99 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
100 |
+
<td>
|
101 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
102 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
103 |
+
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
104 |
+
<?php else: ?>
|
105 |
+
<span class="cart-price">
|
106 |
+
<?php endif; ?>
|
107 |
+
|
108 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
109 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
110 |
+
<?php else: ?>
|
111 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
112 |
+
<?php endif; ?>
|
113 |
+
|
114 |
+
</span>
|
115 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
116 |
+
|
117 |
+
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
118 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
119 |
+
<small>
|
120 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
121 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span><br />
|
122 |
+
<?php endforeach; ?>
|
123 |
+
</small>
|
124 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
125 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
126 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></small></span><br />
|
127 |
+
<?php endforeach; ?>
|
128 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
129 |
+
<small>
|
130 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
131 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span><br />
|
132 |
+
<?php endforeach; ?>
|
133 |
+
</small>
|
134 |
+
<?php endif; ?>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
138 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
139 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
140 |
+
</div>
|
141 |
+
<?php endif; ?>
|
142 |
+
<?php endif; ?>
|
143 |
+
</td>
|
144 |
+
<?php endif; ?>
|
145 |
+
<td class="a-center"><?php echo $_item->getQty() ?></td>
|
146 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
147 |
+
<td class="a-right">
|
148 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
149 |
+
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
150 |
+
<?php else: ?>
|
151 |
+
<span class="cart-price">
|
152 |
+
<?php endif; ?>
|
153 |
+
|
154 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
155 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
156 |
+
<?php else: ?>
|
157 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
158 |
+
<?php endif; ?>
|
159 |
+
|
160 |
+
</span>
|
161 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
162 |
+
|
163 |
+
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
164 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
165 |
+
<small>
|
166 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
167 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
168 |
+
<?php endforeach; ?>
|
169 |
+
</small>
|
170 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
171 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
172 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
173 |
+
<?php endforeach; ?>
|
174 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
175 |
+
<small>
|
176 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
177 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
178 |
+
<?php endforeach; ?>
|
179 |
+
</small>
|
180 |
+
<?php endif; ?>
|
181 |
+
</div>
|
182 |
+
|
183 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
184 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
185 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
186 |
+
</div>
|
187 |
+
<?php endif; ?>
|
188 |
+
<?php endif; ?>
|
189 |
+
</td>
|
190 |
+
<?php endif; ?>
|
191 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
192 |
+
<td>
|
193 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
194 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
195 |
+
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
196 |
+
<?php else: ?>
|
197 |
+
<span class="cart-price">
|
198 |
+
<?php endif; ?>
|
199 |
+
|
200 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
201 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
202 |
+
<?php else: ?>
|
203 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
204 |
+
<?php endif; ?>
|
205 |
+
|
206 |
+
</span>
|
207 |
+
|
208 |
+
|
209 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
210 |
+
|
211 |
+
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
212 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
213 |
+
<small>
|
214 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
215 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
216 |
+
<?php endforeach; ?>
|
217 |
+
</small>
|
218 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
219 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
220 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
221 |
+
<?php endforeach; ?>
|
222 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
223 |
+
<small>
|
224 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
225 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
226 |
+
<?php endforeach; ?>
|
227 |
+
</small>
|
228 |
+
<?php endif; ?>
|
229 |
+
</div>
|
230 |
+
|
231 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
232 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
233 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
234 |
+
</div>
|
235 |
+
<?php endif; ?>
|
236 |
+
<?php endif; ?>
|
237 |
+
</td>
|
238 |
+
<?php endif; ?>
|
239 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/onepage/review/totals.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Cart_Totals
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php if ($this->getTotals()): ?>
|
32 |
+
<tfoot>
|
33 |
+
<?php $_colspan = $this->helper('tax')->displayCartBothPrices() ? 5 : 3; ?>
|
34 |
+
<?php echo $this->renderTotals(null, $_colspan); ?>
|
35 |
+
<?php echo $this->renderTotals('footer', $_colspan); ?>
|
36 |
+
<?php if ($this->needDisplayBaseGrandtotal()):?>
|
37 |
+
<tr>
|
38 |
+
<td class="a-right" colspan="<?php echo $_colspan; ?>">
|
39 |
+
<small><?php echo $this->helper('sales')->__('Your credit card will be charged for') ?></small>
|
40 |
+
</td>
|
41 |
+
<td class="a-right">
|
42 |
+
<small><?php echo $this->displayBaseGrandtotal() ?></small>
|
43 |
+
</td>
|
44 |
+
</tr>
|
45 |
+
<?php endif?>
|
46 |
+
</tfoot>
|
47 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/onepage/shipping.phtml
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 action="" id="co-shipping-form">
|
28 |
+
<ul class="form-list">
|
29 |
+
<?php if ($this->customerHasAddresses()): ?>
|
30 |
+
<li class="wide">
|
31 |
+
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
32 |
+
<div class="input-box">
|
33 |
+
<?php echo $this->getAddressesHtmlSelect('shipping') ?>
|
34 |
+
</div>
|
35 |
+
</li>
|
36 |
+
<?php endif ?>
|
37 |
+
<li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
|
38 |
+
<fieldset>
|
39 |
+
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
|
40 |
+
<ul>
|
41 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
|
42 |
+
<li class="fields">
|
43 |
+
<div class="fields">
|
44 |
+
<label for="shipping:company"><?php echo $this->__('Company') ?></label>
|
45 |
+
<div class="input-box">
|
46 |
+
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
51 |
+
<li class="wide">
|
52 |
+
<label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
53 |
+
<div class="input-box">
|
54 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
55 |
+
</div>
|
56 |
+
</li>
|
57 |
+
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
58 |
+
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
59 |
+
<li class="wide">
|
60 |
+
<div class="input-box">
|
61 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
62 |
+
</div>
|
63 |
+
</li>
|
64 |
+
<?php endfor; ?>
|
65 |
+
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
66 |
+
<li class="wide">
|
67 |
+
<label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
|
68 |
+
<div class="input-box">
|
69 |
+
<input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endif; ?>
|
73 |
+
<li class="fields">
|
74 |
+
<div class="field">
|
75 |
+
<label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
76 |
+
<div class="input-box">
|
77 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
<div class="field">
|
81 |
+
<label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
82 |
+
<div class="input-box">
|
83 |
+
<select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
84 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
85 |
+
</select>
|
86 |
+
<script type="text/javascript">
|
87 |
+
//<![CDATA[
|
88 |
+
$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
89 |
+
//]]>
|
90 |
+
</script>
|
91 |
+
<input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
</li>
|
95 |
+
<li class="fields">
|
96 |
+
<div class="field">
|
97 |
+
<label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
98 |
+
<div class="input-box">
|
99 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<div class="field">
|
103 |
+
<label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
104 |
+
<div class="input-box">
|
105 |
+
<?php echo $this->getCountryHtmlSelect('shipping') ?>
|
106 |
+
</div>
|
107 |
+
</div>
|
108 |
+
</li>
|
109 |
+
<li class="fields">
|
110 |
+
<div class="field">
|
111 |
+
<label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
112 |
+
<div class="input-box">
|
113 |
+
<input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<div class="field">
|
117 |
+
<label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
|
118 |
+
<div class="input-box">
|
119 |
+
<input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
</li>
|
123 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
124 |
+
<li class="control">
|
125 |
+
<input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
|
126 |
+
<?php else:?>
|
127 |
+
<li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
|
128 |
+
<?php endif;?>
|
129 |
+
</ul>
|
130 |
+
</fieldset>
|
131 |
+
</li>
|
132 |
+
<li class="control">
|
133 |
+
<input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
|
134 |
+
</li>
|
135 |
+
</ul>
|
136 |
+
<div class="buttons-set" id="shipping-buttons-container">
|
137 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
138 |
+
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
139 |
+
<button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
140 |
+
<span id="shipping-please-wait" class="please-wait" style="display:none;">
|
141 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
142 |
+
</span>
|
143 |
+
</div>
|
144 |
+
</form>
|
145 |
+
<script type="text/javascript">
|
146 |
+
//<![CDATA[
|
147 |
+
var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
|
148 |
+
'<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
|
149 |
+
var shippingForm = new VarienForm('co-shipping-form');
|
150 |
+
shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
|
151 |
+
//shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
152 |
+
$('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
|
153 |
+
|
154 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
|
155 |
+
//]]>
|
156 |
+
</script>
|
app/design/frontend/ma2/default/template/checkout/onepage/shipping_method.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 id="co-shipping-method-form" action="">
|
28 |
+
<div id="checkout-shipping-method-load">
|
29 |
+
<!-- Content loaded dynamically -->
|
30 |
+
</div>
|
31 |
+
<script type="text/javascript">
|
32 |
+
//<![CDATA[
|
33 |
+
var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");
|
34 |
+
//]]>
|
35 |
+
</script>
|
36 |
+
<div id="onepage-checkout-shipping-method-additional-load">
|
37 |
+
<?php echo $this->getChildHtml('additional') ?>
|
38 |
+
</div>
|
39 |
+
<div class="buttons-set" id="shipping-method-buttons-container">
|
40 |
+
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
41 |
+
<button type="button" class="button" onclick="shippingMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
42 |
+
<span id="shipping-method-please-wait" class="please-wait" style="display:none;">
|
43 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
44 |
+
</span>
|
45 |
+
</div>
|
46 |
+
</form>
|
app/design/frontend/ma2/default/template/checkout/onepage/shipping_method/additional.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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->getQuote()->isVirtual()): ?>
|
28 |
+
<?php echo $this->helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?>
|
29 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/onepage/shipping_method/available.phtml
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Onepage_Shipping_Method_Available */ ?>
|
28 |
+
<?php $_shippingRateGroups = $this->getShippingRates(); ?>
|
29 |
+
<?php if (!$_shippingRateGroups): ?>
|
30 |
+
<p><?php echo $this->__('Sorry, no quotes are available for this order at this time.') ?></p>
|
31 |
+
<?php else: ?>
|
32 |
+
<dl class="sp-methods">
|
33 |
+
<?php $shippingCodePrice = array(); ?>
|
34 |
+
<?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
|
35 |
+
<dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt>
|
36 |
+
<dd>
|
37 |
+
<ul>
|
38 |
+
<?php $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate): ?>
|
39 |
+
<?php $shippingCodePrice[] = "'".$_rate->getCode()."':".(float)$_rate->getPrice(); ?>
|
40 |
+
<li>
|
41 |
+
<?php if ($_rate->getErrorMessage()): ?>
|
42 |
+
<ul class="messages"><li class="error-msg"><ul><li><?php echo $this->escapeHtml($_rate->getErrorMessage()) ?></li></ul></li></ul>
|
43 |
+
<?php else: ?>
|
44 |
+
<?php if ($_sole) : ?>
|
45 |
+
<span class="no-display"><input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>" checked="checked" /></span>
|
46 |
+
<?php else: ?>
|
47 |
+
<input name="shipping_method" type="radio" value="<?php echo $_rate->getCode() ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio"/>
|
48 |
+
|
49 |
+
<?php if ($_rate->getCode() === $this->getAddressShippingMethod()): ?>
|
50 |
+
<script type="text/javascript">
|
51 |
+
//<![CDATA[
|
52 |
+
lastPrice = <?php echo (float)$_rate->getPrice(); ?>;
|
53 |
+
//]]>
|
54 |
+
</script>
|
55 |
+
<?php endif; ?>
|
56 |
+
|
57 |
+
<?php endif; ?>
|
58 |
+
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitle()) ?>
|
59 |
+
<?php $_excl = $this->getShippingPrice($_rate->getPrice(), $this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
60 |
+
<?php $_incl = $this->getShippingPrice($_rate->getPrice(), true); ?>
|
61 |
+
<?php echo $_excl; ?>
|
62 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
63 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
64 |
+
<?php endif; ?>
|
65 |
+
</label>
|
66 |
+
<?php endif ?>
|
67 |
+
</li>
|
68 |
+
<?php endforeach; ?>
|
69 |
+
</ul>
|
70 |
+
</dd>
|
71 |
+
<?php endforeach; ?>
|
72 |
+
</dl>
|
73 |
+
<script type="text/javascript">
|
74 |
+
//<![CDATA[
|
75 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
76 |
+
var shippingCodePrice = {<?php echo implode(',',$shippingCodePrice); ?>};
|
77 |
+
<?php endif; ?>
|
78 |
+
|
79 |
+
$$('input[type="radio"][name="shipping_method"]').each(function(el){
|
80 |
+
Event.observe(el, 'click', function(){
|
81 |
+
if (el.checked == true) {
|
82 |
+
var getShippingCode = el.getValue();
|
83 |
+
<?php if (!empty($shippingCodePrice)): ?>
|
84 |
+
var newPrice = shippingCodePrice[getShippingCode];
|
85 |
+
if (!lastPrice) {
|
86 |
+
lastPrice = newPrice;
|
87 |
+
quoteBaseGrandTotal += newPrice;
|
88 |
+
}
|
89 |
+
if (newPrice != lastPrice) {
|
90 |
+
quoteBaseGrandTotal += (newPrice-lastPrice);
|
91 |
+
lastPrice = newPrice;
|
92 |
+
}
|
93 |
+
<?php endif; ?>
|
94 |
+
checkQuoteBaseGrandTotal = quoteBaseGrandTotal;
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
});
|
98 |
+
});
|
99 |
+
//]]>
|
100 |
+
</script>
|
101 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/checkout/success.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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="page-title">
|
28 |
+
<h1><?php echo $this->__('Your order has been received.') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
31 |
+
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
|
32 |
+
|
33 |
+
<?php if ($this->getOrderId()):?>
|
34 |
+
<?php if ($this->getCanViewOrder()) :?>
|
35 |
+
<p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
|
36 |
+
<?php else :?>
|
37 |
+
<p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
|
38 |
+
<?php endif;?>
|
39 |
+
<p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
|
40 |
+
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
|
41 |
+
<p>
|
42 |
+
<?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
|
43 |
+
<?php echo $this->getChildHtml() ?>
|
44 |
+
</p>
|
45 |
+
<?php endif;?>
|
46 |
+
<?php endif;?>
|
47 |
+
|
48 |
+
<?php if ($this->getAgreementRefId()): ?>
|
49 |
+
<p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
|
50 |
+
<?php endif;?>
|
51 |
+
|
52 |
+
<?php if ($profiles = $this->getRecurringProfiles()):?>
|
53 |
+
<p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
|
54 |
+
<ul class="disc">
|
55 |
+
<?php foreach($profiles as $profile):?>
|
56 |
+
<?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
|
57 |
+
<li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
|
58 |
+
<?php endforeach;?>
|
59 |
+
</ul>
|
60 |
+
<?php endif;?>
|
61 |
+
|
62 |
+
<div class="buttons-set">
|
63 |
+
<button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
|
64 |
+
</div>
|
app/design/frontend/ma2/default/template/checkout/total/default.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 |
+
<tr>
|
28 |
+
<td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
|
29 |
+
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
|
30 |
+
<?php echo $this->escapeHtml($this->getTotal()->getTitle()); ?>
|
31 |
+
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
|
32 |
+
</td>
|
33 |
+
<td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
|
34 |
+
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
|
35 |
+
<?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
|
36 |
+
<?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
|
37 |
+
</td>
|
38 |
+
</tr>
|
app/design/frontend/ma2/default/template/checkout/total/nominal.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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_Checkout_Block_Total_Nominal
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<tr>
|
33 |
+
<th colspan="<?php echo $this->getColspan() + 1; ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right">
|
34 |
+
<?php echo sprintf(($this->getRenderingArea() == $this->getTotalArea()) ? '<strong>%s</strong>' : '%s', $this->escapeHtml($this->getTotalTitle())) ?>
|
35 |
+
</th>
|
36 |
+
</tr>
|
37 |
+
<?php foreach ($this->getTotalItems() as $i => $item): ?>
|
38 |
+
<?php foreach ($this->getTotalItemDetails($item) as $j => $row):?>
|
39 |
+
<tr class="summary-details <?php echo "summary-details-nominal-{$i}" . (0 == $j ? ' summary-details-first' : '') . ($this->getItemDetailsRowIsCompounded($row) ? '' : ' summary-details-excluded')?>" style="display:none;">
|
40 |
+
<td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>" class="a-right">
|
41 |
+
<?php echo $this->escapeHtml($this->getItemDetailsRowLabel($row)) ?>
|
42 |
+
</td>
|
43 |
+
<td class="a-right">
|
44 |
+
<?php echo $this->formatPrice($this->getItemDetailsRowAmount($row)) ?>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
<?php endforeach; ?>
|
48 |
+
<tr class="summary-total" onclick="expandDetails(this, '<?php echo ".summary-details-nominal-{$i}"?>')">
|
49 |
+
<td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotalStyle() ?>">
|
50 |
+
<div class="summary-collapse"><?php echo $this->escapeHtml($this->getItemName($item)); ?></div>
|
51 |
+
</td>
|
52 |
+
<td class="a-right">
|
53 |
+
<?php echo $this->helper('checkout')->formatPrice($this->getItemRowTotal($item)) ?>
|
54 |
+
</td>
|
55 |
+
</tr>
|
56 |
+
<?php endforeach; ?>
|
app/design/frontend/ma2/default/template/checkout/total/tax.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 base_default
|
23 |
+
* @copyright Copyright (c) 2013 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 global $taxIter; $taxIter++; ?>
|
28 |
+
<?php if ($this->helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?>
|
29 |
+
<?php $isTop = 1; ?>
|
30 |
+
<?php foreach ($this->getTotal()->getFullInfo() as $info): ?>
|
31 |
+
<?php if (isset($info['hidden']) && $info['hidden']) continue; ?>
|
32 |
+
<?php $percent = $info['percent']; ?>
|
33 |
+
<?php $amount = $info['amount']; ?>
|
34 |
+
<?php $rates = $info['rates']; ?>
|
35 |
+
<?php $isFirst = 1; ?>
|
36 |
+
|
37 |
+
<?php foreach ($rates as $rate): ?>
|
38 |
+
<tr class="summary-details-<?php echo $taxIter; ?> summary-details<?php if ($isTop): echo ' summary-details-first'; endif; ?>" style="display:none;">
|
39 |
+
<td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>" colspan="<?php echo $this->getColspan(); ?>">
|
40 |
+
<?php echo $this->escapeHtml($rate['title']); ?>
|
41 |
+
<?php if (!is_null($rate['percent'])): ?>
|
42 |
+
(<?php echo (float)$rate['percent']; ?>%)
|
43 |
+
<?php endif; ?>
|
44 |
+
<br />
|
45 |
+
</td>
|
46 |
+
<?php if ($isFirst): ?>
|
47 |
+
<td rowspan="<?php echo count($rates); ?>" class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>">
|
48 |
+
<?php echo $this->helper('checkout')->formatPrice($amount); ?>
|
49 |
+
</td>
|
50 |
+
<?php endif; ?>
|
51 |
+
</tr>
|
52 |
+
<?php $isFirst = 0; ?>
|
53 |
+
<?php $isTop = 0; ?>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
<?php endforeach; ?>
|
56 |
+
<?php endif;?>
|
57 |
+
<tr<?php if ($this->helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="summary-total" onclick="expandDetails(this, '.summary-details-<?php echo $taxIter;?>')"<?php endif; ?>>
|
58 |
+
<td class="a-right" colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>">
|
59 |
+
<?php if ($this->helper('tax')->displayFullSummary()): ?>
|
60 |
+
<div class="summary-collapse"><?php echo $this->getTotal()->getTitle() ?></div>
|
61 |
+
<?php else: ?>
|
62 |
+
<?php echo $this->getTotal()->getTitle() ?>
|
63 |
+
<?php endif;?>
|
64 |
+
</td>
|
65 |
+
<td class="a-right" style="<?php echo $this->getTotal()->getStyle() ?>">
|
66 |
+
<strong><?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?></strong>
|
67 |
+
</td>
|
68 |
+
</tr>
|
app/design/frontend/ma2/default/template/cms/content.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 base_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 $pageData->getPageContent(); ?>
|
app/design/frontend/ma2/default/template/cms/content_heading.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 base_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($_heading = $this->getContentHeading()): ?>
|
28 |
+
<div class="page-title">
|
29 |
+
<h1><?php echo $_heading; ?></h1>
|
30 |
+
</div>
|
31 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/cms/default/home.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 base_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 |
+
There was no Home CMS page configured or found.
|
app/design/frontend/ma2/default/template/cms/default/no-route.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 base_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 |
+
There was no 404 CMS page configured or found.
|
app/design/frontend/ma2/default/template/cms/meta.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 base_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($pageData->getPageMetaKeywords()): ?>
|
28 |
+
<meta name="keywords" content="<?php echo $pageData->getPageMetaKeywords() ?>" />
|
29 |
+
<?php endif; ?>
|
30 |
+
<?php if($pageData->getPageMetaDescription()): ?>
|
31 |
+
<meta name="description" content="<?php echo $pageData->getPageMetaDescription() ?>" />
|
32 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/cms/widget/link/link_block.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 base_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 |
+
<li class="widget widget-cms-link-block"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></li>
|
app/design/frontend/ma2/default/template/cms/widget/link/link_inline.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 base_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 |
+
<li class="widget widget-cms-link-inline"><a <?php echo $this->getLinkAttributes() ?>><span><?php echo $this->htmlEscape($this->getAnchorText()) ?></span></a></li>
|
app/design/frontend/ma2/default/template/cms/widget/static_block/default.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 base_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="widget widget-static-block">
|
28 |
+
<div class="widget-i">
|
29 |
+
<!--<h3><?php //echo $this->getTitle(); ?></h3>-->
|
30 |
+
<?php echo $this->getText(); ?>
|
31 |
+
</div>
|
32 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2featureproducts/featuredproducts.phtml
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_productCollection = $this->getFeaturedProductCollection();
|
10 |
+
$_helper = $this->helper('catalog/output');
|
11 |
+
|
12 |
+
//$_color_title_box = $this->getColorTitleBoxListProduct();
|
13 |
+
//var_dump($_color_title_box);
|
14 |
+
|
15 |
+
?>
|
16 |
+
<div class="products-right">
|
17 |
+
<h2 class="heading-box-product">
|
18 |
+
<span style="font-size: 26px; font-family: Myriad Pro;">
|
19 |
+
<span <?php //echo $_color_title_box; ?>>Featured Products</span>
|
20 |
+
</span>
|
21 |
+
</h2>
|
22 |
+
</div>
|
23 |
+
<?php if(!$_productCollection->count()): ?>
|
24 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
25 |
+
<?php else: ?>
|
26 |
+
<div class="category-products">
|
27 |
+
<?php
|
28 |
+
//OMG&VDH extension
|
29 |
+
//echo $_numberaction.' - OMG&VDH extension';
|
30 |
+
//echo $str_apply.' - OMG&VDH extension: '.$str_appl;
|
31 |
+
|
32 |
+
?>
|
33 |
+
<?php //if($_productCollection->count() >= $_numberaction){ ?>
|
34 |
+
<?php //echo $this->getToolbarHtml() ?>
|
35 |
+
<?php
|
36 |
+
//}
|
37 |
+
?>
|
38 |
+
<?php // List mode ?>
|
39 |
+
<?php if($this->getMode()!='grid'): ?>
|
40 |
+
<?php $_iterator = 0; ?>
|
41 |
+
<ol class="products-list" id="products-list">
|
42 |
+
|
43 |
+
<?php //foreach ($_productCollection->clear()->setPageSize($_numberaction)->load() as $_product): ?>
|
44 |
+
<?php foreach ($_productCollection as $_product): ?>
|
45 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
46 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
47 |
+
<div class="title-product">
|
48 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
49 |
+
</div>
|
50 |
+
<?php // Product Image ?>
|
51 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
52 |
+
<?php // Product description ?>
|
53 |
+
<div class="product-shop">
|
54 |
+
<div class="f-fix-widget">
|
55 |
+
|
56 |
+
<?php if($_product->getRatingSummary()): ?>
|
57 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
58 |
+
<?php endif; ?>
|
59 |
+
<?php
|
60 |
+
/** Omg Price **/
|
61 |
+
|
62 |
+
echo $this->getPriceHtml($_product, true);
|
63 |
+
|
64 |
+
?>
|
65 |
+
<?php if($_product->isSaleable()): ?>
|
66 |
+
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
67 |
+
<?php else: ?>
|
68 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
69 |
+
<?php endif; ?>
|
70 |
+
|
71 |
+
<div class="desc std">
|
72 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
73 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
|
77 |
+
<ul class="add-to-links">
|
78 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
79 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
80 |
+
<?php endif; ?>
|
81 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
82 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
83 |
+
<?php endif; ?>
|
84 |
+
</ul>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
</li>
|
88 |
+
<?php endforeach; ?>
|
89 |
+
</ol>
|
90 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
91 |
+
|
92 |
+
<?php else: ?>
|
93 |
+
|
94 |
+
<?php // Grid Mode ?>
|
95 |
+
|
96 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
97 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
98 |
+
<?php
|
99 |
+
|
100 |
+
?>
|
101 |
+
<?php //$i=0; foreach ($_productCollection->clear()->setPageSize($_numberaction)->load() as $_product): ?>
|
102 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
103 |
+
<?php if ($i++%$_columnCount==0): ?>
|
104 |
+
<ul class="products-grid">
|
105 |
+
<?php endif ?>
|
106 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
107 |
+
|
108 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
109 |
+
<div class="title-product">
|
110 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
111 |
+
</div>
|
112 |
+
<?php if ($_product->getShortDescription()): ?>
|
113 |
+
<div class="short-description">
|
114 |
+
<div class="std">
|
115 |
+
<?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description'); ?>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
<?php endif;?>
|
119 |
+
<div class="border-style"></div>
|
120 |
+
<?php if($_product->getRatingSummary()): ?>
|
121 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short'); ?>
|
122 |
+
<?php endif; ?>
|
123 |
+
<div class="part1-price">
|
124 |
+
<?php
|
125 |
+
/** Omg Price **/
|
126 |
+
|
127 |
+
echo $this->getPriceHtml($_product, true);
|
128 |
+
?>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
<div class="actions">
|
132 |
+
<div class="part2-addtocart">
|
133 |
+
<?php if($_product->isSaleable()): ?>
|
134 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button><br /><br />
|
135 |
+
<?php else: ?>
|
136 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
139 |
+
<div class="part3-detail">
|
140 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>" class="btn-detail">DETAIL</a>
|
141 |
+
</div>
|
142 |
+
<!--
|
143 |
+
<ul class="add-to-links">
|
144 |
+
<?php //if ($this->helper('wishlist')->isAllow()) : ?>
|
145 |
+
<li><a href="<?php //echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php //echo $this->__('Add to Wishlist') ?></a></li>
|
146 |
+
<?php //endif; ?>
|
147 |
+
<?php //if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
148 |
+
<li><span class="separator">|</span> <a href="<?php //echo $_compareUrl ?>" class="link-compare"><?php //echo $this->__('Add to Compare') ?></a></li>
|
149 |
+
<?php //endif; ?>
|
150 |
+
</ul>-->
|
151 |
+
</div>
|
152 |
+
</li>
|
153 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
154 |
+
</ul>
|
155 |
+
<?php endif ?>
|
156 |
+
<?php endforeach ?>
|
157 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
158 |
+
<?php endif; ?>
|
159 |
+
<div class="toolbar-bottom">
|
160 |
+
<?php echo $this->getToolbarHtml() ?>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/ma2slideshow/slideshow.phtml
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<?php if(count($items)) : ?>
|
3 |
+
<div id="ma2-slideshow" class="ma2-slideshow protoshow" style="height: <?php echo $options->slide_height; ?>px">
|
4 |
+
<ul class="show" style="height: <?php echo $options->slide_height; ?>px">
|
5 |
+
<?php foreach ($items as $item) : ?>
|
6 |
+
<li class="slide">
|
7 |
+
<img class="img-slide" src="<?php echo Mage::getBaseUrl('media').'ma2slideshow/'.$item->getFilename(); ?>" >
|
8 |
+
<?php if($options->display_title == 1 && $options->display_content == 1) : ?>
|
9 |
+
<div class="item-desc">
|
10 |
+
<?php if($options->display_title == 1) : ?>
|
11 |
+
<h1 class="title"><a href="<?php echo $item->getSlideshowUrl() ?>" target="_blank"><?php echo $item->getTitle(); ?></a></h1>
|
12 |
+
<?php endif; ?>
|
13 |
+
<?php if($options->display_content == 1) : ?>
|
14 |
+
<div class="item-content"><?php echo $item->getContent(); ?></div>
|
15 |
+
<?php endif; ?>
|
16 |
+
</div>
|
17 |
+
<?php endif; ?>
|
18 |
+
</li>
|
19 |
+
<?php endforeach; ?>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
<?php
|
23 |
+
$auto_play = ($options->auto_play == 1) ? 'true' : 'false';
|
24 |
+
$navigation = ($options->navigation == 1) ? 'true' : 'false';
|
25 |
+
$controls = ($options->controls == 1) ? 'true' : 'false';
|
26 |
+
$pauseOnHover = ($options->pauseOnHover == 1) ? 'true' : 'false';
|
27 |
+
?>
|
28 |
+
<script type="text/javascript">
|
29 |
+
<!--
|
30 |
+
Event.observe(window, "load", function() {
|
31 |
+
//ma2_js
|
32 |
+
var slideWidth = $('ma2-slideshow').getWidth();
|
33 |
+
$$('.show .slide').each(function(element){
|
34 |
+
element.setStyle({
|
35 |
+
width : slideWidth + 'px'
|
36 |
+
});
|
37 |
+
});
|
38 |
+
//options
|
39 |
+
$('ma2-slideshow') && $('ma2-slideshow').protoShow({
|
40 |
+
interval : <?php echo intval($options->interval); ?>,
|
41 |
+
autoPlay : <?php echo $auto_play; ?>,
|
42 |
+
transitionType : "<?php echo $options->transitionType; ?>",
|
43 |
+
transitionTime : <?php echo $options->transitionTime; ?>,
|
44 |
+
manTransitionTime : <?php echo $options->manTransitionTime; ?>,
|
45 |
+
navigation : <?php echo $navigation; ?>,
|
46 |
+
controls : <?php echo $controls; ?>,
|
47 |
+
stopText : "||",
|
48 |
+
playText : ">",
|
49 |
+
pauseOnHover : <?php echo $pauseOnHover; ?>
|
50 |
+
});
|
51 |
+
});
|
52 |
+
-->
|
53 |
+
</script>
|
54 |
+
<?php endif; ?>
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/default.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block bestselling-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_bestsellingCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_bestsellingCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_bestsellingCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_bestsellingCollection->count();
|
79 |
+
$_columnCount = $params->bestselling_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_bestsellingCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/template1.phtml
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block bestselling-products">
|
12 |
+
<div class="block-title">
|
13 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
14 |
+
</div>
|
15 |
+
<?php if(!$_bestsellingCollection->count()): ?>
|
16 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
17 |
+
<?php else: ?>
|
18 |
+
<div class="block-content">
|
19 |
+
<?php if($params->list_type == 'list'): ?>
|
20 |
+
<?php $_iterator = 0; ?>
|
21 |
+
<ol class="products-list" id="products-list">
|
22 |
+
<?php foreach ($_bestsellingCollection as $_product): ?>
|
23 |
+
<li class="item<?php if( ++$_iterator == sizeof($_bestsellingCollection) ): ?> last<?php endif; ?>">
|
24 |
+
<?php // Product Image ?>
|
25 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
26 |
+
<?php // Product description ?>
|
27 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
28 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
29 |
+
|
30 |
+
<?php if($_product->getRatingSummary()): ?>
|
31 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
32 |
+
<?php endif; ?>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
if($params->show_price == 1)
|
36 |
+
{
|
37 |
+
echo $this->getPriceHtml($_product, true);
|
38 |
+
} ?>
|
39 |
+
|
40 |
+
<div style="clear: both;"></div>
|
41 |
+
<?php if($params->show_short_description == 1) : ?>
|
42 |
+
<div class="desc std">
|
43 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
44 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
47 |
+
|
48 |
+
<?php if($params->show_addtocart == 1) : ?>
|
49 |
+
<div class="actions">
|
50 |
+
<?php if($_product->isSaleable()): ?>
|
51 |
+
<button type="button" title="<?php echo $this->__('') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('') ?></span></span></button>
|
52 |
+
<?php else: ?>
|
53 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
54 |
+
<?php endif; ?>
|
55 |
+
</div>
|
56 |
+
<?php endif; ?>
|
57 |
+
</li>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</ol>
|
60 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
61 |
+
|
62 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
63 |
+
<?php // Grid Mode
|
64 |
+
$_collectionSize = $_bestsellingCollection->count();
|
65 |
+
$_columnCount = $params->bestselling_products_per_row;
|
66 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
67 |
+
$i = 0;
|
68 |
+
?>
|
69 |
+
<?php foreach ($_bestsellingCollection as $_product) : ?>
|
70 |
+
<?php if ($i++%$_columnCount==0): ?>
|
71 |
+
<ul class="products-grid">
|
72 |
+
<?php endif ?>
|
73 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
74 |
+
<div class="product-image">
|
75 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
76 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
77 |
+
</a>
|
78 |
+
</div>
|
79 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
80 |
+
<?php
|
81 |
+
if($params->show_price == 1)
|
82 |
+
{
|
83 |
+
echo $this->getPriceHtml($_product, true);
|
84 |
+
} ?>
|
85 |
+
<?php if($params->show_addtocart == 1) : ?>
|
86 |
+
<div class="actions">
|
87 |
+
<?php if($_product->isSaleable()): ?>
|
88 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
89 |
+
<?php else: ?>
|
90 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
91 |
+
<?php endif; ?>
|
92 |
+
<ul class="add-to-links">
|
93 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
94 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
97 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
98 |
+
<?php endif; ?>
|
99 |
+
</ul>
|
100 |
+
</div>
|
101 |
+
<?php endif; ?>
|
102 |
+
<?php if($params->show_short_description == 1) : ?>
|
103 |
+
<div class="desc std">
|
104 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
105 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
106 |
+
</div>
|
107 |
+
<?php endif; ?>
|
108 |
+
</li>
|
109 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
110 |
+
</ul>
|
111 |
+
<?php endif ?>
|
112 |
+
<?php endforeach ?>
|
113 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
114 |
+
<?php endif; ?>
|
115 |
+
<div class="toolbar-bottom">
|
116 |
+
<?php echo $this->getToolbarHtml();?>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
<?php endif; ?>
|
120 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/bestselling/template2.phtml
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block bestselling-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_bestsellingCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_bestsellingCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_bestsellingCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_bestsellingCollection->count();
|
79 |
+
$_columnCount = $params->bestselling_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_bestsellingCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
<?php //product percent sale-off
|
94 |
+
$firstPrice = (float)$_product->getPrice();
|
95 |
+
$finalPrice = (float)$_product->getFinalPrice();
|
96 |
+
if ($firstPrice != $finalPrice) :
|
97 |
+
if ($finalPrice < $firstPrice) {
|
98 |
+
$percent = (($firstPrice - $finalPrice)/$firstPrice) * 100;
|
99 |
+
} elseif ($finalPrice > $firstPrice) {
|
100 |
+
$percent = (($finalPrice - $firstPrice)/$finalPrice) * 100;
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
<div class="product-sale-off">
|
104 |
+
<span class="sale-off-percent"><?php echo number_format($percent, 0); ?>%</span>
|
105 |
+
<span class="sale-off-label"><?php echo $this->__('Sale <br> Off'); ?></span>
|
106 |
+
</div>
|
107 |
+
<?php endif; ?>
|
108 |
+
</div>
|
109 |
+
<div class="product-more">
|
110 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
111 |
+
<?php
|
112 |
+
if($params->show_price == 1)
|
113 |
+
{
|
114 |
+
echo $this->getPriceHtml($_product, true);
|
115 |
+
} ?>
|
116 |
+
<?php if($params->show_addtocart == 1) : ?>
|
117 |
+
<div class="actions">
|
118 |
+
<?php if($_product->isSaleable()): ?>
|
119 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
120 |
+
<?php else: ?>
|
121 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
122 |
+
<?php endif; ?>
|
123 |
+
<ul class="add-to-links">
|
124 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
125 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
128 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
129 |
+
<?php endif; ?>
|
130 |
+
</ul>
|
131 |
+
</div>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php if($params->show_short_description == 1) : ?>
|
134 |
+
<div class="desc std">
|
135 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
136 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
137 |
+
</div>
|
138 |
+
<?php endif; ?>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
</li>
|
142 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
143 |
+
</ul>
|
144 |
+
<?php endif ?>
|
145 |
+
<?php endforeach ?>
|
146 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
147 |
+
<?php endif; ?>
|
148 |
+
<div class="toolbar-bottom">
|
149 |
+
<?php echo $this->getToolbarHtml();?>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
<?php endif; ?>
|
153 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/default.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block custom-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$this->getProductCollection()->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($this->getProductCollection() as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($this->getProductCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $this->getProductCollection()->count();
|
79 |
+
$_columnCount = $params->custom_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($this->getProductCollection() as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/template1.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block custom-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$this->getProductCollection()->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($this->getProductCollection() as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($this->getProductCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $this->getProductCollection()->count();
|
79 |
+
$_columnCount = $params->custom_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($this->getProductCollection() as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/custom/template2.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block custom-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$this->getProductCollection()->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($this->getProductCollection() as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($this->getProductCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $this->getProductCollection()->count();
|
79 |
+
$_columnCount = $params->custom_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($this->getProductCollection() as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/default.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block featured-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_featuredCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_featuredCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_featuredCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_featuredCollection->count();
|
79 |
+
$_columnCount = $params->featured_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_featuredCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/template1.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block featured-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_featuredCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_featuredCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_featuredCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_featuredCollection->count();
|
79 |
+
$_columnCount = $params->featured_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_featuredCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/featured/template2.phtml
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block featured-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_featuredCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_featuredCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_featuredCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_featuredCollection->count();
|
79 |
+
$_columnCount = $params->featured_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_featuredCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
<?php //product percent sale-off
|
94 |
+
$firstPrice = (float)$_product->getPrice();
|
95 |
+
$finalPrice = (float)$_product->getFinalPrice();
|
96 |
+
if ($firstPrice != $finalPrice) :
|
97 |
+
if ($finalPrice < $firstPrice) {
|
98 |
+
$percent = (($firstPrice - $finalPrice)/$firstPrice) * 100;
|
99 |
+
} elseif ($finalPrice > $firstPrice) {
|
100 |
+
$percent = (($finalPrice - $firstPrice)/$finalPrice) * 100;
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
<div class="product-sale-off">
|
104 |
+
<span class="sale-off-percent"><?php echo number_format($percent, 0); ?>%</span>
|
105 |
+
<span class="sale-off-label"><?php echo $this->__('Sale <br> Off'); ?></span>
|
106 |
+
</div>
|
107 |
+
<?php endif; ?>
|
108 |
+
</div>
|
109 |
+
<div class="product-more">
|
110 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
111 |
+
<?php
|
112 |
+
if($params->show_price == 1)
|
113 |
+
{
|
114 |
+
echo $this->getPriceHtml($_product, true);
|
115 |
+
} ?>
|
116 |
+
<?php if($params->show_addtocart == 1) : ?>
|
117 |
+
<div class="actions">
|
118 |
+
<?php if($_product->isSaleable()): ?>
|
119 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
120 |
+
<?php else: ?>
|
121 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
122 |
+
<?php endif; ?>
|
123 |
+
<ul class="add-to-links">
|
124 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
125 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
128 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
129 |
+
<?php endif; ?>
|
130 |
+
</ul>
|
131 |
+
</div>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php if($params->show_short_description == 1) : ?>
|
134 |
+
<div class="desc std">
|
135 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
136 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
137 |
+
</div>
|
138 |
+
<?php endif; ?>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
</li>
|
142 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
143 |
+
</ul>
|
144 |
+
<?php endif ?>
|
145 |
+
<?php endforeach ?>
|
146 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
147 |
+
<?php endif; ?>
|
148 |
+
<div class="toolbar-bottom">
|
149 |
+
<?php echo $this->getToolbarHtml();?>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
<?php endif; ?>
|
153 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/new/default.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block new-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_newCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_newCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_newCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_newCollection->count();
|
79 |
+
$_columnCount = $params->new_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_newCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/new/template1.phtml
ADDED
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block new-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_newCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_newCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_newCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_newCollection->count();
|
79 |
+
$_columnCount = $params->new_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_newCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
</div>
|
94 |
+
<div class="product-more">
|
95 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
96 |
+
<?php
|
97 |
+
if($params->show_price == 1)
|
98 |
+
{
|
99 |
+
echo $this->getPriceHtml($_product, true);
|
100 |
+
} ?>
|
101 |
+
<?php if($params->show_addtocart == 1) : ?>
|
102 |
+
<div class="actions">
|
103 |
+
<?php if($_product->isSaleable()): ?>
|
104 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
105 |
+
<?php else: ?>
|
106 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
107 |
+
<?php endif; ?>
|
108 |
+
<ul class="add-to-links">
|
109 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
110 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
111 |
+
<?php endif; ?>
|
112 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
113 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
114 |
+
<?php endif; ?>
|
115 |
+
</ul>
|
116 |
+
</div>
|
117 |
+
<?php endif; ?>
|
118 |
+
<?php if($params->show_short_description == 1) : ?>
|
119 |
+
<div class="desc std">
|
120 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
121 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
122 |
+
</div>
|
123 |
+
<?php endif; ?>
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
</li>
|
127 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
128 |
+
</ul>
|
129 |
+
<?php endif ?>
|
130 |
+
<?php endforeach ?>
|
131 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
132 |
+
<?php endif; ?>
|
133 |
+
<div class="toolbar-bottom">
|
134 |
+
<?php echo $this->getToolbarHtml();?>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgetproductlist/new/template2.phtml
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Featured product list template
|
4 |
+
*
|
5 |
+
* @see Mage_Catalog_Block_Product_List
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
$_helper = $this->helper('catalog/output');
|
10 |
+
?>
|
11 |
+
<div class="widget block new-products">
|
12 |
+
<?php if($params->show_title == 1) : ?>
|
13 |
+
<div class="block-title">
|
14 |
+
<span <?php //echo $_color_title_box; ?>><?php echo $params->widget_title;?></span>
|
15 |
+
</div>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php if(!$_newCollection->count()): ?>
|
18 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
19 |
+
<?php else: ?>
|
20 |
+
<div class="block-content">
|
21 |
+
<?php if($params->list_type == 'list'): ?>
|
22 |
+
<?php $_iterator = 0; ?>
|
23 |
+
<ol class="products-list" id="products-list">
|
24 |
+
<?php foreach ($_newCollection as $_product): ?>
|
25 |
+
<li class="item<?php if( ++$_iterator == sizeof($_newCollection) ): ?> last<?php endif; ?>">
|
26 |
+
<?php // Product Image ?>
|
27 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
|
28 |
+
<?php // Product description ?>
|
29 |
+
<div class="product-shop">
|
30 |
+
<div class="f-fix">
|
31 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
32 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
33 |
+
|
34 |
+
<?php if($_product->getRatingSummary()): ?>
|
35 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
36 |
+
<?php endif; ?>
|
37 |
+
|
38 |
+
<?php
|
39 |
+
if($params->show_price == 1)
|
40 |
+
{
|
41 |
+
echo $this->getPriceHtml($_product, true);
|
42 |
+
} ?>
|
43 |
+
|
44 |
+
<div style="clear: both;"></div>
|
45 |
+
<?php if($params->show_short_description == 1) : ?>
|
46 |
+
<div class="desc std">
|
47 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
48 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
49 |
+
</div>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if($params->show_addtocart == 1) : ?>
|
53 |
+
<div class="actions">
|
54 |
+
<?php if($_product->isSaleable()): ?>
|
55 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
56 |
+
<?php else: ?>
|
57 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<ul class="add-to-links">
|
60 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
61 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
62 |
+
<?php endif; ?>
|
63 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
64 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
65 |
+
<?php endif; ?>
|
66 |
+
</ul>
|
67 |
+
</div>
|
68 |
+
<?php endif; ?>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
75 |
+
|
76 |
+
<?php elseif($params->list_type == 'grid'): ?>
|
77 |
+
<?php // Grid Mode
|
78 |
+
$_collectionSize = $_newCollection->count();
|
79 |
+
$_columnCount = $params->new_products_per_row;
|
80 |
+
$pwidth = ' width' . floor (100 / $_columnCount);
|
81 |
+
$i = 0;
|
82 |
+
?>
|
83 |
+
<?php foreach ($_newCollection as $_product) : ?>
|
84 |
+
<?php if ($i++%$_columnCount==0): ?>
|
85 |
+
<ul class="products-grid">
|
86 |
+
<?php endif ?>
|
87 |
+
<li class="<?php echo $pwidth; ?> item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
88 |
+
<div class="spacer">
|
89 |
+
<div class="product-image">
|
90 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
91 |
+
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158); ?>" width="158" height="158" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
92 |
+
</a>
|
93 |
+
<?php //product percent sale-off
|
94 |
+
$firstPrice = (float)$_product->getPrice();
|
95 |
+
$finalPrice = (float)$_product->getFinalPrice();
|
96 |
+
if ($firstPrice != $finalPrice) :
|
97 |
+
if ($finalPrice < $firstPrice) {
|
98 |
+
$percent = (($firstPrice - $finalPrice)/$firstPrice) * 100;
|
99 |
+
} elseif ($finalPrice > $firstPrice) {
|
100 |
+
$percent = (($finalPrice - $firstPrice)/$finalPrice) * 100;
|
101 |
+
}
|
102 |
+
?>
|
103 |
+
<div class="product-sale-off">
|
104 |
+
<span class="sale-off-percent"><?php echo number_format($percent, 0); ?>%</span>
|
105 |
+
<span class="sale-off-label"><?php echo $this->__('Sale <br> Off'); ?></span>
|
106 |
+
</div>
|
107 |
+
<?php endif; ?>
|
108 |
+
</div>
|
109 |
+
<div class="product-more">
|
110 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
111 |
+
<?php
|
112 |
+
if($params->show_price == 1)
|
113 |
+
{
|
114 |
+
echo $this->getPriceHtml($_product, true);
|
115 |
+
} ?>
|
116 |
+
<?php if($params->show_addtocart == 1) : ?>
|
117 |
+
<div class="actions">
|
118 |
+
<?php if($_product->isSaleable()): ?>
|
119 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
120 |
+
<?php else: ?>
|
121 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
122 |
+
<?php endif; ?>
|
123 |
+
<ul class="add-to-links">
|
124 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
125 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
126 |
+
<?php endif; ?>
|
127 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
128 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
129 |
+
<?php endif; ?>
|
130 |
+
</ul>
|
131 |
+
</div>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php if($params->show_short_description == 1) : ?>
|
134 |
+
<div class="desc std">
|
135 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
136 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
137 |
+
</div>
|
138 |
+
<?php endif; ?>
|
139 |
+
</div>
|
140 |
+
</div>
|
141 |
+
</li>
|
142 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
143 |
+
</ul>
|
144 |
+
<?php endif ?>
|
145 |
+
<?php endforeach ?>
|
146 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
147 |
+
<?php endif; ?>
|
148 |
+
<div class="toolbar-bottom">
|
149 |
+
<?php echo $this->getToolbarHtml();?>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
<?php endif; ?>
|
153 |
+
</div>
|
app/design/frontend/ma2/default/template/ma2widgettabs/widgettabs.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $rid = Mage::helper("WidgetTabs")->randomkeys(16);?>
|
2 |
+
<div class="ma2-widgettabs">
|
3 |
+
<dl id="tabsData<?php echo $rid;?>" class="tabsData">
|
4 |
+
<div class="tabs-spacer"></div>
|
5 |
+
<?php foreach($tabsData as $idx => $tab):?>
|
6 |
+
<dt id="tab_<?php echo $idx; ?>" class="tab"><span><?php echo $tab['title'];?></span></dt>
|
7 |
+
<dd id="tab_<?php echo $idx; ?>_contents" class="tab-container">
|
8 |
+
<div class="tab-content">
|
9 |
+
<?php
|
10 |
+
|
11 |
+
echo Mage::helper('cms')->getBlockTemplateProcessor()->filter($tab['text']);
|
12 |
+
|
13 |
+
//$wids = Mage::getModel('widget/widget_instance')->load($tab['content'])->getData();
|
14 |
+
|
15 |
+
//echo Mage::app()->getLayout()->createBlock($wids['type'], $rid, $wids['widget_parameters'])->toHtml();
|
16 |
+
//echo "<pre>";
|
17 |
+
//var_dump($wids);
|
18 |
+
// $filter = new Mage_Widget_Model_Template_Filter();
|
19 |
+
// $_widget = $filter->filter('{{widget type="'.$wids->getType().'" template="'.$page_template.'"}}');
|
20 |
+
|
21 |
+
// echo $_widget;
|
22 |
+
|
23 |
+
// <block type="cms/widget_block" name="19490c4181744bbc9a1a5b50ca8cb710" template="cms/widget/static_block/default.phtml"><action method="setData"><name>block_id</name><value>9</value></action></block>
|
24 |
+
|
25 |
+
//Mage::helper('cms')->getBlockTemplateProcessor()->filter('');
|
26 |
+
//echo $this->getLayout()->createBlock($wids->getType())->setTemplate($page_template)->setPageId($page_id)->toHtml();
|
27 |
+
|
28 |
+
//echo $this->getLayout()->createBlock($wids['type'])->setTemplate($wids['page_groups'][0]['page_template'])->setPageId($wids['page_groups'][0]['page_id'])->toHtml();
|
29 |
+
?>
|
30 |
+
</div>
|
31 |
+
</dd>
|
32 |
+
<?php endforeach;?>
|
33 |
+
|
34 |
+
</dl>
|
35 |
+
</div>
|
36 |
+
<script type="text/javascript">
|
37 |
+
//<![CDATA[
|
38 |
+
var Ma2Tabs<?php echo $rid;?> = new Ma2All.Tabs('tabsData<?php echo $rid;?>');
|
39 |
+
Event.observe(window, 'load', function() {
|
40 |
+
Ma2Tabs<?php echo $rid;?>.select();
|
41 |
+
});
|
42 |
+
//]]>
|
43 |
+
</script>
|
app/design/frontend/ma2/default/template/page/1column.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
|
38 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
39 |
+
<div class="wrapper">
|
40 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
41 |
+
<div class="page">
|
42 |
+
<?php echo $this->getChildHtml('header') ?>
|
43 |
+
<div class="main col1-layout">
|
44 |
+
<div class="container">
|
45 |
+
<?php echo $this->getChildHtml('breadcrumbs') ?>
|
46 |
+
<?php echo $this->getChildHtml('maintopBlock1') ?>
|
47 |
+
<?php echo $this->getChildHtml('maintopBlock2') ?>
|
48 |
+
<?php echo $this->getChildHtml('maintopBlock3') ?>
|
49 |
+
<div class="col-content">
|
50 |
+
<?php echo $this->getChildHtml('global_messages') ?>
|
51 |
+
<?php echo $this->getChildHtml('content') ?>
|
52 |
+
</div>
|
53 |
+
<?php echo $this->getChildHtml('bottomBlock1') ?>
|
54 |
+
<?php echo $this->getChildHtml('bottomBlock2') ?>
|
55 |
+
<?php echo $this->getChildHtml('bottomBlock3') ?>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
<?php echo $this->getChildHtml('footer') ?>
|
59 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
63 |
+
</body>
|
64 |
+
</html>
|
app/design/frontend/ma2/default/template/page/2columns-left.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
|
38 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
39 |
+
<div class="wrapper">
|
40 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
41 |
+
<div class="page">
|
42 |
+
<?php echo $this->getChildHtml('header') ?>
|
43 |
+
<div class="main col2-left-layout">
|
44 |
+
<div class="container">
|
45 |
+
<?php echo $this->getChildHtml('breadcrumbs') ?>
|
46 |
+
<?php echo $this->getChildHtml('maintopBlock1') ?>
|
47 |
+
<?php echo $this->getChildHtml('maintopBlock2') ?>
|
48 |
+
<?php echo $this->getChildHtml('maintopBlock3') ?>
|
49 |
+
<div class="content">
|
50 |
+
<div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
|
51 |
+
<div class="col-content">
|
52 |
+
<?php echo $this->getChildHtml('global_messages') ?>
|
53 |
+
<?php echo $this->getChildHtml('content') ?>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<?php echo $this->getChildHtml('bottomBlock1') ?>
|
57 |
+
<?php echo $this->getChildHtml('bottomBlock2') ?>
|
58 |
+
<?php echo $this->getChildHtml('bottomBlock3') ?>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
<?php echo $this->getChildHtml('footer') ?>
|
62 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
66 |
+
</body>
|
67 |
+
</html>
|
app/design/frontend/ma2/default/template/page/2columns-right.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
|
38 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
39 |
+
<div class="wrapper">
|
40 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
41 |
+
<div class="page">
|
42 |
+
<?php echo $this->getChildHtml('header') ?>
|
43 |
+
<div class="main col2-right-layout">
|
44 |
+
<div class="container">
|
45 |
+
<?php echo $this->getChildHtml('breadcrumbs') ?>
|
46 |
+
<?php echo $this->getChildHtml('maintopBlock1') ?>
|
47 |
+
<?php echo $this->getChildHtml('maintopBlock2') ?>
|
48 |
+
<?php echo $this->getChildHtml('maintopBlock3') ?>
|
49 |
+
<div class="content">
|
50 |
+
<div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
|
51 |
+
<div class="col-content">
|
52 |
+
<?php echo $this->getChildHtml('global_messages') ?>
|
53 |
+
<?php echo $this->getChildHtml('content') ?>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<?php echo $this->getChildHtml('bottomBlock1') ?>
|
57 |
+
<?php echo $this->getChildHtml('bottomBlock2') ?>
|
58 |
+
<?php echo $this->getChildHtml('bottomBlock3') ?>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
<?php echo $this->getChildHtml('footer') ?>
|
62 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
66 |
+
</body>
|
67 |
+
</html>
|
app/design/frontend/ma2/default/template/page/3columns.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
|
38 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
39 |
+
<div class="wrapper">
|
40 |
+
<?php echo $this->getChildHtml('global_notices') ?>
|
41 |
+
<div class="page">
|
42 |
+
<?php echo $this->getChildHtml('header') ?>
|
43 |
+
<div class="main col3-layout">
|
44 |
+
<div class="container">
|
45 |
+
<?php echo $this->getChildHtml('breadcrumbs') ?>
|
46 |
+
<?php echo $this->getChildHtml('maintopBlock1') ?>
|
47 |
+
<?php echo $this->getChildHtml('maintopBlock2') ?>
|
48 |
+
<?php echo $this->getChildHtml('maintopBlock3') ?>
|
49 |
+
<div class="content">
|
50 |
+
<div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
|
51 |
+
<div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
|
52 |
+
<div class="col-content">
|
53 |
+
<?php echo $this->getChildHtml('global_messages') ?>
|
54 |
+
<?php echo $this->getChildHtml('content') ?>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<?php echo $this->getChildHtml('bottomBlock1') ?>
|
58 |
+
<?php echo $this->getChildHtml('bottomBlock2') ?>
|
59 |
+
<?php echo $this->getChildHtml('bottomBlock3') ?>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<?php echo $this->getChildHtml('footer') ?>
|
63 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
67 |
+
</body>
|
68 |
+
</html>
|
app/design/frontend/ma2/default/template/page/empty.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body class="page-empty <?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
|
38 |
+
<div>
|
39 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
40 |
+
<?php echo $this->getChildHtml('global_messages') ?>
|
41 |
+
<?php echo $this->getChildHtml('content') ?>
|
42 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
43 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
44 |
+
</div>
|
45 |
+
</body>
|
46 |
+
</html>
|
app/design/frontend/ma2/default/template/page/html/bottomBlock1.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="bottomBlock1">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
//$blocks_per_row = Mage::getStoreConfig('theme_juno_config/juno_layout/bottombox1_col');
|
35 |
+
if (count($blocks) > 1) {
|
36 |
+
$width = ' width'.floor(100/count($blocks));
|
37 |
+
} else {
|
38 |
+
$width = ' width100';
|
39 |
+
}
|
40 |
+
foreach ($blocks as $block){
|
41 |
+
if ($i == 1) {
|
42 |
+
$class = ' first';
|
43 |
+
} else if ($i == count($blocks)) {
|
44 |
+
$class = ' last';
|
45 |
+
} else {
|
46 |
+
$class = '';
|
47 |
+
}
|
48 |
+
//$block->setClass('widgetBlock');
|
49 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
50 |
+
$i++;
|
51 |
+
}
|
52 |
+
//echo $this->getChildHtml()
|
53 |
+
?>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/bottomBlock2.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
|
31 |
+
/* $count1 = 0;
|
32 |
+
foreach ($blocks as $block){
|
33 |
+
if($block->_parentBlock->_nameInLayout == $this->_nameInLayout)
|
34 |
+
$count1 ++;
|
35 |
+
} */
|
36 |
+
?>
|
37 |
+
<div class="bottomBlock2">
|
38 |
+
<?php
|
39 |
+
$i = 1;
|
40 |
+
if (count($blocks) > 1) {
|
41 |
+
$width = ' width'.floor(100/count($blocks));
|
42 |
+
} else {
|
43 |
+
$width = ' width100';
|
44 |
+
}
|
45 |
+
foreach ($blocks as $block){
|
46 |
+
if ($i == 1) {
|
47 |
+
$class = ' first';
|
48 |
+
} else if ($i == count($blocks)) {
|
49 |
+
$class = ' last';
|
50 |
+
} else {
|
51 |
+
$class = '';
|
52 |
+
}
|
53 |
+
//$block->setClass('widgetBlock');
|
54 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
55 |
+
$i++;
|
56 |
+
}
|
57 |
+
//echo $this->getChildHtml()
|
58 |
+
?>
|
59 |
+
</div>
|
60 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/bottomBlock3.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="bottomBlock3">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
if (count($blocks) > 1) {
|
35 |
+
$width = ' width'.floor(100/count($blocks));
|
36 |
+
} else {
|
37 |
+
$width = ' width100';
|
38 |
+
}
|
39 |
+
foreach ($blocks as $block){
|
40 |
+
if ($i == 1) {
|
41 |
+
$class = ' first';
|
42 |
+
} else if ($i == count($blocks)) {
|
43 |
+
$class = ' last';
|
44 |
+
} else {
|
45 |
+
$class = '';
|
46 |
+
}
|
47 |
+
//$block->setClass('widgetBlock');
|
48 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
49 |
+
$i++;
|
50 |
+
}
|
51 |
+
//echo $this->getChildHtml()
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/breadcrumbs.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 base_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($crumbs && is_array($crumbs)): ?>
|
28 |
+
<div class="breadcrumbs">
|
29 |
+
<ul>
|
30 |
+
<?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?>
|
31 |
+
<li class="<?php echo $_crumbName ?>">
|
32 |
+
<?php if($_crumbInfo['link']): ?>
|
33 |
+
<a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a>
|
34 |
+
<?php elseif($_crumbInfo['last']): ?>
|
35 |
+
<strong><?php echo $this->htmlEscape($_crumbInfo['label']) ?></strong>
|
36 |
+
<?php else: ?>
|
37 |
+
<?php echo $this->htmlEscape($_crumbInfo['label']) ?>
|
38 |
+
<?php endif; ?>
|
39 |
+
<?php if(!$_crumbInfo['last']): ?>
|
40 |
+
<span>/ </span>
|
41 |
+
<?php endif; ?>
|
42 |
+
</li>
|
43 |
+
<?php endforeach; ?>
|
44 |
+
</ul>
|
45 |
+
</div>
|
46 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/footer.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 base_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="footer">
|
28 |
+
<div class="container">
|
29 |
+
<?php echo $this->getChildHtml() ?>
|
30 |
+
</div>
|
31 |
+
</div>
|
app/design/frontend/ma2/default/template/page/html/footerBlock1.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 base_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 |
+
$blocks = $this->getChild();
|
30 |
+
if(count($blocks) > 0) :
|
31 |
+
?>
|
32 |
+
<div class="footerBlock1">
|
33 |
+
<?php
|
34 |
+
$i = 1;
|
35 |
+
if (count($blocks) > 1) {
|
36 |
+
$width = ' width'.floor(100/count($blocks));
|
37 |
+
} else {
|
38 |
+
$width = ' width100';
|
39 |
+
}
|
40 |
+
foreach ($blocks as $block){
|
41 |
+
if ($i == 1) {
|
42 |
+
$class = ' first';
|
43 |
+
} else if ($i == count($blocks)) {
|
44 |
+
$class = ' last';
|
45 |
+
} else {
|
46 |
+
$class = '';
|
47 |
+
}
|
48 |
+
//$block->setClass('widgetBlock');
|
49 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
50 |
+
$i++;
|
51 |
+
}
|
52 |
+
//echo $this->getChildHtml()
|
53 |
+
?>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/footerBlock2.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="footerBlock2">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
if (count($blocks) > 1) {
|
35 |
+
$width = ' width'.floor(100/count($blocks));
|
36 |
+
} else {
|
37 |
+
$width = ' width100';
|
38 |
+
}
|
39 |
+
foreach ($blocks as $block){
|
40 |
+
if ($i == 1) {
|
41 |
+
$class = ' first';
|
42 |
+
} else if ($i == count($blocks)) {
|
43 |
+
$class = ' last';
|
44 |
+
} else {
|
45 |
+
$class = '';
|
46 |
+
}
|
47 |
+
//$block->setClass('widgetBlock');
|
48 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
49 |
+
$i++;
|
50 |
+
}
|
51 |
+
//echo $this->getChildHtml()
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/head.phtml
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
// Ma2 ThemeOptions config
|
27 |
+
$gfontCss = array();
|
28 |
+
$valueFields = array();
|
29 |
+
$themeOptions = Mage::getStoreConfig('theme_options');
|
30 |
+
if (isset($themeOptions)) {
|
31 |
+
foreach ($themeOptions as $group_key=>$group)
|
32 |
+
{
|
33 |
+
foreach ($group as $key=>$field)
|
34 |
+
{
|
35 |
+
$valueFields[$key] = $field;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$themeOptions = json_decode(json_encode($valueFields));
|
40 |
+
//media URL
|
41 |
+
$mediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
42 |
+
/**
|
43 |
+
*Typography - body font config
|
44 |
+
*/
|
45 |
+
$body_change = '';
|
46 |
+
if($themeOptions->body_font_family_change == 1)
|
47 |
+
{
|
48 |
+
$body_font_family = explode(':', $themeOptions->body_font_family);
|
49 |
+
|
50 |
+
if(isset($body_font_family[0]) && isset($body_font_family[1]) && $body_font_family[0] == 'w')
|
51 |
+
{
|
52 |
+
$body_change .= 'font-family:"'.str_replace('+', ' ',$body_font_family[1]).'";';
|
53 |
+
$gfontCss[] = $body_font_family[1];
|
54 |
+
|
55 |
+
}
|
56 |
+
else
|
57 |
+
{
|
58 |
+
$body_change .= 'font-family:'.str_replace(array('s:','w:', '+'), array('','',' '), $themeOptions->body_font_family).';';
|
59 |
+
}
|
60 |
+
}
|
61 |
+
if(trim($themeOptions->body_font_size) != null)
|
62 |
+
{
|
63 |
+
$body_change .= 'font-size: '.$themeOptions->body_font_size.';';
|
64 |
+
}
|
65 |
+
if($themeOptions->body_text_color_change == 1)
|
66 |
+
{
|
67 |
+
$body_change .= 'color:'.$themeOptions->body_text_color.';';
|
68 |
+
}
|
69 |
+
if(trim($themeOptions->body_line_height) != null)
|
70 |
+
{
|
71 |
+
$body_change .= 'line-height: '.$themeOptions->body_line_height.';';
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
*Typography - custom font-family
|
76 |
+
*/
|
77 |
+
if ($themeOptions->is_custom_font_1 == 1 && trim($themeOptions->custom_list_1) != null)
|
78 |
+
{
|
79 |
+
$custom_font_family_1 = explode(':', $themeOptions->custom_font_family_1);
|
80 |
+
|
81 |
+
if(isset($custom_font_family_1[0]) && isset($custom_font_family_1[1]) && $custom_font_family_1[0] == 'w')
|
82 |
+
{
|
83 |
+
$custom_list_1 = $themeOptions->custom_list_1 .'{font-family:"'.str_replace('+',' ',$custom_font_family_1[1]).'";}';
|
84 |
+
$gfontCss[] = $custom_font_family_1[1];
|
85 |
+
}
|
86 |
+
else
|
87 |
+
{
|
88 |
+
$custom_list_1 = $themeOptions->custom_list_1 .'{font-family:'.str_replace(array('s:','w:'), '', $themeOptions->custom_font_family_1).';}';
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
if ($themeOptions->is_custom_font_2 == 1 && trim($themeOptions->custom_list_2) != null)
|
93 |
+
{
|
94 |
+
$custom_font_family_2 = explode(':', $themeOptions->custom_font_family_2);
|
95 |
+
|
96 |
+
if(isset($custom_font_family_2[0]) && isset($custom_font_family_2[1]) && $custom_font_family_2[0] == 'w')
|
97 |
+
{
|
98 |
+
$custom_list_2 = $themeOptions->custom_list_2 .'{font-family:"'.str_replace('+',' ',$custom_font_family_2[1]).'";}';
|
99 |
+
$gfontCss[] = $custom_font_family_2[1];
|
100 |
+
}
|
101 |
+
else
|
102 |
+
{
|
103 |
+
$custom_list_2 = $themeOptions->custom_list_2 .'{font-family:'.str_replace(array('s:','w:'), '', $themeOptions->custom_font_family_2).';}';
|
104 |
+
}
|
105 |
+
}
|
106 |
+
/**
|
107 |
+
*Typography - custom css
|
108 |
+
*/
|
109 |
+
if ($themeOptions->is_custom_css == 1 && trim($themeOptions->custom_css) != null)
|
110 |
+
{
|
111 |
+
$custom_css = $themeOptions->custom_css;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
*Background - body config
|
116 |
+
*/
|
117 |
+
if($themeOptions->body_background_change == 1)
|
118 |
+
{
|
119 |
+
if($themeOptions->body_background_color_change == 1 && $themeOptions->body_background_image != '')
|
120 |
+
{
|
121 |
+
$body_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->body_background_image .'") '. $themeOptions->body_background_image_repeat .' '. $themeOptions->body_background_image_position .' '.$themeOptions->body_background_color .';';
|
122 |
+
|
123 |
+
}
|
124 |
+
else if ($themeOptions->body_background_color_change == 1 && $themeOptions->body_background_image == '')
|
125 |
+
{
|
126 |
+
$body_change .= 'background:'.$themeOptions->body_background_color .';';
|
127 |
+
|
128 |
+
}
|
129 |
+
else if ($themeOptions->body_background_color_change == 0 && $themeOptions->body_background_image != '')
|
130 |
+
{
|
131 |
+
$body_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->body_background_image .'") '. $themeOptions->body_background_image_repeat .' '. $themeOptions->body_background_image_position .';';
|
132 |
+
}
|
133 |
+
}
|
134 |
+
/**
|
135 |
+
*Background - header config
|
136 |
+
*/
|
137 |
+
$header_change = '';
|
138 |
+
if($themeOptions->header_background_change == 1)
|
139 |
+
{
|
140 |
+
if($themeOptions->header_background_color_change == 1 && $themeOptions->header_background_image != '')
|
141 |
+
{
|
142 |
+
$header_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->header_background_image .'") '. $themeOptions->header_background_image_repeat .' '. $themeOptions->header_background_image_position .' '.$themeOptions->header_background_color .';';
|
143 |
+
|
144 |
+
}
|
145 |
+
else if ($themeOptions->header_background_color_change == 1 && $themeOptions->header_background_image == '')
|
146 |
+
{
|
147 |
+
$header_change .= 'background:'.$themeOptions->header_background_color .';';
|
148 |
+
|
149 |
+
}
|
150 |
+
else if ($themeOptions->header_background_color_change == 0 && $themeOptions->header_background_image != '')
|
151 |
+
{
|
152 |
+
$header_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->header_background_image .'") '. $themeOptions->header_background_image_repeat .' '. $themeOptions->header_background_image_position .';';
|
153 |
+
}
|
154 |
+
}
|
155 |
+
/**
|
156 |
+
*Background - main config
|
157 |
+
*/
|
158 |
+
$main_change = '';
|
159 |
+
if($themeOptions->main_background_change == 1)
|
160 |
+
{
|
161 |
+
if($themeOptions->main_background_color_change == 1 && $themeOptions->main_background_image != '')
|
162 |
+
{
|
163 |
+
$main_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->main_background_image .'") '. $themeOptions->main_background_image_repeat .' '. $themeOptions->main_background_image_position .' '.$themeOptions->main_background_color .';';
|
164 |
+
|
165 |
+
}
|
166 |
+
else if ($themeOptions->main_background_color_change == 1 && $themeOptions->main_background_image == '')
|
167 |
+
{
|
168 |
+
$main_change .= 'background:'.$themeOptions->main_background_color .';';
|
169 |
+
|
170 |
+
}
|
171 |
+
else if ($themeOptions->main_background_color_change == 0 && $themeOptions->main_background_image != '')
|
172 |
+
{
|
173 |
+
$main_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->main_background_image .'") '. $themeOptions->main_background_image_repeat .' '. $themeOptions->main_background_image_position .';';
|
174 |
+
}
|
175 |
+
}
|
176 |
+
/**
|
177 |
+
*Background - footer config
|
178 |
+
*/
|
179 |
+
$footer_change = '';
|
180 |
+
if($themeOptions->footer_background_change == 1)
|
181 |
+
{
|
182 |
+
if($themeOptions->footer_background_color_change == 1 && $themeOptions->footer_background_image != '')
|
183 |
+
{
|
184 |
+
$footer_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->footer_background_image .'") '. $themeOptions->footer_background_image_repeat .' '. $themeOptions->footer_background_image_position .' '.$themeOptions->footer_background_color .';';
|
185 |
+
|
186 |
+
}
|
187 |
+
else if ($themeOptions->footer_background_color_change == 1 && $themeOptions->footer_background_image == '')
|
188 |
+
{
|
189 |
+
$footer_change .= 'background:'.$themeOptions->footer_background_color .';';
|
190 |
+
|
191 |
+
}
|
192 |
+
else if ($themeOptions->footer_background_color_change == 0 && $themeOptions->footer_background_image != '')
|
193 |
+
{
|
194 |
+
$footer_change .= 'background: url("'. $mediaUrl .'/ma2/images/'. $themeOptions->footer_background_image .'") '. $themeOptions->footer_background_image_repeat .' '. $themeOptions->footer_background_image_position .';';
|
195 |
+
}
|
196 |
+
}
|
197 |
+
/**
|
198 |
+
*Layouts - theme width
|
199 |
+
*/
|
200 |
+
$theme_width = '';
|
201 |
+
if(trim($themeOptions->theme_width) != '')
|
202 |
+
{
|
203 |
+
$theme_width .= 'width:'. $themeOptions->theme_width .';';
|
204 |
+
}
|
205 |
+
/**
|
206 |
+
*Layouts - left width
|
207 |
+
*/
|
208 |
+
$left_width = '';
|
209 |
+
if(trim($themeOptions->left_width) != '')
|
210 |
+
{
|
211 |
+
$left_width .= 'width:'. $themeOptions->left_width .';';
|
212 |
+
}
|
213 |
+
/**
|
214 |
+
*Layouts - right width
|
215 |
+
*/
|
216 |
+
$right_width = '';
|
217 |
+
if(trim($themeOptions->right_width) != '')
|
218 |
+
{
|
219 |
+
$right_width .= 'width:'. $themeOptions->right_width .';';
|
220 |
+
}
|
221 |
+
?>
|
222 |
+
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
|
223 |
+
<title><?php echo $this->getTitle() ?></title>
|
224 |
+
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
|
225 |
+
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
|
226 |
+
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
|
227 |
+
<?php if($themeOptions->favicon != '') : ?>
|
228 |
+
<link rel="icon" href="<?php echo $mediaUrl.'ma2/images/'.$themeOptions->favicon; ?>" type="image/x-icon" />
|
229 |
+
<link rel="shortcut icon" href="<?php echo $mediaUrl.'ma2/images/'.$themeOptions->favicon; ?>" type="image/x-icon" />
|
230 |
+
<?php else: ?>
|
231 |
+
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
|
232 |
+
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
|
233 |
+
<?php endif; ?>
|
234 |
+
<?php if(!empty($gfontCss)) : ?>
|
235 |
+
<link type="text/css" href="//fonts.googleapis.com/css?family=<?php echo implode('|',$gfontCss) ?>" rel="stylesheet">
|
236 |
+
<?php endif; ?>
|
237 |
+
<!--[if lt IE 7]>
|
238 |
+
<script type="text/javascript">
|
239 |
+
//<![CDATA[
|
240 |
+
var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
|
241 |
+
var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
|
242 |
+
//]]>
|
243 |
+
</script>
|
244 |
+
<![endif]-->
|
245 |
+
<?php echo $this->getCssJsHtml() ?>
|
246 |
+
<?php echo $this->getChildHtml() ?>
|
247 |
+
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
|
248 |
+
<?php echo $this->getIncludes() ?>
|
249 |
+
<?php
|
250 |
+
$_session = Mage::getSingleton('core/session');
|
251 |
+
$_post = Mage::app()->getRequest()->getPost();
|
252 |
+
if ($_post['submit_preset'] == 1 && $_post['params_demo_preset'] != '') {
|
253 |
+
$_session->setData('presetstyle', $_post['params_demo_preset']);
|
254 |
+
}
|
255 |
+
$presetstyle = Mage::getSingleton('core/session')->getData('presetstyle');
|
256 |
+
if(!isset($presetstyle) || empty($presetstyle)) $presetstyle = $themeOptions->preset_styles; ?>
|
257 |
+
<link href="<?php echo $this->getSkinUrl().'css/'. $presetstyle .'.css'; ?>" type="text/css" rel="stylesheet">
|
258 |
+
|
259 |
+
<?php
|
260 |
+
// Ma2 ThemeOptions apply styles
|
261 |
+
echo
|
262 |
+
'<style type="text/css">'.
|
263 |
+
'body{'.$body_change.'}'.
|
264 |
+
'div.header{'.$header_change .'}'.
|
265 |
+
'div.main{'.$main_change .'}'.
|
266 |
+
'div.footer{'.$footer_change .'}'.
|
267 |
+
$custom_list_1.
|
268 |
+
$custom_list_2.
|
269 |
+
$custom_css.
|
270 |
+
'div.container{'.$theme_width.'}'.
|
271 |
+
'div.left_width{'.$left_width.'}'.
|
272 |
+
'div.right_width{'.$right_width.'}'.
|
273 |
+
'</style>'
|
274 |
+
?>
|
app/design/frontend/ma2/default/template/page/html/header.phtml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 Mage_Page_Block_Html_Header $this
|
28 |
+
*/
|
29 |
+
$mediaUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
|
30 |
+
$generalOptions = json_decode(json_encode(Mage::getStoreConfig('theme_options/general')));
|
31 |
+
|
32 |
+
if ( $generalOptions->is_custom_logo == 1 && $generalOptions->logo_image != '' ) {
|
33 |
+
$logoSrc = $mediaUrl.'ma2/images/'.$generalOptions->logo_image;
|
34 |
+
|
35 |
+
//logo width
|
36 |
+
$logoWidth = ( trim($generalOptions->logo_width) != '' && intval($generalOptions->logo_width) > 0 ) ? 'width="'. $generalOptions->logo_width .'"' : '';
|
37 |
+
|
38 |
+
//logo height
|
39 |
+
$logoHeight = ( trim($generalOptions->logo_height) != '' && intval($generalOptions->logo_height) > 0 ) ? 'height="'. $generalOptions->logo_height .'"' : '';
|
40 |
+
}
|
41 |
+
else
|
42 |
+
{
|
43 |
+
//$logoSrc = $this->getLogoSrc();
|
44 |
+
$logoSrc = $mediaUrl.'ma2/images/'.$generalOptions->default_logo_image;
|
45 |
+
}
|
46 |
+
$slogan = trim($generalOptions->slogan) != '' ? $generalOptions->slogan : $this->getLogoAlt();
|
47 |
+
?>
|
48 |
+
<div class="header">
|
49 |
+
<?php echo $this->getChildHtml('presetStylesBox'); ?>
|
50 |
+
<div class="container">
|
51 |
+
<?php if ($this->getIsHomePage()):?>
|
52 |
+
<h1 class="logo"><strong><?php echo $slogan ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $slogan ?>" class="logo"><img src="<?php echo $logoSrc ?>" <?php echo $logoWidth; ?> <?php echo $logoHeight; ?> alt="<?php echo $slogan ?>" /></a></h1>
|
53 |
+
<?php else:?>
|
54 |
+
<a href="<?php echo $this->getUrl('') ?>" title="<?php echo $slogan ?>" class="logo"><strong><?php echo $slogan ?></strong><img src="<?php echo $logoSrc ?>" <?php echo $logoWidth; ?> <?php echo $logoHeight; ?> alt="<?php echo $slogan ?>" /></a>
|
55 |
+
<?php endif?>
|
56 |
+
|
57 |
+
<div class="blocks">
|
58 |
+
<div class="top1">
|
59 |
+
<?php echo $this->getChildHtml('topBlock1') ?>
|
60 |
+
</div>
|
61 |
+
<div class="top2">
|
62 |
+
<?php echo $this->getChildHtml('topBlock2') ?>
|
63 |
+
<div class="quick-access">
|
64 |
+
<span class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></span>
|
65 |
+
<?php echo $this->getChildHtml('topLinks') ?>
|
66 |
+
<?php echo $this->getChildHtml('store_language') ?>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
<?php echo $this->getChildHtml('topMenu') ?>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
</div>
|
app/design/frontend/ma2/default/template/page/html/maintopBlock1.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="maintopBlock1">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
if (count($blocks) > 1) {
|
35 |
+
$width = ' width'.floor(100/count($blocks));
|
36 |
+
} else {
|
37 |
+
$width = ' width100';
|
38 |
+
}
|
39 |
+
foreach ($blocks as $block){
|
40 |
+
if ($i == 1) {
|
41 |
+
$class = ' first';
|
42 |
+
} else if ($i == count($blocks)) {
|
43 |
+
$class = ' last';
|
44 |
+
} else {
|
45 |
+
$class = '';
|
46 |
+
}
|
47 |
+
//$block->setClass('widgetBlock');
|
48 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
49 |
+
$i++;
|
50 |
+
}
|
51 |
+
//echo $this->getChildHtml()
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/maintopBlock2.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="maintopBlock2">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
if (count($blocks) > 1) {
|
35 |
+
$width = ' width'.floor(100/count($blocks));
|
36 |
+
} else {
|
37 |
+
$width = ' width100';
|
38 |
+
}
|
39 |
+
foreach ($blocks as $block){
|
40 |
+
if ($i == 1) {
|
41 |
+
$class = ' first';
|
42 |
+
} else if ($i == count($blocks)) {
|
43 |
+
$class = ' last';
|
44 |
+
} else {
|
45 |
+
$class = '';
|
46 |
+
}
|
47 |
+
//$block->setClass('widgetBlock');
|
48 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
49 |
+
$i++;
|
50 |
+
}
|
51 |
+
//echo $this->getChildHtml()
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/maintopBlock3.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 base_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 |
+
$blocks = $this->getChild();
|
29 |
+
if(count($blocks) > 0) :
|
30 |
+
?>
|
31 |
+
<div class="maintopBlock3">
|
32 |
+
<?php
|
33 |
+
$i = 1;
|
34 |
+
if (count($blocks) > 1) {
|
35 |
+
$width = ' width'.floor(100/count($blocks));
|
36 |
+
} else {
|
37 |
+
$width = ' width100';
|
38 |
+
}
|
39 |
+
foreach ($blocks as $block){
|
40 |
+
if ($i == 1) {
|
41 |
+
$class = ' first';
|
42 |
+
} else if ($i == count($blocks)) {
|
43 |
+
$class = ' last';
|
44 |
+
} else {
|
45 |
+
$class = '';
|
46 |
+
}
|
47 |
+
//$block->setClass('widgetBlock');
|
48 |
+
echo '<div class="widget-block'.$width.''.$class.'">'.$block->toHtml().'</div>';
|
49 |
+
$i++;
|
50 |
+
}
|
51 |
+
//echo $this->getChildHtml()
|
52 |
+
?>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/notices.phtml
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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_Page_Block_Html_Notices
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if ($this->displayNoscriptNotice()): ?>
|
33 |
+
<noscript>
|
34 |
+
<div class="global-site-notice noscript">
|
35 |
+
<div class="notice-inner">
|
36 |
+
<p>
|
37 |
+
<strong><?php echo $this->__('JavaScript seems to be disabled in your browser.'); ?></strong><br />
|
38 |
+
<?php echo $this->__('You must have JavaScript enabled in your browser to utilize the functionality of this website.'); ?>
|
39 |
+
</p>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</noscript>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php if ($this->displayDemoNotice()): ?>
|
45 |
+
<div class="global-site-notice demo-notice">
|
46 |
+
<div class="notice-inner"><p><?php echo $this->__('This is a demo store. Any orders placed through this store will not be honored or fulfilled.') ?></p></div>
|
47 |
+
</div>
|
48 |
+
<?php endif; ?>
|
49 |
+
<?php if (Mage::helper('core/cookie')->isUserNotAllowSaveCookie()): ?>
|
50 |
+
<div class="global-site-notice notice-cookie" id="notice-cookie-block" style="display: none">
|
51 |
+
<div class="notice-inner">
|
52 |
+
<p><?php echo $this->__('This website requires cookies to provide all of its features. For more information on what data is contained in the cookies, please see our <a href="%s">Privacy Policy page</a>. To accept cookies from this site, please click the Allow button below.', $this->getPrivacyPolicyLink()) ?></p>
|
53 |
+
<div class="actions"><button class="button" onclick="allowSaveCookie()"><span><span><?php echo $this->__('Allow');?></span></span></button></div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<script type="text/javascript">
|
57 |
+
/* <![CDATA[ */
|
58 |
+
function allowSaveCookie() {
|
59 |
+
Mage.Cookies.set('<?php echo Mage_Core_Helper_Cookie::IS_USER_ALLOWED_SAVE_COOKIE; ?>', '<?php echo Mage::helper('core/cookie')->getAcceptedSaveCookiesWebsiteIds()?>', new Date(new Date().getTime() + <?php echo Mage::helper('core/cookie')->getCookieRestrictionLifetime() ?> * 1000));
|
60 |
+
if (Mage.Cookies.get('<?php echo Mage_Core_Helper_Cookie::IS_USER_ALLOWED_SAVE_COOKIE; ?>')) {
|
61 |
+
window.location.reload();
|
62 |
+
} else {
|
63 |
+
window.location.href = '<?php echo Mage::getUrl('cms/index/noCookies')?>';
|
64 |
+
}
|
65 |
+
}
|
66 |
+
$('notice-cookie-block').show();
|
67 |
+
/* ]]> */
|
68 |
+
</script>
|
69 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/pager.phtml
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 base_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 |
+
* Pager template
|
30 |
+
*
|
31 |
+
* @see Mage_Page_Block_Html_Pager
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if($this->getCollection()->getSize()): ?>
|
35 |
+
|
36 |
+
<?php if($this->getUseContainer()): ?>
|
37 |
+
<div class="pager">
|
38 |
+
<?php endif ?>
|
39 |
+
|
40 |
+
<?php if($this->getShowAmounts()): ?>
|
41 |
+
<p class="amount">
|
42 |
+
<?php if($this->getLastPageNum()>1): ?>
|
43 |
+
<?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
|
44 |
+
<?php else: ?>
|
45 |
+
<strong><?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?></strong>
|
46 |
+
<?php endif; ?>
|
47 |
+
</p>
|
48 |
+
<?php endif ?>
|
49 |
+
|
50 |
+
<?php if($this->getShowPerPage()): ?>
|
51 |
+
<div class="limiter">
|
52 |
+
<label><?php echo $this->__('Show') ?></label>
|
53 |
+
<select onchange="setLocation(this.value)">
|
54 |
+
<?php foreach ($this->getAvailableLimit() as $_key=>$_limit): ?>
|
55 |
+
<option value="<?php echo $this->getLimitUrl($_key) ?>"<?php if($this->isLimitCurrent($_key)): ?> selected="selected"<?php endif ?>>
|
56 |
+
<?php echo $_limit ?>
|
57 |
+
</option>
|
58 |
+
<?php endforeach; ?>
|
59 |
+
</select> <?php echo $this->__('per page') ?>
|
60 |
+
</div>
|
61 |
+
<?php endif ?>
|
62 |
+
|
63 |
+
<?php if($this->getLastPageNum()>1): ?>
|
64 |
+
<div class="pages">
|
65 |
+
<strong><?php echo $this->__('Page:') ?></strong>
|
66 |
+
<ol>
|
67 |
+
<?php if (!$this->isFirstPage()): ?>
|
68 |
+
<li>
|
69 |
+
<a class="previous<?php if(!$this->getAnchorTextForPrevious()): ?> i-previous<?php endif;?>" href="<?php echo $this->getPreviousPageUrl() ?>" title="<?php echo $this->__('Previous') ?>">
|
70 |
+
<?php if(!$this->getAnchorTextForPrevious()): ?>
|
71 |
+
<img src="<?php echo $this->getSkinUrl('images/pagination-prev.png') ?>" alt="<?php echo $this->__('Previous') ?>" class="v-middle" />
|
72 |
+
<?php else: ?>
|
73 |
+
<?php echo $this->getAnchorTextForPrevious() ?>
|
74 |
+
<?php endif;?>
|
75 |
+
</a>
|
76 |
+
</li>
|
77 |
+
<?php endif;?>
|
78 |
+
|
79 |
+
<?php if ($this->canShowFirst()): ?>
|
80 |
+
<li><a class="first" href="<?php echo $this->getFirstPageUrl() ?>">1</a></li>
|
81 |
+
<?php endif;?>
|
82 |
+
|
83 |
+
<?php if ($this->canShowPreviousJump()): ?>
|
84 |
+
<li><a class="previous_jump" title="" href="<?php echo $this->getPreviousJumpUrl() ?>">...</a></li>
|
85 |
+
<?php endif;?>
|
86 |
+
|
87 |
+
<?php foreach ($this->getFramePages() as $_page): ?>
|
88 |
+
<?php if ($this->isPageCurrent($_page)): ?>
|
89 |
+
<li class="current"><?php echo $_page ?></li>
|
90 |
+
<?php else: ?>
|
91 |
+
<li><a href="<?php echo $this->getPageUrl($_page) ?>"><?php echo $_page ?></a></li>
|
92 |
+
<?php endif;?>
|
93 |
+
<?php endforeach;?>
|
94 |
+
|
95 |
+
|
96 |
+
<?php if ($this->canShowNextJump()): ?>
|
97 |
+
<li><a class="next_jump" title="" href="<?php echo $this->getNextJumpUrl() ?>">...</a></li>
|
98 |
+
<?php endif;?>
|
99 |
+
|
100 |
+
<?php if ($this->canShowLast()): ?>
|
101 |
+
<li><a class="last" href="<?php echo $this->getLastPageUrl() ?>"><?php echo $this->getLastPageNum() ?></a></li>
|
102 |
+
<?php endif;?>
|
103 |
+
|
104 |
+
<?php if (!$this->isLastPage()): ?>
|
105 |
+
<li>
|
106 |
+
<a class="next<?php if(!$this->getAnchorTextForNext()): ?> i-next<?php endif; ?>" href="<?php echo $this->getNextPageUrl() ?>" title="<?php echo $this->__('Next') ?>">
|
107 |
+
<?php if(!$this->getAnchorTextForNext()): ?>
|
108 |
+
<img src="<?php echo $this->getSkinUrl('images/pagination-next.png') ?>" alt="<?php echo $this->__('Next') ?>" class="v-middle" />
|
109 |
+
<?php else: ?>
|
110 |
+
<?php echo $this->getAnchorTextForNext() ?>
|
111 |
+
<?php endif;?>
|
112 |
+
</a>
|
113 |
+
</li>
|
114 |
+
<?php endif;?>
|
115 |
+
</ol>
|
116 |
+
|
117 |
+
</div>
|
118 |
+
<?php endif; ?>
|
119 |
+
|
120 |
+
<?php if($this->getUseContainer()): ?>
|
121 |
+
</div>
|
122 |
+
<?php endif ?>
|
123 |
+
|
124 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/page/html/presetstyles.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 base_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 Mage_Page_Block_Html_Header $this
|
28 |
+
*/
|
29 |
+
|
30 |
+
$presetstyle = Mage::getSingleton('core/session')->getData('presetstyle');
|
31 |
+
?>
|
32 |
+
<div id="ma2styles-control-box" style="left: 0px;">
|
33 |
+
<a class="presetstyles-btn" href="javascript:void(0)" title="Choose a preset style"></a>
|
34 |
+
<div id="ma2-theme-styles" style="display: none;">
|
35 |
+
<form id="template_demo" method="POST" action="<?php echo $this->getCurrentUrl(); ?>" name="template_demo">
|
36 |
+
<label id="params_demo_preset-lbl" title="<?php echo $this->__('Choose a preset style'); ?>" for="params_demo_preset"><strong><?php echo $this->__('Choose a preset style'); ?></strong></label>
|
37 |
+
<fieldset id="params_demo_preset" class="radio">
|
38 |
+
<?php
|
39 |
+
$presetstyles = Mage::getModel('ThemeOptions/presetstyles')->toOptionArray();
|
40 |
+
foreach ($presetstyles as $idx=>$_style)
|
41 |
+
{
|
42 |
+
?>
|
43 |
+
<input id="params_demo_preset<?php echo $idx;?>" type="radio" <?php echo ($this->escapeHtml($_style['value']) == $presetstyle) || ($idx == 0) ? 'checked="checked"' : ''; ?> value="<?php echo $this->escapeHtml($_style['value']); ?>" name="params_demo_preset">
|
44 |
+
<label for="params_demo_preset<?php echo $idx;?>"><?php echo $_style['label']; ?></label>
|
45 |
+
<?php } ?>
|
46 |
+
</fieldset>
|
47 |
+
<button class="apply-btn" value="1" name="submit_preset" type="submit">Apply</button>
|
48 |
+
</form>
|
49 |
+
</div>
|
50 |
+
<script type="text/javascript">
|
51 |
+
//<![CDATA[
|
52 |
+
Event.observe(window, 'load', function() {
|
53 |
+
$$('.presetstyles-btn').each(function(element){
|
54 |
+
element.observe('click', function(event){
|
55 |
+
event.stop();
|
56 |
+
Effect.toggle('ma2-theme-styles', 'appear', { duration: 0.4 });
|
57 |
+
});
|
58 |
+
});
|
59 |
+
});
|
60 |
+
//]]>
|
61 |
+
</script>
|
62 |
+
</div>
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
|
app/design/frontend/ma2/default/template/page/html/top.links.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 base_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 |
+
* @deprecated after 1.4.0.1
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php if($toplinks && is_array($toplinks)): ?>
|
33 |
+
<ul class="links">
|
34 |
+
<?php echo $this->getChildHtml() ?>
|
35 |
+
<?php foreach($toplinks as $_toplink): ?>
|
36 |
+
<li<?php if($_toplink['first']||$_toplink['last']): ?> class="<?php if($_toplink['first']): ?>first<?php endif; ?><?php if($_toplink['last']): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_toplink['liParams'] ?>><?php echo $_toplink['beforeText'] ?><a <?php echo $_toplink['aParams'] ?>><?php echo $_toplink['innerText'] ?></a><?php echo $_toplink['afterText'] ?></li>
|
37 |
+
<?php endforeach; ?>
|
38 |
+
</ul>
|
39 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/html/topBlock1.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 base_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->getChildHtml() ?>
|
28 |
+
|
app/design/frontend/ma2/default/template/page/html/topBlock2.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 base_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->getChildHtml() ?>
|
28 |
+
|
app/design/frontend/ma2/default/template/page/html/topMenu.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 base_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 |
+
* Top menu for store
|
30 |
+
*
|
31 |
+
* @see Mage_Page_Block_Html_Topmenu
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php $_menu = $this->getHtml('level-top') ?>
|
35 |
+
<?php if($_menu): ?>
|
36 |
+
<div id="ma2-navMain" class="nav-container ma2-navMain">
|
37 |
+
<ul id="nav" class="navMain">
|
38 |
+
<?php echo $_menu ?>
|
39 |
+
</ul>
|
40 |
+
</div>
|
41 |
+
<?php endif ?>
|
app/design/frontend/ma2/default/template/page/html/wrapper.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 base_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 |
+
* @deprecated after 1.4.0.0-alpha3
|
30 |
+
*/
|
31 |
+
|
32 |
+
/**
|
33 |
+
* This template is for generic wrapper purposes, including ajax.updater loaded blocks
|
34 |
+
*
|
35 |
+
* Usage in layout xml files:
|
36 |
+
* <block type="core/template" template="page/html/wrapper.phtml">
|
37 |
+
* <action method="setId"><id>some-custom-identificator</id></action>
|
38 |
+
*
|
39 |
+
* <!-- optional -->
|
40 |
+
* <action method="setTag"><tag>span</tag></action> <!-- div is used if not specified -->
|
41 |
+
* <action method="setParams"><params>class="custom-class"</params></action>
|
42 |
+
*
|
43 |
+
* <!-- insert wrapped blocks here -->
|
44 |
+
* </block>
|
45 |
+
*/
|
46 |
+
?>
|
47 |
+
<?php $_tag = $this->hasTag() ? $this->getTag() : "div" ?>
|
48 |
+
<<?php echo $_tag?> id="<?php echo $this->getId()?>" <?php echo $this->getParams()?>>
|
49 |
+
<?php echo $this->getChildHtml()?>
|
50 |
+
</<?php echo $_tag?>>
|
app/design/frontend/ma2/default/template/page/js/calendar.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 base_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 |
+
* Calendar localization script. Should be put into page header.
|
30 |
+
*
|
31 |
+
* @see Mage_Core_Block_Html_Calendar
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<script type="text/javascript">
|
36 |
+
//<![CDATA[
|
37 |
+
enUS = <?php echo $enUS?>; // en_US locale reference
|
38 |
+
Calendar._DN = <?php echo $days['wide']?>; // full day names
|
39 |
+
Calendar._SDN = <?php echo $days['abbreviated']?>; // short day names
|
40 |
+
Calendar._FD = <?php echo $firstDay?>; // First day of the week. "0" means display Sunday first, "1" means display Monday first, etc.
|
41 |
+
Calendar._MN = <?php echo $months['wide']?>; // full month names
|
42 |
+
Calendar._SMN = <?php echo $months['abbreviated']?>; // short month names
|
43 |
+
Calendar._am = <?php echo $am ?>; // am/pm
|
44 |
+
Calendar._pm = <?php echo $pm ?>;
|
45 |
+
|
46 |
+
// tooltips
|
47 |
+
Calendar._TT = {};
|
48 |
+
Calendar._TT["INFO"] = "<?php echo $this->jsQuoteEscape( $this->__('About the calendar') );?>";
|
49 |
+
|
50 |
+
Calendar._TT["ABOUT"] =
|
51 |
+
"<?php echo $this->jsQuoteEscape( $this->__('DHTML Date/Time Selector') )?>\n" +
|
52 |
+
"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" +
|
53 |
+
"<?php echo $this->jsQuoteEscape( $this->__('For latest version visit: %s', 'http://www.dynarch.com/projects/calendar/') )?>\n" +
|
54 |
+
"<?php echo $this->jsQuoteEscape( $this->__('Distributed under GNU LGPL. See %s for details.', 'http://gnu.org/licenses/lgpl.html') )?>" +
|
55 |
+
"\n\n" +
|
56 |
+
"<?php echo $this->jsQuoteEscape( $this->__('Date selection:') )?>\n" +
|
57 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- Use the %s, %s buttons to select year', '\\xab', '\xbb') )?>\n" +
|
58 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- Use the %s buttons to select month', '" + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "') )?>\n" +
|
59 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- Hold mouse button on any of the above buttons for faster selection.') )?>";
|
60 |
+
Calendar._TT["ABOUT_TIME"] = "\n\n" +
|
61 |
+
"<?php echo $this->jsQuoteEscape( $this->__('Time selection:') )?>\n" +
|
62 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- Click on any of the time parts to increase it') )?>\n" +
|
63 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- or Shift-click to decrease it') )?>\n" +
|
64 |
+
"<?php echo $this->jsQuoteEscape( $this->__('- or click and drag for faster selection.') )?>";
|
65 |
+
|
66 |
+
Calendar._TT["PREV_YEAR"] = "<?php echo $this->jsQuoteEscape( $this->__('Prev. year (hold for menu)') );?>";
|
67 |
+
Calendar._TT["PREV_MONTH"] = "<?php echo $this->jsQuoteEscape( $this->__('Prev. month (hold for menu)') );?>";
|
68 |
+
Calendar._TT["GO_TODAY"] = "<?php echo $this->jsQuoteEscape( $this->__('Go Today') );?>";
|
69 |
+
Calendar._TT["NEXT_MONTH"] = "<?php echo $this->jsQuoteEscape( $this->__('Next month (hold for menu)') );?>";
|
70 |
+
Calendar._TT["NEXT_YEAR"] = "<?php echo $this->jsQuoteEscape( $this->__('Next year (hold for menu)') );?>";
|
71 |
+
Calendar._TT["SEL_DATE"] = "<?php echo $this->jsQuoteEscape( $this->__('Select date') );?>";
|
72 |
+
Calendar._TT["DRAG_TO_MOVE"] = "<?php echo $this->jsQuoteEscape( $this->__('Drag to move') );?>";
|
73 |
+
Calendar._TT["PART_TODAY"] = ' (' + <?php echo $today ?> + ')';
|
74 |
+
|
75 |
+
// the following is to inform that "%s" is to be the first day of week
|
76 |
+
Calendar._TT["DAY_FIRST"] = "<?php echo $this->jsQuoteEscape( $this->__('Display %s first', '%s') );?>";
|
77 |
+
|
78 |
+
// This may be locale-dependent. It specifies the week-end days, as an array
|
79 |
+
// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1
|
80 |
+
// means Monday, etc.
|
81 |
+
Calendar._TT["WEEKEND"] = <?php echo $weekendDays?>;
|
82 |
+
|
83 |
+
Calendar._TT["CLOSE"] = "<?php echo $this->jsQuoteEscape( $this->__('Close') );?>";
|
84 |
+
Calendar._TT["TODAY"] = <?php echo $today ?>;
|
85 |
+
Calendar._TT["TIME_PART"] = "<?php echo $this->jsQuoteEscape( $this->__('(Shift-)Click or drag to change value') );?>";
|
86 |
+
|
87 |
+
// date formats
|
88 |
+
Calendar._TT["DEF_DATE_FORMAT"] = <?php echo $defaultFormat?>;
|
89 |
+
Calendar._TT["TT_DATE_FORMAT"] = <?php echo $toolTipFormat?>;
|
90 |
+
|
91 |
+
Calendar._TT["WK"] = <?php echo $week ?>;
|
92 |
+
Calendar._TT["TIME"] = "<?php echo $this->jsQuoteEscape( $this->__('Time:') );?>";
|
93 |
+
//]]>
|
94 |
+
</script>
|
app/design/frontend/ma2/default/template/page/js/cookie.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 base_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 |
+
* Cookie settings initialization script
|
30 |
+
*
|
31 |
+
* @see Mage_Page_Block_Js_Cookie
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
|
35 |
+
<script type="text/javascript">
|
36 |
+
//<![CDATA[
|
37 |
+
Mage.Cookies.path = '<?php echo $this->getPath()?>';
|
38 |
+
Mage.Cookies.domain = '<?php echo $this->getDomain()?>';
|
39 |
+
//]]>
|
40 |
+
</script>
|
app/design/frontend/ma2/default/template/page/popup.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body class="page-popup<?php echo $this->getBodyClass()?$this->getBodyClass() : ''?>">
|
38 |
+
<div>
|
39 |
+
<?php echo $this->getChildHtml('after_body_start') ?>
|
40 |
+
<?php echo $this->getChildHtml('content') ?>
|
41 |
+
<?php echo $this->getChildHtml('before_body_end') ?>
|
42 |
+
</div>
|
43 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
44 |
+
</body>
|
45 |
+
</html>
|
app/design/frontend/ma2/default/template/page/print.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 base_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_Page_Block_Html
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
33 |
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
|
34 |
+
<head>
|
35 |
+
<?php echo $this->getChildHtml('head') ?>
|
36 |
+
</head>
|
37 |
+
<body class="page-print<?php echo $this->getBodyClass()?$this->getBodyClass():'' ?>">
|
38 |
+
<div>
|
39 |
+
<div class="print-head">
|
40 |
+
<img src="<?php echo $this->getPrintLogoUrl() ? $this->getPrintLogoUrl() : $this->getSkinUrl('images/logo_print.gif') ?>" class="logo" alt="" />
|
41 |
+
<?php if ($this->getPrintLogoText()):?>
|
42 |
+
<address><?php echo nl2br($this->htmlEscape($this->getPrintLogoText())) ?></address>
|
43 |
+
<?php endif;?>
|
44 |
+
</div>
|
45 |
+
<?php echo $this->getChildHtml('content') ?>
|
46 |
+
<div class="buttons-set">
|
47 |
+
<button type="button" title="<?php echo $this->__('Close Window') ?>" class="button" onclick="window.close();"><span><span><?php echo $this->__('Close Window') ?></span></span></button>
|
48 |
+
</div>
|
49 |
+
<?php echo $this->getAbsoluteFooter() ?>
|
50 |
+
</div>
|
51 |
+
</body>
|
52 |
+
</html>
|
app/design/frontend/ma2/default/template/page/redirect.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 base_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="page-title">
|
28 |
+
<h1><?php echo $this->__('Redirecting...') ?></h1>
|
29 |
+
</div>
|
30 |
+
<?php if($this->getMessage()): ?>
|
31 |
+
<p><?php echo $this->getMessage() ?></p>
|
32 |
+
<?php endif; ?>
|
33 |
+
<?php echo $this->getRedirectOutput() ?>
|
34 |
+
<?php if(!$this->isHtmlFormRedirect()): ?>
|
35 |
+
<p><?php echo $this->__('Click <a href="%s">here</a> if nothing has happened', $this->getTargetURL()) ?></p>
|
36 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/switch/flags.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 base_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(count($this->getStores())>1): ?>
|
28 |
+
<div class="form-language">
|
29 |
+
<label for="select-language"><?php echo $this->__('Your Language:') ?></label>
|
30 |
+
<select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value" class="flags">
|
31 |
+
<?php foreach ($this->getStores() as $_lang): ?>
|
32 |
+
<?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
|
33 |
+
<option value="<?php echo $_lang->getCurrentUrl() ?>" style="background-image:url('<?php echo $this->getSkinUrl('images/flags/flag_'.$_lang->getCode().'.gif') ?>');"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
|
34 |
+
<?php endforeach; ?>
|
35 |
+
</select>
|
36 |
+
</div>
|
37 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/switch/languages.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 base_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 |
+
* Language switcher template
|
30 |
+
*
|
31 |
+
* @see Mage_Page_Block_Switch
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if(count($this->getStores())>1): ?>
|
35 |
+
<div class="form-language">
|
36 |
+
<label for="select-language"><?php echo $this->__('Your Language:') ?></label>
|
37 |
+
<select id="select-language" title="<?php echo $this->__('Your Language') ?>" onchange="window.location.href=this.value">
|
38 |
+
<?php foreach ($this->getStores() as $_lang): ?>
|
39 |
+
<?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
|
40 |
+
<option value="<?php echo $_lang->getCurrentUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_lang->getName()) ?></option>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</select>
|
43 |
+
</div>
|
44 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/switch/stores.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 base_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 |
+
* Store switcher template
|
30 |
+
*
|
31 |
+
* @see Mage_Core_Block_Store_Switcher
|
32 |
+
*/
|
33 |
+
?>
|
34 |
+
<?php if(count($this->getGroups())>1): ?>
|
35 |
+
<div class="store-switcher">
|
36 |
+
<label for="select-store"><?php echo $this->__('Select Store:') ?></label>
|
37 |
+
<select id="select-store" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
|
38 |
+
<?php /*foreach ($this->getStores() as $_store): ?>
|
39 |
+
<option value="<?php echo $_store->getUrl('') ?>"<?php if($_store->getId()==$this->getCurrentStoreId()): ?> selected="selected"<?php endif; ?>><?php echo $_store->getName() ?></option>
|
40 |
+
<?php endforeach;*/ ?>
|
41 |
+
<?php foreach ($this->getGroups() as $_group): ?>
|
42 |
+
<?php $_selected = ($_group->getId()==$this->getCurrentGroupId()) ? ' selected="selected"' : '' ?>
|
43 |
+
<option value="<?php echo $_group->getHomeUrl() ?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($_group->getName()) ?></option>
|
44 |
+
<?php endforeach; ?>
|
45 |
+
</select>
|
46 |
+
</div>
|
47 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/template/container.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 base_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_Page_Block_Template_Container
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<div class="page-title">
|
33 |
+
<h1><?php echo $this->getTitle() ?></h1>
|
34 |
+
</div>
|
35 |
+
<?php echo $this->getChildHtml() ?>
|
app/design/frontend/ma2/default/template/page/template/links.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 base_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_Page_Block_Template_Links
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<?php $_links = $this->getLinks(); ?>
|
33 |
+
<?php if(count($_links)>0): ?>
|
34 |
+
<ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
|
35 |
+
<?php foreach($_links as $_link): ?>
|
36 |
+
<?php if ($_link instanceof Mage_Core_Block_Abstract):?>
|
37 |
+
<?php echo $_link->toHtml() ?>
|
38 |
+
<?php else: ?>
|
39 |
+
<li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
|
40 |
+
<?php endif;?>
|
41 |
+
<?php endforeach; ?>
|
42 |
+
</ul>
|
43 |
+
<?php endif; ?>
|
app/design/frontend/ma2/default/template/page/template/linksblock.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 base_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_Page_Block_Template_Links_Block
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
<li<?php if($this->getIsFirst()||$this->getIsLast()): ?> class="<?php if($this->getIsFirst()): ?>first<?php endif; ?><?php if($this->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $this->getLiParams() ?>><?php echo $this->getBeforeText() ?><a href="<?php echo $this->getLinkUrl() ?>" title="<?php echo $this->getTitle() ?>" <?php echo $this->getAParams() ?>><?php echo $this->getLabel() ?></a><?php echo $this->getAfterText() ?></li>
|
app/etc/modules/Ma2_FeaturedProducts.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Ma2_FeaturedProducts>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Ma2_FeaturedProducts>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Ma2_Slideshow.xml
ADDED
File without changes
|