Page 1 of 1

Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Wed Apr 14, 2010 1:49 am
by crazymaster
I am not 100% sure that it is working, but if somebody want - can try it.
http://www.mediafire.com/?iyydxe1cyhq
If everything is OK i will upload it in the Extensions category.

I am getting this error when i select category and click 'filter':

Code: Select all

Error: Unknown column 'p2c.category_id' in 'where clause'
Error No: 1054
SELECT COUNT(*) AS total FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) WHERE pd.language_id = '1' AND p2c.category_id ='62'
but i am not sure if the problem is from the plugin or from my opencart database, so somebody can test it and fix it if it have the same problem

if somebody test it - post the results here

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Wed Apr 14, 2010 10:13 pm
by crazymaster
nobody ?

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Fri Apr 16, 2010 10:07 pm
by i2Paq
You want me to install your Mod?

No time, sorry.

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Fri Apr 16, 2010 10:44 pm
by crazymaster
hehe, no, just to tell me what this error means, and if somebody tried this module to tell if it works :)

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Fri Apr 16, 2010 10:48 pm
by i2Paq
In one of the query's the p2c.category_id is not found.

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Sat Apr 17, 2010 6:47 am
by cmebd
i2Paq wrote:In one of the query's the p2c.category_id is not found.
Wow that was so helpful - even I could have figured that one out and I don't profess to be a programmer or know about dbases....

Please provide useful responses that help others who may not be as experienced (as you seem to think you are). Too much space is taken up on the forum with these inane counter productive responses.

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Sat Apr 17, 2010 9:49 pm
by i2Paq
cmebd wrote:
i2Paq wrote:In one of the query's the p2c.category_id is not found.
Wow that was so helpful - even I could have figured that one out and I don't profess to be a programmer or know about dbases....

Please provide useful responses that help others who may not be as experienced (as you seem to think you are). Too much space is taken up on the forum with these inane counter productive responses.
I'm sorry but where did I ever profess to be a programmer or said that I have extended knowledge about databases?

The question is;
crazymaster wrote:hehe, no, just to tell me what this error means, and if somebody tried this module to tell if it works :)
The answer is that what I'm given him, telling him that there is something wrong with his query. So, what is your point or problem?

To return the ball: why did you not came up with an answer instead of posting your troll?
"Too much space is taken up on the forum with these inane counter productive responses."

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Sat Apr 17, 2010 10:03 pm
by crazymaster
heheh, we don't need to argue here, we are here to use opencart and to upgrade it :)

i tried to fix this problem, but without success

i thought that the problem is that i copied my categories from the old database(1.4.6), but i deleted them and added them manually from the admin panel, but the problem is still there

if somebody fix the problem - post here, how that is done/i want to know where is my mistake/ :)

Edit:
also in my file the code for admin filter category is marked with //filter category start// and //filter category end// so it can be changed and used easy... if it is fixed :)

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Tue Apr 20, 2010 2:17 pm
by OSWorX
I would say it should be something like this (untested):

Code: Select all

$query = 'SELECT COUNT(*) AS total'
. ' FROM product AS p'
. ' LEFT JOIN product_description AS pd ON (p.product_id = pd.product_id)'
. ' LEFT JOIN product_to_category AS p2c ON (p.product_id = p2c.product_id)'
. ' WHERE pd.language_id = \'' . (int) $id1 . '\''
. ' AND p2c.category_id = \'' . (int) $id2 . '\''
;
p.s.: start building your queries how they should be, not that confused way they are now everywhere!
Use

1. AS (e.g. product_to_category AS p2c)
2. use a readable format (like above).

This would help everybody in reading these lines of code AND finding what is searched for in case of errors and/or adding additional lines.

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Sat May 01, 2010 4:36 pm
by pepiw
I`m totaly rebuild this contr. Now works fine in version 1.4.7

Download here:
http://www.opencart.com/index.php?route ... sion_id=37

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Tue Jul 06, 2010 4:34 pm
by selida
Hello, it doesn't work on the latest version 1.4.8b. Any updates?

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Sat Jul 10, 2010 9:01 am
by tommyla
selida wrote:Hello, it doesn't work on the latest version 1.4.8b. Any updates?
am looking for update to 1.4.8b to :choke:

Re: Admin Product Filter By Category[1.4.7 UPDATE]

Posted: Fri Feb 24, 2012 7:56 pm
by saif11
Here is two solution for 1.5.1 on more .

For selecting Multiple category at a time.

http://www.opencart.com/index.php?route ... on_id=2663

and
Single category filtering
http://www.opencart.com/index.php?route ... on_id=2663