Version Notes
- Moved the extension to the community folder.
- Updated the database design. Updated the table name with prefix inc_advance.
- Solved the acl problem.
- Added sorting, Filter , Pagination , Mass update functionality to both category and item grid.
- Updated the Item grid with category display.
- Assign category to the item on the basis of store-view selected.
- Solve the wysiwyg editor image upload issue.
Download this release
Release Info
Developer | indianic |
Extension | inic_faq |
Version | 1.1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.3.1 to 1.1.3.2
- app/code/community/Inic/Faq/Block/Adminhtml/Category/Edit/Tab/Main.php +2 -2
- app/code/community/Inic/Faq/Block/Adminhtml/Item/Edit/Tab/Main.php +1 -1
- app/code/community/Inic/Faq/Block/Frontend/{FaqSearch → Faqsearch}/Result.php +3 -1
- app/code/community/Inic/Faq/Block/Frontend/{FaqSearch → Faqsearch}/Search.php +1 -1
- app/code/community/Inic/Faq/Model/Mysql4/Category.php +3 -3
- app/code/community/Inic/Faq/Model/Mysql4/Faq.php +5 -17
- app/code/community/Inic/Faq/controllers/Adminhtml/Faq/CategoryController.php +49 -0
- app/code/community/Inic/Faq/controllers/Adminhtml/FaqController.php +1 -1
- app/code/community/Inic/Faq/etc/config.xml +1 -1
- app/code/community/Inic/Faq/sql/faq_setup/mysql4-install-0.1.0.php +0 -37
- app/code/community/Inic/Faq/sql/faq_setup/{mysql4-install-1.1.3.1.php → mysql4-install-1.1.3.2.php} +7 -8
- app/code/community/Inic/Faq/sql/faq_setup/mysql4-upgrade-0.1.6-0.1.7.php +0 -52
- app/code/community/Inic/Faq/sql/faq_setup/{mysql4-upgrade-1.1.3-1.1.3.1.php → mysql4-upgrade-1.1.3-1.1.3.2.php} +7 -8
- app/code/community/Inic/Faq/sql/faq_setup/{mysql4-install-0.1.7.php → mysql4-upgrade-1.1.3.1-1.1.3.2.php} +70 -67
- app/design/adminhtml/default/default/layout/inic/faq.xml +46 -0
- app/design/frontend/default/default/layout/inic/faq.xml +3 -3
- app/design/frontend/default/default/template/inic/faq/search/result.phtml +6 -4
- package.xml +4 -4
app/code/community/Inic/Faq/Block/Adminhtml/Category/Edit/Tab/Main.php
CHANGED
@@ -54,7 +54,7 @@ class Inic_Faq_Block_Adminhtml_Category_Edit_Tab_Main extends Mage_Adminhtml_Blo
|
|
54 |
if (!Mage::app()->isSingleStoreMode()) {
|
55 |
$fieldset->addField('store_id', 'multiselect',
|
56 |
array (
|
57 |
-
'name' => '
|
58 |
'label' => Mage::helper('faq')->__('Store view'),
|
59 |
'title' => Mage::helper('faq')->__('Store view'),
|
60 |
'required' => true,
|
@@ -62,7 +62,7 @@ class Inic_Faq_Block_Adminhtml_Category_Edit_Tab_Main extends Mage_Adminhtml_Blo
|
|
62 |
}
|
63 |
else {
|
64 |
$fieldset->addField('store_id', 'hidden', array (
|
65 |
-
'name' => '
|
66 |
'value' => Mage::app()->getStore(true)->getId() ));
|
67 |
$model->setStoreId(Mage::app()->getStore(true)->getId());
|
68 |
}
|
54 |
if (!Mage::app()->isSingleStoreMode()) {
|
55 |
$fieldset->addField('store_id', 'multiselect',
|
56 |
array (
|
57 |
+
'name' => 'store_id[]',
|
58 |
'label' => Mage::helper('faq')->__('Store view'),
|
59 |
'title' => Mage::helper('faq')->__('Store view'),
|
60 |
'required' => true,
|
62 |
}
|
63 |
else {
|
64 |
$fieldset->addField('store_id', 'hidden', array (
|
65 |
+
'name' => 'store_id[]',
|
66 |
'value' => Mage::app()->getStore(true)->getId() ));
|
67 |
$model->setStoreId(Mage::app()->getStore(true)->getId());
|
68 |
}
|
app/code/community/Inic/Faq/Block/Adminhtml/Item/Edit/Tab/Main.php
CHANGED
@@ -109,7 +109,7 @@ class Inic_Faq_Block_Adminhtml_Item_Edit_Tab_Main extends Mage_Adminhtml_Block_W
|
|
109 |
array (
|
110 |
'label' => Mage::helper('faq')->__('Category'),
|
111 |
'title' => Mage::helper('faq')->__('Category'),
|
112 |
-
'name' => '
|
113 |
'required' => false,
|
114 |
'values' => Mage::getResourceSingleton('faq/category_collection')->toOptionArray(),
|
115 |
)
|
109 |
array (
|
110 |
'label' => Mage::helper('faq')->__('Category'),
|
111 |
'title' => Mage::helper('faq')->__('Category'),
|
112 |
+
'name' => 'category_id[]',
|
113 |
'required' => false,
|
114 |
'values' => Mage::getResourceSingleton('faq/category_collection')->toOptionArray(),
|
115 |
)
|
app/code/community/Inic/Faq/Block/Frontend/{FaqSearch → Faqsearch}/Result.php
RENAMED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Inic_Faq
|
15 |
* @author Inic
|
16 |
*/
|
17 |
-
class
|
18 |
|
19 |
protected $_search;
|
20 |
|
@@ -41,7 +41,9 @@ class Inic_Faq_Block_Frontend_FaqSearch_Result extends Mage_Core_Block_Template
|
|
41 |
$category = Mage :: getModel('faq/category')->load($id);
|
42 |
$this->_search=$category->getItemCollection()->addIsActiveFilter()->addStoreFilter(Mage::app()->getStore());
|
43 |
}
|
|
|
44 |
$this->_search->getSelect()->where("(question LIKE '%".$keyword."%') OR (answer LIKE '%".$keyword."%')");
|
|
|
45 |
}
|
46 |
return $this->_search;
|
47 |
}
|
14 |
* @package Inic_Faq
|
15 |
* @author Inic
|
16 |
*/
|
17 |
+
class Inic_Faq_Block_Frontend_Faqsearch_Result extends Mage_Core_Block_Template {
|
18 |
|
19 |
protected $_search;
|
20 |
|
41 |
$category = Mage :: getModel('faq/category')->load($id);
|
42 |
$this->_search=$category->getItemCollection()->addIsActiveFilter()->addStoreFilter(Mage::app()->getStore());
|
43 |
}
|
44 |
+
if($keyword!=""){
|
45 |
$this->_search->getSelect()->where("(question LIKE '%".$keyword."%') OR (answer LIKE '%".$keyword."%')");
|
46 |
+
}
|
47 |
}
|
48 |
return $this->_search;
|
49 |
}
|
app/code/community/Inic/Faq/Block/Frontend/{FaqSearch → Faqsearch}/Search.php
RENAMED
@@ -14,7 +14,7 @@
|
|
14 |
* @package Inic_Faq
|
15 |
* @author Inic
|
16 |
*/
|
17 |
-
class
|
18 |
|
19 |
/**
|
20 |
* Function to return search result page url
|
14 |
* @package Inic_Faq
|
15 |
* @author Inic
|
16 |
*/
|
17 |
+
class Inic_Faq_Block_Frontend_Faqsearch_Search extends Mage_Core_Block_Template {
|
18 |
|
19 |
/**
|
20 |
* Function to return search result page url
|
app/code/community/Inic/Faq/Model/Mysql4/Category.php
CHANGED
@@ -38,9 +38,9 @@ class Inic_Faq_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstract
|
|
38 |
if ($object->getStoreId()) {
|
39 |
$select->join(
|
40 |
array('nns' => $this->getTable('faq/category_store')),
|
41 |
-
$this->getMainTable() . '.
|
42 |
)->where('is_active=1 AND `nns`.store_id in (0, ?) ',
|
43 |
-
$object->getStoreId())->order('category_id DESC')->limit(1);
|
44 |
}
|
45 |
return $select;
|
46 |
}
|
@@ -71,7 +71,7 @@ class Inic_Faq_Model_Mysql4_Category extends Mage_Core_Model_Mysql4_Abstract
|
|
71 |
$condition = $this->_getWriteAdapter()->quoteInto('category_id = ?', $object->getId());
|
72 |
$this->_getWriteAdapter()->delete($this->getTable('faq/category_store'), $condition);
|
73 |
|
74 |
-
foreach ((array) $object->getData('
|
75 |
$storeArray = array ();
|
76 |
$storeArray['category_id'] = $object->getId();
|
77 |
$storeArray['store_id'] = $store;
|
38 |
if ($object->getStoreId()) {
|
39 |
$select->join(
|
40 |
array('nns' => $this->getTable('faq/category_store')),
|
41 |
+
$this->getMainTable() . '.category_id = `nns`.category_id'
|
42 |
)->where('is_active=1 AND `nns`.store_id in (0, ?) ',
|
43 |
+
$object->getStoreId())->order($this->getMainTable().'.category_id DESC')->limit(1);
|
44 |
}
|
45 |
return $select;
|
46 |
}
|
71 |
$condition = $this->_getWriteAdapter()->quoteInto('category_id = ?', $object->getId());
|
72 |
$this->_getWriteAdapter()->delete($this->getTable('faq/category_store'), $condition);
|
73 |
|
74 |
+
foreach ((array) $object->getData('store_id') as $store) {
|
75 |
$storeArray = array ();
|
76 |
$storeArray['category_id'] = $object->getId();
|
77 |
$storeArray['store_id'] = $store;
|
app/code/community/Inic/Faq/Model/Mysql4/Faq.php
CHANGED
@@ -41,7 +41,7 @@ class Inic_Faq_Model_Mysql4_Faq extends Mage_Core_Model_Mysql4_Abstract {
|
|
41 |
if ($object->getStoreId()) {
|
42 |
$select->join(
|
43 |
array('nns' => $this->getTable('faq/faq_store')),
|
44 |
-
$this->getMainTable() . '.
|
45 |
)->where('is_active=1 AND `nns`.store_id in (0, ?) ',
|
46 |
$object->getStoreId())->order('creation_time DESC')->limit(1);
|
47 |
}
|
@@ -93,8 +93,9 @@ class Inic_Faq_Model_Mysql4_Faq extends Mage_Core_Model_Mysql4_Abstract {
|
|
93 |
}
|
94 |
|
95 |
// process faq item to category relation
|
|
|
96 |
$this->_getWriteAdapter()->delete($this->getTable('faq/category_item'), $condition);
|
97 |
-
foreach ((array) $object->getData('
|
98 |
$categoryArray = array ();
|
99 |
$categoryArray['faq_id'] = $object->getId();
|
100 |
$categoryArray['category_id'] = $categoryId;
|
@@ -147,24 +148,11 @@ class Inic_Faq_Model_Mysql4_Faq extends Mage_Core_Model_Mysql4_Abstract {
|
|
147 |
}
|
148 |
//For Grid
|
149 |
$object->setData('category_name', $categoryArray);
|
|
|
150 |
|
151 |
-
//For main Form
|
152 |
$object->setData('category_id', $categoryId);
|
153 |
}
|
154 |
-
|
155 |
-
/*$select = $this->_getReadAdapter()->select()->from(
|
156 |
-
$this->getTable('faq/category_item')
|
157 |
-
)->where('faq_id = ?', $object->getId());
|
158 |
-
|
159 |
-
if ($data = $this->_getReadAdapter()->fetchAll($select)) {
|
160 |
-
$categoryArray = array ();
|
161 |
-
foreach ($data as $row) {
|
162 |
-
$categoryArray[] = $row['category_id'];
|
163 |
-
}
|
164 |
-
$object->setData('category_id', $categoryArray);
|
165 |
-
}*/
|
166 |
-
|
167 |
-
|
168 |
return parent::_afterLoad($object);
|
169 |
}
|
170 |
}
|
41 |
if ($object->getStoreId()) {
|
42 |
$select->join(
|
43 |
array('nns' => $this->getTable('faq/faq_store')),
|
44 |
+
$this->getMainTable() . '.faq_id = `nns`.faq_id'
|
45 |
)->where('is_active=1 AND `nns`.store_id in (0, ?) ',
|
46 |
$object->getStoreId())->order('creation_time DESC')->limit(1);
|
47 |
}
|
93 |
}
|
94 |
|
95 |
// process faq item to category relation
|
96 |
+
|
97 |
$this->_getWriteAdapter()->delete($this->getTable('faq/category_item'), $condition);
|
98 |
+
foreach ((array) $object->getData('category_id') as $categoryId) {
|
99 |
$categoryArray = array ();
|
100 |
$categoryArray['faq_id'] = $object->getId();
|
101 |
$categoryArray['category_id'] = $categoryId;
|
148 |
}
|
149 |
//For Grid
|
150 |
$object->setData('category_name', $categoryArray);
|
151 |
+
//$object->setData('categories', $categoryId);
|
152 |
|
153 |
+
//For main Form Edit
|
154 |
$object->setData('category_id', $categoryId);
|
155 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
return parent::_afterLoad($object);
|
157 |
}
|
158 |
}
|
app/code/community/Inic/Faq/controllers/Adminhtml/Faq/CategoryController.php
CHANGED
@@ -190,4 +190,53 @@ class Inic_Faq_Adminhtml_Faq_CategoryController extends Mage_Adminhtml_Controlle
|
|
190 |
{
|
191 |
return Mage::getSingleton('admin/session')->isAllowed('admin/inic/faq');
|
192 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
190 |
{
|
191 |
return Mage::getSingleton('admin/session')->isAllowed('admin/inic/faq');
|
192 |
}
|
193 |
+
|
194 |
+
|
195 |
+
public function massDeleteAction() {
|
196 |
+
$faqCategoryIds = $this->getRequest()->getParam('category_id');
|
197 |
+
if(!is_array($faqCategoryIds)) {
|
198 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
199 |
+
} else {
|
200 |
+
try {
|
201 |
+
|
202 |
+
foreach ($faqCategoryIds as $faqCategoryId) {
|
203 |
+
$faqCategory = Mage::getModel('faq/category')->load($faqCategoryId);
|
204 |
+
$faqCategory->delete();
|
205 |
+
}
|
206 |
+
|
207 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
208 |
+
Mage::helper('adminhtml')->__(
|
209 |
+
'Total of %d record(s) were successfully deleted', count($faqCategoryIds)
|
210 |
+
)
|
211 |
+
);
|
212 |
+
} catch (Exception $e) {
|
213 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
214 |
+
}
|
215 |
+
}
|
216 |
+
$this->_redirect('*/*/index');
|
217 |
+
}
|
218 |
+
|
219 |
+
public function massStatusAction()
|
220 |
+
{
|
221 |
+
$faqCategoryIds = $this->getRequest()->getParam('category_id');
|
222 |
+
if(!is_array($faqCategoryIds)) {
|
223 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
224 |
+
} else {
|
225 |
+
try {
|
226 |
+
foreach ($faqCategoryIds as $faqCategoryId) {
|
227 |
+
$faqItem = Mage::getModel('faq/category')
|
228 |
+
->load($faqCategoryId)
|
229 |
+
->setIsActive($this->getRequest()->getParam('is_active'))
|
230 |
+
->setIsMassupdate(true)
|
231 |
+
->save();
|
232 |
+
}
|
233 |
+
$this->_getSession()->addSuccess(
|
234 |
+
$this->__('Total of %d record(s) were successfully updated', count($faqCategoryIds))
|
235 |
+
);
|
236 |
+
} catch (Exception $e) {
|
237 |
+
$this->_getSession()->addError($e->getMessage());
|
238 |
+
}
|
239 |
+
}
|
240 |
+
$this->_redirect('*/*/index');
|
241 |
+
}
|
242 |
}
|
app/code/community/Inic/Faq/controllers/Adminhtml/FaqController.php
CHANGED
@@ -229,7 +229,7 @@ class Inic_Faq_Adminhtml_FaqController extends Mage_Adminhtml_Controller_Action
|
|
229 |
} else {
|
230 |
try {
|
231 |
foreach ($faqIds as $faqId) {
|
232 |
-
$faqItem = Mage::
|
233 |
->load($faqId)
|
234 |
->setIsActive($this->getRequest()->getParam('is_active'))
|
235 |
->setIsMassupdate(true)
|
229 |
} else {
|
230 |
try {
|
231 |
foreach ($faqIds as $faqId) {
|
232 |
+
$faqItem = Mage::getModel('faq/faq')
|
233 |
->load($faqId)
|
234 |
->setIsActive($this->getRequest()->getParam('is_active'))
|
235 |
->setIsMassupdate(true)
|
app/code/community/Inic/Faq/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Inic_Faq>
|
5 |
-
<version>1.1.3.
|
6 |
</Inic_Faq>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Inic_Faq>
|
5 |
+
<version>1.1.3.2</version>
|
6 |
</Inic_Faq>
|
7 |
</modules>
|
8 |
|
app/code/community/Inic/Faq/sql/faq_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FAQ for Magento
|
4 |
-
*
|
5 |
-
* @category Inic
|
6 |
-
* @package Inic_Faq
|
7 |
-
* @copyright Copyright (c) 2013 Indianic
|
8 |
-
*/
|
9 |
-
|
10 |
-
$installer = $this;
|
11 |
-
|
12 |
-
$installer->startSetup();
|
13 |
-
|
14 |
-
$installer->run("
|
15 |
-
-- DROP TABLE IF EXISTS {$this->getTable('faq/faq')};
|
16 |
-
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
17 |
-
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
18 |
-
`question` tinytext NOT NULL default '',
|
19 |
-
`answer` text NOT NULL default '',
|
20 |
-
`creation_time` datetime default NULL,
|
21 |
-
`update_time` datetime default NULL,
|
22 |
-
`is_active` tinyint(1) NOT NULL default '1',
|
23 |
-
`is_most_frequent` tinyint(1) NOT NULL default '1',
|
24 |
-
PRIMARY KEY (`faq_id`)
|
25 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items' AUTO_INCREMENT=1 ;
|
26 |
-
|
27 |
-
-- DROP TABLE IF EXISTS {$this->getTable('faq/faq_store')};
|
28 |
-
CREATE TABLE `{$this->getTable('faq/faq_store')}` (
|
29 |
-
`faq_id` int(10) unsigned NOT NULL,
|
30 |
-
`store_id` smallint(5) unsigned NOT NULL,
|
31 |
-
PRIMARY KEY (`faq_id`,`store_id`),
|
32 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
33 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
34 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
35 |
-
");
|
36 |
-
|
37 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Inic/Faq/sql/faq_setup/{mysql4-install-1.1.3.1.php → mysql4-install-1.1.3.2.php}
RENAMED
@@ -11,7 +11,7 @@ $installer = $this;
|
|
11 |
|
12 |
$installer->startSetup();
|
13 |
$installer->run("
|
14 |
-
|
15 |
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
16 |
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
17 |
`question` tinytext NOT NULL default '',
|
@@ -28,15 +28,15 @@ ALTER TABLE `{$this->getTable('faq/faq')}`
|
|
28 |
ALTER TABLE `{$this->getTable('faq/faq')}`
|
29 |
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
30 |
|
31 |
-
|
32 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/faq_store')}` (
|
33 |
`faq_id` int(10) unsigned NOT NULL,
|
34 |
`store_id` smallint(5) unsigned NOT NULL,
|
35 |
PRIMARY KEY (`faq_id`,`store_id`),
|
36 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
37 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
38 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
39 |
|
|
|
40 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
41 |
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
`parent_id` INT(10) UNSIGNED NULL,
|
@@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
|
48 |
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
49 |
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
50 |
|
51 |
-
|
52 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
53 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
54 |
`faq_id` INT(10) UNSIGNED NOT NULL,
|
@@ -57,13 +57,12 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
|
57 |
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
58 |
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
59 |
|
60 |
-
|
61 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_store')}` (
|
62 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
63 |
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
64 |
PRIMARY KEY (`category_id`,`store_id`),
|
65 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
66 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
67 |
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
68 |
|
69 |
");
|
11 |
|
12 |
$installer->startSetup();
|
13 |
$installer->run("
|
14 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq')};
|
15 |
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
16 |
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
17 |
`question` tinytext NOT NULL default '',
|
28 |
ALTER TABLE `{$this->getTable('faq/faq')}`
|
29 |
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
30 |
|
31 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq_store')};
|
32 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/faq_store')}` (
|
33 |
`faq_id` int(10) unsigned NOT NULL,
|
34 |
`store_id` smallint(5) unsigned NOT NULL,
|
35 |
PRIMARY KEY (`faq_id`,`store_id`),
|
36 |
+
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
|
|
37 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
38 |
|
39 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category')}`;
|
40 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
41 |
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
`parent_id` INT(10) UNSIGNED NULL,
|
48 |
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
49 |
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
50 |
|
51 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_item')}`;
|
52 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
53 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
54 |
`faq_id` INT(10) UNSIGNED NOT NULL,
|
57 |
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
58 |
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
59 |
|
60 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_store')}`;
|
61 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_store')}` (
|
62 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
63 |
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
64 |
PRIMARY KEY (`category_id`,`store_id`),
|
65 |
+
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
|
|
66 |
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
67 |
|
68 |
");
|
app/code/community/Inic/Faq/sql/faq_setup/mysql4-upgrade-0.1.6-0.1.7.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FAQ for Magento
|
4 |
-
*
|
5 |
-
* @category Inic
|
6 |
-
* @package Inic_Faq
|
7 |
-
* @copyright Copyright (c) 2013 Indianic
|
8 |
-
*/
|
9 |
-
|
10 |
-
$installer = $this;
|
11 |
-
|
12 |
-
$installer->startSetup();
|
13 |
-
|
14 |
-
$installer->run("
|
15 |
-
|
16 |
-
ALTER TABLE `{$this->getTable('faq/faq')}`
|
17 |
-
MODIFY COLUMN `creation_time` DATETIME NOT NULL;
|
18 |
-
ALTER TABLE `{$this->getTable('faq/faq')}`
|
19 |
-
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
20 |
-
|
21 |
-
CREATE TABLE `{$this->getTable('faq/category')}` (
|
22 |
-
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
23 |
-
`parent_id` INT(10) UNSIGNED NULL,
|
24 |
-
`category_name` VARCHAR(255) NOT NULL,
|
25 |
-
`creation_time` DATETIME NOT NULL,
|
26 |
-
`update_time` DATETIME NOT NULL,
|
27 |
-
`is_active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
|
28 |
-
PRIMARY KEY (`category_id`),
|
29 |
-
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
30 |
-
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
31 |
-
|
32 |
-
-- DROP TABLE IF EXISTS `{$this->getTable('faq/category_item')}`;
|
33 |
-
CREATE TABLE `{$this->getTable('faq/category_item')}` (
|
34 |
-
`category_id` INT(10) UNSIGNED NOT NULL,
|
35 |
-
`faq_id` INT(10) UNSIGNED NOT NULL,
|
36 |
-
PRIMARY KEY (`category_id`,`faq_id`),
|
37 |
-
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
38 |
-
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
39 |
-
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
40 |
-
|
41 |
-
-- DROP TABLE IF EXISTS `{$this->getTable('faq/category_store')}`;
|
42 |
-
CREATE TABLE `{$this->getTable('faq/category_store')}` (
|
43 |
-
`category_id` INT(10) UNSIGNED NOT NULL,
|
44 |
-
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
45 |
-
PRIMARY KEY (`category_id`,`store_id`),
|
46 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
47 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
48 |
-
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
49 |
-
|
50 |
-
");
|
51 |
-
|
52 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Inic/Faq/sql/faq_setup/{mysql4-upgrade-1.1.3-1.1.3.1.php → mysql4-upgrade-1.1.3-1.1.3.2.php}
RENAMED
@@ -11,7 +11,7 @@ $installer = $this;
|
|
11 |
|
12 |
$installer->startSetup();
|
13 |
$installer->run("
|
14 |
-
|
15 |
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
16 |
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
17 |
`question` tinytext NOT NULL default '',
|
@@ -28,15 +28,15 @@ ALTER TABLE `{$this->getTable('faq/faq')}`
|
|
28 |
ALTER TABLE `{$this->getTable('faq/faq')}`
|
29 |
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
30 |
|
31 |
-
|
32 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/faq_store')}` (
|
33 |
`faq_id` int(10) unsigned NOT NULL,
|
34 |
`store_id` smallint(5) unsigned NOT NULL,
|
35 |
PRIMARY KEY (`faq_id`,`store_id`),
|
36 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
37 |
-
CONSTRAINT `FK_FAQ_FAQ_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
38 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
39 |
|
|
|
40 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
41 |
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
`parent_id` INT(10) UNSIGNED NULL,
|
@@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
|
48 |
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
49 |
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
50 |
|
51 |
-
|
52 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
53 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
54 |
`faq_id` INT(10) UNSIGNED NOT NULL,
|
@@ -57,13 +57,12 @@ CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
|
57 |
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
58 |
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
59 |
|
60 |
-
|
61 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_store')}` (
|
62 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
63 |
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
64 |
PRIMARY KEY (`category_id`,`store_id`),
|
65 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
66 |
-
CONSTRAINT `FK_FAQ_CATEGORY_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core/store')}` (`store_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
67 |
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
68 |
|
69 |
");
|
11 |
|
12 |
$installer->startSetup();
|
13 |
$installer->run("
|
14 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq')};
|
15 |
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
16 |
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
17 |
`question` tinytext NOT NULL default '',
|
28 |
ALTER TABLE `{$this->getTable('faq/faq')}`
|
29 |
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
30 |
|
31 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq_store')};
|
32 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/faq_store')}` (
|
33 |
`faq_id` int(10) unsigned NOT NULL,
|
34 |
`store_id` smallint(5) unsigned NOT NULL,
|
35 |
PRIMARY KEY (`faq_id`,`store_id`),
|
36 |
+
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
|
|
37 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
38 |
|
39 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/category')};
|
40 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
41 |
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
`parent_id` INT(10) UNSIGNED NULL,
|
48 |
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
49 |
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
50 |
|
51 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_item')}`;
|
52 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
53 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
54 |
`faq_id` INT(10) UNSIGNED NOT NULL,
|
57 |
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
58 |
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
59 |
|
60 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_store')}`;
|
61 |
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_store')}` (
|
62 |
`category_id` INT(10) UNSIGNED NOT NULL,
|
63 |
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
64 |
PRIMARY KEY (`category_id`,`store_id`),
|
65 |
+
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
|
|
66 |
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
67 |
|
68 |
");
|
app/code/community/Inic/Faq/sql/faq_setup/{mysql4-install-0.1.7.php → mysql4-upgrade-1.1.3.1-1.1.3.2.php}
RENAMED
@@ -1,67 +1,70 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* FAQ for Magento
|
4 |
-
*
|
5 |
-
* @category Inic
|
6 |
-
* @package Inic_Faq
|
7 |
-
* @copyright Copyright (c) 2013 Indianic
|
8 |
-
*/
|
9 |
-
|
10 |
-
$installer = $this;
|
11 |
-
|
12 |
-
$installer->startSetup();
|
13 |
-
|
14 |
-
$
|
15 |
-
|
16 |
-
|
17 |
-
`
|
18 |
-
`
|
19 |
-
`
|
20 |
-
`
|
21 |
-
`
|
22 |
-
`
|
23 |
-
`
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
)
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
`
|
42 |
-
`
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
)
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
)
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* FAQ for Magento
|
4 |
+
*
|
5 |
+
* @category Inic
|
6 |
+
* @package Inic_Faq
|
7 |
+
* @copyright Copyright (c) 2013 Indianic
|
8 |
+
*/
|
9 |
+
|
10 |
+
$installer = $this;
|
11 |
+
|
12 |
+
$installer->startSetup();
|
13 |
+
$installer->run("
|
14 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq')};
|
15 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('faq/faq')} (
|
16 |
+
`faq_id` int(10) unsigned NOT NULL auto_increment,
|
17 |
+
`question` tinytext NOT NULL default '',
|
18 |
+
`answer` text NOT NULL default '',
|
19 |
+
`creation_time` datetime default NULL,
|
20 |
+
`update_time` datetime default NULL,
|
21 |
+
`is_active` tinyint(1) NOT NULL default '1',
|
22 |
+
`is_most_frequent` tinyint(1) NOT NULL default '1',
|
23 |
+
PRIMARY KEY (`faq_id`)
|
24 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items' AUTO_INCREMENT=1 ;
|
25 |
+
|
26 |
+
ALTER TABLE `{$this->getTable('faq/faq')}`
|
27 |
+
MODIFY COLUMN `creation_time` DATETIME NOT NULL;
|
28 |
+
ALTER TABLE `{$this->getTable('faq/faq')}`
|
29 |
+
MODIFY COLUMN `update_time` DATETIME NOT NULL;
|
30 |
+
|
31 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/faq_store')};
|
32 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/faq_store')}` (
|
33 |
+
`faq_id` int(10) unsigned NOT NULL,
|
34 |
+
`store_id` smallint(5) unsigned NOT NULL,
|
35 |
+
PRIMARY KEY (`faq_id`,`store_id`),
|
36 |
+
CONSTRAINT `FK_FAQ_FAQ_STORE_FAQ` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
37 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='FAQ items to Stores';
|
38 |
+
|
39 |
+
DROP TABLE IF EXISTS {$this->getTable('faq/category')};
|
40 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category')}` (
|
41 |
+
`category_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
42 |
+
`parent_id` INT(10) UNSIGNED NULL,
|
43 |
+
`category_name` VARCHAR(255) NOT NULL,
|
44 |
+
`creation_time` DATETIME NOT NULL,
|
45 |
+
`update_time` DATETIME NOT NULL,
|
46 |
+
`is_active` TINYINT(1) NOT NULL DEFAULT 1,
|
47 |
+
PRIMARY KEY (`category_id`),
|
48 |
+
CONSTRAINT `FK_FAQ_CATEGORY_PARENT_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON DELETE SET NULL
|
49 |
+
) ENGINE=InnoDB COMMENT='FAQ Categories';
|
50 |
+
|
51 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_item')}`;
|
52 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_item')}` (
|
53 |
+
`category_id` INT(10) UNSIGNED NOT NULL,
|
54 |
+
`faq_id` INT(10) UNSIGNED NOT NULL,
|
55 |
+
PRIMARY KEY (`category_id`,`faq_id`),
|
56 |
+
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE,
|
57 |
+
CONSTRAINT `FK_FAQ_CATEGORY_ITEM_ITEM` FOREIGN KEY (`faq_id`) REFERENCES `{$this->getTable('faq/faq')}` (`faq_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
58 |
+
) ENGINE=InnoDB COMMENT='FAQ Items to Cateories';
|
59 |
+
|
60 |
+
DROP TABLE IF EXISTS `{$this->getTable('faq/category_store')}`;
|
61 |
+
CREATE TABLE IF NOT EXISTS `{$this->getTable('faq/category_store')}` (
|
62 |
+
`category_id` INT(10) UNSIGNED NOT NULL,
|
63 |
+
`store_id` SMALLINT(5) UNSIGNED NOT NULL,
|
64 |
+
PRIMARY KEY (`category_id`,`store_id`),
|
65 |
+
CONSTRAINT `FK_FAQ_CATEGORY_STORE_CATEGORY` FOREIGN KEY (`category_id`) REFERENCES `{$this->getTable('faq/category')}` (`category_id`) ON UPDATE CASCADE ON DELETE CASCADE
|
66 |
+
) ENGINE=InnoDB COMMENT='FAQ Categories to Stores';
|
67 |
+
|
68 |
+
");
|
69 |
+
|
70 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/inic/faq.xml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category design_default
|
23 |
+
* @package Mage
|
24 |
+
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
<layout version="0.1.0">
|
29 |
+
<default>
|
30 |
+
<reference name="head">
|
31 |
+
<action method="setCanLoadExtJs"><flag>1</flag></action>
|
32 |
+
<action method="addJs"><script>mage/adminhtml/variables.js</script></action>
|
33 |
+
<action method="addJs"><script>mage/adminhtml/wysiwyg/widget.js</script></action>
|
34 |
+
<action method="addJs"><script>lib/flex.js</script></action>
|
35 |
+
<action method="addJs"><script>lib/FABridge.js</script></action>
|
36 |
+
<action method="addJs"><script>mage/adminhtml/flexuploader.js</script></action>
|
37 |
+
<action method="addJs"><script>mage/adminhtml/browser.js</script></action>
|
38 |
+
<action method="addJs"><script>prototype/window.js</script></action>
|
39 |
+
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>
|
40 |
+
<action method="addItem"><type>js_css</type><name>prototype/windows/themes/magento.css</name></action>
|
41 |
+
<action method="addCss"><stylesheet>lib/prototype/windows/themes/magento.css</stylesheet></action>
|
42 |
+
<action method="addItem"><type>skin_js</type><name>inic/faq/multiSelectUpdater.js</name><params/></action>
|
43 |
+
|
44 |
+
</reference>
|
45 |
+
</default>
|
46 |
+
</layout>
|
app/design/frontend/default/default/layout/inic/faq.xml
CHANGED
@@ -41,7 +41,7 @@
|
|
41 |
</reference>
|
42 |
<reference name="content">
|
43 |
<block type="faq/frontend_list" name="faq_list" template="inic/faq/list.phtml">
|
44 |
-
<block type="faq/
|
45 |
</block>
|
46 |
</reference>
|
47 |
</faq_index_index>
|
@@ -69,7 +69,7 @@
|
|
69 |
</reference>
|
70 |
<reference name="content">
|
71 |
<block type="faq/frontend_category" name="faq_category" template="inic/faq/categoty.phtml">
|
72 |
-
<block type="faq/
|
73 |
</block>
|
74 |
</reference>
|
75 |
</faq_index_categoryshow>
|
@@ -83,7 +83,7 @@
|
|
83 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
84 |
</reference>
|
85 |
<reference name="content">
|
86 |
-
<block type="
|
87 |
</reference>
|
88 |
</faq_index_result>
|
89 |
</layout>
|
41 |
</reference>
|
42 |
<reference name="content">
|
43 |
<block type="faq/frontend_list" name="faq_list" template="inic/faq/list.phtml">
|
44 |
+
<block type="faq/frontend_faqsearch_search" name="search_form" as="search_form" template="inic/faq/search/search.phtml"/>
|
45 |
</block>
|
46 |
</reference>
|
47 |
</faq_index_index>
|
69 |
</reference>
|
70 |
<reference name="content">
|
71 |
<block type="faq/frontend_category" name="faq_category" template="inic/faq/categoty.phtml">
|
72 |
+
<block type="faq/frontend_faqsearch_search" name="cat_search_form" as="cat_search_form" template="inic/faq/search/search.phtml"/>
|
73 |
</block>
|
74 |
</reference>
|
75 |
</faq_index_categoryshow>
|
83 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
84 |
</reference>
|
85 |
<reference name="content">
|
86 |
+
<block type="faq/frontend_faqsearch_result" name="faq_search_result" template="inic/faq/search/result.phtml"/>
|
87 |
</reference>
|
88 |
</faq_index_result>
|
89 |
</layout>
|
app/design/frontend/default/default/template/inic/faq/search/result.phtml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php $_faqResult = $this->getSearch() ?>
|
2 |
<?php
|
3 |
$flg=false;
|
4 |
$keyword=$this->getRequest()->getParam('keyword');
|
@@ -12,13 +12,15 @@
|
|
12 |
<div class="calegory-faq-list">
|
13 |
<?php if ($_faqResult): ?>
|
14 |
<div class="page-title" style="overflow: visible;">
|
15 |
-
<?php if($id): ?>
|
16 |
<h1><?php echo $this->__('Search Result For - "%s" from category "%s"',$keyword,$category->getName()); ?></h1>
|
17 |
-
<?php
|
18 |
<h1><?php echo $this->__('Search Result For : "%s"',$keyword); ?></h1>
|
|
|
|
|
19 |
<?php endif; ?>
|
20 |
</div>
|
21 |
-
|
22 |
<div class="faq-detail">
|
23 |
<?php if(count($_faqResult)): ?>
|
24 |
<?php foreach ($_faqResult as $item) : ?>
|
1 |
+
<?php $_faqResult = $this->getSearch(); ?>
|
2 |
<?php
|
3 |
$flg=false;
|
4 |
$keyword=$this->getRequest()->getParam('keyword');
|
12 |
<div class="calegory-faq-list">
|
13 |
<?php if ($_faqResult): ?>
|
14 |
<div class="page-title" style="overflow: visible;">
|
15 |
+
<?php if($id!= "" && $keyword!=""): ?>
|
16 |
<h1><?php echo $this->__('Search Result For - "%s" from category "%s"',$keyword,$category->getName()); ?></h1>
|
17 |
+
<?php elseif($id="" && $keyword!= ""): ?>
|
18 |
<h1><?php echo $this->__('Search Result For : "%s"',$keyword); ?></h1>
|
19 |
+
<?php else: ?>
|
20 |
+
<h1><?php echo $this->__('Search Result From category : "%s"',$category->getName()); ?></h1>
|
21 |
<?php endif; ?>
|
22 |
</div>
|
23 |
+
<div class="expand" id="expand-collaps"><a href="javascript:void(0)" onclick="expand(this)"><?php echo $this->__('Expand All'); ?></a></div>
|
24 |
<div class="faq-detail">
|
25 |
<?php if(count($_faqResult)): ?>
|
26 |
<?php foreach ($_faqResult as $item) : ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>inic_faq</name>
|
4 |
-
<version>1.1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -19,9 +19,9 @@
|
|
19 |
- Assign category to the item on the basis of store-view selected.
|
20 |
- Solve the wysiwyg editor image upload issue.</notes>
|
21 |
<authors><author><name>Enquiry Indianic</name><user>indianic</user><email>enquiry@indianic.com</email></author></authors>
|
22 |
-
<date>2013-
|
23 |
-
<time>
|
24 |
-
<contents><target name="magecommunity"><dir name="Inic"><dir name="Faq"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="1565463e9373b4810beeb1f3ebf85ad4"/><dir name="Tab"><file name="Main.php" hash="
|
25 |
<compatible/>
|
26 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>inic_faq</name>
|
4 |
+
<version>1.1.3.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
19 |
- Assign category to the item on the basis of store-view selected.
|
20 |
- Solve the wysiwyg editor image upload issue.</notes>
|
21 |
<authors><author><name>Enquiry Indianic</name><user>indianic</user><email>enquiry@indianic.com</email></author></authors>
|
22 |
+
<date>2013-12-13</date>
|
23 |
+
<time>11:20:56</time>
|
24 |
+
<contents><target name="magecommunity"><dir name="Inic"><dir name="Faq"><dir name="Block"><dir name="Adminhtml"><dir name="Category"><dir name="Edit"><file name="Form.php" hash="1565463e9373b4810beeb1f3ebf85ad4"/><dir name="Tab"><file name="Main.php" hash="184a48fa4e54aec83b9cf6cad9f7f0f3"/></dir><file name="Tabs.php" hash="f628c7c1c5a3262eba24ef6371789c9f"/></dir><file name="Edit.php" hash="43184dbc88660cf366e65daf88f7ad84"/><file name="Grid.php" hash="d882f5108cb2ec6da37d50c3d13303e0"/></dir><file name="Category.php" hash="6e530cf0006701fea820760eb05507b6"/><dir name="Item"><dir name="Edit"><file name="Form.php" hash="a28340f01594898277019fa465ab25c0"/><dir name="Tab"><file name="Main.php" hash="21ad7316206af27e249d684c7d8ebffe"/></dir><file name="Tabs.php" hash="d16c4ed9085b1621e57b62b351c40fbe"/></dir><file name="Edit.php" hash="00074f16986ac40b52091c88358c627b"/><file name="Grid.php" hash="c7752450df739ed1b3de2c00ef3cce83"/></dir><file name="Item.php" hash="0ca3cce6235d990af1934f034194ae78"/><dir name="Widget"><dir name="Form"><dir name="Element"><file name="Selectdependence.php" hash="f653a53acb79dda0cb0887b3bc0682c8"/></dir></dir><dir name="Grid"><dir name="Column"><dir name="Renderer"><file name="Category.php" hash="afa74e3f66e85e2b9144b944e34f8f70"/></dir></dir></dir></dir></dir><dir name="Frontend"><file name="Category.php" hash="65f740c1eebb588feccc25bf3c645fe3"/><file name="Detail.php" hash="578280e4e25723fa66346e1f4ec3950a"/><dir name="Faqsearch"><file name="Result.php" hash="afc4d4c01349b0f83bf67cd7c79fe485"/><file name="Search.php" hash="12f831f639f205d5dc310b34bde91547"/></dir><file name="List.php" hash="1ec290553f7e77ce531a7d5656aa7952"/></dir></dir><dir name="Helper"><file name="Data.php" hash="47e9cb00584debcb268953b60492a4c3"/></dir><dir name="Model"><file name="Category.php" hash="76e90b0d41f2b1072bc7b218ad93703b"/><file name="Faq.php" hash="a343d1e09850bab571617089ef86fc14"/><dir name="Mysql4"><dir name="Category"><file name="Collection.php" hash="5ff80d5d0266a1326235e5c1a03e1e19"/></dir><file name="Category.php" hash="2a377678773147f846e2e8472009aafd"/><dir name="Faq"><file name="Collection.php" hash="6d5e7eb2d9e0fca772072038b2f57a94"/></dir><file name="Faq.php" hash="db8c13b525ae7e380db8de16c1eb212c"/></dir><file name="Status.php" hash="fdb82086dda94ef9d17e547e832e0885"/><dir name="System"><dir name="Config"><dir name="Source"><file name="View.php" hash="b72c180084212d870be4dd2c840ab1c7"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Faq"><file name="CategoryController.php" hash="6355772fb6ab5f717959c84a5fd1f055"/></dir><file name="FaqController.php" hash="543c6cf945a41f25d920a8a01d903239"/></dir><file name="IndexController.php" hash="f8f0724405086edb37e5b82134cc232b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="31410f159ae4caa4e0ad08fa8506a851"/><file name="config.xml" hash="52b391ee03b97eac1961cbb2df3d04b9"/><file name="system.xml" hash="cc68db4128b4001254f2df5c126b11de"/></dir><dir name="sql"><dir name="faq_setup"><file name="mysql4-install-1.1.3.2.php" hash="ac14f1425d7b3302355dc953322d9519"/><file name="mysql4-upgrade-1.1.3-1.1.3.2.php" hash="d9b40be83b26de32e25375ff309e7e89"/><file name="mysql4-upgrade-1.1.3.1-1.1.3.2.php" hash="d9b40be83b26de32e25375ff309e7e89"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Inic_Faq.xml" hash="1e84968e10409f9541e14b36c510f699"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><dir name="inic"><dir name="faq"><file name="faq.css" hash="b15fd1af1349e3bc3e4d8645330b1132"/></dir></dir></dir><dir name="images"><dir name="inic"><dir name="faq"><file name="faq_search_bar.png" hash="2f9360b3aaab98850694b7e4bb795179"/><file name="minus.png" hash="568c3964d6361fc065f61c9a7dd1cfde"/><file name="plus.png" hash="06a20e393a6aac4ae0bfb59b453f7a18"/><file name="search.gif" hash="798952b8b1ddd7c2f8d3d1ba11a1599c"/></dir></dir></dir><dir name="js"><dir name="inic"><dir name="faq"><file name="faq.js" hash="0b11f401ff33080a787aa5d5c3c63ce1"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="inic"><dir name="faq"><file name="multiSelectUpdater.js" hash="7ce0a1f972973b5bfcba2b461c5aa17c"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><dir name="inic"><file name="faq.xml" hash="f15d20f1197d97c1847826954f3d1ed1"/></dir></dir><dir name="template"><dir name="inic"><dir name="faq"><file name="categoty.phtml" hash="f3d74e480ad38bb475e395df0441c382"/><file name="detail.phtml" hash="9d475dcbd446a777832adacb3dc20d2b"/><file name="list.phtml" hash="ffaa2434620954b2a431f6214ee3651c"/><dir name="search"><file name="result.phtml" hash="aa63c8cea0130d52e68989faff876afc"/><file name="search.phtml" hash="33ecd97803bff7a14e93e6a10a4ec026"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><dir name="inic"><file name="faq.xml" hash="34407d72733161bebb25a7a3a82029eb"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Inic_Faq.csv" hash="8db595c23035dbfdaa529054536b2b1a"/></dir></target></contents>
|
25 |
<compatible/>
|
26 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|