Post by jontycasson » Sat Apr 14, 2012 3:56 pm

Notice: Error: Table 'vidalca1_opencart.return_product' doesn't exist
Error No: 1146
INSERT INTO return_product SET return_id = '6', name = 'test', model = 'test', quantity = '1', return_reason_id = '2', opened = '1', comment = 'test' in /home/vidalca1/public_html/system/database/mysql.php on line 49
Thats my error - any ideas?

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by Avvici » Sun Apr 15, 2012 8:23 am

Although PHP errors can be ambiguous at times...this means exactly what it says:
Notice: Error: Table 'vidalca1_opencart.return_product' doesn't exist.
Open up your database in PHP my admin. Open up your Model file that has the return query and COMPARE.
admin/model/sale/return.php

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by jontycasson » Sun Apr 15, 2012 6:09 pm

ok thanks for your reply.

I have looked at the PHP my admin and can see the returns in there.

I am unsure how and what im supposed to compare?

Image
Vidal Cassoon - Hair and Beauty Specialists


New member

Posts

Joined
Wed Apr 13, 2011 2:01 am
Location - Cheshire

Post by Avvici » Mon Apr 16, 2012 6:37 am

What is the name of your return table?

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by madelharri » Thu Jun 21, 2012 4:53 pm

Hi
I have a problem with the admin function for returns. The return form on the site is working fine but when I try to view returns in the admin panel I get an error as follows:
Notice: Error: Table 'mosaicsa_1.return_product' doesn't exist
Error No: 1146
SELECT *, CONCAT(r.firstname, ' ', r.lastname) AS customer, (SELECT SUM(rp.quantity) FROM return_product rp WHERE rp.return_id = r.return_id GROUP BY rp.return_id) AS quantity, (SELECT rs.name FROM return_status rs WHERE rs.return_status_id = r.return_status_id AND rs.language_id = '1') AS status FROM `return`r ORDER BY r.return_id DESC LIMIT 0,20 in /home/mosaicsa/public_html/system/database/mysql.php on line 49
I've checked and my return table is called "return" not "return_product". I've tried renaming the DB_PREFIX in the file admin/model/sale/return.php, but it just throws another error and this is the message that I get
Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'return rp WHERE rp.return_id = r.return_id GROUP BY rp.return_id) AS quantity, (' at line 1
Error No: 1064
SELECT *, CONCAT(r.firstname, ' ', r.lastname) AS customer, (SELECT SUM(rp.quantity) FROM return rp WHERE rp.return_id = r.return_id GROUP BY rp.return_id) AS quantity, (SELECT rs.name FROM return_status rs WHERE rs.return_status_id = r.return_status_id AND rs.language_id = '1') AS status FROM `return`r ORDER BY r.return_id DESC LIMIT 0,20 in /home/xxxx/public_html/system/database/mysql.php on line 49.
I'm using 1.5.2.1.
I'm a MySQL and PHP novice. Could anyone help please?
Thanks

New member

Posts

Joined
Sat Mar 17, 2012 5:54 pm

Post by Avvici » Thu Jun 21, 2012 8:07 pm

Well, the table doesn't exist lol. Not to sound funny or trite. Did you update recently? return_product is not in the most recent version(s) of open cart. Perhaps you updated and did not run the SQL properly ;)

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by madelharri » Thu Jun 21, 2012 8:26 pm

Thanks for the reply. The problem was that not all of the files loaded properly when I updated, so the old 1.5.1.3.1 return.php file was pointing to a return_products table instead of the currently used return table. I've uploaded the new files and it is all working fine.

New member

Posts

Joined
Sat Mar 17, 2012 5:54 pm

Post by milky » Fri Jul 13, 2012 7:50 am

Hello,

I have suddenly the same problem madelharri encountered. Returns was working fine since the last time I checked. This evening I clicked on it, ended up with that error. Can anyone tell me where this table is supposed to be and which folder I can source it from?

Thank you

New member

Posts

Joined
Sat Jan 21, 2012 2:04 am

Post by madelharri » Fri Jul 13, 2012 3:18 pm

catalog/controller/account/return.php
The table is in the mySQL database.

New member

Posts

Joined
Sat Mar 17, 2012 5:54 pm

Post by milky » Fri Jul 13, 2012 11:43 pm

Thanks madelharri , but I'm lost. Am I supposed to replace a missing file? the catalog/controller/account/return.php file is there.

thanks

New member

Posts

Joined
Sat Jan 21, 2012 2:04 am

Post by madelharri » Fri Jul 13, 2012 11:51 pm

Just check which database table it is pointing to and whether that table exists in your database. That was my problem. I'd updated and the name of the database table had been changed with the update, but not all of the files had actually been uploaded so the old files were still there and pointing to the now non existent database table.
All I did was upload the new files and the problem was solved.

New member

Posts

Joined
Sat Mar 17, 2012 5:54 pm

Post by evaH » Tue Oct 16, 2012 1:41 am

Hi
I have got the same problem with "Returns" in our version 1.5.1.3.

When sending a return message or opening return in administration:
Notice: Error: Table 'xxxxxx-xxxxxxx.return_product' doesn't exist
Error No: 1146 etc.
Looking at MySQL there is no return_product field and there is no return_product field in system backup either.
What to do?
I thought I could solve it with your reply above, but we could not.

New member

Posts

Joined
Fri Feb 24, 2012 1:46 am
Who is online

Users browsing this forum: Bing [Bot] and 49 guests