Xogenics_HideCart - Version 1.0

Version Notes

This extension is developed on magento version 1.4.2

Download this release

Release Info

Developer Magento Core Team
Extension Xogenics_HideCart
Version 1.0
Comparing to
See all releases


Version 1.0

app/code/community/Xogenics/HideShoppingCart/Block/Adminhtml/Fieldset/System/Logo/Global.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-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 Xogenics
22
+ * @package Xogenics_hideshoppingcart
23
+ * @copyright Copyright (c) 2011 Xogenics IT
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Fieldset renderer for hideshoppingcart text and logo settings
29
+ * @author Miroslav Pavkovic
30
+ */
31
+ class Xogenics_Hideshoppingcart_Block_Adminhtml_Fieldset_System_Logo_Global
32
+ extends Mage_Adminhtml_Block_Abstract
33
+ implements Varien_Data_Form_Element_Renderer_Interface
34
+ {
35
+ /**
36
+ * Associative array of elements
37
+ *
38
+ * @var array
39
+ */
40
+ protected $_elements = array();
41
+
42
+ /**
43
+ * Custom template
44
+ *
45
+ * @var string
46
+ */
47
+ protected $_template = 'hideshoppingcart/global.phtml';
48
+
49
+ /**
50
+ * Getter for element label
51
+ *
52
+ * @param Varien_Data_Form_Element_Abstract $element
53
+ * @return string
54
+ */
55
+ public function getElementLabel(Varien_Data_Form_Element_Abstract $element)
56
+ {
57
+ return $element->getLabel();
58
+ }
59
+
60
+ /**
61
+ * Render fieldset html
62
+ *
63
+ * @param Varien_Data_Form_Element_Abstract $fieldset
64
+ * @return string
65
+ */
66
+ public function render(Varien_Data_Form_Element_Abstract $fieldset)
67
+ {
68
+ foreach ($fieldset->getSortedElements() as $element) {
69
+ $htmlId = $element->getHtmlId();
70
+ $this->_elements[$htmlId] = $element;
71
+ }
72
+ $originalData = $fieldset->getOriginalData();
73
+ $this->addData(array(
74
+ 'fieldset_label' => $fieldset->getLegend(),
75
+ 'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '',
76
+ ));
77
+ return $this->toHtml();
78
+ }
79
+
80
+
81
+
82
+
83
+ }
app/code/community/Xogenics/HideShoppingCart/Helper/Data.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Magento Xogenics - hide discount and shipping estimate on shopping cart page
4
+ *
5
+ * @category Xogenics
6
+ * @package Xogenics_HideShoppingCart
7
+ * @copyright Copyright (c) 2011 Xogenics.IT
8
+ * @author Miroslav Pavkovic
9
+ */
10
+ class Xogenics_HideShoppingCart_Helper_Data extends Mage_Core_Helper_Abstract
11
+ {
12
+
13
+ }
app/code/community/Xogenics/HideShoppingCart/etc/config.xml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Xogenics_HideShoppingCart>
5
+ <version>0.0.1</version>
6
+ </Xogenics_HideShoppingCart>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <hideshoppingcart>
11
+ <class>Xogenics_HideShoppingCart_Helper</class>
12
+ </hideshoppingcart>
13
+ </helpers>
14
+ <resources>
15
+ <hideshoppingcart_setup>
16
+ <setup>
17
+ <module>Xogenics_HideShoppingCart</module>
18
+ </setup>
19
+ <connection>
20
+ <use>core_setup</use>
21
+ </connection>
22
+ </hideshoppingcart_setup>
23
+ <config_write>
24
+ <connection>
25
+ <use>core_write</use>
26
+ </connection>
27
+ </config_write>
28
+ <config_read>
29
+ <connection>
30
+ <use>core_read</use>
31
+ </connection>
32
+ </config_read>
33
+ </resources>
34
+ </global>
35
+ <frontend>
36
+ <layout>
37
+ <updates>
38
+ <hideshoppingcart>
39
+ <file>hideshoppingcart.xml</file>
40
+ </hideshoppingcart>
41
+ </updates>
42
+ </layout>
43
+ </frontend>
44
+ <adminhtml>
45
+ <translate>
46
+ <modules>
47
+ <Xogenics_HideShoppingCart>
48
+ <files>
49
+ <default>Xogenics_HideShoppingCart.csv</default>
50
+ </files>
51
+ </Xogenics_HideShoppingCart>
52
+ </modules>
53
+ </translate>
54
+ <acl>
55
+ <resources>
56
+ <all>
57
+ <title>Allow Everything</title>
58
+ </all>
59
+ <admin>
60
+ <children>
61
+ <system>
62
+ <children>
63
+ <config>
64
+ <children>
65
+ <hideshoppingcart>
66
+ <title>Xogenics HideShoppingCart</title>
67
+ </hideshoppingcart>
68
+ </children>
69
+ </config>
70
+ </children>
71
+ </system>
72
+ </children>
73
+ </admin>
74
+ </resources>
75
+ </acl>
76
+ </adminhtml>
77
+ </config>
app/code/community/Xogenics/HideShoppingCart/etc/system.xml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <Xogenics translate="label" module="hideshoppingcart">
5
+ <label>Xogenics</label>
6
+ <sort_order>1000000</sort_order>
7
+ </Xogenics>
8
+ </tabs>
9
+ <sections>
10
+ <hideshoppingcart translate="label" module="hideshoppingcart">
11
+ <label>Hide Empty Carts Configuration</label>
12
+ <tab>Xogenics</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1000000</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
+ <cart translate="label">
20
+ <label>Shopping Cart Settings</label>
21
+ <sort_order>1</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <hide_empty_cart>
27
+ <label>Hide Empty Shopping Cart</label>
28
+ <frontend_type>select</frontend_type>
29
+ <source_model>adminhtml/system_config_source_yesno</source_model>
30
+ <sort_order>20</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </hide_empty_cart>
35
+ <hide_cart>
36
+ <label>Hide Shopping Cart Block Completely</label>
37
+ <frontend_type>select</frontend_type>
38
+ <source_model>adminhtml/system_config_source_yesno</source_model>
39
+ <sort_order>30</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ </hide_cart>
44
+ </fields>
45
+ </cart>
46
+ <global translate="label">
47
+ <label>Thank you for choosing Xogenics!</label>
48
+ <frontend_type>text</frontend_type>
49
+ <frontend_model>Xogenics_HideShoppingCart_Block_Adminhtml_Fieldset_System_Logo_Global</frontend_model>
50
+ <sort_order>2</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ </global>
54
+ </groups>
55
+ </hideshoppingcart>
56
+ </sections>
57
+ </config>
app/design/adminhtml/default/default/template/hideshoppingcart/global.phtml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 default_default
23
+ * @copyright Copyright (c) 2010 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
+ * @see Xogenics_hideshoppingcart_adminhtml_fieldset_system_logo_global
30
+ */
31
+ ?>
32
+ <table style="width: 80%; margin-top:20px;" cellspacing="0">
33
+ <tbody>
34
+ <tr><td align="center"><?php echo $this->escapeHtml($this->getFieldsetLabel()) ?></td></tr>
35
+ <tr><td align="center"><a href="<?php echo $this->escapeHtml('http://www.xogenics.com') ?>" target="_blank"><img src="<?php echo $this->getSkinUrl('images/xogenics/xogenics_logo_full_72ppi.png')?>" alt="Xogenics" /></a></td></tr>
36
+ <tr><td align="center"><?php echo Mage::helper('hideshoppingcart')->__('We value customer feedback! Please ')?><a href="<?php echo $this->escapeHtml('http://www.xogenics.com') ?>" target="_blank"><?php echo Mage::helper('hideshoppingcart')->__('help us improve this extension')?></a></td></tr>
37
+ </tbody>
38
+ </table>
app/design/frontend/base/default/layout/hideshoppingcart.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layoutUpdate>
3
+ <default translate="label">
4
+ <reference name="cart_sidebar">
5
+ <action method="setTemplate"><template>hideshoppingcart/sidebar.phtml</template></action>
6
+ </reference>
7
+ </default>
8
+ </layoutUpdate>
app/design/frontend/base/default/template/hideshoppingcart/sidebar.phtml ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 base_default
23
+ * @copyright Copyright (c) Xogenics
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Shoping cart sidebar
29
+ *
30
+ * @see Mage_Checkout_Block_Cart_Sidebar
31
+ */
32
+
33
+ ?>
34
+ <?php $_hidecartConfig = Mage::getStoreConfig('hideshoppingcart/cart');?>
35
+ <?php $_cartQty = $this->getSummaryCount() ?>
36
+ <?php if ($this->getIsNeedToDisplaySideBar() && !$_hidecartConfig["hide_cart"] && !($_cartQty == 0 && $_hidecartConfig["hide_empty_cart"])):?>
37
+ <div class="block block-cart">
38
+ <div class="block-title">
39
+ <strong><span><?php echo $this->__('My Cart') ?></span></strong>
40
+ </div>
41
+ <div class="block-content">
42
+ <?php if ($_cartQty>0): ?>
43
+ <div class="summary">
44
+ <?php if ($_cartQty==1): ?>
45
+ <p class="amount"><?php echo $this->__('There is <a href="%s">1 item</a> in your cart.', $this->getUrl('checkout/cart')) ?></p>
46
+ <?php else: ?>
47
+ <p class="amount"><?php echo $this->__('There are <a href="%s">%s items</a> in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?></p>
48
+ <?php endif ?>
49
+ <p class="subtotal">
50
+ <span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?>
51
+ <?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?>
52
+ <br />(<?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?>)
53
+ <?php endif; ?>
54
+ </p>
55
+ </div>
56
+ <?php endif ?>
57
+ <?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
58
+ <div class="actions">
59
+ <?php echo $this->getChildHtml('extra_actions') ?>
60
+ <button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
61
+ </div>
62
+ <?php endif ?>
63
+ <?php $_items = $this->getRecentItems() ?>
64
+ <?php if(count($_items)): ?>
65
+ <p class="block-subtitle"><?php echo $this->__('Recently added item(s)') ?></p>
66
+ <ol id="cart-sidebar" class="mini-products-list">
67
+ <?php foreach($_items as $_item): ?>
68
+ <?php echo $this->getItemHtml($_item) ?>
69
+ <?php endforeach; ?>
70
+ </ol>
71
+ <script type="text/javascript">decorateList('cart-sidebar', 'none-recursive')</script>
72
+ <?php else: ?>
73
+ <p class="empty"><?php echo $this->__('You have no items in your shopping cart.') ?></p>
74
+ <?php endif ?>
75
+ </div>
76
+ </div>
77
+ <?php endif;?>
app/etc/modules/Xogenics_HideShoppingCart.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Xogenics_HideShoppingCart>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Xogenics_HideShoppingCart>
8
+ </modules>
9
+ </config>
app/locale/en_US/Xogenics_HideShoppingCart.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ "Hide Empty Carts Configuration","Hide Empty Carts Configuration"
2
+ "Shopping Cart Settings","Shopping Cart Settings"
3
+ "Hide Shopping Cart Block Completely","Hide Shopping Cart Block Completely"
4
+ "Hide Empty Shopping Cart","Hide Empty Shopping Cart"
5
+ "Thank you for choosing Xogenics!","Thank you for choosing Xogenics!"
6
+ "We value customer feedback! Please ","We value customer feedback! Please "
7
+ "help us improve this extension","help us improve this extension"
app/locale/nl_NL/Xogenics_HideShoppingCart.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ "Hide Empty Carts Configuration","Hide Empty Carts Configuratie"
2
+ "Shopping Cart Settings","Winkelwagen instellingen"
3
+ "Hide Shopping Cart Block Completely","Verberg winkelwagen blok compleet"
4
+ "Hide Empty Shopping Cart","Verberg leeg winkelwagen blok"
5
+ "Thank you for choosing Xogenics!","Bedankt voor het kiezen Xogenics!"
6
+ "We value customer feedback! Please ","Wij waarderen feedback van de klant! Alstublieft "
7
+ "help us improve this extension","helpen ons bij het verbeteren deze uitbreiding"
app/locale/sr_RS/Xogenics_HideShoppingCart.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ "Hide Empty Carts Configuration","Hide Empty Carts konfiguracija"
2
+ "Shopping Cart Settings","Podesavanja korpe"
3
+ "Hide Shopping Cart Block","Sakrij kompletan korpa blok"
4
+ "Hide Empty Shopping Cart","Sakrij praznu korpu"
5
+ "Thank you for choosing Xogenics!","Hvala sto ste izabrali Xogenics!"
6
+ "We value customer feedback! Please ","Mi cenimo misljenje nasih klijenata! Molimo vas "
7
+ "help us improve this extension","pomozite nam da popravimo ovaj proizvod"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Xogenics_HideCart</name>
4
+ <version>1.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Hide Cart is a great little extension that enables users to hide the shopping cart block in case the cart is empty. You may also choose to hide the shopping cart block completely.</summary>
10
+ <description>Space is scarce on your shop! Overloading your customers with information will cost you orders, especially when they&#x2019;re bombed by irrelevant information! Who needs to see a shopping cart when there are no products added to it? So we figured; let&#x2019;s hide the cart when it&#x2019;s empty and show it only when it is relevant! And then we figured; why don&#x2019;t we share this feature with the community.. for free!?</description>
11
+ <notes>This extension is developed on magento version 1.4.2</notes>
12
+ <authors><author><name>Miroslav Pavkovic</name><user>auto-converted</user><email>ms.pavkovic@levi9.com</email></author></authors>
13
+ <date>2011-09-28</date>
14
+ <time>14:36:25</time>
15
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="xogenics"><file name="xogenics_logo_full_72ppi.png" hash="92fe62378d1e07b3fcf0afadcd72bc82"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="hideshoppingcart"><file name="global.phtml" hash="09a50aa8ead866b94444c142dd28d013"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hideshoppingcart.xml " hash="8fd715398660d645665ff9f06a73e0a1"/></dir><dir name="template"><dir name="hideshoppingcart"><file name="sidebar.phtml" hash="080a83887574eb272e47e89bc250c6b6"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Xogenics_HideShoppingCart.csv" hash="663693c13bd38db79bb774ab3bc69dad"/></dir><dir name="nl_NL"><file name="Xogenics_HideShoppingCart.csv" hash="60bbeb9cb742b0292e4cb2f645c88eed"/></dir><dir name="sr_RS"><file name="Xogenics_HideShoppingCart.csv" hash="0564c3cd50b57a562abe194722a249d0"/></dir></target><target name="mageetc"><dir name="modules"><file name="Xogenics_HideShoppingCart.xml" hash="41f7306540a9b9a913ab379aefe321e9"/></dir></target><target name="magecommunity"><dir name="Xogenics"><dir name="HideShoppingCart"><dir name="Block"><dir name="Adminhtml"><dir name="Fieldset"><dir name="System"><dir name="Logo"><file name="Global.php" hash="b74770c18e22b3e7694f4664ef4d1408"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="5dec628d2792a0d3838f5949dd6286e4"/><file name="system.xml" hash="b3fbb8f03592f2000adaf09de62e77e2"/></dir><dir name="Helper"><file name="Data.php" hash="6bab9a502463d8bef8aaf087aac1c30d"/></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><package><name></name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/images/xogenics/xogenics_logo_full_72ppi.png ADDED
Binary file