Version Notes
Hide OneID Checkout button for unsupported IE browsers
Download this release
Release Info
Developer | OneID |
Extension | OneID |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
app/code/community/OneID/Connector/Helper/Data.php
CHANGED
@@ -16,6 +16,8 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
16 |
|
17 |
const REFERRAL_CODE = "magerefcode"; // prob need to toss this into magento admin
|
18 |
|
|
|
|
|
19 |
public function getButton($container_class="") {
|
20 |
$button = '<div class="'.$container_class.' oneid-api-ready"><img class="oneidlogin" style="margin-left:6px; margin-top:-4px"
|
21 |
return_to="'. $this->_getUrl("/") .'"
|
@@ -48,6 +50,23 @@ class OneID_Connector_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
48 |
return $button;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
public function getCreateOneIdAttrs() {
|
52 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
53 |
$data = array(
|
16 |
|
17 |
const REFERRAL_CODE = "magerefcode"; // prob need to toss this into magento admin
|
18 |
|
19 |
+
const MIN_IE_VERSION = 9.0;
|
20 |
+
|
21 |
public function getButton($container_class="") {
|
22 |
$button = '<div class="'.$container_class.' oneid-api-ready"><img class="oneidlogin" style="margin-left:6px; margin-top:-4px"
|
23 |
return_to="'. $this->_getUrl("/") .'"
|
50 |
return $button;
|
51 |
}
|
52 |
|
53 |
+
public function isBrowserOneIdSupported(){
|
54 |
+
$supported = true;
|
55 |
+
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
|
56 |
+
|
57 |
+
|
58 |
+
if (preg_match("#(msie)[/ ]?([0-9.]*)#", $ua, $match))
|
59 |
+
{
|
60 |
+
$name = $match[1] ;
|
61 |
+
$version = (float)$match[2];
|
62 |
+
$supported = $version >= self::MIN_IE_VERSION;
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
return $supported;
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
public function getCreateOneIdAttrs() {
|
71 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
72 |
$data = array(
|
app/design/frontend/base/default/template/oneid/checkout/onepage/link.phtml
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
<?php if ($this->isPossibleOnepageCheckout()):?>
|
2 |
<button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
|
3 |
<br/>
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
10 |
<?php endif?>
|
1 |
<?php if ($this->isPossibleOnepageCheckout()):?>
|
2 |
<button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><span><span><?php echo $this->__('Proceed to Checkout') ?></span></span></button>
|
3 |
<br/>
|
4 |
+
<?php if ($this->helper('OneID')->isBrowserOneIdSupported()) :?>
|
5 |
+
<button type="button" style="margin-top: 5px;" title="<?php echo $this->__('Check out with OneID') ?>" class="oneid-only button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>?autoFill=true';"><img id="oneid_checkout_button" src="<?php echo $this->helper('OneID')->getEndPoint()?>/images/oneid_checkout@2x.png" style="width:136px; height:24px;"></button>
|
6 |
+
<script type="text/javascript">
|
7 |
+
OneIdExtern.registerApiReadyFunction(function(){
|
8 |
+
OneIdUtil.imageHighlight("#oneid_checkout_button");
|
9 |
+
});
|
10 |
+
</script>
|
11 |
+
<?php endif ?>
|
12 |
<?php endif?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OneID</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>Apache Software License (ASL)</license>
|
7 |
<channel>community</channel>
|
@@ -21,11 +21,11 @@ Privacy: OneID does not track any user behavior – and certainly wonȁ
|
|
21 |
Security: OneID secures customer information using three separate cryptographic combinations across multiple devices.
|
22 |
Convenience: OneID removes the hassle of having to remember user names and passwords.
|
23 |
And along with all those great benefits to you and your users, with this plugin you'll also get to use OneID to log into and administer your WordPress site using your OneID.</description>
|
24 |
-
<notes>
|
25 |
<authors><author><name>OneID</name><user>bpk_oneid</user><email>bpk@oneid.com</email></author></authors>
|
26 |
-
<date>2013-06-
|
27 |
-
<time>
|
28 |
-
<contents><target name="magecommunity"><dir name="OneID"><dir name="Connector"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Success.php" hash="94f38f858a45304c10138c3a1b265490"/></dir></dir><file name="Signin.php" hash="454d819e284f02ef5e2ae8e57d714918"/></dir><dir name="Helper"><file name="Data.php" hash="
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.0.0</min><max>5.4.10</max></php></required></dependencies>
|
31 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>OneID</name>
|
4 |
+
<version>2.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Apache Software License (ASL)</license>
|
7 |
<channel>community</channel>
|
21 |
Security: OneID secures customer information using three separate cryptographic combinations across multiple devices.
|
22 |
Convenience: OneID removes the hassle of having to remember user names and passwords.
|
23 |
And along with all those great benefits to you and your users, with this plugin you'll also get to use OneID to log into and administer your WordPress site using your OneID.</description>
|
24 |
+
<notes>Hide OneID Checkout button for unsupported IE browsers</notes>
|
25 |
<authors><author><name>OneID</name><user>bpk_oneid</user><email>bpk@oneid.com</email></author></authors>
|
26 |
+
<date>2013-06-25</date>
|
27 |
+
<time>17:35:39</time>
|
28 |
+
<contents><target name="magecommunity"><dir name="OneID"><dir name="Connector"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><file name="Success.php" hash="94f38f858a45304c10138c3a1b265490"/></dir></dir><file name="Signin.php" hash="454d819e284f02ef5e2ae8e57d714918"/></dir><dir name="Helper"><file name="Data.php" hash="45076e98d6591962eefbbe132fe9a3ee"/></dir><dir name="controllers"><file name="AccountController.php" hash="2401a0a519aac21bebeee77233fd0b03"/><file name="ConnectorController.php" hash="a7703df27f2c28888c71482bf3cc4a8f"/><file name="OnepageController.php" hash="78d2dbae1606057fb3544296351898d8"/></dir><dir name="etc"><file name="config.xml" hash="8c3246ec55c0f60669fe484abbc1a04b"/><file name="system.xml" hash="d47ac462cf6efd529aca557fad1b890e"/></dir><dir name="sql"><dir name="oneid_connector_setup"><file name="mysql4-install-0.1.0.php" hash="cad7569ee96103d087bf077661c1cafe"/></dir></dir></dir><file name="README.txt" hash="fc7ce5e9b6b09f43a8776ef1c05d3f11"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="oneid"><dir name="block"><file name="login.phtml" hash="858cf26fe6aebeeb2817a0e2d806bb70"/><dir name="page"><dir name="html"><file name="footer.phtml" hash="dc3c0e4038c6e517adcae82ee81f6242"/><file name="head.phtml" hash="9dd7e46b5c3ce6eb4e92ef6738d55dc6"/><file name="newjavascript.js" hash="c9e0fa9a4851c0070614f605ebac8257"/></dir></dir></dir><dir name="checkout"><file name="cart.phtml" hash="4b02b99a1bbc8ad14a4452775df49ef2"/><file name="oneid_onepage.phtml" hash="c7d15be4af4e5558ddde8c41911691d9"/><dir name="onepage"><file name="link.phtml" hash="f138dda3c125c8a2e19cfdad494a7fbd"/><dir name="review"><file name="button.phtml" hash="7646991c5b937654771fa78627e49c95"/></dir></dir><dir name="success"><file name="oneid_create.phtml" hash="653fee23d3059609ae5330f0d6c84d34"/></dir></dir><dir name="customer"><dir name="account"><file name="dashboard.phtml" hash="2c11f754f8b8130280f60c7a91090790"/></dir><dir name="form"><file name="edit.phtml" hash="23eea7e7e29cb36c3c5885d7775de528"/><file name="forgotpassword.phtml" hash="cd02367e8214930140d80a7834e0f4a4"/></dir></dir><dir name="form"><file name="traditional_login.phtml" hash="eb65d5e144a0d385eeeeb15f34bac935"/></dir><dir name="oneid"><file name="signin.phtml" hash="66584827e4ebcc25e439200fd0addc67"/></dir></dir></dir><dir name="layout"><file name="OneID.xml" hash="a394b3f62e225364b5053160c845d38c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="oneid.css" hash="5e44748f801c63012a57995a0c1fca80"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oneid_Connector.xml" hash="1f42a132067a01e1056d5c514d96507a"/></dir></target></contents>
|
29 |
<compatible/>
|
30 |
<dependencies><required><php><min>5.0.0</min><max>5.4.10</max></php></required></dependencies>
|
31 |
</package>
|