GetSomeMojo_Pinterestmojo - Version 2.1.0

Version Notes

- Updated to match the latest Pinterest Pin It features
- Ability to select the PinIt Button Shape (Circular/Rectangular) within the System Configuration Options
- Ability to select the PinIt Button Color (Red/Gray/White) within the System Configuration Options
- Ability to select the PinIt Button Size (Small/Large) within the System Configuration Options
- Stable release

Download this release

Release Info

Developer Mitchell Robles, Jr.
Extension GetSomeMojo_Pinterestmojo
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.2 to 2.1.0

app/code/local/GetSomeMojo/Pinterestmojo/Block/PinterestButton.php CHANGED
@@ -4,16 +4,22 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
-
12
  class GetSomeMojo_Pinterestmojo_Block_PinterestButton extends Mage_Core_Block_Template
13
  {
14
 
15
  const PIN_BUTTON_ANCHOR_URL = '//pinterest.com/pin/create/button/';
16
  const PIN_BUTTON_IMAGE_URL = '//assets.pinterest.com/images/pidgets/pin_it_button.png';
 
 
 
 
 
 
17
 
18
  /**
19
  * Constructor. Set template.
@@ -28,7 +34,7 @@ class GetSomeMojo_Pinterestmojo_Block_PinterestButton extends Mage_Core_Block_Te
28
 
29
  if ($this->getYeaH4yeaH() && $currentProduct = Mage::registry('current_product')) {
30
  $this->setCurrentProduct($currentProduct);
31
- $this->setTemplate('getsomemojo/pinterestmojo/pinterest_button.phtml');
32
  }
33
 
34
  }
@@ -41,6 +47,9 @@ class GetSomeMojo_Pinterestmojo_Block_PinterestButton extends Mage_Core_Block_Te
41
  if ($this->getYeaH4yeaH() && $this->getCurrentProduct()) {
42
 
43
  $this->setButtonType($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_TYPE, $this->getCurrentStore()))
 
 
 
44
  ->setButtonAlign($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_ALIGN, $this->getCurrentStore()))
45
  ->setPinStyle($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_STYLE, $this->getCurrentStore()));
46
 
@@ -87,7 +96,51 @@ class GetSomeMojo_Pinterestmojo_Block_PinterestButton extends Mage_Core_Block_Te
87
 
88
  public function _getPinButtonImageUrl()
89
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  return self::PIN_BUTTON_IMAGE_URL;
91
  }
92
 
93
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
+
12
  class GetSomeMojo_Pinterestmojo_Block_PinterestButton extends Mage_Core_Block_Template
13
  {
14
 
15
  const PIN_BUTTON_ANCHOR_URL = '//pinterest.com/pin/create/button/';
16
  const PIN_BUTTON_IMAGE_URL = '//assets.pinterest.com/images/pidgets/pin_it_button.png';
17
+ const PIN_BUTTON_IMAGE_URL_SMALL_GRAY = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png';
18
+ const PIN_BUTTON_IMAGE_URL_LARGE_GRAY = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_28.png';
19
+ const PIN_BUTTON_IMAGE_URL_SMALL_RED = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_20.png';
20
+ const PIN_BUTTON_IMAGE_URL_LARGE_RED = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png';
21
+ const PIN_BUTTON_IMAGE_URL_SMALL_WHITE = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_white_20.png';
22
+ const PIN_BUTTON_IMAGE_URL_LARGE_WHITE = '//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_white_28.png';
23
 
24
  /**
25
  * Constructor. Set template.
34
 
35
  if ($this->getYeaH4yeaH() && $currentProduct = Mage::registry('current_product')) {
36
  $this->setCurrentProduct($currentProduct);
37
+ $this->setTemplate('getsomemojo/pinterestmojo/pinit.phtml');
38
  }
39
 
40
  }
47
  if ($this->getYeaH4yeaH() && $this->getCurrentProduct()) {
48
 
49
  $this->setButtonType($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_TYPE, $this->getCurrentStore()))
50
+ ->setButtonSize($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_SIZE, $this->getCurrentStore()))
51
+ ->setButtonShape($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_SHAPE, $this->getCurrentStore()))
52
+ ->setButtonColor($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_COLOR, $this->getCurrentStore()))
53
  ->setButtonAlign($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_ALIGN, $this->getCurrentStore()))
54
  ->setPinStyle($this->getMojoHelper()->getSystemConfigValue(GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL, GetSomeMojo_Pinterestmojo_Helper_Data::XML_MOJO_GENERAL_STYLE, $this->getCurrentStore()));
55
 
96
 
97
  public function _getPinButtonImageUrl()
98
  {
99
+ if ($this->_getPinButtonShape() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonShape::OPTION1_VALUE) {
100
+ if ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION1_VALUE &&
101
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION1_VALUE) {
102
+ return self::PIN_BUTTON_IMAGE_URL_LARGE_RED;
103
+ } elseif ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION1_VALUE &&
104
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION2_VALUE) {
105
+ return self::PIN_BUTTON_IMAGE_URL_SMALL_RED;
106
+ }
107
+
108
+ if ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION2_VALUE &&
109
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION1_VALUE) {
110
+ return self::PIN_BUTTON_IMAGE_URL_LARGE_GRAY;
111
+ } elseif ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION2_VALUE &&
112
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION2_VALUE) {
113
+ return self::PIN_BUTTON_IMAGE_URL_SMALL_GRAY;
114
+ }
115
+
116
+ if ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION3_VALUE &&
117
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION1_VALUE) {
118
+ return self::PIN_BUTTON_IMAGE_URL_LARGE_WHITE;
119
+ } elseif ($this->getButtonColor() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor::OPTION3_VALUE &&
120
+ $this->getButtonSize() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION2_VALUE) {
121
+ return self::PIN_BUTTON_IMAGE_URL_SMALL_WHITE;
122
+ }
123
+ }
124
+
125
  return self::PIN_BUTTON_IMAGE_URL;
126
  }
127
 
128
+ public function _getPinButtonShape()
129
+ {
130
+ if ($this->getButtonShape() != '') {
131
+ return $this->getButtonShape();
132
+ } else {
133
+ return GetSomeMojo_Pinterestmojo_Model_Config_ButtonShape::OPTION1_VALUE;
134
+ }
135
+ }
136
+
137
+ public function _getPinButtonSize()
138
+ {
139
+ if ($this->getButtonSize() != '') {
140
+ return $this->getButtonSize();
141
+ } else {
142
+ return GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize::OPTION1_VALUE;
143
+ }
144
+ }
145
+
146
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Helper/Data.php CHANGED
@@ -4,26 +4,29 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
-
12
  class GetSomeMojo_Pinterestmojo_Helper_Data extends Mage_Core_Helper_Abstract
13
  {
14
 
15
  /**
16
  * System Config Node Value Path Names
17
  */
18
- const XML_MOJO = 'pinterestmojo';
19
- const XML_MOJO_GENERAL = 'general';
20
- const XML_MOJO_GENERAL_ACTIVATE = 'activate';
21
- const XML_MOJO_GENERAL_TYPE = 'type';
22
- const XML_MOJO_GENERAL_COUNT = 'count';
23
- const XML_MOJO_GENERAL_PRICE = 'price';
24
- const XML_MOJO_GENERAL_ALIGN = 'align';
25
- const XML_MOJO_GENERAL_STYLE = 'style';
26
- const XML_MOJO_GENERAL_WIDTH = 'width';
 
 
 
27
 
28
  /**
29
  * Get System Config Values
@@ -38,4 +41,4 @@ class GetSomeMojo_Pinterestmojo_Helper_Data extends Mage_Core_Helper_Abstract
38
  return Mage::getStoreConfig(self::XML_MOJO . '/' . $type . '/' . $value, $store);
39
  }
40
 
41
- }
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
+
12
  class GetSomeMojo_Pinterestmojo_Helper_Data extends Mage_Core_Helper_Abstract
13
  {
14
 
15
  /**
16
  * System Config Node Value Path Names
17
  */
18
+ const XML_MOJO = 'pinterestmojo';
19
+ const XML_MOJO_GENERAL = 'general';
20
+ const XML_MOJO_GENERAL_ACTIVATE = 'activate';
21
+ const XML_MOJO_GENERAL_TYPE = 'type';
22
+ const XML_MOJO_GENERAL_SIZE = 'size';
23
+ const XML_MOJO_GENERAL_SHAPE = 'shape';
24
+ const XML_MOJO_GENERAL_COLOR = 'color';
25
+ const XML_MOJO_GENERAL_COUNT = 'count';
26
+ const XML_MOJO_GENERAL_PRICE = 'price';
27
+ const XML_MOJO_GENERAL_ALIGN = 'align';
28
+ const XML_MOJO_GENERAL_STYLE = 'style';
29
+ const XML_MOJO_GENERAL_WIDTH = 'width';
30
 
31
  /**
32
  * Get System Config Values
41
  return Mage::getStoreConfig(self::XML_MOJO . '/' . $type . '/' . $value, $store);
42
  }
43
 
44
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/Bn.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
@@ -21,13 +21,13 @@ class GetSomeMojo_Pinterestmojo_Model_Config_Bn extends Mage_Paypal_Model_Config
21
  /*
22
  * determine Magento Edition by License file name
23
  */
24
- if (file_exists('LICENSE_EE.txt')) {
25
  $newBnCode = 'MojoCreative_SI_MagentoEE';
26
- } elseif (file_exists('LICENSE_PRO.html')) {
27
  $newBnCode = 'MojoCreative_SI_MagentoPE';
28
  } else {
29
  $newBnCode = 'MojoCreative_SI_MagentoCE';
30
  }
31
  return $newBnCode;
32
  }
33
- }
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
21
  /*
22
  * determine Magento Edition by License file name
23
  */
24
+ if (Mage::getEdition() == 'Enterprise') {
25
  $newBnCode = 'MojoCreative_SI_MagentoEE';
26
+ } elseif (Mage::getEdition() == 'Professional') {
27
  $newBnCode = 'MojoCreative_SI_MagentoPE';
28
  } else {
29
  $newBnCode = 'MojoCreative_SI_MagentoCE';
30
  }
31
  return $newBnCode;
32
  }
33
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/ButtonAlign.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
@@ -17,7 +17,7 @@ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonAlign extends Mage_Core_Model
17
 
18
  /**
19
  * Fills the select field with values
20
- *
21
  * @return array
22
  */
23
  public function toOptionArray()
@@ -30,4 +30,4 @@ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonAlign extends Mage_Core_Model
30
 
31
  }
32
 
33
- }
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
17
 
18
  /**
19
  * Fills the select field with values
20
+ *
21
  * @return array
22
  */
23
  public function toOptionArray()
30
 
31
  }
32
 
33
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/ButtonColor.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mojo Creative & Technical Solutions LLC
4
+ *
5
+ * @category GetSomeMojo
6
+ * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
+ * @license http://getsome.mojomage.com/license/
9
+ * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
+ */
11
+
12
+ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonColor extends Mage_Core_Model_Config_Data
13
+ {
14
+
15
+ const OPTION1_VALUE = 'red';
16
+ const OPTION2_VALUE = 'gray';
17
+ const OPTION3_VALUE = 'white';
18
+
19
+ /**
20
+ * Fills the select field with values
21
+ *
22
+ * @return array
23
+ */
24
+ public function toOptionArray()
25
+ {
26
+
27
+ return array(
28
+ self::OPTION1_VALUE => Mage::helper('pinterestmojo')->__('Red'),
29
+ self::OPTION2_VALUE => Mage::helper('pinterestmojo')->__('Gray'),
30
+ self::OPTION3_VALUE => Mage::helper('pinterestmojo')->__('White')
31
+ );
32
+
33
+ }
34
+
35
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/ButtonShape.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mojo Creative & Technical Solutions LLC
4
+ *
5
+ * @category GetSomeMojo
6
+ * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
+ * @license http://getsome.mojomage.com/license/
9
+ * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
+ */
11
+
12
+ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonShape extends Mage_Core_Model_Config_Data
13
+ {
14
+
15
+ const OPTION1_VALUE = 'rectangular';
16
+ const OPTION2_VALUE = 'round';
17
+
18
+ /**
19
+ * Fills the select field with values
20
+ *
21
+ * @return array
22
+ */
23
+ public function toOptionArray()
24
+ {
25
+
26
+ return array(
27
+ self::OPTION1_VALUE => Mage::helper('pinterestmojo')->__('Rectangular'),
28
+ self::OPTION2_VALUE => Mage::helper('pinterestmojo')->__('Circular')
29
+ );
30
+
31
+ }
32
+
33
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/ButtonSize.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mojo Creative & Technical Solutions LLC
4
+ *
5
+ * @category GetSomeMojo
6
+ * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
+ * @license http://getsome.mojomage.com/license/
9
+ * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
+ */
11
+
12
+ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonSize extends Mage_Core_Model_Config_Data
13
+ {
14
+
15
+ const OPTION1_VALUE = 'large';
16
+ const OPTION2_VALUE = 'small';
17
+
18
+ /**
19
+ * Fills the select field with values
20
+ *
21
+ * @return array
22
+ */
23
+ public function toOptionArray()
24
+ {
25
+
26
+ return array(
27
+ self::OPTION1_VALUE => Mage::helper('pinterestmojo')->__('Large'),
28
+ self::OPTION2_VALUE => Mage::helper('pinterestmojo')->__('Small')
29
+ );
30
+
31
+ }
32
+
33
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/ButtonType.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
@@ -18,7 +18,7 @@ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonType extends Mage_Core_Model_
18
 
19
  /**
20
  * Fills the select field with values
21
- *
22
  * @return array
23
  */
24
  public function toOptionArray()
@@ -32,4 +32,4 @@ class GetSomeMojo_Pinterestmojo_Model_Config_ButtonType extends Mage_Core_Model_
32
 
33
  }
34
 
35
- }
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
18
 
19
  /**
20
  * Fills the select field with values
21
+ *
22
  * @return array
23
  */
24
  public function toOptionArray()
32
 
33
  }
34
 
35
+ }
app/code/local/GetSomeMojo/Pinterestmojo/Model/Config/PinCount.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
@@ -18,7 +18,7 @@ class GetSomeMojo_Pinterestmojo_Model_Config_PinCount extends Mage_Core_Model_Co
18
 
19
  /**
20
  * Fills the select field with values
21
- *
22
  * @return array
23
  */
24
  public function toOptionArray()
@@ -32,4 +32,4 @@ class GetSomeMojo_Pinterestmojo_Model_Config_PinCount extends Mage_Core_Model_Co
32
 
33
  }
34
 
35
- }
4
  *
5
  * @category GetSomeMojo
6
  * @package GetSomeMojo_Pinterestmojo
7
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
18
 
19
  /**
20
  * Fills the select field with values
21
+ *
22
  * @return array
23
  */
24
  public function toOptionArray()
32
 
33
  }
34
 
35
+ }
app/code/local/GetSomeMojo/Pinterestmojo/etc/config.xml CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
@@ -13,7 +13,7 @@
13
  <config>
14
  <modules>
15
  <GetSomeMojo_Pinterestmojo>
16
- <version>2.0.2</version>
17
  </GetSomeMojo_Pinterestmojo>
18
  </modules>
19
  <admin>
@@ -37,7 +37,7 @@
37
  <pinterestmojo>
38
  <class>GetSomeMojo_Pinterestmojo_Helper</class>
39
  </pinterestmojo>
40
- </helpers>
41
  <models>
42
  <pinterestmojo>
43
  <class>GetSomeMojo_Pinterestmojo_Model_Config</class>
@@ -54,7 +54,7 @@
54
  <layout>
55
  <updates>
56
  <getsomemojo_pinterestmojo>
57
- <file>getsomemojo/pinterestmojo/pinterest.xml</file>
58
  </getsomemojo_pinterestmojo>
59
  </updates>
60
  </layout>
@@ -95,6 +95,9 @@
95
  <price>1</price>
96
  </general>
97
  </pinterestmojo>
 
 
 
98
  </default>
99
 
100
- </config>
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
13
  <config>
14
  <modules>
15
  <GetSomeMojo_Pinterestmojo>
16
+ <version>2.1.0</version>
17
  </GetSomeMojo_Pinterestmojo>
18
  </modules>
19
  <admin>
37
  <pinterestmojo>
38
  <class>GetSomeMojo_Pinterestmojo_Helper</class>
39
  </pinterestmojo>
40
+ </helpers>
41
  <models>
42
  <pinterestmojo>
43
  <class>GetSomeMojo_Pinterestmojo_Model_Config</class>
54
  <layout>
55
  <updates>
56
  <getsomemojo_pinterestmojo>
57
+ <file>getsomemojo/pinterestmojo.xml</file>
58
  </getsomemojo_pinterestmojo>
59
  </updates>
60
  </layout>
95
  <price>1</price>
96
  </general>
97
  </pinterestmojo>
98
+ <paypal>
99
+ <bncode>MojoCreative_SI_MagentoCE</bncode>
100
+ </paypal>
101
  </default>
102
 
103
+ </config>
app/code/local/GetSomeMojo/Pinterestmojo/etc/system.xml CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
@@ -59,10 +59,40 @@
59
  <backend_model>pinterestmojo/ButtonType</backend_model>
60
  <source_model>pinterestmojo/ButtonType</source_model>
61
  </type>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  <count translate="label">
63
  <label>Pin Count</label>
64
  <frontend_type>select</frontend_type>
65
- <sort_order>10</sort_order>
66
  <show_in_default>1</show_in_default>
67
  <show_in_website>1</show_in_website>
68
  <show_in_store>1</show_in_store>
@@ -119,11 +149,49 @@
119
  <show_in_default>1</show_in_default>
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>1</show_in_store>
122
- <comment>Default: Yes</comment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  </price>
124
  </fields>
125
  </general>
126
  </groups>
127
  </pinterestmojo>
128
  </sections>
129
- </config>
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
59
  <backend_model>pinterestmojo/ButtonType</backend_model>
60
  <source_model>pinterestmojo/ButtonType</source_model>
61
  </type>
62
+ <size translate="label">
63
+ <label>Button Size</label>
64
+ <frontend_type>select</frontend_type>
65
+ <sort_order>10</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ <backend_model>pinterestmojo/ButtonSize</backend_model>
70
+ <source_model>pinterestmojo/ButtonSize</source_model>
71
+ </size>
72
+ <shape translate="label">
73
+ <label>Button Shape</label>
74
+ <frontend_type>select</frontend_type>
75
+ <sort_order>12</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ <backend_model>pinterestmojo/ButtonShape</backend_model>
80
+ <source_model>pinterestmojo/ButtonShape</source_model>
81
+ </shape>
82
+ <color translate="label">
83
+ <label>Button Color</label>
84
+ <frontend_type>select</frontend_type>
85
+ <sort_order>15</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>1</show_in_store>
89
+ <backend_model>pinterestmojo/ButtonColor</backend_model>
90
+ <source_model>pinterestmojo/ButtonColor</source_model>
91
+ </color>
92
  <count translate="label">
93
  <label>Pin Count</label>
94
  <frontend_type>select</frontend_type>
95
+ <sort_order>17</sort_order>
96
  <show_in_default>1</show_in_default>
97
  <show_in_website>1</show_in_website>
98
  <show_in_store>1</show_in_store>
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
+ <comment>
153
+ Default: Yes
154
+ <![CDATA[
155
+ <script type="text/javascript">
156
+
157
+ if ($('pinterestmojo_general_shape').value == 'round') {
158
+ $('pinterestmojo_general_count').disabled = true;
159
+ $('pinterestmojo_general_color').disabled = true;
160
+ } else {
161
+ $('pinterestmojo_general_count').disabled = false;
162
+ $('pinterestmojo_general_color').disabled = false;
163
+ }
164
+
165
+ $('pinterestmojo_general_shape').on('change', function() {
166
+ if (this.value == 'rectangular') {
167
+ $('pinterestmojo_general_count').disabled = false;
168
+ $('pinterestmojo_general_color').disabled = false;
169
+ } else {
170
+ $('pinterestmojo_general_count').disabled = true;
171
+ $('pinterestmojo_general_color').disabled = true;
172
+ }
173
+ });
174
+
175
+ if ($('pinterestmojo_general_type').value == 'any' || $('pinterestmojo_general_type').value == 'hover') {
176
+ $('pinterestmojo_general_count').disabled = true;
177
+ } else {
178
+ $('pinterestmojo_general_count').disabled = false;
179
+ }
180
+
181
+ $('pinterestmojo_general_type').on('change', function() {
182
+ if (this.value == 'any' || this.value == 'hover') {
183
+ $('pinterestmojo_general_count').disabled = true;
184
+ } else {
185
+ $('pinterestmojo_general_count').disabled = false;
186
+ }
187
+ });
188
+ </script>
189
+ ]]>
190
+ </comment>
191
  </price>
192
  </fields>
193
  </general>
194
  </groups>
195
  </pinterestmojo>
196
  </sections>
197
+ </config>
app/design/frontend/base/default/layout/getsomemojo/{pinterestmojo/pinterest.xml → pinterestmojo.xml} RENAMED
@@ -1,11 +1,11 @@
1
  <?xml version="1.0"?>
2
- <!--
3
  /**
4
  * Mojo Creative & Technical Solutions LLC
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
- * @copyright Copyright (c) 2011-2013 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
@@ -18,4 +18,4 @@
18
  </reference>
19
  </reference>
20
  </catalog_product_view>
21
- </layout>
1
  <?xml version="1.0"?>
2
+ <!--
3
  /**
4
  * Mojo Creative & Technical Solutions LLC
5
  *
6
  * @category GetSomeMojo
7
  * @package GetSomeMojo_Pinterestmojo
8
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
  * @license http://getsome.mojomage.com/license/
10
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
  */
18
  </reference>
19
  </reference>
20
  </catalog_product_view>
21
+ </layout>
app/design/frontend/base/default/template/getsomemojo/pinterestmojo/{pinterest_button.phtml → pinit.phtml} RENAMED
@@ -8,7 +8,7 @@
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
- ?>
12
  <?php if ($this->getYeaH4yeaH()): ?>
13
 
14
  <script type="text/javascript">
@@ -28,18 +28,41 @@
28
 
29
  <?php if ($this->getButtonType() != GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION3_VALUE): ?>
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  <div id="mojoPinterest" align="<?php echo $this->getButtonAlign() ?>" style="<?php echo $this->getPinStyle() ?>">
32
  <?php if ($this->getButtonType() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION1_VALUE): ?>
33
- <a href="<?php echo $this->getPinUrl();?>" class="pin-it-button" data-pin-do="buttonPin" data-pin-config="<?php echo $this->getPinCount();?>">
34
  <img src="<?php echo $this->_getPinButtonImageUrl() ?>" alt="Pin It" />
35
  </a>
36
  <?php elseif ($this->getButtonType() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION2_VALUE): ?>
37
- <a href="<?php echo $this->_getPinButtonAnchorUrl() ?>" data-pin-do="buttonBookmark">
38
  <img src="<?php echo $this->_getPinButtonImageUrl() ?>" alt="Pin It" />
39
  </a>
40
  <?php endif ?>
41
- </div>
42
 
43
  <?php endif ?>
44
 
45
- <?php endif ?>
8
  * @license http://getsome.mojomage.com/license/
9
  * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
10
  */
11
+ ?>
12
  <?php if ($this->getYeaH4yeaH()): ?>
13
 
14
  <script type="text/javascript">
28
 
29
  <?php if ($this->getButtonType() != GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION3_VALUE): ?>
30
 
31
+ <?php $pinterestOptions = array(); ?>
32
+
33
+ <?php if ($this->getButtonShape() == 'round' && !isset($pinterestOptions['data-pin-shape'])): ?>
34
+ <?php $pinterestOptions['data-pin-shape'] = $this->getButtonShape(); ?>
35
+ <?php endif; ?>
36
+
37
+ <?php if ($this->getButtonShape() == 'rectangular' && $this->getButtonSize() == 'large' && !isset($pinterestOptions['data-pin-height'])): ?>
38
+ <?php $pinterestOptions['data-pin-height'] = 28; ?>
39
+ <?php elseif ($this->getButtonShape() == 'round' && $this->getButtonSize() == 'large' && !isset($pinterestOptions['data-pin-height'])): ?>
40
+ <?php $pinterestOptions['data-pin-height'] = 32; ?>
41
+ <?php endif; ?>
42
+
43
+ <?php if ($this->getButtonShape() == 'rectangular' && !isset($pinterestOptions['data-pin-color'])): ?>
44
+ <?php $pinterestOptions['data-pin-color'] = $this->getButtonColor(); ?>
45
+ <?php endif; ?>
46
+
47
+ <?php $urlOptions = ''; ?>
48
+ <?php foreach ($pinterestOptions as $key => $value): ?>
49
+ <?php if (!empty($value)): ?>
50
+ <?php $urlOptions .= ' ' . $key . '="' . $value . '"'; ?>
51
+ <?php endif; ?>
52
+ <?php endforeach; ?>
53
+
54
  <div id="mojoPinterest" align="<?php echo $this->getButtonAlign() ?>" style="<?php echo $this->getPinStyle() ?>">
55
  <?php if ($this->getButtonType() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION1_VALUE): ?>
56
+ <a href="<?php echo $this->getPinUrl(); ?>" class="pin-it-button" data-pin-do="buttonPin" data-pin-config="<?php echo $this->getPinCount(); ?>"<?php echo $urlOptions; ?>>
57
  <img src="<?php echo $this->_getPinButtonImageUrl() ?>" alt="Pin It" />
58
  </a>
59
  <?php elseif ($this->getButtonType() == GetSomeMojo_Pinterestmojo_Model_Config_ButtonType::OPTION2_VALUE): ?>
60
+ <a href="<?php echo $this->_getPinButtonAnchorUrl() ?>" data-pin-do="buttonBookmark"<?php echo $urlOptions; ?>>
61
  <img src="<?php echo $this->_getPinButtonImageUrl() ?>" alt="Pin It" />
62
  </a>
63
  <?php endif ?>
64
+ </div>
65
 
66
  <?php endif ?>
67
 
68
+ <?php endif ?>
app/etc/modules/GetSomeMojo_Pinterestmojo.xml CHANGED
@@ -1,5 +1,15 @@
1
  <?xml version="1.0"?>
2
-
 
 
 
 
 
 
 
 
 
 
3
  <config>
4
  <modules>
5
  <GetSomeMojo_Pinterestmojo>
@@ -7,4 +17,4 @@
7
  <codePool>local</codePool>
8
  </GetSomeMojo_Pinterestmojo>
9
  </modules>
10
- </config>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Mojo Creative & Technical Solutions LLC
5
+ *
6
+ * @category GetSomeMojo
7
+ * @package GetSomeMojo_Pinterestmojo
8
+ * @copyright Copyright (c) 2011-2015 Mojo Creative & Technical Solutions LLC (http://GetSome.MojoMage.com)
9
+ * @license http://getsome.mojomage.com/license/
10
+ * @author Mojo Creative & Technical Solutions LLC <info@MojoMage.com>
11
+ */
12
+ -->
13
  <config>
14
  <modules>
15
  <GetSomeMojo_Pinterestmojo>
17
  <codePool>local</codePool>
18
  </GetSomeMojo_Pinterestmojo>
19
  </modules>
20
+ </config>
package.xml CHANGED
@@ -1,22 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>GetSomeMojo_Pinterestmojo</name>
4
- <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://getsome.mojomage.com/license/">Custom</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds the Pinterest Pin Button to the Product View page.</summary>
10
  <description>Increase SEO and your social presence by adding the Pinterest Pin button to your Product View pages. Back-end system configurations settings allow administrators to easily control the latest Pinterest Pin It Button features.</description>
11
- <notes>- All the code has been refactored&#xD;
12
- &lt;br /&gt;&#xD;
13
- - Updated to match the latest Pinterest Pin It features&#xD;
14
- &lt;br /&gt;&#xD;
15
  - Stable release</notes>
16
- <authors><author><name>Mitch Robles, Jr.</name><user>auto-converted</user><email>info@getsomemojo.net</email></author></authors>
17
- <date>2013-06-12</date>
18
- <time>04:45:30</time>
19
- <contents><target name="mageetc"><dir name="modules"><file name="GetSomeMojo_Pinterestmojo.xml" hash="754937eada3236e4628ed37fb4d826d9"/></dir></target><target name="magelocal"><dir name="GetSomeMojo"><dir name="Pinterestmojo"><dir name="Block"><file name="PinterestButton.php" hash="422fc91c24d84e77dbe3c087210059eb"/></dir><dir name="Helper"><file name="Data.php" hash="bb7343d9153708238cef41005c58ad06"/></dir><dir name="Model"><dir name="Config"><file name="Bn.php" hash="a7eea2937b14d9d3c8a169020c2deacf"/><file name="ButtonAlign.php" hash="a5a27aebb7ce1796fd0051b3540111c2"/><file name="ButtonType.php" hash="0c946e1b5fdf1a71cb86c93dd9dc5267"/><file name="PinCount.php" hash="7cb0d1cdf694e6079f7cd692ca6233d9"/></dir></dir><dir name="etc"><file name="config.xml" hash="cbe474458070fc0d89f5b13540448e5c"/><file name="system.xml" hash="4141d764f069e8342188e4b2c1707aad"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="getsomemojo"><dir name="pinterestmojo"><file name="pinterest.xml" hash="1d4e687512b5a3e4deccb79bdca13b11"/></dir></dir></dir><dir name="template"><dir name="getsomemojo"><dir name="pinterestmojo"><file name="pinterest_button.phtml" hash="242f6a1925e06cebfa7847a5450b8773"/></dir></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
- <dependencies><required><package><name></name><channel>community</channel><min></min><max></max></package></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>GetSomeMojo_Pinterestmojo</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://getsome.mojomage.com/license/">Custom</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Adds the Pinterest Pin Button to the Product View page.</summary>
10
  <description>Increase SEO and your social presence by adding the Pinterest Pin button to your Product View pages. Back-end system configurations settings allow administrators to easily control the latest Pinterest Pin It Button features.</description>
11
+ <notes>- Updated to match the latest Pinterest Pin It features&#xD;
12
+ - Ability to select the PinIt Button Shape (Circular/Rectangular) within the System Configuration Options&#xD;
13
+ - Ability to select the PinIt Button Color (Red/Gray/White) within the System Configuration Options&#xD;
14
+ - Ability to select the PinIt Button Size (Small/Large) within the System Configuration Options&#xD;
15
  - Stable release</notes>
16
+ <authors><author><name>Mitchell Robles, Jr.</name><user>mojomitch</user><email>info@getsomemojo.net</email></author></authors>
17
+ <date>2015-04-30</date>
18
+ <time>00:37:18</time>
19
+ <contents><target name="magelocal"><dir name="GetSomeMojo"><dir name="Pinterestmojo"><dir name="Block"><file name="PinterestButton.php" hash="d3ef5c29d873d786406f4f49591b19b2"/></dir><dir name="Helper"><file name="Data.php" hash="80e41bd1a395b06658cebd71561ddb4a"/></dir><dir name="Model"><dir name="Config"><file name="Bn.php" hash="c28dfe0cd9c348b924f3da692c2219c3"/><file name="ButtonAlign.php" hash="a9e707f93d71a5c322388d6f1d8d16d1"/><file name="ButtonColor.php" hash="dfae27e1182dde59acb202a0c59370f2"/><file name="ButtonShape.php" hash="7a319839953bba126a91fbdefec3516b"/><file name="ButtonSize.php" hash="b8b86fe9fe03b5221b2d3882c83d257c"/><file name="ButtonType.php" hash="606a53c02a0aea20abf487f6a8f59f0c"/><file name="PinCount.php" hash="1a94d7f3adf11b7ffa690793d0bad3d3"/></dir></dir><dir name="etc"><file name="config.xml" hash="dbf0e836fd6c92ef6031e9a416ee1a2f"/><file name="system.xml" hash="f73465868a5eda2560317a70b89e76be"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="GetSomeMojo_Pinterestmojo.xml" hash="609698f466ba33046e29f616ca0eeb27"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="getsomemojo"><file name="pinterestmojo.xml" hash="a4ff3611810f36162641749c6ca4290c"/></dir></dir><dir name="template"><dir name="getsomemojo"><dir name="pinterestmojo"><file name="pinit.phtml" hash="22564db69cd3677b56a64edb60e55c75"/></dir></dir></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
+ <dependencies><required><php><min>5.1.0</min><max>5.5.14</max></php></required></dependencies>
22
  </package>