Version Notes
On clicking MyCart the user is presented with a designed and detailed pop up of the Cart.
Download this release
Release Info
Developer | Silvertouch |
Extension | Sttl_Topcart |
Version | 2.0.3 |
Comparing to | |
See all releases |
Version 2.0.3
- app/code/local/Sttl/Topcart/Block/Cartheader.php +21 -0
- app/code/local/Sttl/Topcart/Block/Html/Header.php +71 -0
- app/code/local/Sttl/Topcart/Helper/Data.php +27 -0
- app/code/local/Sttl/Topcart/controllers/IndexController.php +23 -0
- app/code/local/Sttl/Topcart/etc/config.xml +43 -0
- app/design/frontend/base/default/layout/topcart.xml +22 -0
- app/design/frontend/base/default/template/topcart/checkout/cart/cartheader.phtml +65 -0
- app/design/frontend/base/default/template/topcart/page/html/header.phtml +48 -0
- app/etc/modules/Sttl_Topcart.xml +11 -0
- js/topcart/topcart.js +104 -0
- package.xml +20 -0
- silver_docs/SILVER_Top_Cart_Popup_User_Guide_Ver_1.0.pdf +0 -0
- skin/frontend/base/default/css/topcart/topcart.css +43 -0
app/code/local/Sttl/Topcart/Block/Cartheader.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SilverTouch Technologies Limited.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
11 |
+
*
|
12 |
+
* @category Sttl
|
13 |
+
* @package Sttl_Topcart
|
14 |
+
* @copyright Copyright (c) 2011 SilverTouch Technologies Limited. (http://www.silvertouch.com/MagentoExtensions)
|
15 |
+
* @license http://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
16 |
+
*/
|
17 |
+
class Sttl_Topcart_Block_Cartheader extends Mage_Checkout_Block_Cart_Sidebar
|
18 |
+
{
|
19 |
+
|
20 |
+
|
21 |
+
}
|
app/code/local/Sttl/Topcart/Block/Html/Header.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SilverTouch Technologies Limited.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
11 |
+
*
|
12 |
+
* @category Sttl
|
13 |
+
* @package Sttl_Topcart
|
14 |
+
* @copyright Copyright (c) 2011 SilverTouch Technologies Limited. (http://www.silvertouch.com/MagentoExtensions)
|
15 |
+
* @license http://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
16 |
+
*/
|
17 |
+
|
18 |
+
class Sttl_Topcart_Block_Html_Header extends Mage_Page_Block_Html_Header
|
19 |
+
{
|
20 |
+
public function _construct()
|
21 |
+
{
|
22 |
+
$this->setTemplate('topcart/page/html/header.phtml');
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Check if current url is url for home page
|
27 |
+
*
|
28 |
+
* @return true
|
29 |
+
*/
|
30 |
+
public function getIsHomePage()
|
31 |
+
{
|
32 |
+
return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));
|
33 |
+
}
|
34 |
+
|
35 |
+
public function setLogo($logo_src, $logo_alt)
|
36 |
+
{
|
37 |
+
$this->setLogoSrc($logo_src);
|
38 |
+
$this->setLogoAlt($logo_alt);
|
39 |
+
return $this;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getLogoSrc()
|
43 |
+
{
|
44 |
+
if (empty($this->_data['logo_src'])) {
|
45 |
+
$this->_data['logo_src'] = Mage::getStoreConfig('design/header/logo_src');
|
46 |
+
}
|
47 |
+
return $this->getSkinUrl($this->_data['logo_src']);
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getLogoAlt()
|
51 |
+
{
|
52 |
+
if (empty($this->_data['logo_alt'])) {
|
53 |
+
$this->_data['logo_alt'] = Mage::getStoreConfig('design/header/logo_alt');
|
54 |
+
}
|
55 |
+
return $this->_data['logo_alt'];
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getWelcome()
|
59 |
+
{
|
60 |
+
if (empty($this->_data['welcome'])) {
|
61 |
+
if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) {
|
62 |
+
$this->_data['welcome'] = $this->__('Welcome, %s!', $this->htmlEscape(Mage::getSingleton('customer/session')->getCustomer()->getName()));
|
63 |
+
} else {
|
64 |
+
$this->_data['welcome'] = Mage::getStoreConfig('design/header/welcome');
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
return $this->_data['welcome'];
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
app/code/local/Sttl/Topcart/Helper/Data.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SilverTouch Technologies Limited.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
11 |
+
*
|
12 |
+
* @category Sttl
|
13 |
+
* @package Sttl_Topcart
|
14 |
+
* @copyright Copyright (c) 2011 SilverTouch Technologies Limited. (http://www.silvertouch.com/MagentoExtensions)
|
15 |
+
* @license http://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
16 |
+
*/
|
17 |
+
class Sttl_Topcart_Helper_Data extends Mage_Core_Helper_Abstract {
|
18 |
+
|
19 |
+
public function isEnable() {
|
20 |
+
if ((bool) $this->isModuleOutputEnabled()) {
|
21 |
+
return $this->_getUrl('checkout/cart');
|
22 |
+
} else {
|
23 |
+
return false;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
app/code/local/Sttl/Topcart/controllers/IndexController.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SilverTouch Technologies Limited.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
11 |
+
*
|
12 |
+
* @category Sttl
|
13 |
+
* @package Sttl_Topcart
|
14 |
+
* @copyright Copyright (c) 2011 SilverTouch Technologies Limited. (http://www.silvertouch.com/MagentoExtensions)
|
15 |
+
* @license http://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
16 |
+
*/
|
17 |
+
class Sttl_Topcart_IndexController extends Mage_Core_Controller_Front_Action
|
18 |
+
{
|
19 |
+
public function indexAction()
|
20 |
+
{
|
21 |
+
|
22 |
+
}
|
23 |
+
}
|
app/code/local/Sttl/Topcart/etc/config.xml
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Sttl_Topcart>
|
5 |
+
<version>2.0.0</version>
|
6 |
+
</Sttl_Topcart>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<topcart>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Sttl_Topcart</module>
|
14 |
+
<frontName>topcart</frontName>
|
15 |
+
</args>
|
16 |
+
</topcart>
|
17 |
+
</routers>
|
18 |
+
<layout>
|
19 |
+
<updates>
|
20 |
+
<topcart>
|
21 |
+
<file>topcart.xml</file>
|
22 |
+
</topcart>
|
23 |
+
</updates>
|
24 |
+
</layout>
|
25 |
+
</frontend>
|
26 |
+
<global>
|
27 |
+
<blocks>
|
28 |
+
<topcart>
|
29 |
+
<class>Sttl_Topcart_Block</class>
|
30 |
+
</topcart>
|
31 |
+
<page>
|
32 |
+
<rewrite>
|
33 |
+
<html_header>Sttl_Topcart_Block_Html_Header</html_header>
|
34 |
+
</rewrite>
|
35 |
+
</page>
|
36 |
+
</blocks>
|
37 |
+
<helpers>
|
38 |
+
<topcart>
|
39 |
+
<class>Sttl_Topcart_Helper</class>
|
40 |
+
</topcart>
|
41 |
+
</helpers>
|
42 |
+
</global>
|
43 |
+
</config>
|
app/design/frontend/base/default/layout/topcart.xml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<default>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addCss">
|
6 |
+
<stylesheet>css/topcart/topcart.css</stylesheet>
|
7 |
+
</action>
|
8 |
+
<action method="addJs">
|
9 |
+
<script>topcart/topcart.js</script>
|
10 |
+
</action>
|
11 |
+
</reference>
|
12 |
+
<reference name="header">
|
13 |
+
<block type="topcart/cartheader" name="topcart_header" as="topcart" template="topcart/checkout/cart/cartheader.phtml">
|
14 |
+
</block>
|
15 |
+
</reference>
|
16 |
+
<reference name="top.links">
|
17 |
+
<action method="removeLinkByUrl">
|
18 |
+
<url helper="topcart/data/isEnable"/>
|
19 |
+
</action>
|
20 |
+
</reference>
|
21 |
+
</default>
|
22 |
+
</layout>
|
app/design/frontend/base/default/template/topcart/checkout/cart/cartheader.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SilverTouch Technologies Limited.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
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://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
11 |
+
*
|
12 |
+
* @category Sttl
|
13 |
+
* @package Sttl_Topcart
|
14 |
+
* @copyright Copyright (c) 2011 SilverTouch Technologies Limited. (http://www.silvertouch.com/MagentoExtensions)
|
15 |
+
* @license http://www.silvertouch.com/MagentoExtensions/LICENSE.txt
|
16 |
+
*/
|
17 |
+
?>
|
18 |
+
<?php $_cartQty = $this->getSummaryCount() ?>
|
19 |
+
<?php if ($_cartQty > 0): ?>
|
20 |
+
<?php $_myCart = $this->__('My Cart (<span>%s</span>)', $_cartQty) ?>
|
21 |
+
<?php else: ?>
|
22 |
+
<?php $_myCart = $this->__('My Cart (<span>0</span>)') ?>
|
23 |
+
<?php endif ?>
|
24 |
+
<div class="dhtmlgoodies_question"><?php echo $_myCart ?></div>
|
25 |
+
<div class="dhtmlgoodies_answer">
|
26 |
+
<div>
|
27 |
+
<div class="inner-wrapper"><?php // extra div to smooth slideUp and slideDown ?>
|
28 |
+
<?php $_items = $this->getRecentItems() ?>
|
29 |
+
<?php if(count($_items)): ?>
|
30 |
+
<p class="block-subtitle">
|
31 |
+
<?php echo $this->__('Recently added item(s)') ?>
|
32 |
+
</p>
|
33 |
+
<ol id="mini-cart" class="mini-products-list">
|
34 |
+
<?php foreach($_items as $_item): ?>
|
35 |
+
<?php echo $this->getItemHtml($_item) ?>
|
36 |
+
<?php endforeach; ?>
|
37 |
+
</ol>
|
38 |
+
<script type="text/javascript">decorateList('mini-cart', 'none-recursive')</script>
|
39 |
+
<?php else: ?>
|
40 |
+
<p class="block-subtitle">
|
41 |
+
<?php echo $this->__('Recently added item(s)') ?>
|
42 |
+
</p>
|
43 |
+
<p class="cart-empty">
|
44 |
+
<?php echo $this->__('You have no items in your shopping cart.') ?>
|
45 |
+
</p>
|
46 |
+
<?php endif ?>
|
47 |
+
<?php if($_cartQty && $this->isPossibleOnepageCheckout()): ?>
|
48 |
+
<p class="subtotal">
|
49 |
+
<span class="label"><?php echo $this->__('Cart Subtotal:') ?></span> <?php echo Mage::helper('checkout')->formatPrice($this->getSubtotal()) ?><?php if ($_subtotalInclTax = $this->getSubtotalInclTax()): ?> / <?php echo Mage::helper('checkout')->formatPrice($_subtotalInclTax) ?> <?php echo Mage::helper('tax')->getIncExcText(true) ?><?php endif; ?>
|
50 |
+
</p>
|
51 |
+
<div class="actions">
|
52 |
+
<?php echo $this->getChildHtml('extra_actions') ?>
|
53 |
+
<button class="button" type="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"><span><span><?php echo $this->__('Checkout') ?></span></span></button>
|
54 |
+
<a href="<?php echo $this->getUrl('checkout/cart'); ?>"><span><?php echo $this->__('Go to Shopping Cart') ?></span></a>
|
55 |
+
</div>
|
56 |
+
<?php endif ?>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
|
61 |
+
<!-- extra content -->
|
62 |
+
|
63 |
+
<script type="text/javascript">
|
64 |
+
window.onload = initShowHideDivs;
|
65 |
+
</script>
|
app/design/frontend/base/default/template/topcart/page/html/header.phtml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) 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 |
+
* @var Mage_Page_Block_Html_Header $this
|
28 |
+
*/
|
29 |
+
?>
|
30 |
+
|
31 |
+
<div class="header-container">
|
32 |
+
<div class="header">
|
33 |
+
<?php if ($this->getIsHomePage()):?>
|
34 |
+
<h1 class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a></h1>
|
35 |
+
<?php else:?>
|
36 |
+
<a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
|
37 |
+
<?php endif?>
|
38 |
+
<div class="quick-access">
|
39 |
+
<?php echo $this->getChildHtml('topSearch') ?>
|
40 |
+
<p class="welcome-msg"><?php echo $this->getWelcome()?></p>
|
41 |
+
<?php echo $this->getChildHtml('topLinks') ?>
|
42 |
+
<?php echo $this->getChildHtml('topcart') ?>
|
43 |
+
<?php echo $this->getChildHtml('store_language') ?>
|
44 |
+
</div>
|
45 |
+
<?php echo $this->getChildHtml('topContainer'); ?>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<?php echo $this->getChildHtml('topMenu') ?>
|
app/etc/modules/Sttl_Topcart.xml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<config>
|
2 |
+
<modules>
|
3 |
+
<Sttl_Topcart>
|
4 |
+
<active>true</active>
|
5 |
+
<codePool>local</codePool>
|
6 |
+
<depends>
|
7 |
+
<Mage_Checkout/>
|
8 |
+
</depends>
|
9 |
+
</Sttl_Topcart>
|
10 |
+
</modules>
|
11 |
+
</config>
|
js/topcart/topcart.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
var dhtmlgoodies_slideSpeed = 10; // Higher value = faster
|
3 |
+
var dhtmlgoodies_timer = 10; // Lower value = faster
|
4 |
+
|
5 |
+
var objectIdToSlideDown = false;
|
6 |
+
var dhtmlgoodies_activeId = false;
|
7 |
+
var dhtmlgoodies_slideInProgress = false;
|
8 |
+
var dhtmlgoodies_slideInProgress = false;
|
9 |
+
var dhtmlgoodies_expandMultiple = false; // true if you want to be able to have multiple items expanded at the same time.
|
10 |
+
|
11 |
+
function showHideContent(e,inputId)
|
12 |
+
{
|
13 |
+
if(dhtmlgoodies_slideInProgress)return;
|
14 |
+
dhtmlgoodies_slideInProgress = true;
|
15 |
+
if(!inputId)inputId = this.id;
|
16 |
+
inputId = inputId + '';
|
17 |
+
var numericId = inputId.replace(/[^0-9]/g,'');
|
18 |
+
var answerDiv = document.getElementById('dhtmlgoodies_a' + numericId);
|
19 |
+
|
20 |
+
objectIdToSlideDown = false;
|
21 |
+
|
22 |
+
if(!answerDiv.style.display || answerDiv.style.display=='none'){
|
23 |
+
if(dhtmlgoodies_activeId && dhtmlgoodies_activeId!=numericId && !dhtmlgoodies_expandMultiple){
|
24 |
+
objectIdToSlideDown = numericId;
|
25 |
+
slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_slideSpeed*-1));
|
26 |
+
}else{
|
27 |
+
|
28 |
+
answerDiv.style.display='block';
|
29 |
+
answerDiv.style.visibility = 'visible';
|
30 |
+
|
31 |
+
slideContent(numericId,dhtmlgoodies_slideSpeed);
|
32 |
+
}
|
33 |
+
}else{
|
34 |
+
slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
|
35 |
+
dhtmlgoodies_activeId = false;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
function slideContent(inputId,direction)
|
40 |
+
{
|
41 |
+
|
42 |
+
var obj =document.getElementById('dhtmlgoodies_a' + inputId);
|
43 |
+
var contentObj = document.getElementById('dhtmlgoodies_ac' + inputId);
|
44 |
+
height = obj.clientHeight;
|
45 |
+
if(height==0)height = obj.offsetHeight;
|
46 |
+
height = height + direction;
|
47 |
+
rerunFunction = true;
|
48 |
+
if(height>contentObj.offsetHeight){
|
49 |
+
height = contentObj.offsetHeight;
|
50 |
+
rerunFunction = false;
|
51 |
+
}
|
52 |
+
if(height<=1){
|
53 |
+
height = 1;
|
54 |
+
rerunFunction = false;
|
55 |
+
}
|
56 |
+
|
57 |
+
obj.style.height = height + 'px';
|
58 |
+
var topPos = height - contentObj.offsetHeight;
|
59 |
+
if(topPos>0)topPos=0;
|
60 |
+
contentObj.style.top = topPos + 'px';
|
61 |
+
if(rerunFunction){
|
62 |
+
setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
|
63 |
+
}else{
|
64 |
+
if(height<=1){
|
65 |
+
obj.style.display='none';
|
66 |
+
if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
|
67 |
+
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.display='block';
|
68 |
+
document.getElementById('dhtmlgoodies_a' + objectIdToSlideDown).style.visibility='visible';
|
69 |
+
slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed);
|
70 |
+
}else{
|
71 |
+
dhtmlgoodies_slideInProgress = false;
|
72 |
+
}
|
73 |
+
}else{
|
74 |
+
dhtmlgoodies_activeId = inputId;
|
75 |
+
dhtmlgoodies_slideInProgress = false;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
|
82 |
+
function initShowHideDivs()
|
83 |
+
{
|
84 |
+
var divs = document.getElementsByTagName('DIV');
|
85 |
+
var divCounter = 1;
|
86 |
+
for(var no=0;no<divs.length;no++){
|
87 |
+
if(divs[no].className=='dhtmlgoodies_question'){
|
88 |
+
divs[no].onclick = showHideContent;
|
89 |
+
divs[no].id = 'dhtmlgoodies_q'+divCounter;
|
90 |
+
var answer = divs[no].nextSibling;
|
91 |
+
while(answer && answer.tagName!='DIV'){
|
92 |
+
answer = answer.nextSibling;
|
93 |
+
}
|
94 |
+
answer.id = 'dhtmlgoodies_a'+divCounter;
|
95 |
+
contentDiv = answer.getElementsByTagName('DIV')[0];
|
96 |
+
contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px';
|
97 |
+
contentDiv.className='dhtmlgoodies_answer_content';
|
98 |
+
contentDiv.id = 'dhtmlgoodies_ac' + divCounter;
|
99 |
+
answer.style.display='none';
|
100 |
+
answer.style.height='1px';
|
101 |
+
divCounter++;
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Sttl_Topcart</name>
|
4 |
+
<version>2.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.silvertouch.com/MagentoExtensions/licence">STTL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>On clicking MyCart the user is presented with a designed and detailed pop up of the Cart. </summary>
|
10 |
+
<description>1.User can see the details of their Cart time by just one click on My Cart.
|
11 |
+
2. The design can be changed as per your requirement.&#xD;
|
12 |
+
3. Theme is made using additional CSS- thus no effect on the core files.</description>
|
13 |
+
<notes>On clicking MyCart the user is presented with a designed and detailed pop up of the Cart. </notes>
|
14 |
+
<authors><author><name>Silvertouch</name><user>silvertouch</user><email>magento@silvertouch.com</email></author></authors>
|
15 |
+
<date>2014-08-06</date>
|
16 |
+
<time>05:47:20</time>
|
17 |
+
<contents><target name="magelocal"><dir name="Sttl"><dir name="Topcart"><dir name="Block"><file name="Cartheader.php" hash="5f53603343d897731d157ee0bc6a18d9"/><dir name="Html"><file name="Header.php" hash="169a4e8d08430b6960921d00dc95d5a4"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d29a365747db7eae790946b4b7585e2a"/></dir><dir name="controllers"><file name="IndexController.php" hash="ac40f20d9487924e9e92bbfeb40edca1"/></dir><dir name="etc"><file name="config.xml" hash="c376bf52e2c12cad8d75e2089c256de9"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="topcart.xml" hash="53f84eab13398be65f552e2020015816"/></dir><dir name="template"><dir name="topcart"><dir name="checkout"><dir name="cart"><file name="cartheader.phtml" hash="01878d31ccdab28e6d885cd077bb17f5"/></dir></dir><dir name="page"><dir name="html"><file name="header.phtml" hash="6b2fce05667d641b9608ec2e99d3ca57"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sttl_Topcart.xml" hash="f41c39d4406127bf52ee42d2014ec98a"/></dir></target><target name="mage"><dir name="js"><dir name="topcart"><file name="topcart.js" hash="01b9756a534f453ead78e3d1ea6ec2b1"/></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="topcart"><file name="topcart.css" hash="fa71db0b448e917c8925b59237f66cb9"/></dir></dir></dir></dir></dir></dir><dir name="silver_docs"><file name="SILVER_Top_Cart_Popup_User_Guide_Ver_1.0.pdf" hash="5a66c216c879470af05bc25031e3c499"/></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
+
</package>
|
silver_docs/SILVER_Top_Cart_Popup_User_Guide_Ver_1.0.pdf
ADDED
Binary file
|
skin/frontend/base/default/css/topcart/topcart.css
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body{
|
2 |
+
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; /* Font to use */
|
3 |
+
margin:0px;
|
4 |
+
|
5 |
+
}
|
6 |
+
|
7 |
+
.dhtmlgoodies_question{ /* Styling question */
|
8 |
+
/* Start layout CSS */
|
9 |
+
color:#EBBC58;
|
10 |
+
font-size:0.9em;
|
11 |
+
margin-bottom:2px;
|
12 |
+
padding-left:2px;
|
13 |
+
height:20px;
|
14 |
+
padding-right: 10px;
|
15 |
+
/* End layout CSS */
|
16 |
+
|
17 |
+
overflow:hidden;
|
18 |
+
cursor:pointer;
|
19 |
+
}
|
20 |
+
.dhtmlgoodies_answer{ /* Parent box of slide down content */
|
21 |
+
/* Start layout CSS */
|
22 |
+
border:1px solid #317082;
|
23 |
+
background-color:#E2EBED;
|
24 |
+
width:300px;
|
25 |
+
|
26 |
+
/* End layout CSS */
|
27 |
+
|
28 |
+
visibility:hidden;
|
29 |
+
height:0px;
|
30 |
+
overflow:hidden;
|
31 |
+
position:absolute;
|
32 |
+
.left:0px;
|
33 |
+
.margin-left:325px;
|
34 |
+
|
35 |
+
}
|
36 |
+
.dhtmlgoodies_answer_content{ /* Content that is slided down */
|
37 |
+
padding:1px;
|
38 |
+
font-size:0.9em;
|
39 |
+
/*position:absolute;*/
|
40 |
+
text-align:left;
|
41 |
+
padding:10px;
|
42 |
+
}
|
43 |
+
|