Version Notes
Countdown timer for Special product price to date. Timer displays according to the special price and to date set while adding products.
Download this release
Release Info
Developer | LEAD |
Extension | Price_Countdown |
Version | 0.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 0.1.4
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer.php +0 -29
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit.php +0 -61
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Form.php +0 -35
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Tab/Form.php +0 -74
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Tabs.php +0 -41
- app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Grid.php +0 -124
- app/code/local/Apptha/Timer/Block/Compare.php +0 -28
- app/code/local/Apptha/Timer/Block/List.php +0 -34
- app/code/local/Apptha/Timer/Block/Product/List.php +42 -0
- app/code/local/Apptha/Timer/Block/Product/View.php +43 -0
- app/code/local/Apptha/Timer/Block/View.php +0 -28
- app/code/local/Apptha/Timer/Helper/Data.php +67 -10
- app/code/local/Apptha/Timer/Model/Mysql4/Timer.php +0 -26
- app/code/local/Apptha/Timer/Model/Mysql4/Timer/Collection.php +0 -26
- app/code/local/Apptha/Timer/Model/Status.php +0 -31
- app/code/local/{Mage/Adminhtml/Model/System/Config/Source/Caption.php → Apptha/Timer/Model/System/Config/Source/Showin.php} +21 -9
- app/code/local/Apptha/Timer/Model/Timer.php +0 -26
- app/code/local/Apptha/Timer/controllers/Adminhtml/TimerController.php +0 -230
- app/code/local/Apptha/Timer/controllers/IndexController.php +0 -26
- app/code/local/Apptha/Timer/etc/adminhtml.xml +86 -20
- app/code/local/Apptha/Timer/etc/config.xml +64 -95
- app/code/local/Apptha/Timer/etc/system.xml +40 -17
- app/code/local/Apptha/Timer/sql/timer_setup/mysql4-install-0.1.0.php +0 -39
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Align.php +0 -33
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Display.php +0 -28
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Heading.php +0 -38
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Imagelist.php +0 -66
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Scale.php +0 -32
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Skin.php +0 -51
- app/code/local/Mage/Adminhtml/Model/System/Config/Source/Truefalse.php +0 -30
- app/design/adminhtml/default/default/layout/timer.xml +34 -9
- app/design/frontend/base/default/layout/timer.xml +88 -0
- app/design/frontend/{default/default/template/timer → base/default/template/timer/product}/list.phtml +83 -74
- app/design/frontend/base/default/template/timer/product/view.phtml +101 -0
- app/design/frontend/default/default/layout/timer.xml +0 -42
- app/design/frontend/default/default/template/timer/view.phtml +0 -84
- app/etc/modules/Apptha_Timer.xml +30 -0
- js/timer.js +26 -14
- package.xml +4 -4
- skin/frontend/{default → base}/default/timer/timer.css +20 -9
app/code/local/Apptha/Timer/Block/Adminhtml/Timer.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_Adminhtml_Timer extends Mage_Adminhtml_Block_Widget_Grid_Container
|
20 |
-
{
|
21 |
-
public function __construct()
|
22 |
-
{
|
23 |
-
$this->_controller = 'adminhtml_timer';
|
24 |
-
$this->_blockGroup = 'timer';
|
25 |
-
$this->_headerText = Mage::helper('timer')->__('Item Manager');
|
26 |
-
$this->_addButtonLabel = Mage::helper('timer')->__('Add Item');
|
27 |
-
parent::__construct();
|
28 |
-
}
|
29 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit.php
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_Adminhtml_Timer_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
20 |
-
{
|
21 |
-
public function __construct()
|
22 |
-
{
|
23 |
-
parent::__construct();
|
24 |
-
|
25 |
-
$this->_objectId = 'id';
|
26 |
-
$this->_blockGroup = 'timer';
|
27 |
-
$this->_controller = 'adminhtml_timer';
|
28 |
-
|
29 |
-
$this->_updateButton('save', 'label', Mage::helper('timer')->__('Save Item'));
|
30 |
-
$this->_updateButton('delete', 'label', Mage::helper('timer')->__('Delete Item'));
|
31 |
-
|
32 |
-
$this->_addButton('saveandcontinue', array(
|
33 |
-
'label' => Mage::helper('adminhtml')->__('Save And Continue Edit'),
|
34 |
-
'onclick' => 'saveAndContinueEdit()',
|
35 |
-
'class' => 'save',
|
36 |
-
), -100);
|
37 |
-
|
38 |
-
$this->_formScripts[] = "
|
39 |
-
function toggleEditor() {
|
40 |
-
if (tinyMCE.getInstanceById('timer_content') == null) {
|
41 |
-
tinyMCE.execCommand('mceAddControl', false, 'timer_content');
|
42 |
-
} else {
|
43 |
-
tinyMCE.execCommand('mceRemoveControl', false, 'timer_content');
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
function saveAndContinueEdit(){
|
48 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
49 |
-
}
|
50 |
-
";
|
51 |
-
}
|
52 |
-
|
53 |
-
public function getHeaderText()
|
54 |
-
{
|
55 |
-
if( Mage::registry('timer_data') && Mage::registry('timer_data')->getId() ) {
|
56 |
-
return Mage::helper('timer')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('timer_data')->getTitle()));
|
57 |
-
} else {
|
58 |
-
return Mage::helper('timer')->__('Add Item');
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Form.php
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_Adminhtml_Timer_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
20 |
-
{
|
21 |
-
protected function _prepareForm()
|
22 |
-
{
|
23 |
-
$form = new Varien_Data_Form(array(
|
24 |
-
'id' => 'edit_form',
|
25 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
26 |
-
'method' => 'post',
|
27 |
-
'enctype' => 'multipart/form-data'
|
28 |
-
)
|
29 |
-
);
|
30 |
-
|
31 |
-
$form->setUseContainer(true);
|
32 |
-
$this->setForm($form);
|
33 |
-
return parent::_prepareForm();
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Tab/Form.php
DELETED
@@ -1,74 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_Adminhtml_Timer_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
20 |
-
{
|
21 |
-
protected function _prepareForm()
|
22 |
-
{
|
23 |
-
$form = new Varien_Data_Form();
|
24 |
-
$this->setForm($form);
|
25 |
-
$fieldset = $form->addFieldset('timer_form', array('legend'=>Mage::helper('timer')->__('Item information')));
|
26 |
-
|
27 |
-
$fieldset->addField('title', 'text', array(
|
28 |
-
'label' => Mage::helper('timer')->__('Title'),
|
29 |
-
'class' => 'required-entry',
|
30 |
-
'required' => true,
|
31 |
-
'name' => 'title',
|
32 |
-
));
|
33 |
-
|
34 |
-
$fieldset->addField('filename', 'file', array(
|
35 |
-
'label' => Mage::helper('timer')->__('File'),
|
36 |
-
'required' => false,
|
37 |
-
'name' => 'filename',
|
38 |
-
));
|
39 |
-
|
40 |
-
$fieldset->addField('status', 'select', array(
|
41 |
-
'label' => Mage::helper('timer')->__('Status'),
|
42 |
-
'name' => 'status',
|
43 |
-
'values' => array(
|
44 |
-
array(
|
45 |
-
'value' => 1,
|
46 |
-
'label' => Mage::helper('timer')->__('Enabled'),
|
47 |
-
),
|
48 |
-
|
49 |
-
array(
|
50 |
-
'value' => 2,
|
51 |
-
'label' => Mage::helper('timer')->__('Disabled'),
|
52 |
-
),
|
53 |
-
),
|
54 |
-
));
|
55 |
-
|
56 |
-
$fieldset->addField('content', 'editor', array(
|
57 |
-
'name' => 'content',
|
58 |
-
'label' => Mage::helper('timer')->__('Content'),
|
59 |
-
'title' => Mage::helper('timer')->__('Content'),
|
60 |
-
'style' => 'width:700px; height:500px;',
|
61 |
-
'wysiwyg' => false,
|
62 |
-
'required' => true,
|
63 |
-
));
|
64 |
-
|
65 |
-
if ( Mage::getSingleton('adminhtml/session')->getTimerData() )
|
66 |
-
{
|
67 |
-
$form->setValues(Mage::getSingleton('adminhtml/session')->getTimerData());
|
68 |
-
Mage::getSingleton('adminhtml/session')->setTimerData(null);
|
69 |
-
} elseif ( Mage::registry('timer_data') ) {
|
70 |
-
$form->setValues(Mage::registry('timer_data')->getData());
|
71 |
-
}
|
72 |
-
return parent::_prepareForm();
|
73 |
-
}
|
74 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Edit/Tabs.php
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
/**
|
4 |
-
* Contus Support Interactive.
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the EULA
|
9 |
-
* that is bundled with this package in the file PRICE COUNTDOWN-LICENSE.txt.
|
10 |
-
*
|
11 |
-
* =================================================================
|
12 |
-
* MAGENTO EDITION USAGE NOTICE
|
13 |
-
* =================================================================
|
14 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
15 |
-
* Contus Support does not guarantee correct work of this package
|
16 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
17 |
-
* =================================================================
|
18 |
-
*/
|
19 |
-
|
20 |
-
class Apptha_Timer_Block_Adminhtml_Timer_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
21 |
-
{
|
22 |
-
|
23 |
-
public function __construct()
|
24 |
-
{
|
25 |
-
parent::__construct();
|
26 |
-
$this->setId('timer_tabs');
|
27 |
-
$this->setDestElementId('edit_form');
|
28 |
-
$this->setTitle(Mage::helper('timer')->__('Item Information'));
|
29 |
-
}
|
30 |
-
|
31 |
-
protected function _beforeToHtml()
|
32 |
-
{
|
33 |
-
$this->addTab('form_section', array(
|
34 |
-
'label' => Mage::helper('timer')->__('Item Information'),
|
35 |
-
'title' => Mage::helper('timer')->__('Item Information'),
|
36 |
-
'content' => $this->getLayout()->createBlock('timer/adminhtml_timer_edit_tab_form')->toHtml(),
|
37 |
-
));
|
38 |
-
|
39 |
-
return parent::_beforeToHtml();
|
40 |
-
}
|
41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Adminhtml/Timer/Grid.php
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_Adminhtml_Timer_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
20 |
-
{
|
21 |
-
public function __construct()
|
22 |
-
{
|
23 |
-
parent::__construct();
|
24 |
-
$this->setId('timerGrid');
|
25 |
-
$this->setDefaultSort('timer_id');
|
26 |
-
$this->setDefaultDir('ASC');
|
27 |
-
$this->setSaveParametersInSession(true);
|
28 |
-
}
|
29 |
-
|
30 |
-
protected function _prepareCollection()
|
31 |
-
{
|
32 |
-
$collection = Mage::getModel('timer/timer')->getCollection();
|
33 |
-
$this->setCollection($collection);
|
34 |
-
return parent::_prepareCollection();
|
35 |
-
}
|
36 |
-
|
37 |
-
protected function _prepareColumns()
|
38 |
-
{
|
39 |
-
$this->addColumn('timer_id', array(
|
40 |
-
'header' => Mage::helper('timer')->__('ID'),
|
41 |
-
'align' =>'right',
|
42 |
-
'width' => '50px',
|
43 |
-
'index' => 'timer_id',
|
44 |
-
));
|
45 |
-
|
46 |
-
$this->addColumn('title', array(
|
47 |
-
'header' => Mage::helper('timer')->__('Title'),
|
48 |
-
'align' =>'left',
|
49 |
-
'index' => 'title',
|
50 |
-
));
|
51 |
-
|
52 |
-
$this->addColumn('status', array(
|
53 |
-
'header' => Mage::helper('timer')->__('Status'),
|
54 |
-
'align' => 'left',
|
55 |
-
'width' => '80px',
|
56 |
-
'index' => 'status',
|
57 |
-
'type' => 'options',
|
58 |
-
'options' => array(
|
59 |
-
1 => 'Enabled',
|
60 |
-
2 => 'Disabled',
|
61 |
-
),
|
62 |
-
));
|
63 |
-
|
64 |
-
$this->addColumn('action',
|
65 |
-
array(
|
66 |
-
'header' => Mage::helper('timer')->__('Action'),
|
67 |
-
'width' => '100',
|
68 |
-
'type' => 'action',
|
69 |
-
'getter' => 'getId',
|
70 |
-
'actions' => array(
|
71 |
-
array(
|
72 |
-
'caption' => Mage::helper('timer')->__('Edit'),
|
73 |
-
'url' => array('base'=> '*/*/edit'),
|
74 |
-
'field' => 'id'
|
75 |
-
)
|
76 |
-
),
|
77 |
-
'filter' => false,
|
78 |
-
'sortable' => false,
|
79 |
-
'index' => 'stores',
|
80 |
-
'is_system' => true,
|
81 |
-
));
|
82 |
-
|
83 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('timer')->__('CSV'));
|
84 |
-
$this->addExportType('*/*/exportXml', Mage::helper('timer')->__('XML'));
|
85 |
-
|
86 |
-
return parent::_prepareColumns();
|
87 |
-
}
|
88 |
-
|
89 |
-
protected function _prepareMassaction()
|
90 |
-
{
|
91 |
-
$this->setMassactionIdField('timer_id');
|
92 |
-
$this->getMassactionBlock()->setFormFieldName('timer');
|
93 |
-
|
94 |
-
$this->getMassactionBlock()->addItem('delete', array(
|
95 |
-
'label' => Mage::helper('timer')->__('Delete'),
|
96 |
-
'url' => $this->getUrl('*/*/massDelete'),
|
97 |
-
'confirm' => Mage::helper('timer')->__('Are you sure?')
|
98 |
-
));
|
99 |
-
|
100 |
-
$statuses = Mage::getSingleton('timer/status')->getOptionArray();
|
101 |
-
|
102 |
-
array_unshift($statuses, array('label'=>'', 'value'=>''));
|
103 |
-
$this->getMassactionBlock()->addItem('status', array(
|
104 |
-
'label'=> Mage::helper('timer')->__('Change status'),
|
105 |
-
'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
|
106 |
-
'additional' => array(
|
107 |
-
'visibility' => array(
|
108 |
-
'name' => 'status',
|
109 |
-
'type' => 'select',
|
110 |
-
'class' => 'required-entry',
|
111 |
-
'label' => Mage::helper('timer')->__('Status'),
|
112 |
-
'values' => $statuses
|
113 |
-
)
|
114 |
-
)
|
115 |
-
));
|
116 |
-
return $this;
|
117 |
-
}
|
118 |
-
|
119 |
-
public function getRowUrl($row)
|
120 |
-
{
|
121 |
-
return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
122 |
-
}
|
123 |
-
|
124 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Compare.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
class Apptha_Timer_Block_Compare extends Mage_Catalog_Block_Product_Compare_List
|
19 |
-
{
|
20 |
-
protected function _prepareLayout()
|
21 |
-
{
|
22 |
-
$block = $this->getLayout()->getBlock('catalog.compare.list');
|
23 |
-
if ($block) {
|
24 |
-
$block->setTemplate('timer/compare.phtml');
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/List.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Block_List extends Mage_Catalog_Block_Product_List
|
20 |
-
{
|
21 |
-
protected function _prepareLayout()
|
22 |
-
{
|
23 |
-
$block = $this->getLayout()->getBlock('product_list');
|
24 |
-
if ($block) {
|
25 |
-
$block->setTemplate('timer/list.phtml');
|
26 |
-
}
|
27 |
-
|
28 |
-
$block = $this->getLayout()->getBlock('search_result_list');
|
29 |
-
if ($block) {
|
30 |
-
$block->setTemplate('timer/list.phtml');
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
34 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Block/Product/List.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
+
*
|
12 |
+
* ==============================================================
|
13 |
+
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
class Apptha_Timer_Block_Product_List extends Mage_Catalog_Block_Product_List
|
31 |
+
{
|
32 |
+
public function getPriceCountDown($_product){
|
33 |
+
if(Mage::helper('timer')->isEnabled()){
|
34 |
+
if($_product->getPrice() > $_product->getSpecialPrice()){
|
35 |
+
if($_product->getSpecialPrice() != 0 || $_product->getSpecialPrice()){
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
}
|
app/code/local/Apptha/Timer/Block/Product/View.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
+
*
|
12 |
+
* ==============================================================
|
13 |
+
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
class Apptha_Timer_Block_Product_View extends Mage_Catalog_Block_Product_View
|
31 |
+
{
|
32 |
+
public function getPriceCountDown(){
|
33 |
+
if(Mage::helper('timer')->isEnabled()){
|
34 |
+
if($this->getProduct()->getPrice() > $this->getProduct()->getSpecialPrice()){
|
35 |
+
if($this->getProduct()->getSpecialPrice() != 0 || $this->getProduct()->getSpecialPrice()){
|
36 |
+
return true;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
|
43 |
+
}
|
app/code/local/Apptha/Timer/Block/View.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
class Apptha_Timer_Block_View extends Mage_Catalog_Block_Product_View
|
19 |
-
{
|
20 |
-
protected function _prepareLayout()
|
21 |
-
{
|
22 |
-
$block = $this->getLayout()->getBlock('product.info.addto');
|
23 |
-
if ($block) {
|
24 |
-
$block->setTemplate('timer/view.phtml');
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Helper/Data.php
CHANGED
@@ -1,22 +1,79 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
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
|
|
|
|
|
9 |
*
|
10 |
-
*
|
11 |
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
*
|
13 |
-
* This package designed for Magento
|
14 |
-
*
|
15 |
-
* on any other Magento edition except Magento
|
16 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
*/
|
18 |
-
|
19 |
class Apptha_Timer_Helper_Data extends Mage_Core_Helper_Abstract
|
20 |
{
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
*
|
12 |
+
* ==============================================================
|
13 |
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
*/
|
|
|
30 |
class Apptha_Timer_Helper_Data extends Mage_Core_Helper_Abstract
|
31 |
{
|
32 |
+
const XML_PATH_ENABLED = 'timer/general/enabled';
|
33 |
+
|
34 |
+
const XML_PATH_TIMER_HEADING = 'timer/general/timer_heading';
|
35 |
+
|
36 |
+
const XML_PATH_TIMER_CAPTION = 'timer/general/timer_catption';
|
37 |
+
|
38 |
+
const XML_PATH_TITLE = 'timer/general/title';
|
39 |
+
|
40 |
+
public function conf($code, $store = null){
|
41 |
+
return Mage::getStoreConfig($code, $store);
|
42 |
+
}
|
43 |
+
|
44 |
+
public function isEnabled($store = null){
|
45 |
+
return $this->conf(self::XML_PATH_ENABLED, $store);
|
46 |
+
}
|
47 |
+
|
48 |
+
public function isTimerHeading(){
|
49 |
+
return $this->conf(self::XML_PATH_TIMER_HEADING, $store);
|
50 |
+
}
|
51 |
+
|
52 |
+
public function isTimerCaption(){
|
53 |
+
return $this->conf(self::XML_PATH_TIMER_CAPTION, $store);
|
54 |
+
}
|
55 |
+
|
56 |
+
public function getTimerTitle(){
|
57 |
+
return $this->conf(self::XML_PATH_TITLE, $store);
|
58 |
+
}
|
59 |
+
|
60 |
+
public function isShowTitle(){
|
61 |
+
if($this->isTimerHeading() == 'showall' || $this->isTimerHeading() == 'viewpage'){
|
62 |
+
if($this->isTimerHeading() != 'hideall'){
|
63 |
+
if($this->getTimerTitle())
|
64 |
+
return true;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
public function isShowCaption(){
|
71 |
+
if ($this->isTimerCaption() == 'showall' || $this->isTimerCaption() == 'viewpage') {
|
72 |
+
if($this->isTimerCaption() != 'hideall'){
|
73 |
+
return true;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
}
|
app/code/local/Apptha/Timer/Model/Mysql4/Timer.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Model_Mysql4_Timer extends Mage_Core_Model_Mysql4_Abstract
|
20 |
-
{
|
21 |
-
public function _construct()
|
22 |
-
{
|
23 |
-
// Note that the timer_id refers to the key field in your database table.
|
24 |
-
$this->_init('timer/timer', 'timer_id');
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Model/Mysql4/Timer/Collection.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Model_Mysql4_Timer_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
20 |
-
{
|
21 |
-
public function _construct()
|
22 |
-
{
|
23 |
-
parent::_construct();
|
24 |
-
$this->_init('timer/timer');
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/Model/Status.php
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Model_Status extends Varien_Object
|
20 |
-
{
|
21 |
-
const STATUS_ENABLED = 1;
|
22 |
-
const STATUS_DISABLED = 2;
|
23 |
-
|
24 |
-
static public function getOptionArray()
|
25 |
-
{
|
26 |
-
return array(
|
27 |
-
self::STATUS_ENABLED => Mage::helper('timer')->__('Enabled'),
|
28 |
-
self::STATUS_DISABLED => Mage::helper('timer')->__('Disabled')
|
29 |
-
);
|
30 |
-
}
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/{Mage/Adminhtml/Model/System/Config/Source/Caption.php → Apptha/Timer/Model/System/Config/Source/Showin.php}
RENAMED
@@ -1,21 +1,33 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
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
|
|
|
|
|
9 |
*
|
10 |
-
*
|
11 |
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
*
|
13 |
-
* This package designed for Magento
|
14 |
-
*
|
15 |
-
* on any other Magento edition except Magento
|
16 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
*/
|
18 |
-
class
|
19 |
{
|
20 |
|
21 |
/**
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
*
|
12 |
+
* ==============================================================
|
13 |
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
*/
|
30 |
+
class Apptha_Timer_Model_System_Config_Source_Showin
|
31 |
{
|
32 |
|
33 |
/**
|
app/code/local/Apptha/Timer/Model/Timer.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Model_Timer extends Mage_Core_Model_Abstract
|
20 |
-
{
|
21 |
-
public function _construct()
|
22 |
-
{
|
23 |
-
parent::_construct();
|
24 |
-
$this->_init('timer/timer');
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/controllers/Adminhtml/TimerController.php
DELETED
@@ -1,230 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_Adminhtml_TimerController extends Mage_Adminhtml_Controller_action
|
20 |
-
{
|
21 |
-
|
22 |
-
protected function _initAction() {
|
23 |
-
$this->loadLayout()
|
24 |
-
->_setActiveMenu('timer/items')
|
25 |
-
->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
26 |
-
|
27 |
-
return $this;
|
28 |
-
}
|
29 |
-
|
30 |
-
public function indexAction() {
|
31 |
-
$this->_initAction()
|
32 |
-
->renderLayout();
|
33 |
-
}
|
34 |
-
|
35 |
-
public function editAction() {
|
36 |
-
$id = $this->getRequest()->getParam('id');
|
37 |
-
$model = Mage::getModel('timer/timer')->load($id);
|
38 |
-
|
39 |
-
if ($model->getId() || $id == 0) {
|
40 |
-
$data = Mage::getSingleton('adminhtml/session')->getFormData(true);
|
41 |
-
if (!empty($data)) {
|
42 |
-
$model->setData($data);
|
43 |
-
}
|
44 |
-
|
45 |
-
Mage::register('timer_data', $model);
|
46 |
-
|
47 |
-
$this->loadLayout();
|
48 |
-
$this->_setActiveMenu('timer/items');
|
49 |
-
|
50 |
-
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item Manager'), Mage::helper('adminhtml')->__('Item Manager'));
|
51 |
-
$this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));
|
52 |
-
|
53 |
-
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
54 |
-
|
55 |
-
$this->_addContent($this->getLayout()->createBlock('timer/adminhtml_timer_edit'))
|
56 |
-
->_addLeft($this->getLayout()->createBlock('timer/adminhtml_timer_edit_tabs'));
|
57 |
-
|
58 |
-
$this->renderLayout();
|
59 |
-
} else {
|
60 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('timer')->__('Item does not exist'));
|
61 |
-
$this->_redirect('*/*/');
|
62 |
-
}
|
63 |
-
}
|
64 |
-
|
65 |
-
public function newAction() {
|
66 |
-
$this->_forward('edit');
|
67 |
-
}
|
68 |
-
|
69 |
-
public function saveAction() {
|
70 |
-
if ($data = $this->getRequest()->getPost()) {
|
71 |
-
|
72 |
-
if(isset($_FILES['filename']['name']) && $_FILES['filename']['name'] != '') {
|
73 |
-
try {
|
74 |
-
/* Starting upload */
|
75 |
-
$uploader = new Varien_File_Uploader('filename');
|
76 |
-
|
77 |
-
// Any extention would work
|
78 |
-
$uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
|
79 |
-
$uploader->setAllowRenameFiles(false);
|
80 |
-
|
81 |
-
// Set the file upload mode
|
82 |
-
// false -> get the file directly in the specified folder
|
83 |
-
// true -> get the file in the product like folders
|
84 |
-
// (file.jpg will go in something like /media/f/i/file.jpg)
|
85 |
-
$uploader->setFilesDispersion(false);
|
86 |
-
|
87 |
-
// We set media as the upload dir
|
88 |
-
$path = Mage::getBaseDir('media') . DS ;
|
89 |
-
$uploader->save($path, $_FILES['filename']['name'] );
|
90 |
-
|
91 |
-
} catch (Exception $e) {
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
//this way the name is saved in DB
|
96 |
-
$data['filename'] = $_FILES['filename']['name'];
|
97 |
-
}
|
98 |
-
|
99 |
-
|
100 |
-
$model = Mage::getModel('timer/timer');
|
101 |
-
$model->setData($data)
|
102 |
-
->setId($this->getRequest()->getParam('id'));
|
103 |
-
|
104 |
-
try {
|
105 |
-
if ($model->getCreatedTime == NULL || $model->getUpdateTime() == NULL) {
|
106 |
-
$model->setCreatedTime(now())
|
107 |
-
->setUpdateTime(now());
|
108 |
-
} else {
|
109 |
-
$model->setUpdateTime(now());
|
110 |
-
}
|
111 |
-
|
112 |
-
$model->save();
|
113 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('timer')->__('Item was successfully saved'));
|
114 |
-
Mage::getSingleton('adminhtml/session')->setFormData(false);
|
115 |
-
|
116 |
-
if ($this->getRequest()->getParam('back')) {
|
117 |
-
$this->_redirect('*/*/edit', array('id' => $model->getId()));
|
118 |
-
return;
|
119 |
-
}
|
120 |
-
$this->_redirect('*/*/');
|
121 |
-
return;
|
122 |
-
} catch (Exception $e) {
|
123 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
124 |
-
Mage::getSingleton('adminhtml/session')->setFormData($data);
|
125 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
126 |
-
return;
|
127 |
-
}
|
128 |
-
}
|
129 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('timer')->__('Unable to find item to save'));
|
130 |
-
$this->_redirect('*/*/');
|
131 |
-
}
|
132 |
-
|
133 |
-
public function deleteAction() {
|
134 |
-
if( $this->getRequest()->getParam('id') > 0 ) {
|
135 |
-
try {
|
136 |
-
$model = Mage::getModel('timer/timer');
|
137 |
-
|
138 |
-
$model->setId($this->getRequest()->getParam('id'))
|
139 |
-
->delete();
|
140 |
-
|
141 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
142 |
-
$this->_redirect('*/*/');
|
143 |
-
} catch (Exception $e) {
|
144 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
145 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
146 |
-
}
|
147 |
-
}
|
148 |
-
$this->_redirect('*/*/');
|
149 |
-
}
|
150 |
-
|
151 |
-
public function massDeleteAction() {
|
152 |
-
$timerIds = $this->getRequest()->getParam('timer');
|
153 |
-
if(!is_array($timerIds)) {
|
154 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
155 |
-
} else {
|
156 |
-
try {
|
157 |
-
foreach ($timerIds as $timerId) {
|
158 |
-
$timer = Mage::getModel('timer/timer')->load($timerId);
|
159 |
-
$timer->delete();
|
160 |
-
}
|
161 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(
|
162 |
-
Mage::helper('adminhtml')->__(
|
163 |
-
'Total of %d record(s) were successfully deleted', count($timerIds)
|
164 |
-
)
|
165 |
-
);
|
166 |
-
} catch (Exception $e) {
|
167 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
168 |
-
}
|
169 |
-
}
|
170 |
-
$this->_redirect('*/*/index');
|
171 |
-
}
|
172 |
-
|
173 |
-
public function massStatusAction()
|
174 |
-
{
|
175 |
-
$timerIds = $this->getRequest()->getParam('timer');
|
176 |
-
if(!is_array($timerIds)) {
|
177 |
-
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
178 |
-
} else {
|
179 |
-
try {
|
180 |
-
foreach ($timerIds as $timerId) {
|
181 |
-
$timer = Mage::getSingleton('timer/timer')
|
182 |
-
->load($timerId)
|
183 |
-
->setStatus($this->getRequest()->getParam('status'))
|
184 |
-
->setIsMassupdate(true)
|
185 |
-
->save();
|
186 |
-
}
|
187 |
-
$this->_getSession()->addSuccess(
|
188 |
-
$this->__('Total of %d record(s) were successfully updated', count($timerIds))
|
189 |
-
);
|
190 |
-
} catch (Exception $e) {
|
191 |
-
$this->_getSession()->addError($e->getMessage());
|
192 |
-
}
|
193 |
-
}
|
194 |
-
$this->_redirect('*/*/index');
|
195 |
-
}
|
196 |
-
|
197 |
-
public function exportCsvAction()
|
198 |
-
{
|
199 |
-
$fileName = 'timer.csv';
|
200 |
-
$content = $this->getLayout()->createBlock('timer/adminhtml_timer_grid')
|
201 |
-
->getCsv();
|
202 |
-
|
203 |
-
$this->_sendUploadResponse($fileName, $content);
|
204 |
-
}
|
205 |
-
|
206 |
-
public function exportXmlAction()
|
207 |
-
{
|
208 |
-
$fileName = 'timer.xml';
|
209 |
-
$content = $this->getLayout()->createBlock('timer/adminhtml_timer_grid')
|
210 |
-
->getXml();
|
211 |
-
|
212 |
-
$this->_sendUploadResponse($fileName, $content);
|
213 |
-
}
|
214 |
-
|
215 |
-
protected function _sendUploadResponse($fileName, $content, $contentType='application/octet-stream')
|
216 |
-
{
|
217 |
-
$response = $this->getResponse();
|
218 |
-
$response->setHeader('HTTP/1.1 200 OK','');
|
219 |
-
$response->setHeader('Pragma', 'public', true);
|
220 |
-
$response->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true);
|
221 |
-
$response->setHeader('Content-Disposition', 'attachment; filename='.$fileName);
|
222 |
-
$response->setHeader('Last-Modified', date('r'));
|
223 |
-
$response->setHeader('Accept-Ranges', 'bytes');
|
224 |
-
$response->setHeader('Content-Length', strlen($content));
|
225 |
-
$response->setHeader('Content-type', $contentType);
|
226 |
-
$response->setBody($content);
|
227 |
-
$response->sendResponse();
|
228 |
-
die;
|
229 |
-
}
|
230 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/controllers/IndexController.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Apptha_Timer_IndexController extends Mage_Core_Controller_Front_Action
|
20 |
-
{
|
21 |
-
public function indexAction()
|
22 |
-
{
|
23 |
-
$this->loadLayout();
|
24 |
-
$this->renderLayout();
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Apptha/Timer/etc/adminhtml.xml
CHANGED
@@ -1,23 +1,89 @@
|
|
1 |
-
<?xml version="1.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
<config>
|
10 |
-
<
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
**/
|
31 |
+
-->
|
32 |
<config>
|
33 |
+
<acl>
|
34 |
+
<resources>
|
35 |
+
<admin>
|
36 |
+
<children>
|
37 |
+
<apptha translate="title">
|
38 |
+
<title>Apptha</title>
|
39 |
+
<sort_order>0</sort_order>
|
40 |
+
<children>
|
41 |
+
<timer>
|
42 |
+
<title>Price CountDown</title>
|
43 |
+
<sort_order>71</sort_order>
|
44 |
+
<children>
|
45 |
<config>
|
46 |
+
<title>Configuration</title>
|
47 |
+
<sort_order>2</sort_order>
|
48 |
+
<action>adminhtml/system_config/edit/section/timer</action>
|
49 |
+
</config>
|
50 |
+
</children>
|
51 |
+
</timer>
|
52 |
+
</children>
|
53 |
+
</apptha>
|
54 |
+
<system>
|
55 |
+
<children>
|
56 |
+
<config>
|
57 |
+
<children>
|
58 |
+
<timer translate="title">
|
59 |
+
<title>Price CountDown</title>
|
60 |
+
<sort_order>100</sort_order>
|
61 |
+
</timer>
|
62 |
+
</children>
|
63 |
+
</config>
|
64 |
+
</children>
|
65 |
+
</system>
|
66 |
+
</children>
|
67 |
+
</admin>
|
68 |
+
</resources>
|
69 |
+
</acl>
|
70 |
+
<menu>
|
71 |
+
<apptha translate="title">
|
72 |
+
<title>Apptha</title>
|
73 |
+
<sort_order>71</sort_order>
|
74 |
+
<children>
|
75 |
+
<timer>
|
76 |
+
<title>Price CountDown</title>
|
77 |
+
<sort_order>10</sort_order>
|
78 |
+
<children>
|
79 |
+
<config>
|
80 |
+
<title>Configuration</title>
|
81 |
+
<sort_order>2</sort_order>
|
82 |
+
<action>adminhtml/system_config/edit/section/timer</action>
|
83 |
+
</config>
|
84 |
+
</children>
|
85 |
+
</timer>
|
86 |
+
</children>
|
87 |
+
</apptha>
|
88 |
+
</menu>
|
89 |
</config>
|
app/code/local/Apptha/Timer/etc/config.xml
CHANGED
@@ -1,20 +1,59 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Apptha_Timer>
|
5 |
-
<version>1.
|
6 |
</Apptha_Timer>
|
7 |
</modules>
|
8 |
-
<
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<timer>
|
11 |
-
<
|
12 |
-
<args>
|
13 |
-
<module>Apptha_Timer</module>
|
14 |
-
<frontName>timer</frontName>
|
15 |
-
</args>
|
16 |
</timer>
|
17 |
-
</
|
|
|
|
|
18 |
<layout>
|
19 |
<updates>
|
20 |
<timer>
|
@@ -23,46 +62,7 @@
|
|
23 |
</updates>
|
24 |
</layout>
|
25 |
</frontend>
|
26 |
-
<admin>
|
27 |
-
<routers>
|
28 |
-
<timer>
|
29 |
-
<use>admin</use>
|
30 |
-
<args>
|
31 |
-
<module>Apptha_Timer</module>
|
32 |
-
<frontName>timer</frontName>
|
33 |
-
</args>
|
34 |
-
</timer>
|
35 |
-
</routers>
|
36 |
-
</admin>
|
37 |
<adminhtml>
|
38 |
-
<!-- <menu>
|
39 |
-
<timer module="timer">
|
40 |
-
<title>Timer</title>
|
41 |
-
<sort_order>71</sort_order>
|
42 |
-
<children>
|
43 |
-
<items module="timer">
|
44 |
-
<title>Manage Items</title>
|
45 |
-
<sort_order>0</sort_order>
|
46 |
-
<action>timer/adminhtml_timer</action>
|
47 |
-
</items>
|
48 |
-
</children>
|
49 |
-
</timer>
|
50 |
-
</menu> -->
|
51 |
-
<acl>
|
52 |
-
<resources>
|
53 |
-
<all>
|
54 |
-
<title>Allow Everything</title>
|
55 |
-
</all>
|
56 |
-
<admin>
|
57 |
-
<children>
|
58 |
-
<Apptha_Timer>
|
59 |
-
<title>Timer Module</title>
|
60 |
-
<sort_order>10</sort_order>
|
61 |
-
</Apptha_Timer>
|
62 |
-
</children>
|
63 |
-
</admin>
|
64 |
-
</resources>
|
65 |
-
</acl>
|
66 |
<layout>
|
67 |
<updates>
|
68 |
<timer>
|
@@ -70,51 +70,20 @@
|
|
70 |
</timer>
|
71 |
</updates>
|
72 |
</layout>
|
73 |
-
</adminhtml>
|
74 |
-
|
75 |
-
<
|
76 |
-
<
|
77 |
-
<
|
78 |
-
<
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
<resources>
|
90 |
-
<timer_setup>
|
91 |
-
<setup>
|
92 |
-
<module>Apptha_Timer</module>
|
93 |
-
</setup>
|
94 |
-
<connection>
|
95 |
-
<use>core_setup</use>
|
96 |
-
</connection>
|
97 |
-
</timer_setup>
|
98 |
-
<timer_write>
|
99 |
-
<connection>
|
100 |
-
<use>core_write</use>
|
101 |
-
</connection>
|
102 |
-
</timer_write>
|
103 |
-
<timer_read>
|
104 |
-
<connection>
|
105 |
-
<use>core_read</use>
|
106 |
-
</connection>
|
107 |
-
</timer_read>
|
108 |
-
</resources>
|
109 |
-
<blocks>
|
110 |
-
<timer>
|
111 |
-
<class>Apptha_Timer_Block</class>
|
112 |
-
</timer>
|
113 |
-
</blocks>
|
114 |
-
<helpers>
|
115 |
-
<timer>
|
116 |
-
<class>Apptha_Timer_Helper</class>
|
117 |
-
</timer>
|
118 |
-
</helpers>
|
119 |
-
</global>
|
120 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
-->
|
32 |
<config>
|
33 |
<modules>
|
34 |
<Apptha_Timer>
|
35 |
+
<version>0.1.4</version>
|
36 |
</Apptha_Timer>
|
37 |
</modules>
|
38 |
+
<global>
|
39 |
+
<blocks>
|
40 |
+
<timer>
|
41 |
+
<class>Apptha_Timer_Block</class>
|
42 |
+
</timer>
|
43 |
+
<catalog>
|
44 |
+
<rewrite>
|
45 |
+
<product_list>Apptha_Timer_Block_Product_List</product_list>
|
46 |
+
<product_view>Apptha_Timer_Block_Product_View</product_view>
|
47 |
+
</rewrite>
|
48 |
+
</catalog>
|
49 |
+
</blocks>
|
50 |
+
<helpers>
|
51 |
<timer>
|
52 |
+
<class>Apptha_Timer_Helper</class>
|
|
|
|
|
|
|
|
|
53 |
</timer>
|
54 |
+
</helpers>
|
55 |
+
</global>
|
56 |
+
<frontend>
|
57 |
<layout>
|
58 |
<updates>
|
59 |
<timer>
|
62 |
</updates>
|
63 |
</layout>
|
64 |
</frontend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
<adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
<layout>
|
67 |
<updates>
|
68 |
<timer>
|
70 |
</timer>
|
71 |
</updates>
|
72 |
</layout>
|
73 |
+
</adminhtml>
|
74 |
+
<default>
|
75 |
+
<timer>
|
76 |
+
<general>
|
77 |
+
<enabled>1</enabled>
|
78 |
+
<activate_apptha_heading>showall</activate_apptha_heading>
|
79 |
+
<activate_apptha_description>showall</activate_apptha_description>
|
80 |
+
<title>Price CountDown</title>
|
81 |
+
</general>
|
82 |
+
<apptha_timer_color>
|
83 |
+
<text>000000</text>
|
84 |
+
<heading_text_color>000000</heading_text_color>
|
85 |
+
<description>000000</description>
|
86 |
+
</apptha_timer_color>
|
87 |
+
</timer>
|
88 |
+
</default>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
</config>
|
app/code/local/Apptha/Timer/etc/system.xml
CHANGED
@@ -1,4 +1,34 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<tabs>
|
4 |
<Apptha translate="label" module="timer">
|
@@ -23,7 +53,7 @@
|
|
23 |
<show_in_website>1</show_in_website>
|
24 |
<show_in_store>1</show_in_store>
|
25 |
<fields>
|
26 |
-
<
|
27 |
<label>Activate Price Countdown:</label>
|
28 |
<frontend_type>select</frontend_type>
|
29 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -32,31 +62,28 @@
|
|
32 |
<show_in_website>1</show_in_website>
|
33 |
<show_in_store>1</show_in_store>
|
34 |
<comment>Activate Product Timer</comment>
|
35 |
-
</
|
36 |
-
|
37 |
-
<activate_apptha_heading translate="label">
|
38 |
<label>Timer Heading:</label>
|
39 |
<frontend_type>select</frontend_type>
|
40 |
-
<source_model>
|
41 |
<sort_order>1</sort_order>
|
42 |
<show_in_default>1</show_in_default>
|
43 |
<show_in_website>1</show_in_website>
|
44 |
<show_in_store>1</show_in_store>
|
45 |
<comment>Timer Heading</comment>
|
46 |
-
</
|
47 |
-
|
48 |
-
<activate_apptha_description translate="label">
|
49 |
<label>Timer Caption:</label>
|
50 |
<frontend_type>select</frontend_type>
|
51 |
-
<source_model>
|
52 |
<sort_order>2</sort_order>
|
53 |
<show_in_default>1</show_in_default>
|
54 |
<show_in_website>1</show_in_website>
|
55 |
<show_in_store>1</show_in_store>
|
56 |
<comment>Timer Caption</comment>
|
57 |
-
</
|
58 |
-
|
59 |
-
<heading translate="label">
|
60 |
<label>Timer Title:</label>
|
61 |
<frontend_type>text</frontend_type>
|
62 |
<sort_order>3</sort_order>
|
@@ -64,7 +91,7 @@
|
|
64 |
<show_in_website>1</show_in_website>
|
65 |
<show_in_store>1</show_in_store>
|
66 |
<comment>Timer Title.</comment>
|
67 |
-
</
|
68 |
</fields>
|
69 |
</general>
|
70 |
<apptha_timer_color translate="label" module="timer">
|
@@ -85,7 +112,6 @@
|
|
85 |
<validate>color</validate>
|
86 |
<comment>Please Click the text box to select color</comment>
|
87 |
</text>
|
88 |
-
|
89 |
<heading_text_color translate="label">
|
90 |
<label>Timer Heading Text Color:</label>
|
91 |
<frontend_type>text</frontend_type>
|
@@ -96,7 +122,6 @@
|
|
96 |
<validate>color</validate>
|
97 |
<comment>Please Click the text box to select color</comment>
|
98 |
</heading_text_color>
|
99 |
-
|
100 |
<description translate="label">
|
101 |
<label>Timer Caption Text Color:</label>
|
102 |
<frontend_type>text</frontend_type>
|
@@ -107,8 +132,6 @@
|
|
107 |
<validate>color</validate>
|
108 |
<comment>Please Click the text box to select color</comment>
|
109 |
</description>
|
110 |
-
|
111 |
-
|
112 |
</fields>
|
113 |
</apptha_timer_color>
|
114 |
</groups>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
-->
|
32 |
<config>
|
33 |
<tabs>
|
34 |
<Apptha translate="label" module="timer">
|
53 |
<show_in_website>1</show_in_website>
|
54 |
<show_in_store>1</show_in_store>
|
55 |
<fields>
|
56 |
+
<enabled translate="label">
|
57 |
<label>Activate Price Countdown:</label>
|
58 |
<frontend_type>select</frontend_type>
|
59 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
62 |
<show_in_website>1</show_in_website>
|
63 |
<show_in_store>1</show_in_store>
|
64 |
<comment>Activate Product Timer</comment>
|
65 |
+
</enabled>
|
66 |
+
<timer_heading translate="label">
|
|
|
67 |
<label>Timer Heading:</label>
|
68 |
<frontend_type>select</frontend_type>
|
69 |
+
<source_model>Apptha_Timer_Model_System_Config_Source_Showin</source_model>
|
70 |
<sort_order>1</sort_order>
|
71 |
<show_in_default>1</show_in_default>
|
72 |
<show_in_website>1</show_in_website>
|
73 |
<show_in_store>1</show_in_store>
|
74 |
<comment>Timer Heading</comment>
|
75 |
+
</timer_heading>
|
76 |
+
<timer_catption translate="label">
|
|
|
77 |
<label>Timer Caption:</label>
|
78 |
<frontend_type>select</frontend_type>
|
79 |
+
<source_model>Apptha_Timer_Model_System_Config_Source_Showin</source_model>
|
80 |
<sort_order>2</sort_order>
|
81 |
<show_in_default>1</show_in_default>
|
82 |
<show_in_website>1</show_in_website>
|
83 |
<show_in_store>1</show_in_store>
|
84 |
<comment>Timer Caption</comment>
|
85 |
+
</timer_catption>
|
86 |
+
<title translate="label">
|
|
|
87 |
<label>Timer Title:</label>
|
88 |
<frontend_type>text</frontend_type>
|
89 |
<sort_order>3</sort_order>
|
91 |
<show_in_website>1</show_in_website>
|
92 |
<show_in_store>1</show_in_store>
|
93 |
<comment>Timer Title.</comment>
|
94 |
+
</title>
|
95 |
</fields>
|
96 |
</general>
|
97 |
<apptha_timer_color translate="label" module="timer">
|
112 |
<validate>color</validate>
|
113 |
<comment>Please Click the text box to select color</comment>
|
114 |
</text>
|
|
|
115 |
<heading_text_color translate="label">
|
116 |
<label>Timer Heading Text Color:</label>
|
117 |
<frontend_type>text</frontend_type>
|
122 |
<validate>color</validate>
|
123 |
<comment>Please Click the text box to select color</comment>
|
124 |
</heading_text_color>
|
|
|
125 |
<description translate="label">
|
126 |
<label>Timer Caption Text Color:</label>
|
127 |
<frontend_type>text</frontend_type>
|
132 |
<validate>color</validate>
|
133 |
<comment>Please Click the text box to select color</comment>
|
134 |
</description>
|
|
|
|
|
135 |
</fields>
|
136 |
</apptha_timer_color>
|
137 |
</groups>
|
app/code/local/Apptha/Timer/sql/timer_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
$installer = $this;
|
20 |
-
|
21 |
-
$installer->startSetup();
|
22 |
-
|
23 |
-
$installer->run("
|
24 |
-
|
25 |
-
-- DROP TABLE IF EXISTS {$this->getTable('timer')};
|
26 |
-
CREATE TABLE {$this->getTable('timer')} (
|
27 |
-
`timer_id` int(11) unsigned NOT NULL auto_increment,
|
28 |
-
`title` varchar(255) NOT NULL default '',
|
29 |
-
`filename` varchar(255) NOT NULL default '',
|
30 |
-
`content` text NOT NULL default '',
|
31 |
-
`status` smallint(6) NOT NULL default '0',
|
32 |
-
`created_time` datetime NULL,
|
33 |
-
`update_time` datetime NULL,
|
34 |
-
PRIMARY KEY (`timer_id`)
|
35 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
36 |
-
|
37 |
-
");
|
38 |
-
|
39 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Align.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* Contus Support Pvt Ltd.
|
6 |
-
* created by Vasanth on nov 02 2010.
|
7 |
-
* vasanth@contus.in
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Used in creating options for Logo Align config value selection
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class Mage_Adminhtml_Model_System_Config_Source_Align
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Options getter
|
19 |
-
*
|
20 |
-
* @return array
|
21 |
-
*/
|
22 |
-
public function toOptionArray()
|
23 |
-
{
|
24 |
-
return array(
|
25 |
-
array('value' =>TR, 'label'=>Mage::helper('adminhtml')->__('Top Right')),
|
26 |
-
array('value' => TL, 'label'=>Mage::helper('adminhtml')->__('Top Left')),
|
27 |
-
array('value' => LB, 'label'=>Mage::helper('adminhtml')->__('Bottom Left')),
|
28 |
-
array('value' => RB, 'label'=>Mage::helper('adminhtml')->__('Bottom Right')),
|
29 |
-
|
30 |
-
);
|
31 |
-
}
|
32 |
-
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Display.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* **********************************************************
|
4 |
-
|
5 |
-
* Component Name: Apptha Chatplugin
|
6 |
-
* Version: 1.0
|
7 |
-
* Edited By: Deepa.S.S.
|
8 |
-
* Author URI: http://www.contussupport.com/
|
9 |
-
|
10 |
-
* **********************************************************
|
11 |
-
|
12 |
-
@Copyright Copyright (C) 2010-2011 Contus Support
|
13 |
-
@license GNU/GPL http://www.gnu.org/copyleft/gpl.html,
|
14 |
-
|
15 |
-
* ******************************************************** */
|
16 |
-
class Mage_Adminhtml_Model_System_Config_Source_display
|
17 |
-
{
|
18 |
-
|
19 |
-
public function toOptionArray()
|
20 |
-
{
|
21 |
-
return array(
|
22 |
-
array('value' => standard, 'label'=>Mage::helper('adminhtml')->__('Standard')),
|
23 |
-
array('value' => bottom, 'label'=>Mage::helper('adminhtml')->__('Window right bottom corner')),
|
24 |
-
|
25 |
-
);
|
26 |
-
}
|
27 |
-
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Heading.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
|
19 |
-
class Mage_Adminhtml_Model_System_Config_Source_heading
|
20 |
-
{
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Options getter
|
24 |
-
*
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public function toOptionArray()
|
28 |
-
{
|
29 |
-
return array(
|
30 |
-
array('value' => showall, 'label'=>Mage::helper('adminhtml')->__('Show in catalog/products pages')),
|
31 |
-
array('value' => listpage, 'label'=>Mage::helper('adminhtml')->__('Show in catalog page')),
|
32 |
-
array('value' => viewpage, 'label'=>Mage::helper('adminhtml')->__('Show in product page')),
|
33 |
-
array('value' => hideall, 'label'=>Mage::helper('adminhtml')->__('Hide in all pages')),
|
34 |
-
|
35 |
-
);
|
36 |
-
}
|
37 |
-
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Imagelist.php
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* **********************************************************
|
5 |
-
|
6 |
-
* Component Name: Apptha FacebookApp
|
7 |
-
* Version: 1.0
|
8 |
-
*
|
9 |
-
* Author URI: http://www.contussupport.com/
|
10 |
-
|
11 |
-
* **********************************************************
|
12 |
-
|
13 |
-
@Copyright Copyright (C) 2010-2011 Contus Support
|
14 |
-
@license GNU/GPL http://www.gnu.org/copyleft/gpl.html,
|
15 |
-
|
16 |
-
* ******************************************************** */
|
17 |
-
class Mage_Adminhtml_Model_System_Config_Source_Imagelist {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Options getter
|
21 |
-
*
|
22 |
-
* @return array
|
23 |
-
*/
|
24 |
-
public function toOptionArray() {
|
25 |
-
$url = Mage::getBaseDir('media') . '/banner_images/default';
|
26 |
-
|
27 |
-
function dirImages($dir) {
|
28 |
-
$d = dir($dir); //Open Directory
|
29 |
-
while (false !== ($file = $d->read())) {
|
30 |
-
// $extension = substr($file, strrpos($file, '.')); // Gets the File Extension
|
31 |
-
// echo $file;
|
32 |
-
$extension = explode(".",$file);
|
33 |
-
//print_r($extension);
|
34 |
-
$extensionsdir = strtolower($extension[1]);
|
35 |
-
// echo $extensionsdir;
|
36 |
-
if ($extensionsdir == "jpg" || $extensionsdir == "jpeg" || $extensionsdir == "gif" | $extensionsdir == "png") // Extensions Allowed
|
37 |
-
$images[$file] = $file; // Store in Array
|
38 |
-
|
39 |
-
}
|
40 |
-
$d->close();
|
41 |
-
|
42 |
-
|
43 |
-
return $images;
|
44 |
-
}
|
45 |
-
|
46 |
-
$array = dirImages($url);
|
47 |
-
|
48 |
-
function DateCmp($a, $b) {
|
49 |
-
return ($a[1] < $b[1]) ? -1 : 0;
|
50 |
-
}
|
51 |
-
|
52 |
-
function SortByDate(&$Files) {
|
53 |
-
usort($Files, 'DateCmp');
|
54 |
-
}
|
55 |
-
|
56 |
-
SortByDate($array);
|
57 |
-
|
58 |
-
//To list in the select box.
|
59 |
-
foreach ($array as $key => $image) {
|
60 |
-
$selectvalue[] = array('value' => $image, 'label' => Mage::helper('adminhtml')->__($image),);
|
61 |
-
}
|
62 |
-
|
63 |
-
return $selectvalue;
|
64 |
-
}
|
65 |
-
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Scale.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* Contus Support Pvt Ltd.
|
6 |
-
* created by Vasanth on nov 02 2010.
|
7 |
-
* vasanth@contus.in
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Used in creating options for player Scale config value selection
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class Mage_Adminhtml_Model_System_Config_Source_Scale
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Options getter
|
19 |
-
*
|
20 |
-
* @return array
|
21 |
-
*/
|
22 |
-
public function toOptionArray()
|
23 |
-
{
|
24 |
-
return array(
|
25 |
-
array('value' =>0, 'label'=>Mage::helper('adminhtml')->__('Aspect Ratio')),
|
26 |
-
array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('Keep Orginal Size')),
|
27 |
-
array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('Fit to Screen')),
|
28 |
-
|
29 |
-
);
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Skin.php
DELETED
@@ -1,51 +0,0 @@
|
|
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 Mage
|
22 |
-
* @package Mage_Adminhtml
|
23 |
-
* @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
-
*/
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Used in creating options for Yes|No config value selection
|
29 |
-
*
|
30 |
-
*/
|
31 |
-
class Mage_Adminhtml_Model_System_Config_Source_skin
|
32 |
-
{
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Options getter
|
36 |
-
*
|
37 |
-
* @return array
|
38 |
-
*/
|
39 |
-
public function toOptionArray()
|
40 |
-
{
|
41 |
-
return array(
|
42 |
-
array('value' => skin_black, 'label'=>Mage::helper('adminhtml')->__('Black')),
|
43 |
-
array('value' => skin_Vimeo, 'label'=>Mage::helper('adminhtml')->__('Vimeo')),
|
44 |
-
array('value' => skin_Overlay, 'label'=>Mage::helper('adminhtml')->__('Overlay')),
|
45 |
-
array('value' => skin_sleekblack, 'label'=>Mage::helper('adminhtml')->__('Sleekblack')),
|
46 |
-
array('value' => skin_white, 'label'=>Mage::helper('adminhtml')->__('White')),
|
47 |
-
array('value' => fancyblack, 'label'=>Mage::helper('adminhtml')->__('FancyBlack')),
|
48 |
-
);
|
49 |
-
}
|
50 |
-
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Adminhtml/Model/System/Config/Source/Truefalse.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* Contus Support Pvt Ltd.
|
6 |
-
* created by Vasanth on nov 02 2010.
|
7 |
-
* vasanth@contus.in
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Used in creating options for True or false config value selection
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
class Mage_Adminhtml_Model_System_Config_Source_Truefalse
|
15 |
-
{
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Options getter
|
19 |
-
*
|
20 |
-
* @return array
|
21 |
-
*/
|
22 |
-
public function toOptionArray()
|
23 |
-
{
|
24 |
-
return array(
|
25 |
-
array('value' => 'true', 'label'=>Mage::helper('adminhtml')->__('Yes')),
|
26 |
-
array('value' => 'false', 'label'=>Mage::helper('adminhtml')->__('No')),
|
27 |
-
);
|
28 |
-
}
|
29 |
-
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/layout/timer.xml
CHANGED
@@ -1,14 +1,39 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<layout version="0.1.0">
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
</default>-->
|
8 |
-
<adminhtml_system_config_edit>
|
9 |
-
<reference name="head">
|
10 |
-
<action method="addJs"><file>jscolor/jscolor.js</file></action>
|
11 |
-
</reference>
|
12 |
</adminhtml_system_config_edit>
|
13 |
|
14 |
<timer_adminhtml_timer_index>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
**/
|
31 |
+
-->
|
32 |
<layout version="0.1.0">
|
33 |
+
<adminhtml_system_config_edit>
|
34 |
+
<reference name="head">
|
35 |
+
<action method="addJs"><file>jscolor/jscolor.js</file></action>
|
36 |
+
</reference>
|
|
|
|
|
|
|
|
|
|
|
37 |
</adminhtml_system_config_edit>
|
38 |
|
39 |
<timer_adminhtml_timer_index>
|
app/design/frontend/base/default/layout/timer.xml
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
**/
|
31 |
+
-->
|
32 |
+
<layout version="0.1.0">
|
33 |
+
<catalog_category_default>
|
34 |
+
<reference name="head">
|
35 |
+
<action method="addJs"><script>timer.js</script></action>
|
36 |
+
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
37 |
+
</reference>
|
38 |
+
<reference name="product_list">
|
39 |
+
<action method="setTemplate" ifconfig="timer/general/enabled">
|
40 |
+
<template>timer/product/list.phtml</template>
|
41 |
+
</action>
|
42 |
+
</reference>
|
43 |
+
</catalog_category_default>
|
44 |
+
<catalog_category_layered translate="label">
|
45 |
+
<reference name="head">
|
46 |
+
<action method="addJs"><script>timer.js</script></action>
|
47 |
+
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
48 |
+
</reference>
|
49 |
+
<reference name="product_list">
|
50 |
+
<action method="setTemplate" ifconfig="timer/general/enabled">
|
51 |
+
<template>timer/product/list.phtml</template>
|
52 |
+
</action>
|
53 |
+
</reference>
|
54 |
+
</catalog_category_layered>
|
55 |
+
<catalog_product_view>
|
56 |
+
<reference name="head">
|
57 |
+
<action method="addJs"><script>timer.js</script></action>
|
58 |
+
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
59 |
+
</reference>
|
60 |
+
<reference name="product.info.addto">
|
61 |
+
<action method="setTemplate" ifconfig="timer/general/enabled">
|
62 |
+
<template>timer/product/view.phtml</template>
|
63 |
+
</action>
|
64 |
+
</reference>
|
65 |
+
</catalog_product_view>
|
66 |
+
<catalogsearch_advanced_result>
|
67 |
+
<reference name="head">
|
68 |
+
<action method="addJs"><script>timer.js</script></action>
|
69 |
+
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
70 |
+
</reference>
|
71 |
+
<reference name="search_result_list">
|
72 |
+
<action method="setTemplate" ifconfig="timer/general/enabled">
|
73 |
+
<template>timer/product/list.phtml</template>
|
74 |
+
</action>
|
75 |
+
</reference>
|
76 |
+
</catalogsearch_advanced_result>
|
77 |
+
<catalogsearch_result_index>
|
78 |
+
<reference name="head">
|
79 |
+
<action method="addJs"><script>timer.js</script></action>
|
80 |
+
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
81 |
+
</reference>
|
82 |
+
<reference name="search_result_list">
|
83 |
+
<action method="setTemplate" ifconfig="timer/general/enabled">
|
84 |
+
<template>timer/product/list.phtml</template>
|
85 |
+
</action>
|
86 |
+
</reference>
|
87 |
+
</catalogsearch_result_index>
|
88 |
+
</layout>
|
app/design/frontend/{default/default/template/timer → base/default/template/timer/product}/list.phtml
RENAMED
@@ -1,19 +1,31 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
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
|
|
|
|
|
9 |
*
|
10 |
-
*
|
11 |
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
*
|
13 |
-
* This package designed for Magento
|
14 |
-
*
|
15 |
-
* on any other Magento edition except Magento
|
16 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
*/
|
18 |
?>
|
19 |
<?php
|
@@ -28,15 +40,6 @@
|
|
28 |
$count = 1;
|
29 |
$_productCollection=$this->getLoadedProductCollection();
|
30 |
$_helper = $this->helper('catalog/output');
|
31 |
-
|
32 |
-
/* Admin Controllers for timer are declared here */
|
33 |
-
$timer_active = Mage::getStoreConfig('timer/general/activate_apptha_timer');
|
34 |
-
$timer_head_active = Mage::getStoreConfig('timer/general/activate_apptha_heading');
|
35 |
-
$timer_desc_active = Mage::getStoreConfig('timer/general/activate_apptha_description');
|
36 |
-
$timer_color = Mage::getStoreConfig('timer/apptha_timer_color/text');
|
37 |
-
$desc_color = Mage::getStoreConfig('timer/apptha_timer_color/description');
|
38 |
-
$head_color = Mage::getStoreConfig('timer/apptha_timer_color/heading_text_color');
|
39 |
-
$timer_head = Mage::getStoreConfig('timer/general/heading');
|
40 |
?>
|
41 |
|
42 |
<?php if(!$_productCollection->count()): ?>
|
@@ -65,16 +68,24 @@ $timer_head = Mage::getStoreConfig('timer/general/heading');
|
|
65 |
<?php echo $this->getPriceHtml($_product, true) ?>
|
66 |
|
67 |
<!--Condition for Timer Controllers goes here-->
|
68 |
-
<?php if($
|
69 |
-
<?php if(
|
70 |
-
<?php
|
71 |
-
<?php
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
<?php endif; ?>
|
74 |
-
|
75 |
-
<?php if($timer_desc_active == 'showall' || $timer_desc_active == 'listpage' && $timer_desc_active!='hideall') : ?>
|
76 |
-
<div class='clear'></div><div class='timerdate' id="caption<?php echo $count; ?>"><span class='hour' style='margin:1px 23px 0 4px'><?php echo $this->__('D') ?></span><span class='hour' style='margin:1px 19px 0 6px'><?php echo $this->__('H') ?></span><span class='min' style='margin:1px 20px 0 7px'><?php echo $this->__('M') ?></span><span class='sec' style='margin:1px 0 0 6px'><?php echo $this->__('S') ?></span></div>
|
77 |
-
<?php endif;endif;endif;endif; ?>
|
78 |
|
79 |
<?php if($_product->isSaleable()): ?>
|
80 |
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
@@ -93,24 +104,6 @@ $timer_head = Mage::getStoreConfig('timer/general/heading');
|
|
93 |
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
94 |
<?php endif; ?>
|
95 |
</ul>
|
96 |
-
<?php if($_product->getPrice() > $_product->getSpecialPrice()) : ?>
|
97 |
-
<?php if($_product->getSpecialPrice()!= 0 || $_product->getSpecialPrice()!= "" ) :?>
|
98 |
-
<script type="text/javascript">
|
99 |
-
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:00 PM'; ?>");
|
100 |
-
start = "<?php echo Date("m/d/y h:i:s A", strtotime(Mage_Core_Model_Locale::date(null, null, "en_US", true))); ?>";
|
101 |
-
start_date = Date.parse(start);
|
102 |
-
var dnow<?php echo $count; ?> = new Date(start_date);
|
103 |
-
if(CountStepper>0)
|
104 |
-
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
|
105 |
-
else
|
106 |
-
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
|
107 |
-
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
|
108 |
-
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
|
109 |
-
CountBack(gsecs<?php echo $count; ?>,"countbox_"+j, j);
|
110 |
-
j++;
|
111 |
-
</script>
|
112 |
-
<?php $count = $count + 1; ?>
|
113 |
-
<?php endif;endif; ?>
|
114 |
</div>
|
115 |
</div>
|
116 |
</li>
|
@@ -138,43 +131,33 @@ $timer_head = Mage::getStoreConfig('timer/general/heading');
|
|
138 |
<?php echo $this->getPriceHtml($_product, true) ?>
|
139 |
|
140 |
<!--Condition for Timer Controllers goes here-->
|
141 |
-
<?php if($
|
142 |
-
<?php if(
|
143 |
-
<?php
|
144 |
-
<?php
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<?php endif; ?>
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
<div class="actions">
|
152 |
<?php if($_product->isSaleable()): ?>
|
153 |
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
154 |
<?php else: ?>
|
155 |
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
156 |
<?php endif; ?>
|
157 |
-
|
158 |
-
<?php if($_product->getPrice() > $_product->getSpecialPrice()) : ?>
|
159 |
-
<?php if($_product->getSpecialPrice()!= 0 || $_product->getSpecialPrice()!= "" ) :?>
|
160 |
-
<script type="text/javascript">
|
161 |
-
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:00 PM'; ?>");
|
162 |
-
start = "<?php echo Date("m/d/y h:i:s A", strtotime(Mage_Core_Model_Locale::date(null, null, "en_US", true))); ?>";
|
163 |
-
start_date = Date.parse(start);
|
164 |
-
var dnow<?php echo $count; ?> = new Date(start_date);
|
165 |
-
if(CountStepper>0)
|
166 |
-
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
|
167 |
-
else
|
168 |
-
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
|
169 |
-
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
|
170 |
-
|
171 |
-
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
|
172 |
-
CountBack(gsecs<?php echo $count; ?>,"countbox_"+j, j);
|
173 |
-
j++;
|
174 |
-
</script>
|
175 |
-
<?php $count = $count + 1; ?>
|
176 |
-
<?php endif;endif; ?>
|
177 |
-
|
178 |
<ul class="add-to-links">
|
179 |
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
180 |
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
@@ -198,6 +181,32 @@ $timer_head = Mage::getStoreConfig('timer/general/heading');
|
|
198 |
</div>
|
199 |
<?php endif; ?>
|
200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
<!--Dynamic style changes goes here-->
|
202 |
<style>
|
203 |
.timer-grid{float: left;width: 100%;padding: 0;color: #<?php echo $timer_color; ?>;font-size: 18px;font-family: arial;font-weight: bold;}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
*
|
12 |
+
* ==============================================================
|
13 |
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
*/
|
30 |
?>
|
31 |
<?php
|
40 |
$count = 1;
|
41 |
$_productCollection=$this->getLoadedProductCollection();
|
42 |
$_helper = $this->helper('catalog/output');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
?>
|
44 |
|
45 |
<?php if(!$_productCollection->count()): ?>
|
68 |
<?php echo $this->getPriceHtml($_product, true) ?>
|
69 |
|
70 |
<!--Condition for Timer Controllers goes here-->
|
71 |
+
<?php if($this->getPriceCountDown($_product)) :?>
|
72 |
+
<?php if (Mage::helper('timer')->isShowTitle()): ?>
|
73 |
+
<div id="heading<?php echo $count; ?>" style="color:#<?php echo $head_color; ?>; font-size: 14px; font-weight:bold;padding-top:0px;clear: both;">
|
74 |
+
<?php echo Mage::helper('timer')->getTimerTitle(); ?>
|
75 |
+
</div>
|
76 |
+
<?php endif; ?>
|
77 |
+
<div id="countbox_<?php echo $count; ?>" class="timer-list"></div>
|
78 |
+
<?php if (Mage::helper('timer')->isShowCaption()): ?>
|
79 |
+
<div class='clear'></div>
|
80 |
+
<div class='timerdate' id="caption<?php echo $count; ?>">
|
81 |
+
<span class='hour' style='margin:1px 23px 0 4px'><?php echo $this->__('D') ?></span>
|
82 |
+
<span class='hour' style='margin:1px 19px 0 6px'><?php echo $this->__('H') ?></span>
|
83 |
+
<span class='min' style='margin:1px 20px 0 7px'><?php echo $this->__('M') ?></span>
|
84 |
+
<span class='sec' style='margin:1px 0 0 6px'><?php echo $this->__('S') ?></span>
|
85 |
+
</div>
|
86 |
+
<?php endif;?>
|
87 |
<?php endif; ?>
|
88 |
+
<!--Condition for Timer Controllers End -->
|
|
|
|
|
|
|
89 |
|
90 |
<?php if($_product->isSaleable()): ?>
|
91 |
<p><button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
|
104 |
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
105 |
<?php endif; ?>
|
106 |
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
</div>
|
108 |
</div>
|
109 |
</li>
|
131 |
<?php echo $this->getPriceHtml($_product, true) ?>
|
132 |
|
133 |
<!--Condition for Timer Controllers goes here-->
|
134 |
+
<?php if($this->getPriceCountDown($_product)) :?>
|
135 |
+
<?php if (Mage::helper('timer')->isShowTitle()): ?>
|
136 |
+
<div id="heading<?php echo $count; ?>" style="color:#<?php echo $head_color; ?>; font-size: 14px; font-weight:bold;padding-top:0px;clear: both;">
|
137 |
+
<?php echo Mage::helper('timer')->getTimerTitle(); ?>
|
138 |
+
</div>
|
139 |
+
<?php endif; ?>
|
140 |
+
<div id="countbox_<?php echo $count; ?>" class="timer-list"></div>
|
141 |
+
<?php if (Mage::helper('timer')->isShowCaption()): ?>
|
142 |
+
<div class='clear'></div>
|
143 |
+
<div class='timerdate' id="caption<?php echo $count; ?>">
|
144 |
+
<span class='hour' style='margin:1px 23px 0 4px'><?php echo $this->__('D') ?></span>
|
145 |
+
<span class='hour' style='margin:1px 19px 0 6px'><?php echo $this->__('H') ?></span>
|
146 |
+
<span class='min' style='margin:1px 20px 0 7px'><?php echo $this->__('M') ?></span>
|
147 |
+
<span class='sec' style='margin:1px 0 0 6px'><?php echo $this->__('S') ?></span>
|
148 |
+
</div>
|
149 |
+
<?php endif;?>
|
150 |
<?php endif; ?>
|
151 |
+
<!--Condition for Timer Controllers End -->
|
152 |
+
|
153 |
+
|
154 |
+
|
155 |
<div class="actions">
|
156 |
<?php if($_product->isSaleable()): ?>
|
157 |
<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
|
158 |
<?php else: ?>
|
159 |
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
|
160 |
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
<ul class="add-to-links">
|
162 |
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
163 |
<li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
181 |
</div>
|
182 |
<?php endif; ?>
|
183 |
|
184 |
+
|
185 |
+
<!-- Timer Script Start here -->
|
186 |
+
<?php
|
187 |
+
/* Admin Controllers for timer are declared here */
|
188 |
+
$timer_color = Mage::getStoreConfig('timer/apptha_timer_color/text');
|
189 |
+
$desc_color = Mage::getStoreConfig('timer/apptha_timer_color/description');
|
190 |
+
$head_color = Mage::getStoreConfig('timer/apptha_timer_color/heading_text_color');
|
191 |
+
?>
|
192 |
+
<?php if($this->getPriceCountDown($_product)) :?>
|
193 |
+
<script type="text/javascript">
|
194 |
+
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:00 PM'; ?>");
|
195 |
+
start = "<?php echo Date("m/d/y h:i:s A", strtotime(Mage_Core_Model_Locale::date(null, null, "en_US", true))); ?>";
|
196 |
+
start_date = Date.parse(start);
|
197 |
+
var dnow<?php echo $count; ?> = new Date(start_date);
|
198 |
+
if(CountStepper>0)
|
199 |
+
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
|
200 |
+
else
|
201 |
+
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
|
202 |
+
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
|
203 |
+
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
|
204 |
+
CountBack(gsecs<?php echo $count; ?>,"countbox_"+timer, timer);
|
205 |
+
timer++;
|
206 |
+
</script>
|
207 |
+
<?php $count = $count + 1; ?>
|
208 |
+
<?php endif;?>
|
209 |
+
<!-- Timer Script End here -->
|
210 |
<!--Dynamic style changes goes here-->
|
211 |
<style>
|
212 |
.timer-grid{float: left;width: 100%;padding: 0;color: #<?php echo $timer_color; ?>;font-size: 18px;font-family: arial;font-weight: bold;}
|
app/design/frontend/base/default/template/timer/product/view.phtml
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Apptha
|
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.apptha.com/LICENSE.txt
|
11 |
+
*
|
12 |
+
* ==============================================================
|
13 |
+
* MAGENTO EDITION USAGE NOTICE
|
14 |
+
* ==============================================================
|
15 |
+
* This package designed for Magento COMMUNITY edition
|
16 |
+
* Apptha does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* Apptha does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
* ==============================================================
|
21 |
+
*
|
22 |
+
* @category Apptha
|
23 |
+
* @package Apptha_PriceCount
|
24 |
+
* @version 0.1.4
|
25 |
+
* @author Apptha Team <developers@contus.in>
|
26 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
27 |
+
* @license http://www.apptha.com/LICENSE.txt
|
28 |
+
*
|
29 |
+
*/
|
30 |
+
?>
|
31 |
+
<?php
|
32 |
+
/* Count for timer calculation declared here */
|
33 |
+
$count = 1;
|
34 |
+
$_product = $this->getProduct();
|
35 |
+
$toDate = $_product->getSpecialTODate();
|
36 |
+
?>
|
37 |
+
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
|
38 |
+
<ul class="add-to-links">
|
39 |
+
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
40 |
+
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, '<?php echo $_wishlistSubmitUrl ?>'); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
41 |
+
<?php endif; ?>
|
42 |
+
<?php
|
43 |
+
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
|
44 |
+
?>
|
45 |
+
<?php if ($_compareUrl) : ?>
|
46 |
+
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
47 |
+
<?php endif; ?>
|
48 |
+
</ul>
|
49 |
+
<!--Condition for Timer Controllers goes here-->
|
50 |
+
<?php if ($this->getPriceCountDown()): ?>
|
51 |
+
<?php if (Mage::helper('timer')->isShowTitle()): ?>
|
52 |
+
<div id="heading<?php echo $count; ?>" style="color:#<?php echo $head_color; ?>; font-size: 18px; font-weight:bold;padding-top:15px;clear: both;">
|
53 |
+
<?php echo Mage::helper('timer')->getTimerTitle(); ?>
|
54 |
+
</div>
|
55 |
+
<?php endif; ?>
|
56 |
+
<div id="countbox_<?php echo $count; ?>" class="timer-view"></div>
|
57 |
+
<?php if (Mage::helper('timer')->isShowCaption()): ?>
|
58 |
+
<div class='clear'></div>
|
59 |
+
<div class='timerdate' id="caption<?php echo $count; ?>">
|
60 |
+
<span class='hour' style='margin:1px 23px 0 0px'>
|
61 |
+
<?php echo $this->__('Days') ?>
|
62 |
+
</span>
|
63 |
+
<span class='hour' style='margin:1px 19px 0 15px'>
|
64 |
+
<?php echo $this->__('Hours') ?>
|
65 |
+
</span>
|
66 |
+
<span class='min' style='margin:1px 20px 0 7px'>
|
67 |
+
<?php echo $this->__('Minutes') ?>
|
68 |
+
</span>
|
69 |
+
<span class='sec' style='margin:1px 0 0 2px'>
|
70 |
+
<?php echo $this->__('Seconds') ?>
|
71 |
+
</span>
|
72 |
+
</div>
|
73 |
+
<?php endif;?>
|
74 |
+
<script type="text/javascript">
|
75 |
+
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:00 PM'; ?>");
|
76 |
+
start = "<?php echo Date("m/d/y h:i:s A", strtotime(Mage_Core_Model_Locale::date(null, null, "en_US", true))); ?>";
|
77 |
+
start_date = Date.parse(start);
|
78 |
+
var dnow<?php echo $count; ?> = new Date(start_date);
|
79 |
+
if(CountStepper>0)
|
80 |
+
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
|
81 |
+
else
|
82 |
+
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
|
83 |
+
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
|
84 |
+
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
|
85 |
+
CountBack(gsecs<?php echo $count; ?>,"countbox_"+timer, timer);
|
86 |
+
timer++;
|
87 |
+
</script>
|
88 |
+
<?php $count = $count + 1; ?>
|
89 |
+
<?php endif; ?>
|
90 |
+
|
91 |
+
<!--Dynamic style changes goes here-->
|
92 |
+
<?php
|
93 |
+
/* Admin Controllers for timer are declared here */
|
94 |
+
$desc_color = Mage::getStoreConfig('timer/apptha_timer_color/description');
|
95 |
+
$timer_color = Mage::getStoreConfig('timer/apptha_timer_color/text');
|
96 |
+
$head_color = Mage::getStoreConfig('timer/apptha_timer_color/heading_text_color');
|
97 |
+
?>
|
98 |
+
<style>
|
99 |
+
.timer-view{float: left;width: 100%;padding:0;color: #<?php echo $timer_color; ?>;font-size: 40px; font-family: arial;font-weight: bold;}
|
100 |
+
.timerdate{float: left;width: 100%;padding:0 0 15px 10px;color: #<?php echo $desc_color; ?>;font-size: 13px;}
|
101 |
+
</style>
|
app/design/frontend/default/default/layout/timer.xml
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<layout version="0.1.0">
|
3 |
-
<default>
|
4 |
-
<reference name="head">
|
5 |
-
<action method="addJs"><script>timer.js</script></action>
|
6 |
-
<action method="addCss"><stylesheet>timer/timer.css</stylesheet></action>
|
7 |
-
</reference>
|
8 |
-
</default>
|
9 |
-
<catalog_category_default>
|
10 |
-
<update handle="content"/>
|
11 |
-
<reference name="category.products">
|
12 |
-
<block type="timer/list" name="list" as="list" />
|
13 |
-
</reference>
|
14 |
-
</catalog_category_default>
|
15 |
-
|
16 |
-
<catalog_product_view>
|
17 |
-
<update handle="content"/>
|
18 |
-
<reference name="product.info.addto">
|
19 |
-
<block type="timer/view" name="view" as="view" />
|
20 |
-
</reference>
|
21 |
-
</catalog_product_view>
|
22 |
-
|
23 |
-
<!--<catalog_product_compare_index>
|
24 |
-
<update handle="content"/>
|
25 |
-
<reference name="catalog.compare.list">
|
26 |
-
<block type="timer/compare" name="compare" as="compare" />
|
27 |
-
</reference>
|
28 |
-
</catalog_product_compare_index>-->
|
29 |
-
|
30 |
-
<catalogsearch_advanced_result>
|
31 |
-
<reference name="catalogsearch_advanced_result">
|
32 |
-
<block type="timer/list" name="list" as="list" />
|
33 |
-
</reference>
|
34 |
-
</catalogsearch_advanced_result>
|
35 |
-
|
36 |
-
<catalogsearch_result_index>
|
37 |
-
<reference name="search.result">
|
38 |
-
<block type="timer/list" name="list" as="list" />
|
39 |
-
</reference>
|
40 |
-
</catalogsearch_result_index>
|
41 |
-
|
42 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/timer/view.phtml
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Contus Support Interactive.
|
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 PRICE COUNTDOWN-LICENSE.txt.
|
9 |
-
*
|
10 |
-
* =================================================================
|
11 |
-
* MAGENTO EDITION USAGE NOTICE
|
12 |
-
* =================================================================
|
13 |
-
* This package designed for Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition
|
14 |
-
* Contus Support does not guarantee correct work of this package
|
15 |
-
* on any other Magento edition except Magento 1.4.x, 1.5.x, 1.6.x and 1.7.x COMMUNITY edition.
|
16 |
-
* =================================================================
|
17 |
-
*/
|
18 |
-
?>
|
19 |
-
<?php
|
20 |
-
/* Count for timer calculation declared here */
|
21 |
-
$count = 1;
|
22 |
-
$_product = $this->getProduct();
|
23 |
-
$toDate = $_product->getSpecialTODate();
|
24 |
-
|
25 |
-
/* Admin Controllers for timer are declared here */
|
26 |
-
$timer_active = Mage::getStoreConfig('timer/general/activate_apptha_timer');
|
27 |
-
$timer_head_active = Mage::getStoreConfig('timer/general/activate_apptha_heading');
|
28 |
-
$timer_desc_active = Mage::getStoreConfig('timer/general/activate_apptha_description');
|
29 |
-
$desc_color = Mage::getStoreConfig('timer/apptha_timer_color/description');
|
30 |
-
$timer_color = Mage::getStoreConfig('timer/apptha_timer_color/text');
|
31 |
-
$head_color = Mage::getStoreConfig('timer/apptha_timer_color/heading_text_color');
|
32 |
-
$timer_head = Mage::getStoreConfig('timer/general/heading');
|
33 |
-
?>
|
34 |
-
|
35 |
-
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>
|
36 |
-
<ul class="add-to-links">
|
37 |
-
<?php if ($this->helper('wishlist')->isAllow()) : ?>
|
38 |
-
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, '<?php echo $_wishlistSubmitUrl ?>'); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
|
39 |
-
<?php endif; ?>
|
40 |
-
<?php
|
41 |
-
$_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
|
42 |
-
?>
|
43 |
-
<?php if ($_compareUrl) : ?>
|
44 |
-
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
|
45 |
-
<?php endif; ?>
|
46 |
-
</ul>
|
47 |
-
|
48 |
-
<!--Condition for Timer Controllers goes here-->
|
49 |
-
<?php if ($timer_active == 1) : ?>
|
50 |
-
<?php if ($_product->getPrice() > $_product->getSpecialPrice()) : ?>
|
51 |
-
<?php if ($_product->getSpecialPrice() != 0 || $_product->getSpecialPrice() != "") : ?>
|
52 |
-
<?php if ($timer_head_active == 'showall' || $timer_head_active == 'viewpage' && $timer_head_active != 'hideall' && $timer_head != '') : ?>
|
53 |
-
<div id="heading<?php echo $count; ?>" style="color:#<?php echo $head_color; ?>; font-size: 18px; font-weight:bold;padding-top:15px;clear: both;"><?php echo $timer_head ?></div>
|
54 |
-
<?php endif; ?>
|
55 |
-
<div id="countbox_<?php echo $count; ?>" class="timer-view"></div>
|
56 |
-
<?php if ($timer_desc_active == 'showall' || $timer_desc_active == 'viewpage' && $timer_desc_active != 'hideall') : ?>
|
57 |
-
<div class='clear'></div><div class='timerdate' id="caption<?php echo $count; ?>"><span class='hour' style='margin:1px 23px 0 0px'><?php echo $this->__('Days') ?></span><span class='hour' style='margin:1px 19px 0 15px'><?php echo $this->__('Hours') ?></span><span class='min' style='margin:1px 20px 0 7px'><?php echo $this->__('Minutes') ?></span><span class='sec' style='margin:1px 0 0 2px'><?php echo $this->__('Seconds') ?></span></div>
|
58 |
-
<?php endif;endif;endif; ?>
|
59 |
-
|
60 |
-
<?php if ($_product->getPrice() > $_product->getSpecialPrice()) : ?>
|
61 |
-
<?php if ($_product->getSpecialPrice() != 0 || $_product->getSpecialPrice() != "") : ?>
|
62 |
-
<script type="text/javascript">
|
63 |
-
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:00 PM'; ?>");
|
64 |
-
start = "<?php echo Date("m/d/y h:i:s A", strtotime(Mage_Core_Model_Locale::date(null, null, "en_US", true))); ?>";
|
65 |
-
start_date = Date.parse(start);
|
66 |
-
var dnow<?php echo $count; ?> = new Date(start_date);
|
67 |
-
if(CountStepper>0)
|
68 |
-
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
|
69 |
-
else
|
70 |
-
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
|
71 |
-
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
|
72 |
-
|
73 |
-
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
|
74 |
-
CountBack(gsecs<?php echo $count; ?>,"countbox_"+j, j);
|
75 |
-
j++;
|
76 |
-
</script>
|
77 |
-
<?php $count = $count + 1; ?>
|
78 |
-
<?php endif;endif;endif; ?>
|
79 |
-
|
80 |
-
<!--Dynamic style changes goes here-->
|
81 |
-
<style>
|
82 |
-
.timer-view{float: left;width: 100%;padding:0;color: #<?php echo $timer_color; ?>;font-size: 40px; font-family: arial;font-weight: bold;}
|
83 |
-
.timerdate{float: left;width: 100%;padding:0 0 15px 10px;color: #<?php echo $desc_color; ?>;font-size: 13px;}
|
84 |
-
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Apptha_Timer.xml
CHANGED
@@ -1,4 +1,34 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Apptha_Timer>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Apptha
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the EULA
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://www.apptha.com/LICENSE.txt
|
12 |
+
*
|
13 |
+
* ==============================================================
|
14 |
+
* MAGENTO EDITION USAGE NOTICE
|
15 |
+
* ==============================================================
|
16 |
+
* This package designed for Magento COMMUNITY edition
|
17 |
+
* Apptha does not guarantee correct work of this extension
|
18 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
19 |
+
* Apptha does not provide extension support in case of
|
20 |
+
* incorrect edition usage.
|
21 |
+
* ==============================================================
|
22 |
+
*
|
23 |
+
* @category Apptha
|
24 |
+
* @package Apptha_PriceCount
|
25 |
+
* @version 0.1.4
|
26 |
+
* @author Apptha Team <developers@contus.in>
|
27 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
28 |
+
* @license http://www.apptha.com/LICENSE.txt
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
-->
|
32 |
<config>
|
33 |
<modules>
|
34 |
<Apptha_Timer>
|
js/timer.js
CHANGED
@@ -1,21 +1,33 @@
|
|
1 |
-
|
2 |
-
*
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
5 |
*
|
6 |
* This source file is subject to the EULA
|
7 |
-
* that is bundled with this package in the file
|
|
|
|
|
8 |
*
|
9 |
-
*
|
10 |
* MAGENTO EDITION USAGE NOTICE
|
11 |
-
*
|
12 |
-
* This package designed for Magento
|
13 |
-
*
|
14 |
-
* on any other Magento edition except Magento
|
15 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
|
18 |
-
var
|
19 |
if (typeof(BackColor)=="undefined")
|
20 |
BackColor = "white";
|
21 |
if (typeof(ForeColor)=="undefined")
|
@@ -40,11 +52,11 @@
|
|
40 |
s = "0" + s;
|
41 |
return "<b>" + s + "</b>";
|
42 |
}
|
43 |
-
function CountBack(secs,iid,
|
44 |
if (secs < 0) {
|
45 |
document.getElementById(iid).innerHTML = FinishMessage;
|
46 |
-
document.getElementById('caption'+
|
47 |
-
document.getElementById('heading'+
|
48 |
return;
|
49 |
}
|
50 |
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
|
@@ -53,5 +65,5 @@
|
|
53 |
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
|
54 |
document.getElementById(iid).innerHTML = DisplayStr;
|
55 |
if (CountActive)
|
56 |
-
setTimeout(function(){CountBack((secs+CountStepper),iid,
|
57 |
}
|
1 |
+
/**
|
2 |
+
* Apptha
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
5 |
*
|
6 |
* This source file is subject to the EULA
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://www.apptha.com/LICENSE.txt
|
10 |
*
|
11 |
+
* ==============================================================
|
12 |
* MAGENTO EDITION USAGE NOTICE
|
13 |
+
* ==============================================================
|
14 |
+
* This package designed for Magento COMMUNITY edition
|
15 |
+
* Apptha does not guarantee correct work of this extension
|
16 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
17 |
+
* Apptha does not provide extension support in case of
|
18 |
+
* incorrect edition usage.
|
19 |
+
* ==============================================================
|
20 |
+
*
|
21 |
+
* @category Apptha
|
22 |
+
* @package Apptha_PriceCount
|
23 |
+
* @version 0.1.4
|
24 |
+
* @author Apptha Team <developers@contus.in>
|
25 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
26 |
+
* @license http://www.apptha.com/LICENSE.txt
|
27 |
+
*
|
28 |
*/
|
29 |
|
30 |
+
var timer =1;
|
31 |
if (typeof(BackColor)=="undefined")
|
32 |
BackColor = "white";
|
33 |
if (typeof(ForeColor)=="undefined")
|
52 |
s = "0" + s;
|
53 |
return "<b>" + s + "</b>";
|
54 |
}
|
55 |
+
function CountBack(secs,iid,timer) {
|
56 |
if (secs < 0) {
|
57 |
document.getElementById(iid).innerHTML = FinishMessage;
|
58 |
+
document.getElementById('caption'+timer).style.display = "none";
|
59 |
+
document.getElementById('heading'+timer).style.display = "none";
|
60 |
return;
|
61 |
}
|
62 |
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
|
65 |
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
|
66 |
document.getElementById(iid).innerHTML = DisplayStr;
|
67 |
if (CountActive)
|
68 |
+
setTimeout(function(){CountBack((secs+CountStepper),iid,timer)}, SetTimeOutPeriod);
|
69 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Price_Countdown</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Countdown timer for Special product price to date. Timer displays according to the special price and to date set while adding products.</description>
|
11 |
<notes>Countdown timer for Special product price to date. Timer displays according to the special price and to date set while adding products.</notes>
|
12 |
<authors><author><name>LEAD</name><user>apptha</user><email>info@apptha.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Apptha"><dir name="Timer"><dir name="Block"><dir name="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Price_Countdown</name>
|
4 |
+
<version>0.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Countdown timer for Special product price to date. Timer displays according to the special price and to date set while adding products.</description>
|
11 |
<notes>Countdown timer for Special product price to date. Timer displays according to the special price and to date set while adding products.</notes>
|
12 |
<authors><author><name>LEAD</name><user>apptha</user><email>info@apptha.com</email></author></authors>
|
13 |
+
<date>2014-10-10</date>
|
14 |
+
<time>10:18:38</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Apptha"><dir name="Timer"><dir name="Block"><dir name="Product"><file name="List.php" hash="6060f23c9841be6857ab1c0eb4be6d00"/><file name="View.php" hash="23f7ba579db8858343b505237cab1180"/></dir></dir><dir name="Helper"><file name="Data.php" hash="0b2ee0646d6a77fad2c4fb8ca9258438"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Showin.php" hash="83ad0ebf1167ce3067434be4d6811e35"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="24dddb8493454306c33741bc566e9be9"/><file name="config.xml" hash="dbabee442a7d996307e3315ec0bfb2b3"/><file name="system.xml" hash="ac62d45d53b7489e62980e77f0403f0e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Apptha_Timer.xml" hash="6bfae81454a51f0f63f8f88c16af9f00"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="timer.xml" hash="767876c536b76550cfc14801542d8e19"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="timer.xml" hash="1c386c2b37e39a42b00053ba49e02e72"/></dir><dir name="template"><dir name="timer"><dir name="product"><file name="list.phtml" hash="6aa719789338043947b184f2c3f20cb1"/><file name="view.phtml" hash="23aebe47c9c612620b0877150723d65d"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="timer"><file name="timer.css" hash="fb8fcac9c6e9c773ab577306f8df917c"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><file name="timer.js" hash="3b73d62168c95a362f26ca973c8480a1"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
skin/frontend/{default → base}/default/timer/timer.css
RENAMED
@@ -1,20 +1,31 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
5 |
*
|
6 |
* This source file is subject to the EULA
|
7 |
-
* that is bundled with this package in the file
|
|
|
|
|
8 |
*
|
9 |
-
*
|
10 |
* MAGENTO EDITION USAGE NOTICE
|
11 |
-
*
|
12 |
-
* This package designed for Magento
|
13 |
-
*
|
14 |
-
* on any other Magento edition except Magento
|
15 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
-
|
18 |
.timer-grid{float: left;width: 100%;padding: 3px 0 0 0;color: #000000;font-size: 18px;font-family: arial; font-weight: bold;}
|
19 |
.timer-list{float: left;width: 100%;padding: 0;color: #000000;font-size: 18px;font-family: arial; font-weight: bold;}
|
20 |
.timer-view{float: left;width: 100%;padding:2px 0 0 0px;color: #000000;font-size: 40px; font-family:arial;font-weight: bold;}
|
1 |
/**
|
2 |
+
* Apptha
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
5 |
*
|
6 |
* This source file is subject to the EULA
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://www.apptha.com/LICENSE.txt
|
10 |
*
|
11 |
+
* ==============================================================
|
12 |
* MAGENTO EDITION USAGE NOTICE
|
13 |
+
* ==============================================================
|
14 |
+
* This package designed for Magento COMMUNITY edition
|
15 |
+
* Apptha does not guarantee correct work of this extension
|
16 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
17 |
+
* Apptha does not provide extension support in case of
|
18 |
+
* incorrect edition usage.
|
19 |
+
* ==============================================================
|
20 |
+
*
|
21 |
+
* @category Apptha
|
22 |
+
* @package Apptha_PriceCount
|
23 |
+
* @version 0.1.4
|
24 |
+
* @author Apptha Team <developers@contus.in>
|
25 |
+
* @copyright Copyright (c) 2014 Apptha. (http://www.apptha.com)
|
26 |
+
* @license http://www.apptha.com/LICENSE.txt
|
27 |
+
*
|
28 |
*/
|
|
|
29 |
.timer-grid{float: left;width: 100%;padding: 3px 0 0 0;color: #000000;font-size: 18px;font-family: arial; font-weight: bold;}
|
30 |
.timer-list{float: left;width: 100%;padding: 0;color: #000000;font-size: 18px;font-family: arial; font-weight: bold;}
|
31 |
.timer-view{float: left;width: 100%;padding:2px 0 0 0px;color: #000000;font-size: 40px; font-family:arial;font-weight: bold;}
|