Version Notes
New: temporary sessions for guest user on cloudservice New: guest connect setup New: designtool button on product list New: flexible size on designtool page New: connection data in backend are visible for administrators
Download this release
Release Info
Developer | Clixmedia GmbH |
Extension | PrintShop_TryOut |
Version | 1.1.5 |
Comparing to | |
See all releases |
Version 1.1.5
- app/code/community/Printshop/Catalog/Block/Catalog/Product/List.php +13 -0
- app/code/community/Printshop/Catalog/Block/Catalog/Product/View.php +13 -0
- app/code/community/Printshop/Catalog/Helper/Product/List.php +8 -0
- app/code/community/Printshop/Catalog/Helper/Product/View.php +8 -0
- app/code/community/Printshop/Catalog/controllers/ProductController.php +116 -0
- app/code/community/Printshop/Catalog/etc/config.xml +48 -0
- app/code/community/Printshop/Checkout/Block/Cart.php +10 -0
- app/code/community/Printshop/Checkout/Block/Onepage/Success.php +257 -0
- app/code/community/Printshop/Checkout/Model/Cart.php +11 -0
- app/code/community/Printshop/Checkout/controllers/CartController.php +128 -0
- app/code/community/Printshop/Checkout/etc/config.xml +57 -0
- app/code/community/Printshop/Page/Block/Html/Head.php +15 -0
- app/code/community/Printshop/Page/etc/config.xml +31 -0
- app/code/community/Printshop/Productpdf/Block/Adminhtml/Sales/Order/View/Tab/Productpdf.php +55 -0
- app/code/community/Printshop/Productpdf/etc/config.xml +37 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct.php +19 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Adminsetup.php +13 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Adminsetup/Tabs.php +45 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit.php +24 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Form.php +19 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Tab/Form.php +23 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Tabs.php +46 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Frontendsetup.php +13 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Frontendsetup/Tabs.php +45 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Grid.php +101 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Guestsetup.php +13 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Guestsetup/Tabs.php +45 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Producttype.php +29 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Renderer/Image.php +23 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Synclog.php +11 -0
- app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Synclog/Tabs.php +46 -0
- app/code/community/Printshop/Syncproduct/Block/Syncproduct.php +12 -0
- app/code/community/Printshop/Syncproduct/Helper/Data.php +67 -0
- app/code/community/Printshop/Syncproduct/Model/Catalog.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Ibrightadmin.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Ibrightfrontend.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Ibrightguest.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Catalog.php +14 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Catalog/Collection.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightadmin.php +14 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightadmin/Collection.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightfrontend.php +14 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightfrontend/Collection.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightguest.php +14 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightguest/Collection.php +12 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Syncproduct.php +22 -0
- app/code/community/Printshop/Syncproduct/Model/Mysql4/Syncproduct/Collection.php +14 -0
- app/code/community/Printshop/Syncproduct/Model/Producttype.php +17 -0
- app/code/community/Printshop/Syncproduct/Model/Resource/Eav/Mysql4/Setup.php +4 -0
- app/code/community/Printshop/Syncproduct/Model/Source/Option.php +6 -0
- app/code/community/Printshop/Syncproduct/Model/Syncproduct.php +12 -0
- app/code/community/Printshop/Syncproduct/controllers/Adminhtml/SyncproductController.php +578 -0
- app/code/community/Printshop/Syncproduct/controllers/IndexController.php +13 -0
- app/code/community/Printshop/Syncproduct/etc/adminhtml.xml +64 -0
- app/code/community/Printshop/Syncproduct/etc/config.xml +107 -0
- app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-install-0.1.0.php +132 -0
- app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-upgrade-0.1.0-0.1.1.php +19 -0
- app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-upgrade-0.1.1-1.1.3.php +30 -0
- app/design/adminhtml/default/default/layout/productpdf.xml +25 -0
- app/design/adminhtml/default/default/layout/syncproduct.xml +46 -0
- app/design/adminhtml/default/default/template/productpdf/sales/order/view/tab/userpdf.phtml +38 -0
- app/design/adminhtml/default/default/template/syncproduct/adminsetup.phtml +51 -0
- app/design/adminhtml/default/default/template/syncproduct/edit.phtml +25 -0
- app/design/adminhtml/default/default/template/syncproduct/frontendsetup.phtml +51 -0
- app/design/adminhtml/default/default/template/syncproduct/guestsetup.phtml +51 -0
- app/design/adminhtml/default/default/template/syncproduct/log.phtml +23 -0
- app/design/frontend/base/default/layout/printshop.xml +85 -0
- app/design/frontend/base/default/layout/printshop_checkout.xml +405 -0
- app/design/frontend/base/default/locale/en_US/translate.csv +7 -0
- app/design/frontend/base/default/template/catalog/catalog.phtml +200 -0
- app/design/frontend/base/default/template/catalog/product/view/printshop_media.phtml +101 -0
- app/design/frontend/base/default/template/catalog/productlist.phtml +237 -0
- app/design/frontend/base/default/template/checkout/cart/item/printshop_default.phtml +291 -0
- app/design/frontend/base/default/template/checkout/printshop_cart.phtml +145 -0
- app/design/frontend/base/default/template/page/html/printshop_head.phtml +68 -0
- app/etc/modules/Printshop_Catalog.xml +9 -0
- app/etc/modules/Printshop_Checkout.xml +9 -0
- app/etc/modules/Printshop_Page.xml +9 -0
- app/etc/modules/Printshop_Productpdf.xml +9 -0
- app/etc/modules/Printshop_Sales.xml +9 -0
- app/etc/modules/Printshop_Syncproduct.xml +9 -0
- app/locale/en_US/template/email/printshop_custom_email1.html +93 -0
- js/web2print/greybox/AJS.js +2 -0
- js/web2print/greybox/AJS_fx.js +2 -0
- js/web2print/greybox/g_close.gif +0 -0
- js/web2print/greybox/gb_scripts.js +2 -0
- js/web2print/greybox/gb_styles.css +148 -0
- js/web2print/greybox/header_bg.gif +0 -0
- js/web2print/greybox/indicator.gif +0 -0
- js/web2print/greybox/loader_frame.html +104 -0
- js/web2print/greybox/next.gif +0 -0
- js/web2print/greybox/prev.gif +0 -0
- js/web2print/greybox/w_close.gif +0 -0
- js/web2print/jquery/jquery-1.6.4.min.js +5 -0
- js/web2print/web2print.js +53 -0
- media/web2print/images/bkg_btn.png +0 -0
- media/web2print/images/bkg_btn_orange.png +0 -0
- media/web2print/images/cross.png +0 -0
- package.xml +18 -0
- skin/frontend/base/default/css/web2print.css +67 -0
app/code/community/Printshop/Catalog/Block/Catalog/Product/List.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product View block
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package Mage_Catalog
|
7 |
+
* @module Catalog
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Printshop_Catalog_Block_Catalog_Product_List extends Mage_Catalog_Block_Product_List
|
11 |
+
{
|
12 |
+
|
13 |
+
}
|
app/code/community/Printshop/Catalog/Block/Catalog/Product/View.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product View block
|
4 |
+
*
|
5 |
+
* @category Mage
|
6 |
+
* @package Mage_Catalog
|
7 |
+
* @module Catalog
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Printshop_Catalog_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
|
11 |
+
{
|
12 |
+
|
13 |
+
}
|
app/code/community/Printshop/Catalog/Helper/Product/List.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Catalog_Helper_Designtool
|
3 |
+
* @category Community
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Catalog_Helper_Product_List extends Mage_Catalog_Helper_Product_List {
|
8 |
+
}
|
app/code/community/Printshop/Catalog/Helper/Product/View.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Catalog_Helper_Designtool
|
3 |
+
* @category Community
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Catalog_Helper_Product_View extends Mage_Catalog_Helper_Product_View {
|
8 |
+
}
|
app/code/community/Printshop/Catalog/controllers/ProductController.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product controller
|
4 |
+
* @category Printshop
|
5 |
+
* @package Printshop_Catalog
|
6 |
+
*/
|
7 |
+
|
8 |
+
require_once "Mage/Catalog/controllers/ProductController.php";
|
9 |
+
class Printshop_Catalog_ProductController extends Mage_Catalog_ProductController {
|
10 |
+
/**
|
11 |
+
* Product save PDF and image preview..
|
12 |
+
*/
|
13 |
+
public function viewAction() {
|
14 |
+
// Get initial data from request
|
15 |
+
$categoryId = (int) $this->getRequest()->getParam('category', false);
|
16 |
+
$productId = (int) $this->getRequest()->getParam('id');
|
17 |
+
$specifyOptions = $this->getRequest()->getParam('options');
|
18 |
+
|
19 |
+
// Prepare helper and params
|
20 |
+
$viewHelper = Mage::helper('catalog/product_view');
|
21 |
+
|
22 |
+
$params = new Varien_Object();
|
23 |
+
$params->setCategoryId($categoryId);
|
24 |
+
$params->setSpecifyOptions($specifyOptions);
|
25 |
+
|
26 |
+
// Render page
|
27 |
+
try {
|
28 |
+
$viewHelper->prepareAndRender($productId, $this, $params);
|
29 |
+
} catch (Exception $e) {
|
30 |
+
if ($e->getCode() == $viewHelper->ERR_NO_PRODUCT_LOADED) {
|
31 |
+
if (isset($_GET['store']) && !$this->getResponse()->isRedirect()) {
|
32 |
+
$this->_redirect('');
|
33 |
+
} elseif (!$this->getResponse()->isRedirect()) {
|
34 |
+
$this->_forward('noRoute');
|
35 |
+
}
|
36 |
+
} else {
|
37 |
+
Mage::logException($e);
|
38 |
+
$this->_forward('noRoute');
|
39 |
+
}
|
40 |
+
}
|
41 |
+
// check if pdf url is set..
|
42 |
+
if($this->getRequest()->getParam('pdfUrl')) {
|
43 |
+
$objIbright = Mage::getModel('syncproduct/ibrightfrontend');
|
44 |
+
$getIbrightDetails = $objIbright->load('1');
|
45 |
+
$frontendUrl = $getIbrightDetails->getIbrightFrontendUrl();
|
46 |
+
$getFrontendUrl = parse_url($frontendUrl);
|
47 |
+
$refUrl = $_SERVER['HTTP_REFERER'];
|
48 |
+
$getReferer = parse_url($refUrl);
|
49 |
+
// check that if referee are coming from ibright server..
|
50 |
+
if($getFrontendUrl['host'] == $getReferer['host']) {
|
51 |
+
|
52 |
+
$objCatlogModel = Mage::getModel('syncproduct/catalog');
|
53 |
+
|
54 |
+
|
55 |
+
// check if user is logged in or not..
|
56 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
57 |
+
$customerId = Mage::getSingleton('customer/session')->getCustomer()->getId();
|
58 |
+
$data['user_id'] = $customerId;
|
59 |
+
}
|
60 |
+
else {
|
61 |
+
$customerId = session_id();
|
62 |
+
$data['user_id'] = $customerId;
|
63 |
+
}
|
64 |
+
|
65 |
+
// if same user is making changes to same template then remove previous design..
|
66 |
+
$checkTemplateData = Mage::helper('syncproduct')->customTemplateId($productId, $customerId);
|
67 |
+
if(!empty($checkTemplateData)) {
|
68 |
+
$checkProduct = $objCatlogModel->load($checkTemplateData);
|
69 |
+
$checkProduct->delete();
|
70 |
+
}
|
71 |
+
$data['product_id'] = $productId;
|
72 |
+
$data['pdf_url'] = utf8_decode($this->getRequest()->getParam('pdfUrl'));
|
73 |
+
$data['pdf_lowresurl'] = utf8_decode($this->getRequest()->getParam('pdfLowUrl'));
|
74 |
+
$data['image_url'] = utf8_decode($this->getRequest()->getParam('thumbUrl'));
|
75 |
+
$objCatlogModel->setData($data);
|
76 |
+
$objCatlogModel->save();
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Display product image action
|
83 |
+
*
|
84 |
+
* @deprecated
|
85 |
+
*/
|
86 |
+
public function imageAction() {
|
87 |
+
$size = (string) $this->getRequest()->getParam('size');
|
88 |
+
if ($size) {
|
89 |
+
$imageFile = preg_replace("#.*/catalog/product/image/size/[0-9]*x[0-9]*#", '',
|
90 |
+
$this->getRequest()->getRequestUri());
|
91 |
+
} else {
|
92 |
+
$imageFile = preg_replace("#.*/catalog/product/image#", '',
|
93 |
+
$this->getRequest()->getRequestUri());
|
94 |
+
}
|
95 |
+
|
96 |
+
if (!strstr($imageFile, '.')) {
|
97 |
+
$this->_forward('noRoute');
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
|
101 |
+
try {
|
102 |
+
$imageModel = Mage::getModel('catalog/product_image');
|
103 |
+
$imageModel->setSize($size)
|
104 |
+
->setBaseFile($imageFile)
|
105 |
+
/**
|
106 |
+
* Resizing has been commented because this one method are deprecated
|
107 |
+
*/
|
108 |
+
//->resize()
|
109 |
+
->setWatermark( Mage::getStoreConfig('catalog/watermark/image') )
|
110 |
+
->saveFile()
|
111 |
+
->push();
|
112 |
+
} catch( Exception $e ) {
|
113 |
+
$this->_forward('noRoute');
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
app/code/community/Printshop/Catalog/etc/config.xml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Catalog>
|
5 |
+
<version>1.1.5</version>
|
6 |
+
</Printshop_Catalog>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<Printshop_catalog>
|
11 |
+
<class>Printshop_Catalog_Block</class>
|
12 |
+
</Printshop_catalog>
|
13 |
+
<catalog>
|
14 |
+
<rewrite>
|
15 |
+
<product_view>Printshop_Catalog_Block_Catalog_Product_View</product_view>
|
16 |
+
<!--product_list>Printshop_Catalog_Block_Catalog_Product_List</product_list-->
|
17 |
+
</rewrite>
|
18 |
+
</catalog>
|
19 |
+
</blocks>
|
20 |
+
</global>
|
21 |
+
<frontend>
|
22 |
+
<layout>
|
23 |
+
<updates>
|
24 |
+
<printshop>
|
25 |
+
<file>printshop.xml</file>
|
26 |
+
</printshop>
|
27 |
+
</updates>
|
28 |
+
</layout>
|
29 |
+
<translate>
|
30 |
+
<modules>
|
31 |
+
<Printshop_Catalog>
|
32 |
+
<files>
|
33 |
+
<default>Printshop_Catalog.csv</default>
|
34 |
+
</files>
|
35 |
+
</Printshop_Catalog>
|
36 |
+
</modules>
|
37 |
+
</translate>
|
38 |
+
<routers>
|
39 |
+
<catalog>
|
40 |
+
<args>
|
41 |
+
<modules>
|
42 |
+
<Printshop_Catalog before="Mage_Catalog">Printshop_Catalog</Printshop_Catalog>
|
43 |
+
</modules>
|
44 |
+
</args>
|
45 |
+
</catalog>
|
46 |
+
</routers>
|
47 |
+
</frontend>
|
48 |
+
</config>
|
app/code/community/Printshop/Checkout/Block/Cart.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Checkout_Block_Cart
|
3 |
+
* This class override the functionality of Mage_Checkout_Block_Cart
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Checkout_Block_Cart extends Mage_Checkout_Block_Cart
|
8 |
+
{
|
9 |
+
|
10 |
+
}
|
app/code/community/Printshop/Checkout/Block/Onepage/Success.php
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
/**
|
4 |
+
* One page checkout success page
|
5 |
+
*
|
6 |
+
* @category Printshop
|
7 |
+
* @package Printshop_Checkout
|
8 |
+
* @author Printshop
|
9 |
+
*/
|
10 |
+
class Printshop_Checkout_Block_Onepage_Success extends Mage_Checkout_Block_Success {
|
11 |
+
/**
|
12 |
+
* @deprecated after 1.4.0.1
|
13 |
+
*/
|
14 |
+
private $_order;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Retrieve identifier of created order
|
18 |
+
*
|
19 |
+
* @return string
|
20 |
+
* @deprecated after 1.4.0.1
|
21 |
+
*/
|
22 |
+
public function getOrderId() {
|
23 |
+
return $this->_getData('order_id');
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Check order print availability
|
28 |
+
*
|
29 |
+
* @return bool
|
30 |
+
* @deprecated after 1.4.0.1
|
31 |
+
*/
|
32 |
+
public function canPrint() {
|
33 |
+
return $this->_getData('can_view_order');
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get url for order detale print
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
* @deprecated after 1.4.0.1
|
41 |
+
*/
|
42 |
+
public function getPrintUrl() {
|
43 |
+
return $this->_getData('print_url');
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get url for view order details
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
* @deprecated after 1.4.0.1
|
51 |
+
*/
|
52 |
+
public function getViewOrderUrl() {
|
53 |
+
return $this->_getData('view_order_id');
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* See if the order has state, visible on frontend
|
58 |
+
*
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
public function isOrderVisible() {
|
62 |
+
return (bool)$this->_getData('is_order_visible');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Getter for recurring profile view page
|
67 |
+
*
|
68 |
+
* @param $profile
|
69 |
+
*/
|
70 |
+
public function getProfileUrl(Varien_Object $profile) {
|
71 |
+
return $this->getUrl('sales/recurring_profile/view', array('profile' => $profile->getId()));
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Initialize data and prepare it for output
|
76 |
+
*/
|
77 |
+
protected function _beforeToHtml() {
|
78 |
+
$this->_prepareLastOrder();
|
79 |
+
$this->_prepareLastBillingAgreement();
|
80 |
+
$this->_prepareLastRecurringProfiles();
|
81 |
+
return parent::_beforeToHtml();
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get last order ID from session, fetch it and check whether it can be viewed, printed etc
|
86 |
+
*/
|
87 |
+
protected function _prepareLastOrder() {
|
88 |
+
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
|
89 |
+
if ($orderId) {
|
90 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
91 |
+
if ($order->getId()) {
|
92 |
+
$isVisible = !in_array($order->getState(),
|
93 |
+
Mage::getSingleton('sales/order_config')->getInvisibleOnFrontStates());
|
94 |
+
$this->addData(array(
|
95 |
+
'is_order_visible' => $isVisible,
|
96 |
+
'view_order_id' => $this->getUrl('sales/order/view/', array('order_id' => $orderId)),
|
97 |
+
'print_url' => $this->getUrl('sales/order/print', array('order_id'=> $orderId)),
|
98 |
+
'can_print_order' => $isVisible,
|
99 |
+
'can_view_order' => Mage::getSingleton('customer/session')->isLoggedIn() && $isVisible,
|
100 |
+
'order_id' => $order->getIncrementId(),
|
101 |
+
));
|
102 |
+
}
|
103 |
+
|
104 |
+
// Load quote and check for product and PDF & Image..
|
105 |
+
|
106 |
+
$storeId = $order->getStore()->getId();
|
107 |
+
$paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
|
108 |
+
->setIsSecureMode(true);
|
109 |
+
$paymentBlock->getMethod()->setStore($storeId);
|
110 |
+
$paymentBlockHtml = $paymentBlock->toHtml();
|
111 |
+
$fromName = Mage::getStoreConfig('trans_email/ident_custom1/name');
|
112 |
+
$fromEmail = Mage::getStoreConfig('trans_email/ident_custom1/email');
|
113 |
+
$toName = Mage::getStoreConfig('trans_email/ident_sales/name');
|
114 |
+
$toEmail = Mage::getStoreConfig('trans_email/ident_sales/email');
|
115 |
+
$customerName = Mage::getSingleton('customer/session')->getCustomer()->getName();
|
116 |
+
$customerEmail = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
117 |
+
|
118 |
+
// if customer is a guest user..
|
119 |
+
if($customerEmail == ""){
|
120 |
+
$customerName = $order->getBillingAddress()->getName();
|
121 |
+
$customerEmail = $order->getBillingAddress()->getEmail();
|
122 |
+
}
|
123 |
+
|
124 |
+
$store = Mage::app()->getStore();
|
125 |
+
$emailTemplateVariables = array();
|
126 |
+
$emailTemplateVariables['order'] = $order;
|
127 |
+
$emailTemplateVariables['payment_html']= $paymentBlock->toHtml();
|
128 |
+
$emailTemplateVariables['store'] = $store;
|
129 |
+
//get locale code to send email template in different languages..
|
130 |
+
$locale = Mage::app()->getLocale()->getLocaleCode();
|
131 |
+
//$emailTemplate = Mage::getModel('core/email_template')->loadDefault('custom_email_template1', 'en_US');
|
132 |
+
|
133 |
+
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('custom_email_template1', $locale);
|
134 |
+
|
135 |
+
//******************** Admin email *************************//
|
136 |
+
|
137 |
+
// get PDF link..
|
138 |
+
|
139 |
+
$quoteId = $order->getQuoteId();
|
140 |
+
$getQuoteData = Mage::getModel('sales/quote')->load($quoteId);
|
141 |
+
$itemCollection = $getQuoteData->getAllItems();
|
142 |
+
|
143 |
+
$linkto = '<tr><td> </td></tr>';
|
144 |
+
foreach($itemCollection as $_itemData) {
|
145 |
+
if($_itemData->getProductPdf() != NULL) {
|
146 |
+
$linkto = '<tr><td> </td></tr>';
|
147 |
+
$str = '<tr><td><a href="'.$_itemData->getProductPdf().'" >Click here</a> to download PDF</td></tr>';
|
148 |
+
$linkto .= $str;
|
149 |
+
|
150 |
+
}
|
151 |
+
}
|
152 |
+
$emailTemplateVariables['pdflink'] = '';
|
153 |
+
$emailTemplateVariables['pdflink'] = $linkto;
|
154 |
+
|
155 |
+
$translate = Mage::getSingleton('core/translate');
|
156 |
+
|
157 |
+
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
|
158 |
+
$mail = Mage::getModel('core/email');
|
159 |
+
$mail->setToName($toName);
|
160 |
+
$mail->setToEmail($toEmail);
|
161 |
+
$mail->setBody(utf8_decode($processedTemplate));
|
162 |
+
$mail->setSubject("Order Information");
|
163 |
+
$mail->setFromEmail($fromEmail);
|
164 |
+
$mail->setFromName($fromName);
|
165 |
+
$mail->setType('html');
|
166 |
+
try {
|
167 |
+
$mail->send();
|
168 |
+
|
169 |
+
}
|
170 |
+
catch (Exception $e) {
|
171 |
+
echo $e;
|
172 |
+
exit;
|
173 |
+
Mage::logException($e);
|
174 |
+
return false;
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
//******************** Customer email *************************//
|
179 |
+
|
180 |
+
|
181 |
+
$linkto = '<tr><td> </td></tr>';
|
182 |
+
foreach($itemCollection as $_itemData) {
|
183 |
+
if($_itemData->getProductLowrespdf() != NULL) {
|
184 |
+
$linkto = '<tr><td> </td></tr>';
|
185 |
+
$str = '<tr><td><a href="'.$_itemData->getProductLowrespdf().'" >Click here</a> to download PDF</td></tr>';
|
186 |
+
$linkto .= $str;
|
187 |
+
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
$linkto .= '<tr><td> </td></tr>';
|
192 |
+
$emailTemplateVariables['pdflink'] = '';
|
193 |
+
$emailTemplateVariables['pdflink'] = $linkto;
|
194 |
+
|
195 |
+
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
|
196 |
+
$mail = Mage::getModel('core/email');
|
197 |
+
$mail->setToName($customerName);
|
198 |
+
$mail->setToEmail($customerEmail);
|
199 |
+
$mail->setBody(utf8_decode($processedTemplate));
|
200 |
+
$mail->setSubject("Your Order Information");
|
201 |
+
$mail->setFromEmail($fromEmail);
|
202 |
+
$mail->setFromName($fromName);
|
203 |
+
$mail->setType('html');
|
204 |
+
// try {
|
205 |
+
$mail->send();
|
206 |
+
|
207 |
+
//}
|
208 |
+
/*catch (Exception $e) {
|
209 |
+
echo $e;exit;
|
210 |
+
Mage::logException($e);
|
211 |
+
return false;
|
212 |
+
}*/
|
213 |
+
$translate->setTranslateInline(true);
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* Prepare billing agreement data from an identifier in the session
|
219 |
+
*/
|
220 |
+
protected function _prepareLastBillingAgreement() {
|
221 |
+
$agreementId = Mage::getSingleton('checkout/session')->getLastBillingAgreementId();
|
222 |
+
$customerId = Mage::getSingleton('customer/session')->getCustomerId();
|
223 |
+
if ($agreementId && $customerId) {
|
224 |
+
$agreement = Mage::getModel('sales/billing_agreement')->load($agreementId);
|
225 |
+
if ($agreement->getId() && $customerId == $agreement->getCustomerId()) {
|
226 |
+
$this->addData(array(
|
227 |
+
'agreement_ref_id' => $agreement->getReferenceId(),
|
228 |
+
'agreement_url' => $this->getUrl('sales/billing_agreement/view',
|
229 |
+
array('agreement' => $agreementId)
|
230 |
+
),
|
231 |
+
));
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Prepare recurring payment profiles from the session
|
238 |
+
*/
|
239 |
+
protected function _prepareLastRecurringProfiles() {
|
240 |
+
$profileIds = Mage::getSingleton('checkout/session')->getLastRecurringProfileIds();
|
241 |
+
if ($profileIds && is_array($profileIds)) {
|
242 |
+
$collection = Mage::getModel('sales/recurring_profile')->getCollection()
|
243 |
+
->addFieldToFilter('profile_id', array('in' => $profileIds))
|
244 |
+
;
|
245 |
+
$profiles = array();
|
246 |
+
foreach ($collection as $profile) {
|
247 |
+
$profiles[] = $profile;
|
248 |
+
}
|
249 |
+
if ($profiles) {
|
250 |
+
$this->setRecurringProfiles($profiles);
|
251 |
+
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
252 |
+
$this->setCanViewProfiles(true);
|
253 |
+
}
|
254 |
+
}
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
app/code/community/Printshop/Checkout/Model/Cart.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shoping cart model
|
4 |
+
*
|
5 |
+
* @category Printshop
|
6 |
+
* @package Printshop_Checkout
|
7 |
+
* @author Printshop
|
8 |
+
*/
|
9 |
+
class Printshop_Checkout_Model_Cart extends Mage_Checkout_Model_Cart {
|
10 |
+
|
11 |
+
}
|
app/code/community/Printshop/Checkout/controllers/CartController.php
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Checkout_CartController
|
3 |
+
* This class override the functionality of Mage_Checkout_CartController
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
include_once('Mage/Checkout/controllers/CartController.php');
|
8 |
+
|
9 |
+
class Printshop_Checkout_CartController extends Mage_Checkout_CartController {
|
10 |
+
/**
|
11 |
+
* Action list where need check enabled cookie
|
12 |
+
*
|
13 |
+
* @var array
|
14 |
+
*/
|
15 |
+
protected $_cookieCheckActions = array('add');
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Retrieve shopping cart model object
|
19 |
+
*
|
20 |
+
* @return Mage_Checkout_Model_Cart
|
21 |
+
*/
|
22 |
+
protected function _getCart() {
|
23 |
+
return Mage::getSingleton('checkout/cart');
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get checkout session model instance
|
28 |
+
*
|
29 |
+
* @return Mage_Checkout_Model_Session
|
30 |
+
*/
|
31 |
+
protected function _getSession() {
|
32 |
+
return Mage::getSingleton('checkout/session');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get current active quote instance
|
37 |
+
*
|
38 |
+
* @return Mage_Sales_Model_Quote
|
39 |
+
*/
|
40 |
+
protected function _getQuote() {
|
41 |
+
return $this->_getCart()->getQuote();
|
42 |
+
}
|
43 |
+
|
44 |
+
public function addAction() {
|
45 |
+
$cart = $this->_getCart();
|
46 |
+
$params = $this->getRequest()->getParams();
|
47 |
+
try {
|
48 |
+
if (isset($params['qty'])) {
|
49 |
+
$filter = new Zend_Filter_LocalizedToNormalized(
|
50 |
+
array('locale' => Mage::app()->getLocale()->getLocaleCode())
|
51 |
+
);
|
52 |
+
$params['qty'] = $filter->filter($params['qty']);
|
53 |
+
}
|
54 |
+
|
55 |
+
$product = $this->_initProduct();
|
56 |
+
$related = $this->getRequest()->getParam('related_product');
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Check product availability
|
60 |
+
*/
|
61 |
+
if (!$product) {
|
62 |
+
$this->_goBack();
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
|
66 |
+
$cart->addProduct($product, $params);
|
67 |
+
if (!empty($related)) {
|
68 |
+
$cart->addProductsByIds(explode(',', $related));
|
69 |
+
}
|
70 |
+
$cart->save();
|
71 |
+
$this->_getSession()->setCartWasUpdated(true);
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @todo remove wishlist observer processAddToCart
|
75 |
+
*/
|
76 |
+
Mage::dispatchEvent('checkout_cart_add_product_complete',
|
77 |
+
array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())
|
78 |
+
);
|
79 |
+
|
80 |
+
if (!$this->_getSession()->getNoCartRedirect(true)) {
|
81 |
+
if (!$cart->getQuote()->getHasError()) {
|
82 |
+
$message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->htmlEscape($product->getName()));
|
83 |
+
$this->_getSession()->addSuccess($message);
|
84 |
+
}
|
85 |
+
// save product pdf and images if they are present..
|
86 |
+
if((isset($params['tplImage']))&& (isset($params['tplPdf']))) {
|
87 |
+
$quote = $cart->getQuote(); //Get all info of current quote
|
88 |
+
$quote_items = $quote->getAllItems(); //Get all products in cart
|
89 |
+
foreach($quote_items as $item) { //loop through products
|
90 |
+
$item_id = $item->getProductId(); //Get product sku
|
91 |
+
if($item_id == $product->getId()) { //Check if sku's match
|
92 |
+
$item->setProductPdf($params['tplPdf']); //Set the product PDF
|
93 |
+
$item->setProductLowrespdf($params['tplLowresPdf']); //Set the product low resolution PDF
|
94 |
+
$item->setProductImage($params['tplImage']); //Set the product Image
|
95 |
+
$item->save(); //Update the item
|
96 |
+
}
|
97 |
+
}
|
98 |
+
$quote->save(); //Save cart
|
99 |
+
}
|
100 |
+
|
101 |
+
// save product pdf and images ENDS Here..
|
102 |
+
|
103 |
+
$this->_goBack();
|
104 |
+
|
105 |
+
}
|
106 |
+
} catch (Mage_Core_Exception $e) {
|
107 |
+
if ($this->_getSession()->getUseNotice(true)) {
|
108 |
+
$this->_getSession()->addNotice($e->getMessage());
|
109 |
+
} else {
|
110 |
+
$messages = array_unique(explode("\n", $e->getMessage()));
|
111 |
+
foreach ($messages as $message) {
|
112 |
+
$this->_getSession()->addError($message);
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
$url = $this->_getSession()->getRedirectUrl(true);
|
117 |
+
if ($url) {
|
118 |
+
$this->getResponse()->setRedirect($url);
|
119 |
+
} else {
|
120 |
+
$this->_redirectReferer(Mage::helper('checkout/cart')->getCartUrl());
|
121 |
+
}
|
122 |
+
} catch (Exception $e) {
|
123 |
+
$this->_getSession()->addException($e, $this->__('Cannot add the item to shopping cart.'));
|
124 |
+
Mage::logException($e);
|
125 |
+
$this->_goBack();
|
126 |
+
}
|
127 |
+
}
|
128 |
+
}
|
app/code/community/Printshop/Checkout/etc/config.xml
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<global>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="setCharset"><charset>UTF-8</charset></action>
|
6 |
+
</reference>
|
7 |
+
<template>
|
8 |
+
<email>
|
9 |
+
<custom_email_template1>
|
10 |
+
<label>Print shop custom email module</label>
|
11 |
+
<file>printshop_custom_email1.html</file>
|
12 |
+
<type>html</type>
|
13 |
+
</custom_email_template1>
|
14 |
+
</email>
|
15 |
+
</template>
|
16 |
+
<template>
|
17 |
+
<email>
|
18 |
+
<checkout_payment_failed_template translate="label" module="sales">
|
19 |
+
<label>Payment Failed</label>
|
20 |
+
<file>payment_failed.html</file>
|
21 |
+
<type>html</type>
|
22 |
+
</checkout_payment_failed_template>
|
23 |
+
</email>
|
24 |
+
</template>
|
25 |
+
<blocks>
|
26 |
+
<Printshop_checkout>
|
27 |
+
<class>Printshop_Checkout_Block</class>
|
28 |
+
</Printshop_checkout>
|
29 |
+
<checkout>
|
30 |
+
<rewrite>
|
31 |
+
<cart>Printshop_Checkout_Block_Cart</cart>
|
32 |
+
</rewrite>
|
33 |
+
<rewrite>
|
34 |
+
<onepage_success>Printshop_Checkout_Block_Onepage_Success</onepage_success>
|
35 |
+
</rewrite>
|
36 |
+
</checkout>
|
37 |
+
</blocks>
|
38 |
+
</global>
|
39 |
+
<frontend>
|
40 |
+
<layout>
|
41 |
+
<updates>
|
42 |
+
<checkout>
|
43 |
+
<file>printshop_checkout.xml</file>
|
44 |
+
</checkout>
|
45 |
+
</updates>
|
46 |
+
</layout>
|
47 |
+
<routers>
|
48 |
+
<checkout>
|
49 |
+
<args>
|
50 |
+
<modules>
|
51 |
+
<Printshop_Checkout before="Mage_Checkout">Printshop_Checkout</Printshop_Checkout>
|
52 |
+
</modules>
|
53 |
+
</args>
|
54 |
+
</checkout>
|
55 |
+
</routers>
|
56 |
+
</frontend>
|
57 |
+
</config>
|
app/code/community/Printshop/Page/Block/Html/Head.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Page_Block_Html_Head
|
3 |
+
* This class override the functionality of Mage_Page_Block_Html_Head
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
class Printshop_Page_Block_Html_Head extends Mage_Page_Block_Html_Head
|
7 |
+
{
|
8 |
+
protected function _construct()
|
9 |
+
{
|
10 |
+
$this->setTemplate('page/html/printshop_head.phtml');
|
11 |
+
}
|
12 |
+
|
13 |
+
}
|
14 |
+
|
15 |
+
?>
|
app/code/community/Printshop/Page/etc/config.xml
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Page>
|
5 |
+
<version>1.1.5</version>
|
6 |
+
</Printshop_Page>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<blocks>
|
10 |
+
<Printshop_page>
|
11 |
+
<class>Printshop_Page_Block</class>
|
12 |
+
</Printshop_page>
|
13 |
+
<page>
|
14 |
+
<rewrite>
|
15 |
+
<html_head>Printshop_Page_Block_Html_Head</html_head>
|
16 |
+
</rewrite>
|
17 |
+
</page>
|
18 |
+
</blocks>
|
19 |
+
</global>
|
20 |
+
<frontend>
|
21 |
+
<routers>
|
22 |
+
<page>
|
23 |
+
<args>
|
24 |
+
<modules>
|
25 |
+
<Printshop_Page before="Mage_Page">Printshop_Page</Printshop_Page>
|
26 |
+
</modules>
|
27 |
+
</args>
|
28 |
+
</page>
|
29 |
+
</routers>
|
30 |
+
</frontend>
|
31 |
+
</config>
|
app/code/community/Printshop/Productpdf/Block/Adminhtml/Sales/Order/View/Tab/Productpdf.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Productpdf_Block_Adminhtml_Sales_Order_View_Tab_Productpdf
|
3 |
+
* This class will provide facility to download Order PDF files to admin
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
class Printshop_Productpdf_Block_Adminhtml_Sales_Order_View_Tab_Productpdf extends Mage_Adminhtml_Block_Template implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
7 |
+
{
|
8 |
+
protected function _construct()
|
9 |
+
{
|
10 |
+
parent::_construct();
|
11 |
+
$this->setTemplate( 'productpdf/sales/order/view/tab/userpdf.phtml' );
|
12 |
+
}
|
13 |
+
|
14 |
+
public function getTabLabel()
|
15 |
+
{
|
16 |
+
return $this->__( 'Product Pdf' );
|
17 |
+
}
|
18 |
+
|
19 |
+
public function getTabTitle()
|
20 |
+
{
|
21 |
+
return $this->__( 'Product Pdf' );
|
22 |
+
}
|
23 |
+
|
24 |
+
public function getTabClass()
|
25 |
+
{
|
26 |
+
return '';
|
27 |
+
}
|
28 |
+
|
29 |
+
public function getClass()
|
30 |
+
{
|
31 |
+
return $this->getTabClass();
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getRowUrl()
|
35 |
+
{
|
36 |
+
return $this->getUrl('*/sales_order/productpdf', array('_current' => true));
|
37 |
+
}
|
38 |
+
public function canShowTab()
|
39 |
+
{
|
40 |
+
return true;
|
41 |
+
}
|
42 |
+
|
43 |
+
public function isHidden()
|
44 |
+
{
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getOrder()
|
49 |
+
{
|
50 |
+
return Mage::registry( 'current_order' );
|
51 |
+
}
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
|
app/code/community/Printshop/Productpdf/etc/config.xml
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Productpdf>
|
5 |
+
<version>1.1.5</version>
|
6 |
+
</Printshop_Productpdf>
|
7 |
+
</modules>
|
8 |
+
<admin>
|
9 |
+
<routers>
|
10 |
+
<adminhtml>
|
11 |
+
<args>
|
12 |
+
<modules>
|
13 |
+
<!-- Override Adminhtml module here. -->
|
14 |
+
<Printshop_Productpdf_Adminhtml before="Mage_Adminhtml">Printshop_Productpdf_Adminhtml</Printshop_Productpdf_Adminhtml>
|
15 |
+
</modules>
|
16 |
+
</args>
|
17 |
+
</adminhtml>
|
18 |
+
</routers>
|
19 |
+
</admin>
|
20 |
+
<adminhtml>
|
21 |
+
<layout>
|
22 |
+
<updates>
|
23 |
+
<productpdf>
|
24 |
+
<file>productpdf.xml</file>
|
25 |
+
</productpdf>
|
26 |
+
</updates>
|
27 |
+
</layout>
|
28 |
+
</adminhtml>
|
29 |
+
<global>
|
30 |
+
<blocks>
|
31 |
+
<productpdf>
|
32 |
+
<class>Printshop_Productpdf_Block</class>
|
33 |
+
</productpdf>
|
34 |
+
</blocks>
|
35 |
+
<!-- models, resources, etc -->
|
36 |
+
</global>
|
37 |
+
</config>
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct extends Mage_Adminhtml_Block_Widget_Grid_Container
|
8 |
+
{
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
$this->_controller = 'adminhtml_syncproduct';
|
12 |
+
$this->_blockGroup = 'syncproduct';
|
13 |
+
$this->_headerText = Mage::helper('syncproduct')->__('Synchronize Product Data');
|
14 |
+
|
15 |
+
//$this->_addButtonLabel = Mage::helper('syncproduct')->__('Go >> Import Product Data');
|
16 |
+
parent::__construct();
|
17 |
+
$this->_removeButton('add'); /*Add this line after calling parent constructor*/
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Adminsetup.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Frontendcredentials
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Adminsetup extends Mage_Adminhtml_Block_Widget_Form_Container {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
}
|
12 |
+
|
13 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Adminsetup/Tabs.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Adminsetup_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('syncproduct_synclog');
|
12 |
+
$this->setDestElementId('adminsetup_form');
|
13 |
+
$this->setTitle(Mage::helper('syncproduct')->__('Web2Print Synchronize'));
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _beforeToHtml() {
|
17 |
+
$this->addTab('form_section', array(
|
18 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize'),
|
19 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize'),
|
20 |
+
'url' => $this->getUrl('*/*/', array('_current' => true)),
|
21 |
+
));
|
22 |
+
$this->addTab('syncproduct_logs', array(
|
23 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
24 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
25 |
+
'url' => $this->getUrl('*/*/synclog', array('_current' => true)),
|
26 |
+
));
|
27 |
+
$this->addTab('frontend_credentails', array(
|
28 |
+
'label' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
29 |
+
'title' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
30 |
+
'url' => $this->getUrl('*/*/frontendsetup', array('_current' => true))
|
31 |
+
));
|
32 |
+
$this->addTab('admin_setup', array(
|
33 |
+
'label' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
34 |
+
'title' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
35 |
+
'url' => $this->getUrl('*/*/adminsetup', array('_current' => true)),
|
36 |
+
'active' => true
|
37 |
+
));
|
38 |
+
$this->addTab('guest_setup', array(
|
39 |
+
'label' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
40 |
+
'title' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
41 |
+
'url' => $this->getUrl('*/*/guestsetup', array('_current' => true))
|
42 |
+
));
|
43 |
+
return parent::_beforeToHtml();
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
$this->_objectId = 'id';
|
11 |
+
$this->_blockGroup = 'syncproduct';
|
12 |
+
$this->_controller = 'adminhtml_syncproduct';
|
13 |
+
$this->_updateButton('save', 'label', Mage::helper('syncproduct')->__('Go >> Import Product Data'));
|
14 |
+
$this->_removeButton('back');
|
15 |
+
$this->_removeButton('reset');
|
16 |
+
}
|
17 |
+
public function getHeaderText() {
|
18 |
+
if( Mage::registry('syncproduct_data') && Mage::registry('syncproduct_data')->getId() ) {
|
19 |
+
return Mage::helper('syncproduct')->__("Edit Question '%s'", $this->htmlEscape(Mage::registry('syncproduct_data')->getTitle()));
|
20 |
+
} else {
|
21 |
+
return Mage::helper('syncproduct')->__('Go Import Data >>');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Form.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Form
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {
|
8 |
+
protected function _prepareForm() {
|
9 |
+
$form = new Varien_Data_Form(array(
|
10 |
+
'id' => 'edit_form',
|
11 |
+
'action' => $this->getUrl('*/*/importproduct', array('id' => $this->getRequest()->getParam('id'))),
|
12 |
+
'method' => 'post'
|
13 |
+
)
|
14 |
+
);
|
15 |
+
$form->setUseContainer(true);
|
16 |
+
$this->setForm($form);
|
17 |
+
return parent::_prepareForm();
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Tab/Form.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tab_Form
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {
|
8 |
+
|
9 |
+
protected function _prepareForm() {
|
10 |
+
$form = new Varien_Data_Form();
|
11 |
+
$this->setForm($form);
|
12 |
+
//$fieldset = $form->addFieldset('syncproduct_form', array('legend'=>Mage::helper('syncproduct')->__('Magento-iBright')));
|
13 |
+
if( Mage::getSingleton('adminhtml/session')->getsyncproductData() ) {
|
14 |
+
$form->setValues(Mage::getSingleton('adminhtml/session')->getsyncproductData());
|
15 |
+
Mage::getSingleton('adminhtml/session')->setsyncproductData(null);
|
16 |
+
}elseif( Mage::registry('syncproduct_data') ) {
|
17 |
+
$form->setValues(Mage::registry('syncproduct_data')->getData());
|
18 |
+
}
|
19 |
+
return parent::_prepareForm();
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Edit/Tabs.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('syncproduct_tabs');
|
12 |
+
$this->setDestElementId('edit_form');
|
13 |
+
$this->setTitle(Mage::helper('syncproduct')->__('Web2Print Synchronize'));
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _beforeToHtml() {
|
17 |
+
$this->addTab('form_section', array(
|
18 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize'),
|
19 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize'),
|
20 |
+
'content' => $this->getLayout()->createBlock('syncproduct/adminhtml_syncproduct_edit_tab_form')->toHtml(),
|
21 |
+
));
|
22 |
+
$this->addTab('syncproduct_logs', array(
|
23 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
24 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
25 |
+
'url' => $this->getUrl('*/*/synclog', array('_current' => true)),
|
26 |
+
// 'content' => $this->getLayout()->createBlock('syncproduct/adminhtml_syncproduct_synclog')->toHtml(),
|
27 |
+
));
|
28 |
+
$this->addTab('frontend_credentails', array(
|
29 |
+
'label' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
30 |
+
'title' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
31 |
+
'url' => $this->getUrl('*/*/frontendsetup', array('_current' => true)),
|
32 |
+
// 'content' => $this->getLayout()->createBlock('syncproduct/adminhtml_syncproduct_synclog')->toHtml(),
|
33 |
+
));
|
34 |
+
$this->addTab('admin_setup', array(
|
35 |
+
'label' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
36 |
+
'title' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
37 |
+
'url' => $this->getUrl('*/*/adminsetup', array('_current' => true)),
|
38 |
+
));
|
39 |
+
$this->addTab('guest_setup', array(
|
40 |
+
'label' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
41 |
+
'title' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
42 |
+
'url' => $this->getUrl('*/*/guestsetup', array('_current' => true))
|
43 |
+
));
|
44 |
+
return parent::_beforeToHtml();
|
45 |
+
}
|
46 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Frontendsetup.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Frontendcredentials
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Frontendsetup extends Mage_Adminhtml_Block_Widget_Form_Container {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
}
|
12 |
+
|
13 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Frontendsetup/Tabs.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Frontendsetup_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('syncproduct_synclog');
|
12 |
+
$this->setDestElementId('frontendsetup_form');
|
13 |
+
$this->setTitle(Mage::helper('syncproduct')->__('Web2Print Synchronize'));
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _beforeToHtml() {
|
17 |
+
$this->addTab('form_section', array(
|
18 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize'),
|
19 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize'),
|
20 |
+
'url' => $this->getUrl('*/*/', array('_current' => true)),
|
21 |
+
));
|
22 |
+
$this->addTab('syncproduct_logs', array(
|
23 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
24 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
25 |
+
'url' => $this->getUrl('*/*/synclog', array('_current' => true)),
|
26 |
+
));
|
27 |
+
$this->addTab('frontend_credentails', array(
|
28 |
+
'label' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
29 |
+
'title' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
30 |
+
'url' => $this->getUrl('*/*/frontendsetup', array('_current' => true)),
|
31 |
+
'active' => true,
|
32 |
+
));
|
33 |
+
$this->addTab('admin_setup', array(
|
34 |
+
'label' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
35 |
+
'title' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
36 |
+
'url' => $this->getUrl('*/*/adminsetup', array('_current' => true)),
|
37 |
+
));
|
38 |
+
$this->addTab('guest_setup', array(
|
39 |
+
'label' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
40 |
+
'title' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
41 |
+
'url' => $this->getUrl('*/*/guestsetup', array('_current' => true))
|
42 |
+
));
|
43 |
+
return parent::_beforeToHtml();
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Grid.php
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Grid
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Grid extends Mage_Adminhtml_Block_Widget_Grid {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
$this->setId('syncproduct');
|
12 |
+
$this->setDefaultSort('syncproduct_id');
|
13 |
+
$this->setDefaultDir('DESC');
|
14 |
+
$this->setSaveParametersInSession(true);
|
15 |
+
//$this->setUseAjax(true);
|
16 |
+
}
|
17 |
+
|
18 |
+
protected function _prepareCollection() {
|
19 |
+
$collection = Mage::getModel('syncproduct/syncproduct')->getCollection();
|
20 |
+
$this->setCollection($collection);
|
21 |
+
return parent::_prepareCollection();
|
22 |
+
}
|
23 |
+
protected function _prepareColumns() {
|
24 |
+
$this->addColumn('template_id', array(
|
25 |
+
'header' => Mage::helper('syncproduct')->__(''),
|
26 |
+
'align' => 'left',
|
27 |
+
'width' => '50px',
|
28 |
+
'index' => 'template_id',
|
29 |
+
'type' => 'checkbox'
|
30 |
+
));
|
31 |
+
$this->addColumn('template_id', array(
|
32 |
+
'header' => Mage::helper('syncproduct')->__('Template ID'),
|
33 |
+
'align' => 'left',
|
34 |
+
'width' => '20px',
|
35 |
+
'index' => 'template_id',
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('template_name', array(
|
39 |
+
'header' => Mage::helper('syncproduct')->__('Template Name'),
|
40 |
+
'align' => 'left',
|
41 |
+
'width' => '150px',
|
42 |
+
'index' => 'template_name',
|
43 |
+
));
|
44 |
+
$this->addColumn('magento_sku', array(
|
45 |
+
'header' => Mage::helper('syncproduct')->__('Magento SKU'),
|
46 |
+
'width' => '20px',
|
47 |
+
'align' => 'left',
|
48 |
+
'index' => 'magento_sku',
|
49 |
+
));
|
50 |
+
|
51 |
+
$this->addColumn('image', array(
|
52 |
+
'header' => Mage::helper('syncproduct')->__('Thumbnail'),
|
53 |
+
'align' => 'left',
|
54 |
+
'width' => '100px',
|
55 |
+
'index' =>'template_thumbnail',
|
56 |
+
'type' => 'image',
|
57 |
+
'filter' => false,
|
58 |
+
'sortable' => false,
|
59 |
+
'escape' => true,
|
60 |
+
'renderer' => 'syncproduct/adminhtml_syncproduct_renderer_image'
|
61 |
+
|
62 |
+
));
|
63 |
+
|
64 |
+
return parent::_prepareColumns();
|
65 |
+
}
|
66 |
+
|
67 |
+
protected function _prepareMassaction() {
|
68 |
+
$this->setMassactionIdField('template_id');
|
69 |
+
$this->getMassactionBlock()->setFormFieldName('syncproduct');
|
70 |
+
$this->getMassactionBlock()->addItem('delete', array(
|
71 |
+
'label' => Mage::helper('syncproduct')->__('Delete'),
|
72 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
73 |
+
'confirm' => Mage::helper('syncproduct')->__('Are you sure?')
|
74 |
+
));
|
75 |
+
|
76 |
+
$arrProductType = Mage::getSingleton('syncproduct/producttype')->getOptionArray();
|
77 |
+
$arrProductType = Mage::getSingleton('syncproduct/producttype')->getOptionArray();
|
78 |
+
|
79 |
+
array_unshift($arrProductType, array('label'=>'', 'value'=>''));
|
80 |
+
$this->getMassactionBlock()->addItem('status', array(
|
81 |
+
'label'=> Mage::helper('syncproduct')->__('Import in Magento'),
|
82 |
+
'url' => $this->getUrl('*/*/addToMagentoProduct', array('_current'=>true)),
|
83 |
+
'additional' => array(
|
84 |
+
'visibility' => array(
|
85 |
+
'name' => 'productType',
|
86 |
+
'type' => 'select',
|
87 |
+
'class' => 'required-entry',
|
88 |
+
'label' => Mage::helper('syncproduct')->__('Product Type'),
|
89 |
+
'values' => $arrProductType
|
90 |
+
)
|
91 |
+
)
|
92 |
+
));
|
93 |
+
return $this;
|
94 |
+
}
|
95 |
+
|
96 |
+
public function getRowUrl($row) {
|
97 |
+
return;
|
98 |
+
//return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
99 |
+
}
|
100 |
+
|
101 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Guestsetup.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Guestsetup
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Guestsetup extends Mage_Adminhtml_Block_Widget_Form_Container {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
|
11 |
+
}
|
12 |
+
|
13 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Guestsetup/Tabs.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Guestsetup_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('syncproduct_synclog');
|
12 |
+
$this->setDestElementId('frontendsetup_form');
|
13 |
+
$this->setTitle(Mage::helper('syncproduct')->__('Web2Print Synchronize'));
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _beforeToHtml() {
|
17 |
+
$this->addTab('form_section', array(
|
18 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize'),
|
19 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize'),
|
20 |
+
'url' => $this->getUrl('*/*/', array('_current' => true)),
|
21 |
+
));
|
22 |
+
$this->addTab('syncproduct_logs', array(
|
23 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
24 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
25 |
+
'url' => $this->getUrl('*/*/synclog', array('_current' => true)),
|
26 |
+
));
|
27 |
+
$this->addTab('frontend_credentails', array(
|
28 |
+
'label' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
29 |
+
'title' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
30 |
+
'url' => $this->getUrl('*/*/frontendsetup', array('_current' => true))
|
31 |
+
));
|
32 |
+
$this->addTab('admin_setup', array(
|
33 |
+
'label' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
34 |
+
'title' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
35 |
+
'url' => $this->getUrl('*/*/adminsetup', array('_current' => true)),
|
36 |
+
));
|
37 |
+
$this->addTab('guest_setup', array(
|
38 |
+
'label' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
39 |
+
'title' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
40 |
+
'url' => $this->getUrl('*/*/guestsetup', array('_current' => true)),
|
41 |
+
'active' => true,
|
42 |
+
));
|
43 |
+
return parent::_beforeToHtml();
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Producttype.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Printshop_Producttype
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Printshop_Producttype extends Mage_Adminhtml_Block_Widget
|
8 |
+
{
|
9 |
+
public function __construct()
|
10 |
+
{
|
11 |
+
parent::__construct();
|
12 |
+
$this->setTemplate('doc/custom_options.phtml');
|
13 |
+
}
|
14 |
+
|
15 |
+
public function getQuestionOption($questionId)
|
16 |
+
{
|
17 |
+
$sql = "SELECT * FROM docoption where questionid = '".$questionId."' ";
|
18 |
+
$getData = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
|
19 |
+
return $getData;
|
20 |
+
}
|
21 |
+
|
22 |
+
/*public function test123()
|
23 |
+
{
|
24 |
+
$getData = Mage::getModel('doc/docoption')->test();
|
25 |
+
return $getData;
|
26 |
+
// return $this->test();
|
27 |
+
}*/
|
28 |
+
|
29 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Renderer/Image.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Renderer_Image
|
3 |
+
* @category Community
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Renderer_Image extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
7 |
+
protected static $syncproductImgURL = null;
|
8 |
+
protected static $syncproductThumbWidth = null;
|
9 |
+
public function __construct() {
|
10 |
+
self::$syncproductImgURL = Mage::getBaseUrl('media').'syncproduct/images/thumbnail/';
|
11 |
+
self::$syncproductThumbWidth = 100;
|
12 |
+
}
|
13 |
+
public function render(Varien_Object $row) {
|
14 |
+
$imageFile = self::$syncproductImgURL.$row->getData($this->getColumn()->getIndex());
|
15 |
+
list($width, $height, $type, $attr) = getimagesize($imageFile);
|
16 |
+
$html = '<img ';
|
17 |
+
$html .= 'id="' . $this->getColumn()->getId() . '" ';
|
18 |
+
$html .= 'src="' . $imageFile . '"';
|
19 |
+
$html .= 'width="'.$width.'" height="'.$height.'"';
|
20 |
+
$html .= 'class="grid-image ' . $this->getColumn()->getInlineCss() . '"/>';
|
21 |
+
return $html;
|
22 |
+
}
|
23 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Synclog.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Synclog
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Synclog extends Mage_Adminhtml_Block_Widget {
|
8 |
+
public function __construct() {
|
9 |
+
parent::__construct();
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Adminhtml/Syncproduct/Synclog/Tabs.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Edit_Tabs
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Block_Adminhtml_Syncproduct_Synclog_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {
|
8 |
+
|
9 |
+
public function __construct() {
|
10 |
+
parent::__construct();
|
11 |
+
$this->setId('syncproduct_synclog');
|
12 |
+
$this->setDestElementId('syncproduct_synclog');
|
13 |
+
$this->setTitle(Mage::helper('syncproduct')->__('Web2Print Synchronize'));
|
14 |
+
}
|
15 |
+
|
16 |
+
protected function _beforeToHtml() {
|
17 |
+
$this->addTab('form_section', array(
|
18 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize'),
|
19 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize'),
|
20 |
+
'url' => $this->getUrl('*/*/', array('_current' => true)),
|
21 |
+
|
22 |
+
));
|
23 |
+
$this->addTab('syncproduct_logs', array(
|
24 |
+
'label' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
25 |
+
'title' => Mage::helper('syncproduct')->__('Synchronize Logs'),
|
26 |
+
'url' => $this->getUrl('*/*/synclog', array('_current' => true)),
|
27 |
+
'active' => true,
|
28 |
+
));
|
29 |
+
$this->addTab('frontend_credentails', array(
|
30 |
+
'label' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
31 |
+
'title' => Mage::helper('syncproduct')->__('Frontend Connection Setup'),
|
32 |
+
'url' => $this->getUrl('*/*/frontendsetup', array('_current' => true)),
|
33 |
+
));
|
34 |
+
$this->addTab('admin_setup', array(
|
35 |
+
'label' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
36 |
+
'title' => Mage::helper('syncproduct')->__('Admin Connection Setup'),
|
37 |
+
'url' => $this->getUrl('*/*/adminsetup', array('_current' => true)),
|
38 |
+
));
|
39 |
+
$this->addTab('guest_setup', array(
|
40 |
+
'label' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
41 |
+
'title' => Mage::helper('syncproduct')->__('Guest Connection Setup'),
|
42 |
+
'url' => $this->getUrl('*/*/guestsetup', array('_current' => true))
|
43 |
+
));
|
44 |
+
return parent::_beforeToHtml();
|
45 |
+
}
|
46 |
+
}
|
app/code/community/Printshop/Syncproduct/Block/Syncproduct.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Block_Syncproduct
|
3 |
+
* @category Community
|
4 |
+
* @author Printshop
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
|
8 |
+
class Printshop_Syncproduct_Block_Syncproduct extends Mage_Core_Block_Template {
|
9 |
+
public function _prepareLayout() {
|
10 |
+
return parent::_prepareLayout();
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Helper/Data.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Helper_Data
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Helper_Data extends Mage_Core_Helper_Abstract {
|
8 |
+
public function designToolDetails() {
|
9 |
+
$objIbright = Mage::getModel('syncproduct/ibrightfrontend');
|
10 |
+
$getIbrightDetails = $objIbright->load('1');
|
11 |
+
return $getIbrightDetails;
|
12 |
+
}
|
13 |
+
public function guestDesignToolDetails() {
|
14 |
+
$objIbright = Mage::getModel('syncproduct/ibrightguest');
|
15 |
+
$getIbrightDetails = $objIbright->load('1');
|
16 |
+
return $getIbrightDetails;
|
17 |
+
}
|
18 |
+
public function adminConnection() {
|
19 |
+
$objIbright = Mage::getModel('syncproduct/ibrightadmin');
|
20 |
+
$getIbrightDetails = $objIbright->load('1');
|
21 |
+
return $getIbrightDetails;
|
22 |
+
}
|
23 |
+
public function productImage($pdtId, $userId) {
|
24 |
+
$objIbright = Mage::getModel('syncproduct/catalog');
|
25 |
+
$getIbrightDetails = $objIbright->getCollection()
|
26 |
+
->addFieldToFilter('user_id', $userId)
|
27 |
+
->addFieldToFilter('product_id', $pdtId)
|
28 |
+
->load();
|
29 |
+
foreach($getIbrightDetails as $data){
|
30 |
+
$pdtImage = $data->getImageUrl();
|
31 |
+
}
|
32 |
+
return $pdtImage;
|
33 |
+
}
|
34 |
+
public function productHighResPdf($pdtId, $userId) {
|
35 |
+
$objIbright = Mage::getModel('syncproduct/catalog');
|
36 |
+
$getIbrightDetails = $objIbright->getCollection()
|
37 |
+
->addFieldToFilter('user_id', $userId)
|
38 |
+
->addFieldToFilter('product_id', $pdtId)
|
39 |
+
->load();
|
40 |
+
foreach($getIbrightDetails as $data){
|
41 |
+
$pdtHighResPdf = $data->getPdfUrl();
|
42 |
+
}
|
43 |
+
return $pdtHighResPdf;
|
44 |
+
}
|
45 |
+
public function productLowResPdf($pdtId, $userId) {
|
46 |
+
$objIbright = Mage::getModel('syncproduct/catalog');
|
47 |
+
$getIbrightDetails = $objIbright->getCollection()
|
48 |
+
->addFieldToFilter('user_id', $userId)
|
49 |
+
->addFieldToFilter('product_id', $pdtId)
|
50 |
+
->load();
|
51 |
+
foreach($getIbrightDetails as $data){
|
52 |
+
$pdtLowResPdf = $data->getPdfLowresurl();
|
53 |
+
}
|
54 |
+
return $pdtLowResPdf;
|
55 |
+
}
|
56 |
+
public function customTemplateId($pdtId, $userId) {
|
57 |
+
$objIbright = Mage::getModel('syncproduct/catalog');
|
58 |
+
$getIbrightDetails = $objIbright->getCollection()
|
59 |
+
->addFieldToFilter('user_id', $userId)
|
60 |
+
->addFieldToFilter('product_id', $pdtId)
|
61 |
+
->load();
|
62 |
+
foreach($getIbrightDetails as $data){
|
63 |
+
$customId = $data->getId();
|
64 |
+
}
|
65 |
+
return $customId;
|
66 |
+
}
|
67 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Catalog.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Syncproduct
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Catalog extends Mage_Core_Model_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/catalog');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Ibrightadmin.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Ibright
|
3 |
+
* @category Community
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Ibrightadmin extends Mage_Core_Model_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightadmin');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Ibrightfrontend.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Ibrightfrontend extends Mage_Core_Model_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightfrontend');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Ibrightguest.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Ibrightguest extends Mage_Core_Model_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightguest');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Catalog.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Catalog extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
// Note that the id refers to the key field in your database table.
|
12 |
+
$this->_init('syncproduct/catalog', 'id');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Catalog/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright_Collection
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Catalog_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/catalog');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightadmin.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibrightadmin extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
// Note that the id refers to the key field in your database table.
|
12 |
+
$this->_init('syncproduct/ibrightadmin', 'id');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightadmin/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright_Collection
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibright_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightadmin');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightfrontend.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibrightfrontend extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
// Note that the id refers to the key field in your database table.
|
12 |
+
$this->_init('syncproduct/ibrightfrontend', 'id');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightfrontend/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright_Collection
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibrightfrontend_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightfrontend');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightguest.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibrightguest extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
// Note that the id refers to the key field in your database table.
|
12 |
+
$this->_init('syncproduct/ibrightguest', 'id');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Ibrightguest/Collection.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Ibright_Collection
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Ibrightguest_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/ibrightguest');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Syncproduct.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Syncproduct
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Syncproduct extends Mage_Core_Model_Mysql4_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
// Note that the syncproduct_id refers to the key field in your database table.
|
12 |
+
$this->_init('syncproduct/syncproduct', 'syncproduct_id');
|
13 |
+
}
|
14 |
+
public function createNewAttributeSet($name) {
|
15 |
+
Mage::app('default');
|
16 |
+
$modelSet = Mage::getModel('eav/entity_attribute_set')
|
17 |
+
->setEntityTypeId(4) // 4 == "catalog/product"
|
18 |
+
->setAttributeSetName($name);
|
19 |
+
$modelSet->save();
|
20 |
+
return $modelSet->initFromSkeleton(4)->save(); // same thing
|
21 |
+
}
|
22 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Mysql4/Syncproduct/Collection.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Mysql4_Doc_Collection
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Mysql4_Syncproduct_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
8 |
+
{
|
9 |
+
public function _construct()
|
10 |
+
{
|
11 |
+
parent::_construct();
|
12 |
+
$this->_init('syncproduct/syncproduct');
|
13 |
+
}
|
14 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Producttype.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Status
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Producttype extends Varien_Object {
|
8 |
+
const PRODUCT_PRINT = "Print Product";
|
9 |
+
const PRODUCT_STANDARD = "Standard Product";
|
10 |
+
|
11 |
+
static public function getOptionArray() {
|
12 |
+
return array(
|
13 |
+
self::PRODUCT_PRINT => Mage::helper('syncproduct')->__('Print Product'),
|
14 |
+
self::PRODUCT_STANDARD => Mage::helper('syncproduct')->__('Standard Product')
|
15 |
+
);
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Resource/Eav/Mysql4/Setup.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Printshop_Syncproduct_Model_Resource_Eav_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup {
|
3 |
+
|
4 |
+
}
|
app/code/community/Printshop/Syncproduct/Model/Source/Option.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Printshop_Syncproduct_Model_Source_Option extends Mage_Eav_Model_Entity_Attribute_Source_Table
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
6 |
+
?>
|
app/code/community/Printshop/Syncproduct/Model/Syncproduct.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Model_Syncproduct
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_Model_Syncproduct extends Mage_Core_Model_Abstract {
|
8 |
+
public function _construct() {
|
9 |
+
parent::_construct();
|
10 |
+
$this->_init('syncproduct/syncproduct');
|
11 |
+
}
|
12 |
+
}
|
app/code/community/Printshop/Syncproduct/controllers/Adminhtml/SyncproductController.php
ADDED
@@ -0,0 +1,578 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_Adminhtml_DocController
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
class Printshop_Syncproduct_Adminhtml_SyncproductController extends Mage_Adminhtml_Controller_action {
|
7 |
+
protected function _initAction() {
|
8 |
+
$this->loadLayout()
|
9 |
+
->_setActiveMenu('System')
|
10 |
+
->_addBreadcrumb(Mage::helper('adminhtml')->__('System'), Mage::helper('adminhtml')->__('Web2Print'));
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
public function indexAction() {
|
14 |
+
// $this->_forward('edit');
|
15 |
+
$this->_initAction()
|
16 |
+
->renderLayout();
|
17 |
+
}
|
18 |
+
public function editAction() {
|
19 |
+
$this->loadLayout();
|
20 |
+
$this->_setActiveMenu('system/syncproduct');
|
21 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Question Manager'), Mage::helper('adminhtml')->__('Question Manager'));
|
22 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
23 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
24 |
+
$this->setTemplate('syncproduct/edit.phtml');
|
25 |
+
$this->renderLayout();
|
26 |
+
}
|
27 |
+
public function synclogAction() {
|
28 |
+
$this->loadLayout();
|
29 |
+
$this->_setActiveMenu('system/syncproduct');
|
30 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Synchronize Log'), Mage::helper('adminhtml')->__('Synchronize Log'));
|
31 |
+
$this->renderLayout();
|
32 |
+
}
|
33 |
+
// function to import templates from iBright server..
|
34 |
+
public function importproductAction() {
|
35 |
+
if ($this->getRequest()->getPost()) {
|
36 |
+
$formData = $this->getRequest()->getPost();
|
37 |
+
|
38 |
+
$objIbright = Mage::getModel('syncproduct/ibrightadmin');
|
39 |
+
$arrCollection = $objIbright->load('1'); // check if any url is already exists..
|
40 |
+
|
41 |
+
$ibrightUrl = $arrCollection['ibright_url'];
|
42 |
+
$ibrightUser = $arrCollection['ibright_login'];
|
43 |
+
$ibrightPwd = base64_decode($arrCollection['ibright_password']);
|
44 |
+
if($ibrightUrl == '') {
|
45 |
+
$this->_getSession()->addError("Please create connection setup and then import data");
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
// Use CURL to connect and get data from iBright
|
49 |
+
$ch = curl_init();
|
50 |
+
// set URL and other appropriate options
|
51 |
+
curl_setopt($ch, CURLOPT_URL, $ibrightUrl);
|
52 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
53 |
+
curl_setopt($ch, CURLOPT_HEADER, 0);
|
54 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
55 |
+
$postData = "login=".$ibrightUser."&password=".$ibrightPwd;
|
56 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
|
57 |
+
$getTemplateXml = curl_exec($ch);
|
58 |
+
//$errSync = curl_error($ch);
|
59 |
+
curl_close($ch);
|
60 |
+
|
61 |
+
if(!strpos($getTemplateXml, "template")) {
|
62 |
+
$stripHtmlErrMsg = trim(str_replace("\n", " ", strip_tags($getTemplateXml)));
|
63 |
+
$errMsg = preg_replace("'\s+'", ' ', $stripHtmlErrMsg);
|
64 |
+
$syncErrorMsg = "CONFIG". "\t". $_SERVER['REMOTE_ADDR']. "\t". $errMsg. "\t". date("d-m-Y h:i:s");
|
65 |
+
// create log for error..
|
66 |
+
$logFile = Mage::getBaseDir('base'). DS . 'var'. DS . 'synclog'. DS . 'log.txt';
|
67 |
+
if(file_exists($logFile)) {
|
68 |
+
if(file_get_contents($logFile) != "") {
|
69 |
+
$getLogFileData = file_get_contents($logFile);
|
70 |
+
chmod($logFile, 0777);
|
71 |
+
file_put_contents($logFile, $getLogFileData."\r\n".$syncErrorMsg);
|
72 |
+
}
|
73 |
+
else {
|
74 |
+
chmod($logFile, 0777);
|
75 |
+
file_put_contents($logFile, $syncErrorMsg);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
else {
|
79 |
+
fopen($ourFileName, 'w');
|
80 |
+
chmod($logFile, 0777);
|
81 |
+
file_put_contents($logFile, $syncErrorMsg);
|
82 |
+
}
|
83 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('syncproduct')->__($errMsg));
|
84 |
+
}
|
85 |
+
else {
|
86 |
+
try {
|
87 |
+
$xmlName = time().".xml";
|
88 |
+
$syncDirPath = Mage::getBaseDir('base').DS.'media'.DS.'syncproduct'.DS;
|
89 |
+
if(!file_exists($syncDirPath)) {
|
90 |
+
mkdir($syncDirPath, 0777);
|
91 |
+
}
|
92 |
+
$syncXmlPath = $syncDirPath.'xml'.DS;
|
93 |
+
if(!file_exists($syncXmlPath)) {
|
94 |
+
mkdir($syncXmlPath, 0777);
|
95 |
+
}
|
96 |
+
$templateXml = $syncXmlPath.$xmlName;
|
97 |
+
|
98 |
+
// write XML in a file before parsing..
|
99 |
+
|
100 |
+
$fh = fopen($templateXml, 'w') or die("can't open file");
|
101 |
+
fwrite($fh, $getTemplateXml);
|
102 |
+
fclose($fh);
|
103 |
+
chmod($templateXml, 0777);
|
104 |
+
if(file_exists($templateXml)) {
|
105 |
+
$xmlObj = new Varien_Simplexml_Config($templateXml);
|
106 |
+
$xmlData = $xmlObj->getNode();
|
107 |
+
$model = Mage::getModel('syncproduct/syncproduct');
|
108 |
+
$data = array();
|
109 |
+
$i = 0;
|
110 |
+
foreach($xmlData as $tplData) {
|
111 |
+
// check if template is already available then remove and import this again..
|
112 |
+
$tplCollection = $model->getCollection()
|
113 |
+
->addFieldToFilter('template_id', $tplData['id'])
|
114 |
+
->load();
|
115 |
+
if(!empty($tplCollection)) {
|
116 |
+
foreach($tplCollection as $valTemplate) {
|
117 |
+
$tplId = $valTemplate->getSyncproductId();
|
118 |
+
if($tplId != '') {
|
119 |
+
$tplDataCollection = $model->load($tplId);
|
120 |
+
$tplDataCollection->delete();
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
// checking and import again ends here..
|
125 |
+
$data['template_id'] = $tplData['id'];
|
126 |
+
$data['template_name'] = $tplData['name'];
|
127 |
+
$data['template_lockstatus'] = $tplData['lock_status'];
|
128 |
+
// get product thumnail path..
|
129 |
+
$cImg = curl_init();
|
130 |
+
// set URL and other appropriate options
|
131 |
+
$imgUrl = str_replace("getAllTemplatesXML.html", "getPreviewImage.html", $ibrightUrl);
|
132 |
+
curl_setopt($cImg, CURLOPT_URL, $imgUrl);
|
133 |
+
curl_setopt($cImg, CURLOPT_RETURNTRANSFER, 1);
|
134 |
+
curl_setopt($cImg, CURLOPT_HEADER, 0);
|
135 |
+
curl_setopt($cImg, CURLOPT_POST, 1);
|
136 |
+
$imgPostData = "login=".$ibrightUser."&password=".$ibrightPwd."&template=".$data['template_id']."&res=high&page=1";
|
137 |
+
curl_setopt($cImg, CURLOPT_POSTFIELDS, $imgPostData);
|
138 |
+
$getTemplateImage = curl_exec($cImg);
|
139 |
+
$err = curl_error($cImg);
|
140 |
+
curl_close($cImg);
|
141 |
+
$templateImageName = $tplData['id'].".jpg";
|
142 |
+
$templateImagePath = $syncDirPath.'images'.DS;
|
143 |
+
if(!file_exists($templateImagePath)) {
|
144 |
+
mkdir($templateImagePath, 0777);
|
145 |
+
}
|
146 |
+
$templateImage = $templateImagePath.$templateImageName;
|
147 |
+
|
148 |
+
// save images in a file..
|
149 |
+
|
150 |
+
$fh = fopen($templateImage, 'w') or die("can't open file");
|
151 |
+
fwrite($fh, $getTemplateImage);
|
152 |
+
fclose($fh);
|
153 |
+
if(file_exists($templateImage)) {
|
154 |
+
chmod($templateImage, 0777);
|
155 |
+
$data['template_thumbnail'] = $templateImageName;
|
156 |
+
}
|
157 |
+
// Now work for image thumbnail..
|
158 |
+
$imageUrl = Mage::getBaseUrl('media'). "syncproduct". DS .$templateImageName;
|
159 |
+
// create folder
|
160 |
+
if(!file_exists($templateImagePath. "thumbnail". DS))
|
161 |
+
mkdir($templateImagePath. "thumbnail". DS, 0777);
|
162 |
+
$imageResized = $templateImagePath. "thumbnail". DS . $templateImageName;
|
163 |
+
// thumbnail image path..
|
164 |
+
$dirImg = $templateImagePath. $templateImageName;
|
165 |
+
// save the thumbnail image to the thumbnail directory
|
166 |
+
|
167 |
+
$imageObj = new Varien_Image($dirImg);
|
168 |
+
$imageObj->constrainOnly(TRUE);
|
169 |
+
$imageObj->keepAspectRatio(TRUE);
|
170 |
+
$imageObj->keepFrame(FALSE);
|
171 |
+
$imageObj->resize(120, 120);
|
172 |
+
$imageObj->save($imageResized);
|
173 |
+
// Image thumnail creation ENDS Here. Save all the data..
|
174 |
+
|
175 |
+
// check if template is already exists in Magento as a product..
|
176 |
+
$objChekMagentoDatabse = Mage::getResourceModel('catalog/product_collection');
|
177 |
+
$productCollection = array();
|
178 |
+
$data['magento_sku'] = "--";
|
179 |
+
$productCollection = $objChekMagentoDatabse->addFieldToFilter('template_id', $data['template_id'])
|
180 |
+
->addAttributeToSelect('sku')
|
181 |
+
->load();
|
182 |
+
if(!empty($productCollection)) {
|
183 |
+
foreach($productCollection as $valProduct) {
|
184 |
+
$data['magento_sku'] = $valProduct->getSku();
|
185 |
+
}
|
186 |
+
}
|
187 |
+
$model->setData($data);
|
188 |
+
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
189 |
+
$model->setCreatedTime(now())
|
190 |
+
->setUpdateTime(now());
|
191 |
+
} else {
|
192 |
+
$model->setUpdateTime(now());
|
193 |
+
}
|
194 |
+
$i++;
|
195 |
+
$model->save();
|
196 |
+
}
|
197 |
+
// unlink imported template XML..
|
198 |
+
chmod($templateXml, 0777);
|
199 |
+
unlink($templateXml);
|
200 |
+
}
|
201 |
+
$this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully added', $i));
|
202 |
+
}
|
203 |
+
catch (Exception $e) {
|
204 |
+
//$this->_getSession()->addError($e->getMessage());
|
205 |
+
// create log for error..
|
206 |
+
$logMsg = "CONFIG". "\t". $_SERVER['REMOTE_ADDR']. "\t". $e->getMessage(). "\t". date("d-m-Y h:i:s");
|
207 |
+
$logFile = Mage::getBaseDir('base'). DS . 'var'. DS . 'synclog'. DS . 'log.txt';
|
208 |
+
if(file_exists($logFile)) {
|
209 |
+
if(file_get_contents($logFile) != "") {
|
210 |
+
$getLogFileData = file_get_contents($logFile);
|
211 |
+
chmod($logFile, 0777);
|
212 |
+
file_put_contents($logFile, $getLogFileData."\r\n".$logMsg);
|
213 |
+
}
|
214 |
+
else {
|
215 |
+
chmod($logFile, 0777);
|
216 |
+
file_put_contents($logFile, $logMsg);
|
217 |
+
}
|
218 |
+
}
|
219 |
+
else {
|
220 |
+
fopen($ourFileName, 'w');
|
221 |
+
chmod($logFile, 0777);
|
222 |
+
file_put_contents($logFile, $logMsg);
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
}
|
227 |
+
}
|
228 |
+
// clean magento cache..
|
229 |
+
Mage::app()->getCache()->clean();
|
230 |
+
// rebuild index..
|
231 |
+
Mage::getResourceModel('catalog/product_flat_indexer')->rebuild();
|
232 |
+
$this->_redirect('*/*/');
|
233 |
+
}
|
234 |
+
// function for add product in Magento database the attribute set will be taken from the options selected by the admin..
|
235 |
+
public function addToMagentoProductAction() {
|
236 |
+
$arrProductType = $this->getRequest()->getParam('syncproduct');
|
237 |
+
if(!is_array($arrProductType)) {
|
238 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
239 |
+
} else {
|
240 |
+
try {
|
241 |
+
foreach ($arrProductType as $syncProductId) {
|
242 |
+
// create product in Magento..
|
243 |
+
$objSyncProduct = Mage::getModel('syncproduct/syncproduct');
|
244 |
+
$arrNewProduct = $objSyncProduct->load($syncProductId);
|
245 |
+
|
246 |
+
// if template is already added as a product in magento then update its preview image only..
|
247 |
+
|
248 |
+
if( $arrNewProduct['magento_sku'] != "--") {
|
249 |
+
// update images in magento product..
|
250 |
+
$objChekMagentoDatabse = Mage::getResourceModel('catalog/product_collection');
|
251 |
+
$productCollection = array();
|
252 |
+
$productCollection = $objChekMagentoDatabse->addFieldToFilter('template_id', $arrNewProduct['template_id'])
|
253 |
+
->addAttributeToSelect('*')
|
254 |
+
->load();
|
255 |
+
if(!empty($productCollection)) {
|
256 |
+
foreach($productCollection as $valProduct) {
|
257 |
+
$magentoImgPath = Mage::getBaseDir('base').DS.'media'. DS . 'catalog'. DS . 'product' . DS;
|
258 |
+
// unlink product image which are already exists..
|
259 |
+
if(file_exists($magentoImgPath.$valProduct->getImage()))
|
260 |
+
unlink($magentoImgPath.$valProduct->getImage());
|
261 |
+
if(file_exists($magentoImgPath.$valProduct->getSmallImage()))
|
262 |
+
unlink($magentoImgPath.$valProduct->getSmallImage());
|
263 |
+
if(file_exists($magentoImgPath.$valProduct->getThumbnail()))
|
264 |
+
unlink($magentoImgPath.$valProduct->getThumbnail());
|
265 |
+
|
266 |
+
$imagePath = Mage::getBaseDir('base').DS.'media'.DS.'syncproduct'.DS. 'images'. DS;
|
267 |
+
$imageName = $imagePath.$arrNewProduct['template_thumbnail'];
|
268 |
+
|
269 |
+
$valProduct->addImageToMediaGallery($imageName , array ('image', 'small_image','thumbnail'), false, false);
|
270 |
+
$valProduct->save();
|
271 |
+
unlink($imageName);
|
272 |
+
unlink($imagePath.'thumbnail'. DS . $arrNewProduct['template_thumbnail']);
|
273 |
+
$arrNewProduct->delete();
|
274 |
+
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}else {
|
278 |
+
//$newProduct = Mage::getModel('catalog/product');
|
279 |
+
$newProduct = new Mage_Catalog_Model_Product();
|
280 |
+
$newProduct->setWebsiteIds(array(1));
|
281 |
+
$newProduct->setSku('ib-'.$arrNewProduct['template_id'].$arrNewProduct['syncproduct_id']);
|
282 |
+
$newProduct->setTemplateId($arrNewProduct['template_id']);
|
283 |
+
|
284 |
+
//$newProduct->setCategoryIds(array(1152));
|
285 |
+
|
286 |
+
// get Attribute set ID for Default..
|
287 |
+
$entityTypeId = Mage::getModel('eav/entity')
|
288 |
+
->setType('catalog_product')
|
289 |
+
->getTypeId();
|
290 |
+
$attributeSetName = 'Default';
|
291 |
+
$attributeSetId = Mage::getModel('eav/entity_attribute_set')
|
292 |
+
->getCollection()
|
293 |
+
->setEntityTypeFilter($entityTypeId)
|
294 |
+
->addFieldToFilter('attribute_set_name', $attributeSetName)
|
295 |
+
->getFirstItem()
|
296 |
+
->getAttributeSetId();
|
297 |
+
|
298 |
+
$newProduct->setAttributeSetId($attributeSetId);
|
299 |
+
$newProduct->setTypeId('simple');
|
300 |
+
// get attribute value from attribute code..
|
301 |
+
$attrb = Mage::getModel('catalog/product')->getResource()->getAttribute("print_product");
|
302 |
+
if($attrb->usesSource()) {
|
303 |
+
$options = $attrb->getSource()->getAllOptions(false);
|
304 |
+
}
|
305 |
+
// check in which product type the product is going to add in Magento..
|
306 |
+
if($this->getRequest()->getParam('productType') == "Print Product")
|
307 |
+
$newProduct->setPrintProduct($options[1]['value']);
|
308 |
+
elseif($this->getRequest()->getParam('productType') == "Standard Product")
|
309 |
+
$newProduct->setPrintProduct($options[0]['value']);
|
310 |
+
|
311 |
+
$newProduct->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
|
312 |
+
$newProduct->setName($arrNewProduct['template_name']);
|
313 |
+
$newProduct->setDescription($arrNewProduct['template_name']);
|
314 |
+
$newProduct->setShortDescription($arrNewProduct['template_name']);
|
315 |
+
$newProduct->setStatus(2);
|
316 |
+
$newProduct->setTaxClassId(0);
|
317 |
+
$newProduct->setWeight(1.0000);
|
318 |
+
$newProduct->setPrice(1.00);
|
319 |
+
$newProduct->setStockData(array(
|
320 |
+
'is_in_stock' => 1,
|
321 |
+
'qty' => 10
|
322 |
+
));
|
323 |
+
$newProduct->setCreatedAt(strtotime('now'));
|
324 |
+
// copy images in magento product..
|
325 |
+
$imageName = Mage::getBaseDir('base').DS.'media'.DS.'syncproduct'.DS. 'images'. DS . $arrNewProduct['template_thumbnail'];
|
326 |
+
$newProduct->addImageToMediaGallery($imageName , array ('image', 'small_image','thumbnail'), false, false);
|
327 |
+
// call save() method to save your product with updated data
|
328 |
+
$newProduct->save();
|
329 |
+
$pdtId = $newProduct->getId();
|
330 |
+
// if print type product then create product options..
|
331 |
+
if($this->getRequest()->getParam('productType') == "Print Product")
|
332 |
+
$this->createCustomOptions($pdtId);
|
333 |
+
|
334 |
+
//unlink images..
|
335 |
+
unlink($imageName);
|
336 |
+
unlink(Mage::getBaseDir('base').DS.'media'.DS.'syncproduct'.DS. 'images'. DS .'thumbnail'. DS . $arrNewProduct['template_thumbnail']);
|
337 |
+
// remove data from sync table..
|
338 |
+
$arrNewProduct->delete();
|
339 |
+
}
|
340 |
+
}
|
341 |
+
// clean magento cache..
|
342 |
+
Mage::app()->getCache()->clean();
|
343 |
+
// rebuild index..
|
344 |
+
Mage::getResourceModel('catalog/product_flat_indexer')->rebuild();
|
345 |
+
$this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully added as product. Please do "FlushCatalog Images Cache" in Magento to see all the new previews', count($arrProductType)));
|
346 |
+
} catch (Exception $e) {
|
347 |
+
$this->_getSession()->addError($e->getMessage());
|
348 |
+
}
|
349 |
+
}
|
350 |
+
$this->_redirect('*/*/index');
|
351 |
+
}
|
352 |
+
// function to delete templates..
|
353 |
+
public function massDeleteAction() {
|
354 |
+
$syncIds = $this->getRequest()->getParam('syncproduct');
|
355 |
+
if(!is_array($syncIds)) {
|
356 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
357 |
+
} else {
|
358 |
+
try {
|
359 |
+
foreach ($syncIds as $syncId) {
|
360 |
+
$objTpl = Mage::getModel('syncproduct/syncproduct')->load($syncId);
|
361 |
+
$templateId = $objTpl->getTemplateId();
|
362 |
+
$tplImgPath = Mage::getBaseDir('base').DS.'media'.DS.'syncproduct'.DS;
|
363 |
+
//unlink images..
|
364 |
+
chmod($tplImgPath . "images". DS . $templateId.".jpg", 0777);
|
365 |
+
unlink($tplImgPath . "images". DS . $templateId.".jpg");
|
366 |
+
//unlink thumb images..
|
367 |
+
chmod($tplImgPath . "images". DS . "thumbnail". DS . $templateId.".jpg", 0777);
|
368 |
+
unlink($tplImgPath . "images". DS . "thumbnail". DS . $templateId.".jpg");
|
369 |
+
$objTpl->delete();
|
370 |
+
}
|
371 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
372 |
+
Mage::helper('adminhtml')->__(
|
373 |
+
'Total of %d record(s) were successfully deleted', count($syncIds)
|
374 |
+
)
|
375 |
+
);
|
376 |
+
} catch (Exception $e) {
|
377 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
378 |
+
}
|
379 |
+
}
|
380 |
+
$this->_redirect('*/*/index');
|
381 |
+
}
|
382 |
+
// create product custom options when added as a product in Magento database..
|
383 |
+
public function createCustomOptions($productId) {
|
384 |
+
$product = Mage::getModel('catalog/product')->load($productId);
|
385 |
+
$optionData1 =
|
386 |
+
array(
|
387 |
+
'is_delete' => 0,
|
388 |
+
'is_require' => true,
|
389 |
+
'previous_group' => '',
|
390 |
+
'title' => 'Druck ',
|
391 |
+
'type' => 'radio',
|
392 |
+
'price_type' => 'fixed',
|
393 |
+
'price' => 0,
|
394 |
+
'sort_order' => 1,
|
395 |
+
'values' => array(
|
396 |
+
array(
|
397 |
+
'is_delete' => 0,
|
398 |
+
'title' => 'Digital(Digitaldruck Xerox)',
|
399 |
+
'price_type' => 'fixed',
|
400 |
+
'price' => 0,
|
401 |
+
//'sku' => 'product sku',
|
402 |
+
//'option_type_id'=> -1,
|
403 |
+
),
|
404 |
+
array(
|
405 |
+
'is_delete' => 0,
|
406 |
+
'title' => 'Standard (Offsetdruck)',
|
407 |
+
'price_type' => 'fixed',
|
408 |
+
'price' => 0,
|
409 |
+
)));
|
410 |
+
|
411 |
+
$optionData2 = array(
|
412 |
+
'is_delete' => 0,
|
413 |
+
'is_require' => true,
|
414 |
+
'previous_group' => '',
|
415 |
+
'title' => 'Papier ',
|
416 |
+
'type' => 'radio',
|
417 |
+
'price_type' => 'fixed',
|
418 |
+
'price' => 0,
|
419 |
+
'sort_order' => 2,
|
420 |
+
'values' => array(
|
421 |
+
array(
|
422 |
+
'is_delete' => 0,
|
423 |
+
'title' => 'Standard (weiss, gestrichen, matt)',
|
424 |
+
'price_type' => 'fixed',
|
425 |
+
'price' => 0,
|
426 |
+
//'sku' => 'product sku',
|
427 |
+
//'option_type_id'=> -1,
|
428 |
+
),
|
429 |
+
array(
|
430 |
+
'is_delete' => 0,
|
431 |
+
'title' => 'Natur (weiss, ungestrichen, matt)',
|
432 |
+
'price_type' => 'fixed',
|
433 |
+
'price' => 0,
|
434 |
+
),
|
435 |
+
array(
|
436 |
+
'is_delete' => 0,
|
437 |
+
'title' => 'Deluxe (weiss, gestrichen, satin)',
|
438 |
+
'price_type' => 'fixed',
|
439 |
+
'price' => '0.20',
|
440 |
+
)));
|
441 |
+
|
442 |
+
$optionData3 = array(
|
443 |
+
'is_delete' => 0,
|
444 |
+
'is_require' => true,
|
445 |
+
'previous_group' => '',
|
446 |
+
'title' => 'Wunschtermin ',
|
447 |
+
'type' => 'radio',
|
448 |
+
'price_type' => 'fixed',
|
449 |
+
'price' => 0,
|
450 |
+
'sort_order' => 3,
|
451 |
+
'values' => array(
|
452 |
+
array(
|
453 |
+
'is_delete' => 0,
|
454 |
+
'title' => 'Normal',
|
455 |
+
'price_type' => 'fixed',
|
456 |
+
'price' => 0,
|
457 |
+
//'sku' => 'product sku',
|
458 |
+
//'option_type_id'=> -1,
|
459 |
+
),
|
460 |
+
array(
|
461 |
+
'is_delete' => 0,
|
462 |
+
'title' => 'Express',
|
463 |
+
'price_type' => 'fixed',
|
464 |
+
'price' => '15.00',
|
465 |
+
)));
|
466 |
+
|
467 |
+
|
468 |
+
$product->setProductOptions(array($optionData1, $optionData2, $optionData3));
|
469 |
+
$product->setCanSaveCustomOptions(true);
|
470 |
+
$product->save();
|
471 |
+
// unset product options so that it can not make duplicate entries..
|
472 |
+
Mage::getSingleton('catalog/product_option')->unsetOptions();
|
473 |
+
return;
|
474 |
+
}
|
475 |
+
// function to setup frontend connection setup..
|
476 |
+
public function frontendsetupAction() {
|
477 |
+
$this->loadLayout();
|
478 |
+
$this->_setActiveMenu('system/syncproduct');
|
479 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Frontend Connection Setup'), Mage::helper('adminhtml')->__('Frontend Connection Setup'));
|
480 |
+
|
481 |
+
$objIbright = Mage::getModel('syncproduct/ibrightfrontend');
|
482 |
+
$arrCollection = $objIbright->load('1'); // check if any url is already exists..
|
483 |
+
Mage::register('frontData', $arrCollection);
|
484 |
+
|
485 |
+
$this->renderLayout();
|
486 |
+
if($this->getRequest()->getPost()) {
|
487 |
+
$arrPostedData = $this->getRequest()->getPost();
|
488 |
+
$dataUrl = $arrCollection['ibright_frontend_url'];
|
489 |
+
$data['ibright_frontend_url'] = $arrPostedData['ibrightfrnturl'];
|
490 |
+
$data['ibright_frontend_login'] = $arrPostedData['ibrightfrntuser'];
|
491 |
+
$data['ibright_frontend_password']= base64_encode($arrPostedData['ibrightfrntpassword']);
|
492 |
+
$objIbright->setData($data);
|
493 |
+
if ($objIbright->getCreatedTime == NULL || $objIbright->getUpdateTime() == NULL) {
|
494 |
+
$objIbright->setCreatedTime(now())
|
495 |
+
->setUpdateTime(now());
|
496 |
+
} else {
|
497 |
+
$objIbright->setUpdateTime(now());
|
498 |
+
}
|
499 |
+
|
500 |
+
if($dataUrl == '')
|
501 |
+
$objIbright->save();
|
502 |
+
else
|
503 |
+
$objIbright->setId(1)->save();
|
504 |
+
$this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully added', 1));
|
505 |
+
$this->_redirect('*/*/frontendsetup');
|
506 |
+
}
|
507 |
+
}
|
508 |
+
// function to save admin setup connections..
|
509 |
+
public function adminsetupAction() {
|
510 |
+
$this->loadLayout();
|
511 |
+
$this->_setActiveMenu('system/syncproduct');
|
512 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Admin Connection Setup'), Mage::helper('adminhtml')->__('Admin Connection Setup'));
|
513 |
+
/**********************************************/
|
514 |
+
|
515 |
+
$objIbright = Mage::getModel('syncproduct/ibrightadmin');
|
516 |
+
$arrCollection = $objIbright->load('1'); // check if any url is already exists..
|
517 |
+
Mage::register('adminData', $arrCollection);
|
518 |
+
|
519 |
+
/**********************************************/
|
520 |
+
$this->renderLayout();
|
521 |
+
if($this->getRequest()->getPost()) {
|
522 |
+
$arrPostedData = $this->getRequest()->getPost();
|
523 |
+
|
524 |
+
$dataUrl = $arrCollection['ibright_url'];
|
525 |
+
$dataCredentials['ibright_url'] = $arrPostedData['ibrighturl'];
|
526 |
+
$dataCredentials['ibright_login'] = $arrPostedData['ibrightuser'];
|
527 |
+
$dataCredentials['ibright_password']= base64_encode($arrPostedData['ibrightpassword']);
|
528 |
+
$a = $objIbright->setData($dataCredentials);
|
529 |
+
//echo "<pre>"; print_r($a); exit;
|
530 |
+
if ($objIbright->getCreatedTime == NULL || $objIbright->getUpdateTime() == NULL) {
|
531 |
+
$objIbright->setCreatedTime(now())
|
532 |
+
->setUpdateTime(now());
|
533 |
+
} else {
|
534 |
+
$objIbright->setUpdateTime(now());
|
535 |
+
}
|
536 |
+
if($dataUrl == '')
|
537 |
+
$objIbright->save();
|
538 |
+
else
|
539 |
+
$objIbright->setId(1)->save();
|
540 |
+
|
541 |
+
$this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully added', 1));
|
542 |
+
$this->_redirect('*/*/adminsetup');
|
543 |
+
}
|
544 |
+
}
|
545 |
+
// function to save guest user account setup connections..
|
546 |
+
public function guestsetupAction() {
|
547 |
+
$this->loadLayout();
|
548 |
+
$this->_setActiveMenu('system/syncproduct');
|
549 |
+
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Guest Connection Setup'), Mage::helper('adminhtml')->__('Guest Connection Setup'));
|
550 |
+
$objIbright = Mage::getModel('syncproduct/ibrightguest');
|
551 |
+
$arrCollection = $objIbright->load('1'); // check if any url is already exists..
|
552 |
+
Mage::register('guestData', $arrCollection);
|
553 |
+
$this->renderLayout();
|
554 |
+
|
555 |
+
if($this->getRequest()->getPost()) {
|
556 |
+
$arrPostedData = $this->getRequest()->getPost();
|
557 |
+
$dataUrl = $arrCollection['ibright_guest_url'];
|
558 |
+
$dataCredentials['ibright_guest_url'] = $arrPostedData['ibrightguesturl'];
|
559 |
+
$dataCredentials['ibright_guest_login'] = $arrPostedData['ibrightguestuser'];
|
560 |
+
$dataCredentials['ibright_guest_password']= base64_encode($arrPostedData['ibrightguestpassword']);
|
561 |
+
|
562 |
+
$objIbright->setData($dataCredentials);
|
563 |
+
if ($objIbright->getCreatedTime == NULL || $objIbright->getUpdateTime() == NULL) {
|
564 |
+
$objIbright->setCreatedTime(now())
|
565 |
+
->setUpdateTime(now());
|
566 |
+
} else {
|
567 |
+
$objIbright->setUpdateTime(now());
|
568 |
+
}
|
569 |
+
if($dataUrl == '')
|
570 |
+
$objIbright->save();
|
571 |
+
else
|
572 |
+
$objIbright->setId(1)->save();
|
573 |
+
$this->_getSession()->addSuccess($this->__('Total of %d record(s) were successfully added', 1));
|
574 |
+
$this->_redirect('*/*/guestsetup');
|
575 |
+
}
|
576 |
+
}
|
577 |
+
|
578 |
+
}
|
app/code/community/Printshop/Syncproduct/controllers/IndexController.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/** Class Printshop_Syncproduct_IndexController
|
3 |
+
* @category Local
|
4 |
+
* @author Printshop
|
5 |
+
*/
|
6 |
+
|
7 |
+
class Printshop_Syncproduct_IndexController extends Mage_Core_Controller_Front_Action {
|
8 |
+
public function indexAction()
|
9 |
+
{
|
10 |
+
$this->loadLayout(array('default'));
|
11 |
+
$this->renderLayout();
|
12 |
+
}
|
13 |
+
}
|
app/code/community/Printshop/Syncproduct/etc/adminhtml.xml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<adminhtml>
|
2 |
+
<!-- <menu>
|
3 |
+
<system module="system">
|
4 |
+
<title>System</title>
|
5 |
+
<sort_order>90</sort_order>
|
6 |
+
<children>
|
7 |
+
<items module="syncproduct">
|
8 |
+
<title>Web2Print Synchronize</title>
|
9 |
+
<sort_order>120</sort_order>
|
10 |
+
<action>syncproduct/adminhtml_syncproduct</action>
|
11 |
+
</items>
|
12 |
+
</children>
|
13 |
+
</system>
|
14 |
+
</menu>-->
|
15 |
+
<menu>
|
16 |
+
<system module="system">
|
17 |
+
<title>System</title>
|
18 |
+
<sort_order>90</sort_order>
|
19 |
+
<children>
|
20 |
+
<items module="syncproduct">
|
21 |
+
<title>PrintShop Extensions</title>
|
22 |
+
<sort_order>120</sort_order>
|
23 |
+
<!-- <action>syncproduct/adminhtml_syncproduct</action>-->
|
24 |
+
<!-- <children>
|
25 |
+
<items1 module="getquote">
|
26 |
+
<title>Get Quote</title>
|
27 |
+
<sort_order>121</sort_order>
|
28 |
+
<action>getquote/adminhtml_getquote</action>
|
29 |
+
</items1>
|
30 |
+
</children>-->
|
31 |
+
<children>
|
32 |
+
<items2 module="syncproduct">
|
33 |
+
<title>PrintShop Synchronize</title>
|
34 |
+
<sort_order>122</sort_order>
|
35 |
+
<action>syncproduct/adminhtml_syncproduct</action>
|
36 |
+
</items2>
|
37 |
+
</children>
|
38 |
+
</items>
|
39 |
+
</children>
|
40 |
+
</system>
|
41 |
+
</menu>
|
42 |
+
<acl>
|
43 |
+
<resources>
|
44 |
+
<all>
|
45 |
+
<title>Allow Everything</title>
|
46 |
+
</all>
|
47 |
+
<admin>
|
48 |
+
<children>
|
49 |
+
<Printshop_Syncproduct>
|
50 |
+
<title>Syncproduct Module</title>
|
51 |
+
<sort_order>31</sort_order>
|
52 |
+
</Printshop_Syncproduct>
|
53 |
+
</children>
|
54 |
+
</admin>
|
55 |
+
</resources>
|
56 |
+
</acl>
|
57 |
+
<layout>
|
58 |
+
<updates>
|
59 |
+
<syncproduct>
|
60 |
+
<file>syncproduct.xml</file>
|
61 |
+
</syncproduct>
|
62 |
+
</updates>
|
63 |
+
</layout>
|
64 |
+
</adminhtml>
|
app/code/community/Printshop/Syncproduct/etc/config.xml
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Syncproduct>
|
5 |
+
<version>1.1.5</version>
|
6 |
+
</Printshop_Syncproduct>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<admin>
|
10 |
+
<routers>
|
11 |
+
<syncproduct>
|
12 |
+
<use>admin</use>
|
13 |
+
<args>
|
14 |
+
<module>Printshop_Syncproduct</module>
|
15 |
+
<frontName>syncproduct</frontName>
|
16 |
+
</args>
|
17 |
+
</syncproduct>
|
18 |
+
</routers>
|
19 |
+
</admin>
|
20 |
+
<adminhtml>
|
21 |
+
<acl>
|
22 |
+
<resources>
|
23 |
+
<all>
|
24 |
+
<title>Allow Everything</title>
|
25 |
+
</all>
|
26 |
+
<admin>
|
27 |
+
<children>
|
28 |
+
<Printshop_Syncproduct>
|
29 |
+
<title>Syncproduct Module</title>
|
30 |
+
<sort_order>20</sort_order>
|
31 |
+
</Printshop_Syncproduct>
|
32 |
+
</children>
|
33 |
+
</admin>
|
34 |
+
</resources>
|
35 |
+
</acl>
|
36 |
+
<layout>
|
37 |
+
<updates>
|
38 |
+
<syncproduct>
|
39 |
+
<file>syncproduct.xml</file>
|
40 |
+
</syncproduct>
|
41 |
+
</updates>
|
42 |
+
</layout>
|
43 |
+
</adminhtml>
|
44 |
+
<global>
|
45 |
+
<models>
|
46 |
+
<syncproduct>
|
47 |
+
<class>Printshop_Syncproduct_Model</class>
|
48 |
+
<resourceModel>syncproduct_mysql4</resourceModel>
|
49 |
+
</syncproduct>
|
50 |
+
<syncproduct_mysql4>
|
51 |
+
<class>Printshop_Syncproduct_Model_Mysql4</class>
|
52 |
+
<entities>
|
53 |
+
<catalog>
|
54 |
+
<table>user_template_design</table>
|
55 |
+
</catalog>
|
56 |
+
<syncproduct>
|
57 |
+
<table>syncproduct</table>
|
58 |
+
</syncproduct>
|
59 |
+
<ibrightadmin>
|
60 |
+
<table>syncproduct_admin_ibright</table>
|
61 |
+
</ibrightadmin>
|
62 |
+
<ibrightfrontend>
|
63 |
+
<table>syncproduct_frontend_ibright</table>
|
64 |
+
</ibrightfrontend>
|
65 |
+
<ibrightguest>
|
66 |
+
<table>syncproduct_guest_ibright</table>
|
67 |
+
</ibrightguest>
|
68 |
+
</entities>
|
69 |
+
</syncproduct_mysql4>
|
70 |
+
</models>
|
71 |
+
<resources>
|
72 |
+
<syncproduct_setup>
|
73 |
+
<setup>
|
74 |
+
<module>Printshop_Syncproduct</module>
|
75 |
+
<class>Printshop_Syncproduct_Model_Resource_Eav_Mysql4_Setup</class>
|
76 |
+
</setup>
|
77 |
+
<setup>
|
78 |
+
<module>Printshop_Syncproduct</module>
|
79 |
+
<class>Mage_Sales_Model_Mysql4_Setup</class>
|
80 |
+
</setup>
|
81 |
+
<connection>
|
82 |
+
<use>core_setup</use>
|
83 |
+
</connection>
|
84 |
+
</syncproduct_setup>
|
85 |
+
<syncproduct_write>
|
86 |
+
<connection>
|
87 |
+
<use>core_write</use>
|
88 |
+
</connection>
|
89 |
+
</syncproduct_write>
|
90 |
+
<syncproduct_read>
|
91 |
+
<connection>
|
92 |
+
<use>core_read</use>
|
93 |
+
</connection>
|
94 |
+
</syncproduct_read>
|
95 |
+
</resources>
|
96 |
+
<blocks>
|
97 |
+
<syncproduct>
|
98 |
+
<class>Printshop_Syncproduct_Block</class>
|
99 |
+
</syncproduct>
|
100 |
+
</blocks>
|
101 |
+
<helpers>
|
102 |
+
<syncproduct>
|
103 |
+
<class>Printshop_Syncproduct_Helper</class>
|
104 |
+
</syncproduct>
|
105 |
+
</helpers>
|
106 |
+
</global>
|
107 |
+
</config>
|
app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$installer->run("
|
5 |
+
|
6 |
+
DROP TABLE IF EXISTS `{$this->getTable('syncproduct')}`;
|
7 |
+
|
8 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('syncproduct')}` (
|
9 |
+
`syncproduct_id` INT UNSIGNED NOT NULL auto_increment,
|
10 |
+
`template_name` varchar(255) NOT NULL default '',
|
11 |
+
`magento_sku` varchar(255) NOT NULL default '--',
|
12 |
+
`template_id` int(10) NOT NULL,
|
13 |
+
`template_thumbnail` varchar(255) default NULL,
|
14 |
+
`template_lockstatus` enum('0','1'),
|
15 |
+
`created_at` timestamp,
|
16 |
+
`updated_at` timestamp,
|
17 |
+
PRIMARY KEY (`syncproduct_id`)
|
18 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
+
|
20 |
+
DROP TABLE IF EXISTS `{$this->getTable('syncproduct_admin_ibright')}`;
|
21 |
+
|
22 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('syncproduct_admin_ibright')} (
|
23 |
+
`id` INT UNSIGNED NOT NULL auto_increment,
|
24 |
+
`ibright_url` varchar(255) default NULL,
|
25 |
+
`ibright_login` varchar(100) default NULL,
|
26 |
+
`ibright_password` varchar(100) default NULL,
|
27 |
+
`created_at` timestamp,
|
28 |
+
`updated_at` timestamp,
|
29 |
+
PRIMARY KEY (`id`)
|
30 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
31 |
+
|
32 |
+
DROP TABLE IF EXISTS `{$this->getTable('syncproduct_frontend_ibright')}`;
|
33 |
+
|
34 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('syncproduct_frontend_ibright')} (
|
35 |
+
`id` INT UNSIGNED NOT NULL auto_increment,
|
36 |
+
`ibright_frontend_url` varchar(255) default NULL,
|
37 |
+
`ibright_frontend_login` varchar(100) default NULL,
|
38 |
+
`ibright_frontend_password` varchar(100) default NULL,
|
39 |
+
`created_at` timestamp,
|
40 |
+
`updated_at` timestamp,
|
41 |
+
PRIMARY KEY (`id`)
|
42 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
43 |
+
|
44 |
+
DROP TABLE IF EXISTS `{$this->getTable('user_template_design')}`;
|
45 |
+
|
46 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('user_template_design')}` (
|
47 |
+
`id` INT UNSIGNED NOT NULL auto_increment,
|
48 |
+
`user_id` varchar(100) NOT NULL default '',
|
49 |
+
`product_id` int(11) NOT NULL,
|
50 |
+
`pdf_url` varchar(255) default NULL,
|
51 |
+
`pdf_lowresurl` varchar(255) default NULL,
|
52 |
+
`image_url` varchar(255) default NULL,
|
53 |
+
PRIMARY KEY (`id`)
|
54 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
55 |
+
");
|
56 |
+
|
57 |
+
// Create print product as a product attribute
|
58 |
+
|
59 |
+
$setupPrint = new Mage_Eav_Model_Entity_Setup('core_setup');
|
60 |
+
$setupPrint->addAttribute('catalog_product', 'print_product', array(
|
61 |
+
'label' => 'Print Product',
|
62 |
+
'type' => 'int',
|
63 |
+
'input' => 'select',
|
64 |
+
'visible' => true,
|
65 |
+
'required' => false,
|
66 |
+
'backend' => 'eav/entity_attribute_backend_array',
|
67 |
+
'frontend' => '',
|
68 |
+
'source' => 'syncproduct/source_option',
|
69 |
+
'is_configurable' => 0,
|
70 |
+
'position' => 1,
|
71 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
72 |
+
'option' => array (
|
73 |
+
'value' => array('option1'=>array('Yes'),
|
74 |
+
'option2'=>array('No'),
|
75 |
+
)
|
76 |
+
),
|
77 |
+
'visible_on_front' => false,
|
78 |
+
'visible_in_advanced_search' => false,
|
79 |
+
|
80 |
+
));
|
81 |
+
|
82 |
+
// Create template id as a product attribute
|
83 |
+
|
84 |
+
$setupTplId = new Mage_Eav_Model_Entity_Setup('core_setup');
|
85 |
+
|
86 |
+
$setupTplId->addAttribute('catalog_product', 'template_id', array(
|
87 |
+
'label' => 'Template ID',
|
88 |
+
'type' => 'varchar',
|
89 |
+
'input' => 'text',
|
90 |
+
'visible' => true,
|
91 |
+
'required' => false,
|
92 |
+
'backend' => '',
|
93 |
+
'frontend' => '',
|
94 |
+
'source' => '',
|
95 |
+
'position' => 1,
|
96 |
+
'visible_on_front' => false,
|
97 |
+
'visible_in_advanced_search' => false,
|
98 |
+
|
99 |
+
));
|
100 |
+
|
101 |
+
//$installer->getConnection()->addColumn($installer->getTable('user_template_design'), 'pdf_lowresurl', 'varchar(255) NULL DEFAULT NULL AFTER `pdf_url`');
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Product PDF - quote item
|
105 |
+
**/
|
106 |
+
|
107 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_item'), 'product_pdf', 'varchar(255) NULL DEFAULT NULL AFTER `sku`');
|
108 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_item'), 'product_lowrespdf', 'varchar(255) NULL DEFAULT NULL AFTER `product_pdf`');
|
109 |
+
/**
|
110 |
+
* Product Image - quote item
|
111 |
+
**/
|
112 |
+
|
113 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_item'), 'product_image', 'varchar(255) NULL DEFAULT NULL AFTER `name`');
|
114 |
+
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Product PDF - order item
|
118 |
+
**/
|
119 |
+
|
120 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_order_item'), 'product_pdf', 'varchar(255) NULL DEFAULT NULL AFTER `product_id`');
|
121 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_order_item'), 'product_lowrespdf', 'varchar(255) NULL DEFAULT NULL AFTER `product_pdf`');
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Product Image - order item
|
125 |
+
**/
|
126 |
+
|
127 |
+
$installer->getConnection()->addColumn($installer->getTable('sales_flat_order_item'), 'product_image', 'varchar(255) NULL DEFAULT NULL AFTER `product_type`');
|
128 |
+
|
129 |
+
$installer->endSetup();
|
130 |
+
|
131 |
+
|
132 |
+
?>
|
app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-upgrade-0.1.0-0.1.1.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$installer->run("
|
5 |
+
DROP TABLE IF EXISTS `{$this->getTable('user_template_design')}`;
|
6 |
+
|
7 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('user_template_design')}` (
|
8 |
+
`id` INT UNSIGNED NOT NULL auto_increment,
|
9 |
+
`user_id` varchar(100) NOT NULL default '',
|
10 |
+
`product_id` int(11) NOT NULL,
|
11 |
+
`pdf_url` varchar(255) default NULL,
|
12 |
+
`pdf_lowresurl` varchar(255) default NULL,
|
13 |
+
`image_url` varchar(255) default NULL,
|
14 |
+
PRIMARY KEY (`id`)
|
15 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
16 |
+
|
17 |
+
");
|
18 |
+
$installer->endSetup();
|
19 |
+
?>
|
app/code/community/Printshop/Syncproduct/sql/syncproduct_setup/mysql4-upgrade-0.1.1-1.1.3.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$installer->run("
|
5 |
+
|
6 |
+
DROP TABLE IF EXISTS `{$this->getTable('syncproduct_guest_ibright')}`;
|
7 |
+
|
8 |
+
CREATE TABLE `{$this->getTable('syncproduct_guest_ibright')}` (
|
9 |
+
`id` int(10) unsigned NOT NULL auto_increment,
|
10 |
+
`ibright_guest_url` varchar(255) default NULL,
|
11 |
+
`ibright_guest_login` varchar(100) default NULL,
|
12 |
+
`ibright_guest_password` varchar(100) default NULL,
|
13 |
+
`created_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
14 |
+
`updated_at` timestamp NOT NULL default '0000-00-00 00:00:00',
|
15 |
+
PRIMARY KEY (`id`)
|
16 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
17 |
+
|
18 |
+
UPDATE `{$this->getTable('catalog_eav_attribute')}` cea
|
19 |
+
INNER JOIN `{$this->getTable('eav_attribute')}` ea ON ea.attribute_id = cea.attribute_id
|
20 |
+
SET cea.used_in_product_listing = '1'
|
21 |
+
WHERE ea.attribute_code = 'print_product';
|
22 |
+
|
23 |
+
UPDATE `{$this->getTable('catalog_eav_attribute')}` cea
|
24 |
+
INNER JOIN `{$this->getTable('eav_attribute')}` ea ON ea.attribute_id = cea.attribute_id
|
25 |
+
SET cea.used_in_product_listing = '1'
|
26 |
+
WHERE ea.attribute_code = 'template_id';
|
27 |
+
|
28 |
+
");
|
29 |
+
$installer->endSetup();
|
30 |
+
?>
|
app/design/adminhtml/default/default/layout/productpdf.xml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<layout>
|
3 |
+
<adminhtml_sales_order_view>
|
4 |
+
<reference name="sales_order_tabs">
|
5 |
+
<action method="addTab"><name>order_productpdf</name>
|
6 |
+
<block>productpdf/adminhtml_sales_order_view_tab_productpdf</block>
|
7 |
+
</action>
|
8 |
+
</reference>
|
9 |
+
|
10 |
+
</adminhtml_sales_order_view>
|
11 |
+
<adminhtml_sales_order_productpdf>
|
12 |
+
<reference name="left">
|
13 |
+
<block type="adminhtml/sales_order_view_tabs" name="sales_order_tabs">
|
14 |
+
<block type="adminhtml/sales_order_view_info" name="order_info" template="sales/order/view/info.phtml"></block>
|
15 |
+
</block>
|
16 |
+
|
17 |
+
|
18 |
+
</reference>
|
19 |
+
<reference name="content">
|
20 |
+
<block type="adminhtml/sales_order" name="sales_order.productpdf" template="productpdf/sales/order/view/tab/userpdf.phtml" />
|
21 |
+
|
22 |
+
</reference>
|
23 |
+
|
24 |
+
</adminhtml_sales_order_productpdf>
|
25 |
+
</layout>
|
app/design/adminhtml/default/default/layout/syncproduct.xml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<syncproduct_adminhtml_syncproduct_index>
|
4 |
+
<reference name="left">
|
5 |
+
<block type="syncproduct/adminhtml_syncproduct_edit_tabs" name="syncproduct/adminhtml_syncproduct_edit_tabs" />
|
6 |
+
</reference>
|
7 |
+
<reference name="content">
|
8 |
+
<block type="syncproduct/adminhtml_syncproduct_edit" name="syncproduct/adminhtml_syncproduct_edit" template="syncproduct/edit.phtml" />
|
9 |
+
<block type="syncproduct/adminhtml_syncproduct" name="syncproduct/adminhtml_syncproduct" />
|
10 |
+
</reference>
|
11 |
+
|
12 |
+
</syncproduct_adminhtml_syncproduct_index>
|
13 |
+
<syncproduct_adminhtml_syncproduct_synclog>
|
14 |
+
<reference name="left">
|
15 |
+
<block type="syncproduct/adminhtml_syncproduct_synclog_tabs" name="syncproduct/adminhtml_syncproduct_edit_tabs" />
|
16 |
+
</reference>
|
17 |
+
<reference name="content">
|
18 |
+
<block type="syncproduct/adminhtml_syncproduct_synclog" name="syncproduct/adminhtml_syncproduct" template="syncproduct/log.phtml" />
|
19 |
+
</reference>
|
20 |
+
|
21 |
+
</syncproduct_adminhtml_syncproduct_synclog>
|
22 |
+
<syncproduct_adminhtml_syncproduct_frontendsetup>
|
23 |
+
<reference name="left">
|
24 |
+
<block type="syncproduct/adminhtml_syncproduct_frontendsetup_tabs" name="syncproduct/adminhtml_syncproduct_edit_tabs" />
|
25 |
+
</reference>
|
26 |
+
<reference name="content">
|
27 |
+
<block type="syncproduct/adminhtml_syncproduct_frontendsetup" name="syncproduct/adminhtml_syncproduct" template="syncproduct/frontendsetup.phtml" />
|
28 |
+
</reference>
|
29 |
+
</syncproduct_adminhtml_syncproduct_frontendsetup>
|
30 |
+
<syncproduct_adminhtml_syncproduct_adminsetup>
|
31 |
+
<reference name="left">
|
32 |
+
<block type="syncproduct/adminhtml_syncproduct_adminsetup_tabs" name="syncproduct/adminhtml_syncproduct_edit_tabs" />
|
33 |
+
</reference>
|
34 |
+
<reference name="content">
|
35 |
+
<block type="syncproduct/adminhtml_syncproduct_adminsetup" name="syncproduct/adminhtml_syncproduct" template="syncproduct/adminsetup.phtml" />
|
36 |
+
</reference>
|
37 |
+
</syncproduct_adminhtml_syncproduct_adminsetup>
|
38 |
+
<syncproduct_adminhtml_syncproduct_guestsetup>
|
39 |
+
<reference name="left">
|
40 |
+
<block type="syncproduct/adminhtml_syncproduct_guestsetup_tabs" name="syncproduct/adminhtml_syncproduct_edit_tabs" />
|
41 |
+
</reference>
|
42 |
+
<reference name="content">
|
43 |
+
<block type="syncproduct/adminhtml_syncproduct_guestsetup" name="syncproduct/adminhtml_syncproduct" template="syncproduct/guestsetup.phtml" />
|
44 |
+
</reference>
|
45 |
+
</syncproduct_adminhtml_syncproduct_guestsetup>
|
46 |
+
</layout>
|
app/design/adminhtml/default/default/template/productpdf/sales/order/view/tab/userpdf.phtml
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $orderId = $this->getRequest()->getParam('order_id');
|
2 |
+
$order = Mage::getResourceModel('sales/order_item_collection')->addFieldToFilter('order_id', $orderId);
|
3 |
+
$arrPdfData = array();
|
4 |
+
foreach($order as $quoteItem) {
|
5 |
+
$quoteItemId = $quoteItem->getQuoteItemId();
|
6 |
+
// get product PDF...
|
7 |
+
$getItemDetail = Mage::getModel('sales/quote_item')->load($quoteItemId);
|
8 |
+
$arrPdfData[] = $getItemDetail->getProductPdf();
|
9 |
+
}
|
10 |
+
Mage::getSingleton('core/session')->setPdfdata($arrPdfData);
|
11 |
+
?>
|
12 |
+
<div class="entry-edit">
|
13 |
+
<div class="entry-edit-head">
|
14 |
+
<h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('User PDF') ?></h4>
|
15 |
+
</div>
|
16 |
+
<fieldset>
|
17 |
+
<ul class="note-list">
|
18 |
+
<?php
|
19 |
+
$arrPdfData = Mage::getSingleton('core/session')->getPdfdata();
|
20 |
+
|
21 |
+
if(count($arrPdfData)>0){
|
22 |
+
foreach($arrPdfData as $productPdf)
|
23 |
+
{
|
24 |
+
|
25 |
+
?>
|
26 |
+
|
27 |
+
<a href="<?php echo $productPdf ?>" title="Design">Download User PDF</a><br />
|
28 |
+
|
29 |
+
<?php } } else {
|
30 |
+
?>
|
31 |
+
No User PDF.
|
32 |
+
<?php
|
33 |
+
}?>
|
34 |
+
|
35 |
+
|
36 |
+
</ul>
|
37 |
+
</fieldset>
|
38 |
+
</div>
|
app/design/adminhtml/default/default/template/syncproduct/adminsetup.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$arrData = Mage::registry('adminData');
|
3 |
+
?>
|
4 |
+
<div id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
5 |
+
<div class="content-header">
|
6 |
+
<h3 class="icon-head head-adminhtml-syncproduct">Admin Connection Setup</h3>
|
7 |
+
<p class="form-buttons"><button style="" onclick="credentialsForm.submit();" class="scalable save" type="button" id="id_81d3377e908884e6e85315cdb272b4f7"><span>Save Data</span></button></p>
|
8 |
+
</div>
|
9 |
+
|
10 |
+
<div class="entry-edit">
|
11 |
+
<form method="post" action="<?php echo $this->getUrl('*/*/adminsetup');?>" id="credentials_form" name="credentials_form"><div><input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey()?>" name="form_key"></div>
|
12 |
+
<div style="" id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
13 |
+
<div class="entry-edit-head">
|
14 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Magento-iBright Admin Connection</h4>
|
15 |
+
<div class="form-buttons"></div>
|
16 |
+
</div>
|
17 |
+
<div id="syncproduct_form" class="fieldset ">
|
18 |
+
<div class="hor-scroll">
|
19 |
+
<table cellspacing="0" class="form-list">
|
20 |
+
<tbody>
|
21 |
+
<tr>
|
22 |
+
<td class="label"><label for="ibrighturl">iBright Server <span class="required">*</span></label></td>
|
23 |
+
<td class="value">
|
24 |
+
<input type="text" style="width:450px;" class="required-entry input-text required-entry" title="iBright Server" name="ibrighturl" id="ibrighturl" value="<?php echo $arrData['ibright_url']; ?>" />
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
<tr>
|
28 |
+
<td class="label"><label for="ibrightuser">User <span class="required">*</span></label></td>
|
29 |
+
<td class="value">
|
30 |
+
<input type="text" style="width:150px;" class="required-entry input-text required-entry" title="User" name="ibrightuser" id="ibrightuser" value="<?php echo $arrData['ibright_login']; ?>" />
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr>
|
34 |
+
<td class="label"><label for="ibrightpassword">Password <span class="required">*</span></label></td>
|
35 |
+
<td class="value">
|
36 |
+
<input type="password" style="width:150px;" class="required-entry input-text required-entry" title="Password" name="ibrightpassword" id="ibrightpassword" value="<?php echo base64_decode($arrData['ibright_password']); ?>" />
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
</tbody>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</form>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<script type="text/javascript">
|
50 |
+
credentialsForm = new varienForm('credentials_form', '');
|
51 |
+
</script>
|
app/design/adminhtml/default/default/template/syncproduct/edit.phtml
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="content-header">
|
2 |
+
<h3 class="icon-head head-adminhtml-syncproduct">Go Import Data >></h3><p class="form-buttons"><button style="" onclick="showLoader();" class="scalable save" type="button"><span>Go >> Import Product Data</span></button></p>
|
3 |
+
</div>
|
4 |
+
<div style="left: -2px; top: 0px; width: 1349px; height: 1324px;display:none;" id="loading-mask">
|
5 |
+
<p id="loading_mask_loader" class="loader"><img alt="Loading..." src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" /><br>Please wait...</p>
|
6 |
+
</div>
|
7 |
+
|
8 |
+
<div class="entry-edit">
|
9 |
+
<form method="post" action="<?php echo $this->getUrl('*/*/importproduct');?>" id="edit_form">
|
10 |
+
<div><input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey()?>" name="form_key"></div>
|
11 |
+
<div style="" id="syncproduct_tabs_form_section_content">
|
12 |
+
<div class="entry-edit"></div>
|
13 |
+
</div>
|
14 |
+
<div style="display:none;" id="syncproduct_tabs_syncproduct_logs_content"></div>
|
15 |
+
<div style="display:none;" id="syncproduct_tabs_frontend_credentails_content"></div>
|
16 |
+
<div style="display:none;" id="syncproduct_tabs_admin_setup_content"></div>
|
17 |
+
</form>
|
18 |
+
</div>
|
19 |
+
<script type="text/javascript">
|
20 |
+
editForm = new varienForm('edit_form');
|
21 |
+
function showLoader(){
|
22 |
+
$('loading-mask').show();
|
23 |
+
editForm.submit()
|
24 |
+
}
|
25 |
+
</script>
|
app/design/adminhtml/default/default/template/syncproduct/frontendsetup.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$arrData = Mage::registry('frontData');
|
3 |
+
?>
|
4 |
+
<div id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
5 |
+
<div class="content-header">
|
6 |
+
<h3 class="icon-head head-adminhtml-syncproduct">Frontend Connection Setup</h3>
|
7 |
+
<p class="form-buttons"><button style="" onclick="credentialsForm.submit();" class="scalable save" type="button" id="id_81d3377e908884e6e85315cdb272b4f7"><span>Save Data</span></button></p>
|
8 |
+
</div>
|
9 |
+
|
10 |
+
<div class="entry-edit">
|
11 |
+
<form method="post" action="<?php echo $this->getUrl('*/*/frontendsetup');?>" id="credentials_form" name="credentials_form"><div><input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey()?>" name="form_key"></div>
|
12 |
+
<div style="" id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
13 |
+
<div class="entry-edit-head">
|
14 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Magento-iBright Frontend Credentials</h4>
|
15 |
+
<div class="form-buttons"></div>
|
16 |
+
</div>
|
17 |
+
<div id="syncproduct_form" class="fieldset ">
|
18 |
+
<div class="hor-scroll">
|
19 |
+
<table cellspacing="0" class="form-list">
|
20 |
+
<tbody>
|
21 |
+
<tr>
|
22 |
+
<td class="label"><label for="ibrightfrnturl">iBright Server <span class="required">*</span></label></td>
|
23 |
+
<td class="value">
|
24 |
+
<input type="text" style="width:450px;" class="required-entry input-text required-entry" title="iBright Server" name="ibrightfrnturl" id="ibrightfrnturl" value="<?php echo $arrData['ibright_frontend_url']; ?>" />
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
<tr>
|
28 |
+
<td class="label"><label for="ibrightfrntuser">User <span class="required">*</span></label></td>
|
29 |
+
<td class="value">
|
30 |
+
<input type="text" style="width:150px;" class="required-entry input-text required-entry" title="User" name="ibrightfrntuser" id="ibrightfrntuser" value="<?php echo $arrData['ibright_frontend_login']; ?>" />
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr>
|
34 |
+
<td class="label"><label for="ibrightfrntpassword">Password <span class="required">*</span></label></td>
|
35 |
+
<td class="value">
|
36 |
+
<input type="password" style="width:150px;" class="required-entry input-text required-entry" title="Password" name="ibrightfrntpassword" id="ibrightfrntpassword" value="<?php echo base64_decode($arrData['ibright_frontend_password']); ?>" />
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
</tbody>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</form>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<script type="text/javascript">
|
50 |
+
credentialsForm = new varienForm('credentials_form', '');
|
51 |
+
</script>
|
app/design/adminhtml/default/default/template/syncproduct/guestsetup.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$arrData = Mage::registry('guestData');
|
3 |
+
?>
|
4 |
+
<div id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
5 |
+
<div class="content-header">
|
6 |
+
<h3 class="icon-head head-adminhtml-syncproduct">Guest Connection Setup</h3>
|
7 |
+
<p class="form-buttons"><button style="" onclick="credentialsForm.submit();" class="scalable save" type="button" id="id_81d3377e908884e6e85315cdb272b4f7"><span>Save Data</span></button></p>
|
8 |
+
</div>
|
9 |
+
|
10 |
+
<div class="entry-edit">
|
11 |
+
<form method="post" action="<?php echo $this->getUrl('*/*/guestsetup');?>" id="credentials_form" name="credentials_form"><div><input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey()?>" name="form_key"></div>
|
12 |
+
<div style="" id="syncproduct_tabs_form_section_content"><div class="entry-edit">
|
13 |
+
<div class="entry-edit-head">
|
14 |
+
<h4 class="icon-head head-edit-form fieldset-legend">Magento-iBright Guest Credentials</h4>
|
15 |
+
<div class="form-buttons"></div>
|
16 |
+
</div>
|
17 |
+
<div id="syncproduct_form" class="fieldset ">
|
18 |
+
<div class="hor-scroll">
|
19 |
+
<table cellspacing="0" class="form-list">
|
20 |
+
<tbody>
|
21 |
+
<tr>
|
22 |
+
<td class="label"><label for="ibrightguesturl">iBright Server <span class="required">*</span></label></td>
|
23 |
+
<td class="value">
|
24 |
+
<input type="text" style="width:450px;" class="required-entry input-text required-entry" title="iBright Server" name="ibrightguesturl" id="ibrightguesturl" value="<?php echo $arrData['ibright_guest_url']; ?>" />
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
<tr>
|
28 |
+
<td class="label"><label for="ibrightguestuser">User <span class="required">*</span></label></td>
|
29 |
+
<td class="value">
|
30 |
+
<input type="text" style="width:150px;" class="required-entry input-text required-entry" title="User" name="ibrightguestuser" id="ibrightguestuser" value="<?php echo ($arrData['ibright_guest_login'])?$arrData['ibright_guest_login']:'anonymous'; ?>" />
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr style="display:none;">
|
34 |
+
<td class="label"><label for="ibrightguestpassword">Password <span class="required">*</span></label></td>
|
35 |
+
<td class="value">
|
36 |
+
<input type="password" style="width:150px;" class="required-entry input-text required-entry" title="Password" name="ibrightguestpassword" id="ibrightguestpassword" value="<?php echo ($arrData['ibright_guest_password'])?base64_decode($arrData['ibright_guest_password']):'password'; ?>" />
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
</tbody>
|
40 |
+
</table>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</form>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<script type="text/javascript">
|
50 |
+
credentialsForm = new varienForm('credentials_form', '');
|
51 |
+
</script>
|
app/design/adminhtml/default/default/template/syncproduct/log.phtml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$logFile = "./var". DS. "synclog". DS. "log.txt";
|
3 |
+
$logFileContent = file_get_contents($logFile);
|
4 |
+
if(file_exists($logFile))
|
5 |
+
$getFileContent= explode("\n" ,file_get_contents($logFile));?>
|
6 |
+
<div style="border:1px solid black;padding: 10px; height:400px; overflow:auto;">
|
7 |
+
<table width="80%" align="center" cellpadding="2" cellspacing="2">
|
8 |
+
<?php if((!file_exists($logFile)) || (empty($logFileContent))):?>
|
9 |
+
<tr>
|
10 |
+
<td><?php echo $this->__('No log is generated')?></td>
|
11 |
+
</tr>
|
12 |
+
<?php else:?>
|
13 |
+
<?php foreach($getFileContent as $log) {?>
|
14 |
+
<tr>
|
15 |
+
<?php $logRecords = explode("\t", $log);?>
|
16 |
+
<?php foreach($logRecords as $data) {?>
|
17 |
+
<td><?php echo $data ?></td>
|
18 |
+
<?php }?>
|
19 |
+
</tr>
|
20 |
+
<?php }?>
|
21 |
+
<?php endif?>
|
22 |
+
</table>
|
23 |
+
</div>
|
app/design/frontend/base/default/layout/printshop.xml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<catalog_category_layered translate="label">
|
4 |
+
<reference name="product_list">
|
5 |
+
<action method="setTemplate"><template>catalog/productlist.phtml</template></action>
|
6 |
+
</reference>
|
7 |
+
</catalog_category_layered>
|
8 |
+
<catalog_product_view translate="label">
|
9 |
+
|
10 |
+
<reference name="product.info">
|
11 |
+
<block type="catalog/product_view" name="product.info" template="catalog/catalog.phtml" as="printshop">
|
12 |
+
<!--
|
13 |
+
<action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/summary.phtml</template></action>
|
14 |
+
<action method="addReviewSummaryTemplate"><type>short</type><template>review/helper/summary_short.phtml</template></action>
|
15 |
+
<action method="addReviewSummaryTemplate"><type>...</type><template>...</template></action>
|
16 |
+
-->
|
17 |
+
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/printshop_media.phtml"/>
|
18 |
+
<block type="core/text_list" name="alert.urls" as="alert_urls" translate="label">
|
19 |
+
<label>Alert Urls</label>
|
20 |
+
</block>
|
21 |
+
|
22 |
+
<action method="setTierPriceTemplate"><template>catalog/product/view/tierprices.phtml</template></action>
|
23 |
+
<!-- Tab Visible Code Start Here -->
|
24 |
+
<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
|
25 |
+
<action method="addTab" translate="title" module="catalog"><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action>
|
26 |
+
<action method="addTab" translate="title" module="catalog"><alias>upsell_products</alias><title>We Also Recommend</title><block>catalog/product_list_upsell</block><template>catalog/product/list/upsell.phtml</template></action>
|
27 |
+
<action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>
|
28 |
+
</block>
|
29 |
+
<!-- Tab Visible Code End Here -->
|
30 |
+
<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
|
31 |
+
<action method="setColumnCount"><columns>4</columns></action>
|
32 |
+
<action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
|
33 |
+
</block>
|
34 |
+
|
35 |
+
<block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" />
|
36 |
+
<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
|
37 |
+
<action method="addToParentGroup"><group>detailed_info</group></action>
|
38 |
+
</block>
|
39 |
+
<block type="catalog/product_view_attributes" name="product.attributes" as="additional" template="catalog/product/view/attributes.phtml">
|
40 |
+
<action method="addToParentGroup"><group>detailed_info</group></action>
|
41 |
+
</block>
|
42 |
+
<block type="catalog/product_view" name="product.info.addto" as="addto" template="catalog/product/view/addto.phtml"/>
|
43 |
+
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>
|
44 |
+
|
45 |
+
<block type="core/text_list" name="product.info.extrahint" as="extrahint" translate="label">
|
46 |
+
<label>Product View Extra Hint</label>
|
47 |
+
</block>
|
48 |
+
|
49 |
+
<block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
|
50 |
+
<label>Info Column Options Wrapper</label>
|
51 |
+
<block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
|
52 |
+
<block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
|
53 |
+
<action method="addOptionRenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action>
|
54 |
+
<action method="addOptionRenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action>
|
55 |
+
<action method="addOptionRenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action>
|
56 |
+
<action method="addOptionRenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action>
|
57 |
+
</block>
|
58 |
+
<block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/>
|
59 |
+
</block>
|
60 |
+
<block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
|
61 |
+
<label>Bottom Block Options Wrapper</label>
|
62 |
+
<action method="insert"><block>product.tierprices</block></action>
|
63 |
+
<block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
|
64 |
+
<action method="append"><block>product.info.addtocart</block></action>
|
65 |
+
<action method="append"><block>product.info.addto</block></action>
|
66 |
+
</block>
|
67 |
+
|
68 |
+
<block type="core/template_facade" name="product.info.container1" as="container1">
|
69 |
+
<action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
|
70 |
+
<action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
|
71 |
+
<action method="append"><block>product.info.options.wrapper</block></action>
|
72 |
+
<action method="append"><block>product.info.options.wrapper.bottom</block></action>
|
73 |
+
</block>
|
74 |
+
<block type="core/template_facade" name="product.info.container2" as="container2">
|
75 |
+
<action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
|
76 |
+
<action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
|
77 |
+
<action method="append"><block>product.info.options.wrapper</block></action>
|
78 |
+
<action method="append"><block>product.info.options.wrapper.bottom</block></action>
|
79 |
+
</block>
|
80 |
+
<action method="unsetCallChild"><child>container1</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
|
81 |
+
<action method="unsetCallChild"><child>container2</child><call>ifEquals</call><if>0</if><key>alias_in_layout</key><key>options_container</key></action>
|
82 |
+
</block>
|
83 |
+
</reference>
|
84 |
+
</catalog_product_view>
|
85 |
+
</layout>
|
app/design/frontend/base/default/layout/printshop_checkout.xml
ADDED
@@ -0,0 +1,405 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<!--
|
4 |
+
Default layout, loads most of the pages
|
5 |
+
-->
|
6 |
+
|
7 |
+
<default>
|
8 |
+
|
9 |
+
<!-- Mage_Checkout -->
|
10 |
+
<reference name="top.links">
|
11 |
+
<block type="checkout/links" name="checkout_cart_link">
|
12 |
+
<action method="addCartLink"></action>
|
13 |
+
<action method="addCheckoutLink"></action>
|
14 |
+
</block>
|
15 |
+
</reference>
|
16 |
+
<reference name="right">
|
17 |
+
<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-">
|
18 |
+
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
|
19 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
|
20 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
|
21 |
+
<block type="core/text_list" name="cart_sidebar.extra_actions" as="extra_actions" translate="label" module="checkout">
|
22 |
+
<label>Shopping Cart Sidebar Extra Actions</label>
|
23 |
+
</block>
|
24 |
+
</block>
|
25 |
+
</reference>
|
26 |
+
</default>
|
27 |
+
<checkout_cart_index translate="label">
|
28 |
+
<label>Shopping Cart</label>
|
29 |
+
<remove name="right"/>
|
30 |
+
<remove name="left"/>
|
31 |
+
<!-- Mage_Checkout -->
|
32 |
+
<reference name="root">
|
33 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
34 |
+
</reference>
|
35 |
+
<reference name="content">
|
36 |
+
<block type="checkout/cart" name="checkout.cart">
|
37 |
+
<action method="setCartTemplate"><value>checkout/printshop_cart.phtml</value></action>
|
38 |
+
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
|
39 |
+
<action method="chooseTemplate"/>
|
40 |
+
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/printshop_default.phtml</template></action>
|
41 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
|
42 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
|
43 |
+
|
44 |
+
<block type="core/text_list" name="checkout.cart.top_methods" as="top_methods" translate="label">
|
45 |
+
<label>Payment Methods Before Checkout Button</label>
|
46 |
+
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
|
47 |
+
</block>
|
48 |
+
|
49 |
+
<block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
|
50 |
+
<label>Shopping Cart Form Before</label>
|
51 |
+
</block>
|
52 |
+
|
53 |
+
<block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
|
54 |
+
<label>Payment Methods After Checkout Button</label>
|
55 |
+
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
|
56 |
+
<block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
|
57 |
+
</block>
|
58 |
+
|
59 |
+
<block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
|
60 |
+
<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
|
61 |
+
<block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
|
62 |
+
|
63 |
+
<block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
|
64 |
+
</block>
|
65 |
+
</reference>
|
66 |
+
<block type="core/text_list" name="additional.product.info" translate="label">
|
67 |
+
<label>Additional Product Info</label>
|
68 |
+
</block>
|
69 |
+
</checkout_cart_index>
|
70 |
+
<!--
|
71 |
+
One page checkout main layout
|
72 |
+
-->
|
73 |
+
|
74 |
+
<checkout_onepage_index translate="label">
|
75 |
+
<label>One Page Checkout</label>
|
76 |
+
<!-- Mage_Checkout -->
|
77 |
+
<remove name="left"/>
|
78 |
+
|
79 |
+
<reference name="root">
|
80 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
81 |
+
</reference>
|
82 |
+
<reference name="right">
|
83 |
+
<action method="unsetChildren"></action>
|
84 |
+
<block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
|
85 |
+
<label>Checkout Progress Wrapper</label>
|
86 |
+
<action method="setElementId"><value>checkout-progress-wrapper</value></action>
|
87 |
+
<block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"/>
|
88 |
+
</block>
|
89 |
+
</reference>
|
90 |
+
<reference name="content">
|
91 |
+
<block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml">
|
92 |
+
<block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml">
|
93 |
+
<block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before" translate="label">
|
94 |
+
<label>Login/Registration Before</label>
|
95 |
+
<action method="setMayBeInvisible"><value>1</value></action>
|
96 |
+
</block>
|
97 |
+
</block>
|
98 |
+
<block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/>
|
99 |
+
<block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/>
|
100 |
+
<block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml">
|
101 |
+
<block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
|
102 |
+
<block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
|
103 |
+
</block>
|
104 |
+
<block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml">
|
105 |
+
<block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml">
|
106 |
+
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
107 |
+
</block>
|
108 |
+
</block>
|
109 |
+
<block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
|
110 |
+
</block>
|
111 |
+
</reference>
|
112 |
+
</checkout_onepage_index>
|
113 |
+
<checkout_cart_configure translate="label">
|
114 |
+
<label>Configure Cart Item</label>
|
115 |
+
<update handle="catalog_product_view"/>
|
116 |
+
<reference name="product.info">
|
117 |
+
<block type="checkout/cart_item_configure" name="checkout.cart.item.configure.block"></block>
|
118 |
+
</reference>
|
119 |
+
</checkout_cart_configure>
|
120 |
+
|
121 |
+
<!--
|
122 |
+
Multi address shipping checkout main layout,
|
123 |
+
will be rendered on all checkout pages
|
124 |
+
-->
|
125 |
+
|
126 |
+
<checkout_multishipping translate="label">
|
127 |
+
<label>Multishipping Checkout</label>
|
128 |
+
<!-- Mage_Checkout -->
|
129 |
+
<remove name="right"/>
|
130 |
+
<remove name="left"/>
|
131 |
+
|
132 |
+
<reference name="root">
|
133 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
134 |
+
</reference>
|
135 |
+
<reference name="content">
|
136 |
+
<block type="checkout/multishipping_state" name="checkout_state" template="checkout/multishipping/state.phtml"/>
|
137 |
+
</reference>
|
138 |
+
</checkout_multishipping>
|
139 |
+
|
140 |
+
<checkout_multishipping_login>
|
141 |
+
<update handle="customer_account_login"/>
|
142 |
+
</checkout_multishipping_login>
|
143 |
+
|
144 |
+
<checkout_multishipping_register>
|
145 |
+
<update handle="customer_account_create"/>
|
146 |
+
</checkout_multishipping_register>
|
147 |
+
|
148 |
+
<!--
|
149 |
+
Multi address shipping checkout selection of address per item page
|
150 |
+
-->
|
151 |
+
|
152 |
+
<checkout_multishipping_address_select translate="label">
|
153 |
+
<label>Multishipping Checkout Shipping Address Selection</label>
|
154 |
+
<update handle="checkout_multishipping"/>
|
155 |
+
<!-- Mage_Checkout -->
|
156 |
+
<reference name="content">
|
157 |
+
<block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
|
158 |
+
</reference>
|
159 |
+
</checkout_multishipping_address_select>
|
160 |
+
|
161 |
+
<checkout_multishipping_address_selectbilling translate="label">
|
162 |
+
<label>Multishipping Checkout Billing Address Selection</label>
|
163 |
+
<update handle="checkout_multishipping"/>
|
164 |
+
<!-- Mage_Checkout -->
|
165 |
+
<reference name="content">
|
166 |
+
<block type="checkout/multishipping_address_select" name="checkout_address_select" template="checkout/multishipping/address/select.phtml"/>
|
167 |
+
</reference>
|
168 |
+
</checkout_multishipping_address_selectbilling>
|
169 |
+
|
170 |
+
|
171 |
+
<checkout_multishipping_address_newshipping translate="label">
|
172 |
+
<label>Multishipping Checkout Shipping Address Creation</label>
|
173 |
+
<update handle="checkout_multishipping"/>
|
174 |
+
<update handle="checkout_multishipping_customer_address"/>
|
175 |
+
</checkout_multishipping_address_newshipping>
|
176 |
+
|
177 |
+
<checkout_multishipping_address_newbilling translate="label">
|
178 |
+
<label>Multishipping Checkout Billing Address Creation</label>
|
179 |
+
<update handle="checkout_multishipping"/>
|
180 |
+
<update handle="checkout_multishipping_customer_address"/>
|
181 |
+
</checkout_multishipping_address_newbilling>
|
182 |
+
|
183 |
+
<checkout_multishipping_address_editshipping translate="label">
|
184 |
+
<label>Multishipping Checkout Shipping Address Edit Form</label>
|
185 |
+
<update handle="checkout_multishipping"/>
|
186 |
+
<update handle="checkout_multishipping_customer_address"/>
|
187 |
+
</checkout_multishipping_address_editshipping>
|
188 |
+
|
189 |
+
<checkout_multishipping_address_editaddress>
|
190 |
+
<update handle="checkout_multishipping"/>
|
191 |
+
<update handle="checkout_multishipping_customer_address"/>
|
192 |
+
</checkout_multishipping_address_editaddress>
|
193 |
+
|
194 |
+
<checkout_multishipping_address_editbilling translate="label">
|
195 |
+
<label>Multishipping Checkout Billing Address Edit Form</label>
|
196 |
+
<update handle="checkout_multishipping"/>
|
197 |
+
<update handle="checkout_multishipping_customer_address"/>
|
198 |
+
</checkout_multishipping_address_editbilling>
|
199 |
+
|
200 |
+
<checkout_multishipping_customer_address translate="label">
|
201 |
+
<label>Multishipping Checkout Customer Address Edit Form</label>
|
202 |
+
<reference name="content">
|
203 |
+
<block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
|
204 |
+
</reference>
|
205 |
+
</checkout_multishipping_customer_address>
|
206 |
+
|
207 |
+
<!--
|
208 |
+
Multi address shipping checkout address page
|
209 |
+
-->
|
210 |
+
|
211 |
+
<checkout_multishipping_addresses translate="label">
|
212 |
+
<label>Multishipping Checkout Address (Any) Form</label>
|
213 |
+
<update handle="checkout_multishipping"/>
|
214 |
+
<!-- Mage_Checkout -->
|
215 |
+
<reference name="content">
|
216 |
+
<block type="checkout/multishipping_addresses" name="checkout_addresses" template="checkout/multishipping/addresses.phtml">
|
217 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
218 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
219 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
220 |
+
</block>
|
221 |
+
</reference>
|
222 |
+
</checkout_multishipping_addresses>
|
223 |
+
|
224 |
+
<!--
|
225 |
+
Multi address shipping checkout shipping information
|
226 |
+
-->
|
227 |
+
|
228 |
+
<checkout_multishipping_shipping translate="label">
|
229 |
+
<label>Multishipping Checkout Shipping Information Step</label>
|
230 |
+
<update handle="checkout_multishipping"/>
|
231 |
+
<!-- Mage_Checkout -->
|
232 |
+
<reference name="content">
|
233 |
+
<block type="checkout/multishipping_shipping" name="checkout_shipping" template="checkout/multishipping/shipping.phtml">
|
234 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
235 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
236 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
237 |
+
|
238 |
+
<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
|
239 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
240 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
241 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
242 |
+
</block>
|
243 |
+
</block>
|
244 |
+
</reference>
|
245 |
+
</checkout_multishipping_shipping>
|
246 |
+
|
247 |
+
<!--
|
248 |
+
Multi address shipping checkout billing information
|
249 |
+
-->
|
250 |
+
|
251 |
+
<checkout_multishipping_billing translate="label">
|
252 |
+
<label>Multishipping Checkout Billing Information Step</label>
|
253 |
+
<update handle="checkout_multishipping"/>
|
254 |
+
<!-- Mage_Checkout -->
|
255 |
+
<reference name="content">
|
256 |
+
<block type="checkout/multishipping_billing" name="checkout_billing" template="checkout/multishipping/billing.phtml">
|
257 |
+
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
258 |
+
|
259 |
+
<!--<block type="checkout/multishipping_billing_items" name="checkout_billing_items" template="checkout/multishipping/billing/items.phtml">
|
260 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
261 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
262 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
263 |
+
</block>-->
|
264 |
+
|
265 |
+
</block>
|
266 |
+
</reference>
|
267 |
+
</checkout_multishipping_billing>
|
268 |
+
|
269 |
+
<!--
|
270 |
+
Multi address shipping checkout overview
|
271 |
+
-->
|
272 |
+
|
273 |
+
<checkout_multishipping_overview translate="label">
|
274 |
+
<label>Multishipping Checkout Overview</label>
|
275 |
+
<update handle="checkout_multishipping"/>
|
276 |
+
<!-- Mage_Checkout -->
|
277 |
+
<reference name="content">
|
278 |
+
<block type="checkout/multishipping_overview" name="checkout_overview" template="checkout/multishipping/overview.phtml">
|
279 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
280 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
281 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
282 |
+
<action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
|
283 |
+
<action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
|
284 |
+
<block type="checkout/multishipping_payment_info" name="payment_info">
|
285 |
+
<action method="setInfoTemplate"><method></method><template></template></action>
|
286 |
+
</block>
|
287 |
+
<block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
|
288 |
+
<block type="checkout/cart_totals" name="totals" />
|
289 |
+
<block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
|
290 |
+
<label>Overview Items After</label>
|
291 |
+
</block>
|
292 |
+
</block>
|
293 |
+
</reference>
|
294 |
+
</checkout_multishipping_overview>
|
295 |
+
|
296 |
+
<!--
|
297 |
+
Multi address shipping checkout success
|
298 |
+
-->
|
299 |
+
|
300 |
+
<checkout_multishipping_success translate="label">
|
301 |
+
<label>Multishipping Checkout Success</label>
|
302 |
+
<update handle="checkout_multishipping"/>
|
303 |
+
<!-- Mage_Checkout -->
|
304 |
+
<reference name="content">
|
305 |
+
<block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
|
306 |
+
</reference>
|
307 |
+
</checkout_multishipping_success>
|
308 |
+
|
309 |
+
<!--
|
310 |
+
One page checkout progress block
|
311 |
+
-->
|
312 |
+
|
313 |
+
<checkout_onepage_progress>
|
314 |
+
<!-- Mage_Checkout -->
|
315 |
+
<remove name="right"/>
|
316 |
+
<remove name="left"/>
|
317 |
+
|
318 |
+
<block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml">
|
319 |
+
<block type="checkout/onepage_payment_info" name="payment_info">
|
320 |
+
<action method="setInfoTemplate"><method></method><template></template></action>
|
321 |
+
</block>
|
322 |
+
</block>
|
323 |
+
</checkout_onepage_progress>
|
324 |
+
|
325 |
+
<!--
|
326 |
+
One page checkout payment methods block
|
327 |
+
-->
|
328 |
+
<checkout_onepage_paymentmethod>
|
329 |
+
<remove name="right"/>
|
330 |
+
<remove name="left"/>
|
331 |
+
|
332 |
+
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
|
333 |
+
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
334 |
+
</block>
|
335 |
+
</checkout_onepage_paymentmethod>
|
336 |
+
|
337 |
+
|
338 |
+
<!--
|
339 |
+
One page checkout shipping methods block
|
340 |
+
-->
|
341 |
+
|
342 |
+
<checkout_onepage_shippingmethod>
|
343 |
+
<!-- Mage_Checkout -->
|
344 |
+
<remove name="right"/>
|
345 |
+
<remove name="left"/>
|
346 |
+
|
347 |
+
<block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/>
|
348 |
+
</checkout_onepage_shippingmethod>
|
349 |
+
|
350 |
+
<checkout_onepage_additional>
|
351 |
+
<!-- Mage_Checkout -->
|
352 |
+
<remove name="right"/>
|
353 |
+
<remove name="left"/>
|
354 |
+
|
355 |
+
<block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml">
|
356 |
+
<action method="setDontDisplayContainer"><param>1</param></action>
|
357 |
+
</block>
|
358 |
+
</checkout_onepage_additional>
|
359 |
+
|
360 |
+
<!--
|
361 |
+
One page checkout order review block
|
362 |
+
-->
|
363 |
+
|
364 |
+
<checkout_onepage_review translate="label">
|
365 |
+
<label>One Page Checkout Overview</label>
|
366 |
+
<!-- Mage_Checkout -->
|
367 |
+
<remove name="right"/>
|
368 |
+
<remove name="left"/>
|
369 |
+
|
370 |
+
<block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml">
|
371 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action>
|
372 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action>
|
373 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action>
|
374 |
+
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/>
|
375 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
|
376 |
+
<label>Items Before</label>
|
377 |
+
</block>
|
378 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
|
379 |
+
<label>Items After</label>
|
380 |
+
</block>
|
381 |
+
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
|
382 |
+
<block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/>
|
383 |
+
</block>
|
384 |
+
</checkout_onepage_review>
|
385 |
+
|
386 |
+
<checkout_onepage_success translate="label">
|
387 |
+
<label>One Page Checkout Success</label>
|
388 |
+
<reference name="root">
|
389 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
390 |
+
</reference>
|
391 |
+
<reference name="content">
|
392 |
+
<block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
|
393 |
+
</reference>
|
394 |
+
</checkout_onepage_success>
|
395 |
+
<checkout_onepage_failure translate="label">
|
396 |
+
<label>One Page Checkout Failure</label>
|
397 |
+
<reference name="root">
|
398 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
399 |
+
</reference>
|
400 |
+
<reference name="content">
|
401 |
+
<block type="checkout/onepage_failure" name="checkout.failure" template="checkout/onepage/failure.phtml"/>
|
402 |
+
</reference>
|
403 |
+
</checkout_onepage_failure>
|
404 |
+
<block type="core/list" name="additional.product.info"/>
|
405 |
+
</layout>
|
app/design/frontend/base/default/locale/en_US/translate.csv
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Keep your eyes open for our special Back to School items and save A LOT!","Keep your eyes open for our special Back to School items and save A LOT!"
|
2 |
+
"Your design and save your pictures","Your design and save your pictures"
|
3 |
+
"To save your design and your pictures, we create an account for you. So you can view your pictures and designs at any time even further edit and send friends.","To save your design and your pictures, we create an account for you. So you can view your pictures and designs at any time even further edit and send friends."
|
4 |
+
"login","login"
|
5 |
+
"registration","registration"
|
6 |
+
"continue as a guest","continue as a guest"
|
7 |
+
"no data is stored","no data is stored"
|
app/design/frontend/base/default/template/catalog/catalog.phtml
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Product view template
|
4 |
+
* Web@print
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<?php $_ibrightDetails = Mage::helper('syncproduct')->designToolDetails();?>
|
9 |
+
<?php $_helper = $this->helper('catalog/output'); ?>
|
10 |
+
<?php $_product = $this->getProduct();?>
|
11 |
+
|
12 |
+
|
13 |
+
<script type="text/javascript">
|
14 |
+
var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
|
15 |
+
$jq = jQuery.noConflict();
|
16 |
+
window.onload = responseUrl();
|
17 |
+
|
18 |
+
</script>
|
19 |
+
<div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
|
20 |
+
<div class="product-view">
|
21 |
+
<div class="product-essential">
|
22 |
+
<form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post" id="product_addtocart_form"<?php if($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
|
23 |
+
<div class="no-display">
|
24 |
+
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
25 |
+
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
26 |
+
</div>
|
27 |
+
<div class="product-shop">
|
28 |
+
<div class="product-name">
|
29 |
+
<h1><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
|
30 |
+
</div>
|
31 |
+
<?php
|
32 |
+
$isPrintProduct = $_product->getResource()->getAttribute('print_product')->getFrontend()->getValue($_product);
|
33 |
+
if($isPrintProduct == 'Yes'){
|
34 |
+
?>
|
35 |
+
<?php if($_product->isSaleable()): ?>
|
36 |
+
|
37 |
+
<div style="padding:10px 0px;">
|
38 |
+
<?php if(strpos($_product->getProductUrl(), "?"))
|
39 |
+
$returnPdtUrl = $_product->getProductUrl()."&";
|
40 |
+
else
|
41 |
+
$returnPdtUrl = $_product->getProductUrl()."?";
|
42 |
+
$pdtUrl = urlencode($returnPdtUrl);?>
|
43 |
+
|
44 |
+
<!-- Create XML for logged in users...-->
|
45 |
+
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
46 |
+
$userEmail = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
47 |
+
$userXml = urlencode('<?xml version="1.0" encoding="UTF-8"?><ticket id="magento"><user uid="'.$userEmail.'"></user></ticket>');
|
48 |
+
}?>
|
49 |
+
|
50 |
+
<button type="button" title="Individualize Template" <?php if(!Mage::getSingleton('customer/session')->isLoggedIn()) { ?> onclick="javascript:showBox();" <?php } else { ?> onclick="GB_showCenter('Design Your Template', '<?php echo $_ibrightDetails->getIbrightFrontendUrl();?>?xml=<?php echo $userXml?>×tamp=<?php echo urlencode(date('Y m d h:i:s'))?>&code=<?php echo urlencode('magentoclx')?>&forwardAfterLogin=individualize&templateId=<?php echo $_product->getTemplateId()?>&shopid=<?php echo Mage::getSingleton('customer/session')->getCustomer()->getId()?>&backurl=<?php echo $pdtUrl?>', 950, 950);" <?php } ?> class="button button-orange btn-cart"><span><span><?php echo $this->__('Design Tool') ?></span></span></button>
|
51 |
+
</div>
|
52 |
+
<?php endif; ?>
|
53 |
+
<?php }?>
|
54 |
+
<!--<h2><a href="/uploaddesign">You can also upload your own design</a></h2>-->
|
55 |
+
|
56 |
+
<?php if ($this->canEmailToFriend()): ?>
|
57 |
+
<p class="email-friend"><a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?></a></p>
|
58 |
+
<?php endif; ?>
|
59 |
+
<?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
|
60 |
+
<?php echo $this->getChildHtml('alert_urls') ?>
|
61 |
+
<?php echo $this->getChildHtml('product_type_data') ?>
|
62 |
+
<?php echo $this->getTierPriceHtml() ?>
|
63 |
+
<?php echo $this->getChildHtml('extrahint') ?>
|
64 |
+
|
65 |
+
<?php if (!$this->hasOptions()):?>
|
66 |
+
<div class="add-to-box">
|
67 |
+
<?php if($_product->isSaleable()): ?>
|
68 |
+
<?php echo $this->getChildHtml('addtocart') ?>
|
69 |
+
<?php if( $this->helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?>
|
70 |
+
<span class="or"><?php echo $this->__('OR') ?></span>
|
71 |
+
<?php endif; ?>
|
72 |
+
<?php endif; ?>
|
73 |
+
<?php echo $this->getChildHtml('addto') ?>
|
74 |
+
</div>
|
75 |
+
<?php endif; ?>
|
76 |
+
|
77 |
+
<?php if ($_product->getShortDescription()):?>
|
78 |
+
<div class="short-description">
|
79 |
+
<h2><?php echo $this->__('Quick Overview') ?></h2>
|
80 |
+
<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
|
81 |
+
</div>
|
82 |
+
<?php endif;?>
|
83 |
+
|
84 |
+
<?php echo $this->getChildHtml('other');?>
|
85 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
86 |
+
<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
|
87 |
+
<?php endif;?>
|
88 |
+
|
89 |
+
</div>
|
90 |
+
|
91 |
+
<div class="product-img-box">
|
92 |
+
<?php echo $this->getChildHtml('media') ?>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<div class="clearer"></div>
|
96 |
+
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
|
97 |
+
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
|
98 |
+
<?php endif;?>
|
99 |
+
</form>
|
100 |
+
<script type="text/javascript">
|
101 |
+
//<![CDATA[
|
102 |
+
var productAddToCartForm = new VarienForm('product_addtocart_form');
|
103 |
+
productAddToCartForm.submit = function(button, url) {
|
104 |
+
if (this.validator.validate()) {
|
105 |
+
var form = this.form;
|
106 |
+
var oldUrl = form.action;
|
107 |
+
|
108 |
+
if (url) {
|
109 |
+
form.action = url;
|
110 |
+
}
|
111 |
+
var e = null;
|
112 |
+
try {
|
113 |
+
this.form.submit();
|
114 |
+
} catch (e) {
|
115 |
+
}
|
116 |
+
this.form.action = oldUrl;
|
117 |
+
if (e) {
|
118 |
+
throw e;
|
119 |
+
}
|
120 |
+
|
121 |
+
if (button && button != 'undefined') {
|
122 |
+
button.disabled = true;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}.bind(productAddToCartForm);
|
126 |
+
|
127 |
+
productAddToCartForm.submitLight = function(button, url){
|
128 |
+
if(this.validator) {
|
129 |
+
var nv = Validation.methods;
|
130 |
+
delete Validation.methods['required-entry'];
|
131 |
+
delete Validation.methods['validate-one-required'];
|
132 |
+
delete Validation.methods['validate-one-required-by-name'];
|
133 |
+
if (this.validator.validate()) {
|
134 |
+
if (url) {
|
135 |
+
this.form.action = url;
|
136 |
+
}
|
137 |
+
this.form.submit();
|
138 |
+
}
|
139 |
+
Object.extend(Validation.methods, nv);
|
140 |
+
}
|
141 |
+
}.bind(productAddToCartForm);
|
142 |
+
//]]>
|
143 |
+
|
144 |
+
//function for dropdown box
|
145 |
+
function showBox() {
|
146 |
+
document.getElementById("backgroundPopup").style.display = "block";
|
147 |
+
document.getElementById("copyTemplateFormContainer").style.display = "block";
|
148 |
+
document.getElementById("copyTemplateForm").style.display = "block";
|
149 |
+
//$("#copyTemplateForm").slideDown("fast");
|
150 |
+
|
151 |
+
}
|
152 |
+
function closeBox()
|
153 |
+
{
|
154 |
+
document.getElementById("backgroundPopup").style.display = "none";
|
155 |
+
document.getElementById("copyTemplateFormContainer").style.display = "none";
|
156 |
+
document.getElementById("copyTemplateForm").style.display = "none";
|
157 |
+
//$("#copyTemplateForm").slideUp("fast");
|
158 |
+
|
159 |
+
}
|
160 |
+
</script>
|
161 |
+
</div>
|
162 |
+
|
163 |
+
<div class="product-collateral">
|
164 |
+
<?php echo $this->getChildHtml('info_tabs') ?>
|
165 |
+
<?php echo $this->getChildHtml('product_additional_data') ?>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
<!--Pop Up Section -->
|
169 |
+
<div id="copyTemplateFormContainer" style="border:1px solid #fff;display:none">
|
170 |
+
<?php Mage::getSingleton('customer/session')->setBeforeAuthUrl($_product->getProductUrl());?>
|
171 |
+
<div id="copyTemplateForm" class="form-holder">
|
172 |
+
<div class="panel-heading">
|
173 |
+
<h2><?php echo $this->__('Your design and save your pictures')?> !</h2>
|
174 |
+
</div>
|
175 |
+
<form action="" name="addCopyTemplateForm" id="addCopyTemplateForm" method="post">
|
176 |
+
<ul>
|
177 |
+
<li><a href="javascript:closeBox();" class="copyTemplate"></a></li>
|
178 |
+
<li>
|
179 |
+
<?php echo $this->__('To save your design and your pictures, we create an account for you. So you can view your pictures and designs at any time even further edit and send friends.'); ?>
|
180 |
+
</li>
|
181 |
+
<li style="height:30px;"> </li>
|
182 |
+
<li><button type="button" title="Login" onclick="window.location.href='/customer/account/login'" class="button btn-cart"><span><span><?php echo $this->__('login')?></span></span></button> <button type="button" title="Registration " onclick="window.location.href='/customer/account/create'" class="button btn-cart" style="padding-left:40px;"><span><span><?php echo $this->__('registration')?></span></span></button>
|
183 |
+
<?php if(strpos($_product->getProductUrl(), "?"))
|
184 |
+
$returnPdtUrl = $_product->getProductUrl()."&";
|
185 |
+
else
|
186 |
+
$returnPdtUrl = $_product->getProductUrl()."?";
|
187 |
+
$pdtUrl = urlencode($returnPdtUrl);?>
|
188 |
+
<?php $_ibrightGuestDetails = Mage::helper('syncproduct')->guestDesignToolDetails(); ?>
|
189 |
+
<button type="button" title="Login" onclick="GB_showCenter('Design Your Template', '<?php echo $_ibrightGuestDetails->getIbrightGuestUrl();?>?login=<?php echo $_ibrightGuestDetails->getIbrightGuestLogin()?>&forwardAfterLogin=individualize&templateId=<?php echo $_product->getTemplateId()?>&shopid=&backurl=<?php echo utf8_encode($pdtUrl)?>', 950, 950); closeBox();" class="button btn-cart" style="padding-left:40px;"><span><span><?php echo $this->__('continue as a guest');?></span></span></button>
|
190 |
+
</li>
|
191 |
+
<li> </li>
|
192 |
+
<li style="text-align:right; font-size:10px;"><span>(<?php echo $this->__('no data is stored'); ?>)</span> </li>
|
193 |
+
|
194 |
+
</ul>
|
195 |
+
</form>
|
196 |
+
</div>
|
197 |
+
|
198 |
+
</div>
|
199 |
+
<div id="backgroundPopup"></div>
|
200 |
+
<!-- end -->
|
app/design/frontend/base/default/template/catalog/product/view/printshop_media.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) 2011 Magento 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 |
+
|
34 |
+
<?php
|
35 |
+
$_product = $this->getProduct();
|
36 |
+
$_helper = $this->helper('catalog/output');
|
37 |
+
?>
|
38 |
+
<?php
|
39 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn())
|
40 |
+
$customerId = Mage::getSingleton('customer/session')->getCustomer()->getId();
|
41 |
+
else
|
42 |
+
$customerId = session_id();
|
43 |
+
?>
|
44 |
+
<?php if($this->getRequest()->getParam('pdfUrl')):?>
|
45 |
+
<p class="product-image product-image-zoom">
|
46 |
+
<?php
|
47 |
+
$pdtImagedata = Mage::helper('syncproduct')->productImage($_product->getId(), $customerId);
|
48 |
+
$pdtImage = str_replace("thumb", "high", $pdtImagedata);
|
49 |
+
$pdtPdfHighUrl = Mage::helper('syncproduct')->productHighResPdf($_product->getId(), $customerId);
|
50 |
+
$pdtPdfLowUrl = Mage::helper('syncproduct')->productLowResPdf($_product->getId(), $customerId);
|
51 |
+
|
52 |
+
$_img = '<img id="image" src="'.$pdtImage.'?'.mktime().'" alt="Design Image" title="'.$_product->getName().'" width="300" height="300" />';
|
53 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
54 |
+
?>
|
55 |
+
|
56 |
+
<input type="hidden" value="<?php echo $pdtImage?>" name="tplImage" />
|
57 |
+
<input type="hidden" value="<?php echo $pdtPdfHighUrl?>" name="tplPdf" />
|
58 |
+
<input type="hidden" value="<?php echo $pdtPdfLowUrl?>" name="tplLowresPdf" />
|
59 |
+
</p>
|
60 |
+
<?php elseif ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
61 |
+
<p class="product-image product-image-zoom">
|
62 |
+
<?php
|
63 |
+
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'?'.mktime().'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
|
64 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
65 |
+
?>
|
66 |
+
</p>
|
67 |
+
<p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
|
68 |
+
<div class="zoom">
|
69 |
+
<img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
|
70 |
+
<div id="track">
|
71 |
+
<div id="handle"></div>
|
72 |
+
</div>
|
73 |
+
<img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
|
74 |
+
</div>
|
75 |
+
<script type="text/javascript">
|
76 |
+
//<![CDATA[
|
77 |
+
Event.observe(window, 'load', function() {
|
78 |
+
product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
|
79 |
+
});
|
80 |
+
//]]>
|
81 |
+
</script>
|
82 |
+
<?php else: ?>
|
83 |
+
<p class="product-image" id="pdtImg2">
|
84 |
+
<?php
|
85 |
+
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
|
86 |
+
echo $_helper->productAttribute($_product, $_img, 'image');
|
87 |
+
?>
|
88 |
+
</p>
|
89 |
+
<?php endif; ?>
|
90 |
+
<?php if (count($this->getGalleryImages()) > 0): ?>
|
91 |
+
<div class="more-views">
|
92 |
+
<h2><?php echo $this->__('More Views') ?></h2>
|
93 |
+
<ul>
|
94 |
+
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
95 |
+
<li>
|
96 |
+
<a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
|
97 |
+
</li>
|
98 |
+
<?php endforeach; ?>
|
99 |
+
</ul>
|
100 |
+
</div>
|
101 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/catalog/productlist.phtml
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you 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) 2011 Magento 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 |
+
$_ibrightDetails = Mage::helper('syncproduct')->designToolDetails();
|
36 |
+
$_productCollection=$this->getLoadedProductCollection();
|
37 |
+
$_helper = $this->helper('catalog/output');
|
38 |
+
?>
|
39 |
+
<?php if(!$_productCollection->count()): ?>
|
40 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
41 |
+
<?php else: ?>
|
42 |
+
<div class="category-products">
|
43 |
+
<?php echo $this->getToolbarHtml() ?>
|
44 |
+
<?php // List mode ?>
|
45 |
+
<?php if($this->getMode()!='grid'): ?>
|
46 |
+
<?php $_iterator = 0; ?>
|
47 |
+
<ol class="products-list" id="products-list">
|
48 |
+
<?php foreach ($_productCollection as $_product): ?>
|
49 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
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(135); ?>" width="135" height="135" 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">
|
55 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
56 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
57 |
+
<?php if($_product->getRatingSummary()): ?>
|
58 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
59 |
+
<?php endif; ?>
|
60 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
61 |
+
|
62 |
+
<div>
|
63 |
+
<?php if($_product->isSaleable()): ?>
|
64 |
+
<p style="float:left; width:112px;"><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>
|
65 |
+
<?php else: ?>
|
66 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
67 |
+
<?php endif; ?>
|
68 |
+
|
69 |
+
<?php /*-------------------------------------------------*/ ?>
|
70 |
+
<?php
|
71 |
+
$isPrintProduct = $_product->getResource()->getAttribute('print_product')->getFrontend()->getValue($_product);
|
72 |
+
if($isPrintProduct == 'Yes'){
|
73 |
+
?>
|
74 |
+
<?php if($_product->isSaleable()): ?>
|
75 |
+
|
76 |
+
<div class="design-tool-list" style="float:left; width:150px;">
|
77 |
+
<?php if(strpos($_product->getProductUrl(), "?"))
|
78 |
+
$returnPdtUrl = $_product->getProductUrl()."&";
|
79 |
+
else
|
80 |
+
$returnPdtUrl = $_product->getProductUrl()."?";
|
81 |
+
$pdtUrl = urlencode($returnPdtUrl);?>
|
82 |
+
|
83 |
+
<!-- Create XML for logged in users...-->
|
84 |
+
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
85 |
+
$userEmail = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
86 |
+
$userXml = urlencode('<?xml version="1.0" encoding="UTF-8"?><ticket id="magento"><user uid="'.$userEmail.'"></user></ticket>');
|
87 |
+
}?>
|
88 |
+
|
89 |
+
<button type="button" title="Individualize Template" <?php if(!Mage::getSingleton('customer/session')->isLoggedIn()) { ?> onclick="javascript:showBox();" <?php } else { ?> onclick="GB_showCenter('Design Your Template', '<?php echo $_ibrightDetails->getIbrightFrontendUrl();?>?xml=<?php echo $userXml?>×tamp=<?php echo urlencode(date('Y m d h:i:s'))?>&code=<?php echo urlencode('magentoclx')?>&forwardAfterLogin=individualize&templateId=<?php echo $_product->getTemplateId()?>&shopid=<?php echo Mage::getSingleton('customer/session')->getCustomer()->getId()?>&backurl=<?php echo $pdtUrl?>', 950, 950);" <?php } ?> class="button button-orange btn-cart"><span><span><?php echo $this->__('Design Tool') ?></span></span></button>
|
90 |
+
</div>
|
91 |
+
<?php endif; ?>
|
92 |
+
<?php } ?>
|
93 |
+
<?php /*--------------------------------------------------*/ ?>
|
94 |
+
|
95 |
+
</div>
|
96 |
+
|
97 |
+
|
98 |
+
<div class="desc std">
|
99 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
100 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
101 |
+
</div>
|
102 |
+
<ul class="add-to-links">
|
103 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
104 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
105 |
+
<?php endif; ?>
|
106 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
107 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
108 |
+
<?php endif; ?>
|
109 |
+
</ul>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</li>
|
113 |
+
<?php endforeach; ?>
|
114 |
+
</ol>
|
115 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
116 |
+
|
117 |
+
<?php else: ?>
|
118 |
+
|
119 |
+
<?php // Grid Mode ?>
|
120 |
+
|
121 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
122 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
123 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
124 |
+
<?php if ($i++%$_columnCount==0): ?>
|
125 |
+
<ul class="products-grid" style="height:355px">
|
126 |
+
<?php endif ?>
|
127 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
128 |
+
<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>
|
129 |
+
<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>
|
130 |
+
<?php if($_product->getRatingSummary()): ?>
|
131 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
132 |
+
<?php endif; ?>
|
133 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
134 |
+
<div class="actions">
|
135 |
+
<?php if($_product->isSaleable()): ?>
|
136 |
+
<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>
|
137 |
+
<?php else: ?>
|
138 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
139 |
+
<?php endif; ?>
|
140 |
+
<?php /*-------------------------------------------------*/ ?>
|
141 |
+
<?php
|
142 |
+
$isPrintProduct = $_product->getResource()->getAttribute('print_product')->getFrontend()->getValue($_product);
|
143 |
+
if($isPrintProduct == 'Yes'){
|
144 |
+
?>
|
145 |
+
<?php if($_product->isSaleable()): ?>
|
146 |
+
|
147 |
+
<div style="padding:10px 0px;" class="design-tool-list">
|
148 |
+
<?php if(strpos($_product->getProductUrl(), "?"))
|
149 |
+
$returnPdtUrl = $_product->getProductUrl()."&";
|
150 |
+
else
|
151 |
+
$returnPdtUrl = $_product->getProductUrl()."?";
|
152 |
+
$pdtUrl = urlencode($returnPdtUrl);?>
|
153 |
+
|
154 |
+
<!-- Create XML for logged in users...-->
|
155 |
+
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
156 |
+
$userEmail = Mage::getSingleton('customer/session')->getCustomer()->getEmail();
|
157 |
+
$userXml = urlencode('<?xml version="1.0" encoding="UTF-8"?><ticket id="magento"><user uid="'.$userEmail.'"></user></ticket>');
|
158 |
+
}?>
|
159 |
+
|
160 |
+
<button type="button" title="Individualize Template" <?php if(!Mage::getSingleton('customer/session')->isLoggedIn()) { ?> onclick="javascript:showBox();" <?php } else { ?> onclick="GB_showCenter('Design Your Template', '<?php echo $_ibrightDetails->getIbrightFrontendUrl();?>?xml=<?php echo $userXml?>×tamp=<?php echo urlencode(date('Y m d h:i:s'))?>&code=<?php echo urlencode('magentoclx')?>&forwardAfterLogin=individualize&templateId=<?php echo $_product->getTemplateId()?>&shopid=<?php echo Mage::getSingleton('customer/session')->getCustomer()->getId()?>&backurl=<?php echo $pdtUrl?>', 950, 950);" <?php } ?> class="button button-orange btn-cart"><span><span><?php echo $this->__('Design Tool') ?></span></span></button>
|
161 |
+
</div>
|
162 |
+
<?php endif; ?>
|
163 |
+
<?php } ?>
|
164 |
+
<?php /*--------------------------------------------------*/ ?>
|
165 |
+
<ul class="add-to-links">
|
166 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
167 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
168 |
+
<?php endif; ?>
|
169 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
170 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
171 |
+
<?php endif; ?>
|
172 |
+
</ul>
|
173 |
+
</div>
|
174 |
+
</li>
|
175 |
+
<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
176 |
+
</ul>
|
177 |
+
<?php endif ?>
|
178 |
+
<?php endforeach ?>
|
179 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
180 |
+
<?php endif; ?>
|
181 |
+
|
182 |
+
<div class="toolbar-bottom">
|
183 |
+
<?php echo $this->getToolbarHtml() ?>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
<?php endif; ?>
|
187 |
+
<!--Pop Up Section -->
|
188 |
+
<div id="copyTemplateFormContainer" style="border:1px solid #fff;display:none">
|
189 |
+
<?php Mage::getSingleton('customer/session')->setBeforeAuthUrl($_product->getProductUrl());?>
|
190 |
+
<div id="copyTemplateForm" class="form-holder">
|
191 |
+
<div class="panel-heading">
|
192 |
+
<h2><?php echo $this->__('Your design and save your pictures')?> !</h2>
|
193 |
+
</div>
|
194 |
+
<form action="" name="addCopyTemplateForm" id="addCopyTemplateForm" method="post">
|
195 |
+
<ul>
|
196 |
+
<li><a href="javascript:closeBox();" class="copyTemplate"></a></li>
|
197 |
+
<li>
|
198 |
+
<?php echo $this->__('To save your design and your pictures, we create an account for you. So you can view your pictures and designs at any time even further edit and send friends.'); ?>
|
199 |
+
</li>
|
200 |
+
<li style="height:30px;"> </li>
|
201 |
+
<li><button type="button" title="Login" onclick="window.location.href='/customer/account/login'" class="button btn-cart"><span><span><?php echo $this->__('login')?></span></span></button> <button type="button" title="Registration " onclick="window.location.href='/customer/account/create'" class="button btn-cart" style="padding-left:40px;"><span><span><?php echo $this->__('registration')?></span></span></button>
|
202 |
+
<?php if(strpos($_product->getProductUrl(), "?"))
|
203 |
+
$returnPdtUrl = $_product->getProductUrl()."&";
|
204 |
+
else
|
205 |
+
$returnPdtUrl = $_product->getProductUrl()."?";
|
206 |
+
$pdtUrl = urlencode($returnPdtUrl);?>
|
207 |
+
<?php $_ibrightGuestDetails = Mage::helper('syncproduct')->guestDesignToolDetails(); ?>
|
208 |
+
<button type="button" title="Login" onclick="GB_showCenter('Design Your Template', '<?php echo $_ibrightGuestDetails->getIbrightGuestUrl();?>?login=<?php echo $_ibrightGuestDetails->getIbrightGuestLogin()?>&forwardAfterLogin=individualize&templateId=<?php echo $_product->getTemplateId()?>&shopid=&backurl=<?php echo utf8_encode($pdtUrl)?>', 950, 950); closeBox();" class="button btn-cart" style="padding-left:40px;"><span><span><?php echo $this->__('continue as a guest');?></span></span></button>
|
209 |
+
</li>
|
210 |
+
<li> </li>
|
211 |
+
<li style="text-align:right; font-size:10px;"><span>(<?php echo $this->__('no data is stored'); ?>)</span> </li>
|
212 |
+
|
213 |
+
</ul>
|
214 |
+
</form>
|
215 |
+
</div>
|
216 |
+
|
217 |
+
</div>
|
218 |
+
<div id="backgroundPopup"></div>
|
219 |
+
<!-- end -->
|
220 |
+
<script type="text/javascript">
|
221 |
+
//function for dropdown box
|
222 |
+
function showBox() {
|
223 |
+
document.getElementById("backgroundPopup").style.display = "block";
|
224 |
+
document.getElementById("copyTemplateFormContainer").style.display = "block";
|
225 |
+
document.getElementById("copyTemplateForm").style.display = "block";
|
226 |
+
//$("#copyTemplateForm").slideDown("fast");
|
227 |
+
|
228 |
+
}
|
229 |
+
function closeBox()
|
230 |
+
{
|
231 |
+
document.getElementById("backgroundPopup").style.display = "none";
|
232 |
+
document.getElementById("copyTemplateFormContainer").style.display = "none";
|
233 |
+
document.getElementById("copyTemplateForm").style.display = "none";
|
234 |
+
//$("#copyTemplateForm").slideUp("fast");
|
235 |
+
|
236 |
+
}
|
237 |
+
</script>
|
app/design/frontend/base/default/template/checkout/cart/item/printshop_default.phtml
ADDED
@@ -0,0 +1,291 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you 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) 2011 Magento 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 |
+
|
30 |
+
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
31 |
+
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
32 |
+
?>
|
33 |
+
<tr>
|
34 |
+
<td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getProductName()) ?>" class="product-image"><?php endif;?>
|
35 |
+
|
36 |
+
<!-- display updated product image in cart -->
|
37 |
+
|
38 |
+
<?php if($_item->getProductImage() == NULL):?>
|
39 |
+
<img src="<?php echo $this->getProductThumbnail()->resize(75).'?'.mktime(); ?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" />
|
40 |
+
<?php else:?>
|
41 |
+
<?php $pdtImage = str_replace("thumb", "high", $_item->getProductImage());?>
|
42 |
+
<img src="<?php echo $pdtImage.'?'.mktime()?>" width="75" height="75" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" />
|
43 |
+
<?php endif;?>
|
44 |
+
|
45 |
+
<!-- display updated product image ENDS here -->
|
46 |
+
|
47 |
+
<?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
|
48 |
+
<td>
|
49 |
+
<h2 class="product-name">
|
50 |
+
<?php if ($this->hasProductUrl()):?>
|
51 |
+
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->htmlEscape($this->getProductName()) ?></a>
|
52 |
+
<?php else: ?>
|
53 |
+
<?php echo $this->htmlEscape($this->getProductName()) ?>
|
54 |
+
<?php endif; ?>
|
55 |
+
</h2>
|
56 |
+
<?php if ($_options = $this->getOptionList()):?>
|
57 |
+
<dl class="item-options">
|
58 |
+
<?php foreach ($_options as $_option) : ?>
|
59 |
+
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
60 |
+
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
|
61 |
+
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
62 |
+
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
63 |
+
<div class="truncated_full_value">
|
64 |
+
<dl class="item-options">
|
65 |
+
<dt><?php echo $this->htmlEscape($_option['label']) ?></dt>
|
66 |
+
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
67 |
+
</dl>
|
68 |
+
</div>
|
69 |
+
<?php endif; ?>
|
70 |
+
</dd>
|
71 |
+
<?php endforeach; ?>
|
72 |
+
</dl>
|
73 |
+
<?php endif;?>
|
74 |
+
<?php if ($messages = $this->getMessages()): ?>
|
75 |
+
<?php foreach ($messages as $message): ?>
|
76 |
+
<p class="item-msg <?php echo $message['type'] ?>">* <?php echo $message['text'] ?></p>
|
77 |
+
<?php endforeach; ?>
|
78 |
+
<?php endif; ?>
|
79 |
+
<?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()):?>
|
80 |
+
<?php echo $addtInfoBlock->setItem($_item)->toHtml() ?>
|
81 |
+
<?php endif;?>
|
82 |
+
</td>
|
83 |
+
<td class="a-center">
|
84 |
+
<?php if ($isVisibleProduct): ?>
|
85 |
+
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
|
86 |
+
<?php endif ?>
|
87 |
+
</td>
|
88 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
89 |
+
<td class="a-center">
|
90 |
+
<?php if ($isVisibleProduct): ?>
|
91 |
+
<input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
|
92 |
+
<?php endif ?>
|
93 |
+
</td>
|
94 |
+
<?php endif ?>
|
95 |
+
|
96 |
+
<?php if ($canApplyMsrp): ?>
|
97 |
+
<td class="a-right"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
|
98 |
+
<span class="cart-price">
|
99 |
+
<span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
100 |
+
<?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
|
101 |
+
<a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
|
102 |
+
<script type="text/javascript">
|
103 |
+
Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
|
104 |
+
</script>
|
105 |
+
</span>
|
106 |
+
</td>
|
107 |
+
<?php else: ?>
|
108 |
+
|
109 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
110 |
+
<td class="a-right">
|
111 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
112 |
+
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
113 |
+
<?php else: ?>
|
114 |
+
<span class="cart-price">
|
115 |
+
<?php endif; ?>
|
116 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
117 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
|
118 |
+
<?php else: ?>
|
119 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()) ?>
|
120 |
+
<?php endif; ?>
|
121 |
+
|
122 |
+
</span>
|
123 |
+
|
124 |
+
|
125 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
126 |
+
|
127 |
+
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
128 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
129 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
130 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
131 |
+
<?php endforeach; ?>
|
132 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
133 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
134 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
135 |
+
<?php endforeach; ?>
|
136 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
137 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
138 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
139 |
+
<?php endforeach; ?>
|
140 |
+
<?php endif; ?>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
144 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
145 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?></span>
|
146 |
+
</div>
|
147 |
+
<?php endif; ?>
|
148 |
+
<?php endif; ?>
|
149 |
+
</td>
|
150 |
+
<?php endif; ?>
|
151 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
152 |
+
<td>
|
153 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
154 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
155 |
+
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
156 |
+
<?php else: ?>
|
157 |
+
<span class="cart-price">
|
158 |
+
<?php endif; ?>
|
159 |
+
|
160 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
161 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
|
162 |
+
<?php else: ?>
|
163 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
164 |
+
<?php endif; ?>
|
165 |
+
|
166 |
+
</span>
|
167 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
168 |
+
|
169 |
+
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
170 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
171 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
172 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
173 |
+
<?php endforeach; ?>
|
174 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
175 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
176 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
177 |
+
<?php endforeach; ?>
|
178 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
179 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
180 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
181 |
+
<?php endforeach; ?>
|
182 |
+
<?php endif; ?>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
186 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
187 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?></span>
|
188 |
+
</div>
|
189 |
+
<?php endif; ?>
|
190 |
+
<?php endif; ?>
|
191 |
+
</td>
|
192 |
+
<?php endif; ?>
|
193 |
+
<?php endif; ?>
|
194 |
+
<td class="a-center">
|
195 |
+
<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" />
|
196 |
+
</td>
|
197 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
198 |
+
<td class="a-right">
|
199 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
200 |
+
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
201 |
+
<?php else: ?>
|
202 |
+
<span class="cart-price">
|
203 |
+
<?php endif; ?>
|
204 |
+
|
205 |
+
<?php if ($canApplyMsrp): ?>
|
206 |
+
<span class="cart-msrp-subtotal">--</span>
|
207 |
+
<?php else: ?>
|
208 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
209 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
210 |
+
<?php else: ?>
|
211 |
+
<?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()) ?>
|
212 |
+
<?php endif; ?>
|
213 |
+
<?php endif; ?>
|
214 |
+
|
215 |
+
</span>
|
216 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
217 |
+
|
218 |
+
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
219 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
220 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
221 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
222 |
+
<?php endforeach; ?>
|
223 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
224 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
225 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
226 |
+
<?php endforeach; ?>
|
227 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
228 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
229 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
230 |
+
<?php endforeach; ?>
|
231 |
+
<?php endif; ?>
|
232 |
+
</div>
|
233 |
+
|
234 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
235 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
236 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
237 |
+
</div>
|
238 |
+
<?php endif; ?>
|
239 |
+
<?php endif; ?>
|
240 |
+
</td>
|
241 |
+
<?php endif; ?>
|
242 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
243 |
+
<td>
|
244 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
245 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
246 |
+
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
247 |
+
<?php else: ?>
|
248 |
+
<span class="cart-price">
|
249 |
+
<?php endif; ?>
|
250 |
+
|
251 |
+
<?php if ($canApplyMsrp): ?>
|
252 |
+
<span class="cart-msrp-subtotal">--</span>
|
253 |
+
<?php else: ?>
|
254 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
255 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
|
256 |
+
<?php else: ?>
|
257 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
258 |
+
<?php endif; ?>
|
259 |
+
<?php endif; ?>
|
260 |
+
|
261 |
+
</span>
|
262 |
+
|
263 |
+
|
264 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
265 |
+
|
266 |
+
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
267 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
268 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
269 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
270 |
+
<?php endforeach; ?>
|
271 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
272 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
273 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
274 |
+
<?php endforeach; ?>
|
275 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
276 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
277 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
278 |
+
<?php endforeach; ?>
|
279 |
+
<?php endif; ?>
|
280 |
+
</div>
|
281 |
+
|
282 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
283 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
284 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?></span>
|
285 |
+
</div>
|
286 |
+
<?php endif; ?>
|
287 |
+
<?php endif; ?>
|
288 |
+
</td>
|
289 |
+
<?php endif; ?>
|
290 |
+
<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>
|
291 |
+
</tr>
|
app/design/frontend/base/default/template/checkout/printshop_cart.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 default_modern
|
23 |
+
* @copyright Copyright (c) 2011 Magento 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" title="<?php echo $this->__('Update Shopping Cart') ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart') ?></span></span></button>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
</tfoot>
|
106 |
+
<tbody>
|
107 |
+
<?php foreach($this->getItems() as $_item): ?>
|
108 |
+
<?php echo $this->getItemHtml($_item) ?>
|
109 |
+
<?php endforeach ?>
|
110 |
+
</tbody>
|
111 |
+
</table>
|
112 |
+
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
113 |
+
</fieldset>
|
114 |
+
</form>
|
115 |
+
<div class="cart-collaterals">
|
116 |
+
<div class="col2-set">
|
117 |
+
<div class="col-1">
|
118 |
+
<?php if($_crosssell = $this->getChildHtml('crosssell')): ?>
|
119 |
+
<?php echo $_crosssell; ?>
|
120 |
+
<?php else: ?>
|
121 |
+
<div class="no-crosssell">
|
122 |
+
<img src="<?php echo $this->getSkinUrl('images/media/callout1.jpg') ?>" alt="" />
|
123 |
+
<img src="<?php echo $this->getSkinUrl('images/media/fpo_no_crosssell.gif') ?>" alt="" />
|
124 |
+
</div>
|
125 |
+
<?php endif; ?>
|
126 |
+
</div>
|
127 |
+
<div class="col-2">
|
128 |
+
<?php echo $this->getChildHtml('coupon') ?>
|
129 |
+
<?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>
|
130 |
+
<div class="totals">
|
131 |
+
<?php echo $this->getChildHtml('totals'); ?>
|
132 |
+
<?php if(!$this->hasError()): ?>
|
133 |
+
<ul class="checkout-types">
|
134 |
+
<?php foreach ($this->getMethods('methods') as $method): ?>
|
135 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
136 |
+
<li><?php echo $methodHtml; ?></li>
|
137 |
+
<?php endif; ?>
|
138 |
+
<?php endforeach; ?>
|
139 |
+
</ul>
|
140 |
+
<?php endif; ?>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
</div>
|
145 |
+
</div>
|
app/design/frontend/base/default/template/page/html/printshop_head.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) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
|
28 |
+
<title><?php echo $this->getTitle() ?></title>
|
29 |
+
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
|
30 |
+
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
|
31 |
+
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
|
32 |
+
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
|
33 |
+
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
|
34 |
+
<!--[if lt IE 7]>
|
35 |
+
<script type="text/javascript">
|
36 |
+
//<![CDATA[
|
37 |
+
var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
|
38 |
+
var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
|
39 |
+
//]]>
|
40 |
+
</script>
|
41 |
+
<![endif]-->
|
42 |
+
|
43 |
+
<!-- Add javascript for Greybox.. -->
|
44 |
+
|
45 |
+
<script type="text/javascript">
|
46 |
+
var GB_ROOT_DIR = "<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/greybox/";
|
47 |
+
|
48 |
+
</script>
|
49 |
+
|
50 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/greybox/AJS.js"></script>
|
51 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/greybox/AJS_fx.js"></script>
|
52 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/greybox/gb_scripts.js"></script>
|
53 |
+
<!-- Add javascript of our requirement -->
|
54 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/jquery/jquery-1.6.4.min.js"></script>
|
55 |
+
<script type="text/javascript" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/web2print.js"></script>
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
+
<?php echo $this->getCssJsHtml() ?>
|
60 |
+
|
61 |
+
<!-- Add Greybox CSS -->
|
62 |
+
<link rel="stylesheet" type="text/css" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS)?>web2print/greybox/gb_styles.css" media="all" />
|
63 |
+
<link rel="stylesheet" type="text/css" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN)?>frontend/base/default/css/web2print.css" media="all" />
|
64 |
+
|
65 |
+
|
66 |
+
<?php echo $this->getChildHtml() ?>
|
67 |
+
<?php echo $this->helper('core/js')->getTranslatorScript() ?>
|
68 |
+
<?php echo $this->getIncludes() ?>
|
app/etc/modules/Printshop_Catalog.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Catalog>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Catalog>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Printshop_Checkout.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Checkout>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Checkout>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Printshop_Page.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Page>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Page>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Printshop_Productpdf.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Productpdf>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Productpdf>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Printshop_Sales.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Sales>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Sales>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/etc/modules/Printshop_Syncproduct.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Printshop_Syncproduct>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Printshop_Syncproduct>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/locale/en_US/template/email/printshop_custom_email1.html
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style>
|
2 |
+
body, td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; }
|
3 |
+
</style>
|
4 |
+
<div style="font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;">
|
5 |
+
<table cellspacing="0" cellpadding="0" border="0" width="98%" style="margin-top:10px; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif; margin-bottom:10px;">
|
6 |
+
<tr>
|
7 |
+
<td align="left" valign="top">
|
8 |
+
<!-- [ header starts here] -->
|
9 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
10 |
+
<tr>
|
11 |
+
<td valign="top" align="left">
|
12 |
+
<a href="{{store url=""}}"><img src="{{skin url="images/logo_email.gif" _area='frontend'}}" alt="{{var store.getFrontendName()}}" style="margin-bottom:10px;" border="0"/></a></td>
|
13 |
+
</tr>
|
14 |
+
</table>
|
15 |
+
</td>
|
16 |
+
</tr>
|
17 |
+
<!-- [ middle starts here] -->
|
18 |
+
|
19 |
+
<tr>
|
20 |
+
<td valign="top">
|
21 |
+
<h1 style="font-size:22px; font-weight:normal; line-height:22px; margin:0 0 11px 0;"">Hello, {{htmlescape var=$order.getCustomerName()}}</h1>
|
22 |
+
<p style="font-size:12px; line-height:16px; margin:0;">
|
23 |
+
Thank you for your order from {{var store.getFrontendName()}}.
|
24 |
+
Once your package ships we will send an email with a link to track your order.
|
25 |
+
You can check the status of your order by <a href="{{store url="customer/account/"}}" style="color:#1E7EC8;">logging into your account</a>.
|
26 |
+
If you have any questions about your order please contact us at <a href="mailto:{{config path='trans_email/ident_support/email'}}" style="color:#1E7EC8;">{{config path='trans_email/ident_support/email'}}</a> or call us at <span class="nobr">{{config path='general/store_information/phone'}}</span> Monday - Friday, 8am - 5pm PST.
|
27 |
+
</p>
|
28 |
+
<p style="font-size:12px; line-height:16px; margin:0;">Your order confirmation is below. Thank you again for your business.</p>
|
29 |
+
</tr>
|
30 |
+
<!-- [pdf Download link come here] -->
|
31 |
+
{{var pdflink}}
|
32 |
+
<tr>
|
33 |
+
<td>
|
34 |
+
<h2 style="font-size:18px; font-weight:normal; margin:0;">Your Order #{{var order.increment_id}} <small>(placed on {{var order.getCreatedAtFormated('long')}})</small></h2>
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
<tr>
|
38 |
+
<td>
|
39 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
40 |
+
<thead>
|
41 |
+
<tr>
|
42 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Billing Information:</th>
|
43 |
+
<th width="10"></th>
|
44 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Payment Method:</th>
|
45 |
+
</tr>
|
46 |
+
</thead>
|
47 |
+
<tbody>
|
48 |
+
<tr>
|
49 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
50 |
+
{{var order.getBillingAddress().format('html')}}
|
51 |
+
</td>
|
52 |
+
<td> </td>
|
53 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
54 |
+
{{var payment_html}}
|
55 |
+
</td>
|
56 |
+
</tr>
|
57 |
+
</tbody>
|
58 |
+
</table>
|
59 |
+
<br/>
|
60 |
+
{{depend order.getIsNotVirtual()}}
|
61 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650">
|
62 |
+
<thead>
|
63 |
+
<tr>
|
64 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Information:</th>
|
65 |
+
<th width="10"></th>
|
66 |
+
<th align="left" width="325" bgcolor="#EAEAEA" style="font-size:13px; padding:5px 9px 6px 9px; line-height:1em;">Shipping Method:</th>
|
67 |
+
</tr>
|
68 |
+
</thead>
|
69 |
+
<tbody>
|
70 |
+
<tr>
|
71 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
72 |
+
{{var order.getShippingAddress().format('html')}}
|
73 |
+
|
74 |
+
</td>
|
75 |
+
<td> </td>
|
76 |
+
<td valign="top" style="font-size:12px; padding:7px 9px 9px 9px; border-left:1px solid #EAEAEA; border-bottom:1px solid #EAEAEA; border-right:1px solid #EAEAEA;">
|
77 |
+
{{var order.getShippingDescription()}}
|
78 |
+
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
</tbody>
|
82 |
+
</table>
|
83 |
+
<br/>
|
84 |
+
{{/depend}}
|
85 |
+
{{layout handle="sales_email_order_items" order=$order}}
|
86 |
+
<p style="font-size:12px; margin:0 0 10px 0">{{var order.getEmailCustomerNote()}}</p>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td align="left" ><p style="font-size:12px; margin:0;"><br /><br />Regards,<br /><strong>Clixmedia Team</strong><br/><a href="{{store url=""}}">{{store url=""}}</a></p></td>
|
91 |
+
</tr>
|
92 |
+
</table>
|
93 |
+
</div>
|
js/web2print/greybox/AJS.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
if(!window.AJS){var AJS={BASE_URL:"",ajaxErrorHandler:null,getQueryArgument:function(f){var b=window.location.search.substring(1);var c=b.split("&");for(var a=0;a<c.length;a++){var d=c[a].split("=");if(d[0]==f){return d[1]}}return null},_agent:navigator.userAgent.toLowerCase(),_agent_version:navigator.productSub,isIe:function(){return(AJS._agent.indexOf("msie")!=-1&&AJS._agent.indexOf("opera")==-1)},isIe8:function(){return AJS._agent.indexOf("msie 8")!=-1},isSafari:function(a){if(a){return AJS._agent.indexOf("khtml")}return(AJS._agent.indexOf("khtml")!=-1&&AJS._agent.match(/3\.\d\.\d safari/)==null)},isOpera:function(){return AJS._agent.indexOf("opera")!=-1},isMozilla:function(){return(AJS._agent.indexOf("gecko")!=-1&&AJS._agent_version>=20030210)},isMac:function(){return(AJS._agent.indexOf("macintosh")!=-1)},isCamino:function(){return(AJS._agent.indexOf("camino")!=-1)},createArray:function(a){if(AJS.isArray(a)&&!AJS.isString(a)){return a}else{if(!a){return[]}else{return[a]}}},forceArray:function(a){var c=[];for(var b=0;b<a.length;b++){c.push(a[b])}return c},join:function(d,b){try{return b.join(d)}catch(c){var a=b[0]||"";AJS.map(b,function(f){a+=d+f},1);return a+""}},isIn:function(c,b){var a=AJS.getIndex(c,b);if(a!=-1){return true}else{return false}},getIndex:function(d,b,c){for(var a=0;a<b.length;a++){if(c&&c(b[a])||d==b[a]){return a}}return -1},getFirst:function(a){if(a.length>0){return a[0]}else{return null}},getLast:function(a){if(a.length>0){return a[a.length-1]}else{return null}},getRandom:function(a){return a[Math.floor(Math.random()*a.length)]},update:function(b,a){for(var c in a){b[c]=a[c]}return b},flattenList:function(g){var f=false;var a=[];for(var b=0;b<g.length;b++){var h=g[b];if(AJS.isArray(h)){f=true;break}if(h!=null){a.push(h)}}if(!f){return a}var c=[];var d=function(j,i){AJS.map(i,function(l){if(l==null){}else{if(AJS.isArray(l)){d(j,l)}else{j.push(l)}}})};d(c,g);return c},flattenElmArguments:function(a){return AJS.flattenList(AJS.forceArray(a))},map:function(g,f,b,d){var c=0,a=g.length;if(b){c=b}if(d){a=d}for(c;c<a;c++){var h=f(g[c],c);if(h!=undefined){return h}}},rmap:function(d,c){var b=d.length-1,a=0;for(b;b>=a;b--){var f=c.apply(null,[d[b],b]);if(f!=undefined){return f}}},filter:function(f,c,a,b){var d=[];AJS.map(f,function(g){if(c(g)){d.push(g)}},a,b);return d},partial:function(b){var a=AJS.$FA(arguments);a.shift();return function(){a=a.concat(AJS.$FA(arguments));return b.apply(window,a)}},getElement:function(a){if(AJS.isString(a)||AJS.isNumber(a)){return document.getElementById(a)}else{return a}},getElements:function(){var a=AJS.flattenElmArguments(arguments);var d=new Array();for(var c=0;c<a.length;c++){var b=AJS.getElement(a[c]);d.push(b)}return d},getElementsByTagAndClassName:function(a,b,n,h){var g=[];if(!AJS.isDefined(n)){n=document}if(!AJS.isDefined(a)){a="*"}var f,d;if(b&&document.getElementsByClassName){var c=n.getElementsByClassName(b);if(a=="*"){g=AJS.forceArray(c)}else{var m=c.length;for(f=0;f<m;f++){if(c[f].nodeName.toLowerCase()==a){g.push(c[f])}}}}else{var c=n.getElementsByTagName(a);if(!b){g=AJS.forceArray(c)}else{var m=c.length;var l=new RegExp("(^|\\s)"+b+"(\\s|$)");for(f=0;f<m;f++){if(l.test(c[f].className)||!b){g.push(c[f])}}}}if(h){return g[0]}else{return g}},nodeName:function(a){return a.nodeName.toLowerCase()},_nodeWalk:function(g,d,b,f){var c=f(g);var a;if(d&&b){a=function(h){return AJS.nodeName(h)==d&&AJS.hasClass(h,b)}}else{if(d){a=function(h){return AJS.nodeName(h)==d}}else{a=function(h){return AJS.hasClass(h,b)}}}if(a(g)){return g}while(c){if(a(c)){return c}c=f(c)}return null},getParentBytc:function(c,b,a){return AJS._nodeWalk(c,b,a,function(d){if(d){return d.parentNode}})},getChildBytc:function(d,c,b){var a=AJS.$bytc(c,b,d);if(a.length>0){return a[0]}else{return null}},hasParent:function(c,b,a){if(c==b){return true}if(a==0){return false}return AJS.hasParent(c.parentNode,b,a-1)},getPreviousSiblingBytc:function(c,b,a){return AJS._nodeWalk(c,b,a,function(d){return d.previousSibling})},getNextSiblingBytc:function(c,b,a){return AJS._nodeWalk(c,b,a,function(d){return d.nextSibling})},getBody:function(){return AJS.$bytc("body")[0]},getFormElement:function(c,a){c=AJS.$(c);var b=null;AJS.map(c.elements,function(d){if(d.name&&d.name==a){b=d}});if(b){return b}AJS.map(AJS.$bytc("select",null,c),function(d){if(d.name&&d.name==a){b=d}});return b},getSelectValue:function(a){var a=AJS.$(a);return a.options[a.selectedIndex].value},documentInsert:function(a){if(typeof(a)=="string"){a=AJS.HTML2DOM(a)}document.write('<span id="dummy_holder"></span>');AJS.swapDOM(AJS.$("dummy_holder"),a)},appendChildNodes:function(a){if(arguments.length>=2){AJS.map(arguments,function(b){if(AJS.isString(b)){b=AJS.TN(b)}if(AJS.isDefined(b)){a.appendChild(b)}},1)}return a},appendToTop:function(d){var b=AJS.flattenElmArguments(arguments).slice(1);if(b.length>=1){var c=d.firstChild;if(c){while(true){var a=b.shift();if(a){AJS.insertBefore(a,c)}else{break}}}else{AJS.ACN.apply(null,arguments)}}return d},replaceChildNodes:function(b){var a;while((a=b.firstChild)){AJS.swapDOM(a,null)}if(arguments.length<2){return b}else{return AJS.appendChildNodes.apply(null,arguments)}return b},insertAfter:function(b,a){a.parentNode.insertBefore(b,a.nextSibling);return b},insertBefore:function(b,a){a.parentNode.insertBefore(b,a);return b},swapDOM:function(a,c){a=AJS.getElement(a);var b=a.parentNode;if(c){c=AJS.getElement(c);b.replaceChild(c,a)}else{b.removeChild(a)}return c},removeElement:function(){var a=AJS.flattenElmArguments(arguments);try{AJS.map(a,function(c){if($(c)){AJS.swapDOM(c,null)}})}catch(b){}},createDOM:function(f,d){var g=0,a;var l=document.createElement(f);var b=d[0];if(AJS.isDict(d[g])){for(k in b){a=b[k];if(k=="style"||k=="s"){l.style.cssText=a}else{if(k=="c"||k=="class"||k=="className"){l.className=a}else{l.setAttribute(k,a)}}}g++}if(b==null){g=1}for(var c=g;c<d.length;c++){var a=d[c];if(a){var h=typeof(a);if(h=="string"||h=="number"){a=AJS.TN(a)}l.appendChild(a)}}return l},_createDomShortcuts:function(){var b=["ul","li","td","tr","th","tbody","table","input","span","b","a","div","img","button","h1","h2","h3","h4","h5","h6","br","textarea","form","p","select","option","optgroup","iframe","script","center","dl","dt","dd","small","pre","i","label","thead"];var a=function(c){AJS[c.toUpperCase()]=function(){return AJS.createDOM.apply(null,[c,arguments])}};AJS.map(b,a);AJS.TN=function(c){return document.createTextNode(c)}},setHTML:function(){var a=AJS.flattenElmArguments(arguments);var b=a.pop();AJS.map(a,function(c){if(c){c.innerHTML=b}});return a[0]},setVisibility:function(){var a=AJS.flattenElmArguments(arguments);var b=a.pop()&&"visible"||"hidden";AJS.setStyle(a,"visibility",b)},showElement:function(){AJS.setStyle(AJS.flattenElmArguments(arguments),"display","")},hideElement:function(a){AJS.setStyle(AJS.flattenElmArguments(arguments),"display","none")},isElementHidden:function(a){return((a.style.display=="none")||(a.style.visibility=="hidden"))},isElementShown:function(a){return !AJS.isElementHidden(a)},setStyle:function(){var b=AJS.flattenElmArguments(arguments);var d=b.pop();var a=["top","left","right","width","height"];if(AJS.isObject(d)){AJS.map(b,function(f){AJS.map(AJS.keys(d),function(h){var g=d[h];if(AJS.isIn(h,a)){g=AJS.isString(g)&&g||g+"px"}f.style[h]=g})})}else{var c=b.pop();AJS.map(b,function(f){if(AJS.isIn(c,a)){d=AJS.isString(d)&&d||d+"px"}f.style[c]=d})}},__cssDim:function(a,b){var a=AJS.$FA(a);a.splice(a.length-1,0,b);AJS.setStyle.apply(null,a)},setWidth:function(){return AJS.__cssDim(arguments,"width")},setHeight:function(){return AJS.__cssDim(arguments,"height")},setLeft:function(){return AJS.__cssDim(arguments,"left")},setRight:function(){return AJS.__cssDim(arguments,"right")},setTop:function(){return AJS.__cssDim(arguments,"top")},setClass:function(){var a=AJS.flattenElmArguments(arguments);var b=a.pop();AJS.map(a,function(c){c.className=b})},addClass:function(){var b=AJS.flattenElmArguments(arguments);var a=b.pop();var c=function(d){if(!new RegExp("(^|\\s)"+a+"(\\s|$)").test(d.className)){d.className+=(d.className?" ":"")+a}};AJS.map(b,function(d){c(d)})},hasClass:function(c,a){if(!c||!c.className){return false}var b=c.className;return(b.length>0&&(b==a||new RegExp("(^|\\s)"+a+"(\\s|$)").test(b)))},removeClass:function(){var c=AJS.flattenElmArguments(arguments);var a=c.pop();var b=function(d){d.className=d.className.replace(new RegExp("(^|\\s)"+a,"g"),"")};AJS.map(c,function(d){b(d)})},setOpacity:function(b,a){if(a==1){b.style.opacity=1;b.style.filter=""}else{b.style.opacity=a;b.style.filter="alpha(opacity="+a*100+")"}},HTML2DOM:function(a,c){var b=AJS.DIV();b.innerHTML=a;if(c){return b.childNodes[0]}else{return b}},preloadImages:function(){AJS.AEV(window,"load",AJS.$p(function(a){AJS.map(a,function(c){var b=new Image();b.src=c})},arguments))},RND:function(a,d,c){c=c||window;var b=function(f,l){l=l.split("|");var j=d[l[0]];for(var h=1;h<l.length;h++){j=c[l[h]](j)}if(j==""){return""}if(j==0||j==-1){j+=""}return j||f};return a.replace(/%\(([A-Za-z0-9_|.]*)\)/g,b)},getXMLHttpRequest:function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.4.0")},function(){throw"Browser does not support XMLHttpRequest"}];for(var a=0;a<b.length;a++){var c=b[a];try{return c()}catch(d){}}},getRequest:function(a,c){var b=AJS.getXMLHttpRequest();if(a.match(/^https?:\/\//)==null){if(AJS.BASE_URL!=""){if(AJS.BASE_URL.lastIndexOf("/")!=AJS.BASE_URL.length-1){AJS.BASE_URL+="/"}a=AJS.BASE_URL+a}}if(!c){c="POST"}return new AJSDeferred(b,c,a)},serializeJSON:function(j){var a=typeof(j);if(a=="undefined"){return"null"}else{if(a=="number"||a=="boolean"){return j+""}else{if(j===null){return"null"}}}if(a=="string"){return AJS._reprString(j)}if(a=="object"&&j.getFullYear){return AJS._reprDate(j)}var f=arguments.callee;if(a!="function"&&typeof(j.length)=="number"){var d=[];for(var c=0;c<j.length;c++){var h=f(j[c]);if(typeof(h)!="string"){h="undefined"}d.push(h)}return"["+d.join(",")+"]"}if(a=="function"){return null}d=[];for(var b in j){var g;if(typeof(b)=="number"){g='"'+b+'"'}else{if(typeof(b)=="string"){g=AJS._reprString(b)}else{continue}}h=f(j[b]);if(typeof(h)!="string"){continue}d.push(g+":"+h)}return"{"+d.join(",")+"}"},loadJSON:function(b,c,a){var g=AJS.getRequest(b,c);var f=function(h,d){var i=d.responseText;if(i=="Error"){g.errback(d)}else{return AJS.evalTxt(i)}};g.addCallback(f);return g},evalTxt:function(txt){try{return eval("("+txt+")")}catch(e){return eval(txt)}},evalScriptTags:function(html){var script_data=html.match(/<script.*?>((\n|\r|.)*?)<\/script>/g);if(script_data!=null){for(var i=0;i<script_data.length;i++){var script_only=script_data[i].replace(/<script.*?>/g,"");script_only=script_only.replace(/<\/script>/g,"");eval(script_only)}}},encodeArguments:function(a){var b=[];for(k in a){b.push(k+"="+AJS.urlencode(a[k]))}return b.join("&")},_reprString:function(a){return('"'+a.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},_reprDate:function(c){var d=c.getUTCFullYear();var a=c.getUTCDate();var f=c.getUTCMonth()+1;var b=function(g){if(g<10){g="0"+g}return g};return'"'+d+"-"+f+"-"+a+"T"+b(c.getUTCHours())+":"+b(c.getUTCMinutes())+":"+b(c.getUTCSeconds())+'"'},getMousePos:function(b){var a=0;var c=0;if(!b){var b=window.event}if(b.pageX||b.pageY){a=b.pageX;c=b.pageY}else{if(b.clientX||b.clientY){a=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;c=b.clientY+document.body.scrollTop+document.documentElement.scrollTop}}return{x:a,y:c}},getScrollTop:function(){var a;if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}return a},absolutePosition:function(c){if(!c){return{x:0,y:0}}if(c.scrollLeft){return{x:c.scrollLeft,y:c.scrollTop}}else{if(c.clientX){return{x:c.clientX,y:c.clientY}}}var b={x:c.offsetLeft,y:c.offsetTop};if(c.offsetParent){var a=c.offsetParent;while(a){b.x+=a.offsetLeft;b.y+=a.offsetTop;a=a.offsetParent}}if(AJS.isSafari()&&c.style.position=="absolute"){b.x-=document.body.offsetLeft;b.y-=document.body.offsetTop}return b},getWindowSize:function(c){c=c||document;var b,a;if(self.innerHeight){b=self.innerWidth;a=self.innerHeight}else{if(c.documentElement&&c.documentElement.clientHeight){b=c.documentElement.clientWidth;a=c.documentElement.clientHeight}else{if(c.body){b=c.body.clientWidth;a=c.body.clientHeight}}}return{w:b,h:a}},isOverlapping:function(g,c){var j=AJS.absolutePosition(g);var i=AJS.absolutePosition(c);var m=j.y;var o=j.x;var f=o+g.offsetWidth;var d=m+g.offsetHeight;var l=i.y;var n=i.x;var b=n+c.offsetWidth;var a=l+c.offsetHeight;var h=function(p){if(p>0){return"+"}else{if(p<0){return"-"}else{return 0}}};if((h(m-a)!=h(d-l))&&(h(o-b)!=h(f-n))){return true}return false},getEventElm:function(b){if(b&&!b.type&&!b.keyCode){return b}var a;if(!b){var b=window.event}if(b.target){a=b.target}else{if(b.srcElement){a=b.srcElement}}if(a&&a.nodeType==3){a=a.parentNode}return a},setEventKey:function(a){if(!a){a=window.event}a.key=a.keyCode?a.keyCode:a.charCode;a.ctrl=a.ctrlKey;a.alt=a.altKey;a.meta=a.metaKey;a.shift=a.shiftKey},onEvent:function(c,b,a,d){c=AJS.$A(c);AJS.map(c,function(f){if(f.events){f.events[b]={}}});return AJS.AEV(c,b,a,d)},ready_bound:false,is_ready:false,bindReady:function(){if(AJS.ready_bound){return}AJS.ready_bound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);AJS.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);AJS.ready()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(AJS.is_ready){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}AJS.ready()})()}}}AJS.AEV(window,"load",AJS.ready)},ready_list:[],ready:function(a){if(AJS.is_ready){return}AJS.is_ready=true;AJS.map(AJS.ready_list,function(b){b.call(window)});AJS.ready_list=[]},_f_guid:0,_wipe_guid:0,addEventListener:function(c,a,b,d){c=AJS.$A(c);a=AJS.$A(a);AJS.map(c,function(f){if(d){b.listen_once=true}if(!b.$f_guid){b.$f_guid=AJS._f_guid++}if(!f.events){f.events={}}AJS.map(a,function(h){var g=f.events[h];if(f==window&&h=="load"){AJS.ready_list.push(b)}else{if(h=="lazy_load"){h="load"}if(!g){g=f.events[h]={};if(f["on"+h]){g[0]=f["on"+h]}}if(!f._wipe_guid){f._wipe_guid=AJS._wipe_guid++}g[b.$f_guid]=b;f["on"+h]=AJS.handleEvent}});f=null})},handleEvent:function(h){var g=this;h=h||window.event;if(!h){return}if(!h.ctrl&&h.type.indexOf("key")!=-1){AJS.setEventKey(h)}var b=this.events[h.type];var a=[];var d=true;for(var c in b){var f=this.$$handleEvent=b[c];if(f==AJS.handleEvent){continue}d=f(h);if(f.listen_once){a.push(f)}}if(a.length>0){AJS.map(a,function(i){delete g.events[h.type][i.$f_guid]})}return d},removeEventListener:function(c,b,a){c=AJS.$A(c);map(c,function(d){if(d.events&&d.events[b]){delete d.events[b][a.$f_guid]}})},bind:function(b,a,c){b._cscope=a;return AJS._getRealScope(b,c)},bindMethods:function(b){for(var a in b){var c=b[a];if(typeof(c)=="function"){b[a]=AJS.$b(c,b)}}},preventDefault:function(a){if(AJS.isIe()){window.event.returnValue=false}else{a.preventDefault()}},_listenOnce:function(d,b,a){var c=function(){AJS.removeEventListener(d,b,c);a(arguments)};return c},_getRealScope:function(b,c){c=AJS.$A(c);var a=b._cscope||window;return function(){try{var d=AJS.$FA(arguments).concat(c);return b.apply(a,d)}catch(f){}}},_reccruing_tos:{},setSingleTimeout:function(b,c,a){var d=AJS._reccruing_tos[b];if(d){clearTimeout(d)}AJS._reccruing_tos[b]=setTimeout(c,a)},keys:function(b){var a=[];for(var c in b){a.push(c)}return a},values:function(b){var a=[];for(var c in b){a.push(b[c])}return a},urlencode:function(a){return encodeURIComponent(AJS.isDefined(a)&&a.toString()||"")},urldecode:function(b){var a=decodeURIComponent(AJS.isDefined(b)&&b.toString()||"");return a.replace(/\+/g," ")},isDefined:function(a){return(a!="undefined"&&a!=null)},isArray:function(b){try{return b instanceof Array}catch(a){return false}},isString:function(a){return(typeof a=="string")},isNumber:function(a){return(typeof a=="number")},isObject:function(a){return(typeof a=="object")},isFunction:function(a){return(typeof a=="function")},isDict:function(b){var a=String(b);return a.indexOf(" Object")!=-1},exportToGlobalScope:function(a){a=a||window;for(e in AJS){if(e!="addEventListener"){a[e]=AJS[e]}}},log:function(b){try{if(window._firebug){window._firebug.log(b)}else{if(window.console){console.log(b)}}}catch(a){}},strip:function(a){return a.replace(/^\s+/,"").replace(/\s+$/g,"")},trim_if_needed:function(c,a,b){if(c.length>a){return c.substring(0,a)+(b||"...")}return c}};AJS.Class=function(a){var b=function(){if(arguments[0]!="no_init"){return this.init.apply(this,arguments)}};b.prototype=a;AJS.update(b,AJS.Class.prototype);return b};AJS.Class.prototype={extend:function(a){var b=new this("no_init");for(k in a){var c=b[k];var d=a[k];if(c&&c!=d&&typeof d=="function"){d=this._parentize(d,c)}b[k]=d}return new AJS.Class(b)},implement:function(a){AJS.update(this.prototype,a)},_parentize:function(b,a){return function(){this.parent=a;return b.apply(this,arguments)}}};AJS.$=AJS.getElement;AJS.$$=AJS.getElements;AJS.$f=AJS.getFormElement;AJS.$b=AJS.bind;AJS.$p=AJS.partial;AJS.$FA=AJS.forceArray;AJS.$A=AJS.createArray;AJS.DI=AJS.documentInsert;AJS.ACN=AJS.appendChildNodes;AJS.RCN=AJS.replaceChildNodes;AJS.AEV=AJS.addEventListener;AJS.REV=AJS.removeEventListener;AJS.$bytc=AJS.getElementsByTagAndClassName;AJS.$AP=AJS.absolutePosition;AJS.loadJSONDoc=AJS.loadJSON;AJS.queryArguments=AJS.encodeArguments;AJS.$gp=AJS.getParentBytc;AJS.$gc=AJS.getChildBytc;AJS.$sv=AJS.setVisibility;AJS.generalErrorback=null;AJS.generalCallback=null;AJSDeferred=function(b,c,a){this.callbacks=[];this.errbacks=[];this.req=b;this.http_method=c;this.http_url=a};AJSDeferred.prototype={excCallbackSeq:function(c,f){var d=c.responseText;if(AJS.generalCallback){d=AJS.generalCallback(c,f);if(!d){return}}while(f.length>0){var b=f.pop();var a=b(d,c);if(a){d=a}else{if(a==false){break}}}},callback:function(){this.excCallbackSeq(this.req,this.callbacks)},errback:function(){if(this.errbacks.length==0){if(AJS.ajaxErrorHandler){AJS.ajaxErrorHandler(req.responseText,req)}else{var b=this.req.responseText.substring(0,200);if(AJS.strip(b)&&b.indexOf("<html")==-1){alert("Error encountered:\n"+b)}}}if(AJS.generalErrorback){var a=AJS.generalErrorback(this.req);if(!a){return}}this.excCallbackSeq(this.req,this.errbacks)},addErrback:function(a){this.errbacks.unshift(a)},addCallback:function(a){this.callbacks.unshift(a)},abort:function(){this.req.abort()},addCallbacks:function(b,a){this.addCallback(b);this.addErrback(a)},_onreadystatechange:function(){var b=this.req;var f=this;if(b.readyState==4){var a="";try{a=b.status}catch(c){}if(a==200||a==304||b.responseText==null){this.callback()}else{this.errback()}}},sendReq:function(d){var c=this.req;var b=this.http_method;var a=this.http_url;if(b=="POST"){c.open(b,a,true);c.onreadystatechange=AJS.$b(this._onreadystatechange,this);c.setRequestHeader("Content-type","application/x-www-form-urlencoded");if(AJS.isObject(d)){c.send(AJS.encodeArguments(d))}else{if(AJS.isDefined(d)){c.send(d)}else{c.send("")}}}else{c.open("GET",a,true);c.onreadystatechange=AJS.$b(this._onreadystatechange,this);c.send(null)}}};AJS._createDomShortcuts()}script_loaded=true;AJS.exportToGlobalScope();AJS.bindReady();
|
2 |
+
script_loaded=true;
|
js/web2print/greybox/AJS_fx.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
AJS.fx={_shades:{0:"ffffff",1:"ffffee",2:"ffffdd",3:"ffffcc",4:"ffffbb",5:"ffffaa",6:"ffff99"},highlight:function(c,a){var b=new AJS.fx.Base();b.elm=AJS.$(c);b.options.duration=600;b.setOptions(a);AJS.update(b,{increase:function(){if(this.now==7){c.style.backgroundColor="#fff"}else{c.style.backgroundColor="#"+AJS.fx._shades[Math.floor(this.now)]}}});return b.custom(6,0)},fadeIn:function(c,a){a=a||{};if(!a.from){a.from=0;AJS.setOpacity(c,0)}if(!a.to){a.to=1}var b=new AJS.fx.Style(c,"opacity",a);return b.custom(a.from,a.to)},fadeOut:function(c,a){a=a||{};if(!a.from){a.from=1}if(!a.to){a.to=0}a.duration=300;var b=new AJS.fx.Style(c,"opacity",a);return b.custom(a.from,a.to)},setWidth:function(c,a){var b=new AJS.fx.Style(c,"width",a);return b.custom(a.from,a.to)},setHeight:function(c,a){var b=new AJS.fx.Style(c,"height",a);return b.custom(a.from,a.to)}};AJS.fx.Base=new AJS.Class({init:function(a){this.options={onStart:function(){},onComplete:function(){},transition:AJS.fx.Transitions.sineInOut,duration:500,wait:true,fps:50};AJS.update(this.options,a);AJS.bindMethods(this)},setOptions:function(a){AJS.update(this.options,a)},step:function(){var a=new Date().getTime();if(a<this.time+this.options.duration){this.cTime=a-this.time;this.setNow()}else{setTimeout(AJS.$b(this.options.onComplete,this,[this.elm]),10);this.clearTimer();this.now=this.to}this.increase()},setNow:function(){this.now=this.compute(this.from,this.to)},compute:function(c,b){var a=b-c;return this.options.transition(this.cTime,c,a,this.options.duration)},clearTimer:function(){clearInterval(this.timer);this.timer=null;return this},_start:function(b,a){if(!this.options.wait){this.clearTimer()}if(this.timer){return}setTimeout(AJS.$p(this.options.onStart,this.elm),10);this.from=b;this.to=a;this.time=new Date().getTime();this.timer=setInterval(this.step,Math.round(1000/this.options.fps));return this},custom:function(b,a){return this._start(b,a)},set:function(a){this.now=a;this.increase();return this},setStyle:function(c,a,b){if(this.property=="opacity"){AJS.setOpacity(c,b)}else{AJS.setStyle(c,a,b)}}});AJS.fx.Style=AJS.fx.Base.extend({init:function(c,b,a){this.parent();this.elm=c;this.setOptions(a);this.property=b},increase:function(){this.setStyle(this.elm,this.property,this.now)}});AJS.fx.Styles=AJS.fx.Base.extend({init:function(b,a){this.parent();this.elm=AJS.$(b);this.setOptions(a);this.now={}},setNow:function(){for(p in this.from){this.now[p]=this.compute(this.from[p],this.to[p])}},custom:function(a){if(this.timer&&this.options.wait){return}var c={};var b={};for(p in a){c[p]=a[p][0];b[p]=a[p][1]}return this._start(c,b)},increase:function(){for(var a in this.now){this.setStyle(this.elm,a,this.now[a])}}});AJS.fx.Transitions={linear:function(e,a,g,f){return g*e/f+a},sineInOut:function(e,a,g,f){return -g/2*(Math.cos(Math.PI*e/f)-1)+a}};script_loaded=true;
|
2 |
+
script_loaded=true;
|
js/web2print/greybox/g_close.gif
ADDED
Binary file
|
js/web2print/greybox/gb_scripts.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
var GB_CURRENT=null;GB_hide=function(a){GB_CURRENT.hide(a)};GreyBox=new AJS.Class({init:function(c){this.use_fx=AJS.fx;this.type="page";this.overlay_click_close=false;this.salt=0;this.root_dir=GB_ROOT_DIR;this.callback_fns=[];this.reload_on_close=false;this.src_loader=this.root_dir+"loader_frame.html";var b=window.location.hostname.indexOf("www");var a=this.src_loader.indexOf("www");if(b!=-1&&a==-1){this.src_loader=this.src_loader.replace("://","://www.")}if(b==-1&&a!=-1){this.src_loader=this.src_loader.replace("://www.","://")}this.show_loading=true;AJS.update(this,c)},addCallback:function(a){if(a){this.callback_fns.push(a)}},show:function(a){GB_CURRENT=this;this.url=a;var b=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(b),function(c){c.style.visibility="hidden"});this.createElements();return false},hide:function(a){var b=this;setTimeout(function(){var d=b.callback_fns;if(d!=[]){AJS.map(d,function(f){f()})}b.onHide();if(b.use_fx){var e=b.overlay;AJS.fx.fadeOut(b.overlay,{onComplete:function(){AJS.removeElement(e);e=null},duration:300});AJS.removeElement(b.g_window)}else{AJS.removeElement(b.g_window,b.overlay)}b.removeFrame();AJS.REV(window,"scroll",_GB_setOverlayDimension);AJS.REV(window,"resize",_GB_update);var c=[AJS.$bytc("object"),AJS.$bytc("select")];AJS.map(AJS.flattenList(c),function(f){f.style.visibility="visible"});GB_CURRENT=null;if(b.reload_on_close){window.location.reload()}if(AJS.isFunction(a)){a()}},10)},update:function(){this.setOverlayDimension();this.setFrameSize();this.setWindowPosition()},createElements:function(){this.initOverlay();this.g_window=AJS.DIV({id:"GB_window"});AJS.hideElement(this.g_window);AJS.getBody().insertBefore(this.g_window,this.overlay.nextSibling);this.initFrame();this.initHook();this.update();var a=this;if(this.use_fx){AJS.fx.fadeIn(this.overlay,{duration:300,to:0.7,onComplete:function(){a.onShow();AJS.showElement(a.g_window);a.startLoading()}})}else{AJS.setOpacity(this.overlay,0.7);AJS.showElement(this.g_window);this.onShow();this.startLoading()}AJS.AEV(window,"scroll",_GB_setOverlayDimension);AJS.AEV(window,"resize",_GB_update)},removeFrame:function(){try{AJS.removeElement(this.iframe)}catch(a){}this.iframe=null},startLoading:function(){this.iframe.src=this.src_loader+"?s="+this.salt++;AJS.showElement(this.iframe)},setOverlayDimension:function(){var b=AJS.getWindowSize();if(AJS.isMozilla()||AJS.isOpera()){AJS.setWidth(this.overlay,"100%")}else{AJS.setWidth(this.overlay,b.w)}var a=Math.max(AJS.getScrollTop()+b.h,AJS.getScrollTop()+this.height);if(a<AJS.getScrollTop()){AJS.setHeight(this.overlay,a)}else{AJS.setHeight(this.overlay,AJS.getScrollTop()+b.h)}},initOverlay:function(){this.overlay=AJS.DIV({id:"GB_overlay"});if(this.overlay_click_close){AJS.AEV(this.overlay,"click",GB_hide)}AJS.setOpacity(this.overlay,0);AJS.getBody().insertBefore(this.overlay,AJS.getBody().firstChild)},initFrame:function(){if(!this.iframe){var a={name:"GB_frame","class":"GB_frame",frameBorder:0};if(AJS.isIe()){a.src='javascript:false;document.write("");'}this.iframe=AJS.IFRAME(a);this.middle_cnt=AJS.DIV({"class":"content"},this.iframe);this.top_cnt=AJS.DIV();this.bottom_cnt=AJS.DIV();AJS.ACN(this.g_window,this.top_cnt,this.middle_cnt,this.bottom_cnt)}},onHide:function(){},onShow:function(){},setFrameSize:function(){},setWindowPosition:function(){},initHook:function(){}});_GB_update=function(){if(GB_CURRENT){GB_CURRENT.update()}};_GB_setOverlayDimension=function(){if(GB_CURRENT){GB_CURRENT.setOverlayDimension()}};AJS.preloadImages(GB_ROOT_DIR+"indicator.gif");script_loaded=true;var GB_SETS={};function decoGreyboxLinks(){var a=AJS.$bytc("a");AJS.map(a,function(c){if(c.getAttribute("href")&&c.getAttribute("rel")){var b=c.getAttribute("rel");if(b.indexOf("gb_")==0){var f=b.match(/\w+/)[0];var e=b.match(/\[(.*)\]/)[1];var d=0;var g={caption:c.title||"",url:c.href};if(f=="gb_pageset"||f=="gb_imageset"){if(!GB_SETS[e]){GB_SETS[e]=[]}GB_SETS[e].push(g);d=GB_SETS[e].length}if(f=="gb_pageset"){c.onclick=function(){GB_showFullScreenSet(GB_SETS[e],d);return false}}if(f=="gb_imageset"){c.onclick=function(){GB_showImageSet(GB_SETS[e],d);return false}}if(f=="gb_image"){c.onclick=function(){GB_showImage(g.caption,g.url);return false}}if(f=="gb_page"){c.onclick=function(){var h=e.split(/, ?/);GB_show(g.caption,g.url,parseInt(h[1]),parseInt(h[0]));return false}}if(f=="gb_page_fs"){c.onclick=function(){GB_showFullScreen(g.caption,g.url);return false}}if(f=="gb_page_center"){c.onclick=function(){var h=e.split(/, ?/);GB_showCenter(g.caption,g.url,parseInt(h[1]),parseInt(h[0]));return false}}}}})}AJS.AEV(window,"load",decoGreyboxLinks);GB_showImage=function(a,c,e){var b={width:300,height:300,type:"image",fullscreen:false,center_win:true,caption:a,callback_fn:e};var d=new GB_Gallery(b);return d.show(c)};GB_showPage=function(a,c,e){var b={type:"page",caption:a,callback_fn:e,fullscreen:true,center_win:false};var d=new GB_Gallery(b);return d.show(c)};GB_Gallery=GreyBox.extend({init:function(a){this.parent({});this.img_close=this.root_dir+"g_close.gif";AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Gallery");var c=AJS.DIV({"class":"inner"});this.header=AJS.DIV({"class":"GB_header"},c);AJS.setOpacity(this.header,0);AJS.getBody().insertBefore(this.header,this.overlay.nextSibling);var e=AJS.TD({id:"GB_caption","class":"caption",width:"40%"},this.caption);var b=AJS.TD({id:"GB_middle","class":"middle",width:"20%"});var f=AJS.IMG({src:this.img_close});AJS.AEV(f,"click",GB_hide);var a=AJS.TD({"class":"close",width:"40%"},f);var d=AJS.TBODY(AJS.TR(e,b,a));var g=AJS.TABLE({cellspacing:"0",cellpadding:0,border:0},d);AJS.ACN(c,g);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}else{AJS.AEV(window,"scroll",AJS.$b(this._setHeaderPos,this))}},setFrameSize:function(){var b=this.overlay.offsetWidth;var a=AJS.getWindowSize();if(this.fullscreen){this.width=b-40;this.height=a.h-80}AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height);AJS.setWidth(this.header,b)},_setHeaderPos:function(){AJS.setTop(this.header,AJS.getScrollTop()+10)},setWindowPosition:function(){var c=this.overlay.offsetWidth;var a=AJS.getWindowSize();AJS.setLeft(this.g_window,((c-50-this.width)/2));var d=AJS.getScrollTop()+55;if(!this.center_win){AJS.setTop(this.g_window,d)}else{var b=((a.h-this.height)/2)+20+AJS.getScrollTop();if(b<0){b=0}if(d>b){b=d}AJS.setTop(this.g_window,b)}this._setHeaderPos()},onHide:function(){AJS.removeElement(this.header);AJS.removeClass(this.g_window,"GB_Gallery")},onShow:function(){if(this.use_fx){AJS.fx.fadeIn(this.header,{to:1})}else{AJS.setOpacity(this.header,1)}}});AJS.preloadImages(GB_ROOT_DIR+"g_close.gif");GB_showFullScreenSet=function(e,a,d){var b={type:"page",fullscreen:true,center_win:false};var c=new GB_Sets(b,e);c.addCallback(d);c.showSet(a-1);return false};GB_showImageSet=function(e,a,d){var b={type:"image",fullscreen:false,center_win:true,width:300,height:300};var c=new GB_Sets(b,e);c.addCallback(d);c.showSet(a-1);return false};GB_Sets=GB_Gallery.extend({init:function(a,b){this.parent(a);if(!this.img_next){this.img_next=this.root_dir+"next.gif"}if(!this.img_prev){this.img_prev=this.root_dir+"prev.gif"}this.current_set=b},showSet:function(a){this.current_index=a;var b=this.current_set[this.current_index];this.show(b.url);this._setCaption(b.caption);this.btn_prev=AJS.IMG({"class":"left",src:this.img_prev});this.btn_next=AJS.IMG({"class":"right",src:this.img_next});AJS.AEV(this.btn_prev,"click",AJS.$b(this.switchPrev,this));AJS.AEV(this.btn_next,"click",AJS.$b(this.switchNext,this));GB_STATUS=AJS.SPAN({"class":"GB_navStatus"});AJS.ACN(AJS.$("GB_middle"),this.btn_prev,GB_STATUS,this.btn_next);this.updateStatus()},updateStatus:function(){AJS.setHTML(GB_STATUS,(this.current_index+1)+" / "+this.current_set.length);if(this.current_index==0){AJS.addClass(this.btn_prev,"disabled")}else{AJS.removeClass(this.btn_prev,"disabled")}if(this.current_index==this.current_set.length-1){AJS.addClass(this.btn_next,"disabled")}else{AJS.removeClass(this.btn_next,"disabled")}},_setCaption:function(a){AJS.setHTML(AJS.$("GB_caption"),a)},updateFrame:function(){var a=this.current_set[this.current_index];this._setCaption(a.caption);this.url=a.url;this.startLoading()},switchPrev:function(){if(this.current_index!=0){this.current_index--;this.updateFrame();this.updateStatus()}},switchNext:function(){if(this.current_index!=this.current_set.length-1){this.current_index++;this.updateFrame();this.updateStatus()}}});AJS.AEV(window,"load",function(){AJS.preloadImages(GB_ROOT_DIR+"next.gif",GB_ROOT_DIR+"prev.gif")});GB_show=function(b,d,a,e,g){var c={caption:b,height:a||500,width:e||500,fullscreen:false,callback_fn:g};var f=new GB_Window(c);return f.show(d)};GB_showCenter=function(b,d,a,e,g){var c={caption:b,center_win:true,height:a||500,width:e||500,fullscreen:false,callback_fn:g};var f=new GB_Window(c);return f.show(d)};GB_showFullScreen=function(a,c,e){var b={caption:a,fullscreen:true,callback_fn:e};var d=new GB_Window(b);return d.show(c)};GB_Window=GreyBox.extend({init:function(a){this.parent({});this.img_header=this.root_dir+"header_bg.gif";this.img_close=this.root_dir+"w_close.gif";this.show_close_img=true;AJS.update(this,a);this.addCallback(this.callback_fn)},initHook:function(){AJS.addClass(this.g_window,"GB_Window");this.header=AJS.TABLE({"class":"header"});this.header.style.backgroundImage="url("+this.img_header+")";var b=AJS.TD({"class":"caption"},this.caption);var a=AJS.TD({"class":"close"});if(this.show_close_img){var e=AJS.IMG({src:this.img_close});var d=AJS.SPAN("Close");var c=AJS.DIV(e,d);AJS.AEV([e,d],"mouseover",function(){AJS.addClass(d,"on")});AJS.AEV([e,d],"mouseout",function(){AJS.removeClass(d,"on")});AJS.AEV([e,d],"mousedown",function(){AJS.addClass(d,"click")});AJS.AEV([e,d],"mouseup",function(){AJS.removeClass(d,"click")});AJS.AEV([e,d],"click",GB_hide);AJS.ACN(a,c)}tbody_header=AJS.TBODY();AJS.ACN(tbody_header,AJS.TR(b,a));AJS.ACN(this.header,tbody_header);AJS.ACN(this.top_cnt,this.header);if(this.fullscreen){AJS.AEV(window,"scroll",AJS.$b(this.setWindowPosition,this))}},setFrameSize:function(){if(this.fullscreen){var a=AJS.getWindowSize();overlay_h=a.h;this.width=Math.round(this.overlay.offsetWidth-(this.overlay.offsetWidth/100)*10);this.height=Math.round(overlay_h-(overlay_h/100)*10)}AJS.setWidth(this.header,this.width+6);AJS.setWidth(this.iframe,this.width);AJS.setHeight(this.iframe,this.height)},setWindowPosition:function(){var a=AJS.getWindowSize();AJS.setLeft(this.g_window,((a.w-this.width)/2)-13);if(!this.center_win){AJS.setTop(this.g_window,AJS.getScrollTop())}else{var b=((a.h-this.height)/2)-20+AJS.getScrollTop();if(b<0){b=0}AJS.setTop(this.g_window,b)}}});AJS.preloadImages(GB_ROOT_DIR+"w_close.gif",GB_ROOT_DIR+"header_bg.gif");
|
2 |
+
script_loaded=true;
|
js/web2print/greybox/gb_styles.css
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Last-Modified: 28/06/06 00:08:22 */
|
2 |
+
#GB_overlay {
|
3 |
+
background-color: #000;
|
4 |
+
position: absolute;
|
5 |
+
margin: auto;
|
6 |
+
top: 0;
|
7 |
+
left: 0;
|
8 |
+
z-index: 100;
|
9 |
+
}
|
10 |
+
|
11 |
+
#GB_window {
|
12 |
+
left: 0;
|
13 |
+
top: 0;
|
14 |
+
font-size: 1px;
|
15 |
+
position: absolute;
|
16 |
+
overflow: visible;
|
17 |
+
z-index: 150;
|
18 |
+
}
|
19 |
+
|
20 |
+
#GB_window .content {
|
21 |
+
width: auto;
|
22 |
+
margin: 0;
|
23 |
+
padding: 0;
|
24 |
+
}
|
25 |
+
|
26 |
+
#GB_frame {
|
27 |
+
border: 0;
|
28 |
+
margin: 0;
|
29 |
+
padding: 0;
|
30 |
+
overflow: auto;
|
31 |
+
white-space: nowrap;
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
.GB_Gallery {
|
36 |
+
margin: 0 22px 0 22px;
|
37 |
+
}
|
38 |
+
|
39 |
+
.GB_Gallery .content {
|
40 |
+
background-color: #fff;
|
41 |
+
border: 3px solid #ddd;
|
42 |
+
}
|
43 |
+
|
44 |
+
.GB_header {
|
45 |
+
top: 10px;
|
46 |
+
left: 0;
|
47 |
+
margin: 0;
|
48 |
+
z-index: 500;
|
49 |
+
position: absolute;
|
50 |
+
border-bottom: 2px solid #555;
|
51 |
+
border-top: 2px solid #555;
|
52 |
+
}
|
53 |
+
|
54 |
+
.GB_header .inner {
|
55 |
+
background-color: #333;
|
56 |
+
font-family: Arial, Verdana, sans-serif;
|
57 |
+
padding: 2px 20px 2px 20px;
|
58 |
+
}
|
59 |
+
|
60 |
+
.GB_header table {
|
61 |
+
margin: 0;
|
62 |
+
width: 100%;
|
63 |
+
border-collapse: collapse;
|
64 |
+
}
|
65 |
+
|
66 |
+
.GB_header .caption {
|
67 |
+
text-align: left;
|
68 |
+
color: #eee;
|
69 |
+
white-space: nowrap;
|
70 |
+
font-size: 20px;
|
71 |
+
}
|
72 |
+
|
73 |
+
.GB_header .close {
|
74 |
+
text-align: right;
|
75 |
+
}
|
76 |
+
|
77 |
+
.GB_header .close img {
|
78 |
+
z-index: 500;
|
79 |
+
cursor: pointer;
|
80 |
+
}
|
81 |
+
|
82 |
+
.GB_header .middle {
|
83 |
+
white-space: nowrap;
|
84 |
+
text-align: center;
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
#GB_middle {
|
89 |
+
color: #eee;
|
90 |
+
}
|
91 |
+
|
92 |
+
#GB_middle img {
|
93 |
+
cursor: pointer;
|
94 |
+
vertical-align: middle;
|
95 |
+
}
|
96 |
+
|
97 |
+
#GB_middle .disabled {
|
98 |
+
cursor: default;
|
99 |
+
}
|
100 |
+
|
101 |
+
#GB_middle .left {
|
102 |
+
padding-right: 10px;
|
103 |
+
}
|
104 |
+
|
105 |
+
#GB_middle .right {
|
106 |
+
padding-left: 10px;
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
.GB_Window .content {
|
111 |
+
background-color: #fff;
|
112 |
+
border: 3px solid #ccc;
|
113 |
+
border-top: none;
|
114 |
+
}
|
115 |
+
|
116 |
+
.GB_Window .header {
|
117 |
+
border-bottom: 1px solid #aaa;
|
118 |
+
border-top: 1px solid #999;
|
119 |
+
border-left: 3px solid #ccc;
|
120 |
+
border-right: 3px solid #ccc;
|
121 |
+
margin: 0;
|
122 |
+
|
123 |
+
height: 22px;
|
124 |
+
font-size: 12px;
|
125 |
+
padding: 3px 0;
|
126 |
+
color: #333;
|
127 |
+
}
|
128 |
+
|
129 |
+
.GB_Window .caption {
|
130 |
+
font-size: 12px;
|
131 |
+
text-align: left;
|
132 |
+
font-weight: bold;
|
133 |
+
white-space: nowrap;
|
134 |
+
padding-right: 20px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.GB_Window .close { text-align: right; }
|
138 |
+
.GB_Window .close span {
|
139 |
+
font-size: 12px;
|
140 |
+
cursor: pointer;
|
141 |
+
}
|
142 |
+
.GB_Window .close img {
|
143 |
+
cursor: pointer;
|
144 |
+
padding: 0 3px 0 0;
|
145 |
+
}
|
146 |
+
|
147 |
+
.GB_Window .on { border-bottom: 1px solid #333; }
|
148 |
+
.GB_Window .click { border-bottom: 1px solid red; }
|
js/web2print/greybox/header_bg.gif
ADDED
Binary file
|
js/web2print/greybox/indicator.gif
ADDED
Binary file
|
js/web2print/greybox/loader_frame.html
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!--
|
2 |
+
way to make it cross browser.
|
3 |
+
-->
|
4 |
+
<html>
|
5 |
+
<head>
|
6 |
+
<script>
|
7 |
+
var GB = parent.GB_CURRENT;
|
8 |
+
document.write('<script type="text/javascript" src="AJS.js"><\/script>');
|
9 |
+
if(GB.use_fx) {
|
10 |
+
document.write('<script type="text/javascript" src="AJS_fx.js"><\/script>');
|
11 |
+
}
|
12 |
+
</script>
|
13 |
+
<style>
|
14 |
+
body {
|
15 |
+
padding: 0;
|
16 |
+
margin: 0;
|
17 |
+
overflow: hidden;
|
18 |
+
}
|
19 |
+
|
20 |
+
#GB_frame {
|
21 |
+
visibility: hidden;
|
22 |
+
width: 100%;
|
23 |
+
height: 100%;
|
24 |
+
}
|
25 |
+
|
26 |
+
#loading {
|
27 |
+
padding-top: 50px;
|
28 |
+
position: absolute;
|
29 |
+
width: 100%;
|
30 |
+
top: 0;
|
31 |
+
text-align: center;
|
32 |
+
vertical-align: middle;
|
33 |
+
}
|
34 |
+
</style>
|
35 |
+
</head>
|
36 |
+
<body>
|
37 |
+
|
38 |
+
<div id="loading">
|
39 |
+
<img src="indicator.gif">
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<script>
|
43 |
+
var loading = AJS.$('loading');
|
44 |
+
var gb_type = GB.type;
|
45 |
+
var gb_url = GB.url;
|
46 |
+
|
47 |
+
//Start loading in the iframe
|
48 |
+
if(gb_type == "page") {
|
49 |
+
document.write('<iframe id="GB_frame" src="' + gb_url + '" frameborder="0"></iframe>');
|
50 |
+
}
|
51 |
+
else {
|
52 |
+
var img_holder = new Image();
|
53 |
+
img_holder.src = gb_url;
|
54 |
+
document.write('<img id="GB_frame" src="' + gb_url + '">');
|
55 |
+
}
|
56 |
+
var frame = AJS.$('GB_frame');
|
57 |
+
</script>
|
58 |
+
|
59 |
+
</body>
|
60 |
+
<script>
|
61 |
+
function setupOuterGB() {
|
62 |
+
frame.style.visibility = 'visible';
|
63 |
+
GB.setFrameSize();
|
64 |
+
GB.setWindowPosition();
|
65 |
+
}
|
66 |
+
|
67 |
+
function loaded() {
|
68 |
+
AJS.removeElement(loading);
|
69 |
+
|
70 |
+
GB.overlay.innerHTML += " "; //Safari bugfix
|
71 |
+
|
72 |
+
if(gb_type == "image") {
|
73 |
+
if(img_holder.width != 0 && img_holder.height != 0) {
|
74 |
+
var width = img_holder.width;
|
75 |
+
var height = img_holder.height;
|
76 |
+
|
77 |
+
GB.width = width;
|
78 |
+
GB.height = height;
|
79 |
+
|
80 |
+
setupOuterGB();
|
81 |
+
|
82 |
+
if(GB.use_fx) {
|
83 |
+
AJS.setOpacity(frame, 0);
|
84 |
+
AJS.fx.fadeIn(frame);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
else {
|
89 |
+
GB.width = frame.offsetWidth;
|
90 |
+
GB.height = frame.offsetHeight;
|
91 |
+
setupOuterGB();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
if(GB.show_loading) {
|
96 |
+
AJS.AEV(window, 'load', function(e) {
|
97 |
+
loaded();
|
98 |
+
});
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
loaded();
|
102 |
+
}
|
103 |
+
</script>
|
104 |
+
</html>
|
js/web2print/greybox/next.gif
ADDED
Binary file
|
js/web2print/greybox/prev.gif
ADDED
Binary file
|
js/web2print/greybox/w_close.gif
ADDED
Binary file
|
js/web2print/jquery/jquery-1.6.4.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
|
2 |
+
(function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
|
3 |
+
t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
|
4 |
+
(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
|
5 |
+
jQuery.noConflict();
|
js/web2print/web2print.js
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function responseUrl()
|
2 |
+
{
|
3 |
+
var pageUrl = document.location.href;
|
4 |
+
var iniPageURL = utf8_decode(unescape(pageUrl));
|
5 |
+
|
6 |
+
var myArray = iniPageURL.split("?");
|
7 |
+
//var baseURL = utf8_decode(unescape(myArray[1]));
|
8 |
+
if(myArray[1]){
|
9 |
+
parent.parent.GB_hide();
|
10 |
+
parent.parent.document.location.href = pageUrl;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
function getUrlVars()
|
14 |
+
{
|
15 |
+
var vars = [], hash;
|
16 |
+
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
17 |
+
for(var i = 0; i < hashes.length; i++)
|
18 |
+
{
|
19 |
+
hash = hashes[i].split('=');
|
20 |
+
vars.push(hash[0]);
|
21 |
+
vars[hash[0]] = hash[1];
|
22 |
+
}
|
23 |
+
return vars;
|
24 |
+
}
|
25 |
+
function utf8_decode(utftext) {
|
26 |
+
var string = "";
|
27 |
+
var i = 0;
|
28 |
+
var c = c1 = c2 = 0;
|
29 |
+
|
30 |
+
while ( i < utftext.length ) {
|
31 |
+
|
32 |
+
c = utftext.charCodeAt(i);
|
33 |
+
|
34 |
+
if (c < 128) {
|
35 |
+
string += String.fromCharCode(c);
|
36 |
+
i++;
|
37 |
+
}
|
38 |
+
else if((c > 191) && (c < 224)) {
|
39 |
+
c2 = utftext.charCodeAt(i+1);
|
40 |
+
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
41 |
+
i += 2;
|
42 |
+
}
|
43 |
+
else {
|
44 |
+
c2 = utftext.charCodeAt(i+1);
|
45 |
+
c3 = utftext.charCodeAt(i+2);
|
46 |
+
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
47 |
+
i += 3;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
51 |
+
|
52 |
+
return string;
|
53 |
+
}
|
media/web2print/images/bkg_btn.png
ADDED
Binary file
|
media/web2print/images/bkg_btn_orange.png
ADDED
Binary file
|
media/web2print/images/cross.png
ADDED
Binary file
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>PrintShop_TryOut</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>DesignTool for products. Customers create their own design online with a WYSIWYG - DesignTool and preview.</summary>
|
10 |
+
<description>This is a High-End DesignTool Cloudservice to make a PrintShop with Magento. Automatic import for printproduct templates to your Magento-Shop. Each product gets a DesignTool button on product detail page where you can call the WYSIWYG Designer to create your personalization. The Cloudservice is sending you the HighResolution PDF-Printfile.</description>
|
11 |
+
<notes>New: temporary sessions for guest user on cloudservice New: guest connect setup New: designtool button on product list New: flexible size on designtool page New: connection data in backend are visible for administrators</notes>
|
12 |
+
<authors><author><name>Clixmedia GmbH</name><user>tlanbacher</user><email>info@clixmedia.ch</email></author></authors>
|
13 |
+
<date>2013-09-18</date>
|
14 |
+
<time>06:08:54</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Printshop"><dir name="Catalog"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="List.php" hash="1ccf8855da9fdc368945c5c7703c7279"/><file name="View.php" hash="201a8314db41949a7f59aaa446c8a776"/></dir></dir></dir><dir name="Helper"><dir name="Product"><file name="List.php" hash="e4f561a0c529ebcf5ca2ccc054da28ad"/><file name="View.php" hash="15bdec70ed9196db6064ab858c52c0e2"/></dir></dir><dir name="controllers"><file name="ProductController.php" hash="8d96e0789b120f6f5dcad0e7024b736f"/></dir><dir name="etc"><file name="config.xml" hash="b616efaea31d076434da69aae2f87f59"/></dir></dir><dir name="Checkout"><dir name="Block"><file name="Cart.php" hash="84ed3b70067f6705def5bff6442d5cc1"/><dir name="Onepage"><file name="Success.php" hash="e052c885e6beef51b7f24b1f2370c7ef"/></dir></dir><dir name="Model"><file name="Cart.php" hash="e65b6ac24b3163b15bf51d93647cfaa3"/></dir><dir name="controllers"><file name="CartController.php" hash="943cb87f66b8ef7b53c6387c1178d416"/></dir><dir name="etc"><file name="config.xml" hash="dc0afec8785def27dd6244a2f19d7724"/></dir></dir><dir name="Page"><dir name="Block"><dir name="Html"><file name="Head.php" hash="ea4a0da198925861d95aaf06983f6948"/></dir></dir><dir name="etc"><file name="config.xml" hash="749df445c9c9a1858b53951e28472ea9"/></dir></dir><dir name="Productpdf"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Productpdf.php" hash="32ebf6d929dd4b3cd88c1e74ecc4a100"/></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="48ada9e99ff2ca395383c477580d9d3b"/></dir></dir><dir name="Syncproduct"><dir name="Block"><dir name="Adminhtml"><dir name="Syncproduct"><dir name="Adminsetup"><file name="Tabs.php" hash="6a0ef089e57dc9fb89473fc0985dace3"/></dir><file name="Adminsetup.php" hash="3565bb8327763ad06503a8ffa2e22912"/><dir name="Edit"><file name="Form.php" hash="d385fd156189296805b218ffeb8dfc3b"/><dir name="Tab"><file name="Form.php" hash="936dcf28ac18f16749154e788dca025a"/></dir><file name="Tabs.php" hash="93a7f3e5017041becfa9d4a02e55d853"/></dir><file name="Edit.php" hash="deea817ea6bbceaba00b9d0ff12546ab"/><dir name="Frontendsetup"><file name="Tabs.php" hash="c12e114e8987358fd32c46052967ad69"/></dir><file name="Frontendsetup.php" hash="4decf43aa2e192fd0f7f75314ba7b204"/><file name="Grid.php" hash="adb5c8eafe92a1d0ad9bf53ee426cb91"/><dir name="Guestsetup"><file name="Tabs.php" hash="3f15301574d13b3dbbbb7cdeba79a6eb"/></dir><file name="Guestsetup.php" hash="9748606ebaab7c4a352bec2fcccf5c01"/><file name="Producttype.php" hash="a5f903835b6e883bd6bd433b6686e7a6"/><dir name="Renderer"><file name="Image.php" hash="61d37c47fc5953cf0cde540e2522d876"/></dir><dir name="Synclog"><file name="Tabs.php" hash="af6d552058334704c05aabaed9403f11"/></dir><file name="Synclog.php" hash="50f4c58acc999801a61af6d71e855060"/></dir><file name="Syncproduct.php" hash="ad3584fa52bbc3134538e6c25c7a565c"/></dir><file name="Syncproduct.php" hash="d760aa6ae12ce0afcdbe1900a747327d"/></dir><dir name="Helper"><file name="Data.php" hash="c5541b903348f3d5fb6d088c7be0541e"/></dir><dir name="Model"><file name="Catalog.php" hash="9243a0703c0e108272133b8694c500ef"/><file name="Ibrightadmin.php" hash="cf7d8ca92d38a50258ed1286a8227fec"/><file name="Ibrightfrontend.php" hash="277eb5a28dda03aafe0c627568bb6a1f"/><file name="Ibrightguest.php" hash="1400283a94292630379d9341dad3d988"/><dir name="Mysql4"><dir name="Catalog"><file name="Collection.php" hash="6e46dc4cadf32ff5fd6b663ce4612c80"/></dir><file name="Catalog.php" hash="b0d09133033fb4a5bc511e5c41f30e98"/><dir name="Ibrightadmin"><file name="Collection.php" hash="1b7e192663adfbdcc21044673fafdacd"/></dir><file name="Ibrightadmin.php" hash="a626d0204be43c6d0ab136ad659dacb0"/><dir name="Ibrightfrontend"><file name="Collection.php" hash="a079161fed8e014c81cd426135475cff"/></dir><file name="Ibrightfrontend.php" hash="34bbde1b843554d6595c14021a1ef40d"/><dir name="Ibrightguest"><file name="Collection.php" hash="9174bb15dad191d62d49a1ba5af5f34f"/></dir><file name="Ibrightguest.php" hash="9c99fdc50f3afe9d25cc86424118be7c"/><dir name="Syncproduct"><file name="Collection.php" hash="a28c872358180a0b270aee1ceec9fd19"/></dir><file name="Syncproduct.php" hash="2b99a9c912146e542350baf42dac5cbc"/></dir><file name="Producttype.php" hash="836c6d2c7c6656b1051a83a1691fbae3"/><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="bba8cf2badc328932e38e480b4826232"/></dir></dir></dir><dir name="Source"><file name="Option.php" hash="fa0f7a812a5b5b3b759b08f367dab9ac"/></dir><file name="Syncproduct.php" hash="e08a15fd726beb5e85f6900a358347dc"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="SyncproductController.php" hash="7abff7ebe55b36e9ebe7be7a56c94a36"/></dir><file name="IndexController.php" hash="5afe0e9bf101fd815dffca66ca9811ee"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0fe79b84d41fc2f0ac428004725875e0"/><file name="config.xml" hash="a189789a33e579fcb49cf757935eb3d3"/></dir><dir name="sql"><dir name="syncproduct_setup"><file name="mysql4-install-0.1.0.php" hash="439653a324adb3557e97c48edfb873b9"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="ee807ea04187e36f78d312ff34d7f230"/><file name="mysql4-upgrade-0.1.1-1.1.3.php" hash="e5b0261c62d3ee49741bffb4e49b8be2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="productpdf.xml" hash="6c9e4db818411e8e990e92cf3dcd0647"/><file name="syncproduct.xml" hash="b0a39fa388a0341fd344cc02d3fb3fc5"/></dir><dir name="template"><dir name="productpdf"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><file name="userpdf.phtml" hash="6e2218074d80c587a9146180f80203c2"/></dir></dir></dir></dir></dir><dir name="syncproduct"><file name="adminsetup.phtml" hash="23e8e07052ecca18d294fd1d7291d572"/><file name="edit.phtml" hash="ac7cdeef56e5d01c0ff798c46e6eeb89"/><file name="frontendsetup.phtml" hash="7f636a656ce56d6604f836b425007a0f"/><file name="guestsetup.phtml" hash="2ce208aaec63bf2e770cc2d860bd3736"/><file name="log.phtml" hash="45f9f15a3de275368bbb6c9ccf158078"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="printshop.xml" hash="79df37ffd2dca0917e4ce3eee44f661a"/><file name="printshop_checkout.xml" hash="3297f07e7857b17edf39115a17db6fd3"/></dir><dir name="template"><dir name="catalog"><file name="productlist.phtml" hash="cda2ab0745ff4205d0fe5c51ccf2e7c9"/><file name="catalog.phtml" hash="ef0127f110bee974e5335c051a7841af"/><dir name="product"><dir name="view"><file name="printshop_media.phtml" hash="4433f4e53bd08da9f220381007680d0b"/></dir></dir></dir><dir name="checkout"><file name="printshop_cart.phtml" hash="00cd8f28f6b742c2ea9aa8d2cdfdcc77"/><dir name="cart"><dir name="item"><file name="printshop_default.phtml" hash="a446ab9f91e40eca20b128d79c5c86e9"/></dir></dir></dir><dir name="page"><dir name="html"><file name="printshop_head.phtml" hash="03bcbc45698b36f0af264b471c504ca0"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Printshop_Syncproduct.xml" hash="853cc0d6e92c971743376100ca0b73b3"/><file name="Printshop_Sales.xml" hash="a00869319ca530f8d0097733e69c5659"/><file name="Printshop_Productpdf.xml" hash="04cb89f2ae11cdea76dda96b1c14850a"/><file name="Printshop_Page.xml" hash="04d2537f06b5227b2f54f569e3c09802"/><file name="Printshop_Checkout.xml" hash="b7aa4efb859368a48f3c1d9e15fce4e0"/><file name="Printshop_Catalog.xml" hash="ea847749a305cecada852a0309c4cf4c"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="e5a83a63813c2949514106dd2b1dede9"/></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="web2print"><dir name="greybox"><file name="AJS.js" hash="b41dff5d0848662faa7137ce34ebcd54"/><file name="AJS_fx.js" hash="bc507722306a5b4f5b8c219fa2a2819a"/><file name="g_close.gif" hash="ae7187edec916ea7b4aa2f77dff1b091"/><file name="gb_scripts.js" hash="af5865a699b5e43e634109e888fcd981"/><file name="gb_styles.css" hash="c4fca7c3950c3eae4c534198edb2affc"/><file name="header_bg.gif" hash="11594865f8d093dfae37f12d20f281d6"/><file name="indicator.gif" hash="f64b6f735c03431a65c7b211f55f5522"/><file name="loader_frame.html" hash="46e1e94ec1f898a21a540e073608adce"/><file name="next.gif" hash="9f86b6cc8b8548bcaace895b886c1348"/><file name="prev.gif" hash="05eb53ece32e907f467d456253ef2c2c"/><file name="w_close.gif" hash="910dd85634d6c0c6b3bd9a081ca4b09b"/></dir><dir name="jquery"><file name="jquery-1.6.4.min.js" hash="5cb047527e8c5d38dbb6aa2b021266b2"/></dir><file name="web2print.js" hash="e66e733fd548d0518c47ccab61239301"/></dir></dir></target><target name="magemedia"><dir name="web2print"><dir name="images"><file name="bkg_btn.png" hash="df9af47f282450892546effa54e7da59"/><file name="bkg_btn_orange.png" hash="156e4a0646c701bdea887c8d9dea6144"/><file name="cross.png" hash="c2a3c2a093a07b315bc01fd51afffbaf"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="web2print.css" hash="fb645e0479cf97da31d395b08e85f994"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="printshop_custom_email1.html" hash="525ec64378878cc7d581cdbe5f2fa3a3"/></dir></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><package><name>PrintShop_TryOut</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/base/default/css/web2print.css
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
button.button-orange span {background:transparent url(/media/web2print/images/bkg_btn_orange.png) 0 0 no-repeat !important;}
|
2 |
+
button.button-orange span span { background-position:100% 0 !important; }
|
3 |
+
/* Copy Template css */
|
4 |
+
#copyTemplateFormContainer {
|
5 |
+
position:fixed;
|
6 |
+
left:42%;
|
7 |
+
top:30%;
|
8 |
+
z-index:1000;
|
9 |
+
}
|
10 |
+
|
11 |
+
/* Hides the whole contact form until needed */
|
12 |
+
#copyTemplateForm {
|
13 |
+
height:200px;width:440px;
|
14 |
+
background:#FFFFFF;
|
15 |
+
border:1px solid #666666;
|
16 |
+
padding:5px 5px;
|
17 |
+
color:#000;
|
18 |
+
display:none;
|
19 |
+
}
|
20 |
+
/* Some styling for the close button */
|
21 |
+
.copyTemplate{
|
22 |
+
height:22px; width:22px;
|
23 |
+
background:url(/media/web2print/images/cross.png) no-repeat;
|
24 |
+
position:absolute;
|
25 |
+
left:426px; top:4px;
|
26 |
+
cursor:pointer;
|
27 |
+
}
|
28 |
+
#backgroundPopup{
|
29 |
+
display:none;
|
30 |
+
position:fixed;
|
31 |
+
height:100%; width:100%;
|
32 |
+
top:0; left:0;
|
33 |
+
background:#3c3c3c;
|
34 |
+
overflow:hidden;
|
35 |
+
opacity:0.6;
|
36 |
+
filter:alpha(opacity=60); /* For IE8 and earlier */
|
37 |
+
z-index:200;
|
38 |
+
}
|
39 |
+
|
40 |
+
.panel-heading h2 {
|
41 |
+
font-size: 1.5em !important;
|
42 |
+
line-height: 1.25;
|
43 |
+
margin-bottom: 0.45em;}
|
44 |
+
button.button {
|
45 |
+
background: none ;
|
46 |
+
border: 0 none;
|
47 |
+
cursor: pointer;
|
48 |
+
margin: 0;
|
49 |
+
overflow: visible;
|
50 |
+
padding: 0;
|
51 |
+
width: auto;
|
52 |
+
}
|
53 |
+
button.button span {
|
54 |
+
background: url("/media/web2print/images/bkg_btn.png") no-repeat scroll 0 0 transparent;
|
55 |
+
color: #555555;
|
56 |
+
float: left;
|
57 |
+
font: bold 11px/25px Tahoma,Verdana,Arial,sans-serif;
|
58 |
+
height: 28px;
|
59 |
+
padding: 0 0 0 6px;
|
60 |
+
text-align: center;
|
61 |
+
text-transform: uppercase;
|
62 |
+
white-space: nowrap; border:0;
|
63 |
+
}
|
64 |
+
button.button span span {
|
65 |
+
background-position: 100% 0;
|
66 |
+
padding: 0 15px 0 9px;
|
67 |
+
}
|