.phar/ 0000775 0001750 0001750 00000000000 12545161546 011403 5 ustar daemos daemos .phar/.metadata.bin 0000666 0001750 0001750 00000000655 12545161546 013743 0 ustar daemos daemos a:11:{s:12:"RevisionDate";i:1435820902;s:10:"ActualName";s:14:"Tony\PopupDemo";s:12:"VersionMajor";s:3:"5.2";s:12:"VersionMinor";s:1:"0";s:14:"MinCoreVersion";s:1:"0";s:4:"Name";s:10:"Popup demo";s:6:"Author";s:4:"Tony";s:8:"IconLink";N;s:11:"Description";s:117:"Simple example of page with popup widget. Based on KB article http://kb.x-cart.com/display/XDD/Creating+popup+widget.";s:12:"Dependencies";a:0:{}s:8:"isSystem";i:0;}
.hash 0000666 0001750 0001750 00000001555 12545161546 011327 0 ustar daemos daemos {"classes\/XLite\/Module\/Tony\/PopupDemo\/View\/Page\/Customer\/TonyCustom.php":"3ccdfb1302da8fc45ecef7b8207ad2b0","classes\/XLite\/Module\/Tony\/PopupDemo\/View\/DemoWidget.php":"c3ba93db9ceaa5d3aff1b5129ce497d0","classes\/XLite\/Module\/Tony\/PopupDemo\/View\/Button\/DemoPopupButton.php":"64b3dd9f13761b072ba6083af3ba0b9e","classes\/XLite\/Module\/Tony\/PopupDemo\/Controller\/Customer\/TonyCustom.php":"82f66ee6ff513bcfe2b6a519a5587365","classes\/XLite\/Module\/Tony\/PopupDemo\/Main.php":"5568a91b66cad8c327106da05ed0a09e","skins\/default\/en\/modules\/Tony\/PopupDemo\/page\/tony_custom\/demo_widget.tpl":"20ab16b2130f6817cacb0037963502f4","skins\/default\/en\/modules\/Tony\/PopupDemo\/page\/tony_custom\/body.tpl":"ce4ca6468c70a18ecc12fe0f50a68646","skins\/default\/en\/modules\/Tony\/PopupDemo\/page\/tony_custom\/popup_button.js":"bcad05912f4bf5be1f56675c03492bf0"}
skins/default/en/modules/Tony/PopupDemo/page/tony_custom/demo_widget.tpl 0000664 0001750 0001750 00000000746 12544760334 026376 0 ustar daemos daemos {* vim: set ts=2 sw=2 sts=2 et: *}
{**
* Demo widget block
*}
skins/default/en/modules/Tony/PopupDemo/page/tony_custom/body.tpl 0000666 0001750 0001750 00000000175 12544453230 025034 0 ustar daemos daemos This is a popup page.
skins/default/en/modules/Tony/PopupDemo/page/tony_custom/popup_button.js 0000664 0001750 0001750 00000000705 12544731056 026454 0 ustar daemos daemos /* vim: set ts=2 sw=2 sts=2 et: */
/**
* Demo popup button controller
*/
function DemoPopupButton()
{
DemoPopupButton.superclass.constructor.apply(this, arguments);
}
extend(DemoPopupButton, PopupButton);
DemoPopupButton.prototype.pattern = '.demo-popup';
DemoPopupButton.prototype.callback = function(selector)
{
PopupButton.prototype.callback.apply(this, arguments);
// Some autoloading could be added
}
core.autoload(DemoPopupButton);
classes/XLite/Module/Tony/PopupDemo/Controller/ 0000775 0001750 0001750 00000000000 12544440210 021251 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/Controller/Customer/ 0000775 0001750 0001750 00000000000 12544435755 023074 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/Controller/Customer/TonyCustom.php 0000666 0001750 0001750 00000000205 12545156067 025725 0 ustar daemos daemos
* @copyright Copyright (c) 2011-2014 Qualiteam software Ltd . All rights reserved
* @license http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement
* @link http://www.x-cart.com/
*/
namespace XLite\Module\Tony\PopupDemo;
/**
* Main module
*/
abstract class Main extends \XLite\Module\AModule
{
/**
* Author name
*
* @return string
*/
public static function getAuthorName()
{
return 'Tony';
}
/**
* Module name
*
* @return string
*/
public static function getModuleName()
{
return 'Popup demo';
}
/**
* Module description
*
* @return string
*/
public static function getDescription()
{
return 'Simple example of page with popup widget. Based on KB article http://kb.x-cart.com/display/XDD/Creating+popup+widget.';
}
/**
* Get module major version
*
* @return string
*/
public static function getMajorVersion()
{
return '5.2';
}
/**
* Module version
*
* @return string
*/
public static function getMinorVersion()
{
return '0';
}
} classes/XLite/Module/Tony/PopupDemo/View/ 0000775 0001750 0001750 00000000000 12544464266 020061 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/View/Page/ 0000775 0001750 0001750 00000000000 12544440232 020720 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/View/Page/Customer/ 0000775 0001750 0001750 00000000000 12544435755 022537 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/View/Page/Customer/TonyCustom.php 0000666 0001750 0001750 00000000635 12544436530 025372 0 ustar daemos daemos countQuantity();
}
protected function getDisplaySubtotal() {
return \XLite\Model\Cart::getInstance()->getDisplaySubtotal();
}
protected function getCurrency() {
return \XLite\Model\Cart::getInstance()->getCurrency();
}
/**
* Check if items are present
*
* @return boolean
*/
protected function hasItems()
{
return (bool) \XLite\Model\Cart::getInstance()->countItems();
}
/**
* Return up to 5 items from cart
*
* @return array
*/
protected function getItemsList()
{
return array_slice(
\XLite\Model\Cart::getInstance()->getItems()->toArray(),
0,
min(5, \XLite\Model\Cart::getInstance()->countItems())
);
}
} classes/XLite/Module/Tony/PopupDemo/View/Button/ 0000775 0001750 0001750 00000000000 12544452745 021333 5 ustar daemos daemos classes/XLite/Module/Tony/PopupDemo/View/Button/DemoPopupButton.php 0000664 0001750 0001750 00000001612 12544727323 025145 0 ustar daemos daemos 'tony_custom',
'widget' => '\XLite\Module\Tony\PopupDemo\View\DemoWidget',
);
}
/**
* Return CSS classes
*
* @return string
*/
protected function getClass()
{
return parent::getClass() . ' demo-popup';
}
}