Version Notes
* Synchronise with Magento 1.8.0.0 and 1.8.1.0 versions
* Add support for quantities in ZetaPrints templates
* Add support for colour palettes in ZetaPrints templates
* Add support for storing w2p product (previews and user input) in wishlist (issue #823)
* Allow to use dummy store for category name mapping
* Add parameter to enable assigning of created product to parent categories in profile for product creation
* Add an option to select websites for assiging of newly created products
* Re-assigned product to category on update
* Show warning when user changed data in fields but has not updated previews yet
* Other small bug fixes and improvements
Download this release
Release Info
Developer | Anatoly A. Kazantsev |
Extension | web_to_print_store_incl_theme |
Version | 2.2.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.6.0 to 2.2.0.0
- app/code/community/ZetaPrints/WebToPrint/Block/Customer/Sidebar.php +15 -0
- app/code/community/ZetaPrints/WebToPrint/Block/Customer/Wishlist/Item/Column/Comment.php +15 -0
- app/code/community/ZetaPrints/WebToPrint/Block/Html/Footer.php +1 -1
- app/code/community/ZetaPrints/WebToPrint/Helper/Category.php +141 -0
- app/code/community/ZetaPrints/WebToPrint/Helper/Data.php +65 -60
- app/code/community/ZetaPrints/WebToPrint/Helper/PersonalizationForm.php +8 -2
- app/code/community/ZetaPrints/WebToPrint/Model/Convert/Mapper/Product/Creating.php +83 -43
- app/code/community/ZetaPrints/WebToPrint/Model/Convert/Mapper/Product/Updating.php +115 -8
- app/code/community/ZetaPrints/WebToPrint/Model/Convert/Parser/Catalogue.php +1 -1
- app/code/community/ZetaPrints/WebToPrint/Model/Events/Observer.php +3 -3
- app/code/community/ZetaPrints/WebToPrint/Model/Item.php +10 -0
- app/code/community/ZetaPrints/WebToPrint/Model/Template.php +1 -18
- app/code/community/ZetaPrints/WebToPrint/etc/config.xml +18 -1
- app/code/community/ZetaPrints/WebToPrint/etc/system.xml +19 -1
- app/code/community/ZetaPrints/WebToPrint/sql/webtoprint_setup/upgrade-14-15.php +56 -0
- app/design/adminhtml/default/zptheme/template/sales/items/column/name.phtml +10 -10
- app/design/adminhtml/default/zptheme/template/sales/order/view/items/renderer/default.phtml +13 -13
- app/design/frontend/base/default/layout/catalog/web-to-print-product.xml +4 -0
- app/design/frontend/base/default/template/email/order/items/order/webtoprint-default.phtml +6 -6
- app/design/frontend/default/zp2steptheme/template/catalog/product/view.phtml +1 -0
- app/design/frontend/default/zp2steptheme/template/catalog/product/view/media.phtml +3 -3
- app/design/frontend/default/zptheme/template/catalog/product/view.phtml +5 -2
- app/design/frontend/default/zptheme/template/catalog/product/view/media.phtml +3 -3
- app/design/frontend/default/zptheme/template/checkout/cart/item/default.phtml +23 -23
- app/design/frontend/default/zptheme/template/sales/order/items.phtml +2 -2
- app/design/frontend/default/zptheme/template/sales/order/items/renderer/default.phtml +17 -17
- app/design/frontend/default/zptheme/template/wishlist/item/column/image.phtml +43 -0
- lib/ZetaPrints/xslt/image-fields.xslt +5 -1
- lib/ZetaPrints/zetaprints-api.php +38 -2
- package.xml +14 -6
- skin/frontend/base/default/css/zp-style.css +58 -1
- skin/frontend/base/default/js/zp-personalization-form.js +284 -111
app/code/community/ZetaPrints/WebToPrint/Block/Customer/Sidebar.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ZetaPrints_WebToPrint_Block_Customer_Sidebar
|
4 |
+
extends Mage_Wishlist_Block_Customer_Sidebar {
|
5 |
+
|
6 |
+
public function getProductUrl ($item, $additional = array()) {
|
7 |
+
$product = $item instanceof Mage_Catalog_Model_Product
|
8 |
+
? $item
|
9 |
+
: $item->getProduct();
|
10 |
+
|
11 |
+
return $product->isVisibleInSiteVisibility()
|
12 |
+
? $this->getItemConfigureUrl($item)
|
13 |
+
: parent::getProductUrl($item, $additional);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/ZetaPrints/WebToPrint/Block/Customer/Wishlist/Item/Column/Comment.php
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ZetaPrints_WebToPrint_Block_Customer_Wishlist_Item_Column_Comment
|
4 |
+
extends Mage_Wishlist_Block_Customer_Wishlist_Item_Column_Comment {
|
5 |
+
|
6 |
+
public function getProductUrl ($item, $additional = array()) {
|
7 |
+
$product = $item instanceof Mage_Catalog_Model_Product
|
8 |
+
? $item
|
9 |
+
: $item->getProduct();
|
10 |
+
|
11 |
+
return $product->isVisibleInSiteVisibility()
|
12 |
+
? $this->getItemConfigureUrl($item)
|
13 |
+
: parent::getProductUrl($item, $additional);
|
14 |
+
}
|
15 |
+
}
|
app/code/community/ZetaPrints/WebToPrint/Block/Html/Footer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
class ZetaPrints_WebToPrint_Block_Html_Footer extends Mage_Page_Block_Html_Footer {
|
4 |
public function getCopyright() {
|
5 |
return parent::getCopyright()
|
6 |
-
. '<br /><span id="zetaprints-extension-version"><a href="http://www.zetaprints.com/">Web-to-print and image generation</a>, v. 2.
|
7 |
}
|
8 |
}
|
9 |
|
3 |
class ZetaPrints_WebToPrint_Block_Html_Footer extends Mage_Page_Block_Html_Footer {
|
4 |
public function getCopyright() {
|
5 |
return parent::getCopyright()
|
6 |
+
. '<br /><span id="zetaprints-extension-version"><a href="http://www.zetaprints.com/">Web-to-print and image generation</a>, v. 2.2.0.0</span>';
|
7 |
}
|
8 |
}
|
9 |
|
app/code/community/ZetaPrints/WebToPrint/Helper/Category.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ZetaPrints_WebToPrint_Helper_Category
|
4 |
+
extends ZetaPrints_WebToPrint_Helper_Data {
|
5 |
+
|
6 |
+
//Cache for loaded categories
|
7 |
+
private $_mapping = array();
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Get list of categories IDs by template details.
|
11 |
+
* The only required item in the template details is 'catalogue',
|
12 |
+
* which is a name of catalogue in ZetaPrints service.
|
13 |
+
*
|
14 |
+
* Set 'fullName' parameter to false if full category path in Magento
|
15 |
+
* is not required.
|
16 |
+
*
|
17 |
+
* Search categories by store-specific name if 'store' parameter is set.
|
18 |
+
*
|
19 |
+
* @param array $template
|
20 |
+
* @param bool $fullPath
|
21 |
+
* @param Mage_Core_Model_Store|null $store
|
22 |
+
*
|
23 |
+
* @return array|null
|
24 |
+
*/
|
25 |
+
public function getCategoriesIds ($template, $fullPath = true, $store = null) {
|
26 |
+
if (!(isset($template['catalogue']) && ($name = $template['catalogue'])))
|
27 |
+
return;
|
28 |
+
|
29 |
+
if (!array_key_exists($name, $this->_mapping)) {
|
30 |
+
$category = $this->getCategory($name, true, null, $store);
|
31 |
+
|
32 |
+
$this->_mapping[$name] = $category && $category->getId()
|
33 |
+
? $category
|
34 |
+
: null;
|
35 |
+
}
|
36 |
+
|
37 |
+
if (!$category = $this->_mapping[$name])
|
38 |
+
return;
|
39 |
+
|
40 |
+
$categoryIds = $fullPath
|
41 |
+
? $category->getPathIds()
|
42 |
+
: array($category->getId());
|
43 |
+
|
44 |
+
if (!isset($template['tags']))
|
45 |
+
return $categoryIds;
|
46 |
+
|
47 |
+
foreach ($template['tags'] as $tag) {
|
48 |
+
$subName = $name . '/' . $tag;
|
49 |
+
|
50 |
+
if (!array_key_exists($subName, $this->_mapping)) {
|
51 |
+
$subCategory = $this->getCategory($tag, false, $category, $store);
|
52 |
+
|
53 |
+
$this->_mapping[$subName] = $subCategory && $subCategory->getId()
|
54 |
+
? $subCategory
|
55 |
+
: null;
|
56 |
+
}
|
57 |
+
|
58 |
+
if ($subCategory = $this->_mapping[$subName])
|
59 |
+
$categoryIds[] = $subCategory->getId();
|
60 |
+
}
|
61 |
+
|
62 |
+
return $categoryIds;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Search category by the name from root category or specified one.
|
67 |
+
* Create category when it doesn't exist if $createIfNotExists
|
68 |
+
* parameter is set.
|
69 |
+
* Search category by store-specific name if $store parameter is set.
|
70 |
+
*
|
71 |
+
* @param string $name
|
72 |
+
* @param bool $createIfNotExists
|
73 |
+
* @param Mage_Catalog_Model_Category $parent
|
74 |
+
* @param null|Mage_Core_Model_Store $store
|
75 |
+
*
|
76 |
+
* @return Mage_Catalog_Model_Category|null
|
77 |
+
*/
|
78 |
+
public function getCategory ($name,
|
79 |
+
$createIfNotExists = false,
|
80 |
+
$parent = null,
|
81 |
+
$store = null) {
|
82 |
+
|
83 |
+
$store = $store instanceof Mage_Core_Model_Store
|
84 |
+
? $store
|
85 |
+
: Mage::app()->getStore();
|
86 |
+
|
87 |
+
$collection = ($parent && $parentId = $parent->getId())
|
88 |
+
? $parent
|
89 |
+
->setStoreId($store->getId())
|
90 |
+
->getCollection()
|
91 |
+
->addFieldToFilter('parent_id', $parentId)
|
92 |
+
: Mage::getModel('catalog/category')
|
93 |
+
->setStoreId($store->getId())
|
94 |
+
->load($store->getRootCategoryId())
|
95 |
+
->getCollection();
|
96 |
+
|
97 |
+
$collection->addAttributeToFilter('name', $name);
|
98 |
+
|
99 |
+
if ($collection->count())
|
100 |
+
return $collection->getFirstItem();
|
101 |
+
|
102 |
+
if (!$createIfNotExists)
|
103 |
+
return;
|
104 |
+
|
105 |
+
if ($parent && $parent->getId())
|
106 |
+
$rootCategory = $parent;
|
107 |
+
else {
|
108 |
+
$collection = Mage::getModel('catalog/category')
|
109 |
+
->getCollection()
|
110 |
+
->addAttributeToFilter('parent_id', 1);
|
111 |
+
|
112 |
+
if (count($collection) != 1)
|
113 |
+
return null;
|
114 |
+
|
115 |
+
$rootCategory = $collection->getFirstItem();
|
116 |
+
|
117 |
+
if (!$rootCategory->getId())
|
118 |
+
return null;
|
119 |
+
}
|
120 |
+
|
121 |
+
$model = Mage::getModel('catalog/category');
|
122 |
+
|
123 |
+
$model
|
124 |
+
->setStoreId($rootCategory->getStoreId())
|
125 |
+
->setData(array(
|
126 |
+
'name' => $name,
|
127 |
+
'is_active' => 1,
|
128 |
+
'include_in_menu' => 1
|
129 |
+
))
|
130 |
+
->setPath($rootCategory->getPath())
|
131 |
+
->setAttributeSetId($model->getDefaultAttributeSetId());
|
132 |
+
|
133 |
+
try {
|
134 |
+
$model->save();
|
135 |
+
} catch (Exception $e) {
|
136 |
+
return null;
|
137 |
+
}
|
138 |
+
|
139 |
+
return $model;
|
140 |
+
}
|
141 |
+
}
|
app/code/community/ZetaPrints/WebToPrint/Helper/Data.php
CHANGED
@@ -297,62 +297,6 @@ class ZetaPrints_WebToPrint_Helper_Data extends Mage_Core_Helper_Abstract
|
|
297 |
return null;
|
298 |
}
|
299 |
|
300 |
-
public function getCategory ($name, $createIfNotExists = false,
|
301 |
-
$parent = null) {
|
302 |
-
|
303 |
-
if ($parent && $parent->getId()) {
|
304 |
-
foreach ($parent->getChildrenCategories() as $child)
|
305 |
-
if ($child->getName() == $name)
|
306 |
-
return $child;
|
307 |
-
} else {
|
308 |
-
$collection = Mage::getModel('catalog/category')
|
309 |
-
->getCollection()
|
310 |
-
->addAttributeToFilter('name', $name);
|
311 |
-
|
312 |
-
if ($collection->count())
|
313 |
-
return $collection->getFirstItem();
|
314 |
-
}
|
315 |
-
|
316 |
-
if (!$createIfNotExists)
|
317 |
-
return;
|
318 |
-
|
319 |
-
if ($parent && $parent->getId())
|
320 |
-
$rootCategory = $parent;
|
321 |
-
else {
|
322 |
-
$collection = Mage::getModel('catalog/category')
|
323 |
-
->getCollection()
|
324 |
-
->addAttributeToFilter('parent_id', 1);
|
325 |
-
|
326 |
-
if (count($collection) != 1)
|
327 |
-
return null;
|
328 |
-
|
329 |
-
$rootCategory = $collection->getFirstItem();
|
330 |
-
|
331 |
-
if (!$rootCategory->getId())
|
332 |
-
return null;
|
333 |
-
}
|
334 |
-
|
335 |
-
$model = Mage::getModel('catalog/category');
|
336 |
-
|
337 |
-
$model
|
338 |
-
->setStoreId($rootCategory->getStoreId())
|
339 |
-
->setData(array(
|
340 |
-
'name' => $name,
|
341 |
-
'is_active' => 1,
|
342 |
-
'include_in_menu' => 1 ))
|
343 |
-
->setPath($rootCategory->getPath())
|
344 |
-
->setAttributeSetId($model->getDefaultAttributeSetId());
|
345 |
-
|
346 |
-
try {
|
347 |
-
$model->save();
|
348 |
-
} catch (Exception $e) {
|
349 |
-
return null;
|
350 |
-
}
|
351 |
-
|
352 |
-
return $model;
|
353 |
-
}
|
354 |
-
|
355 |
-
|
356 |
public function getTemplateDetailsByGUID ($guid) {
|
357 |
$template = Mage::getModel('webtoprint/template')->load($guid);
|
358 |
|
@@ -481,18 +425,27 @@ class ZetaPrints_WebToPrint_Helper_Data extends Mage_Core_Helper_Abstract
|
|
481 |
|
482 |
$this->generateImageUrls($xml);
|
483 |
|
|
|
|
|
484 |
//If product page was requested with reorder parameter...
|
485 |
-
if ($
|
486 |
-
&& strlen($
|
487 |
//...then replace field values from order details
|
488 |
$this->replace_user_input_from_order_details($xml,
|
489 |
$this->_getRequest()->getParam('reorder'));
|
490 |
|
491 |
//If product page was requested with for-item parameter...
|
492 |
-
if ($
|
493 |
//...then replace various template values from item's options
|
494 |
$this->replace_template_values_from_cart_item($xml,
|
495 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
496 |
|
497 |
Mage::register('webtoprint-template-xml', $xml);
|
498 |
}
|
@@ -500,6 +453,58 @@ class ZetaPrints_WebToPrint_Helper_Data extends Mage_Core_Helper_Abstract
|
|
500 |
return $xml;
|
501 |
}
|
502 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
public function getTemplateDetailsForCurrentProduct () {
|
504 |
if (! $temlateDetails = Mage::registry('webtoprint-template-details')) {
|
505 |
if (! $xml = $this->getTemplateXmlForCurrentProduct())
|
297 |
return null;
|
298 |
}
|
299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
public function getTemplateDetailsByGUID ($guid) {
|
301 |
$template = Mage::getModel('webtoprint/template')->load($guid);
|
302 |
|
425 |
|
426 |
$this->generateImageUrls($xml);
|
427 |
|
428 |
+
$request = $this->_getRequest();
|
429 |
+
|
430 |
//If product page was requested with reorder parameter...
|
431 |
+
if ($request->has('reorder')
|
432 |
+
&& strlen($request->getParam('reorder')) == 36)
|
433 |
//...then replace field values from order details
|
434 |
$this->replace_user_input_from_order_details($xml,
|
435 |
$this->_getRequest()->getParam('reorder'));
|
436 |
|
437 |
//If product page was requested with for-item parameter...
|
438 |
+
else if ($request->has('for-item'))
|
439 |
//...then replace various template values from item's options
|
440 |
$this->replace_template_values_from_cart_item($xml,
|
441 |
+
$request->getParam('for-item'));
|
442 |
+
else if ($product->getConfigureMode()) {
|
443 |
+
if ($item = Mage::registry('wishlist_item'))
|
444 |
+
$xml = $this->updateTemplate(
|
445 |
+
$xml,
|
446 |
+
$this->extractUserInput($item->getBuyRequest())
|
447 |
+
);
|
448 |
+
}
|
449 |
|
450 |
Mage::register('webtoprint-template-xml', $xml);
|
451 |
}
|
453 |
return $xml;
|
454 |
}
|
455 |
|
456 |
+
public function extractUserInput ($data) {
|
457 |
+
$fields = array();
|
458 |
+
|
459 |
+
if ($data instanceof Varien_Object)
|
460 |
+
$data = $data->getData();
|
461 |
+
|
462 |
+
if (!$data)
|
463 |
+
return $fields;
|
464 |
+
|
465 |
+
foreach ($data as $key => $value) {
|
466 |
+
if (strpos($key, 'zetaprints-') === false)
|
467 |
+
continue;
|
468 |
+
|
469 |
+
$key = substr($key, 11);
|
470 |
+
|
471 |
+
if (strpos($key, '#') === 0 || strpos($key, '_') === 0) {
|
472 |
+
$key = str_replace(
|
473 |
+
array('_', "\x0A"),
|
474 |
+
array(' ', '.'),
|
475 |
+
substr($key, 1)
|
476 |
+
);
|
477 |
+
|
478 |
+
$fields[$key] = $value;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
return $fields;
|
483 |
+
}
|
484 |
+
|
485 |
+
public function updateTemplate ($template, $data) {
|
486 |
+
if (!$data)
|
487 |
+
return $template;
|
488 |
+
|
489 |
+
//Replace text field values in XML
|
490 |
+
foreach ($template->Fields->Field as $field) {
|
491 |
+
$name = (string) $field['FieldName'];
|
492 |
+
|
493 |
+
if (isset($data[$name]))
|
494 |
+
$field['Value'] = $data[$name];
|
495 |
+
}
|
496 |
+
|
497 |
+
//Replace image field values in XML
|
498 |
+
foreach ($template->Images->Image as $image) {
|
499 |
+
$name = (string) $image['Name'];
|
500 |
+
|
501 |
+
if (isset($data[$name]))
|
502 |
+
$image['Value'] = $data[$name];
|
503 |
+
}
|
504 |
+
|
505 |
+
return $template;
|
506 |
+
}
|
507 |
+
|
508 |
public function getTemplateDetailsForCurrentProduct () {
|
509 |
if (! $temlateDetails = Mage::registry('webtoprint-template-details')) {
|
510 |
if (! $xml = $this->getTemplateXmlForCurrentProduct())
|
app/code/community/ZetaPrints/WebToPrint/Helper/PersonalizationForm.php
CHANGED
@@ -159,7 +159,7 @@ class ZetaPrints_WebToPrint_Helper_PersonalizationForm
|
|
159 |
return false;
|
160 |
}
|
161 |
|
162 |
-
public function get_cart_image ($context) {
|
163 |
$options = unserialize($context->getItem()->getOptionByCode('info_buyRequest')->getValue());
|
164 |
|
165 |
if (!isset($options['zetaprints-previews'])
|
@@ -187,7 +187,11 @@ class ZetaPrints_WebToPrint_Helper_PersonalizationForm
|
|
187 |
} else
|
188 |
echo "<a class=\"in-dialog product-image\" href=\"$href\" rel=\"{$group}\" style=\"display: none\">";
|
189 |
|
190 |
-
|
|
|
|
|
|
|
|
|
191 |
echo "</a>";
|
192 |
}
|
193 |
|
@@ -1172,6 +1176,8 @@ jQuery(document).ready(function($) {
|
|
1172 |
uploading_image_error_text = "<?php echo $this->__('Error was occurred while uploading image'); ?>";
|
1173 |
notice_to_update_preview_text = "<?php echo $this->__('Update preview first!'); ?>";
|
1174 |
notice_to_update_preview_text_for_multipage_template = "<?php echo $this->__('Update all previews first!'); ?>";
|
|
|
|
|
1175 |
|
1176 |
click_to_close_text = "<?php echo $this->__('Click to close'); ?>";
|
1177 |
click_to_view_in_large_size = "<?php echo $this->__('Click to view in large size');?>";
|
159 |
return false;
|
160 |
}
|
161 |
|
162 |
+
public function get_cart_image ($context, $width = 0, $height = 0) {
|
163 |
$options = unserialize($context->getItem()->getOptionByCode('info_buyRequest')->getValue());
|
164 |
|
165 |
if (!isset($options['zetaprints-previews'])
|
187 |
} else
|
188 |
echo "<a class=\"in-dialog product-image\" href=\"$href\" rel=\"{$group}\" style=\"display: none\">";
|
189 |
|
190 |
+
$style = $width
|
191 |
+
? 'style="max-width: ' . $width . 'px;"'
|
192 |
+
: 'style="max-width: 75px;"';
|
193 |
+
|
194 |
+
echo '<img src="', $src, '" ', $style, ' />';
|
195 |
echo "</a>";
|
196 |
}
|
197 |
|
1176 |
uploading_image_error_text = "<?php echo $this->__('Error was occurred while uploading image'); ?>";
|
1177 |
notice_to_update_preview_text = "<?php echo $this->__('Update preview first!'); ?>";
|
1178 |
notice_to_update_preview_text_for_multipage_template = "<?php echo $this->__('Update all previews first!'); ?>";
|
1179 |
+
warning_user_data_changed = "<?php echo $this->__('Press Update Preview before adding to cart to include your latest changes'); ?>";
|
1180 |
+
notice_update_preview_after_data_changed = "<?php echo $this->__('Do you want to update the preview with your latest changes?'); ?>";
|
1181 |
|
1182 |
click_to_close_text = "<?php echo $this->__('Click to close'); ?>";
|
1183 |
click_to_view_in_large_size = "<?php echo $this->__('Click to view in large size');?>";
|
app/code/community/ZetaPrints/WebToPrint/Model/Convert/Mapper/Product/Creating.php
CHANGED
@@ -13,6 +13,9 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
13 |
$this->warning('Product type: ' .
|
14 |
$this->getAction()->getParam('product-type', 'simple') );
|
15 |
|
|
|
|
|
|
|
16 |
//Get all web-to-print templates
|
17 |
$templates = Mage::getModel('webtoprint/template')->getCollection()->load();
|
18 |
|
@@ -74,12 +77,25 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
74 |
|
75 |
$_catalogues = array();
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$useProductPopulateDefaults
|
78 |
= Mage::getStoreConfig('webtoprint/settings/products-populate-defaults');
|
79 |
|
80 |
$_defaultCategory = array();
|
81 |
|
82 |
-
$helper = Mage::helper('webtoprint');
|
83 |
|
84 |
$line = 0;
|
85 |
|
@@ -99,12 +115,8 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
99 |
if (!$sourceProduct) {
|
100 |
$product_model = Mage::getModel('catalog/product');
|
101 |
|
102 |
-
if (Mage::app()->isSingleStoreMode())
|
103 |
-
$product_model->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()));
|
104 |
-
else
|
105 |
-
$this->debug('Not a single store mode');
|
106 |
-
|
107 |
$product_model
|
|
|
108 |
->setAttributeSetId($product_model->getDefaultAttributeSetId())
|
109 |
->setTypeId($this->getAction()->getParam('product-type', 'simple'))
|
110 |
->setStatus(Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
|
@@ -119,46 +131,23 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
119 |
->setTaxClassId(0);
|
120 |
}
|
121 |
|
122 |
-
$
|
123 |
-
|
124 |
-
|
125 |
-
$category = $helper->getCategory(
|
126 |
-
$cataloguesMapping[$template->getCatalogGuid()]);
|
127 |
-
|
128 |
-
if ($category && $category->getId())
|
129 |
-
$_catalogues[$categoryName] = $category;
|
130 |
-
else
|
131 |
-
$_catalogues[$categoryName] = null;
|
132 |
-
}
|
133 |
-
|
134 |
-
if ($category = $_catalogues[$categoryName]) {
|
135 |
-
$categoryIds = array($category->getId());
|
136 |
-
|
137 |
-
try {
|
138 |
-
$templateDetails = zetaprints_parse_template_details(
|
139 |
-
new SimpleXMLElement($template->getXml()));
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
$subCategoryName = "{$categoryName}/{$tag}";
|
144 |
|
145 |
-
|
146 |
-
|
|
|
|
|
|
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
else
|
151 |
-
$_catalogues[$subCategoryName] = null;
|
152 |
-
}
|
153 |
|
154 |
-
|
155 |
-
$categoryIds[] = $subCategory->getId();
|
156 |
-
}
|
157 |
-
} catch (Exception $e) {}
|
158 |
-
|
159 |
-
$product_model->setCategoryIds($categoryIds);
|
160 |
-
} else if ($useProductPopulateDefaults)
|
161 |
-
$product_model->setCategoryIds($this->_getDefaultCategoryId());
|
162 |
} else {
|
163 |
$product_model = $sourceProduct;
|
164 |
|
@@ -175,9 +164,20 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
175 |
->setRequiredOptions(true)
|
176 |
->setWebtoprintTemplate($template->getGuid());
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
try {
|
179 |
$product_model->save();
|
180 |
-
} catch (
|
181 |
$this->error("{$line}. Error creating product from template: {$template->getGuid()}");
|
182 |
$this->error($e->getMessage());
|
183 |
|
@@ -277,6 +277,46 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Creating
|
|
277 |
}
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
private function error ($message) {
|
281 |
$this->addException($message, Mage_Dataflow_Model_Convert_Exception::ERROR);
|
282 |
}
|
13 |
$this->warning('Product type: ' .
|
14 |
$this->getAction()->getParam('product-type', 'simple') );
|
15 |
|
16 |
+
if (!$assignToWebsites = $this->_getWebsitesForAssign())
|
17 |
+
return;
|
18 |
+
|
19 |
//Get all web-to-print templates
|
20 |
$templates = Mage::getModel('webtoprint/template')->getCollection()->load();
|
21 |
|
77 |
|
78 |
$_catalogues = array();
|
79 |
|
80 |
+
$categoryMappingStore = $this
|
81 |
+
->getAction()
|
82 |
+
->getParam('category-mapping-store');
|
83 |
+
|
84 |
+
$categoryMappingStore = Mage::app()->getStore($categoryMappingStore);
|
85 |
+
|
86 |
+
$assignToParents = (bool) $this
|
87 |
+
->getAction()
|
88 |
+
->getParam('assign-to-parents');
|
89 |
+
|
90 |
+
if (!$categoryMappingStore->getId())
|
91 |
+
$categoryMappingStore = null;
|
92 |
+
|
93 |
$useProductPopulateDefaults
|
94 |
= Mage::getStoreConfig('webtoprint/settings/products-populate-defaults');
|
95 |
|
96 |
$_defaultCategory = array();
|
97 |
|
98 |
+
$helper = Mage::helper('webtoprint/category');
|
99 |
|
100 |
$line = 0;
|
101 |
|
115 |
if (!$sourceProduct) {
|
116 |
$product_model = Mage::getModel('catalog/product');
|
117 |
|
|
|
|
|
|
|
|
|
|
|
118 |
$product_model
|
119 |
+
->setWebsiteIds($assignToWebsites)
|
120 |
->setAttributeSetId($product_model->getDefaultAttributeSetId())
|
121 |
->setTypeId($this->getAction()->getParam('product-type', 'simple'))
|
122 |
->setStatus(Mage_Catalog_Model_Product_Status::STATUS_DISABLED)
|
131 |
->setTaxClassId(0);
|
132 |
}
|
133 |
|
134 |
+
$templateDetails = zetaprints_parse_template_details(
|
135 |
+
new SimpleXMLElement($template->getXml())
|
136 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
$templateDetails['catalogue']
|
139 |
+
= $cataloguesMapping[$template->getCatalogGuid()];
|
|
|
140 |
|
141 |
+
$categoryIds = $helper->getCategoriesIds(
|
142 |
+
$templateDetails,
|
143 |
+
$assignToParents,
|
144 |
+
$categoryMappingStore
|
145 |
+
);
|
146 |
|
147 |
+
if (!$categoryIds && $useProductPopulateDefaults)
|
148 |
+
$categoryIds = $this->_getDefaultCategoryId();
|
|
|
|
|
|
|
149 |
|
150 |
+
$product_model->setCategoryIds($categoryIds);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
} else {
|
152 |
$product_model = $sourceProduct;
|
153 |
|
164 |
->setRequiredOptions(true)
|
165 |
->setWebtoprintTemplate($template->getGuid());
|
166 |
|
167 |
+
Mage::dispatchEvent(
|
168 |
+
'webtoprint_product_create',
|
169 |
+
array(
|
170 |
+
'product' => $product_model,
|
171 |
+
'template' => $templateDetails,
|
172 |
+
'params' => array(
|
173 |
+
'process-quantities' => $this->_isProcessQuantities()
|
174 |
+
)
|
175 |
+
)
|
176 |
+
);
|
177 |
+
|
178 |
try {
|
179 |
$product_model->save();
|
180 |
+
} catch (Exception $e) {
|
181 |
$this->error("{$line}. Error creating product from template: {$template->getGuid()}");
|
182 |
$this->error($e->getMessage());
|
183 |
|
277 |
}
|
278 |
}
|
279 |
|
280 |
+
protected function _getWebsitesForAssign () {
|
281 |
+
if (count(Mage::app()->getWebsites()) < 2)
|
282 |
+
return array(Mage::app()->getWebsite(true)->getId());
|
283 |
+
|
284 |
+
$websites = Mage::getStoreConfig('webtoprint/settings/assign-to-websites');
|
285 |
+
|
286 |
+
if (!$websites) {
|
287 |
+
$url = Mage::getModel('adminhtml/url')->getUrl(
|
288 |
+
'adminhtml/system_config/edit',
|
289 |
+
array(
|
290 |
+
'section' => 'webtoprint',
|
291 |
+
'_fragment' => 'row_webtoprint_settings_assign-to-stores')
|
292 |
+
);
|
293 |
+
|
294 |
+
$msg = 'Magento installation has multiple websites. Please select '
|
295 |
+
. 'website(s) in Assign new products to website(s) setting on '
|
296 |
+
. '<a href="' . $url . '">web-to-print settings page.</a> '
|
297 |
+
. 'Newly created products will be assigned to selected website(s)';
|
298 |
+
|
299 |
+
$this->error($msg);
|
300 |
+
|
301 |
+
return;
|
302 |
+
}
|
303 |
+
|
304 |
+
return explode(',', $websites);
|
305 |
+
}
|
306 |
+
|
307 |
+
protected function _isProcessQuantities () {
|
308 |
+
$value = $this
|
309 |
+
->getAction()
|
310 |
+
->getParam('process-quantities', false);
|
311 |
+
|
312 |
+
if ($value === false)
|
313 |
+
return false;
|
314 |
+
|
315 |
+
$value = trim($value);
|
316 |
+
|
317 |
+
return $value == 'true' || $value == 'yes' || $value == '1';
|
318 |
+
}
|
319 |
+
|
320 |
private function error ($message) {
|
321 |
$this->addException($message, Mage_Dataflow_Model_Convert_Exception::ERROR);
|
322 |
}
|
app/code/community/ZetaPrints/WebToPrint/Model/Convert/Mapper/Product/Updating.php
CHANGED
@@ -7,6 +7,25 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
7 |
//Always print debug information. Issue #80
|
8 |
$this->debug = true;
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
$templates = Mage::getModel('webtoprint/template')->getCollection()->load();
|
11 |
|
12 |
foreach ($templates as $template) {
|
@@ -58,9 +77,24 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
58 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} was removed");
|
59 |
|
60 |
Mage::register('webtoprint-template-changed', true);
|
61 |
-
$full_product
|
62 |
-
->
|
63 |
-
->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
Mage::unregister('webtoprint-template-changed');
|
65 |
|
66 |
$this->debug("Product {$full_product->getSku()} was unlinked from the template");
|
@@ -95,10 +129,25 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
95 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} was removed");
|
96 |
|
97 |
Mage::register('webtoprint-template-changed', true);
|
98 |
-
$full_product
|
|
|
99 |
->setRequiredOptions(false)
|
100 |
-
->setWebtoprintTemplate('')
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
Mage::unregister('webtoprint-template-changed');
|
103 |
|
104 |
$this->debug("Product {$product->getSku()} was moved to category {$category->getName()}");
|
@@ -109,7 +158,8 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
109 |
|
110 |
} else {
|
111 |
foreach ($products as $product)
|
112 |
-
if (
|
|
|
113 |
$full_product = $product_model->load($product->getId());
|
114 |
|
115 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} changed");
|
@@ -117,7 +167,51 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
117 |
Mage::register('webtoprint-template-changed', true);
|
118 |
|
119 |
//Mark product as changed and then save it.
|
120 |
-
$full_product->setDataChanges(true)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
Mage::unregister('webtoprint-template-changed');
|
123 |
|
@@ -128,6 +222,19 @@ class ZetaPrints_WebToPrint_Model_Convert_Mapper_Product_Updating extends Mage_
|
|
128 |
}
|
129 |
}
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
private function notice ($message) {
|
132 |
$this->addException($message, Mage_Dataflow_Model_Convert_Exception::NOTICE);
|
133 |
}
|
7 |
//Always print debug information. Issue #80
|
8 |
$this->debug = true;
|
9 |
|
10 |
+
$updateAll
|
11 |
+
= (bool) Mage::getStoreConfig('webtoprint/settings/refresh-templates');
|
12 |
+
|
13 |
+
$action = $this->getAction();
|
14 |
+
|
15 |
+
$assignToParents = (bool) $action->getParam('assign-to-parents');
|
16 |
+
$categoryMappingStore = $action->getParam('category-mapping-store');
|
17 |
+
|
18 |
+
unset($action);
|
19 |
+
|
20 |
+
$categoryMappingStore = Mage::app()->getStore($categoryMappingStore);
|
21 |
+
|
22 |
+
if (!$categoryMappingStore->getId())
|
23 |
+
$categoryMappingStore = null;
|
24 |
+
|
25 |
+
$cataloguesMapping = null;
|
26 |
+
|
27 |
+
$helper = Mage::helper('webtoprint/category');
|
28 |
+
|
29 |
$templates = Mage::getModel('webtoprint/template')->getCollection()->load();
|
30 |
|
31 |
foreach ($templates as $template) {
|
77 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} was removed");
|
78 |
|
79 |
Mage::register('webtoprint-template-changed', true);
|
80 |
+
$full_product
|
81 |
+
->setRequiredOptions(false)
|
82 |
+
->setWebtoprintTemplate('');
|
83 |
+
|
84 |
+
Mage::dispatchEvent(
|
85 |
+
'webtoprint_product_update',
|
86 |
+
array(
|
87 |
+
'product' => $full_product,
|
88 |
+
'template' => zetaprints_parse_template_details(
|
89 |
+
new SimpleXMLElement($template->getXml())
|
90 |
+
),
|
91 |
+
'params' => array(
|
92 |
+
'process-quantities' => $this->_isProcessQuantities()
|
93 |
+
)
|
94 |
+
)
|
95 |
+
);
|
96 |
+
|
97 |
+
$full_product->save();
|
98 |
Mage::unregister('webtoprint-template-changed');
|
99 |
|
100 |
$this->debug("Product {$full_product->getSku()} was unlinked from the template");
|
129 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} was removed");
|
130 |
|
131 |
Mage::register('webtoprint-template-changed', true);
|
132 |
+
$full_product
|
133 |
+
->setCategoryIds(array($behaviour))
|
134 |
->setRequiredOptions(false)
|
135 |
+
->setWebtoprintTemplate('');
|
136 |
+
|
137 |
+
Mage::dispatchEvent(
|
138 |
+
'webtoprint_product_update',
|
139 |
+
array(
|
140 |
+
'product' => $full_product,
|
141 |
+
'template' => zetaprints_parse_template_details(
|
142 |
+
new SimpleXMLElement($template->getXml())
|
143 |
+
),
|
144 |
+
'params' => array(
|
145 |
+
'process-quantities' => $this->_isProcessQuantities()
|
146 |
+
)
|
147 |
+
)
|
148 |
+
);
|
149 |
+
|
150 |
+
$full_product->save();
|
151 |
Mage::unregister('webtoprint-template-changed');
|
152 |
|
153 |
$this->debug("Product {$product->getSku()} was moved to category {$category->getName()}");
|
158 |
|
159 |
} else {
|
160 |
foreach ($products as $product)
|
161 |
+
if ($updateAll
|
162 |
+
|| (strtotime($product->getUpdatedAt()) <= strtotime($template->getDate()))) {
|
163 |
$full_product = $product_model->load($product->getId());
|
164 |
|
165 |
$this->debug("Template for product {$full_product->getWebtoprintTemplate()} changed");
|
167 |
Mage::register('webtoprint-template-changed', true);
|
168 |
|
169 |
//Mark product as changed and then save it.
|
170 |
+
$full_product->setDataChanges(true);
|
171 |
+
|
172 |
+
$templateDetails = zetaprints_parse_template_details(
|
173 |
+
new SimpleXMLElement($template->getXml())
|
174 |
+
);
|
175 |
+
|
176 |
+
if ($cataloguesMapping === null) {
|
177 |
+
$cataloguesMapping = array();
|
178 |
+
|
179 |
+
$url = Mage::getStoreConfig('webtoprint/settings/url');
|
180 |
+
$key = Mage::getStoreConfig('webtoprint/settings/key');
|
181 |
+
|
182 |
+
$catalogues = zetaprints_get_list_of_catalogs($url, $key);
|
183 |
+
|
184 |
+
foreach ($catalogues as $catalogue)
|
185 |
+
$cataloguesMapping[$catalogue['guid']]
|
186 |
+
= $catalogue['title'];
|
187 |
+
|
188 |
+
unset($catalogues, $catalogue, $url, $key);
|
189 |
+
}
|
190 |
+
|
191 |
+
$templateDetails['catalogue']
|
192 |
+
= $cataloguesMapping[$template->getCatalogGuid()];
|
193 |
+
|
194 |
+
$categoryIds = $helper->getCategoriesIds(
|
195 |
+
$templateDetails,
|
196 |
+
$assignToParents,
|
197 |
+
$categoryMappingStore
|
198 |
+
);
|
199 |
+
|
200 |
+
if ($categoryIds)
|
201 |
+
$full_product->setCategoryIds($categoryIds);
|
202 |
+
|
203 |
+
Mage::dispatchEvent(
|
204 |
+
'webtoprint_product_update',
|
205 |
+
array(
|
206 |
+
'product' => $full_product,
|
207 |
+
'template' => $templateDetails,
|
208 |
+
'params' => array(
|
209 |
+
'process-quantities' => $this->_isProcessQuantities()
|
210 |
+
)
|
211 |
+
)
|
212 |
+
);
|
213 |
+
|
214 |
+
$full_product->save();
|
215 |
|
216 |
Mage::unregister('webtoprint-template-changed');
|
217 |
|
222 |
}
|
223 |
}
|
224 |
|
225 |
+
protected function _isProcessQuantities () {
|
226 |
+
$value = $this
|
227 |
+
->getAction()
|
228 |
+
->getParam('process-quantities', false);
|
229 |
+
|
230 |
+
if ($value === false)
|
231 |
+
return false;
|
232 |
+
|
233 |
+
$value = trim($value);
|
234 |
+
|
235 |
+
return $value == 'true' || $value == 'yes' || $value == '1';
|
236 |
+
}
|
237 |
+
|
238 |
private function notice ($message) {
|
239 |
$this->addException($message, Mage_Dataflow_Model_Convert_Exception::NOTICE);
|
240 |
}
|
app/code/community/ZetaPrints/WebToPrint/Model/Convert/Parser/Catalogue.php
CHANGED
@@ -47,7 +47,7 @@ class ZetaPrints_WebToPrint_Model_Convert_Parser_Catalogue
|
|
47 |
|
48 |
$line = 0;
|
49 |
|
50 |
-
$helper = Mage::helper('webtoprint');
|
51 |
|
52 |
foreach ($catalogs as $catalog) {
|
53 |
$total_number_of_catalogs++;
|
47 |
|
48 |
$line = 0;
|
49 |
|
50 |
+
$helper = Mage::helper('webtoprint/category');
|
51 |
|
52 |
foreach ($catalogs as $catalog) {
|
53 |
$total_number_of_catalogs++;
|
app/code/community/ZetaPrints/WebToPrint/Model/Events/Observer.php
CHANGED
@@ -275,9 +275,9 @@ class ZetaPrints_WebToPrint_Model_Events_Observer implements ZetaPrints_Api {
|
|
275 |
$product = $observer->getEvent()->getProduct();
|
276 |
|
277 |
if ($product->hasWebtoprintTemplate() && $product->getWebtoprintTemplate()) {
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
|
282 |
$request->setParam('options', 0);
|
283 |
}
|
275 |
$product = $observer->getEvent()->getProduct();
|
276 |
|
277 |
if ($product->hasWebtoprintTemplate() && $product->getWebtoprintTemplate()) {
|
278 |
+
Mage::getSingleton('catalog/session')->addNotice(
|
279 |
+
Mage::helper('webtoprint')->__('Please specify the product\'s '
|
280 |
+
. 'required option(s) and/or personalize it') );
|
281 |
|
282 |
$request->setParam('options', 0);
|
283 |
}
|
app/code/community/ZetaPrints/WebToPrint/Model/Item.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ZetaPrints_WebToPrint_Model_Item extends Mage_Wishlist_Model_Item {
|
4 |
+
|
5 |
+
public function representProduct ($product) {
|
6 |
+
return $product->getWebtoprintTemplate()
|
7 |
+
? false
|
8 |
+
: parent::representProduct($product);
|
9 |
+
}
|
10 |
+
}
|
app/code/community/ZetaPrints/WebToPrint/Model/Template.php
CHANGED
@@ -3,32 +3,15 @@
|
|
3 |
class ZetaPrints_WebToPrint_Model_Template extends Mage_Core_Model_Abstract {
|
4 |
protected function _construct() {
|
5 |
$this->_init('webtoprint/template');
|
6 |
-
$this->setIdFieldName('guid');
|
7 |
}
|
8 |
|
9 |
public function loadById ($template_id) {
|
10 |
-
return
|
11 |
}
|
12 |
|
13 |
public function load ($id, $field = 'guid') {
|
14 |
return parent::load($id, $field);
|
15 |
}
|
16 |
-
|
17 |
-
public function save () {
|
18 |
-
$this->setIdFieldName('template_id');
|
19 |
-
parent::save();
|
20 |
-
$this->setIdFieldName('guid');
|
21 |
-
|
22 |
-
return $this;
|
23 |
-
}
|
24 |
-
|
25 |
-
public function delete () {
|
26 |
-
$this->setIdFieldName('template_id');
|
27 |
-
parent::delete();
|
28 |
-
$this->setIdFieldName('guid');
|
29 |
-
|
30 |
-
return $this;
|
31 |
-
}
|
32 |
}
|
33 |
|
34 |
?>
|
3 |
class ZetaPrints_WebToPrint_Model_Template extends Mage_Core_Model_Abstract {
|
4 |
protected function _construct() {
|
5 |
$this->_init('webtoprint/template');
|
|
|
6 |
}
|
7 |
|
8 |
public function loadById ($template_id) {
|
9 |
+
return parent::load($template_id);
|
10 |
}
|
11 |
|
12 |
public function load ($id, $field = 'guid') {
|
13 |
return parent::load($id, $field);
|
14 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
?>
|
app/code/community/ZetaPrints/WebToPrint/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<ZetaPrints_WebToPrint>
|
5 |
-
<version>
|
6 |
</ZetaPrints_WebToPrint>
|
7 |
</modules>
|
8 |
|
@@ -41,6 +41,12 @@
|
|
41 |
<quote_item>ZetaPrints_WebToPrint_Model_Quote_Item</quote_item>
|
42 |
</rewrite>
|
43 |
</sales>
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
</models>
|
45 |
|
46 |
<blocks>
|
@@ -53,6 +59,13 @@
|
|
53 |
<html_footer>ZetaPrints_WebToPrint_Block_Html_Footer</html_footer>
|
54 |
</rewrite>
|
55 |
</page>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</blocks>
|
57 |
|
58 |
<helpers>
|
@@ -266,6 +279,10 @@
|
|
266 |
<sales-web-to-print-order>
|
267 |
<file>sales/web-to-print-order.xml</file>
|
268 |
</sales-web-to-print-order>
|
|
|
|
|
|
|
|
|
269 |
</updates>
|
270 |
</layout>
|
271 |
</frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<ZetaPrints_WebToPrint>
|
5 |
+
<version>15</version>
|
6 |
</ZetaPrints_WebToPrint>
|
7 |
</modules>
|
8 |
|
41 |
<quote_item>ZetaPrints_WebToPrint_Model_Quote_Item</quote_item>
|
42 |
</rewrite>
|
43 |
</sales>
|
44 |
+
|
45 |
+
<wishlist>
|
46 |
+
<rewrite>
|
47 |
+
<item>ZetaPrints_WebToPrint_Model_Item</item>
|
48 |
+
</rewrite>
|
49 |
+
</wishlist>
|
50 |
</models>
|
51 |
|
52 |
<blocks>
|
59 |
<html_footer>ZetaPrints_WebToPrint_Block_Html_Footer</html_footer>
|
60 |
</rewrite>
|
61 |
</page>
|
62 |
+
|
63 |
+
<wishlist>
|
64 |
+
<rewrite>
|
65 |
+
<customer_sidebar>ZetaPrints_WebToPrint_Block_Customer_Sidebar</customer_sidebar>
|
66 |
+
<customer_wishlist_item_column_comment>ZetaPrints_WebToPrint_Block_Customer_Wishlist_Item_Column_Comment</customer_wishlist_item_column_comment>
|
67 |
+
</rewrite>
|
68 |
+
</wishlist>
|
69 |
</blocks>
|
70 |
|
71 |
<helpers>
|
279 |
<sales-web-to-print-order>
|
280 |
<file>sales/web-to-print-order.xml</file>
|
281 |
</sales-web-to-print-order>
|
282 |
+
|
283 |
+
<wishlist-web-to-print>
|
284 |
+
<file>wishlist/web-to-print.xml</file>
|
285 |
+
</wishlist-web-to-print>
|
286 |
</updates>
|
287 |
</layout>
|
288 |
</frontend>
|
app/code/community/ZetaPrints/WebToPrint/etc/system.xml
CHANGED
@@ -134,12 +134,30 @@
|
|
134 |
</comment>
|
135 |
</products-populate-defaults>
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
<uploading-length-limit>
|
138 |
<label>File Uploading Limit</label>
|
139 |
<frontend_type>label</frontend_type>
|
140 |
<backend_model>ZetaPrints_WebToPrint_Model_System_Config_Backend_FileUploadingLimit</backend_model>
|
141 |
|
142 |
-
<sort_order>
|
143 |
|
144 |
<show_in_default>1</show_in_default>
|
145 |
<show_in_website>1</show_in_website>
|
134 |
</comment>
|
135 |
</products-populate-defaults>
|
136 |
|
137 |
+
<assign-to-websites>
|
138 |
+
<label>Assign new products to website(s)</label>
|
139 |
+
<frontend_type>multiselect</frontend_type>
|
140 |
+
<source_model>adminhtml/system_config_source_website</source_model>
|
141 |
+
|
142 |
+
<sort_order>7</sort_order>
|
143 |
+
|
144 |
+
<show_in_default>1</show_in_default>
|
145 |
+
<show_in_website>0</show_in_website>
|
146 |
+
<show_in_store>0</show_in_store>
|
147 |
+
|
148 |
+
<comment>
|
149 |
+
<![CDATA[Assign products created via ZetaPrints advanced import/export profiles to selected website(s).
|
150 |
+
<br />
|
151 |
+
<b>NOTE</b>: you can select multiple websites]]>
|
152 |
+
</comment>
|
153 |
+
</assign-to-websites>
|
154 |
+
|
155 |
<uploading-length-limit>
|
156 |
<label>File Uploading Limit</label>
|
157 |
<frontend_type>label</frontend_type>
|
158 |
<backend_model>ZetaPrints_WebToPrint_Model_System_Config_Backend_FileUploadingLimit</backend_model>
|
159 |
|
160 |
+
<sort_order>8</sort_order>
|
161 |
|
162 |
<show_in_default>1</show_in_default>
|
163 |
<show_in_website>1</show_in_website>
|
app/code/community/ZetaPrints/WebToPrint/sql/webtoprint_setup/upgrade-14-15.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$profiles = array(
|
4 |
+
array(
|
5 |
+
'name' => 'ZetaPrints templates synchronization',
|
6 |
+
'xml' => '<action '
|
7 |
+
. 'type="webtoprint/templates-synchronization" '
|
8 |
+
. 'method="parse"'
|
9 |
+
. '/>'
|
10 |
+
. "\n"
|
11 |
+
. '<action '
|
12 |
+
. 'type="webtoprint/products-updating" '
|
13 |
+
. 'method="map" '
|
14 |
+
. 'process-quantities="yes" '
|
15 |
+
. '/>'
|
16 |
+
),
|
17 |
+
array(
|
18 |
+
'name' => 'ZetaPrints simple products creation',
|
19 |
+
'xml' => '<action '
|
20 |
+
. 'type="webtoprint/products-creation" '
|
21 |
+
. 'method="map" '
|
22 |
+
. 'product-type="simple" '
|
23 |
+
. 'process-quantities="yes" '
|
24 |
+
. '/>'
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'name' => 'ZetaPrints virtual products creation',
|
28 |
+
'xml' => '<action '
|
29 |
+
. 'type="webtoprint/products-creation" '
|
30 |
+
. 'method="map" '
|
31 |
+
. 'product-type="virtual" '
|
32 |
+
. 'process-quantities="yes" '
|
33 |
+
. '/>'
|
34 |
+
)
|
35 |
+
);
|
36 |
+
|
37 |
+
foreach ($profiles as $profile) {
|
38 |
+
$profile_model = Mage::getModel('dataflow/profile');
|
39 |
+
|
40 |
+
if ($profile_model->getResource()->isProfileExists($profile['name'])) {
|
41 |
+
$collection = $profile_model->getCollection();
|
42 |
+
$collection->getSelect()->where('name = ?', $profile['name']);
|
43 |
+
|
44 |
+
if ($collection->count() == 1)
|
45 |
+
$profile_model = $collection->getFirstItem();
|
46 |
+
}
|
47 |
+
|
48 |
+
$profile_model
|
49 |
+
->setName($profile['name'])
|
50 |
+
->setActionsXml($profile['xml'])
|
51 |
+
->setGuiData(false)
|
52 |
+
->setDataTransfer('interactive')
|
53 |
+
->save();
|
54 |
+
}
|
55 |
+
|
56 |
+
?>
|
app/design/adminhtml/default/zptheme/template/sales/items/column/name.phtml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
*
|
21 |
* @category design
|
22 |
* @package default_default
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
@@ -31,8 +31,8 @@
|
|
31 |
?>
|
32 |
|
33 |
<?php if ($_item = $this->getItem()): ?>
|
34 |
-
<h5 class="title"><span id="order_item_<?php echo $_item->getId() ?>_title"><?php echo $this->
|
35 |
-
<div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->
|
36 |
|
37 |
<!-- /****** ZP-CODE:1 Inserting links to web-to-print generated files *****/ -->
|
38 |
|
@@ -49,20 +49,20 @@
|
|
49 |
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
50 |
<?php echo $this->getCustomizedOptionValue($_option); ?>
|
51 |
<?php else: ?>
|
52 |
-
<?php
|
53 |
-
<?php
|
54 |
-
<?php if ($_remainder):?>
|
55 |
-
... <span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_remainder ?></span>
|
56 |
<script type="text/javascript">
|
57 |
$('<?php echo $_id ?>').hide();
|
58 |
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
|
|
59 |
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
|
|
60 |
</script>
|
61 |
-
<?php endif
|
62 |
-
<?php endif
|
63 |
</dd>
|
64 |
<?php endforeach; ?>
|
65 |
</dl>
|
66 |
<?php endif; ?>
|
67 |
-
<?php echo $this->
|
68 |
<?php endif; ?>
|
20 |
*
|
21 |
* @category design
|
22 |
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
31 |
?>
|
32 |
|
33 |
<?php if ($_item = $this->getItem()): ?>
|
34 |
+
<h5 class="title"><span id="order_item_<?php echo $_item->getId() ?>_title"><?php echo $this->escapeHtml($_item->getName()) ?></span></h5>
|
35 |
+
<div><strong><?php echo $this->helper('sales')->__('SKU') ?>:</strong> <?php echo implode('<br />', Mage::helper('catalog')->splitSku($this->escapeHtml($this->getSku()))); ?>
|
36 |
|
37 |
<!-- /****** ZP-CODE:1 Inserting links to web-to-print generated files *****/ -->
|
38 |
|
49 |
<?php if (isset($_option['custom_view']) && $_option['custom_view']): ?>
|
50 |
<?php echo $this->getCustomizedOptionValue($_option); ?>
|
51 |
<?php else: ?>
|
52 |
+
<?php $_option = $this->getFormattedOption($_option['value']); ?>
|
53 |
+
<?php echo $_option['value']; ?><?php if (isset($_option['remainder']) && $_option['remainder']): ?><span id="<?php echo $_dots = 'dots' . uniqid()?>"> ...</span><span id="<?php echo $_id = 'id' . uniqid()?>"><?php echo $_option['remainder'] ?></span>
|
|
|
|
|
54 |
<script type="text/javascript">
|
55 |
$('<?php echo $_id ?>').hide();
|
56 |
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_id ?>').show();});
|
57 |
+
$('<?php echo $_id ?>').up().observe('mouseover', function(){$('<?php echo $_dots?>').hide();});
|
58 |
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_id ?>').hide();});
|
59 |
+
$('<?php echo $_id ?>').up().observe('mouseout', function(){$('<?php echo $_dots ?>').show();});
|
60 |
</script>
|
61 |
+
<?php endif; ?>
|
62 |
+
<?php endif; ?>
|
63 |
</dd>
|
64 |
<?php endforeach; ?>
|
65 |
</dl>
|
66 |
<?php endif; ?>
|
67 |
+
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
68 |
<?php endif; ?>
|
app/design/adminhtml/default/zptheme/template/sales/order/view/items/renderer/default.phtml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
*
|
21 |
* @category design
|
22 |
* @package default_default
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
@@ -69,12 +69,12 @@
|
|
69 |
</small>
|
70 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
71 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
72 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
73 |
<?php endforeach; ?>
|
74 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales', $_item->getStoreId())): ?>
|
75 |
<small>
|
76 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
77 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
78 |
<?php endforeach; ?>
|
79 |
</small>
|
80 |
<?php endif; ?>
|
@@ -103,7 +103,7 @@
|
|
103 |
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
104 |
|
105 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales', $_item->getStoreId())): ?>
|
106 |
-
<?php echo $this->displayPrices($_baseIncl
|
107 |
<?php else: ?>
|
108 |
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
109 |
<?php endif; ?>
|
@@ -113,7 +113,7 @@
|
|
113 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales', $_item->getStoreId())): ?>
|
114 |
<small>
|
115 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
116 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
117 |
<?php endforeach; ?>
|
118 |
</small>
|
119 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
@@ -130,7 +130,7 @@
|
|
130 |
|
131 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
132 |
<br />
|
133 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl
|
134 |
<?php endif; ?>
|
135 |
<?php endif; ?>
|
136 |
</span>
|
@@ -167,12 +167,12 @@
|
|
167 |
</small>
|
168 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
169 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
170 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
171 |
<?php endforeach; ?>
|
172 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales', $_item->getStoreId())): ?>
|
173 |
<small>
|
174 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
175 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
176 |
<?php endforeach; ?>
|
177 |
</small>
|
178 |
<?php endif; ?>
|
@@ -200,7 +200,7 @@
|
|
200 |
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
201 |
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
202 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales', $_item->getStoreId())): ?>
|
203 |
-
<?php echo $this->displayPrices($_baseIncl
|
204 |
<?php else: ?>
|
205 |
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
206 |
<?php endif; ?>
|
@@ -212,7 +212,7 @@
|
|
212 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales', $_item->getStoreId())): ?>
|
213 |
<small>
|
214 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
215 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['
|
216 |
<?php endforeach; ?>
|
217 |
</small>
|
218 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
@@ -228,7 +228,7 @@
|
|
228 |
<?php endif; ?>
|
229 |
|
230 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
231 |
-
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl
|
232 |
<?php endif; ?>
|
233 |
<?php endif; ?>
|
234 |
</span>
|
@@ -239,8 +239,8 @@
|
|
239 |
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
240 |
<td class="a-right last">
|
241 |
<?php echo $this->displayPrices(
|
242 |
-
$_item->getBaseRowTotal()
|
243 |
-
$_item->getRowTotal()
|
244 |
); ?>
|
245 |
</td>
|
246 |
</tr>
|
20 |
*
|
21 |
* @category design
|
22 |
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
69 |
</small>
|
70 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
71 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
72 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></small></span>
|
73 |
<?php endforeach; ?>
|
74 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales', $_item->getStoreId())): ?>
|
75 |
<small>
|
76 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
77 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount'], $tax['amount']); ?></span>
|
78 |
<?php endforeach; ?>
|
79 |
</small>
|
80 |
<?php endif; ?>
|
103 |
<?php $_baseIncl = $this->helper('checkout')->getBasePriceInclTax($_item); ?>
|
104 |
|
105 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales', $_item->getStoreId())): ?>
|
106 |
+
<?php echo $this->displayPrices($_baseIncl + Mage::helper('weee')->getBaseWeeeTaxInclTax($_item), $_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
107 |
<?php else: ?>
|
108 |
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxDisposition(), $_incl-$_item->getWeeeTaxDisposition()) ?>
|
109 |
<?php endif; ?>
|
113 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales', $_item->getStoreId())): ?>
|
114 |
<small>
|
115 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
116 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_amount_incl_tax'], $tax['amount_incl_tax']); ?></span>
|
117 |
<?php endforeach; ?>
|
118 |
</small>
|
119 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
130 |
|
131 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
132 |
<br />
|
133 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl + Mage::helper('weee')->getBaseWeeeTaxInclTax($_item) , $_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
134 |
<?php endif; ?>
|
135 |
<?php endif; ?>
|
136 |
</span>
|
167 |
</small>
|
168 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
169 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
170 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></small></span>
|
171 |
<?php endforeach; ?>
|
172 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales', $_item->getStoreId())): ?>
|
173 |
<small>
|
174 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
175 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount'], $tax['row_amount']); ?></span>
|
176 |
<?php endforeach; ?>
|
177 |
</small>
|
178 |
<?php endif; ?>
|
200 |
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
201 |
<?php $_baseIncl = $this->helper('checkout')->getBaseSubtotalInclTax($_item); ?>
|
202 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales', $_item->getStoreId())): ?>
|
203 |
+
<?php echo $this->displayPrices($_baseIncl + Mage::helper('weee')->getBaseRowWeeeTaxInclTax($_item), $_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
204 |
<?php else: ?>
|
205 |
<?php echo $this->displayPrices($_baseIncl-$_item->getBaseWeeeTaxRowDisposition(), $_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
206 |
<?php endif; ?>
|
212 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales', $_item->getStoreId())): ?>
|
213 |
<small>
|
214 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
215 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->displayPrices($tax['base_row_amount_incl_tax'], $tax['row_amount_incl_tax']); ?></span>
|
216 |
<?php endforeach; ?>
|
217 |
</small>
|
218 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
228 |
<?php endif; ?>
|
229 |
|
230 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales', $_item->getStoreId())): ?>
|
231 |
+
<br /><span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $this->displayPrices($_baseIncl + Mage::helper('weee')->getBaseRowWeeeTaxInclTax($_item),$_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
232 |
<?php endif; ?>
|
233 |
<?php endif; ?>
|
234 |
</span>
|
239 |
<td class="a-right"><?php echo $this->displayPriceAttribute('discount_amount') ?></td>
|
240 |
<td class="a-right last">
|
241 |
<?php echo $this->displayPrices(
|
242 |
+
$_item->getBaseRowTotal() + $_item->getBaseTaxAmount() + $_item->getBaseHiddenTaxAmount() + $_item->getBaseWeeeTaxAppliedRowAmount() - $_item->getBaseDiscountAmount(),
|
243 |
+
$_item->getRowTotal() + $_item->getTaxAmount() + $_item->getHiddenTaxAmount() + $_item->getWeeeTaxAppliedRowAmount() - $_item->getDiscountAmount()
|
244 |
); ?>
|
245 |
</td>
|
246 |
</tr>
|
app/design/frontend/base/default/layout/catalog/web-to-print-product.xml
CHANGED
@@ -39,6 +39,10 @@
|
|
39 |
<action method="setText"><text><![CDATA[<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>]]></text></action>
|
40 |
</block>
|
41 |
</reference>-->
|
|
|
|
|
|
|
|
|
42 |
</webtoprint_product_view>
|
43 |
|
44 |
<catalog_product_view>
|
39 |
<action method="setText"><text><![CDATA[<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>]]></text></action>
|
40 |
</block>
|
41 |
</reference>-->
|
42 |
+
|
43 |
+
<reference name="product.info">
|
44 |
+
<block type="catalog/product_view" name="webtoprint.product.palettes" as="webtoprint_palettes" template="catalog/product/view/web-to-print-palettes.phtml"/>
|
45 |
+
</reference>
|
46 |
</webtoprint_product_view>
|
47 |
|
48 |
<catalog_product_view>
|
app/design/frontend/base/default/template/email/order/items/order/webtoprint-default.phtml
CHANGED
@@ -28,13 +28,13 @@
|
|
28 |
<?php $_order = $this->getItem()->getOrder() ?>
|
29 |
<tr>
|
30 |
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
31 |
-
<strong style="font-size:11px;"><?php echo $this->
|
32 |
<?php if ($this->getItemOptions()): ?>
|
33 |
<dl style="margin:0; padding:0;">
|
34 |
<?php foreach ($this->getItemOptions() as $option): ?>
|
35 |
<dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
|
36 |
<dd style="margin:0; padding:0 0 0 9px;">
|
37 |
-
<?php echo
|
38 |
</dd>
|
39 |
<?php endforeach; ?>
|
40 |
</dl>
|
@@ -58,7 +58,7 @@
|
|
58 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
59 |
|
60 |
</td>
|
61 |
-
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->
|
62 |
<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered()*1 ?></td>
|
63 |
<td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
64 |
<?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
@@ -149,9 +149,9 @@
|
|
149 |
<tr>
|
150 |
<td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
|
151 |
<strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
|
152 |
-
<?php echo $this->__('From:'); ?> <?php echo $this->
|
153 |
-
<?php echo $this->__('To:'); ?> <?php echo $this->
|
154 |
-
<strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->
|
155 |
</td>
|
156 |
</tr>
|
157 |
<?php endif; ?>
|
28 |
<?php $_order = $this->getItem()->getOrder() ?>
|
29 |
<tr>
|
30 |
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
31 |
+
<strong style="font-size:11px;"><?php echo $this->escapeHtml($_item->getName()) ?></strong>
|
32 |
<?php if ($this->getItemOptions()): ?>
|
33 |
<dl style="margin:0; padding:0;">
|
34 |
<?php foreach ($this->getItemOptions() as $option): ?>
|
35 |
<dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
|
36 |
<dd style="margin:0; padding:0 0 0 9px;">
|
37 |
+
<?php echo nl2br($option['value']) ?>
|
38 |
</dd>
|
39 |
<?php endforeach; ?>
|
40 |
</dl>
|
58 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
59 |
|
60 |
</td>
|
61 |
+
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->escapeHtml($this->getSku($_item)) ?></td>
|
62 |
<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered()*1 ?></td>
|
63 |
<td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
64 |
<?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
149 |
<tr>
|
150 |
<td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
|
151 |
<strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
|
152 |
+
<?php echo $this->__('From:'); ?> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?><br />
|
153 |
+
<?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?><br />
|
154 |
+
<strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
|
155 |
</td>
|
156 |
</tr>
|
157 |
<?php endif; ?>
|
app/design/frontend/default/zp2steptheme/template/catalog/product/view.phtml
CHANGED
@@ -61,6 +61,7 @@
|
|
61 |
|
62 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
63 |
|
|
|
64 |
<div class="no-display">
|
65 |
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
66 |
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
61 |
|
62 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
63 |
|
64 |
+
<?php echo $this->getBlockHtml('formkey') ?>
|
65 |
<div class="no-display">
|
66 |
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
67 |
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
app/design/frontend/default/zp2steptheme/template/catalog/product/view/media.phtml
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
38 |
<p class="product-image product-image-zoom">
|
39 |
<?php
|
40 |
-
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->
|
41 |
echo $_helper->productAttribute($_product, $_img, 'image');
|
42 |
?>
|
43 |
</p>
|
@@ -59,7 +59,7 @@
|
|
59 |
<?php else: ?>
|
60 |
<p class="product-image">
|
61 |
<?php
|
62 |
-
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->
|
63 |
|
64 |
/****** ZP-CODE:1 Checking for personalization step and disabling image resizing for
|
65 |
products with web-to-print feature ******/
|
@@ -88,7 +88,7 @@
|
|
88 |
<ul>
|
89 |
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
90 |
<li>
|
91 |
-
<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->
|
92 |
</li>
|
93 |
<?php endforeach; ?>
|
94 |
</ul>
|
37 |
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
38 |
<p class="product-image product-image-zoom">
|
39 |
<?php
|
40 |
+
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
|
41 |
echo $_helper->productAttribute($_product, $_img, 'image');
|
42 |
?>
|
43 |
</p>
|
59 |
<?php else: ?>
|
60 |
<p class="product-image">
|
61 |
<?php
|
62 |
+
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
|
63 |
|
64 |
/****** ZP-CODE:1 Checking for personalization step and disabling image resizing for
|
65 |
products with web-to-print feature ******/
|
88 |
<ul>
|
89 |
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
90 |
<li>
|
91 |
+
<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->escapeHtml($_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->escapeHtml($_image->getLabel()) ?>" /></a>
|
92 |
</li>
|
93 |
<?php endforeach; ?>
|
94 |
</ul>
|
app/design/frontend/default/zptheme/template/catalog/product/view.phtml
CHANGED
@@ -56,6 +56,7 @@
|
|
56 |
|
57 |
<!-- /****** ZP-CODE:1 End ******/ -->
|
58 |
|
|
|
59 |
<div class="no-display">
|
60 |
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
61 |
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
@@ -99,11 +100,13 @@
|
|
99 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
100 |
|
101 |
|
102 |
-
<!-- /****** ZP-CODE:3
|
103 |
-
|
|
|
104 |
|
105 |
<?php $this->helper('webtoprint/personalization-form')->get_text_fields($this); ?>
|
106 |
<?php $this->helper('webtoprint/personalization-form')->get_image_fields($this); ?>
|
|
|
107 |
|
108 |
<!-- /****** ZP-CODE:3 End ******/ -->
|
109 |
|
56 |
|
57 |
<!-- /****** ZP-CODE:1 End ******/ -->
|
58 |
|
59 |
+
<?php echo $this->getBlockHtml('formkey') ?>
|
60 |
<div class="no-display">
|
61 |
<input type="hidden" name="product" value="<?php echo $_product->getId() ?>" />
|
62 |
<input type="hidden" name="related_product" id="related-products-field" value="" />
|
100 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
101 |
|
102 |
|
103 |
+
<!-- /****** ZP-CODE:3 Display input fields, images, stock images,
|
104 |
+
colour pickers and palettes for products
|
105 |
+
with web-to-print feature ******/ -->
|
106 |
|
107 |
<?php $this->helper('webtoprint/personalization-form')->get_text_fields($this); ?>
|
108 |
<?php $this->helper('webtoprint/personalization-form')->get_image_fields($this); ?>
|
109 |
+
<?php echo $this->getChildHtml('webtoprint_palettes'); ?>
|
110 |
|
111 |
<!-- /****** ZP-CODE:3 End ******/ -->
|
112 |
|
app/design/frontend/default/zptheme/template/catalog/product/view/media.phtml
CHANGED
@@ -37,7 +37,7 @@
|
|
37 |
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
38 |
<p class="product-image product-image-zoom">
|
39 |
<?php
|
40 |
-
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->
|
41 |
echo $_helper->productAttribute($_product, $_img, 'image');
|
42 |
?>
|
43 |
</p>
|
@@ -63,7 +63,7 @@
|
|
63 |
/****** ZP-CHANGE: 1 Add ID attribute to the element.
|
64 |
Required by web-to-print JS code ******/
|
65 |
|
66 |
-
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->
|
67 |
|
68 |
/****** ZP-CHANGE: 1 End ******/
|
69 |
|
@@ -85,7 +85,7 @@
|
|
85 |
<ul>
|
86 |
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
87 |
<li>
|
88 |
-
<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->
|
89 |
</li>
|
90 |
<?php endforeach; ?>
|
91 |
</ul>
|
37 |
<?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
|
38 |
<p class="product-image product-image-zoom">
|
39 |
<?php
|
40 |
+
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
|
41 |
echo $_helper->productAttribute($_product, $_img, 'image');
|
42 |
?>
|
43 |
</p>
|
63 |
/****** ZP-CHANGE: 1 Add ID attribute to the element.
|
64 |
Required by web-to-print JS code ******/
|
65 |
|
66 |
+
$_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->escapeHtml($this->getImageLabel()).'" title="'.$this->escapeHtml($this->getImageLabel()).'" />';
|
67 |
|
68 |
/****** ZP-CHANGE: 1 End ******/
|
69 |
|
85 |
<ul>
|
86 |
<?php foreach ($this->getGalleryImages() as $_image): ?>
|
87 |
<li>
|
88 |
+
<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->escapeHtml($_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->escapeHtml($_image->getLabel()) ?>" /></a>
|
89 |
</li>
|
90 |
<?php endforeach; ?>
|
91 |
</ul>
|
app/design/frontend/default/zptheme/template/checkout/cart/item/default.phtml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
@@ -32,9 +32,9 @@ $isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
|
|
32 |
It doesn't exist in Magento prior 1.6 release. ******/
|
33 |
|
34 |
if (method_exists(Mage::helper('catalog'), 'canApplyMsrp'))
|
35 |
-
|
36 |
else
|
37 |
-
|
38 |
|
39 |
/****** ZP-CHANGE:1 End ******/
|
40 |
|
@@ -48,31 +48,30 @@ else
|
|
48 |
features ******/ -->
|
49 |
|
50 |
<?php if(!$this->helper('webtoprint/personalization-form')->get_cart_image($this)): ?>
|
51 |
-
|
52 |
<?php endif; ?>
|
53 |
|
54 |
<!-- /****** ZP-CODE:1 End ******/ -->
|
55 |
|
56 |
</td>
|
57 |
-
|
58 |
<td>
|
59 |
<h2 class="product-name">
|
60 |
<?php if ($this->hasProductUrl()):?>
|
61 |
-
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->
|
62 |
<?php else: ?>
|
63 |
-
<?php echo $this->
|
64 |
<?php endif; ?>
|
65 |
</h2>
|
66 |
<?php if ($_options = $this->getOptionList()):?>
|
67 |
<dl class="item-options">
|
68 |
<?php foreach ($_options as $_option) : ?>
|
69 |
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
70 |
-
<dt><?php echo $this->
|
71 |
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
72 |
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
73 |
<div class="truncated_full_value">
|
74 |
<dl class="item-options">
|
75 |
-
<dt><?php echo $this->
|
76 |
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
77 |
</dl>
|
78 |
</div>
|
@@ -111,13 +110,13 @@ else
|
|
111 |
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
112 |
<td class="a-center">
|
113 |
<?php if ($isVisibleProduct): ?>
|
114 |
-
|
115 |
<?php /****** ZP-CHANGE:3 Check for 'getMoveFromCartUrl' method
|
116 |
before using it. It doesn't exist in
|
117 |
Magento prior 1.7 release. ******/ ?>
|
118 |
|
119 |
<?php if (method_exists($this->helper('wishlist'), 'getMoveFromCartUrl')): ?>
|
120 |
-
|
121 |
<?php else: ?>
|
122 |
<input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
|
123 |
<?php endif; ?>
|
@@ -156,7 +155,6 @@ else
|
|
156 |
|
157 |
</span>
|
158 |
|
159 |
-
|
160 |
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
161 |
|
162 |
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
@@ -166,11 +164,11 @@ else
|
|
166 |
<?php endforeach; ?>
|
167 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
168 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
169 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
170 |
<?php endforeach; ?>
|
171 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
172 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
173 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
174 |
<?php endforeach; ?>
|
175 |
<?php endif; ?>
|
176 |
</div>
|
@@ -182,7 +180,7 @@ else
|
|
182 |
<?php endif; ?>
|
183 |
<?php endif; ?>
|
184 |
</td>
|
185 |
-
<?php endif;
|
186 |
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
187 |
<td>
|
188 |
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
@@ -193,7 +191,7 @@ else
|
|
193 |
<?php endif; ?>
|
194 |
|
195 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
196 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl
|
197 |
<?php else: ?>
|
198 |
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
199 |
<?php endif; ?>
|
@@ -204,7 +202,7 @@ else
|
|
204 |
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
205 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
206 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
207 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
208 |
<?php endforeach; ?>
|
209 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
210 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
@@ -219,7 +217,7 @@ else
|
|
219 |
|
220 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
221 |
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
222 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl
|
223 |
</div>
|
224 |
<?php endif; ?>
|
225 |
<?php endif; ?>
|
@@ -229,6 +227,8 @@ else
|
|
229 |
<td class="a-center">
|
230 |
<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" />
|
231 |
</td>
|
|
|
|
|
232 |
<?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
233 |
<td class="a-right">
|
234 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
@@ -257,11 +257,11 @@ else
|
|
257 |
<?php endforeach; ?>
|
258 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
259 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
260 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
261 |
<?php endforeach; ?>
|
262 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
263 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
264 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
265 |
<?php endforeach; ?>
|
266 |
<?php endif; ?>
|
267 |
</div>
|
@@ -287,7 +287,7 @@ else
|
|
287 |
<span class="cart-msrp-subtotal">--</span>
|
288 |
<?php else: ?>
|
289 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
290 |
-
<?php echo $this->helper('checkout')->formatPrice($_incl
|
291 |
<?php else: ?>
|
292 |
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
293 |
<?php endif; ?>
|
@@ -301,7 +301,7 @@ else
|
|
301 |
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
302 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
303 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
304 |
-
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['
|
305 |
<?php endforeach; ?>
|
306 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
307 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
@@ -316,7 +316,7 @@ else
|
|
316 |
|
317 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
318 |
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
319 |
-
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl
|
320 |
</div>
|
321 |
<?php endif; ?>
|
322 |
<?php endif; ?>
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
32 |
It doesn't exist in Magento prior 1.6 release. ******/
|
33 |
|
34 |
if (method_exists(Mage::helper('catalog'), 'canApplyMsrp'))
|
35 |
+
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
36 |
else
|
37 |
+
$canApplyMsrp = false;
|
38 |
|
39 |
/****** ZP-CHANGE:1 End ******/
|
40 |
|
48 |
features ******/ -->
|
49 |
|
50 |
<?php if(!$this->helper('webtoprint/personalization-form')->get_cart_image($this)): ?>
|
51 |
+
<?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?>
|
52 |
<?php endif; ?>
|
53 |
|
54 |
<!-- /****** ZP-CODE:1 End ******/ -->
|
55 |
|
56 |
</td>
|
|
|
57 |
<td>
|
58 |
<h2 class="product-name">
|
59 |
<?php if ($this->hasProductUrl()):?>
|
60 |
+
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
|
61 |
<?php else: ?>
|
62 |
+
<?php echo $this->escapeHtml($this->getProductName()) ?>
|
63 |
<?php endif; ?>
|
64 |
</h2>
|
65 |
<?php if ($_options = $this->getOptionList()):?>
|
66 |
<dl class="item-options">
|
67 |
<?php foreach ($_options as $_option) : ?>
|
68 |
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
69 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
70 |
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
|
71 |
<?php if (isset($_formatedOptionValue['full_view'])): ?>
|
72 |
<div class="truncated_full_value">
|
73 |
<dl class="item-options">
|
74 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
75 |
<dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
|
76 |
</dl>
|
77 |
</div>
|
110 |
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
111 |
<td class="a-center">
|
112 |
<?php if ($isVisibleProduct): ?>
|
113 |
+
|
114 |
<?php /****** ZP-CHANGE:3 Check for 'getMoveFromCartUrl' method
|
115 |
before using it. It doesn't exist in
|
116 |
Magento prior 1.7 release. ******/ ?>
|
117 |
|
118 |
<?php if (method_exists($this->helper('wishlist'), 'getMoveFromCartUrl')): ?>
|
119 |
+
<a href="<?php echo $this->helper('wishlist')->getMoveFromCartUrl($_item->getId()); ?>" class="link-wishlist use-ajax"><?php echo $this->__('Move'); ?></a>
|
120 |
<?php else: ?>
|
121 |
<input type="checkbox" value="1" name="cart[<?php echo $_item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
|
122 |
<?php endif; ?>
|
155 |
|
156 |
</span>
|
157 |
|
|
|
158 |
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
159 |
|
160 |
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
164 |
<?php endforeach; ?>
|
165 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
166 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
167 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
168 |
<?php endforeach; ?>
|
169 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
170 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
171 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
172 |
<?php endforeach; ?>
|
173 |
<?php endif; ?>
|
174 |
</div>
|
180 |
<?php endif; ?>
|
181 |
<?php endif; ?>
|
182 |
</td>
|
183 |
+
<?php endif; ?><!-- inclusive price starts here -->
|
184 |
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
185 |
<td>
|
186 |
<?php $_incl = $this->helper('checkout')->getPriceInclTax($_item); ?>
|
191 |
<?php endif; ?>
|
192 |
|
193 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
194 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
195 |
<?php else: ?>
|
196 |
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?>
|
197 |
<?php endif; ?>
|
202 |
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
203 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
204 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
205 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
206 |
<?php endforeach; ?>
|
207 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
208 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
217 |
|
218 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
219 |
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
220 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
221 |
</div>
|
222 |
<?php endif; ?>
|
223 |
<?php endif; ?>
|
227 |
<td class="a-center">
|
228 |
<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" />
|
229 |
</td>
|
230 |
+
|
231 |
+
<!--Sub total starts here -->
|
232 |
<?php if (($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) && !$_item->getNoSubtotal()): ?>
|
233 |
<td class="a-right">
|
234 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
257 |
<?php endforeach; ?>
|
258 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
259 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
260 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
261 |
<?php endforeach; ?>
|
262 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
263 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
264 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
265 |
<?php endforeach; ?>
|
266 |
<?php endif; ?>
|
267 |
</div>
|
287 |
<span class="cart-msrp-subtotal">--</span>
|
288 |
<?php else: ?>
|
289 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
290 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
291 |
<?php else: ?>
|
292 |
<?php echo $this->helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
293 |
<?php endif; ?>
|
301 |
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $_item->getId(); ?>" style="display:none;">
|
302 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
303 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
304 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
305 |
<?php endforeach; ?>
|
306 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
307 |
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
316 |
|
317 |
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?>
|
318 |
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $_item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
319 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
320 |
</div>
|
321 |
<?php endif; ?>
|
322 |
<?php endif; ?>
|
app/design/frontend/default/zptheme/template/sales/order/items.phtml
CHANGED
@@ -65,8 +65,8 @@
|
|
65 |
<td class="gift-message-row" colspan="7">
|
66 |
<a href="#" title="<?php echo $this->__('Close') ?>" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>');" class="btn-close"><?php echo $this->__('Close') ?></a>
|
67 |
<dl class="gift-message">
|
68 |
-
<dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->
|
69 |
-
<dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->
|
70 |
<dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_item) ?></dd>
|
71 |
</dl>
|
72 |
</td>
|
65 |
<td class="gift-message-row" colspan="7">
|
66 |
<a href="#" title="<?php echo $this->__('Close') ?>" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>');" class="btn-close"><?php echo $this->__('Close') ?></a>
|
67 |
<dl class="gift-message">
|
68 |
+
<dt><strong><?php echo $this->__('From:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?></dt>
|
69 |
+
<dt><strong><?php echo $this->__('To:') ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?></dt>
|
70 |
<dd><?php echo $this->helper('giftmessage/message')->getEscapedGiftMessage($_item) ?></dd>
|
71 |
</dl>
|
72 |
</td>
|
app/design/frontend/default/zptheme/template/sales/order/items/renderer/default.phtml
CHANGED
@@ -20,17 +20,17 @@
|
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
-
* @copyright Copyright (c)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
27 |
<?php $_item = $this->getItem() ?>
|
28 |
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
|
29 |
-
<td><h3 class="product-name"><?php echo $this->
|
30 |
<?php if($_options = $this->getItemOptions()): ?>
|
31 |
<dl class="item-options">
|
32 |
<?php foreach ($_options as $_option) : ?>
|
33 |
-
<dt><?php echo $this->
|
34 |
<?php if (!$this->getPrintStatus()): ?>
|
35 |
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
36 |
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
|
@@ -46,7 +46,7 @@
|
|
46 |
</dd>
|
47 |
<?php else: ?>
|
48 |
<dd>
|
49 |
-
<?php echo nl2br($this->
|
50 |
</dd>
|
51 |
<?php endif; ?>
|
52 |
<?php endforeach; ?>
|
@@ -56,7 +56,7 @@
|
|
56 |
<?php if ($addtInfoBlock) :?>
|
57 |
<?php echo $addtInfoBlock->setItem($_item)->toHtml(); ?>
|
58 |
<?php endif; ?>
|
59 |
-
<?php echo $this->
|
60 |
<?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
|
61 |
<a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
|
62 |
<?php endif; ?>
|
@@ -74,7 +74,7 @@
|
|
74 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
75 |
|
76 |
</td>
|
77 |
-
<td><?php echo $this->
|
78 |
<td class="a-right">
|
79 |
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
80 |
<span class="price-excl-tax">
|
@@ -94,7 +94,7 @@
|
|
94 |
<?php endif; ?>
|
95 |
|
96 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
97 |
-
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()
|
98 |
<?php else: ?>
|
99 |
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
|
100 |
<?php endif; ?>
|
@@ -113,12 +113,12 @@
|
|
113 |
</small>
|
114 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
115 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
116 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
117 |
<?php endforeach; ?>
|
118 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
119 |
<small>
|
120 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
121 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
122 |
<?php endforeach; ?>
|
123 |
</small>
|
124 |
<?php endif; ?>
|
@@ -152,7 +152,7 @@
|
|
152 |
<?php endif; ?>
|
153 |
|
154 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
155 |
-
<?php echo $this->getOrder()->formatPrice($_incl
|
156 |
<?php else: ?>
|
157 |
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
|
158 |
<?php endif; ?>
|
@@ -166,7 +166,7 @@
|
|
166 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
167 |
<small>
|
168 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
169 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
170 |
<?php endforeach; ?>
|
171 |
</small>
|
172 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
@@ -184,7 +184,7 @@
|
|
184 |
|
185 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
186 |
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
187 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl
|
188 |
</span>
|
189 |
<?php endif; ?>
|
190 |
<?php endif; ?>
|
@@ -245,12 +245,12 @@
|
|
245 |
</small>
|
246 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
247 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
248 |
-
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
249 |
<?php endforeach; ?>
|
250 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
251 |
<small>
|
252 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
253 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
254 |
<?php endforeach; ?>
|
255 |
</small>
|
256 |
<?php endif; ?>
|
@@ -283,7 +283,7 @@
|
|
283 |
<span class="cart-price">
|
284 |
<?php endif; ?>
|
285 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
286 |
-
<?php echo $this->getOrder()->formatPrice($_incl
|
287 |
<?php else: ?>
|
288 |
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
|
289 |
<?php endif; ?>
|
@@ -297,7 +297,7 @@
|
|
297 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
298 |
<small>
|
299 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
300 |
-
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['
|
301 |
<?php endforeach; ?>
|
302 |
</small>
|
303 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
@@ -315,7 +315,7 @@
|
|
315 |
|
316 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
317 |
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
318 |
-
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl
|
319 |
</span>
|
320 |
<?php endif; ?>
|
321 |
<?php endif; ?>
|
20 |
*
|
21 |
* @category design
|
22 |
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
*/
|
26 |
?>
|
27 |
<?php $_item = $this->getItem() ?>
|
28 |
<tr class="border" id="order-item-row-<?php echo $_item->getId() ?>">
|
29 |
+
<td><h3 class="product-name"><?php echo $this->escapeHtml($_item->getName()) ?></h3>
|
30 |
<?php if($_options = $this->getItemOptions()): ?>
|
31 |
<dl class="item-options">
|
32 |
<?php foreach ($_options as $_option) : ?>
|
33 |
+
<dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
|
34 |
<?php if (!$this->getPrintStatus()): ?>
|
35 |
<?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
|
36 |
<dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>>
|
46 |
</dd>
|
47 |
<?php else: ?>
|
48 |
<dd>
|
49 |
+
<?php echo nl2br($this->escapeHtml( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) )) ?>
|
50 |
</dd>
|
51 |
<?php endif; ?>
|
52 |
<?php endforeach; ?>
|
56 |
<?php if ($addtInfoBlock) :?>
|
57 |
<?php echo $addtInfoBlock->setItem($_item)->toHtml(); ?>
|
58 |
<?php endif; ?>
|
59 |
+
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
60 |
<?php if($this->helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?>
|
61 |
<a href="#" id="order-item-gift-message-link-<?php echo $_item->getId() ?>" class="gift-message-link" onclick="return giftMessageToogle('<?php echo $_item->getId() ?>')"><?php echo $this->__('Gift Message') ?></a>
|
62 |
<?php endif; ?>
|
74 |
<!-- /****** ZP-CODE:2 End ******/ -->
|
75 |
|
76 |
</td>
|
77 |
+
<td><?php echo $this->escapeHtml(Mage::helper('core/string')->splitInjection($this->getSku())) ?></td>
|
78 |
<td class="a-right">
|
79 |
<?php if ($this->helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?>
|
80 |
<span class="price-excl-tax">
|
94 |
<?php endif; ?>
|
95 |
|
96 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
97 |
+
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice() + $this->getItem()->getWeeeTaxAppliedAmount() + $this->getItem()->getWeeeTaxDisposition()); ?>
|
98 |
<?php else: ?>
|
99 |
<?php echo $this->getOrder()->formatPrice($this->getItem()->getPrice()) ?>
|
100 |
<?php endif; ?>
|
113 |
</small>
|
114 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
115 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
116 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></small></span>
|
117 |
<?php endforeach; ?>
|
118 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
119 |
<small>
|
120 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
121 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount']); ?></span>
|
122 |
<?php endforeach; ?>
|
123 |
</small>
|
124 |
<?php endif; ?>
|
152 |
<?php endif; ?>
|
153 |
|
154 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
155 |
+
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?>
|
156 |
<?php else: ?>
|
157 |
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?>
|
158 |
<?php endif; ?>
|
166 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
167 |
<small>
|
168 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
169 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['amount_incl_tax']); ?></span>
|
170 |
<?php endforeach; ?>
|
171 |
</small>
|
172 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
184 |
|
185 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
186 |
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
187 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getWeeeTaxInclTax($_item)); ?></span>
|
188 |
</span>
|
189 |
<?php endif; ?>
|
190 |
<?php endif; ?>
|
245 |
</small>
|
246 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
247 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
248 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></small></span>
|
249 |
<?php endforeach; ?>
|
250 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 4, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
251 |
<small>
|
252 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
253 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount']); ?></span>
|
254 |
<?php endforeach; ?>
|
255 |
</small>
|
256 |
<?php endif; ?>
|
283 |
<span class="cart-price">
|
284 |
<?php endif; ?>
|
285 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
286 |
+
<?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
287 |
<?php else: ?>
|
288 |
<?php echo $this->getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?>
|
289 |
<?php endif; ?>
|
297 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 1, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
298 |
<small>
|
299 |
<?php foreach (Mage::helper('weee')->getApplied($this->getItem()) as $tax): ?>
|
300 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $this->getOrder()->formatPrice($tax['row_amount_incl_tax']); ?></span>
|
301 |
<?php endforeach; ?>
|
302 |
</small>
|
303 |
<?php elseif (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
315 |
|
316 |
<?php if (Mage::helper('weee')->typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?>
|
317 |
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $this->getItem()->getId(); ?>', this, 'cart-tax-total-expanded');">
|
318 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $this->getOrder()->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
319 |
</span>
|
320 |
<?php endif; ?>
|
321 |
<?php endif; ?>
|
app/design/frontend/default/zptheme/template/wishlist/item/column/image.phtml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/* @var Mage_Wishlist_Model_Item $item */
|
28 |
+
$item = $this->getItem();
|
29 |
+
$product = $item->getProduct();
|
30 |
+
?>
|
31 |
+
|
32 |
+
<!-- /****** ZP-CODE:1 Outputs link and slightly modified <img> tag to
|
33 |
+
prevent image resizing with correct image url
|
34 |
+
and returns true for products with web-to-print
|
35 |
+
features ******/ -->
|
36 |
+
|
37 |
+
<?php if(!$this->helper('webtoprint/personalization-form')->get_cart_image($this, 113, 113)): ?>
|
38 |
+
<a class="product-image" href="<?php echo $this->getProductUrl($item) ?>" title="<?php echo $this->escapeHtml($product->getName()) ?>">
|
39 |
+
<img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(113, 113); ?>" width="113" height="113" alt="<?php echo $this->escapeHtml($product->getName()) ?>" />
|
40 |
+
</a>
|
41 |
+
<?php endif; ?>
|
42 |
+
|
43 |
+
<!-- /****** ZP-CODE:1 End ******/ -->
|
lib/ZetaPrints/xslt/image-fields.xslt
CHANGED
@@ -17,7 +17,11 @@
|
|
17 |
<xsl:for-each select="Page">
|
18 |
<xsl:variable name="page-number" select="position()" />
|
19 |
|
20 |
-
<xsl:
|
|
|
|
|
|
|
|
|
21 |
<div id="stock-images-page-{$page-number}" class="zetaprints-page-stock-images zp-hidden">
|
22 |
<xsl:call-template name="stock-images-for-page">
|
23 |
<xsl:with-param name="page" select="$page-number" />
|
17 |
<xsl:for-each select="Page">
|
18 |
<xsl:variable name="page-number" select="position()" />
|
19 |
|
20 |
+
<xsl:variable name="allow-upload" select="//Images/Image[@Page=$page-number][@AllowUpload='1']" />
|
21 |
+
<xsl:variable name="has-stock-images" select="//Images/Image[@Page=$page-number]/StockImage" />
|
22 |
+
<xsl:variable name="has-colour-picker" select="//Images/Image[@Page=$page-number][@ColourPicker='RGB']" />
|
23 |
+
|
24 |
+
<xsl:if test="$allow-upload or $has-stock-images or $has-colour-picker">
|
25 |
<div id="stock-images-page-{$page-number}" class="zetaprints-page-stock-images zp-hidden">
|
26 |
<xsl:call-template name="stock-images-for-page">
|
27 |
<xsl:with-param name="page" select="$page-number" />
|
lib/ZetaPrints/zetaprints-api.php
CHANGED
@@ -278,16 +278,20 @@ function zetaprints_parse_template_details ($xml) {
|
|
278 |
'color-picker' => isset($image['ColourPicker'])
|
279 |
? (string) $image['ColourPicker'] : null,
|
280 |
'allow-upload' => isset($image['AllowUpload'])
|
281 |
-
? (bool) $image['AllowUpload'] : false,
|
282 |
'allow-url' => isset($image['AllowUrl'])
|
283 |
-
? (bool) $image['AllowUrl'] : false,
|
284 |
'clipped' => isset($image['Clipped'])
|
285 |
? (bool) $image['Clipped'] : false,
|
|
|
286 |
//We get lowercase GUID in value for user images.
|
287 |
//Convert to uppercase while the issue will be fixed in ZP side
|
288 |
'value' => isset($image['Value'])
|
289 |
? strtoupper((string) $image['Value']) : null );
|
290 |
|
|
|
|
|
|
|
291 |
if ($image->StockImage) {
|
292 |
$image_array['stock-images'] = array();
|
293 |
|
@@ -339,9 +343,13 @@ function zetaprints_parse_template_details ($xml) {
|
|
339 |
? (int) $field['StoryAsDefault'] : null,
|
340 |
'combobox' => isset($field['Combobox'])
|
341 |
? (bool) $field['Combobox'] : false,
|
|
|
342 |
'value' => isset($field['Value'])
|
343 |
? (string) $field['Value'] : null );
|
344 |
|
|
|
|
|
|
|
345 |
if ($field->Value) {
|
346 |
$field_array['values'] = array();
|
347 |
|
@@ -413,6 +421,34 @@ function zetaprints_parse_template_details ($xml) {
|
|
413 |
$template['tags'] = $tags;
|
414 |
}
|
415 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
_zetaprints_debug(array('template' => $template));
|
417 |
|
418 |
return $template;
|
278 |
'color-picker' => isset($image['ColourPicker'])
|
279 |
? (string) $image['ColourPicker'] : null,
|
280 |
'allow-upload' => isset($image['AllowUpload'])
|
281 |
+
? (bool)(string) $image['AllowUpload'] : false,
|
282 |
'allow-url' => isset($image['AllowUrl'])
|
283 |
+
? (bool)(string) $image['AllowUrl'] : false,
|
284 |
'clipped' => isset($image['Clipped'])
|
285 |
? (bool) $image['Clipped'] : false,
|
286 |
+
'palette' => isset($image['Palette']) ? (string) $image['Palette'] : null,
|
287 |
//We get lowercase GUID in value for user images.
|
288 |
//Convert to uppercase while the issue will be fixed in ZP side
|
289 |
'value' => isset($image['Value'])
|
290 |
? strtoupper((string) $image['Value']) : null );
|
291 |
|
292 |
+
if ($image_array['palette'])
|
293 |
+
$paletteToNameMap[$image_array['palette']][] = $image_array['name'];
|
294 |
+
|
295 |
if ($image->StockImage) {
|
296 |
$image_array['stock-images'] = array();
|
297 |
|
343 |
? (int) $field['StoryAsDefault'] : null,
|
344 |
'combobox' => isset($field['Combobox'])
|
345 |
? (bool) $field['Combobox'] : false,
|
346 |
+
'palette' => isset($image['Palette']) ? (string) $image['Palette'] : null,
|
347 |
'value' => isset($field['Value'])
|
348 |
? (string) $field['Value'] : null );
|
349 |
|
350 |
+
if ($field_array['palette'])
|
351 |
+
$paletteToNameMap[$field_array['palette']][] = $field_array['name'];
|
352 |
+
|
353 |
if ($field->Value) {
|
354 |
$field_array['values'] = array();
|
355 |
|
421 |
$template['tags'] = $tags;
|
422 |
}
|
423 |
|
424 |
+
if ($xml->Quantities) foreach ($xml->Quantities->Quantity as $quantity)
|
425 |
+
$template['quantities'][] = array(
|
426 |
+
'price' => (float) $quantity['Price'],
|
427 |
+
'title' => (string) $quantity['Title'],
|
428 |
+
);
|
429 |
+
|
430 |
+
if ($xml->Palettes) foreach ($xml->Palettes->Palette as $palette) {
|
431 |
+
$paletteId = (string) $palette['ID'];
|
432 |
+
|
433 |
+
$_palette = array(
|
434 |
+
'names' => (string) $palette['Names'],
|
435 |
+
'title' => isset($paletteToNameMap[$paletteId])
|
436 |
+
? implode(', ', $paletteToNameMap[$paletteId])
|
437 |
+
: (string) $palette['Names'],
|
438 |
+
'any_colour' => isset($palette['AnyColor'])
|
439 |
+
? (bool) $palette['AnyColor']
|
440 |
+
: false
|
441 |
+
);
|
442 |
+
|
443 |
+
foreach ($palette->Color as $colour)
|
444 |
+
$_palette['colours'][(string) $colour['ID']] = array(
|
445 |
+
'fill_rgb' => (string) $colour['FillRGB'],
|
446 |
+
'outline_rgb' => (string) $colour['OutlineRGB']
|
447 |
+
);
|
448 |
+
|
449 |
+
$template['palettes'][$paletteId] = $_palette;
|
450 |
+
}
|
451 |
+
|
452 |
_zetaprints_debug(array('template' => $template));
|
453 |
|
454 |
return $template;
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>web_to_print_store_incl_theme</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license>mixed</license>
|
7 |
<channel>community</channel>
|
@@ -21,12 +21,20 @@ Source code: http://code.google.com/p/magento-w2p/
|
|
21 |

|
22 |
Technical support: admin@zetaprints.com
|
23 |
Extension developed by http://www.zetaprints.com/</description>
|
24 |
-
<notes>*
|
25 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
<authors><author><name>Anatoly A. Kazantsev</name><user>jimcrow</user><email>anatoly@zetaprints.com</email></author></authors>
|
27 |
-
<date>
|
28 |
-
<time>
|
29 |
-
<contents><target name="mageetc"><dir name="modules"><file name="ZetaPrints_WebToPrint.xml" hash="4690d74c958173f35baddabde4276cf4"/></dir></target><target name="magecommunity"><dir name="ZetaPrints"><dir name="WebToPrint"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Templates"><file name="Dynamicimaging.php" hash="507a4c9dd7ebb3cca626ee37094d213e"/><file name="Radiobutton.php" hash="c1a1afb50b857211ce79dd2850f514f1"/></dir><file name="Templates.php" hash="3b5b8cb346bfdf3420ae1026034cd225"/></dir></dir></dir></dir><dir name="Html"><file name="Footer.php" hash="23d5b15ddf0e3b93c3830853cf13fd52"/></dir></dir><dir name="Helper"><file name="Data.php" hash="a7e68e3c6de19f3b7606bbf5f2366496"/><file name="PersonalizationForm.php" hash="d35a6673ec8501811d8869d30094b951"/></dir><dir name="Model"><file name="Config.php" hash="460c0632326e33b75bfe5d48fb05043c"/><dir name="Convert"><dir name="Mapper"><dir name="Product"><file name="Creating.php" hash="c3c543b6d47ee73cc80565ea84e0fcbd"/><file name="Updating.php" hash="13c05bc81b115778bc7effbd83e5ac5f"/></dir></dir><dir name="Parser"><file name="Catalogue.php" hash="ca444746ffec989d07cbed301519a893"/><file name="Template.php" hash="c2fa53784963b7596f118636ef3dd978"/></dir></dir><dir name="Events"><file name="Observer.php" hash="9b969dc600bbd0a1a6b9bec701e1fb8f"/></dir><dir name="Profile"><file name="History.php" hash="2a59cc16cb37256eb7bdf22310e696de"/></dir><dir name="Quote"><file name="Item.php" hash="1f12b610013de10184177dc6a89a0d41"/></dir><dir name="Resource"><file name="Setup.php" hash="1e415970f4ecf42b20d7f0ee18363adb"/><dir name="Template"><file name="Collection.php" hash="c0469f86815f395f33028dca3456257d"/></dir><file name="Template.php" hash="82b24eb29c98ec58de75894826ae4b66"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Apikey.php" hash="089da852bd20b5fe579eef455a8404df"/><file name="FileUploadingLimit.php" hash="dcaf5a851a8d36f6ab09d65a2626b006"/><file name="ZetaPrintsUrl.php" hash="3716c4522ca04d64fd2d15b41d529152"/></dir><dir name="Source"><file name="TemplateDeletingBehaviour.php" hash="232bec5c787c616f0740297b464f737e"/></dir></dir></dir><file name="Template.php" hash="37c77e723ccf83b35076b3b860312249"/></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="206b85ba57d4d6fd34bbf085e886e307"/></dir><file name="ImageController.php" hash="2058309a6b2572c2bce2c32e20851167"/><file name="OrderController.php" hash="af6fbe14a33c73d0c2357cd0483e20f0"/><file name="PhotothumbnailController.php" hash="3d5eb2626773886be58c83f11efadbe2"/><file name="PreviewController.php" hash="de28d77b356f24feaf1099c9b8b39416"/><file name="ThumbnailController.php" hash="866a09d070d2fb472e956ca7297c4c5b"/><file name="TransController.php" hash="c618911e26a91a9c38462a1e351455d7"/><file name="UploadController.php" hash="d54ce2272adff428fa8d642fba0da061"/></dir><dir name="data"><dir name="webtoprint_setup"><file name="data-upgrade-12-13.php" hash="bf11fb84b8dc29978edf2dde76fcfc94"/></dir></dir><dir name="etc"><file name="config.xml" hash="121bd077586d044895ff307a2d67261f"/><file name="custom-options.xsd" hash="08b1f468c2583eb8934a4a45d8ab4bc7"/><file name="system.xml" hash="bdad52c1b41d74ec66bae7a64b15386e"/></dir><dir name="sql"><dir name="webtoprint_setup"><file name="mysql4-data-upgrade-8-9.php" hash="232f5a85ee355f215db2b791d3eb5333"/><file name="mysql4-install-1.php" hash="40c5713d5158831cfa4ff927f5789972"/><file name="mysql4-upgrade-1-2.php" hash="15104d010dce29b64048819454970202"/><file name="mysql4-upgrade-10-11.php" hash="77df29e65752035772a9a69cfde3e840"/><file name="mysql4-upgrade-11-12.php" hash="979bbe257a329ce3dc5f6a89f82d0793"/><file name="mysql4-upgrade-2-3.php" hash="e384d9fd053394000a7293048079e4d3"/><file name="mysql4-upgrade-3-4.php" hash="25a6c0fe4e62f230bab357692bbb821d"/><file name="mysql4-upgrade-4-5.php" hash="f8d8c1be5d2b0498815f07249a9b1925"/><file name="mysql4-upgrade-5-6.php" hash="4db08e08cf7e97f82e1e3f76368620f0"/><file name="mysql4-upgrade-6-7.php" hash="89979b5bd55191d63486c2d1c91a25fe"/><file name="mysql4-upgrade-7-8.php" hash="334c3f05c006d92517818c65e34f4132"/><file name="mysql4-upgrade-9-10.php" hash="6ca1534360b029badf0ba2047904ea9f"/><file name="upgrade-13-14.php" hash="d16a06457516183c7bea1cb3d2d43248"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="zptheme"><dir name="layout"><file name="local.xml" hash="103bcfd7f8971e8c62b453000fab9ade"/></dir><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="36eee9dfc5927ca08aa42132750ba650"/></dir><dir name="ru_RU"><file name="translate.csv" hash="ef3d4b8ea531f9786bf1ac7154838681"/></dir></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="tab"><dir name="templates"><file name="dynamic-imaging.phtml" hash="943948a5f8868da3c9d273d3038d09a9"/><file name="radiobutton.phtml" hash="fff5ce6ab78a46b098bd8586fdafbd11"/></dir></dir></dir></dir><dir name="sales"><dir name="items"><dir name="column"><file name="name.phtml" hash="1c0a2972d9477e7b70db182f211f458f"/></dir></dir><dir name="order"><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="569896cf5ca4cfc47859060d443880c0"/></dir></dir><dir name="tab"><file name="info.phtml" hash="0c53a36fd7adaa3111118e76423ae1d9"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="zptheme"><dir name="template"><dir name="callouts"><file name="right_col.phtml" hash="39bc3b7a57363e6c6ec571aa9b5178f2"/></dir><dir name="catalog"><dir name="product"><dir name="view"><file name="addto.phtml" hash="a8137c12717f898bdcf2f697e860fcef"/><file name="addtocart.phtml" hash="3ae47a9d2f53de9626d095652803d12d"/><file name="media.phtml" hash="e3bf0b3467ac32458e2a82ea0ff6f21a"/></dir><file name="view.phtml" hash="bdb8b24d6442d6989dfa7baa8b9921fe"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="item"><file name="default.phtml" hash="fecb4c23342a2ab4240288779d17c991"/></dir></dir></dir><dir name="sales"><dir name="order"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="8a53df09d34b164324ed4b18ba2855fd"/></dir></dir><file name="items.phtml" hash="d09b5d93094b69cb7ab9292dff7313a6"/></dir></dir></dir></dir><dir name="zp2steptheme"><dir name="template"><dir name="catalog"><dir name="product"><dir name="view"><file name="addto.phtml" hash="f7382ad4dadcf81867518d345b19c4ce"/><file name="addtocart.phtml" hash="0187a2fa97020c6e481d34c67373f1d1"/><file name="media.phtml" hash="d7cf4f29f51f216b38a617a3f55de68f"/></dir><file name="view.phtml" hash="45873b3c858132012dfb468a48f486ef"/></dir></dir></dir></dir><dir name="zpadvancedtheme"><dir name="layout"><file name="local.xml" hash="e2c3607469970b8d9d4cc739a1490006"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><dir name="catalog"><file name="web-to-print-product.xml" hash="56b43d15b7a780ac91987dc42615060e"/></dir><dir name="checkout"><file name="web-to-print-cart.xml" hash="a59de3a46bbed9a6bec5ad48b6b96873"/></dir><dir name="sales"><file name="web-to-print-order.xml" hash="df0d0d8383d904475ea9d3b6861dbaaf"/></dir><file name="web-to-print.xml" hash="132b692c1e8f740f39289aad4d65eb89"/><dir name="review"><file name="web-to-print-product.xml" hash="c76069cfe20381e7850b6fc397ab67bd"/></dir></dir><dir name="template"><dir name="web-to-print"><dir><dir name="image-edit"><file name="edit.phtml" hash="9b3996baae857506e689ba20e4f8ab9c"/></dir></dir></dir><dir name="catalog"><dir name="product"><dir name="view"><file name="web-to-print-buttons.phtml" hash="3ef671d34a0850a7485ba8200c7d28c7"/></dir></dir></dir><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="webtoprint-default.phtml" hash="1014b4f999eff8b7acf6cc3e5b59d0a7"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="zptheme"><dir name="css"><file name="zp-style.css" hash="dcf53adad1e1a72d9580c9b3e10d294f"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="zptheme"><dir name="images"><dir name="media"><file name="get-started.png" hash="e4b8cfcccdf935d27ebc12c5c818b137"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="css"><file name="zp-image-edit.css" hash="decf8f2d7523eda51361ac7a0860b171"/><file name="zp-in-preview-edit.css" hash="a92910e4bb2ee490652cfee76777bb6f"/><file name="zp-style.css" hash="154104519328ffd4061d41c93718357d"/></dir><dir name="images"><dir name="image-edit"><file name="crop.png" hash="1932a3ef782c9725582849d50edc61ec"/><file name="delete.png" hash="cae5056aafc123b58a9d7d2f950931ae"/><file name="edit.png" hash="d46e523fb62ddf001e43844a8cad2e7f"/><file name="fit-to-field-crop-icon.png" hash="4903799be782fc6d66ad9be5398e384c"/><file name="flip_h.png" hash="1ac31304ac42e8dee88afe2c3cfd83ab"/><file name="flip_v.png" hash="2a48cc57703943dd1d3d259340a5d251"/><file name="line.png" hash="e29885cc047ef76da85c93b754bee93b"/><file name="move.png" hash="9f5a402dfee964b1bb89b269e2a9844b"/><file name="pen.png" hash="833a24ceae4d60c00d588ed7db36a3b6"/><file name="resize.png" hash="2e9e5a5008dceffaeb5d79f7bf2b6dfd"/><file name="restore.png" hash="c7730035aee2f868291bbcc82e7daef3"/><file name="rotate_l.png" hash="ae3b9fac8b2376ff20420dcc19ec2d8b"/><file name="rotate_r.png" hash="9053177817d8890bf72290320579fe38"/><file name="status-bar-sprite.png" hash="e6f5b566176ee6a53ef2e5b67b1c3055"/></dir><file name="big-spinner.gif" hash="da798def57c4b5fed4274c11df85e332"/><file name="edited-shape-background.png" hash="061eefe277c498225640d2bc8100c51b"/><file name="images-selector-sprites.png" hash="d0cec2fbb7e1fe66c928dd9067295387"/><file name="in-preview-edit-sprite.png" hash="1f695b3d738973910c1b6a074c9e33e7"/><file name="spinner.gif" hash="541f417381a25b27a0a3e8c048bc652d"/><file name="transparent-background.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/><file name="page-size-icon.png" hash="113320bc626ce10787fd2d7d605973d9"/><file name="zp-image-edit-sprite.png" hash="905bbe3492ea780a73abe207161421a4"/><dir name="web-to-print"><file name="loading-spinner.gif" hash="4bba752c92dcc06ba42ebcf4f95617ca"/><file name="preview-overlay-background.png" hash="97c0267aa2b85879c7c21d89e7a04e47"/><file name="zp-button-background.png" hash="263db20821d062f6a76b4b05d2218efa"/><file name="zp-button-sprites.png" hash="f7a420e549146f606268bf166d044154"/></dir></dir><dir name="js"><file name="zp-image-edit.js" hash="cb70e1fee6e2e2085d88c164cfeca8eb"/><file name="zp-in-preview-edit.js" hash="78cc62b9cd8543484cc542c26f1eba77"/><file name="zp-personalization-form.js" hash="c4b3411216a9312cfad2f002bd464b43"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="ZetaPrints_WebToPrint.csv" hash="944fa2d2777098aaf2a3193194f1fcfd"/></dir><dir name="en_US"><file name="ZetaPrints_WebToPrint.csv" hash="003d60eb82817b8313a8baf390d3ca78"/></dir><dir name="es_ES"><file name="ZetaPrints_WebToPrint.csv" hash="432806dca0c769690e6be87778da299c"/></dir><dir name="ru_RU"><file name="ZetaPrints_WebToPrint.csv" hash="abc4592eac42e65bba71001dff5669d3"/></dir><dir name="de_DE"><file name="ZetaPrints_WebToPrint.csv" hash="d1c6f6d8d700345172ad1d3c8ca527f2"/></dir><dir name="mk_MK"><file name="ZetaPrints_WebToPrint.csv" hash="35cd58dde2b3a4d575b5c7d8439db48e"/></dir><dir name="nl_NL"><file name="ZetaPrints_WebToPrint.csv" hash="c1ad22876a1fa6b6eb70b69f20b79822"/></dir><dir name="tr_TR"><file name="ZetaPrints_WebToPrint.csv" hash="37e4d625f2481ba781c39027b3790010"/></dir></target><target name="mageweb"><dir name="js"><dir name="colorpicker"><file name="colorpicker.css" hash="d903ee19004f9cb287d38028836148b9"/><file name="colorpicker.js" hash="65cd976b4d3d7bf7073ea10773f5c574"/><dir name="images"><file name="blank.gif" hash="56398e76be6355ad5999b262208a17c9"/><file name="colorpicker_background.png" hash="a79f1a2a81bfe3ed1c2ca4c41b8e1fbf"/><file name="colorpicker_hex.png" hash="16d6870c36e379c06fb26ebd2e16bf44"/><file name="colorpicker_hsb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_hsb_h.png" hash="d47409a203bedc76b26dc60b71a69f6b"/><file name="colorpicker_hsb_s.png" hash="5ff5e43ab6b7b41b6123bfab692a9b19"/><file name="colorpicker_indic.gif" hash="f485d07540a89502e36dc1a55cec05d0"/><file name="colorpicker_overlay.png" hash="c7a33805ffda0d32bd2a9904c8b02750"/><file name="colorpicker_rgb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_rgb_g.png" hash="dc17f953a6febbe174e92b54690586c3"/><file name="colorpicker_rgb_r.png" hash="87eeb205d093b713b68a341771f4ee27"/><file name="colorpicker_select.gif" hash="cec464162af0cce10348e7bb7701ef86"/><file name="colorpicker_submit.png" hash="12d1746e6b52e007f1b78d772d9248ba"/><file name="custom_background.png" hash="06c91f7ae1561ccd8f1c79119529600d"/><file name="custom_hex.png" hash="e27aaa92b15d9392d909f8b94e797524"/><file name="custom_hsb_b.png" hash="b45588ca2fe9ba46673862300fcd3083"/><file name="custom_hsb_h.png" hash="4a1afa5636421aae4c44471d2273496d"/><file name="custom_hsb_s.png" hash="83aa97407fb76615a7db5ed721681148"/><file name="custom_indic.gif" hash="04660eb352eb259581a36a0fe8da2d4d"/><file name="custom_rgb_b.png" hash="f6e50cd567bd3059742d45ab224a413b"/><file name="custom_rgb_g.png" hash="b1e286e06692b3640862a3d07f636a80"/><file name="custom_rgb_r.png" hash="8ae4b3ef109ee66ec1022632470ddd0f"/><file name="custom_submit.png" hash="35423f0f2538e507dec193b52f8d0327"/><file name="select.png" hash="7b086953a8c62d2685a65644979d5d04"/><file name="select2.png" hash="c8d194d92dbad98615b2a9140b34ab48"/><file name="slider.png" hash="3a50b8078dea50b9811603a85ecef836"/></dir></dir><dir name="fancybox"><file name="fancybox-resizing.css" hash="873d5f5c826b73e6b75844ed4062744f"/><file name="fancybox-resizing.js" hash="e37b00db53132217e965427058dec7eb"/><file name="fancybox-save-image.css" hash="9d8be052aaa7cc0971dbd514a515d509"/><file name="fancybox-save-image.js" hash="e89e092715bc3df2042259398d55fcc5"/><file name="fancybox-select-image.css" hash="aed8d9d2efa9c3d99b907ed1370766c3"/><file name="fancybox-select-image.js" hash="67bfb4f019e9a87ec614941fae20d393"/><file name="fancybox-update-preview.css" hash="7a6965d53545cf4bdf27aed5b56573bc"/><file name="fancybox-update-preview.js" hash="63d89cf88fa1fd860f5dcb773537529f"/><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="943455e2f07f74204ad982304a4cbb27"/><file name="zp-update-preview-button-rotating-arrows.gif" hash="717e17df98dd44ca7745e81fd4373976"/><file name="zp-update-preview-button-sprite.png" hash="c940eeaab267ee1c9b7cfd79ab57e458"/><file name="zp-update-preview-button-x.png" hash="286f9e5aa39c7e4ad33a27890c457ab4"/></dir><file name="jquery-fancybox.css" hash="ac26b56d28d1feacf7030a142ad73fff"/><file name="jquery-fancybox.js" hash="c7ab799447eab5a647aca074556f8ac8"/></dir><dir name="jquery"><file name="jquery-min.js" hash="48080a4201448f15d8e72f6786a1e7e7"/><file name="jquery-qtip-min.js" hash="1ba662a8876762876602e10882d12d2c"/><file name="jquery-ui-custom-min.js" hash="a6ebf059fed4c48f796f55acfdbf1436"/></dir><dir name="lib"><file name="ajaxupload.js" hash="ad9135b2a5aa39fefffe257e5fb8f11c"/></dir><dir name="powercrop"><dir name="images"><file name="cursor-move.png" hash="350c09c97b9e1a2035112a140636b0a4"/></dir><file name="jquery-powercrop.css" hash="fb2e83acc6d3a46a408db21398900948"/><file name="jquery-powercrop.js" hash="f9943f0679d963aa7188ba4e271df8b6"/></dir><dir name="zetaprints"><dir name="images"><dir name="zp-combobox-field"><file name="sprites.gif" hash="9c4e000f0cc9fcecaca754f4a95deedf"/></dir><dir name="zp-text-field-editor"><file name="sprites.png" hash="5963823e045d8fbca649a783b9979517"/></dir><dir name="zp-text-field-resizer"><file name="left-handle.gif" hash="14e1072668649893740c5434f8b35a16"/><file name="right-handle.gif" hash="fb7954ef560ab5db4addd015739008fc"/></dir></dir><file name="zp-combobox-field.css" hash="100156d71b72b536dbd7822dfd985f42"/><file name="zp-combobox-field.js" hash="222f5d3752104ba8b14d641b8ae8a3b6"/><file name="zp-dataset.css" hash="37b7adf2ac746ddbe53913bb0b34ba67"/><file name="zp-dataset.js" hash="d658a5c2494fc9848474699b93219960"/><file name="zp-metadata.js" hash="d0749f2c3ede0443951438627d7b5f97"/><file name="zp-text-field-editor.css" hash="fc7e89e26fcc4bccd4c37060df3debab"/><file name="zp-text-field-editor.js" hash="50c23e8ecf122a4d5ccffadfa7c2ddf1"/><file name="zp-text-field-resizer.js" hash="bec48882f2e5ad0429067409e526cfdb"/></dir></dir></target><target name="magelib"><dir name="ZetaPrints"><file name="Api.php" hash="9b84afe36689561daaf4ec82df1c62e4"/><file name="mage-logging.php" hash="cccf6f2896d6bdc5eaa71d74fa1cdf36"/><dir name="xslt"><file name="common-templates.xslt" hash="98a35be3b523723c2367ead7d045f01f"/><file name="image-fields.xslt" hash="655948d2aef349e89166bdd0e1aa52fb"/><file name="page-size-table.xslt" hash="fdb521ec348fd82105fc66eb7b9db952"/><file name="page-tabs.xslt" hash="e341e7a708af01b5ac0b7792b0067e2b"/><file name="text-fields.xslt" hash="a6f8f17499c746e9a85cf9c58e40cbe3"/></dir><file name="zetaprints-api.php" hash="0b22b7086d9a92b9220b67928064ca95"/></dir></target></contents>
|
30 |
<compatible/>
|
31 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>curl</name><min/><max/></extension><extension><name>xsl</name><min/><max/></extension></required></dependencies>
|
32 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>web_to_print_store_incl_theme</name>
|
4 |
+
<version>2.2.0.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>mixed</license>
|
7 |
<channel>community</channel>
|
21 |

|
22 |
Technical support: admin@zetaprints.com
|
23 |
Extension developed by http://www.zetaprints.com/</description>
|
24 |
+
<notes>* Synchronise with Magento 1.8.0.0 and 1.8.1.0 versions
|
25 |
+
* Add support for quantities in ZetaPrints templates
|
26 |
+
* Add support for colour palettes in ZetaPrints templates
|
27 |
+
* Add support for storing w2p product (previews and user input) in wishlist (issue #823)
|
28 |
+
* Allow to use dummy store for category name mapping
|
29 |
+
* Add parameter to enable assigning of created product to parent categories in profile for product creation
|
30 |
+
* Add an option to select websites for assiging of newly created products
|
31 |
+
* Re-assigned product to category on update
|
32 |
+
* Show warning when user changed data in fields but has not updated previews yet
|
33 |
+
* Other small bug fixes and improvements</notes>
|
34 |
<authors><author><name>Anatoly A. Kazantsev</name><user>jimcrow</user><email>anatoly@zetaprints.com</email></author></authors>
|
35 |
+
<date>2014-07-09</date>
|
36 |
+
<time>05:57:49</time>
|
37 |
+
<contents><target name="mageetc"><dir name="modules"><file name="ZetaPrints_WebToPrint.xml" hash="4690d74c958173f35baddabde4276cf4"/></dir></target><target name="magecommunity"><dir name="ZetaPrints"><dir name="WebToPrint"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="Edit"><dir name="Tab"><dir name="Templates"><file name="Dynamicimaging.php" hash="507a4c9dd7ebb3cca626ee37094d213e"/><file name="Radiobutton.php" hash="c1a1afb50b857211ce79dd2850f514f1"/></dir><file name="Templates.php" hash="3b5b8cb346bfdf3420ae1026034cd225"/></dir></dir></dir></dir><dir name="Customer"><file name="Sidebar.php" hash="91b271b4a80199d6aa9c048e2c89e623"/><dir name="Wishlist"><dir name="Item"><dir name="Column"><file name="Comment.php" hash="efc441b7489cc940503fe5b33db09e41"/></dir></dir></dir></dir><dir name="Html"><file name="Footer.php" hash="8567dbfd6c1f86b5c84df7869c62d933"/></dir></dir><dir name="Helper"><file name="Category.php" hash="e20ea5876c1d3948ee814f27ff90e6d5"/><file name="Data.php" hash="45e252c5076044eaa61b9ff3c398aa8a"/><file name="PersonalizationForm.php" hash="07410934919a1ae4cec10fad06304562"/></dir><dir name="Model"><file name="Config.php" hash="460c0632326e33b75bfe5d48fb05043c"/><dir name="Convert"><dir name="Mapper"><dir name="Product"><file name="Creating.php" hash="419502356b0a2cb384eccc37f77a1cbd"/><file name="Updating.php" hash="7ec4266c2f8d6c8ca7c96c5397a616ae"/></dir></dir><dir name="Parser"><file name="Catalogue.php" hash="219764bb39f9ad8711135e61113c83d1"/><file name="Template.php" hash="c2fa53784963b7596f118636ef3dd978"/></dir></dir><dir name="Events"><file name="Observer.php" hash="cdf927030b6c849b964e893e76d3f737"/></dir><file name="Item.php" hash="1c50ac1a3463b7030a572657223fa4cd"/><dir name="Profile"><file name="History.php" hash="2a59cc16cb37256eb7bdf22310e696de"/></dir><dir name="Quote"><file name="Item.php" hash="1f12b610013de10184177dc6a89a0d41"/></dir><dir name="Resource"><file name="Setup.php" hash="1e415970f4ecf42b20d7f0ee18363adb"/><dir name="Template"><file name="Collection.php" hash="c0469f86815f395f33028dca3456257d"/></dir><file name="Template.php" hash="82b24eb29c98ec58de75894826ae4b66"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Apikey.php" hash="089da852bd20b5fe579eef455a8404df"/><file name="FileUploadingLimit.php" hash="dcaf5a851a8d36f6ab09d65a2626b006"/><file name="ZetaPrintsUrl.php" hash="3716c4522ca04d64fd2d15b41d529152"/></dir><dir name="Source"><file name="TemplateDeletingBehaviour.php" hash="232bec5c787c616f0740297b464f737e"/></dir></dir></dir><file name="Template.php" hash="29a7e3dbecd238b05796db54a37bd622"/></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="206b85ba57d4d6fd34bbf085e886e307"/></dir><file name="ImageController.php" hash="2058309a6b2572c2bce2c32e20851167"/><file name="OrderController.php" hash="af6fbe14a33c73d0c2357cd0483e20f0"/><file name="PhotothumbnailController.php" hash="3d5eb2626773886be58c83f11efadbe2"/><file name="PreviewController.php" hash="de28d77b356f24feaf1099c9b8b39416"/><file name="ThumbnailController.php" hash="866a09d070d2fb472e956ca7297c4c5b"/><file name="TransController.php" hash="c618911e26a91a9c38462a1e351455d7"/><file name="UploadController.php" hash="d54ce2272adff428fa8d642fba0da061"/></dir><dir name="data"><dir name="webtoprint_setup"><file name="data-upgrade-12-13.php" hash="bf11fb84b8dc29978edf2dde76fcfc94"/></dir></dir><dir name="etc"><file name="config.xml" hash="1da1620ac86dea2acbae931841b48b5a"/><file name="custom-options.xsd" hash="08b1f468c2583eb8934a4a45d8ab4bc7"/><file name="system.xml" hash="3f0ff1539b115d142b19b71c15e49eb0"/></dir><dir name="sql"><dir name="webtoprint_setup"><file name="mysql4-data-upgrade-8-9.php" hash="232f5a85ee355f215db2b791d3eb5333"/><file name="mysql4-install-1.php" hash="40c5713d5158831cfa4ff927f5789972"/><file name="mysql4-upgrade-1-2.php" hash="15104d010dce29b64048819454970202"/><file name="mysql4-upgrade-10-11.php" hash="77df29e65752035772a9a69cfde3e840"/><file name="mysql4-upgrade-11-12.php" hash="979bbe257a329ce3dc5f6a89f82d0793"/><file name="mysql4-upgrade-2-3.php" hash="e384d9fd053394000a7293048079e4d3"/><file name="mysql4-upgrade-3-4.php" hash="25a6c0fe4e62f230bab357692bbb821d"/><file name="mysql4-upgrade-4-5.php" hash="f8d8c1be5d2b0498815f07249a9b1925"/><file name="mysql4-upgrade-5-6.php" hash="4db08e08cf7e97f82e1e3f76368620f0"/><file name="mysql4-upgrade-6-7.php" hash="89979b5bd55191d63486c2d1c91a25fe"/><file name="mysql4-upgrade-7-8.php" hash="334c3f05c006d92517818c65e34f4132"/><file name="mysql4-upgrade-9-10.php" hash="6ca1534360b029badf0ba2047904ea9f"/><file name="upgrade-13-14.php" hash="d16a06457516183c7bea1cb3d2d43248"/><file name="upgrade-14-15.php" hash="462aa46ea322c7368ae45029d32d0e15"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="zptheme"><dir name="layout"><file name="local.xml" hash="103bcfd7f8971e8c62b453000fab9ade"/></dir><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="36eee9dfc5927ca08aa42132750ba650"/></dir><dir name="ru_RU"><file name="translate.csv" hash="ef3d4b8ea531f9786bf1ac7154838681"/></dir></dir><dir name="template"><dir name="catalog"><dir name="product"><dir name="tab"><dir name="templates"><file name="dynamic-imaging.phtml" hash="943948a5f8868da3c9d273d3038d09a9"/><file name="radiobutton.phtml" hash="fff5ce6ab78a46b098bd8586fdafbd11"/></dir></dir></dir></dir><dir name="sales"><dir name="items"><dir name="column"><file name="name.phtml" hash="600ca19c74d54ccb9a1f809a7e62cf4e"/></dir></dir><dir name="order"><dir name="view"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="ca4857a383df503e5ca668981aa720e7"/></dir></dir><dir name="tab"><file name="info.phtml" hash="0c53a36fd7adaa3111118e76423ae1d9"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="zptheme"><dir name="template"><dir name="callouts"><file name="right_col.phtml" hash="39bc3b7a57363e6c6ec571aa9b5178f2"/></dir><dir name="catalog"><dir name="product"><dir name="view"><file name="addto.phtml" hash="a8137c12717f898bdcf2f697e860fcef"/><file name="addtocart.phtml" hash="3ae47a9d2f53de9626d095652803d12d"/><file name="media.phtml" hash="2eb7d8b00c8a8008497586d2410cc593"/></dir><file name="view.phtml" hash="51100bb10566d9b7dcbaaa1035ed99d3"/></dir></dir><dir name="checkout"><dir name="cart"><dir name="item"><file name="default.phtml" hash="6e4da8dc072dcc7315f1deef7703187d"/></dir></dir></dir><dir name="sales"><dir name="order"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="1d8b00c20064b5225d5107108b7fdeeb"/></dir></dir><file name="items.phtml" hash="a70c5c748935ee6b6c5cce224f6c0a93"/></dir></dir><dir name="wishlist"><dir name="item"><dir name="column"><file name="image.phtml" hash="22f463bd042e698061ca18f1b91c51df"/></dir></dir></dir></dir></dir><dir name="zp2steptheme"><dir name="template"><dir name="catalog"><dir name="product"><dir name="view"><file name="addto.phtml" hash="f7382ad4dadcf81867518d345b19c4ce"/><file name="addtocart.phtml" hash="0187a2fa97020c6e481d34c67373f1d1"/><file name="media.phtml" hash="81f2205b6d9e2606d63efb4dd362b1dc"/></dir><file name="view.phtml" hash="c13f3c2adc29edb47b2498a798008c00"/></dir></dir></dir></dir><dir name="zpadvancedtheme"><dir name="layout"><file name="local.xml" hash="e2c3607469970b8d9d4cc739a1490006"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="layout"><dir name="catalog"><file name="web-to-print-product.xml" hash="c608ba223a24171767c25e89ae90c757"/></dir><dir name="checkout"><file name="web-to-print-cart.xml" hash="a59de3a46bbed9a6bec5ad48b6b96873"/></dir><dir name="sales"><file name="web-to-print-order.xml" hash="df0d0d8383d904475ea9d3b6861dbaaf"/></dir><file name="web-to-print.xml" hash="132b692c1e8f740f39289aad4d65eb89"/><dir name="review"><file name="web-to-print-product.xml" hash="c76069cfe20381e7850b6fc397ab67bd"/></dir></dir><dir name="template"><dir name="web-to-print"><dir><dir name="image-edit"><file name="edit.phtml" hash="9b3996baae857506e689ba20e4f8ab9c"/></dir></dir></dir><dir name="catalog"><dir name="product"><dir name="view"><file name="web-to-print-buttons.phtml" hash="3ef671d34a0850a7485ba8200c7d28c7"/></dir></dir></dir><dir name="email"><dir name="order"><dir name="items"><dir name="order"><file name="webtoprint-default.phtml" hash="e97545a10bf772170501eca53ab95c5b"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="zptheme"><dir name="css"><file name="zp-style.css" hash="dcf53adad1e1a72d9580c9b3e10d294f"/></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="zptheme"><dir name="images"><dir name="media"><file name="get-started.png" hash="e4b8cfcccdf935d27ebc12c5c818b137"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="css"><file name="zp-image-edit.css" hash="decf8f2d7523eda51361ac7a0860b171"/><file name="zp-in-preview-edit.css" hash="a92910e4bb2ee490652cfee76777bb6f"/><file name="zp-style.css" hash="c8ec4ba353899b8f00f0ac2052b9d87e"/></dir><dir name="images"><dir name="image-edit"><file name="crop.png" hash="1932a3ef782c9725582849d50edc61ec"/><file name="delete.png" hash="cae5056aafc123b58a9d7d2f950931ae"/><file name="edit.png" hash="d46e523fb62ddf001e43844a8cad2e7f"/><file name="fit-to-field-crop-icon.png" hash="4903799be782fc6d66ad9be5398e384c"/><file name="flip_h.png" hash="1ac31304ac42e8dee88afe2c3cfd83ab"/><file name="flip_v.png" hash="2a48cc57703943dd1d3d259340a5d251"/><file name="line.png" hash="e29885cc047ef76da85c93b754bee93b"/><file name="move.png" hash="9f5a402dfee964b1bb89b269e2a9844b"/><file name="pen.png" hash="833a24ceae4d60c00d588ed7db36a3b6"/><file name="resize.png" hash="2e9e5a5008dceffaeb5d79f7bf2b6dfd"/><file name="restore.png" hash="c7730035aee2f868291bbcc82e7daef3"/><file name="rotate_l.png" hash="ae3b9fac8b2376ff20420dcc19ec2d8b"/><file name="rotate_r.png" hash="9053177817d8890bf72290320579fe38"/><file name="status-bar-sprite.png" hash="e6f5b566176ee6a53ef2e5b67b1c3055"/></dir><file name="big-spinner.gif" hash="da798def57c4b5fed4274c11df85e332"/><file name="edited-shape-background.png" hash="061eefe277c498225640d2bc8100c51b"/><file name="images-selector-sprites.png" hash="d0cec2fbb7e1fe66c928dd9067295387"/><file name="in-preview-edit-sprite.png" hash="1f695b3d738973910c1b6a074c9e33e7"/><file name="spinner.gif" hash="541f417381a25b27a0a3e8c048bc652d"/><file name="transparent-background.gif" hash="bbfd7b49dc892a72a8a87d8d1ae3e4ee"/><file name="page-size-icon.png" hash="113320bc626ce10787fd2d7d605973d9"/><file name="zp-image-edit-sprite.png" hash="905bbe3492ea780a73abe207161421a4"/><dir name="web-to-print"><file name="loading-spinner.gif" hash="4bba752c92dcc06ba42ebcf4f95617ca"/><file name="preview-overlay-background.png" hash="97c0267aa2b85879c7c21d89e7a04e47"/><file name="zp-button-background.png" hash="263db20821d062f6a76b4b05d2218efa"/><file name="zp-button-sprites.png" hash="f7a420e549146f606268bf166d044154"/></dir></dir><dir name="js"><file name="zp-image-edit.js" hash="cb70e1fee6e2e2085d88c164cfeca8eb"/><file name="zp-in-preview-edit.js" hash="78cc62b9cd8543484cc542c26f1eba77"/><file name="zp-personalization-form.js" hash="82c36351a08d68af72dc51584fb436ea"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="bg_BG"><file name="ZetaPrints_WebToPrint.csv" hash="944fa2d2777098aaf2a3193194f1fcfd"/></dir><dir name="en_US"><file name="ZetaPrints_WebToPrint.csv" hash="003d60eb82817b8313a8baf390d3ca78"/></dir><dir name="es_ES"><file name="ZetaPrints_WebToPrint.csv" hash="432806dca0c769690e6be87778da299c"/></dir><dir name="ru_RU"><file name="ZetaPrints_WebToPrint.csv" hash="abc4592eac42e65bba71001dff5669d3"/></dir><dir name="de_DE"><file name="ZetaPrints_WebToPrint.csv" hash="d1c6f6d8d700345172ad1d3c8ca527f2"/></dir><dir name="mk_MK"><file name="ZetaPrints_WebToPrint.csv" hash="35cd58dde2b3a4d575b5c7d8439db48e"/></dir><dir name="nl_NL"><file name="ZetaPrints_WebToPrint.csv" hash="c1ad22876a1fa6b6eb70b69f20b79822"/></dir><dir name="tr_TR"><file name="ZetaPrints_WebToPrint.csv" hash="37e4d625f2481ba781c39027b3790010"/></dir></target><target name="mageweb"><dir name="js"><dir name="colorpicker"><file name="colorpicker.css" hash="d903ee19004f9cb287d38028836148b9"/><file name="colorpicker.js" hash="65cd976b4d3d7bf7073ea10773f5c574"/><dir name="images"><file name="blank.gif" hash="56398e76be6355ad5999b262208a17c9"/><file name="colorpicker_background.png" hash="a79f1a2a81bfe3ed1c2ca4c41b8e1fbf"/><file name="colorpicker_hex.png" hash="16d6870c36e379c06fb26ebd2e16bf44"/><file name="colorpicker_hsb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_hsb_h.png" hash="d47409a203bedc76b26dc60b71a69f6b"/><file name="colorpicker_hsb_s.png" hash="5ff5e43ab6b7b41b6123bfab692a9b19"/><file name="colorpicker_indic.gif" hash="f485d07540a89502e36dc1a55cec05d0"/><file name="colorpicker_overlay.png" hash="c7a33805ffda0d32bd2a9904c8b02750"/><file name="colorpicker_rgb_b.png" hash="2be4e81b4a5c98674abe6fc60b447e9a"/><file name="colorpicker_rgb_g.png" hash="dc17f953a6febbe174e92b54690586c3"/><file name="colorpicker_rgb_r.png" hash="87eeb205d093b713b68a341771f4ee27"/><file name="colorpicker_select.gif" hash="cec464162af0cce10348e7bb7701ef86"/><file name="colorpicker_submit.png" hash="12d1746e6b52e007f1b78d772d9248ba"/><file name="custom_background.png" hash="06c91f7ae1561ccd8f1c79119529600d"/><file name="custom_hex.png" hash="e27aaa92b15d9392d909f8b94e797524"/><file name="custom_hsb_b.png" hash="b45588ca2fe9ba46673862300fcd3083"/><file name="custom_hsb_h.png" hash="4a1afa5636421aae4c44471d2273496d"/><file name="custom_hsb_s.png" hash="83aa97407fb76615a7db5ed721681148"/><file name="custom_indic.gif" hash="04660eb352eb259581a36a0fe8da2d4d"/><file name="custom_rgb_b.png" hash="f6e50cd567bd3059742d45ab224a413b"/><file name="custom_rgb_g.png" hash="b1e286e06692b3640862a3d07f636a80"/><file name="custom_rgb_r.png" hash="8ae4b3ef109ee66ec1022632470ddd0f"/><file name="custom_submit.png" hash="35423f0f2538e507dec193b52f8d0327"/><file name="select.png" hash="7b086953a8c62d2685a65644979d5d04"/><file name="select2.png" hash="c8d194d92dbad98615b2a9140b34ab48"/><file name="slider.png" hash="3a50b8078dea50b9811603a85ecef836"/></dir></dir><dir name="fancybox"><file name="fancybox-resizing.css" hash="873d5f5c826b73e6b75844ed4062744f"/><file name="fancybox-resizing.js" hash="e37b00db53132217e965427058dec7eb"/><file name="fancybox-save-image.css" hash="9d8be052aaa7cc0971dbd514a515d509"/><file name="fancybox-save-image.js" hash="e89e092715bc3df2042259398d55fcc5"/><file name="fancybox-select-image.css" hash="aed8d9d2efa9c3d99b907ed1370766c3"/><file name="fancybox-select-image.js" hash="67bfb4f019e9a87ec614941fae20d393"/><file name="fancybox-update-preview.css" hash="7a6965d53545cf4bdf27aed5b56573bc"/><file name="fancybox-update-preview.js" hash="63d89cf88fa1fd860f5dcb773537529f"/><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="943455e2f07f74204ad982304a4cbb27"/><file name="zp-update-preview-button-rotating-arrows.gif" hash="717e17df98dd44ca7745e81fd4373976"/><file name="zp-update-preview-button-sprite.png" hash="c940eeaab267ee1c9b7cfd79ab57e458"/><file name="zp-update-preview-button-x.png" hash="286f9e5aa39c7e4ad33a27890c457ab4"/></dir><file name="jquery-fancybox.css" hash="ac26b56d28d1feacf7030a142ad73fff"/><file name="jquery-fancybox.js" hash="c7ab799447eab5a647aca074556f8ac8"/></dir><dir name="jquery"><file name="jquery-min.js" hash="48080a4201448f15d8e72f6786a1e7e7"/><file name="jquery-qtip-min.js" hash="1ba662a8876762876602e10882d12d2c"/><file name="jquery-ui-custom-min.js" hash="a6ebf059fed4c48f796f55acfdbf1436"/></dir><dir name="lib"><file name="ajaxupload.js" hash="ad9135b2a5aa39fefffe257e5fb8f11c"/></dir><dir name="powercrop"><dir name="images"><file name="cursor-move.png" hash="350c09c97b9e1a2035112a140636b0a4"/></dir><file name="jquery-powercrop.css" hash="fb2e83acc6d3a46a408db21398900948"/><file name="jquery-powercrop.js" hash="f9943f0679d963aa7188ba4e271df8b6"/></dir><dir name="zetaprints"><dir name="images"><dir name="zp-combobox-field"><file name="sprites.gif" hash="9c4e000f0cc9fcecaca754f4a95deedf"/></dir><dir name="zp-text-field-editor"><file name="sprites.png" hash="5963823e045d8fbca649a783b9979517"/></dir><dir name="zp-text-field-resizer"><file name="left-handle.gif" hash="14e1072668649893740c5434f8b35a16"/><file name="right-handle.gif" hash="fb7954ef560ab5db4addd015739008fc"/></dir></dir><file name="zp-combobox-field.css" hash="100156d71b72b536dbd7822dfd985f42"/><file name="zp-combobox-field.js" hash="222f5d3752104ba8b14d641b8ae8a3b6"/><file name="zp-dataset.css" hash="37b7adf2ac746ddbe53913bb0b34ba67"/><file name="zp-dataset.js" hash="d658a5c2494fc9848474699b93219960"/><file name="zp-metadata.js" hash="d0749f2c3ede0443951438627d7b5f97"/><file name="zp-text-field-editor.css" hash="fc7e89e26fcc4bccd4c37060df3debab"/><file name="zp-text-field-editor.js" hash="50c23e8ecf122a4d5ccffadfa7c2ddf1"/><file name="zp-text-field-resizer.js" hash="bec48882f2e5ad0429067409e526cfdb"/></dir></dir></target><target name="magelib"><dir name="ZetaPrints"><file name="Api.php" hash="9b84afe36689561daaf4ec82df1c62e4"/><file name="mage-logging.php" hash="cccf6f2896d6bdc5eaa71d74fa1cdf36"/><dir name="xslt"><file name="common-templates.xslt" hash="98a35be3b523723c2367ead7d045f01f"/><file name="image-fields.xslt" hash="2805edeb2950fdba13ebce13f865f01d"/><file name="page-size-table.xslt" hash="fdb521ec348fd82105fc66eb7b9db952"/><file name="page-tabs.xslt" hash="e341e7a708af01b5ac0b7792b0067e2b"/><file name="text-fields.xslt" hash="a6f8f17499c746e9a85cf9c58e40cbe3"/></dir><file name="zetaprints-api.php" hash="88858ea5e789907cf0a2f09b3fd6fb68"/></dir></target></contents>
|
38 |
<compatible/>
|
39 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><extension><name>curl</name><min/><max/></extension><extension><name>xsl</name><min/><max/></extension></required></dependencies>
|
40 |
</package>
|
skin/frontend/base/default/css/zp-style.css
CHANGED
@@ -486,6 +486,50 @@ div.selector-content div.tabs-wrapper div.upload img.ajax-loader {
|
|
486 |
margin: 2px 0px 0px 0px;
|
487 |
}
|
488 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
a.all-order-previews {
|
490 |
float: right;
|
491 |
margin-top: -2em;
|
@@ -575,18 +619,31 @@ span.zetaprints-share-link.show input {
|
|
575 |
}
|
576 |
|
577 |
/* CSS rules for different notices */
|
|
|
|
|
|
|
|
|
578 |
.zetaprints-notice.hidden {
|
579 |
display: none;
|
580 |
}
|
581 |
|
582 |
/* Warning for fake Add to cart button */
|
583 |
.zetaprints-notice.to-update-preview {
|
584 |
-
color: #fd0039;
|
585 |
clear: both;
|
586 |
float: right;
|
587 |
*float: left;
|
588 |
}
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
/* Fancybox tweaks */
|
591 |
|
592 |
/* Move right arrow area to the right */
|
486 |
margin: 2px 0px 0px 0px;
|
487 |
}
|
488 |
|
489 |
+
.zetaprints-palette .selector-content {
|
490 |
+
padding: 3px 4px;
|
491 |
+
border: 1px solid #b6b6b6;
|
492 |
+
border-top: none;
|
493 |
+
overflow-x: auto;
|
494 |
+
overflow-y: hidden;
|
495 |
+
height: 62px;
|
496 |
+
white-space: nowrap;
|
497 |
+
}
|
498 |
+
|
499 |
+
.zp-palette-colour {
|
500 |
+
display: inline-block;
|
501 |
+
width: 47px;
|
502 |
+
height: 47px;
|
503 |
+
position: relative;
|
504 |
+
}
|
505 |
+
|
506 |
+
.zp-palette-colour input {
|
507 |
+
position: absolute;
|
508 |
+
left: 2px;
|
509 |
+
top: 2px;
|
510 |
+
}
|
511 |
+
|
512 |
+
.zp-palette-fill,
|
513 |
+
.zp-palette-outline {
|
514 |
+
width: 50%;
|
515 |
+
height: 100%;
|
516 |
+
float: left;
|
517 |
+
}
|
518 |
+
|
519 |
+
.zetaprints-palette .colour-picker {
|
520 |
+
white-space: normal;
|
521 |
+
height: 49px;
|
522 |
+
overflow: hidden;
|
523 |
+
padding: 3px 10px 3px 4px;
|
524 |
+
}
|
525 |
+
|
526 |
+
.colour-picker .zp-palette-colour {
|
527 |
+
display: block;
|
528 |
+
float: left;
|
529 |
+
border: 1px solid #b6b6b6;
|
530 |
+
margin: 0 10px 0 0;
|
531 |
+
}
|
532 |
+
|
533 |
a.all-order-previews {
|
534 |
float: right;
|
535 |
margin-top: -2em;
|
619 |
}
|
620 |
|
621 |
/* CSS rules for different notices */
|
622 |
+
.zetaprints-notice {
|
623 |
+
color: #fd0039;
|
624 |
+
}
|
625 |
+
|
626 |
.zetaprints-notice.hidden {
|
627 |
display: none;
|
628 |
}
|
629 |
|
630 |
/* Warning for fake Add to cart button */
|
631 |
.zetaprints-notice.to-update-preview {
|
|
|
632 |
clear: both;
|
633 |
float: right;
|
634 |
*float: left;
|
635 |
}
|
636 |
|
637 |
+
/* Warning that previews need to be updated to include latest changes */
|
638 |
+
#zp-warning-user-data-changed {
|
639 |
+
display: none;
|
640 |
+
margin: 10px 0;
|
641 |
+
}
|
642 |
+
|
643 |
+
.zp-user-data-changed #zp-warning-user-data-changed {
|
644 |
+
display: block;
|
645 |
+
}
|
646 |
+
|
647 |
/* Fancybox tweaks */
|
648 |
|
649 |
/* Move right arrow area to the right */
|
skin/frontend/base/default/js/zp-personalization-form.js
CHANGED
@@ -211,6 +211,69 @@ function personalization_form ($) {
|
|
211 |
return false;
|
212 |
}
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
//Set current template page to the first (1-based index)
|
215 |
this.current_page = 1;
|
216 |
|
@@ -297,7 +360,7 @@ function personalization_form ($) {
|
|
297 |
//If update_first_preview_on_load parameter was set
|
298 |
if (this.update_first_preview_on_load)
|
299 |
//Update preview for the first page
|
300 |
-
update_preview({ data: { zp: this } }, zp.preserve_fields);
|
301 |
|
302 |
//Create array for preview images sharing links
|
303 |
if (window.place_preview_image_sharing_link)
|
@@ -342,13 +405,9 @@ function personalization_form ($) {
|
|
342 |
else
|
343 |
$next_page_button.hide();
|
344 |
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
var page = zp
|
350 |
-
.template_details
|
351 |
-
.pages[event.data.page_number];
|
352 |
|
353 |
if (page.preview_is_scaled === undefined) {
|
354 |
var $_img = $(this)
|
@@ -367,21 +426,26 @@ function personalization_form ($) {
|
|
367 |
//If no image zoomer on the page and image is for the first page
|
368 |
//and first page was opened
|
369 |
if (!has_image_zoomer) {
|
370 |
-
if (
|
371 |
//then show preview for the first page
|
372 |
$('#preview-image-page-1').removeClass('zp-hidden');
|
373 |
}
|
374 |
|
375 |
-
var current_page = zp
|
376 |
-
.template_details
|
377 |
-
.pages[zp.current_page]
|
378 |
|
379 |
-
if (
|
380 |
-
&& !current_page.preview_is_scaled)
|
381 |
$enlarge_button.addClass('zp-hidden');
|
382 |
}
|
383 |
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
});
|
386 |
}
|
387 |
|
@@ -447,6 +511,12 @@ function personalization_form ($) {
|
|
447 |
export_previews_to_string(this.template_details) + '" />')
|
448 |
.appendTo($('#product_addtocart_form'));
|
449 |
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
if (is_all_pages_updated(this.template_details)
|
451 |
|| (has_updated_pages(this.template_details)
|
452 |
&& this.template_details.missed_pages == '')
|
@@ -576,6 +646,11 @@ function personalization_form ($) {
|
|
576 |
else
|
577 |
$('#zp-dataset-button').addClass('hidden');
|
578 |
|
|
|
|
|
|
|
|
|
|
|
579 |
if (can_show_next_page_button_for_page(zp.current_page, zp))
|
580 |
$next_page_button.show();
|
581 |
else
|
@@ -585,6 +660,22 @@ function personalization_form ($) {
|
|
585 |
if (window.zp_dataset_initialise)
|
586 |
zp_dataset_initialise(zp);
|
587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
function update_preview_sharing_link_for_page (page_number, links, filename) {
|
589 |
links[page_number] = preview_image_sharing_link_template + filename;
|
590 |
}
|
@@ -604,41 +695,31 @@ function personalization_form ($) {
|
|
604 |
}
|
605 |
|
606 |
function prepare_post_data_for_php (data) {
|
607 |
-
var
|
608 |
-
|
609 |
-
data = data.split('&');
|
610 |
-
for (var i = 0; i < data.length; i++) {
|
611 |
-
var token = data[i].split('=');
|
612 |
-
_data += '&' + prepare_string_for_php(token[0]) + '=' + token[1];
|
613 |
-
}
|
614 |
|
615 |
-
return
|
616 |
}
|
617 |
|
618 |
-
function prepare_metadata_from_page (page) {
|
619 |
-
var metadata
|
|
|
620 |
|
621 |
-
for (name in page.images)
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
metadata += '&zetaprints-*#' + prepare_string_for_php(name) + '='
|
628 |
-
+ field_metadata + '&';
|
629 |
-
}
|
630 |
-
|
631 |
-
for (var name in page.fields) {
|
632 |
-
var field_metadata = zp_convert_metadata_to_string(page.fields[name]);
|
633 |
-
|
634 |
-
if (!field_metadata)
|
635 |
-
continue;
|
636 |
|
637 |
-
|
638 |
-
|
639 |
-
|
|
|
|
|
|
|
640 |
|
641 |
-
return
|
642 |
}
|
643 |
|
644 |
function serialize_fields_for_page (page_number) {
|
@@ -646,14 +727,26 @@ function personalization_form ($) {
|
|
646 |
+ page_number)
|
647 |
.find('.zetaprints-field')
|
648 |
.filter(':text, textarea, :checked, select, [type="hidden"]')
|
649 |
-
.
|
650 |
}
|
651 |
|
652 |
var _number_of_failed_updates = 0;
|
653 |
|
654 |
-
function update_preview (event, preserve_fields) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
//Disable click action
|
656 |
-
$
|
657 |
|
658 |
show_activity();
|
659 |
|
@@ -664,19 +757,6 @@ function personalization_form ($) {
|
|
664 |
$(this).text_field_editor('hide');
|
665 |
});
|
666 |
|
667 |
-
//Convert preserve_field parameter to query parameter
|
668 |
-
var preserve_fields = typeof(preserve_fields) != 'undefined'
|
669 |
-
&& preserve_fields ? '&zetaprints-Preserve=yes' : preserve_fields = '';
|
670 |
-
|
671 |
-
var zp = event.data.zp;
|
672 |
-
|
673 |
-
//!!! Workaround
|
674 |
-
//Remember page number
|
675 |
-
var current_page = zp.current_page;
|
676 |
-
|
677 |
-
var metadata =
|
678 |
-
prepare_metadata_from_page(zp.template_details.pages[zp.current_page]);
|
679 |
-
|
680 |
function update_preview_error () {
|
681 |
if (++_number_of_failed_updates >= 2){
|
682 |
alert(cannot_update_preview_second_time);
|
@@ -689,16 +769,35 @@ function personalization_form ($) {
|
|
689 |
|
690 |
$update_preview_button.click({zp: zp}, update_preview);
|
691 |
|
|
|
|
|
692 |
hide_activity();
|
693 |
}
|
694 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
695 |
$.ajax({
|
696 |
url: zp.url.preview,
|
697 |
type: 'POST',
|
698 |
dataType: 'json',
|
699 |
-
data:
|
700 |
-
+ '&zetaprints-TemplateID=' + zp.template_details.guid
|
701 |
-
+ '&zetaprints-From=' + current_page + preserve_fields + metadata,
|
702 |
|
703 |
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
704 |
update_preview_error();
|
@@ -792,6 +891,8 @@ function personalization_form ($) {
|
|
792 |
set_preview_sharing_link_for_page(current_page,
|
793 |
zp.preview_sharing_links);
|
794 |
|
|
|
|
|
795 |
if (is_all_pages_updated(zp.template_details)
|
796 |
|| zp.template_details.missed_pages == 'include'
|
797 |
|| zp.template_details.missed_pages == '') {
|
@@ -802,7 +903,18 @@ function personalization_form ($) {
|
|
802 |
$('div.zetaprints-notice.to-update-preview').addClass('zp-hidden');
|
803 |
remove_fake_add_to_cart_button($add_to_cart_button);
|
804 |
$('div.save-order span').css('display', 'none');
|
805 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
}
|
807 |
}
|
808 |
});
|
@@ -930,9 +1042,28 @@ function personalization_form ($) {
|
|
930 |
$selector = $content.data('in-preview-edit').parent;
|
931 |
}
|
932 |
|
933 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
|
935 |
-
if (
|
936 |
$selector.removeClass('no-value');
|
937 |
|
938 |
$('#fancybox-outer').addClass('modified');
|
@@ -941,8 +1072,7 @@ function personalization_form ($) {
|
|
941 |
//If ZetaPrints advanced theme is enabled then...
|
942 |
if (window.mark_shape_as_edited)
|
943 |
//... mark shape as edited then image is seleсted
|
944 |
-
mark_shape_as_edited(
|
945 |
-
.shapes[$(event.target).attr('name').substring(12)]);
|
946 |
} else {
|
947 |
$selector.addClass('no-value');
|
948 |
|
@@ -951,8 +1081,7 @@ function personalization_form ($) {
|
|
951 |
//If ZetaPrints advanced theme is enabled then...
|
952 |
if (window.unmark_shape_as_edited)
|
953 |
//or unmark shape then Leave blank is selected
|
954 |
-
unmark_shape_as_edited(
|
955 |
-
.shapes[$(event.target).attr('name').substring(12)]);
|
956 |
}
|
957 |
}
|
958 |
|
@@ -962,7 +1091,7 @@ function personalization_form ($) {
|
|
962 |
}
|
963 |
|
964 |
zp.show_colorpicker = function ($panel) {
|
965 |
-
if ($panel.hasClass('color-picker')
|
966 |
&& !$panel.find('input').prop('checked'))
|
967 |
$panel.find('.color-sample').click();
|
968 |
}
|
@@ -1039,7 +1168,9 @@ function personalization_form ($) {
|
|
1039 |
if ($field.hasClass('minimized')) {
|
1040 |
$field.removeClass('minimized');
|
1041 |
|
1042 |
-
$panel = $
|
|
|
|
|
1043 |
|
1044 |
zp.show_colorpicker($panel);
|
1045 |
scroll_strip($panel)
|
@@ -1084,13 +1215,15 @@ function personalization_form ($) {
|
|
1084 |
return false;
|
1085 |
});
|
1086 |
|
1087 |
-
var $colour_picker_panel = $panels
|
|
|
|
|
1088 |
|
1089 |
if (!$colour_picker_panel.length)
|
1090 |
return;
|
1091 |
|
1092 |
var $colour_radio_button = $colour_picker_panel
|
1093 |
-
.
|
1094 |
|
1095 |
var $colour_sample = $colour_picker_panel.children('.color-sample')
|
1096 |
|
@@ -1321,15 +1454,56 @@ function personalization_form ($) {
|
|
1321 |
return false;
|
1322 |
});
|
1323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1324 |
function text_fields_change_handle (event) {
|
1325 |
-
var
|
1326 |
|
1327 |
-
|
|
|
|
|
1328 |
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1333 |
|
1334 |
if (state) {
|
1335 |
$('#fancybox-outer').addClass('modified');
|
@@ -1341,41 +1515,14 @@ function personalization_form ($) {
|
|
1341 |
&& window.mark_shape_as_edited
|
1342 |
&& window.unmark_shape_as_edited) {
|
1343 |
|
1344 |
-
var shape = get_shape_by_name(
|
1345 |
-
zp.template_details.pages[zp.current_page].shapes);
|
1346 |
|
1347 |
-
if (
|
1348 |
-
|
1349 |
-
|
1350 |
-
if (state)
|
1351 |
-
mark_shape_as_edited(shape);
|
1352 |
-
else {
|
1353 |
-
var names = shape.name.split('; ');
|
1354 |
-
|
1355 |
-
if (names.length != 1) {
|
1356 |
-
$text_fields = $('#input-fields-page-' + zp.current_page)
|
1357 |
-
.find('input, textarea, select')
|
1358 |
-
.filter('textarea, select, :text, :checked');
|
1359 |
-
|
1360 |
-
$image_fields = $('#stock-images-page-' + zp.current_page)
|
1361 |
-
.find('input')
|
1362 |
-
.filter(':checked');
|
1363 |
-
|
1364 |
-
for (var i = 0; i < names.length; i++) {
|
1365 |
-
var name = names[i];
|
1366 |
-
|
1367 |
-
if ($text_fields.filter('[name="zetaprints-_' + name +'"]').val() ||
|
1368 |
-
$image_fields.filter('[name="zetaprints-#' + name +'"]').length)
|
1369 |
-
return;
|
1370 |
-
}
|
1371 |
-
}
|
1372 |
-
|
1373 |
-
unmark_shape_as_edited(shape);
|
1374 |
-
}
|
1375 |
}
|
1376 |
|
1377 |
if (window.zp_dataset_update_state)
|
1378 |
-
zp_dataset_update_state(zp,
|
1379 |
}
|
1380 |
|
1381 |
function readonly_fields_click_handle (event) {
|
@@ -1507,6 +1654,32 @@ function personalization_form ($) {
|
|
1507 |
zp_clear_metadata(field);
|
1508 |
});
|
1509 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1510 |
if (this.has_shapes && window.add_in_preview_edit_handlers)
|
1511 |
add_in_preview_edit_handlers();
|
1512 |
}
|
211 |
return false;
|
212 |
}
|
213 |
|
214 |
+
function store_user_data (page) {
|
215 |
+
var name,
|
216 |
+
fields = page.fields,
|
217 |
+
images = page.images;
|
218 |
+
|
219 |
+
for (name in fields)
|
220 |
+
if (fields.hasOwnProperty(name)) {
|
221 |
+
if (!fields[name].value)
|
222 |
+
fields[name].value = '';
|
223 |
+
|
224 |
+
fields[name].previous_value = fields[name].value;
|
225 |
+
}
|
226 |
+
|
227 |
+
for (name in images)
|
228 |
+
if (images.hasOwnProperty(name)) {
|
229 |
+
if (!images[name].value)
|
230 |
+
images[name].value = '#';
|
231 |
+
|
232 |
+
images[name].previous_value = images[name].value;
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
function is_user_data_changed (page) {
|
237 |
+
var name,
|
238 |
+
fields = page.fields,
|
239 |
+
images = page.images;
|
240 |
+
|
241 |
+
for (name in fields)
|
242 |
+
if (fields.hasOwnProperty(name))
|
243 |
+
if (typeof fields[name].previous_value != 'undefined')
|
244 |
+
if (fields[name].previous_value != fields[name].value)
|
245 |
+
return true;
|
246 |
+
|
247 |
+
for (name in images)
|
248 |
+
if (images.hasOwnProperty(name))
|
249 |
+
if (typeof images[name].previous_value != 'undefined')
|
250 |
+
if (images[name].previous_value != images[name].value)
|
251 |
+
return true;
|
252 |
+
|
253 |
+
return false;
|
254 |
+
}
|
255 |
+
|
256 |
+
function page_get_changed (pages) {
|
257 |
+
var n,
|
258 |
+
changed_pages = [];
|
259 |
+
|
260 |
+
for (n in pages)
|
261 |
+
if (pages.hasOwnProperty(n))
|
262 |
+
if (is_user_data_changed(pages[n]))
|
263 |
+
changed_pages[changed_pages.length] = n;
|
264 |
+
|
265 |
+
return changed_pages;
|
266 |
+
}
|
267 |
+
|
268 |
+
function page_has_updating (pages) {
|
269 |
+
for (var n in pages)
|
270 |
+
if (pages.hasOwnProperty(n))
|
271 |
+
if (typeof pages[n].is_updating != 'undefined' && pages[n].is_updating)
|
272 |
+
return true;
|
273 |
+
|
274 |
+
return false;
|
275 |
+
}
|
276 |
+
|
277 |
//Set current template page to the first (1-based index)
|
278 |
this.current_page = 1;
|
279 |
|
360 |
//If update_first_preview_on_load parameter was set
|
361 |
if (this.update_first_preview_on_load)
|
362 |
//Update preview for the first page
|
363 |
+
update_preview({ data: { zp: this } }, undefined, zp.preserve_fields);
|
364 |
|
365 |
//Create array for preview images sharing links
|
366 |
if (window.place_preview_image_sharing_link)
|
405 |
else
|
406 |
$next_page_button.hide();
|
407 |
|
408 |
+
var pages = zp.template_details.pages,
|
409 |
+
page_number = event.data.page_number,
|
410 |
+
page = pages[page_number];
|
|
|
|
|
|
|
|
|
411 |
|
412 |
if (page.preview_is_scaled === undefined) {
|
413 |
var $_img = $(this)
|
426 |
//If no image zoomer on the page and image is for the first page
|
427 |
//and first page was opened
|
428 |
if (!has_image_zoomer) {
|
429 |
+
if (page_number == 1 && zp.current_page == 1) {
|
430 |
//then show preview for the first page
|
431 |
$('#preview-image-page-1').removeClass('zp-hidden');
|
432 |
}
|
433 |
|
434 |
+
var current_page = pages[zp.current_page]
|
|
|
|
|
435 |
|
436 |
+
if (page_number == zp.current_page && !current_page.preview_is_scaled)
|
|
|
437 |
$enlarge_button.addClass('zp-hidden');
|
438 |
}
|
439 |
|
440 |
+
page.is_updating = false;
|
441 |
+
|
442 |
+
if (!page_has_updating(pages)) {
|
443 |
+
//Enable Update preview action
|
444 |
+
$update_preview_button.unbind('click');
|
445 |
+
$update_preview_button.click({zp: zp}, update_preview);
|
446 |
+
|
447 |
+
hide_activity();
|
448 |
+
}
|
449 |
});
|
450 |
}
|
451 |
|
511 |
export_previews_to_string(this.template_details) + '" />')
|
512 |
.appendTo($('#product_addtocart_form'));
|
513 |
|
514 |
+
$add_to_cart_button.parent().before(
|
515 |
+
'<div id="zp-warning-user-data-changed" class="zetaprints-notice">' +
|
516 |
+
window.warning_user_data_changed +
|
517 |
+
'</div>'
|
518 |
+
);
|
519 |
+
|
520 |
if (is_all_pages_updated(this.template_details)
|
521 |
|| (has_updated_pages(this.template_details)
|
522 |
&& this.template_details.missed_pages == '')
|
646 |
else
|
647 |
$('#zp-dataset-button').addClass('hidden');
|
648 |
|
649 |
+
if (is_user_data_changed(page))
|
650 |
+
$product_form.addClass('zp-user-data-changed');
|
651 |
+
else
|
652 |
+
$product_form.removeClass('zp-user-data-changed');
|
653 |
+
|
654 |
if (can_show_next_page_button_for_page(zp.current_page, zp))
|
655 |
$next_page_button.show();
|
656 |
else
|
660 |
if (window.zp_dataset_initialise)
|
661 |
zp_dataset_initialise(zp);
|
662 |
|
663 |
+
if (typeof window.productAddToCartForm == 'object')
|
664 |
+
if (typeof window.productAddToCartForm.submit == 'function') {
|
665 |
+
var func = window.productAddToCartForm.submit;
|
666 |
+
|
667 |
+
window.productAddToCartForm.submit = function (button, url) {
|
668 |
+
var text = window.notice_update_preview_after_data_changed,
|
669 |
+
pages = zp.template_details.pages,
|
670 |
+
changed_pages = page_get_changed(pages);
|
671 |
+
|
672 |
+
if (changed_pages.length > 0 && confirm(text))
|
673 |
+
return update_preview({ data: { zp: zp } }, changed_pages);
|
674 |
+
|
675 |
+
func(button, url);
|
676 |
+
};
|
677 |
+
}
|
678 |
+
|
679 |
function update_preview_sharing_link_for_page (page_number, links, filename) {
|
680 |
links[page_number] = preview_image_sharing_link_template + filename;
|
681 |
}
|
695 |
}
|
696 |
|
697 |
function prepare_post_data_for_php (data) {
|
698 |
+
for (var i = 0, l = data.length; i < l; i++)
|
699 |
+
data[i].name = prepare_string_for_php(data[i].name);
|
|
|
|
|
|
|
|
|
|
|
700 |
|
701 |
+
return data;
|
702 |
}
|
703 |
|
704 |
+
function prepare_metadata_from_page (page, data) {
|
705 |
+
var metadata,
|
706 |
+
l = data.length;
|
707 |
|
708 |
+
for (var name in page.images)
|
709 |
+
if (metadata = zp_convert_metadata_to_string(page.images[name]))
|
710 |
+
data[l++] = {
|
711 |
+
name: 'zetaprints-*#' + prepare_string_for_php(name),
|
712 |
+
value: metadata
|
713 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
714 |
|
715 |
+
for (var name in page.fields)
|
716 |
+
if (metadata = zp_convert_metadata_to_string(page.fields[name]))
|
717 |
+
data[l++] = {
|
718 |
+
name: 'zetaprints-*_' + prepare_string_for_php(name),
|
719 |
+
value: metadata
|
720 |
+
};
|
721 |
|
722 |
+
return data;
|
723 |
}
|
724 |
|
725 |
function serialize_fields_for_page (page_number) {
|
727 |
+ page_number)
|
728 |
.find('.zetaprints-field')
|
729 |
.filter(':text, textarea, :checked, select, [type="hidden"]')
|
730 |
+
.serializeArray();
|
731 |
}
|
732 |
|
733 |
var _number_of_failed_updates = 0;
|
734 |
|
735 |
+
function update_preview (event, update_pages, preserve_fields) {
|
736 |
+
var zp = event.data.zp,
|
737 |
+
current_page;
|
738 |
+
|
739 |
+
//!!!TODO: workaround
|
740 |
+
//Remember page number
|
741 |
+
current_page = typeof update_pages == 'undefined'
|
742 |
+
? zp.current_page
|
743 |
+
: update_pages.shift();
|
744 |
+
|
745 |
+
if (typeof current_page == 'undefined')
|
746 |
+
return;
|
747 |
+
|
748 |
//Disable click action
|
749 |
+
$update_preview_button.unbind('click');;
|
750 |
|
751 |
show_activity();
|
752 |
|
757 |
$(this).text_field_editor('hide');
|
758 |
});
|
759 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
function update_preview_error () {
|
761 |
if (++_number_of_failed_updates >= 2){
|
762 |
alert(cannot_update_preview_second_time);
|
769 |
|
770 |
$update_preview_button.click({zp: zp}, update_preview);
|
771 |
|
772 |
+
page_.is_updating = false;
|
773 |
+
|
774 |
hide_activity();
|
775 |
}
|
776 |
|
777 |
+
//!!!TODO: Variable name should be fixed
|
778 |
+
var page_ = zp.template_details.pages[current_page],
|
779 |
+
data = prepare_metadata_from_page(
|
780 |
+
page_,
|
781 |
+
prepare_post_data_for_php(serialize_fields_for_page(current_page))
|
782 |
+
);
|
783 |
+
|
784 |
+
page_.is_updating = true;
|
785 |
+
|
786 |
+
data[data.length] = {
|
787 |
+
name: 'zetaprints-TemplateID',
|
788 |
+
value: zp.template_details.guid
|
789 |
+
};
|
790 |
+
|
791 |
+
data[data.length] = { name: 'zetaprints-From', value: current_page };
|
792 |
+
|
793 |
+
if (preserve_fields)
|
794 |
+
data[data.length] = { name: 'zetaprints-Preserve', value: 'yes'};
|
795 |
+
|
796 |
$.ajax({
|
797 |
url: zp.url.preview,
|
798 |
type: 'POST',
|
799 |
dataType: 'json',
|
800 |
+
data: $.param(data),
|
|
|
|
|
801 |
|
802 |
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
803 |
update_preview_error();
|
891 |
set_preview_sharing_link_for_page(current_page,
|
892 |
zp.preview_sharing_links);
|
893 |
|
894 |
+
$product_form.removeClass('zp-user-data-changed');
|
895 |
+
|
896 |
if (is_all_pages_updated(zp.template_details)
|
897 |
|| zp.template_details.missed_pages == 'include'
|
898 |
|| zp.template_details.missed_pages == '') {
|
903 |
$('div.zetaprints-notice.to-update-preview').addClass('zp-hidden');
|
904 |
remove_fake_add_to_cart_button($add_to_cart_button);
|
905 |
$('div.save-order span').css('display', 'none');
|
906 |
+
|
907 |
+
var n,
|
908 |
+
pages = zp.template_details.pages;
|
909 |
+
|
910 |
+
for (n in pages)
|
911 |
+
if (pages.hasOwnProperty(n))
|
912 |
+
store_user_data(pages[n]);
|
913 |
+
} else
|
914 |
+
store_user_data(page_);
|
915 |
+
|
916 |
+
if (typeof update_pages != 'undefined' && update_pages.length > 0)
|
917 |
+
update_preview(event, update_pages, preserve_fields);
|
918 |
}
|
919 |
}
|
920 |
});
|
1042 |
$selector = $content.data('in-preview-edit').parent;
|
1043 |
}
|
1044 |
|
1045 |
+
var $this = $(event.target),
|
1046 |
+
|
1047 |
+
name = $this.attr('name').substring(12),
|
1048 |
+
value = $this.val(),
|
1049 |
+
has_value = !!value.length,
|
1050 |
+
|
1051 |
+
zp = event.data.zp,
|
1052 |
+
page = zp.template_details.pages[zp.current_page],
|
1053 |
+
image = page.images[name];
|
1054 |
+
|
1055 |
+
if (image) {
|
1056 |
+
image.value = value;
|
1057 |
+
|
1058 |
+
if (typeof image.previous_value != 'undefined') {
|
1059 |
+
if (image.previous_value != value)
|
1060 |
+
$product_form.addClass('zp-user-data-changed');
|
1061 |
+
else
|
1062 |
+
$product_form.removeClass('zp-user-data-changed');
|
1063 |
+
}
|
1064 |
+
}
|
1065 |
|
1066 |
+
if (has_value) {
|
1067 |
$selector.removeClass('no-value');
|
1068 |
|
1069 |
$('#fancybox-outer').addClass('modified');
|
1072 |
//If ZetaPrints advanced theme is enabled then...
|
1073 |
if (window.mark_shape_as_edited)
|
1074 |
//... mark shape as edited then image is seleсted
|
1075 |
+
mark_shape_as_edited(page.shapes[name]);
|
|
|
1076 |
} else {
|
1077 |
$selector.addClass('no-value');
|
1078 |
|
1081 |
//If ZetaPrints advanced theme is enabled then...
|
1082 |
if (window.unmark_shape_as_edited)
|
1083 |
//or unmark shape then Leave blank is selected
|
1084 |
+
unmark_shape_as_edited(page.shapes[name]);
|
|
|
1085 |
}
|
1086 |
}
|
1087 |
|
1091 |
}
|
1092 |
|
1093 |
zp.show_colorpicker = function ($panel) {
|
1094 |
+
if (($panel.hasClass('color-picker') || $panel.hasClass('colour-picker'))
|
1095 |
&& !$panel.find('input').prop('checked'))
|
1096 |
$panel.find('.color-sample').click();
|
1097 |
}
|
1168 |
if ($field.hasClass('minimized')) {
|
1169 |
$field.removeClass('minimized');
|
1170 |
|
1171 |
+
var $panel = $field.hasClass('zetaprints-palette')
|
1172 |
+
? $content
|
1173 |
+
: $panels.not('.ui-tabs-hide');
|
1174 |
|
1175 |
zp.show_colorpicker($panel);
|
1176 |
scroll_strip($panel)
|
1215 |
return false;
|
1216 |
});
|
1217 |
|
1218 |
+
var $colour_picker_panel = $panels
|
1219 |
+
.filter('.color-picker')
|
1220 |
+
.add($field.find('.colour-picker'));
|
1221 |
|
1222 |
if (!$colour_picker_panel.length)
|
1223 |
return;
|
1224 |
|
1225 |
var $colour_radio_button = $colour_picker_panel
|
1226 |
+
.find('.zetaprints-field');
|
1227 |
|
1228 |
var $colour_sample = $colour_picker_panel.children('.color-sample')
|
1229 |
|
1454 |
return false;
|
1455 |
});
|
1456 |
|
1457 |
+
function shape_update_state (shape, state) {
|
1458 |
+
if (state)
|
1459 |
+
return mark_shape_as_edited(shape);
|
1460 |
+
|
1461 |
+
var names = shape.name.split('; ');
|
1462 |
+
|
1463 |
+
if (names.length == 1)
|
1464 |
+
return unmark_shape_as_edited(shape);
|
1465 |
+
|
1466 |
+
$fields = $('#input-fields-page-' + zp.current_page)
|
1467 |
+
.find('input, textarea, select')
|
1468 |
+
.filter('textarea, select, :text, :checked');
|
1469 |
+
|
1470 |
+
$images = $('#stock-images-page-' + zp.current_page)
|
1471 |
+
.find('input')
|
1472 |
+
.filter(':checked');
|
1473 |
+
|
1474 |
+
for (var i = 0; i < names.length; i++) {
|
1475 |
+
var name = names[i];
|
1476 |
+
|
1477 |
+
if ($fields.filter('[name="zetaprints-_' + name +'"]').val()
|
1478 |
+
|| $images.filter('[name="zetaprints-#' + name +'"]').length)
|
1479 |
+
return;
|
1480 |
+
}
|
1481 |
+
|
1482 |
+
|
1483 |
+
unmark_shape_as_edited(shape);
|
1484 |
+
}
|
1485 |
+
|
1486 |
function text_fields_change_handle (event) {
|
1487 |
+
var $this = $(this),
|
1488 |
|
1489 |
+
name = $this.attr('name').substring(12),
|
1490 |
+
value = $this.is(':checkbox') ? $this.is(':checked') : $this.val(),
|
1491 |
+
state = !!value,
|
1492 |
|
1493 |
+
zp = event.data.zp,
|
1494 |
+
page = zp.template_details.pages[zp.current_page],
|
1495 |
+
field = page.fields[name];
|
1496 |
+
|
1497 |
+
if (field) {
|
1498 |
+
field.value = value;
|
1499 |
+
|
1500 |
+
if (typeof field.previous_value != 'undefined') {
|
1501 |
+
if (field.previous_value != value)
|
1502 |
+
$product_form.addClass('zp-user-data-changed');
|
1503 |
+
else
|
1504 |
+
$product_form.removeClass('zp-user-data-changed');
|
1505 |
+
}
|
1506 |
+
}
|
1507 |
|
1508 |
if (state) {
|
1509 |
$('#fancybox-outer').addClass('modified');
|
1515 |
&& window.mark_shape_as_edited
|
1516 |
&& window.unmark_shape_as_edited) {
|
1517 |
|
1518 |
+
var shape = get_shape_by_name(name, page.shapes);
|
|
|
1519 |
|
1520 |
+
if (shape)
|
1521 |
+
shape_update_state(shape, state);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1522 |
}
|
1523 |
|
1524 |
if (window.zp_dataset_update_state)
|
1525 |
+
zp_dataset_update_state(zp, name, false);
|
1526 |
}
|
1527 |
|
1528 |
function readonly_fields_click_handle (event) {
|
1654 |
zp_clear_metadata(field);
|
1655 |
});
|
1656 |
|
1657 |
+
$('.zetaprints-palettes .zetaprints-field').change(function () {
|
1658 |
+
var $this = $(this);
|
1659 |
+
|
1660 |
+
var id = $this
|
1661 |
+
.attr('name')
|
1662 |
+
.substring(12);
|
1663 |
+
|
1664 |
+
var colour = $this.val();
|
1665 |
+
|
1666 |
+
for (var page in zp.template_details.pages) {
|
1667 |
+
for (var field in zp.template_details.pages[page].fields) {
|
1668 |
+
var field = zp.template_details.pages[page].fields[field];
|
1669 |
+
|
1670 |
+
if (field.palette == id)
|
1671 |
+
zp_set_metadata(field, { 'col-f': colour });
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
for (var image in zp.template_details.pages[page].images) {
|
1675 |
+
var image = zp.template_details.pages[page].images[image];
|
1676 |
+
|
1677 |
+
if (image.palette == id)
|
1678 |
+
zp_set_metadata(image, { 'col-f': colour });
|
1679 |
+
}
|
1680 |
+
}
|
1681 |
+
});
|
1682 |
+
|
1683 |
if (this.has_shapes && window.add_in_preview_edit_handlers)
|
1684 |
add_in_preview_edit_handlers();
|
1685 |
}
|