Online_Ring_Sizer - Version 1.0.0.3

Version Notes

User can select categories and include jquery in admin panel for viewig button.

Download this release

Release Info

Developer TripleNext
Extension Online_Ring_Sizer
Version 1.0.0.3
Comparing to
See all releases


Code changes from version 1.0.0.2 to 1.0.0.3

app/code/community/TripleNext/OnlineRingSizer/etc/config.xml CHANGED
@@ -19,6 +19,13 @@
19
  <!-- ... -->
20
  </models>
21
  </global>
 
 
 
 
 
 
 
22
  <frontend>
23
  <layout>
24
  <updates>
@@ -37,9 +44,9 @@
37
  <children>
38
  <config>
39
  <children>
40
- <my_section>
41
- <title>My Section</title>
42
- </my_section>
43
  </children>
44
  </config>
45
  </children>
19
  <!-- ... -->
20
  </models>
21
  </global>
22
+ <default>
23
+ <FMRS_section>
24
+ <FMRS_group>
25
+ <include_jquery>1</include_jquery>
26
+ </FMRS_group>
27
+ </FMRS_section>
28
+ </default>
29
  <frontend>
30
  <layout>
31
  <updates>
44
  <children>
45
  <config>
46
  <children>
47
+ <FMRS_section>
48
+ <title>FMRS Section</title>
49
+ </FMRS_section>
50
  </children>
51
  </config>
52
  </children>
app/code/community/TripleNext/OnlineRingSizer/etc/system.xml CHANGED
@@ -7,7 +7,7 @@
7
  </tabs>
8
  <sections>
9
  <my_section translate="label">
10
- <label>Select Categories</label>
11
  <tab>sizerconfig</tab>
12
  <frontend_type></frontend_type>
13
  <sort_order>910</sort_order>
@@ -15,8 +15,8 @@
15
  <show_in_website>1</show_in_website>
16
  <show_in_store>1</show_in_store>
17
  <groups>
18
- <categories_group translate="label">
19
- <label>Categories Group</label>
20
  <sort_order>4</sort_order>
21
  <show_in_default>1</show_in_default>
22
  <show_in_website>1</show_in_website>
@@ -33,8 +33,20 @@
33
  <show_in_store>1</show_in_store>
34
  </category>
35
  </fields>
36
- </categories_group>
 
 
 
 
 
 
 
 
 
 
 
 
37
  </groups>
38
- </my_section>
39
  </sections>
40
  </config>
7
  </tabs>
8
  <sections>
9
  <my_section translate="label">
10
+ <label>Settings</label>
11
  <tab>sizerconfig</tab>
12
  <frontend_type></frontend_type>
13
  <sort_order>910</sort_order>
15
  <show_in_website>1</show_in_website>
16
  <show_in_store>1</show_in_store>
17
  <groups>
18
+ <FMRS_group translate="label">
19
+ <label>Online Ring Sizer Group</label>
20
  <sort_order>4</sort_order>
21
  <show_in_default>1</show_in_default>
22
  <show_in_website>1</show_in_website>
33
  <show_in_store>1</show_in_store>
34
  </category>
35
  </fields>
36
+ <fields>
37
+ <include_jquery>
38
+ <label>Include jQuery</label>
39
+ <frontend_type>select</frontend_type>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <sort_order>2</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
+ <comment><![CDATA[Include jQuery 1.7. Set this to NO if you are already using jQuery in your webshop. ]]></comment>
46
+ </include_jquery>
47
+ </fields>
48
+ </FMRS_group>
49
  </groups>
50
+ </my_section>
51
  </sections>
52
  </config>
app/design/frontend/default/default/layout/TripleNext/OnlineRingSizer/FMRSmod.xml CHANGED
@@ -2,18 +2,9 @@
2
  <layout version="0.1.0">
3
  <catalog_product_view>
4
  <reference name="head">
5
- <block type="core/text" name="google.cdn.jquery">
6
- <action method="setText">
7
- <text>
8
- <![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]>
9
- </text>
10
- </action>
11
- </block>
12
  <block type="core/template" name="fmrs_module_js" template="TripleNext/OnlineRingSizer/js.phtml" before="-" />
13
  </reference>
14
- <reference name="head">
15
- <action method="addJs"><script>folder/file.js</script></action>
16
- </reference>
17
  <reference name="alert.urls">
18
  <block type="core/template" name="fmrs_module_button" template="TripleNext/OnlineRingSizer/button.phtml" before="-" />
19
  </reference>
2
  <layout version="0.1.0">
3
  <catalog_product_view>
4
  <reference name="head">
5
+ <block type="core/template" name="fmrs_module_jQuery" template="TripleNext/OnlineRingSizer/jQuery.phtml" before="-" />
 
 
 
 
 
 
6
  <block type="core/template" name="fmrs_module_js" template="TripleNext/OnlineRingSizer/js.phtml" before="-" />
7
  </reference>
 
 
 
8
  <reference name="alert.urls">
9
  <block type="core/template" name="fmrs_module_button" template="TripleNext/OnlineRingSizer/button.phtml" before="-" />
10
  </reference>
app/design/frontend/default/default/template/TripleNext/OnlineRingSizer/button.phtml CHANGED
@@ -2,7 +2,7 @@
2
 
3
  <?php $curProductCategoryIds = $_product->getCategoryIds() ?>
4
 
5
- <?php $selectedCategoryIds = (Mage::getStoreConfig('my_section/categories_group/category'))//Ids of selected category in System->Configuration?>
6
 
7
  <?php $selCategoryIds = explode(",", $selectedCategoryIds); ?>
8
 
2
 
3
  <?php $curProductCategoryIds = $_product->getCategoryIds() ?>
4
 
5
+ <?php $selectedCategoryIds = (Mage::getStoreConfig('my_section/FMRS_group/category'))//Ids of selected category in System->Configuration?>
6
 
7
  <?php $selCategoryIds = explode(",", $selectedCategoryIds); ?>
8
 
app/design/frontend/default/default/template/TripleNext/OnlineRingSizer/jQuery.phtml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php $includejQuery = (Mage::getStoreConfig('my_section/FMRS_group/include_jquery'))//include jQuery in admin panel?>
2
+
3
+ <!-- include jQuery if need -->
4
+ <?php if ($includejQuery): ?>
5
+ <script type="text/javascript">document.write(unescape("%3Cscript type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'%3E%3C/script%3E %3Cscript type='text/javascript'%3EjQuery.noConflict();%3C/script%3E"));</script>
6
+ <?php endif; ?>
app/design/frontend/default/default/template/TripleNext/OnlineRingSizer/js.phtml CHANGED
@@ -1,6 +1,19 @@
1
- <?php $_product = Mage::registry('current_product') ?><?php $curProductCategoryIds = $_product->getCategoryIds() ?><?php $selectedCategoryIds = (Mage::getStoreConfig('my_section/categories_group/category'))//Ids of selected category in System->Configuration?><?php $selCategoryIds = explode(",", $selectedCategoryIds); ?><?php foreach($curProductCategoryIds as $curProductCategoryId) {?><?php foreach($selCategoryIds as $selCategoryId) {?><?php if ($curProductCategoryId == $selCategoryId): ?>
 
 
 
 
 
 
 
 
 
 
 
2
  <!--this is your pop-up ring sizer magic : put this on the bottom of your page before your <\body> tag -->
3
  <!--FMRS-POPUP:BEGIN -->
 
 
4
  <script type='text/javascript'>
5
  var host = (("https:" == document.location.protocol) ? "https://" : "http://"); document.write(unescape("%3Cscript src='" + host + "findmyringsize.com/Shared/Embed/fmrs-1.0.js' type='text/javascript'%3E%3C/script%3E"));
6
  </script>
1
+
2
+ <?php $_product = Mage::registry('current_product') ?>
3
+
4
+ <?php $curProductCategoryIds = $_product->getCategoryIds() ?>
5
+
6
+ <?php $selectedCategoryIds = (Mage::getStoreConfig('my_section/FMRS_group/category'))//Ids of selected category in System->Configuration?><?php $selCategoryIds = explode(",", $selectedCategoryIds); ?>
7
+
8
+ <?php foreach($curProductCategoryIds as $curProductCategoryId) {?>
9
+
10
+ <?php foreach($selCategoryIds as $selCategoryId) {?>
11
+
12
+ <?php if ($curProductCategoryId == $selCategoryId): ?>
13
  <!--this is your pop-up ring sizer magic : put this on the bottom of your page before your <\body> tag -->
14
  <!--FMRS-POPUP:BEGIN -->
15
+
16
+
17
  <script type='text/javascript'>
18
  var host = (("https:" == document.location.protocol) ? "https://" : "http://"); document.write(unescape("%3Cscript src='" + host + "findmyringsize.com/Shared/Embed/fmrs-1.0.js' type='text/javascript'%3E%3C/script%3E"));
19
  </script>
js/checkjQuery/addJqueryIfAbsent.js DELETED
@@ -1,9 +0,0 @@
1
- if ( (typeof jQuery === 'undefined') && !window.jQuery ) {
2
- document.write(unescape("%3Cscript type='text/javascript' src='//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'%3E%3C/script%3E%3Cscript type='text/javascript'%3EjQuery.noConflict();%3C/script%3E"));
3
- } else {
4
- if((typeof jQuery === 'undefined') && window.jQuery) {
5
- jQuery = window.jQuery;
6
- } else if((typeof jQuery !== 'undefined') && !window.jQuery) {
7
- window.jQuery = jQuery;
8
- }
9
- }
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,19 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Online_Ring_Sizer</name>
4
- <version>1.0.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://findmyringsize.com/en/Info/TermsAndConditions.aspx">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A simple on display ring sizer widget that let your customers find their ring size online</summary>
10
  <description>FindMyRingSize is a unique On Display Ring Sizer. Our unique technology offers a simple, reliable and highly accurate solution for online jewelry customers to find their ring size. It's an intuitive process, which takes less than a minute.</description>
11
- <notes>User can select categories in admin panel for viewig button.&#xD;
12
- Include jQuery lib. if absent</notes>
13
  <authors><author><name>TripleNext</name><user>triplenext</user><email>ev@triplenext.com</email></author></authors>
14
  <date>2013-08-14</date>
15
- <time>13:54:19</time>
16
- <contents><target name="magecommunity"><dir name="TripleNext"><dir name="OnlineRingSizer"><dir name="etc"><file name="config.xml" hash="eb1d9724ca0249133fc82a6021122ba0"/><file name="system.xml" hash="a3eb2103424f0a75a54b17bfc3469801"/><file name="adminhtml.xml" hash="9bc4c7cc422ecf059757b7fc97f619ce"/></dir><dir name="Helper"><file name="Data.php" hash="a40e9f10f180b266efcae390590f3b76"/></dir><dir name="Model"><file name="Categories.php" hash="9c06b0a6d8a51ab9a0d026c8541b66d6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TripleNext_OnlineRingSizer.xml" hash="b421e9c14e473a46a10968ea6e176412"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="TripleNext"><dir name="OnlineRingSizer"><file name="button.phtml" hash="1128c16c2ae6a115b51e99674aa44d66"/><file name="js.phtml" hash="55788d4062e2eb80e1a36a51aea58ac4"/></dir></dir></dir><dir name="layout"><dir name="TripleNext"><dir name="OnlineRingSizer"><file name="FMRSmod.xml" hash="6109f74629271dc141bbecdc9ea137fc"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="checkjQuery"><file name="addJqueryIfAbsent.js" hash="4c39032b6a4280c71d4aacd12c1f7384"/></dir></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Online_Ring_Sizer</name>
4
+ <version>1.0.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://findmyringsize.com/en/Info/TermsAndConditions.aspx">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>A simple on display ring sizer widget that let your customers find their ring size online</summary>
10
  <description>FindMyRingSize is a unique On Display Ring Sizer. Our unique technology offers a simple, reliable and highly accurate solution for online jewelry customers to find their ring size. It's an intuitive process, which takes less than a minute.</description>
11
+ <notes>User can select categories and include jquery in admin panel for viewig button.</notes>
 
12
  <authors><author><name>TripleNext</name><user>triplenext</user><email>ev@triplenext.com</email></author></authors>
13
  <date>2013-08-14</date>
14
+ <time>23:03:15</time>
15
+ <contents><target name="magecommunity"><dir name="TripleNext"><dir name="OnlineRingSizer"><dir name="etc"><file name="config.xml" hash="f6fe1cd66d827733c0138ebd3365ae9a"/><file name="system.xml" hash="cf077ecaf126f126c0ff8ec0e8d9aa6e"/><file name="adminhtml.xml" hash="9bc4c7cc422ecf059757b7fc97f619ce"/></dir><dir name="Helper"><file name="Data.php" hash="a40e9f10f180b266efcae390590f3b76"/></dir><dir name="Model"><file name="Categories.php" hash="9c06b0a6d8a51ab9a0d026c8541b66d6"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TripleNext_OnlineRingSizer.xml" hash="b421e9c14e473a46a10968ea6e176412"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="TripleNext"><dir name="OnlineRingSizer"><file name="button.phtml" hash="2a23e395ddb681db224db2e4abd4db8d"/><file name="js.phtml" hash="58682ec79b3f3be6fc1d2d26c406e3e5"/><file name="jQuery.phtml" hash="1293a206ad0c1948fe13d7643b41de85"/></dir></dir></dir><dir name="layout"><dir name="TripleNext"><dir name="OnlineRingSizer"><file name="FMRSmod.xml" hash="004a479512d9a877467404a25b932915"/></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>