Version Notes
This extension will allow you to add/delete/search attribute labels
Download this release
Release Info
Developer | Magento Core Team |
Extension | Quick_Action_Attribute_Values_or_Labels |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.4
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue/Edit.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue/Edit/Tabs.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete/Edit.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete/Edit/Tabs.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/Helper/Data.php +1 -2
- app/code/community/CueBlocks/Cueattributevalue/controllers/Adminhtml/CueattributevalueController.php +4 -4
- app/code/community/CueBlocks/Cueattributevalue/controllers/Adminhtml/CueattributevaluedeleteController.php +16 -12
- app/code/community/CueBlocks/Cueattributevalue/etc/config.xml +1 -2
- app/design/adminhtml/default/default/layout/cueattributevalue.xml +1 -2
- app/design/adminhtml/default/default/template/cueattributevalue/cueattributevalueadd.phtml +1 -2
- app/design/adminhtml/default/default/template/cueattributevalue/cueattributevaluedelete.phtml +112 -19
- app/etc/modules/CueBlocks_Cueattributevalue.xml +1 -2
- package.xml +5 -5
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue/Edit.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevalue/Edit/Tabs.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete/Edit.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Block/Adminhtml/Cueattributevaluedelete/Edit/Tabs.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/Helper/Data.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/code/community/CueBlocks/Cueattributevalue/controllers/Adminhtml/CueattributevalueController.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
@@ -66,7 +65,8 @@ class CueBlocks_Cueattributevalue_Adminhtml_CueattributevalueController extends
|
|
66 |
$optionvalue=$this->getRequest()->getParam('attribute_option_value_'.$store['store_id']);
|
67 |
if($optionvalue!='')
|
68 |
{
|
69 |
-
$eavattoptioncollObj = Mage::getModel('eav/entity_attribute_option')->getCollection()->join('attribute_option_value','(attribute_option_value.option_id = main_table.option_id) and main_table.attribute_id='.$attribute_id.' where attribute_option_value.store_id='.$store["store_id"].' and UPPER(value)="'.strtoupper($optionvalue).'"');
|
|
|
70 |
foreach($eavattoptioncollObj as $val)
|
71 |
{
|
72 |
if(!empty($val))
|
@@ -103,7 +103,7 @@ class CueBlocks_Cueattributevalue_Adminhtml_CueattributevalueController extends
|
|
103 |
$data = array(
|
104 |
'option_id' => $insertedId,
|
105 |
'store_id' => $store->getId(),
|
106 |
-
'value' => $optionvalue,
|
107 |
);
|
108 |
$write->insert('eav_attribute_option_value', $data);
|
109 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
65 |
$optionvalue=$this->getRequest()->getParam('attribute_option_value_'.$store['store_id']);
|
66 |
if($optionvalue!='')
|
67 |
{
|
68 |
+
$eavattoptioncollObj = Mage::getModel('eav/entity_attribute_option')->getCollection()->join('attribute_option_value','(attribute_option_value.option_id = main_table.option_id) and main_table.attribute_id='.$attribute_id.' where attribute_option_value.store_id='.$store["store_id"].' and UPPER(value)="'.addslashes(strtoupper($optionvalue)).'"');
|
69 |
+
//$eavattoptioncollObj->printlogquery(true);die;
|
70 |
foreach($eavattoptioncollObj as $val)
|
71 |
{
|
72 |
if(!empty($val))
|
103 |
$data = array(
|
104 |
'option_id' => $insertedId,
|
105 |
'store_id' => $store->getId(),
|
106 |
+
'value' => stripslashes($optionvalue),
|
107 |
);
|
108 |
$write->insert('eav_attribute_option_value', $data);
|
109 |
}
|
app/code/community/CueBlocks/Cueattributevalue/controllers/Adminhtml/CueattributevaluedeleteController.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
@@ -50,34 +49,39 @@ class CueBlocks_Cueattributevalue_Adminhtml_CueattributevaluedeleteController ex
|
|
50 |
try
|
51 |
{
|
52 |
$value_id=$this->getRequest()->getParam('value_id');
|
53 |
-
$option_id=$this->getRequest()->getParam('option_id');
|
54 |
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
55 |
-
$optionvalue = Mage::getModel('eav/entity_attribute_option')->getCollection()->join('attribute_option_value','(attribute_option_value.option_id = main_table.option_id) and attribute_option_value.value_id
|
56 |
foreach($optionvalue as $option)
|
57 |
{
|
|
|
|
|
58 |
if($option['store_id']=='0')
|
59 |
{ $val=$option['value'];
|
60 |
$eavattributeoptionObj = Mage::getModel('eav/entity_attribute_option');
|
61 |
-
$eavattributeoptionObj->setId($
|
62 |
->delete();
|
63 |
-
Mage::getSingleton('
|
64 |
-
$this->_redirect('*/*/');
|
65 |
}
|
66 |
else
|
67 |
{
|
68 |
-
$write->delete('eav_attribute_option_value', $write->quoteInto('value_id=?', $
|
69 |
-
Mage::getSingleton('
|
70 |
-
$this->_redirect('*/*/');
|
71 |
}
|
72 |
}
|
73 |
-
|
|
|
74 |
}
|
75 |
catch (Exception $e)
|
76 |
{
|
77 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
78 |
-
$this->_redirect('*/*/
|
79 |
}
|
80 |
}
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
49 |
try
|
50 |
{
|
51 |
$value_id=$this->getRequest()->getParam('value_id');
|
|
|
52 |
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
53 |
+
$optionvalue = Mage::getModel('eav/entity_attribute_option')->getCollection()->join('attribute_option_value','(attribute_option_value.option_id = main_table.option_id) and attribute_option_value.value_id In ('.$value_id.')');
|
54 |
foreach($optionvalue as $option)
|
55 |
{
|
56 |
+
$valuedel=$option['value_id'];
|
57 |
+
$optiondel=$option['option_id'];
|
58 |
if($option['store_id']=='0')
|
59 |
{ $val=$option['value'];
|
60 |
$eavattributeoptionObj = Mage::getModel('eav/entity_attribute_option');
|
61 |
+
$eavattributeoptionObj->setId($optiondel)
|
62 |
->delete();
|
63 |
+
Mage::getSingleton('core/session')->setDelSessionVariable($this->getRequest()->getparams());
|
|
|
64 |
}
|
65 |
else
|
66 |
{
|
67 |
+
$write->delete('eav_attribute_option_value', $write->quoteInto('value_id=?', $valuedel));
|
68 |
+
Mage::getSingleton('core/session')->setDelSessionVariable($this->getRequest()->getparams());
|
|
|
69 |
}
|
70 |
}
|
71 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Label was successfully deleted.'));
|
72 |
+
$this->_redirect('*/*/');
|
73 |
}
|
74 |
catch (Exception $e)
|
75 |
{
|
76 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
77 |
+
$this->_redirect('*/*/');
|
78 |
}
|
79 |
}
|
80 |
+
else
|
81 |
+
{
|
82 |
+
Mage::getSingleton('core/session')->setDelSessionVariable($this->getRequest()->getparams());
|
83 |
+
$this->_redirect('*/*/');
|
84 |
+
}
|
85 |
}
|
86 |
|
87 |
}
|
app/code/community/CueBlocks/Cueattributevalue/etc/config.xml
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
<!--
|
3 |
/**
|
4 |
*
|
5 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
6 |
-
* Version :- 1.2
|
7 |
* Edition :- community
|
8 |
* Developed By :- CueBlocks.com
|
9 |
*
|
2 |
<!--
|
3 |
/**
|
4 |
*
|
5 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
app/design/adminhtml/default/default/layout/cueattributevalue.xml
CHANGED
@@ -2,8 +2,7 @@
|
|
2 |
<!--
|
3 |
/**
|
4 |
*
|
5 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
6 |
-
* Version :- 1.2
|
7 |
* Edition :- community
|
8 |
* Developed By :- CueBlocks.com
|
9 |
*
|
2 |
<!--
|
3 |
/**
|
4 |
*
|
5 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
app/design/adminhtml/default/default/template/cueattributevalue/cueattributevalueadd.phtml
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
app/design/adminhtml/default/default/template/cueattributevalue/cueattributevaluedelete.phtml
CHANGED
@@ -1,17 +1,29 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
$eavattributeObj = Mage::getModel('eav/entity_attribute');
|
11 |
$eavattributeoptionObj = Mage::getModel('eav/entity_attribute_option');
|
12 |
$attribute_id=$this->getRequest()->getParam('attribute_id');
|
|
|
|
|
13 |
$store_id=$this->getRequest()->getParam('store_id');
|
|
|
|
|
14 |
$searchlabel=$this->getRequest()->getParam('search_attribute');
|
|
|
|
|
15 |
|
16 |
|
17 |
$filter_a = array('multiselect');
|
@@ -52,17 +64,27 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
52 |
<td><h3><?=$this->__('Delete Attribute Labels')?></h3></td>
|
53 |
<td class="a-right">
|
54 |
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Search</span></button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
</td>
|
56 |
</tr>
|
57 |
</table>
|
58 |
</div>
|
|
|
59 |
<div class="entry-edit">
|
60 |
<div class="entry-edit-head">
|
61 |
<h4 class="icon-head head-edit-form fieldset-legend"><?=$this->__("Delete Attribute Labels")?></h4>
|
62 |
</div>
|
63 |
<fieldset id="my-fieldset">
|
64 |
<?php /***Search Form Starts***/ ?>
|
65 |
-
<form id="edit_form" name="edit_form" method="post"
|
66 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
67 |
<table cellspacing="0" class="form-list">
|
68 |
<tr>
|
@@ -94,12 +116,9 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
94 |
if($arr!=$storegroupname['name'])
|
95 |
{
|
96 |
?>
|
97 |
-
|
98 |
-
|
99 |
<? }?>
|
100 |
-
|
101 |
-
<option style="" value="<?php echo $Storename['store_id']?>" <?php echo $Storename['store_id']?>><?php echo $Storename['name']?></option>
|
102 |
-
|
103 |
<?php }?></optgroup>
|
104 |
<?php }?>
|
105 |
</select>
|
@@ -115,7 +134,7 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
115 |
|
116 |
<?php /***Search Result Starts***/
|
117 |
|
118 |
-
if($
|
119 |
{
|
120 |
?>
|
121 |
<table cellspacing="0" width="100%">
|
@@ -124,6 +143,12 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
124 |
</tr>
|
125 |
|
126 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
<table cellspacing="0" border="0" class="form-list">
|
128 |
<?php
|
129 |
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
@@ -134,21 +159,17 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
134 |
<tr>
|
135 |
<td class="label"><strong><?=$this->__('Label Value')?></strong></td>
|
136 |
<td class="label"><strong><?=$this->__('Action')?></strong></td>
|
|
|
137 |
</tr>
|
138 |
<?php foreach($datavalues as $val)
|
139 |
{?>
|
140 |
-
<
|
141 |
-
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
142 |
-
<tr>
|
143 |
<td class="label"><?=$this->__($val['value'])?></td>
|
144 |
-
<td align="left">
|
145 |
-
|
146 |
-
<input type="hidden" value="<?php echo $val['value_id'];?>" name="value_id" id="value_id" />
|
147 |
-
<input type="hidden" value="<?php echo $val['option_id'];?>" name="option_id" id="option_id" />
|
148 |
</td>
|
149 |
|
150 |
-
|
151 |
-
</form>
|
152 |
<?php }
|
153 |
}
|
154 |
if($rowcount==0)
|
@@ -166,5 +187,77 @@ $Website = $websiteObj->getCollection()->setLoadDefault(true)->load();
|
|
166 |
<script type="text/javascript">
|
167 |
var editForm = new varienForm('edit_form');
|
168 |
var deleteForm = new varienForm('delete_form');
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
8 |
*/
|
9 |
+
$data=Mage::getSingleton('core/session')->getDelSessionVariable();
|
10 |
+
?>
|
11 |
+
<script src="<?php echo $this->getJsUrl() ?>mage/adminhtml/loader.js" type="text/javascript"></script>
|
12 |
+
|
13 |
+
|
14 |
+
<?php
|
15 |
+
|
16 |
$eavattributeObj = Mage::getModel('eav/entity_attribute');
|
17 |
$eavattributeoptionObj = Mage::getModel('eav/entity_attribute_option');
|
18 |
$attribute_id=$this->getRequest()->getParam('attribute_id');
|
19 |
+
if($attribute_id=='')
|
20 |
+
$attribute_id=$data['attribute_id'];
|
21 |
$store_id=$this->getRequest()->getParam('store_id');
|
22 |
+
if($store_id=='')
|
23 |
+
$store_id=$data['store_id'];
|
24 |
$searchlabel=$this->getRequest()->getParam('search_attribute');
|
25 |
+
if($searchlabel=='')
|
26 |
+
$searchlabel=$data['search_attribute'];
|
27 |
|
28 |
|
29 |
$filter_a = array('multiselect');
|
64 |
<td><h3><?=$this->__('Delete Attribute Labels')?></h3></td>
|
65 |
<td class="a-right">
|
66 |
<button onclick="editForm.submit()" class="scalable save" type="button"><span>Search</span></button>
|
67 |
+
<form id="delete_form" name="edit_form" method="post" action="<?php echo $this->getUrl('*/*/delete')?>">
|
68 |
+
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
69 |
+
<input type="hidden" id="value_id" name="value_id">
|
70 |
+
<input type="hidden" id="option_id" name="option_id">
|
71 |
+
<input type="hidden" id="attribute_id" name="attribute_id" value="<?php echo $attribute_id?>">
|
72 |
+
<input type="hidden" id="store_id" name="store_id" value="<?php echo $store_id?>">
|
73 |
+
<input type="hidden" id="search_attribute" name="search_attribute" value="<?php echo $searchlabel?>">
|
74 |
+
<button class="scalable save" id="btnsave" name="btnsave" type="submit"><span>Save</span></button>
|
75 |
+
</form>
|
76 |
</td>
|
77 |
</tr>
|
78 |
</table>
|
79 |
</div>
|
80 |
+
<? //$this->getUrl('*/*/delete')?>
|
81 |
<div class="entry-edit">
|
82 |
<div class="entry-edit-head">
|
83 |
<h4 class="icon-head head-edit-form fieldset-legend"><?=$this->__("Delete Attribute Labels")?></h4>
|
84 |
</div>
|
85 |
<fieldset id="my-fieldset">
|
86 |
<?php /***Search Form Starts***/ ?>
|
87 |
+
<form id="edit_form" name="edit_form" method="post">
|
88 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
89 |
<table cellspacing="0" class="form-list">
|
90 |
<tr>
|
116 |
if($arr!=$storegroupname['name'])
|
117 |
{
|
118 |
?>
|
119 |
+
<optgroup style="padding-left: 16px;" label="<?php echo $storegroupname['name']; $arr=$storegroupname['name'];?>">
|
|
|
120 |
<? }?>
|
121 |
+
<option style="" value="<?php echo $Storename['store_id']?>" <?php echo $Storename['store_id']==$store_id ?'selected=selected':' '?>><?php echo $Storename['name']?></option>
|
|
|
|
|
122 |
<?php }?></optgroup>
|
123 |
<?php }?>
|
124 |
</select>
|
134 |
|
135 |
<?php /***Search Result Starts***/
|
136 |
|
137 |
+
if($searchlabel!='')
|
138 |
{
|
139 |
?>
|
140 |
<table cellspacing="0" width="100%">
|
143 |
</tr>
|
144 |
|
145 |
</table>
|
146 |
+
<div id="loadingmask" style="display: none;">
|
147 |
+
<div class="loader" id="loading-mask-loader" style="text-align:center;">
|
148 |
+
<img align="center" src="<?php echo $this->getSkinUrl($this->__('images/ajax-loader-tr.gif'))?>" alt="<?php echo $this->__('Loading...') ?>"/><?php echo $this->__('Loading...') ?>
|
149 |
+
</div>
|
150 |
+
<div id="loading-mask"></div>
|
151 |
+
</div>
|
152 |
<table cellspacing="0" border="0" class="form-list">
|
153 |
<?php
|
154 |
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
|
159 |
<tr>
|
160 |
<td class="label"><strong><?=$this->__('Label Value')?></strong></td>
|
161 |
<td class="label"><strong><?=$this->__('Action')?></strong></td>
|
162 |
+
|
163 |
</tr>
|
164 |
<?php foreach($datavalues as $val)
|
165 |
{?>
|
166 |
+
<tr>
|
|
|
|
|
167 |
<td class="label"><?=$this->__($val['value'])?></td>
|
168 |
+
<td align="left">
|
169 |
+
<button id="del<?php echo $val['value_id']?>" class="delete delete-option" type="button" onclick="del(<?php echo $val['value_id']?>,<?php echo $val['option_id']?>)"><span>Mark for Deletion</span></button>
|
|
|
|
|
170 |
</td>
|
171 |
|
172 |
+
</tr>
|
|
|
173 |
<?php }
|
174 |
}
|
175 |
if($rowcount==0)
|
187 |
<script type="text/javascript">
|
188 |
var editForm = new varienForm('edit_form');
|
189 |
var deleteForm = new varienForm('delete_form');
|
190 |
+
function del(val,option)
|
191 |
+
{
|
192 |
+
if(document.getElementById('value_id').value=='')
|
193 |
+
{
|
194 |
+
document.getElementById('value_id').value=val;
|
195 |
+
document.getElementById('del'+val).innerHTML='<span>UnMark</span>';
|
196 |
+
document.getElementById('del'+val).className='delete delete-option';
|
197 |
+
}
|
198 |
+
else
|
199 |
+
{
|
200 |
+
var ele=document.getElementById('value_id').value.split(',');
|
201 |
+
var l=ele.length;
|
202 |
+
for(var i=0;i<l;i++)
|
203 |
+
{
|
204 |
+
if(ele[i]==val)
|
205 |
+
{
|
206 |
+
var text='yes';
|
207 |
+
ele.splice(i, 1);
|
208 |
+
break;
|
209 |
+
}
|
210 |
+
else
|
211 |
+
text='no';
|
212 |
+
|
213 |
+
}
|
214 |
+
if(text=='no')
|
215 |
+
{
|
216 |
+
document.getElementById('value_id').value=document.getElementById('value_id').value + ',' +val;
|
217 |
+
document.getElementById('del'+val).innerHTML='<span>UnMark</span>';
|
218 |
+
document.getElementById('del'+val).className='delete delete-option';
|
219 |
+
}
|
220 |
+
else
|
221 |
+
{
|
222 |
+
var str=ele.toString();
|
223 |
+
document.getElementById('del'+val).innerHTML='<span>Mark for Deletion</span>';
|
224 |
+
document.getElementById('del'+val).className='delete delete-option';
|
225 |
+
document.getElementById('value_id').value=str;
|
226 |
+
}
|
227 |
+
|
228 |
+
}
|
229 |
|
230 |
+
if(document.getElementById('option_id').value=='')
|
231 |
+
document.getElementById('option_id').value=option;
|
232 |
+
else
|
233 |
+
{
|
234 |
+
var eleoption=document.getElementById('option_id').value.split(',');
|
235 |
+
var l=eleoption.length;
|
236 |
+
for(var i=0;i<l;i++)
|
237 |
+
{
|
238 |
+
if(eleoption[i]==option)
|
239 |
+
{
|
240 |
+
var text='yes';
|
241 |
+
eleoption.splice(i, 1);
|
242 |
+
break;
|
243 |
+
}
|
244 |
+
else
|
245 |
+
text='no';
|
246 |
+
|
247 |
+
}
|
248 |
+
if(text=='no')
|
249 |
+
{
|
250 |
+
document.getElementById('option_id').value=document.getElementById('option_id').value + ',' +option;
|
251 |
+
}
|
252 |
+
else
|
253 |
+
{
|
254 |
+
var stroption=eleoption.toString();
|
255 |
+
document.getElementById('option_id').value=stroption;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
}
|
260 |
+
</script>
|
261 |
+
<?php
|
262 |
+
Mage::getSingleton('core/session')->setDelSessionVariable();
|
263 |
+
?>
|
app/etc/modules/CueBlocks_Cueattributevalue.xml
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<!--
|
2 |
/**
|
3 |
*
|
4 |
-
* Package :- Quick_Action_Attribute_Values_or_Labels
|
5 |
-
* Version :- 1.2
|
6 |
* Edition :- community
|
7 |
* Developed By :- CueBlocks.com
|
8 |
*
|
1 |
<!--
|
2 |
/**
|
3 |
*
|
4 |
+
* Package :- Quick_Action_Attribute_Values_or_Labels
|
|
|
5 |
* Edition :- community
|
6 |
* Developed By :- CueBlocks.com
|
7 |
*
|
package.xml
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Quick_Action_Attribute_Values_or_Labels</name>
|
4 |
-
<version>1.
|
5 |
-
<stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>This extension has been developed by CueBlocks.com to add attirbute labels.</description>
|
11 |
<notes>This extension will allow you to add/delete/search attribute labels</notes>
|
12 |
<authors><author><name>ekta puri</name><user>auto-converted</user><email>ekta.puri@cueblocks.com</email></author></authors>
|
13 |
-
<date>2011-01-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cueattributevalue.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Quick_Action_Attribute_Values_or_Labels</name>
|
4 |
+
<version>1.4</version>
|
5 |
+
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
10 |
<description>This extension has been developed by CueBlocks.com to add attirbute labels.</description>
|
11 |
<notes>This extension will allow you to add/delete/search attribute labels</notes>
|
12 |
<authors><author><name>ekta puri</name><user>auto-converted</user><email>ekta.puri@cueblocks.com</email></author></authors>
|
13 |
+
<date>2011-01-27</date>
|
14 |
+
<time>03:52:54</time>
|
15 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="cueattributevalue.xml" hash="ebd121a86dd52d488a451cff03f84f49"/></dir><dir name="template"><dir name="cueattributevalue"><file name="cueattributevalueadd.phtml" hash="9ae67746c070fa1ead699e5ea35c58dc"/><file name="cueattributevaluedelete.phtml" hash="b49fc52a60a83d771dcef80b343d8df8"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="CueBlocks"><dir name="Cueattributevalue"><dir name="Block"><dir name="Adminhtml"><dir name="Cueattributevalue"><dir name="Edit"><file name="Tabs.php" hash="b89d1728f3278570482018e38d61ea6d"/></dir><file name="Edit.php" hash="f2359d3c38452d13ffba9e8a7edf6f37"/></dir><dir name="Cueattributevaluedelete"><dir name="Edit"><file name="Tabs.php" hash="37b4a58b4695856082601d6f1ff3a5dc"/></dir><file name="Edit.php" hash="f9f8d25b2a9afacbce9055606e632655"/></dir><file name="Cueattributevalue.php" hash="d1ca33e7e6982c5db7ace22f710f5891"/><file name="Cueattributevaluedelete.php" hash="61968ece63443aacf0650732c3f9ff60"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CueattributevalueController.php" hash="0157c3970d8fcc18e46bab8d0cbf26fd"/><file name="CueattributevaluedeleteController.php" hash="9b5c76f95c62be5ba14298ef5f2eaa02"/></dir></dir><dir name="etc"><file name="config.xml" hash="a7e02d83d6c268135f57f053dfcf9c3c"/></dir><dir name="Helper"><file name="Data.php" hash="6a7bde10d6391609249973c57b714190"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CueBlocks_Cueattributevalue.xml" hash="cb17491c5aa5bbfc667d2e7f51e4dccc"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|