Yellow_Pay - Version 0.2.1

Version Notes

Styling and layout fixes

Download this release

Release Info

Developer James Piechota
Extension Yellow_Pay
Version 0.2.1
Comparing to
See all releases


Code changes from version 0.2.0 to 0.2.1

app/code/local/Yellow/Bitcoin/Block/Form/Bitcoin.php CHANGED
@@ -38,6 +38,8 @@
38
  */
39
  protected $_instructions;
40
 
 
 
41
  /**
42
  * Block construction. Set block template.
43
  */
@@ -53,6 +55,21 @@
53
  $guide = $guide->toHtml();
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  $logo = new $class;
57
  $logo->setTemplate('bitcoin/form/logo.phtml');
58
  $this->setTemplate('bitcoin/form/bitcoin.phtml')
@@ -60,7 +77,7 @@
60
  Mage::helper('bitcoin')->__('You will be paid via Yellow')
61
  )
62
  ->setMethodTitle('')
63
- ->setMethodLabelAfterHtml($logo->toHtml() . $guide);
64
 
65
  return parent::_construct();
66
  }
38
  */
39
  protected $_instructions;
40
 
41
+ const CSS_BLOCK_ID = "yellow-checkout-custom-css";
42
+
43
  /**
44
  * Block construction. Set block template.
45
  */
55
  $guide = $guide->toHtml();
56
  }
57
 
58
+ try {
59
+ $css_block = Mage::getModel('cms/block')->setStoreId(Mage::app()->getStore()->getId())->load(self::CSS_BLOCK_ID);
60
+ if($css_block->getData("is_active") == 1 ){
61
+ $css_output = $css_block->getData("content");
62
+ }else{
63
+ $css_output = "";
64
+ }
65
+ }catch ( \Exception $e){
66
+ $css_output = "";
67
+ Mage::log($e->getMessage() . __LINE__ . " on " . __FILE__ , null , "yellow.log");
68
+ Mage::log($e->getTraceAsString() . __LINE__ . " on " . __FILE__ , null , "yellow.log");
69
+ }
70
+
71
+
72
+
73
  $logo = new $class;
74
  $logo->setTemplate('bitcoin/form/logo.phtml');
75
  $this->setTemplate('bitcoin/form/bitcoin.phtml')
77
  Mage::helper('bitcoin')->__('You will be paid via Yellow')
78
  )
79
  ->setMethodTitle('')
80
+ ->setMethodLabelAfterHtml($css_output . $logo->toHtml() . $guide);
81
 
82
  return parent::_construct();
83
  }
app/code/local/Yellow/Bitcoin/etc/config.xml CHANGED
@@ -27,7 +27,7 @@ SOFTWARE.
27
  <config>
28
  <modules>
29
  <Yellow_Bitcoin>
30
- <version>0.1.1</version>
31
  <depends>
32
  <Mage_Payment/>
33
  </depends>
@@ -103,7 +103,7 @@ SOFTWARE.
103
  <active>1</active>
104
  <model>bitcoin/bitcoin</model>
105
  <!--<order_status>pending</order_status>-->
106
- <title>Pay with Bitcoin (powered by Yellow)</title>
107
  <fullscreen>0</fullscreen>
108
  <!--<instructions>Pay With Bitcoin</instructions>-->
109
  <allowspecific>0</allowspecific>
27
  <config>
28
  <modules>
29
  <Yellow_Bitcoin>
30
+ <version>0.1.2</version>
31
  <depends>
32
  <Mage_Payment/>
33
  </depends>
103
  <active>1</active>
104
  <model>bitcoin/bitcoin</model>
105
  <!--<order_status>pending</order_status>-->
106
+ <title></title>
107
  <fullscreen>0</fullscreen>
108
  <!--<instructions>Pay With Bitcoin</instructions>-->
109
  <allowspecific>0</allowspecific>
app/code/local/Yellow/Bitcoin/sql/bitcoin_setup/mysql4-upgrade-0.1.1-0.1.2.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+ try {
5
+
6
+ //yellow-checkout-custom-css
7
+ $checkout_content = '<div id="yellow-checkout-custom-css" style="display: none"></div>';
8
+ // get stores ids
9
+ //$stores = Mage::getModel('core/store')->getCollection()->addFieldToFilter('store_id', array('gt'=>0))->getAllIds();
10
+ // I will make it now one block for all stores
11
+ $stores = array(0);
12
+ foreach ($stores as $store) {
13
+ $block = Mage::getModel('cms/block');
14
+ $block->setTitle('yellow-checkout-custom-css');
15
+ $block->setStores(array($store));
16
+ $block->setIdentifier('yellow-checkout-custom-css');
17
+ $block->setIsActive(1);
18
+ $block->setContent($checkout_content);
19
+ $block->save();
20
+ }
21
+
22
+
23
+ //yellow-invoice-custom-css
24
+ $invoice_content = '<div id="yellow-invoice-custom-css" style="display: none"></div>';
25
+ // get stores ids
26
+ //$stores = Mage::getModel('core/store')->getCollection()->addFieldToFilter('store_id', array('gt'=>0))->getAllIds();
27
+ // I will make it now one block for all stores
28
+ $stores = array(0);
29
+ foreach ($stores as $store) {
30
+ $block = Mage::getModel('cms/block');
31
+ $block->setTitle('yellow-invoice-custom-css');
32
+ $block->setIdentifier('yellow-invoice-custom-css');
33
+ $block->setStores(array($store));
34
+ $block->setIsActive(1);
35
+ $block->setContent($invoice_content);
36
+ $block->save();
37
+ }
38
+ } catch (\Exception $e) {
39
+ Mage::log($e->getMessage(), null, "yellow.log");
40
+ Mage::log($e->getTraceAsString(), null, "yellow.log");
41
+ }
42
+
43
+ $installer->endSetup();
app/design/frontend/base/default/layout/bitcoin.xml CHANGED
@@ -19,6 +19,9 @@
19
  <action method="addItem"><type>skin_css</type><name>css/bitcoin.css</name><params/></action>
20
  </reference>
21
  <reference name="content">
 
 
 
22
  <block type="bitcoin/fullscreen_widget_content" name="widget_content" template="bitcoin/fullscreen/widget/content.phtml"/>
23
  </reference>
24
  </bitcoin_index_pay>
19
  <action method="addItem"><type>skin_css</type><name>css/bitcoin.css</name><params/></action>
20
  </reference>
21
  <reference name="content">
22
+ <block type="cms/block" name="yellow-invoice-custom-css">
23
+ <action method="setBlockId"><block_id>yellow-invoice-custom-css</block_id></action>
24
+ </block>
25
  <block type="bitcoin/fullscreen_widget_content" name="widget_content" template="bitcoin/fullscreen/widget/content.phtml"/>
26
  </reference>
27
  </bitcoin_index_pay>
app/design/frontend/base/default/template/bitcoin/form/logo.phtml CHANGED
@@ -1,7 +1,7 @@
1
  <!-- Yellow Logo -->
2
- <div id="bitcoin" style="float: left;">
3
  <img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
4
- alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:40px;"/>
5
  <span style="margin-top: 6px;">
6
  &nbsp;<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
7
  <small>
1
  <!-- Yellow Logo -->
2
+ <div id="bitcoin">
3
  <img src="<?php echo $this->getSkinUrl('images/bitcoin/bitcoin_accepted.png', array('_secure' => true)); ?>"
4
+ alt="<?php echo Mage::helper('bitcoin')->__('Yellow Bitcoin') ?>" class="v-middle" style="height:35px;"/>
5
  <span style="margin-top: 6px;">
6
  &nbsp;<?php //echo Mage::helper('bitcoin')->__('Powered By Yellow'); ?>
7
  <small>
app/design/frontend/base/default/template/bitcoin/fullscreen/widget/header.phtml CHANGED
@@ -1,7 +1,6 @@
1
- <?php $storeName = $this->getStoreName();?>
2
  <div id="yp-fullpage-header" class="clearfix" >
3
  <div class="yp-header-logo">
4
- <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
5
  </div>
6
- <div class="yp-header-title"><span><?php echo $this->__("Your %s Bitcoin Invoice" , $storeName);?></span></div>
7
  </div>
 
1
  <div id="yp-fullpage-header" class="clearfix" >
2
  <div class="yp-header-logo">
3
+ <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>"><img src="<?php echo $this->getLogoSrc() ?>" class="logo-img" alt="<?php echo $this->getLogoAlt() ?>" /></a>
4
  </div>
5
+ <div class="yp-header-title"><span><?php echo $this->__("Your Bitcoin Invoice");?></span></div>
6
  </div>
app/etc/modules/Yellow_Bitcoin.xml CHANGED
@@ -33,7 +33,7 @@ SOFTWARE.
33
  <depends>
34
  <Mage_Payment/>
35
  </depends>
36
- <version>0.1.1</version>
37
  </Yellow_Bitcoin>
38
  </modules>
39
  </config>
33
  <depends>
34
  <Mage_Payment/>
35
  </depends>
36
+ <version>0.1.2</version>
37
  </Yellow_Bitcoin>
38
  </modules>
39
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Yellow_Pay</name>
4
- <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="https://github.com/YellowPay/yellow-magento/blob/master/LICENSE.md">MITL</license>
7
  <channel>community</channel>
@@ -30,12 +30,11 @@ Bitcoin payment is received and the customer is redirected to an order confirmat
30
  &#xD;
31
  6.&#xD;
32
  Yellow converts the received Bitcoin payment into a national currency (like AED) and transfers it to the merchant&#x2019;s bank account</description>
33
- <notes>Verify signature on inbound IPNs&#xD;
34
- Add support for full screen invoices</notes>
35
  <authors><author><name>James Piechota</name><user>YellowPay</user><email>james@yellowpay.co</email></author><author><name>Tawfek Daghistani</name><user>tawfekov</user><email>tawfekov@gmail.com</email></author></authors>
36
- <date>2015-01-07</date>
37
- <time>21:44:12</time>
38
- <contents><target name="mageetc"><dir name="modules"><file name="Yellow_Bitcoin.xml" hash="d75406a63e814a73dc7506717f441d5a"/></dir></target><target name="magelocal"><dir name="Yellow"><dir name="Bitcoin"><dir name="Block"><dir name="Form"><file name="Bitcoin.php" hash="2ef2ec92b78dea7b1b75976a78bafb68"/></dir><dir name="Fullscreen"><dir name="Widget"><file name="Content.php" hash="a6430caef4b5b702558b564bf8b8f2f2"/><file name="Footer.php" hash="d1895d526c23235012ca7723b6e84218"/><file name="Header.php" hash="e2ff54196a5acc9369f4101c275d5a7c"/></dir></dir><file name="Fullscreen.php" hash="f79cce61051c201ee842d429cf86f25c"/><file name="Index.php" hash="0a2ac65b25a7c31aa457b4688b8c28ac"/><dir name="Info"><file name="Bitcoin.php" hash="7c4f19e8b6cecc559e4df0a215eba6c9"/></dir><file name="Status.php" hash="4c17f2865abb4b5689b7343fff76c78a"/><file name="Widget.php" hash="43b71ccdec0842c4dd75d6659b6bb341"/></dir><dir name="Helper"><file name="Data.php" hash="ea43d8608c76e2f52ec152069c4f672f"/></dir><dir name="Model"><file name="Bitcoin.php" hash="3d18bf52c0a10b0cd2eccb11d59e851b"/><file name="Http.php" hash="1be33e613418ed606e49aa86ed79246e"/><file name="Ipn.php" hash="63126b7a70d56faeeec0c0b79f6c26d8"/><dir name="Resource"><dir name="Ipn"><file name="Collection.php" hash="1782b9b4bb6a56962f636d18a3d1200d"/></dir><file name="Ipn.php" hash="a89a447c0fdb0e9c8847ed10dd1cb43e"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="a627fa88d52af525a325a1f89362588f"/></dir><dir name="etc"><file name="config.xml" hash="ec47da48f45364204873b6266645dd48"/><file name="system.xml" hash="43bb2b8a6ce2825cab3817b838bb2a66"/></dir><dir name="sql"><dir name="bitcoin_setup"><file name="mysql4-install-0.1.0.php" hash="a269d6b3312d60d99edb86d8bffb57f6"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="005d74af44930ca0fe850dace1d5e390"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bitcoin"><dir name="form"><file name="bitcoin.phtml" hash="0d6b964950b0c9a51b975eb9ee64107c"/><file name="logo.phtml" hash="2f8adb34565c7a20f783f2ee2b244ab9"/></dir><dir name="fullscreen"><dir name="widget"><file name="content.phtml" hash="fd245b27494aa2556cff60332c97d820"/><file name="footer.phtml" hash="695cf39af69bed90a629a654efe8d5fe"/><file name="header.phtml" hash="6cee4d3bc13512d7c1fa74d44d6b97ea"/></dir></dir><file name="fullscreen.phtml" hash="e1b06afea72dd0efca00cd08ce0ae7d3"/><file name="index.phtml" hash="22b757c8eae6298b157dfe59495e0345"/><dir name="info"><file name="bitcoin.phtml" hash="297b5f325aa90c0e8d9df673b5f42654"/></dir><file name="status.phtml" hash="4d7753c3efdcad9a2974b89ec636aa4c"/><file name="widget.phtml" hash="d1b1bd2deb7c51495071d701d209aafa"/></dir></dir><dir name="layout"><file name="bitcoin.xml" hash="0f7367d75bcab10d1fec1e9f3602526b"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="bitcoin.css" hash="d42cfe2896c1298edbb9d739d4f22ea9"/></dir><dir name="images"><dir name="bitcoin"><file name="bitcoin_accepted.png" hash="0682420205f3e2001b72901c44073163"/></dir></dir></dir></dir></dir></target></contents>
39
  <compatible/>
40
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
41
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Yellow_Pay</name>
4
+ <version>0.2.1</version>
5
  <stability>stable</stability>
6
  <license uri="https://github.com/YellowPay/yellow-magento/blob/master/LICENSE.md">MITL</license>
7
  <channel>community</channel>
30
  &#xD;
31
  6.&#xD;
32
  Yellow converts the received Bitcoin payment into a national currency (like AED) and transfers it to the merchant&#x2019;s bank account</description>
33
+ <notes>Styling and layout fixes</notes>
 
34
  <authors><author><name>James Piechota</name><user>YellowPay</user><email>james@yellowpay.co</email></author><author><name>Tawfek Daghistani</name><user>tawfekov</user><email>tawfekov@gmail.com</email></author></authors>
35
+ <date>2015-01-12</date>
36
+ <time>21:36:34</time>
37
+ <contents><target name="mageetc"><dir name="modules"><file name="Yellow_Bitcoin.xml" hash="693c8145167538503e91c050089ea4b6"/></dir></target><target name="magelocal"><dir name="Yellow"><dir name="Bitcoin"><dir name="Block"><dir name="Form"><file name="Bitcoin.php" hash="62aafbb4ae2f3b77f361f39af702bd7b"/></dir><dir name="Fullscreen"><dir name="Widget"><file name="Content.php" hash="a6430caef4b5b702558b564bf8b8f2f2"/><file name="Footer.php" hash="d1895d526c23235012ca7723b6e84218"/><file name="Header.php" hash="e2ff54196a5acc9369f4101c275d5a7c"/></dir></dir><file name="Fullscreen.php" hash="f79cce61051c201ee842d429cf86f25c"/><file name="Index.php" hash="0a2ac65b25a7c31aa457b4688b8c28ac"/><dir name="Info"><file name="Bitcoin.php" hash="7c4f19e8b6cecc559e4df0a215eba6c9"/></dir><file name="Status.php" hash="4c17f2865abb4b5689b7343fff76c78a"/><file name="Widget.php" hash="43b71ccdec0842c4dd75d6659b6bb341"/></dir><dir name="Helper"><file name="Data.php" hash="ea43d8608c76e2f52ec152069c4f672f"/></dir><dir name="Model"><file name="Bitcoin.php" hash="3d18bf52c0a10b0cd2eccb11d59e851b"/><file name="Http.php" hash="1be33e613418ed606e49aa86ed79246e"/><file name="Ipn.php" hash="63126b7a70d56faeeec0c0b79f6c26d8"/><dir name="Resource"><dir name="Ipn"><file name="Collection.php" hash="1782b9b4bb6a56962f636d18a3d1200d"/></dir><file name="Ipn.php" hash="a89a447c0fdb0e9c8847ed10dd1cb43e"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="a627fa88d52af525a325a1f89362588f"/></dir><dir name="etc"><file name="config.xml" hash="0dc809ffd537dac14388ea676436d8d8"/><file name="system.xml" hash="43bb2b8a6ce2825cab3817b838bb2a66"/></dir><dir name="sql"><dir name="bitcoin_setup"><file name="mysql4-install-0.1.0.php" hash="a269d6b3312d60d99edb86d8bffb57f6"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="005d74af44930ca0fe850dace1d5e390"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="afa8d749b6f82519964f9fe2aa4ff4a1"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="bitcoin"><dir name="form"><file name="bitcoin.phtml" hash="0d6b964950b0c9a51b975eb9ee64107c"/><file name="logo.phtml" hash="86a19e97d73939ff253e482fc7f5420f"/></dir><dir name="fullscreen"><dir name="widget"><file name="content.phtml" hash="fd245b27494aa2556cff60332c97d820"/><file name="footer.phtml" hash="695cf39af69bed90a629a654efe8d5fe"/><file name="header.phtml" hash="4d1ab5af310956e2f09b559ef4f9c2a2"/></dir></dir><file name="fullscreen.phtml" hash="e1b06afea72dd0efca00cd08ce0ae7d3"/><file name="index.phtml" hash="22b757c8eae6298b157dfe59495e0345"/><dir name="info"><file name="bitcoin.phtml" hash="297b5f325aa90c0e8d9df673b5f42654"/></dir><file name="status.phtml" hash="4d7753c3efdcad9a2974b89ec636aa4c"/><file name="widget.phtml" hash="d1b1bd2deb7c51495071d701d209aafa"/></dir></dir><dir name="layout"><file name="bitcoin.xml" hash="c4a89b71840ea5437acfdb626647500d"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="bitcoin.css" hash="f307a225a03e36e613c6455a4e38fab1"/></dir><dir name="images"><dir name="bitcoin"><file name="bitcoin_accepted.png" hash="0682420205f3e2001b72901c44073163"/></dir></dir></dir></dir></dir></target></contents>
38
  <compatible/>
39
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
40
  </package>
skin/frontend/base/default/css/bitcoin.css CHANGED
@@ -51,11 +51,11 @@
51
  height: 65px;
52
  }
53
 
54
- #yp-fullpage-header .yp-header-logo .logo-img
55
  {
56
- max-width: 150px;
 
57
  min-width: 1px;
58
- max-height: 65px;
59
  min-height: 1px;
60
  margin: auto;
61
  }
51
  height: 65px;
52
  }
53
 
54
+ #yp-fullpage-header .yp-header-logo > a > .logo-img
55
  {
56
+ max-height: 60px;
57
+ max-width: 300px;
58
  min-width: 1px;
 
59
  min-height: 1px;
60
  margin: auto;
61
  }