Version Notes
First release.
RWD theme ready.
Download this release
Release Info
Developer | DataBunchRussia |
Extension | Databunch_Labels |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Databunch/Labels/.DS_Store +0 -0
- app/code/community/Databunch/Labels/Block/.DS_Store +0 -0
- app/code/community/Databunch/Labels/Block/Catalog/.DS_Store +0 -0
- app/code/community/Databunch/Labels/Block/Catalog/Product.php +177 -0
- app/code/community/Databunch/Labels/Helper/Data.php +5 -0
- app/code/community/Databunch/Labels/Model/.DS_Store +0 -0
- app/code/community/Databunch/Labels/Model/Config/Location.php +34 -0
- app/code/community/Databunch/Labels/etc/config.xml +121 -0
- app/code/community/Databunch/Labels/etc/system.xml +213 -0
- app/code/community/Databunch/Labels/sql/.DS_Store +0 -0
- app/code/community/Databunch/Labels/sql/labels_setup/mysql4-install-0.1.0.php +34 -0
- app/design/adminhtml/default/default/layout/databunch/labels.xml +8 -0
- app/design/frontend/rwd/default/layout/databunch/labels.xml +29 -0
- app/design/frontend/rwd/default/template/catalog/product/list.phtml +196 -0
- app/design/frontend/rwd/default/template/catalog/product/view/media.phtml +93 -0
- app/design/frontend/rwd/default/template/databunch/labels/catalog/product.phtml +55 -0
- app/etc/modules/Databunch_Labels.xml +9 -0
- app/locale/ru_RU/Databunch_Labels.csv +19 -0
- package.xml +23 -0
- skin/frontend/rwd/default/css/databunch/labels.css +71 -0
app/code/community/Databunch/Labels/.DS_Store
ADDED
Binary file
|
app/code/community/Databunch/Labels/Block/.DS_Store
ADDED
Binary file
|
app/code/community/Databunch/Labels/Block/Catalog/.DS_Store
ADDED
Binary file
|
app/code/community/Databunch/Labels/Block/Catalog/Product.php
ADDED
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Databunch_Labels_Block_Catalog_Product extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
protected $_product;
|
5 |
+
|
6 |
+
public function setProduct($product)
|
7 |
+
{
|
8 |
+
$this->_product = $product;
|
9 |
+
|
10 |
+
return $this;
|
11 |
+
}
|
12 |
+
|
13 |
+
public function getProduct()
|
14 |
+
{
|
15 |
+
if (!$this->_product) {
|
16 |
+
$this->_product = Mage::registry('product');
|
17 |
+
}
|
18 |
+
|
19 |
+
return $this->_product;
|
20 |
+
}
|
21 |
+
|
22 |
+
public function isSale()
|
23 |
+
{
|
24 |
+
$enabled = Mage::getStoreConfig('labels/sale_label/enabled');
|
25 |
+
if (!$enabled) {
|
26 |
+
return false;
|
27 |
+
}
|
28 |
+
|
29 |
+
$product = $this->getProduct();
|
30 |
+
|
31 |
+
if ($product->getPrice() > $product->getFinalPrice()) {
|
32 |
+
return true;
|
33 |
+
}
|
34 |
+
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function getSaleText()
|
39 |
+
{
|
40 |
+
$text = Mage::getStoreConfig('labels/sale_label/text');
|
41 |
+
|
42 |
+
if ($this->isSale()) {
|
43 |
+
$showPercentage = Mage::getStoreConfig('labels/sale_label/show_percentage');
|
44 |
+
if ($showPercentage) {
|
45 |
+
$product = $this->getProduct();
|
46 |
+
$percentageValue = round((abs($product->getPrice() - $product->getFinalPrice()) / $product->getPrice()) * 100);
|
47 |
+
$limitPercentage = Mage::getStoreConfig('labels/sale_label/limit');
|
48 |
+
if ($percentageValue >= $limitPercentage) {
|
49 |
+
$format = Mage::getStoreConfig('labels/sale_label/format');
|
50 |
+
if ($format) {
|
51 |
+
$text = sprintf($format, $percentageValue);
|
52 |
+
} else {
|
53 |
+
$text = "-" . $percentageValue . "%";
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
return $text;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function getSaleBackgroundColor()
|
63 |
+
{
|
64 |
+
$backgroundColor = "#" . Mage::getStoreConfig('labels/sale_label/background_color');
|
65 |
+
|
66 |
+
return $backgroundColor;
|
67 |
+
}
|
68 |
+
|
69 |
+
public function getSaleTextColor()
|
70 |
+
{
|
71 |
+
$textColor = "#" . Mage::getStoreConfig('labels/sale_label/text_color');
|
72 |
+
|
73 |
+
return $textColor;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function isNew()
|
77 |
+
{
|
78 |
+
$enabled = Mage::getStoreConfig('labels/new_label/enabled');
|
79 |
+
if (!$enabled) {
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
|
83 |
+
$product = $this->getProduct();
|
84 |
+
|
85 |
+
$newFromDate = $product->getNewsFromDate();
|
86 |
+
$newToDate = $product->getNewsToDate();
|
87 |
+
$now = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
|
88 |
+
|
89 |
+
if(($newFromDate < $now && $newFromDate != NULL) && ($newToDate > $now || $newToDate == "")) {
|
90 |
+
return true;
|
91 |
+
}
|
92 |
+
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
public function getNewText()
|
97 |
+
{
|
98 |
+
$text = Mage::getStoreConfig('labels/new_label/text');
|
99 |
+
|
100 |
+
return $text;
|
101 |
+
}
|
102 |
+
|
103 |
+
public function getNewBackgroundColor()
|
104 |
+
{
|
105 |
+
$backgroundColor = "#" . Mage::getStoreConfig('labels/new_label/background_color');
|
106 |
+
|
107 |
+
return $backgroundColor;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function getNewTextColor()
|
111 |
+
{
|
112 |
+
$textColor = "#" . Mage::getStoreConfig('labels/new_label/text_color');
|
113 |
+
|
114 |
+
return $textColor;
|
115 |
+
}
|
116 |
+
|
117 |
+
public function isFeatured()
|
118 |
+
{
|
119 |
+
$enabled = Mage::getStoreConfig('labels/featured_label/enabled');
|
120 |
+
if (!$enabled) {
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
|
124 |
+
$product = $this->getProduct();
|
125 |
+
|
126 |
+
if ($product->getFeaturedProduct()) {
|
127 |
+
return true;
|
128 |
+
}
|
129 |
+
|
130 |
+
return false;
|
131 |
+
}
|
132 |
+
|
133 |
+
public function getFeaturedText()
|
134 |
+
{
|
135 |
+
$text = Mage::getStoreConfig('labels/featured_label/text');
|
136 |
+
|
137 |
+
return $text;
|
138 |
+
}
|
139 |
+
|
140 |
+
public function getFeaturedBackgroundColor()
|
141 |
+
{
|
142 |
+
$backgroundColor = "#" . Mage::getStoreConfig('labels/featured_label/background_color');
|
143 |
+
|
144 |
+
return $backgroundColor;
|
145 |
+
}
|
146 |
+
|
147 |
+
public function getFeaturedTextColor()
|
148 |
+
{
|
149 |
+
$textColor = "#" . Mage::getStoreConfig('labels/featured_label/text_color');
|
150 |
+
|
151 |
+
return $textColor;
|
152 |
+
}
|
153 |
+
|
154 |
+
public function getLocationClass()
|
155 |
+
{
|
156 |
+
$location = Mage::getStoreConfig('labels/general/location');
|
157 |
+
switch ($location) {
|
158 |
+
case 10:
|
159 |
+
$locationClass = "pl-top-left";
|
160 |
+
break;
|
161 |
+
case 20:
|
162 |
+
$locationClass = "pl-top-right";
|
163 |
+
break;
|
164 |
+
case 30:
|
165 |
+
$locationClass = "pl-bottom-left";
|
166 |
+
break;
|
167 |
+
case 40:
|
168 |
+
$locationClass = "pl-bottom-right";
|
169 |
+
break;
|
170 |
+
default:
|
171 |
+
$locationClass = "";
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
|
175 |
+
return $locationClass;
|
176 |
+
}
|
177 |
+
}
|
app/code/community/Databunch/Labels/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Databunch_Labels_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
+
{
|
4 |
+
|
5 |
+
}
|
app/code/community/Databunch/Labels/Model/.DS_Store
ADDED
Binary file
|
app/code/community/Databunch/Labels/Model/Config/Location.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Databunch_Labels_Model_Config_Location
|
3 |
+
{
|
4 |
+
/**
|
5 |
+
* Options getter
|
6 |
+
*
|
7 |
+
* @return array
|
8 |
+
*/
|
9 |
+
public function toOptionArray()
|
10 |
+
{
|
11 |
+
return array(
|
12 |
+
array('value' => 10, 'label'=>Mage::helper('labels')->__('Top-left')),
|
13 |
+
array('value' => 20, 'label'=>Mage::helper('labels')->__('Top-right')),
|
14 |
+
array('value' => 30, 'label'=>Mage::helper('labels')->__('Bottom-left')),
|
15 |
+
array('value' => 40, 'label'=>Mage::helper('labels')->__('Bottom-right')),
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get options in "key-value" format
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function toArray()
|
25 |
+
{
|
26 |
+
return array(
|
27 |
+
10 => Mage::helper('labels')->__('Top-left'),
|
28 |
+
20 => Mage::helper('labels')->__('Top-right'),
|
29 |
+
30 => Mage::helper('labels')->__('Bottom-left'),
|
30 |
+
40 => Mage::helper('labels')->__('Bottom-right'),
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
app/code/community/Databunch/Labels/etc/config.xml
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Databunch_Labels>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Databunch_Labels>
|
7 |
+
</modules>
|
8 |
+
<adminhtml>
|
9 |
+
<layout>
|
10 |
+
<updates>
|
11 |
+
<labels>
|
12 |
+
<file>databunch/labels.xml</file>
|
13 |
+
</labels>
|
14 |
+
</updates>
|
15 |
+
</layout>
|
16 |
+
<acl>
|
17 |
+
<resources>
|
18 |
+
<admin>
|
19 |
+
<children>
|
20 |
+
<system>
|
21 |
+
<children>
|
22 |
+
<config>
|
23 |
+
<children>
|
24 |
+
<labels>
|
25 |
+
<title>Databunch Labels</title>
|
26 |
+
</labels>
|
27 |
+
</children>
|
28 |
+
</config>
|
29 |
+
</children>
|
30 |
+
</system>
|
31 |
+
</children>
|
32 |
+
</admin>
|
33 |
+
</resources>
|
34 |
+
</acl>
|
35 |
+
<translate>
|
36 |
+
<modules>
|
37 |
+
<Databunch_Labels>
|
38 |
+
<files>
|
39 |
+
<default>Databunch_Labels.csv</default>
|
40 |
+
</files>
|
41 |
+
</Databunch_Labels>
|
42 |
+
</modules>
|
43 |
+
</translate>
|
44 |
+
</adminhtml>
|
45 |
+
<frontend>
|
46 |
+
<layout>
|
47 |
+
<updates>
|
48 |
+
<labels module="Databunch_Labels">
|
49 |
+
<file>databunch/labels.xml</file>
|
50 |
+
</labels>
|
51 |
+
</updates>
|
52 |
+
</layout>
|
53 |
+
</frontend>
|
54 |
+
<global>
|
55 |
+
<blocks>
|
56 |
+
<labels>
|
57 |
+
<class>Databunch_Labels_Block</class>
|
58 |
+
</labels>
|
59 |
+
</blocks>
|
60 |
+
<helpers>
|
61 |
+
<labels>
|
62 |
+
<class>Databunch_Labels_Helper</class>
|
63 |
+
</labels>
|
64 |
+
</helpers>
|
65 |
+
<models>
|
66 |
+
<labels>
|
67 |
+
<class>Databunch_Labels_Model</class>
|
68 |
+
</labels>
|
69 |
+
</models>
|
70 |
+
|
71 |
+
<resources>
|
72 |
+
<labels_setup>
|
73 |
+
<setup>
|
74 |
+
<module>Databunch_Labels</module>
|
75 |
+
<class>Mage_Eav_Model_Entity_Setup</class>
|
76 |
+
</setup>
|
77 |
+
<connection>
|
78 |
+
<use>core_setup</use>
|
79 |
+
</connection>
|
80 |
+
</labels_setup>
|
81 |
+
<labels_write>
|
82 |
+
<connection>
|
83 |
+
<use>core_write</use>
|
84 |
+
</connection>
|
85 |
+
</labels_write>
|
86 |
+
<labels_read>
|
87 |
+
<connection>
|
88 |
+
<use>core_read</use>
|
89 |
+
</connection>
|
90 |
+
</labels_read>
|
91 |
+
</resources>
|
92 |
+
</global>
|
93 |
+
<default>
|
94 |
+
<labels>
|
95 |
+
<general>
|
96 |
+
<location>10</location>
|
97 |
+
</general>
|
98 |
+
<new_label>
|
99 |
+
<enabled>1</enabled>
|
100 |
+
<text>New</text>
|
101 |
+
<background_color>00ad5d</background_color>
|
102 |
+
<text_color>ffffff</text_color>
|
103 |
+
</new_label>
|
104 |
+
<sale_label>
|
105 |
+
<enabled>1</enabled>
|
106 |
+
<text>Sale</text>
|
107 |
+
<show_percentage>1</show_percentage>
|
108 |
+
<limit>5</limit>
|
109 |
+
<format>%d%% OFF</format>
|
110 |
+
<background_color>f24841</background_color>
|
111 |
+
<text_color>ffffff</text_color>
|
112 |
+
</sale_label>
|
113 |
+
<featured_label>
|
114 |
+
<enabled>1</enabled>
|
115 |
+
<text>Featured</text>
|
116 |
+
<background_color>3399cc</background_color>
|
117 |
+
<text_color>ffffff</text_color>
|
118 |
+
</featured_label>
|
119 |
+
</labels>
|
120 |
+
</default>
|
121 |
+
</config>
|
app/code/community/Databunch/Labels/etc/system.xml
ADDED
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<databunch translate="label" module="labels">
|
5 |
+
<label>Databunch Extensions</label>
|
6 |
+
<sort_order>300</sort_order>
|
7 |
+
</databunch>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<labels translate="label" module="labels">
|
11 |
+
<label>Labels</label>
|
12 |
+
<tab>databunch</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>200</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<general translate="label" module="labels">
|
20 |
+
<label>Labels general settings</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>10</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<location translate="label comment">
|
28 |
+
<label>Labels location</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>labels/config_location</source_model>
|
31 |
+
<sort_order>10</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
</location>
|
36 |
+
</fields>
|
37 |
+
</general>
|
38 |
+
<new_label translate="label" module="labels">
|
39 |
+
<label>New Label</label>
|
40 |
+
<frontend_type>text</frontend_type>
|
41 |
+
<sort_order>10</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
<fields>
|
46 |
+
<enabled translate="label comment">
|
47 |
+
<label>Enabled</label>
|
48 |
+
<frontend_type>select</frontend_type>
|
49 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
50 |
+
<sort_order>20</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
</enabled>
|
55 |
+
<text translate="label comment">
|
56 |
+
<label>Text</label>
|
57 |
+
<comment><![CDATA[Text that will be on the label]]></comment>
|
58 |
+
<frontend_type>text</frontend_type>
|
59 |
+
<sort_order>20</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</text>
|
64 |
+
<background_color translate="label comment">
|
65 |
+
<label>Label background color</label>
|
66 |
+
<frontend_type>text</frontend_type>
|
67 |
+
<validate>color</validate>
|
68 |
+
<sort_order>30</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</background_color>
|
73 |
+
<text_color translate="label comment">
|
74 |
+
<label>Label text color</label>
|
75 |
+
<frontend_type>text</frontend_type>
|
76 |
+
<validate>color</validate>
|
77 |
+
<sort_order>40</sort_order>
|
78 |
+
<show_in_default>1</show_in_default>
|
79 |
+
<show_in_website>1</show_in_website>
|
80 |
+
<show_in_store>1</show_in_store>
|
81 |
+
</text_color>
|
82 |
+
</fields>
|
83 |
+
</new_label>
|
84 |
+
<sale_label translate="label" module="labels">
|
85 |
+
<label>Sale Label</label>
|
86 |
+
<frontend_type>text</frontend_type>
|
87 |
+
<sort_order>30</sort_order>
|
88 |
+
<show_in_default>1</show_in_default>
|
89 |
+
<show_in_website>1</show_in_website>
|
90 |
+
<show_in_store>1</show_in_store>
|
91 |
+
<fields>
|
92 |
+
<enabled translate="label comment">
|
93 |
+
<label>Enabled</label>
|
94 |
+
<frontend_type>select</frontend_type>
|
95 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
96 |
+
<sort_order>10</sort_order>
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>1</show_in_store>
|
100 |
+
</enabled>
|
101 |
+
<text translate="label comment">
|
102 |
+
<label>Text</label>
|
103 |
+
<comment><![CDATA[Text that will be on the label]]></comment>
|
104 |
+
<frontend_type>text</frontend_type>
|
105 |
+
<sort_order>20</sort_order>
|
106 |
+
<show_in_default>1</show_in_default>
|
107 |
+
<show_in_website>1</show_in_website>
|
108 |
+
<show_in_store>1</show_in_store>
|
109 |
+
</text>
|
110 |
+
<show_percentage>
|
111 |
+
<label>Show percentage</label>
|
112 |
+
<comment><![CDATA[Show the percentage discount instead of label text]]></comment>
|
113 |
+
<frontend_type>select</frontend_type>
|
114 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
115 |
+
<sort_order>30</sort_order>
|
116 |
+
<show_in_default>1</show_in_default>
|
117 |
+
<show_in_website>1</show_in_website>
|
118 |
+
<show_in_store>1</show_in_store>
|
119 |
+
</show_percentage>
|
120 |
+
<limit translate="label comment">
|
121 |
+
<label>Percent limit</label>
|
122 |
+
<comment><![CDATA[Limit discounts from which percentage must be shown. 0 is for any percentage.]]></comment>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>40</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
<depends>
|
129 |
+
<show_percentage>1</show_percentage>
|
130 |
+
</depends>
|
131 |
+
</limit>
|
132 |
+
<format translate="label comment">
|
133 |
+
<label>Percent format</label>
|
134 |
+
<comment><![CDATA[Label text format. Use %d for percent value and %% for percent symbol, for example (-%d%% sale) for (-15% sale).]]></comment>
|
135 |
+
<frontend_type>text</frontend_type>
|
136 |
+
<sort_order>50</sort_order>
|
137 |
+
<show_in_default>1</show_in_default>
|
138 |
+
<show_in_website>1</show_in_website>
|
139 |
+
<show_in_store>1</show_in_store>
|
140 |
+
<depends>
|
141 |
+
<show_percentage>1</show_percentage>
|
142 |
+
</depends>
|
143 |
+
</format>
|
144 |
+
<background_color translate="label comment">
|
145 |
+
<label>Label background color</label>
|
146 |
+
<frontend_type>text</frontend_type>
|
147 |
+
<validate>color</validate>
|
148 |
+
<sort_order>60</sort_order>
|
149 |
+
<show_in_default>1</show_in_default>
|
150 |
+
<show_in_website>1</show_in_website>
|
151 |
+
<show_in_store>1</show_in_store>
|
152 |
+
</background_color>
|
153 |
+
<text_color translate="label comment">
|
154 |
+
<label>Label text color</label>
|
155 |
+
<frontend_type>text</frontend_type>
|
156 |
+
<validate>color</validate>
|
157 |
+
<sort_order>70</sort_order>
|
158 |
+
<show_in_default>1</show_in_default>
|
159 |
+
<show_in_website>1</show_in_website>
|
160 |
+
<show_in_store>1</show_in_store>
|
161 |
+
</text_color>
|
162 |
+
</fields>
|
163 |
+
</sale_label>
|
164 |
+
<featured_label translate="label" module="labels">
|
165 |
+
<label>Featured Label</label>
|
166 |
+
<frontend_type>text</frontend_type>
|
167 |
+
<sort_order>40</sort_order>
|
168 |
+
<show_in_default>1</show_in_default>
|
169 |
+
<show_in_website>1</show_in_website>
|
170 |
+
<show_in_store>1</show_in_store>
|
171 |
+
<fields>
|
172 |
+
<enabled translate="label comment">
|
173 |
+
<label>Enabled</label>
|
174 |
+
<frontend_type>select</frontend_type>
|
175 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
176 |
+
<sort_order>10</sort_order>
|
177 |
+
<show_in_default>1</show_in_default>
|
178 |
+
<show_in_website>1</show_in_website>
|
179 |
+
<show_in_store>1</show_in_store>
|
180 |
+
</enabled>
|
181 |
+
<text translate="label comment">
|
182 |
+
<label>Text</label>
|
183 |
+
<comment><![CDATA[Text that will be on the label]]></comment>
|
184 |
+
<frontend_type>text</frontend_type>
|
185 |
+
<sort_order>20</sort_order>
|
186 |
+
<show_in_default>1</show_in_default>
|
187 |
+
<show_in_website>1</show_in_website>
|
188 |
+
<show_in_store>1</show_in_store>
|
189 |
+
</text>
|
190 |
+
<background_color translate="label comment">
|
191 |
+
<label>Label background color</label>
|
192 |
+
<frontend_type>text</frontend_type>
|
193 |
+
<validate>color</validate>
|
194 |
+
<sort_order>30</sort_order>
|
195 |
+
<show_in_default>1</show_in_default>
|
196 |
+
<show_in_website>1</show_in_website>
|
197 |
+
<show_in_store>1</show_in_store>
|
198 |
+
</background_color>
|
199 |
+
<text_color translate="label comment">
|
200 |
+
<label>Label text color</label>
|
201 |
+
<frontend_type>text</frontend_type>
|
202 |
+
<validate>color</validate>
|
203 |
+
<sort_order>40</sort_order>
|
204 |
+
<show_in_default>1</show_in_default>
|
205 |
+
<show_in_website>1</show_in_website>
|
206 |
+
<show_in_store>1</show_in_store>
|
207 |
+
</text_color>
|
208 |
+
</fields>
|
209 |
+
</featured_label>
|
210 |
+
</groups>
|
211 |
+
</labels>
|
212 |
+
</sections>
|
213 |
+
</config>
|
app/code/community/Databunch/Labels/sql/.DS_Store
ADDED
Binary file
|
app/code/community/Databunch/Labels/sql/labels_setup/mysql4-install-0.1.0.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* @var $installer Mage_Eav_Model_Entity_Setup */
|
4 |
+
$installer = $this;
|
5 |
+
|
6 |
+
$installer->startSetup();
|
7 |
+
|
8 |
+
$installer->addAttribute('catalog_product', 'featured_product', array(
|
9 |
+
'group' => 'General',
|
10 |
+
'type' => 'int',
|
11 |
+
'backend' => '',
|
12 |
+
'frontend' => '',
|
13 |
+
'label' => 'Featured product',
|
14 |
+
'input' => 'boolean',
|
15 |
+
'class' => '',
|
16 |
+
'source' => '',
|
17 |
+
'is_global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
|
18 |
+
'visible' => true,
|
19 |
+
'required' => false,
|
20 |
+
'user_defined' => true,
|
21 |
+
'default' => '0',
|
22 |
+
'searchable' => false,
|
23 |
+
'filterable' => false,
|
24 |
+
'comparable' => false,
|
25 |
+
'visible_on_front' => false,
|
26 |
+
'unique' => false,
|
27 |
+
'apply_to' => 'simple,configurable,virtual,bundle,downloadable',
|
28 |
+
'is_configurable' => false,
|
29 |
+
));
|
30 |
+
|
31 |
+
$installer->updateAttribute('catalog_product', 'featured_product', 'used_in_product_listing', '1');
|
32 |
+
$installer->addAttributeToGroup('catalog_product', 'Default', 'Default', 'related_brands');
|
33 |
+
|
34 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/databunch/labels.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.1">
|
3 |
+
<adminhtml_system_config_edit>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addJs"><file>jscolor/jscolor.js</file></action>
|
6 |
+
</reference>
|
7 |
+
</adminhtml_system_config_edit>
|
8 |
+
</layout>
|
app/design/frontend/rwd/default/layout/databunch/labels.xml
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<catalog_product_view>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem"><type>skin_css</type><name>css/databunch/labels.css</name></action>
|
6 |
+
</reference>
|
7 |
+
<reference name="product.info.media">
|
8 |
+
<block type="labels/catalog_product" name="product_labels" template="databunch/labels/catalog/product.phtml"/>
|
9 |
+
</reference>
|
10 |
+
</catalog_product_view>
|
11 |
+
|
12 |
+
<catalog_category_default>
|
13 |
+
<reference name="head">
|
14 |
+
<action method="addItem"><type>skin_css</type><name>css/databunch/labels.css</name></action>
|
15 |
+
</reference>
|
16 |
+
<reference name="product_list">
|
17 |
+
<block type="labels/catalog_product" name="product_labels" template="databunch/labels/catalog/product.phtml"/>
|
18 |
+
</reference>
|
19 |
+
</catalog_category_default>
|
20 |
+
|
21 |
+
<catalog_category_layered>
|
22 |
+
<reference name="head">
|
23 |
+
<action method="addItem"><type>skin_css</type><name>css/databunch/labels.css</name></action>
|
24 |
+
</reference>
|
25 |
+
<reference name="product_list">
|
26 |
+
<block type="labels/catalog_product" name="product_labels" template="databunch/labels/catalog/product.phtml"/>
|
27 |
+
</reference>
|
28 |
+
</catalog_category_layered>
|
29 |
+
</layout>
|
app/design/frontend/rwd/default/template/catalog/product/list.phtml
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package rwd_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
/**
|
29 |
+
* Product list template
|
30 |
+
*
|
31 |
+
* @see Mage_Catalog_Block_Product_List
|
32 |
+
*/
|
33 |
+
/* @var $this Mage_Catalog_Block_Product_List */
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
$_productCollection=$this->getLoadedProductCollection();
|
37 |
+
$_helper = $this->helper('catalog/output');
|
38 |
+
?>
|
39 |
+
<?php if(!$_productCollection->count()): ?>
|
40 |
+
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
|
41 |
+
<?php else: ?>
|
42 |
+
<div class="category-products">
|
43 |
+
<?php echo $this->getToolbarHtml() ?>
|
44 |
+
<?php // List mode ?>
|
45 |
+
<?php if($this->getMode()!='grid'): ?>
|
46 |
+
<?php $_iterator = 0; ?>
|
47 |
+
<ol class="products-list" id="products-list">
|
48 |
+
<?php foreach ($_productCollection as $_product): ?>
|
49 |
+
<li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
|
50 |
+
<?php // Product Image ?>
|
51 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
52 |
+
<?php /* Based on the native RWD styling, product images are displayed at a max of ~400px wide when viewed on a
|
53 |
+
one column page layout with four product columns from a 1280px viewport. For bandwidth reasons,
|
54 |
+
we are going to serve a 300px image, as it will look fine at 400px and most of the times, the image
|
55 |
+
will be displayed at a smaller size (eg, if two column are being used or viewport is smaller than 1280px).
|
56 |
+
This $_imgSize value could even be decreased further, based on the page layout
|
57 |
+
(one column, two column, three column) and number of product columns. */ ?>
|
58 |
+
<?php $_imgSize = 300; ?>
|
59 |
+
<img id="product-collection-image-<?php echo $_product->getId(); ?>"
|
60 |
+
src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->keepFrame(false)->resize($_imgSize); ?>"
|
61 |
+
alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
62 |
+
<?php // Databunch_Labels on product listing page ?>
|
63 |
+
<?php $labelsBlock = $this->getChild('product_labels'); ?>
|
64 |
+
<?php if ($labelsBlock): ?>
|
65 |
+
<?php echo $labelsBlock->setProduct($_product)->toHtml(); ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
</a>
|
68 |
+
<?php // Product description ?>
|
69 |
+
<div class="product-shop">
|
70 |
+
<div class="f-fix">
|
71 |
+
<div class="product-primary">
|
72 |
+
<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
|
73 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
|
74 |
+
<?php if($_product->getRatingSummary()): ?>
|
75 |
+
<?php echo $this->getReviewsSummaryHtml($_product) ?>
|
76 |
+
<?php endif; ?>
|
77 |
+
|
78 |
+
<?php
|
79 |
+
$_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
|
80 |
+
foreach($_nameAfterChildren as $_nameAfterChildName):
|
81 |
+
$_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
|
82 |
+
$_nameAfterChild->setProduct($_product);
|
83 |
+
?>
|
84 |
+
<?php echo $_nameAfterChild->toHtml(); ?>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
</div>
|
87 |
+
<div class="product-secondary">
|
88 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
89 |
+
</div>
|
90 |
+
<div class="product-secondary">
|
91 |
+
<?php if($_product->isSaleable() && !$_product->canConfigure()): ?>
|
92 |
+
<p class="action"><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
93 |
+
<?php elseif($_product->isSaleable()): ?>
|
94 |
+
<p class="action"><a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a></p>
|
95 |
+
<?php else: ?>
|
96 |
+
<p class="action availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
97 |
+
<?php endif; ?>
|
98 |
+
<ul class="add-to-links">
|
99 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
100 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
101 |
+
<?php endif; ?>
|
102 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
103 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
104 |
+
<?php endif; ?>
|
105 |
+
</ul>
|
106 |
+
</div>
|
107 |
+
<div class="desc std">
|
108 |
+
<?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
|
109 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</li>
|
114 |
+
<?php endforeach; ?>
|
115 |
+
</ol>
|
116 |
+
<script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
|
117 |
+
|
118 |
+
<?php else: ?>
|
119 |
+
|
120 |
+
<?php // Grid Mode ?>
|
121 |
+
|
122 |
+
<?php $_collectionSize = $_productCollection->count() ?>
|
123 |
+
<?php $_columnCount = $this->getColumnCount(); ?>
|
124 |
+
<ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">
|
125 |
+
<?php $i=0; foreach ($_productCollection as $_product): ?>
|
126 |
+
<?php /*if ($i++%$_columnCount==0): ?>
|
127 |
+
<?php endif*/ ?>
|
128 |
+
<li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
|
129 |
+
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
|
130 |
+
<?php $_imgSize = 210; ?>
|
131 |
+
<img id="product-collection-image-<?php echo $_product->getId(); ?>"
|
132 |
+
src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($_imgSize); ?>"
|
133 |
+
alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
|
134 |
+
<?php // Databunch_Labels on product listing page ?>
|
135 |
+
<?php $labelsBlock = $this->getChild('product_labels'); ?>
|
136 |
+
<?php if ($labelsBlock): ?>
|
137 |
+
<?php echo $labelsBlock->setProduct($_product)->toHtml(); ?>
|
138 |
+
<?php endif; ?>
|
139 |
+
</a>
|
140 |
+
<div class="product-info">
|
141 |
+
<h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
|
142 |
+
|
143 |
+
<?php
|
144 |
+
$_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
|
145 |
+
foreach($_nameAfterChildren as $_nameAfterChildName):
|
146 |
+
$_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
|
147 |
+
$_nameAfterChild->setProduct($_product);
|
148 |
+
?>
|
149 |
+
<?php echo $_nameAfterChild->toHtml(); ?>
|
150 |
+
<?php endforeach; ?>
|
151 |
+
|
152 |
+
<?php echo $this->getPriceHtml($_product, true) ?>
|
153 |
+
<?php if($_product->getRatingSummary()): ?>
|
154 |
+
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
|
155 |
+
<?php endif; ?>
|
156 |
+
<div class="actions">
|
157 |
+
<?php if($_product->isSaleable() && !$_product->canConfigure()): ?>
|
158 |
+
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
159 |
+
<?php elseif($_product->isSaleable()): ?>
|
160 |
+
<a title="<?php echo $this->__('View Details') ?>" class="button" href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->__('View Details') ?></a>
|
161 |
+
<?php else: ?>
|
162 |
+
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
163 |
+
<?php endif; ?>
|
164 |
+
<ul class="add-to-links">
|
165 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
166 |
+
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
167 |
+
<?php endif; ?>
|
168 |
+
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
|
169 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
170 |
+
<?php endif; ?>
|
171 |
+
</ul>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
</li>
|
175 |
+
<?php /*if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
|
176 |
+
<?php endif*/ ?>
|
177 |
+
<?php endforeach ?>
|
178 |
+
</ul>
|
179 |
+
<script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
|
180 |
+
<?php endif; ?>
|
181 |
+
|
182 |
+
<div class="toolbar-bottom">
|
183 |
+
<?php echo $this->getToolbarHtml() ?>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
<?php endif; ?>
|
187 |
+
|
188 |
+
<?php
|
189 |
+
//set product collection on after blocks
|
190 |
+
$_afterChildren = $this->getChild('after')->getSortedChildren();
|
191 |
+
foreach($_afterChildren as $_afterChildName):
|
192 |
+
$_afterChild = $this->getChild('after')->getChild($_afterChildName);
|
193 |
+
$_afterChild->setProductCollection($_productCollection);
|
194 |
+
?>
|
195 |
+
<?php echo $_afterChild->toHtml(); ?>
|
196 |
+
<?php endforeach; ?>
|
app/design/frontend/rwd/default/template/catalog/product/view/media.phtml
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package rwd_default
|
23 |
+
* @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Product media data template
|
29 |
+
*
|
30 |
+
* @see Mage_Catalog_Block_Product_View_Media
|
31 |
+
*/
|
32 |
+
|
33 |
+
/* @var $this Mage_Catalog_Block_Product_View_Media */
|
34 |
+
?>
|
35 |
+
<?php
|
36 |
+
$_product = $this->getProduct();
|
37 |
+
$_helper = $this->helper('catalog/output');
|
38 |
+
?>
|
39 |
+
<div class="product-image product-image-zoom">
|
40 |
+
<div class="product-image-gallery">
|
41 |
+
<img id="image-main"
|
42 |
+
class="gallery-image visible"
|
43 |
+
src="<?php echo $this->helper('catalog/image')->init($_product, 'image') ?>"
|
44 |
+
alt="<?php echo $this->escapeHtml($this->getImageLabel()) ?>"
|
45 |
+
title="<?php echo $this->escapeHtml($this->getImageLabel()); ?>" />
|
46 |
+
|
47 |
+
<?php
|
48 |
+
$i=0;
|
49 |
+
foreach ($this->getGalleryImages() as $_image):
|
50 |
+
$_imageUrl = $this->helper('catalog/image')
|
51 |
+
->init($_product, 'image', $_image->getFile())
|
52 |
+
->keepFrame(false)
|
53 |
+
->constrainOnly(true)
|
54 |
+
->resize(1200);
|
55 |
+
?>
|
56 |
+
<img id="image-<?php echo $i; ?>"
|
57 |
+
class="gallery-image"
|
58 |
+
src="<?php echo $_imageUrl; ?>"
|
59 |
+
data-zoom-image="<?php echo $_imageUrl; ?>" />
|
60 |
+
<?php
|
61 |
+
$i++;
|
62 |
+
endforeach;
|
63 |
+
?>
|
64 |
+
</div>
|
65 |
+
<?php // Databunch_Labels on product view media page ?>
|
66 |
+
<?php $labelsBlock = $this->getChild('product_labels'); ?>
|
67 |
+
<?php if ($labelsBlock): ?>
|
68 |
+
<?php echo $labelsBlock->setProduct($_product)->toHtml(); ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<?php if (count($this->getGalleryImages()) > 0): ?>
|
73 |
+
<div class="more-views">
|
74 |
+
<h2><?php echo $this->__('More Views') ?></h2>
|
75 |
+
<ul class="product-image-thumbs">
|
76 |
+
<?php $i=0; foreach ($this->getGalleryImages() as $_image): ?>
|
77 |
+
<?php
|
78 |
+
if (($filterClass = $this->getGalleryFilterHelper()) && ($filterMethod = $this->getGalleryFilterMethod()) && !Mage::helper($filterClass)->$filterMethod($_product, $_image)):
|
79 |
+
continue;
|
80 |
+
endif;
|
81 |
+
?>
|
82 |
+
<li>
|
83 |
+
<a class="thumb-link" href="#" title="<?php echo $this->escapeHtml($_image->getLabel()) ?>" data-image-index="<?php echo $i; ?>">
|
84 |
+
<img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(75); ?>"
|
85 |
+
width="75" height="75" alt="<?php echo $this->escapeHtml($_image->getLabel()) ?>" />
|
86 |
+
</a>
|
87 |
+
</li>
|
88 |
+
<?php $i++; endforeach; ?>
|
89 |
+
</ul>
|
90 |
+
</div>
|
91 |
+
<?php endif; ?>
|
92 |
+
|
93 |
+
<?php echo $this->getChildHtml('after'); ?>
|
app/design/frontend/rwd/default/template/databunch/labels/catalog/product.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* To use in product listing or product view media call
|
4 |
+
* echo $this->getChild('product_labels')->setProduct($product)->toHtml();
|
5 |
+
* from catalog/product/list.phtml
|
6 |
+
* or
|
7 |
+
* from catalog/product/view/media.phtml
|
8 |
+
*
|
9 |
+
* To use in another page add this template at page layout
|
10 |
+
*/
|
11 |
+
?>
|
12 |
+
|
13 |
+
<?php if ( $this->isSale() || $this->isNew() || $this->isFeatured() ): ?>
|
14 |
+
<?php $locationClass = $this->getLocationClass(); ?>
|
15 |
+
<div class='product-label <?php echo $locationClass ?>'>
|
16 |
+
<ul>
|
17 |
+
<?php endif; ?>
|
18 |
+
|
19 |
+
<?php if ($this->isSale()): ?>
|
20 |
+
<?php /* product on sale */ ?>
|
21 |
+
<?php $saleStyle = "background:" . $this->getSaleBackgroundColor() . "; color:" . $this->getSaleTextColor() . ";" ?>
|
22 |
+
<li class="label" style="<?php echo $saleStyle ?>">
|
23 |
+
<span><?php echo $this->getSaleText() ?></span>
|
24 |
+
<span class="arrow l-arrow" style="border-top:5px solid <?php echo $this->getSaleBackgroundColor() ?>;"> </span>
|
25 |
+
<span class="arrow rt-arrow" style="border-top:20px solid <?php echo $this->getSaleBackgroundColor() ?>;"> </span>
|
26 |
+
<span class="arrow rb-arrow" style="border-bottom:20px solid <?php echo $this->getSaleBackgroundColor() ?>;"> </span>
|
27 |
+
</li>
|
28 |
+
<?php endif; ?>
|
29 |
+
|
30 |
+
<?php if ($this->isNew()): ?>
|
31 |
+
<?php /* new product */ ?>
|
32 |
+
<?php $newStyle = "background:" . $this->getNewBackgroundColor() . "; color:" . $this->getNewTextColor() . ";" ?>
|
33 |
+
<li class="label" style="<?php echo $newStyle ?>">
|
34 |
+
<span><?php echo $this->getNewText() ?></span>
|
35 |
+
<span class="arrow l-arrow" style="border-top:5px solid <?php echo $this->getNewBackgroundColor() ?>;"> </span>
|
36 |
+
<span class="arrow rt-arrow" style="border-top:20px solid <?php echo $this->getNewBackgroundColor() ?>;"> </span>
|
37 |
+
<span class="arrow rb-arrow" style="border-bottom:20px solid <?php echo $this->getNewBackgroundColor() ?>;"> </span>
|
38 |
+
</li>
|
39 |
+
<?php endif; ?>
|
40 |
+
|
41 |
+
<?php if ($this->isFeatured()): ?>
|
42 |
+
<?php /* featured product */ ?>
|
43 |
+
<?php $featuredStyle = "background:" . $this->getFeaturedBackgroundColor() . "; color:" . $this->getFeaturedTextColor() . ";" ?>
|
44 |
+
<li class="label" style="<?php echo $featuredStyle ?>">
|
45 |
+
<span><?php echo $this->getFeaturedText() ?></span>
|
46 |
+
<span class="arrow l-arrow" style="border-top:5px solid <?php echo $this->getFeaturedBackgroundColor() ?>;"> </span>
|
47 |
+
<span class="arrow rt-arrow" style="border-top:20px solid <?php echo $this->getFeaturedBackgroundColor() ?>;"> </span>
|
48 |
+
<span class="arrow rb-arrow" style="border-bottom:20px solid <?php echo $this->getFeaturedBackgroundColor() ?>;"> </span>
|
49 |
+
</li>
|
50 |
+
<?php endif; ?>
|
51 |
+
|
52 |
+
<?php if ( $this->isSale() || $this->isNew() || $this->isFeatured() ): ?>
|
53 |
+
</ul>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
app/etc/modules/Databunch_Labels.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Databunch_Labels>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
</Databunch_Labels>
|
8 |
+
</modules>
|
9 |
+
</config>
|
app/locale/ru_RU/Databunch_Labels.csv
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Labels","Метки"
|
2 |
+
"Labels general settings","Общие настройки меток"
|
3 |
+
"Labels location","Расположение меток"
|
4 |
+
"Top-left","Сверху слева"
|
5 |
+
"Top-right","Сверху справа"
|
6 |
+
"Bottom-left","Снизу слева"
|
7 |
+
"Bottom-right","Снизу справа"
|
8 |
+
"New Label","Новинка"
|
9 |
+
"Sale Label","Скидка"
|
10 |
+
"Show percentage","Показывать процент скидки"
|
11 |
+
"Show the percentage discount instead of label text","Показывать скидку в процентах вместо текста метки"
|
12 |
+
"Percent limit","Ограничение процента"
|
13 |
+
"Limit discounts from which percentage must be shown. 0 is for any percentage.","Для скидки больше указанной будет отображаться скидка в процентах вместо текста метки"
|
14 |
+
"Percent format","Формат скидки в процентах"
|
15 |
+
"Label text format. Use %d for percent value and %% for percent symbol, for example (-%d%% sale) for (-15% sale).","Используйте %d для величины скидки и %% для символа процента, например (скидка -%d%%) преобразуется в (скидка -15%) "
|
16 |
+
"Featured Label","Рекомендуемое"
|
17 |
+
"Text that will be on the label","Текст метки"
|
18 |
+
"Label background color","Цвет фона"
|
19 |
+
"Label text color","Цвет текста"
|
package.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Databunch_Labels</name>
|
4 |
+
<version>0.1.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>OSL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Product labels module</summary>
|
10 |
+
<description>Product labels module.
|
11 |
+
Supports
|
12 |
+
- New label;
|
13 |
+
- Sale label;
|
14 |
+
- Featured label.</description>
|
15 |
+
<notes>First release.
|
16 |
+
RWD theme ready.</notes>
|
17 |
+
<authors><author><name>DataBunchRussia</name><user>DataBunchRussia</user><email>info@databunch.ru</email></author></authors>
|
18 |
+
<date>2014-10-27</date>
|
19 |
+
<time>17:51:59</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Databunch"><dir name="Labels"><dir name="Block"><dir name="Catalog"><file name="Product.php" hash="b4998eadbd1b882b560e29b45c63d770"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="06dff06f46cef53bba9d158be1a76198"/></dir><dir name="Helper"><file name="Data.php" hash="aa0ab79c4a53d1491778374d5a24ad3a"/></dir><dir name="Model"><dir name="Config"><file name="Location.php" hash="3eedcf9b960f8447028deff9789ce137"/></dir><file name=".DS_Store" hash="60d450ab59b771a3c283579b2d35d28e"/></dir><dir name="etc"><file name="config.xml" hash="7fbdd0923d4598c5f0a048ca2d3363b4"/><file name="system.xml" hash="82cbe7a0ffef74ac894f9e85efc6dab8"/></dir><dir name="sql"><dir name="labels_setup"><file name="mysql4-install-0.1.0.php" hash="3eb28533f8abfb702d4f99ee9779e0e7"/></dir><file name=".DS_Store" hash="df85cefd15d303d0d6fbd8fc38dc05e1"/></dir><file name=".DS_Store" hash="d9f9500ec78b4def5b06c30c6c6248f5"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Databunch_Labels.xml" hash="bb887ddc09f1c98029d760f2a79e0eec"/></dir></target><target name="magelocale"><dir name="ru_RU"><file name="Databunch_Labels.csv" hash="e483a68bdaeee85482a0393e8f1353fe"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="rwd"><dir name="default"><dir name="layout"><dir name="databunch"><file name="labels.xml" hash="d4f4446eb3f0ef9c56e755bad4d89495"/></dir></dir><dir name="template"><dir name="catalog"><dir name="product"><file name="list.phtml" hash="1d6fcf194eb6592422a0ee66d56a704c"/><dir name="view"><file name="media.phtml" hash="503c0e5464d8bd700483062a503ee428"/></dir></dir></dir><dir name="databunch"><dir name="labels"><dir name="catalog"><file name="product.phtml" hash="03ab6bb41b302efec727e676a9b47726"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="databunch"><file name="labels.xml" hash="2c2bcd8b7c9318b1b94eb0fdef1cab63"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="rwd"><dir name="default"><dir name="css"><dir name="databunch"><file name="labels.css" hash="66056e2da94ecbb861b76d53e917f2fc"/></dir></dir></dir></dir></dir></target></contents>
|
21 |
+
<compatible/>
|
22 |
+
<dependencies><required><php><min>5.4.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
+
</package>
|
skin/frontend/rwd/default/css/databunch/labels.css
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* -------------------------------------------- *
|
2 |
+
* START: Product Labels (DataBunch) */
|
3 |
+
.product-label { position:absolute; top:0; left:0; /*width:100%;*/ opacity:0.8; }
|
4 |
+
.product-label .label { text-align:center; position:relative; min-width:90px; margin:4px 0 4px -8px; color:#fff; font-size:13px; }
|
5 |
+
.product-label .label span { display:block; padding:7px 15px; }
|
6 |
+
.product-label .label .arrow { position:absolute; }
|
7 |
+
.product-label .label .l-arrow,
|
8 |
+
.product-label .label .rt-arrow,
|
9 |
+
.product-label .label .rb-arrow { width:0; height:0; font-size:0; padding:0; }
|
10 |
+
.product-label .label .l-arrow { border-left:8px solid transparent; }
|
11 |
+
.product-label .label .rt-arrow,
|
12 |
+
.product-label .label .rb-arrow { right:-9px; border-right:10px solid transparent; }
|
13 |
+
.product-label .label .l-arrow { bottom:-5px; }
|
14 |
+
.product-label .label .rt-arrow { top:0; }
|
15 |
+
.product-label .label .rb-arrow { bottom:0; }
|
16 |
+
.product-label .sale,
|
17 |
+
.product-label .sale .arrow { background:#f24841; }
|
18 |
+
.product-label .sale .l-arrow { border-top:5px solid #a6332d; }
|
19 |
+
.product-label .sale .rt-arrow { border-top:20px solid #f24841; }
|
20 |
+
.product-label .sale .rb-arrow { border-bottom:20px solid #f24841; }
|
21 |
+
.product-label .new,
|
22 |
+
.product-label .new .arrow { background:#00ad5d; }
|
23 |
+
.product-label .new .l-arrow { border-top:5px solid #006134; }
|
24 |
+
.product-label .new .rt-arrow { border-top:20px solid #00ad5d; }
|
25 |
+
.product-label .new .rb-arrow { border-bottom:20px solid #00ad5d; }
|
26 |
+
.product-label .featured,
|
27 |
+
.product-label .featured .arrow { background:#3399cc; }
|
28 |
+
.product-label .featured .l-arrow { border-top:5px solid #206080; }
|
29 |
+
.product-label .featured .rt-arrow { border-top:20px solid #3399cc; }
|
30 |
+
.product-label .featured .rb-arrow { border-bottom:20px solid #3399cc; }
|
31 |
+
|
32 |
+
.product-label .sale .l-arrow,
|
33 |
+
.product-label .sale .rt-arrow,
|
34 |
+
.product-label .sale .rb-arrow,
|
35 |
+
.product-label .new .l-arrow,
|
36 |
+
.product-label .new .rt-arrow,
|
37 |
+
.product-label .new .rb-arrow,
|
38 |
+
.product-label .featured .l-arrow,
|
39 |
+
.product-label .featured .rt-arrow,
|
40 |
+
.product-label .featured .rb-arrow { background:none transparent; }
|
41 |
+
|
42 |
+
.products-grid .product-label .label { width:78px; font-size:12px; }
|
43 |
+
.products-grid .product-label .label span { padding:2px 8px; }
|
44 |
+
.products-grid .product-label .label .arrow { padding:0; }
|
45 |
+
|
46 |
+
.product-essential { /*position:relative;*/ }
|
47 |
+
.product-img-box { position:relative; }
|
48 |
+
|
49 |
+
/* START: Product Labels adding position option (DataBunch) */
|
50 |
+
.pl-top-left { top:0; left:0; right:auto; bottom:auto; }
|
51 |
+
.pl-top-right { top:0; right:0; left:auto; bottom:auto; }
|
52 |
+
.pl-bottom-left { bottom:4px; left:0; top:auto; right:auto; }
|
53 |
+
.pl-bottom-right { bottom:4px; right:0; top:auto; left:auto; }
|
54 |
+
|
55 |
+
.pl-top-right .label { margin-left:0; margin-right:-8px; }
|
56 |
+
.pl-bottom-right .label { margin-left:0; margin-right:-8px; }
|
57 |
+
.pl-top-right .label .rt-arrow,
|
58 |
+
.pl-top-right .label .rb-arrow,
|
59 |
+
.pl-bottom-right .label .rt-arrow,
|
60 |
+
.pl-bottom-right .label .rb-arrow { left:-9px; border-left:10px solid transparent; border-right:0 none; }
|
61 |
+
.pl-top-right .label .l-arrow { right:0; left:auto; border-right:8px solid transparent; border-left:0 none; }
|
62 |
+
.pl-bottom-right .label .l-arrow { right:0; left:auto; border-right:8px solid transparent; border-left:0 none; }
|
63 |
+
|
64 |
+
/*.product-img-box .pl-top-right,
|
65 |
+
.product-img-box .pl-bottom-right { right:15px; }
|
66 |
+
.product-img-box .pl-bottom-left,
|
67 |
+
.product-img-box .pl-bottom-right { bottom:140px; }*/
|
68 |
+
/* END: Product Labels adding position option (DataBunch) */
|
69 |
+
|
70 |
+
/* END: Product Labels (DataBunch)
|
71 |
+
* -------------------------------------------- /
|