I installed the Admin Product Filter By Category module but now I can't delete products that aren't in any categories. I don't get any errors when I try to delete but when I go to edit the products without categories I get this error:
2010-04-09 21:29:56 - PHP Notice: Undefined index: model in D:\www\antique\admin\controller\catalog\product.php on line 636
2010-04-09 21:29:56 - PHP Notice: Undefined index: sku in D:\www\antique\admin\controller\catalog\product.php on line 644
2010-04-09 21:29:56 - PHP Notice: Undefined index: location in D:\www\antique\admin\controller\catalog\product.php on line 652
2010-04-09 21:29:56 - PHP Notice: Undefined index: keyword in D:\www\antique\admin\controller\catalog\product.php on line 660
2010-04-09 21:29:56 - PHP Notice: Undefined index: image in D:\www\antique\admin\controller\catalog\product.php on line 668
2010-04-09 21:29:56 - PHP Notice: Undefined index: image in D:\www\antique\admin\controller\catalog\product.php on line 675
2010-04-09 21:29:56 - PHP Notice: Undefined index: manufacturer_id in D:\www\antique\admin\controller\catalog\product.php on line 688
2010-04-09 21:29:56 - PHP Notice: Undefined index: shipping in D:\www\antique\admin\controller\catalog\product.php on line 696
2010-04-09 21:29:56 - PHP Notice: Undefined index: date_available in D:\www\antique\admin\controller\catalog\product.php on line 704
2010-04-09 21:29:56 - PHP Notice: Undefined index: quantity in D:\www\antique\admin\controller\catalog\product.php on line 712
2010-04-09 21:29:56 - PHP Notice: Undefined index: stock_status_id in D:\www\antique\admin\controller\catalog\product.php on line 724
2010-04-09 21:29:56 - PHP Notice: Undefined index: price in D:\www\antique\admin\controller\catalog\product.php on line 732
2010-04-09 21:29:56 - PHP Notice: Undefined index: status in D:\www\antique\admin\controller\catalog\product.php on line 740
2010-04-09 21:29:56 - PHP Notice: Undefined index: tax_class_id in D:\www\antique\admin\controller\catalog\product.php on line 752
2010-04-09 21:29:56 - PHP Notice: Undefined index: weight in D:\www\antique\admin\controller\catalog\product.php on line 760
2010-04-09 21:29:56 - PHP Notice: Undefined index: weight_class_id in D:\www\antique\admin\controller\catalog\product.php on line 772
2010-04-09 21:29:56 - PHP Notice: Undefined index: length in D:\www\antique\admin\controller\catalog\product.php on line 780
2010-04-09 21:29:56 - PHP Notice: Undefined index: width in D:\www\antique\admin\controller\catalog\product.php on line 788
2010-04-09 21:29:56 - PHP Notice: Undefined index: height in D:\www\antique\admin\controller\catalog\product.php on line 796
2010-04-09 21:29:56 - PHP Notice: Undefined index: measurement_class_id in D:\www\antique\admin\controller\catalog\product.php on line 808
2010-04-09 21:29:56 - PHP Notice: Undefined index: model in D:\www\antique\admin\controller\catalog\product.php on line 636
2010-04-09 21:29:56 - PHP Notice: Undefined index: sku in D:\www\antique\admin\controller\catalog\product.php on line 644
2010-04-09 21:29:56 - PHP Notice: Undefined index: location in D:\www\antique\admin\controller\catalog\product.php on line 652
2010-04-09 21:29:56 - PHP Notice: Undefined index: keyword in D:\www\antique\admin\controller\catalog\product.php on line 660
2010-04-09 21:29:56 - PHP Notice: Undefined index: image in D:\www\antique\admin\controller\catalog\product.php on line 668
2010-04-09 21:29:56 - PHP Notice: Undefined index: image in D:\www\antique\admin\controller\catalog\product.php on line 675
2010-04-09 21:29:56 - PHP Notice: Undefined index: manufacturer_id in D:\www\antique\admin\controller\catalog\product.php on line 688
2010-04-09 21:29:56 - PHP Notice: Undefined index: shipping in D:\www\antique\admin\controller\catalog\product.php on line 696
2010-04-09 21:29:56 - PHP Notice: Undefined index: date_available in D:\www\antique\admin\controller\catalog\product.php on line 704
2010-04-09 21:29:56 - PHP Notice: Undefined index: quantity in D:\www\antique\admin\controller\catalog\product.php on line 712
2010-04-09 21:29:56 - PHP Notice: Undefined index: stock_status_id in D:\www\antique\admin\controller\catalog\product.php on line 724
2010-04-09 21:29:56 - PHP Notice: Undefined index: price in D:\www\antique\admin\controller\catalog\product.php on line 732
2010-04-09 21:29:56 - PHP Notice: Undefined index: status in D:\www\antique\admin\controller\catalog\product.php on line 740
2010-04-09 21:29:56 - PHP Notice: Undefined index: tax_class_id in D:\www\antique\admin\controller\catalog\product.php on line 752
2010-04-09 21:29:56 - PHP Notice: Undefined index: weight in D:\www\antique\admin\controller\catalog\product.php on line 760
2010-04-09 21:29:56 - PHP Notice: Undefined index: weight_class_id in D:\www\antique\admin\controller\catalog\product.php on line 772
2010-04-09 21:29:56 - PHP Notice: Undefined index: length in D:\www\antique\admin\controller\catalog\product.php on line 780
2010-04-09 21:29:56 - PHP Notice: Undefined index: width in D:\www\antique\admin\controller\catalog\product.php on line 788
2010-04-09 21:29:56 - PHP Notice: Undefined index: height in D:\www\antique\admin\controller\catalog\product.php on line 796
2010-04-09 21:29:56 - PHP Notice: Undefined index: measurement_class_id in D:\www\antique\admin\controller\catalog\product.php on line 808
Last edited by padred123 on Fri May 07, 2010 7:11 am, edited 5 times in total.
After a lil research it looks the problem is with admin/model/catalog/products.php because i dont get the same issues when I replace that file with the original backed up file. Although I cant sort by category when its switched.
Ok.. I haven't fixed the problem but know what it is. It will only delete/edit products that have a category attached to them. So as long as all your products are in a category you won't notice anything wrong. Now, if you enter a product without a category and want to edit or delete it you'll have to put it in a category manually with phpMyAdmin.
The easiest way of doing it is once your in phpMyAdmin goto the product description table and click the search tab.
Under the name field change the operator form LIKE to LIKE%...%.
Then type the name of your product and click go.
Now once you found your product id number goto the products_to_category table.
Look for any category number in the category_id field to add your product to.
Then, click the insert tab at the top.
Enter the category id you picked from the last step and the product id of your product, then click go.
That should do it! Look for your product in the admin section and edit/delete it.
The easiest way of doing it is once your in phpMyAdmin goto the product description table and click the search tab.
Under the name field change the operator form LIKE to LIKE%...%.
Then type the name of your product and click go.
Now once you found your product id number goto the products_to_category table.
Look for any category number in the category_id field to add your product to.
Then, click the insert tab at the top.
Enter the category id you picked from the last step and the product id of your product, then click go.
That should do it! Look for your product in the admin section and edit/delete it.
Thank you very much for your issue !! I did not know, that there could be a problem like this... Now I tried to edit product without category and it really writes the same warnings like you wrote... I will try to sort out this problem without using mysql...
There is one more problem with this module.. If you edit some product and you want to be in more categories.. So you check for example 3 more categories, to be in it. BUT then, if you are looking to the product list (in admin, of course), the product appeares there for 3 times!! It is annoying.. I cannot fixed that.. Does anyone have the same problem???
There is one more problem with this module.. If you edit some product and you want to be in more categories.. So you check for example 3 more categories, to be in it. BUT then, if you are looking to the product list (in admin, of course), the product appeares there for 3 times!! It is annoying.. I cannot fixed that.. Does anyone have the same problem???
______________________________________________________
http://www.vojtechzahorsky.com
Thank you very much.. Just a question, what does "only that fixes the multiple category issue" mean..?
______________________________________________________
http://www.vojtechzahorsky.com
The zip file is not possible to unarchive, can you please add a right one..?? Thank you very much..Heres an updated version of the module for OC Ver. 1.4 only that fixes the multiple category issue.
______________________________________________________
http://www.vojtechzahorsky.com
Sorry It took me so long... been busy but try this one. The "multiple category fix" fixes the products that are in more than one category so that they aren't listed multiple times like you mentioned. Oh ya remember to back your stuff up before replacing the files, just in case.
Attachments
For Ver. 1.4 ONLY!
This is the work around... I haven't bothered to try and fix it because all of my products are in categories anyways but if someone finds the fix please let us know.padred123 wrote:Ok.. I haven't fixed the problem but know what it is. It will only delete/edit products that have a category attached to them. So as long as all your products are in a category you won't notice anything wrong. Now, if you enter a product without a category and want to edit or delete it you'll have to put it in a category manually with phpMyAdmin.
The easiest way of doing it is once your in phpMyAdmin goto the product description table and click the search tab.
Under the name field change the operator form LIKE to LIKE%...%.
Then type the name of your product and click go.
Now once you found your product id number goto the products_to_category table.
Look for any category number in the category_id field to add your product to.
Then, click the insert tab at the top.
Enter the category id you picked from the last step and the product id of your product, then click go.
That should do it! Look for your product in the admin section and edit/delete it.
Hi, Thanks for submitting this extension.
I've upgraded it for 1.4.8b version and fixed a couple of minor bugs and changed it to sort on category_description.name. Seems to be working all good for me now.
Nick.
I've upgraded it for 1.4.8b version and fixed a couple of minor bugs and changed it to sort on category_description.name. Seems to be working all good for me now.
Nick.
Big thanks to Nick/snarktrader for this extension update. This is going to be essential for me.
A small issue - it doesn't seem to work with the 'Copy' function. The product is copied, goes in the database, and appears in the shop. But it does not appear in admin, so cannot be edited. Anyone else find this?
A small issue - it doesn't seem to work with the 'Copy' function. The product is copied, goes in the database, and appears in the shop. But it does not appear in admin, so cannot be edited. Anyone else find this?
For those interested, the reason for the grouping in line 238
This should actually be
Code: Select all
$sql .= " GROUP BY pd.name" ;
Code: Select all
$sql .= " GROUP BY pd.product_id" ;
Code: Select all
Hi, this is not a real fix to the 'product without category' problem, but an error handling to remember to select at least one category. I'm not a programmer, but it works for me.
admin/controller/catalog/product.php
in: private function getForm() {
in: private function validateForm() {
admin/language/english/catalog/product.php
admin/view/template/catalog/product_form.tpl
admin/controller/catalog/product.php
in: private function getForm() {
Code: Select all
$this->data['error_model'] = $this->error['model'];
} else {
$this->data['error_model'] = '';
}
+//filter category start//
+ if (isset($this->error['category'])) {
+ $this->data['error_category'] = $this->error['category'];
+ } else {
+ $this->data['error_category'] = '';
+ }
+ //filter category stop//
if (isset($this->error['date_available'])) {
$this->data['error_date_available'] = $this->error['date_available'];
} else {
$this->data['error_date_available'] = '';
Code: Select all
if ((strlen(utf8_decode($this->request->post['model'])) < 1) || (strlen(utf8_decode($this->request->post['model'])) > 64)) {
$this->error['model'] = $this->language->get('error_model');
}
+//filter category start//
+ if (!isset($this->request->post['product_category'])) {
+ $this->error['category'][$language_id] = $this->language->get('error_category');
+ }
+//filter category stop//
if (!$this->error) {
return TRUE;
} else {
if (!isset($this->error['warning'])) {
Code: Select all
// Error
$_['error_permission'] = 'Warning: You do not have permission to modify products!';
$_['error_name'] = 'Product Name must be greater than 3 and less than 255 characters!';
$_['error_model'] = 'Product Model must be greater than 3 and less than 24 characters!';
+$_['error_category'] = 'You have to select at least one category!';
$_['error_required_data'] = 'Required Data has not been entered. Check for field errors!';
?>
Code: Select all
<tr>
- <td><?php echo $entry_category; ?></td>
+ <td><span class="required">*</span> <?php echo $entry_category; ?></td>
<td><div class="scrollbox">
<?php $class = 'odd'; ?>
<?php foreach ($categories as $category) { ?>
<?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
<div class="<?php echo $class; ?>">
<?php if (in_array($category['category_id'], $product_category)) { ?>
<input type="checkbox" name="product_category[]" value="<?php echo $category['category_id']; ?>" checked="checked" />
<?php echo $category['name']; ?>
<?php } else { ?>
<input type="checkbox" name="product_category[]" value="<?php echo $category['category_id']; ?>" />
<?php echo $category['name']; ?>
<?php } ?>
</div>
<?php } ?>
- </div></td>
+ </div>
+ <?php if (isset($error_category[$language['language_id']])) { ?>
+ <span class="error"><?php echo $error_category[$language['language_id']]; ?></span>
+ <?php } ?></td>
+ </td>
</tr>
<tr>
Hi, thanks for the module... works great!
I noticed a minor bug and was wondering how i should go about fixing it.
After you filter by a category, the number of pages showing does update.
For example if I have a total of 73 products (4 pages in total if I show 20 items per page) and I have 20 products in category A. And if I filter by category A, the number of pages shown in still 4 pages. Message on bottom left -> "showing 1-20 of 73 (4 pages)". But when you click on page 2, 3 or 4 it will show "no products"
Thanks.
I noticed a minor bug and was wondering how i should go about fixing it.
After you filter by a category, the number of pages showing does update.
For example if I have a total of 73 products (4 pages in total if I show 20 items per page) and I have 20 products in category A. And if I filter by category A, the number of pages shown in still 4 pages. Message on bottom left -> "showing 1-20 of 73 (4 pages)". But when you click on page 2, 3 or 4 it will show "no products"
Thanks.
I've installed the 1.4.8b version, but now the Global Mega Options Module doesn't work anymore.
I am unable to use the Attribute options.
UPDATE:
Now I get the following error:
Error: Unknown column 'p2c.category_id' in 'where clause'
Error No: 1054
SELECT * FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '2' AND p2c.category_id = '38' GROUP BY pd.product_id ORDER BY pd.name ASC LIMIT 0,20
I am unable to use the Attribute options.
UPDATE:
Now I get the following error:
Error: Unknown column 'p2c.category_id' in 'where clause'
Error No: 1054
SELECT * FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '2' AND p2c.category_id = '38' GROUP BY pd.product_id ORDER BY pd.name ASC LIMIT 0,20
Last edited by Boekel on Tue Sep 28, 2010 6:05 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 45 guests