Post by giangel84 » Tue Feb 24, 2009 12:34 am

Hi.

I'm use 1.1.8 version of open cart and i'm testing it in local mode with xampp installed on my computer.

I've created the italian language by copying the original english file and modify its.
All right, but now i've a problem with stock status.

When i add a new product i can select the stock_status, created in my language.
But In the shop the stock_status for the product is always write "In stock".

Then i think that problem are the stock_status added in my language and i try delete some by the control panel.
Unfortunately, when i try delete any stock status i received this error from my browser:

Fatal error: Call to undefined method ModelCatalogProduct::getTotalByStockStatusId() in C:\xampp\htdocs\admin\controller\localisation\stock_status.php on line 346

Then i can add stock_status but nothing deleted.
Can i resolve it?

Thank you very much for the support...

Newbie

Posts

Joined
Sat Feb 21, 2009 11:00 am

Post by Daniel » Tue Feb 24, 2009 1:29 am

I will release another version with this fix in.

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by giangel84 » Tue Feb 24, 2009 3:15 am

ok, isn't there any temporary solution for this problem?

Or do you know the cause of this?
sorry for my question, but i very trust in this cms, and i don't want change way.... ;)

Newbie

Posts

Joined
Sat Feb 21, 2009 11:00 am

Post by giangel84 » Tue Feb 24, 2009 6:23 am

Ok Daniel...
I don't understand any of PHP language...
But I've fixed this simply error! ;D

The error was only on the writting function validateDelete of admin\controller\localisation\stock_status.php who call an product.php function ;) :

then to fix this error, change "getTotalByStockStatusId" to "getTotalProductsByStockStatusId"

Also the error_name is incorrect.

to fix this you need to correct in the same file, "get('error_stock')" to "get('error_product')".

or change on the ralative language file, "$_['error_product']" to "$_['error_stock']" ;)

bye! ;)

Newbie

Posts

Joined
Sat Feb 21, 2009 11:00 am

Post by Daniel » Tue Feb 24, 2009 7:08 am

getTotalByStockStatusId should be getTotalProductsByStockStatusId

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by giangel84 » Tue Feb 24, 2009 7:26 am

There is another error that I found and corrected:

in the shop, the product display page is not showing the correct stock_status (availability).

There is always the words "In Stock"...

in order to fix this, you must open "catalog\controller\product\product.php" and change the code

Code: Select all

$this->data['stock'] = ($product_info['quantity'] > 0)?  
to

Code: Select all

$this->data['stock'] = ($product_info['stock'] > 0)? 
;)

Newbie

Posts

Joined
Sat Feb 21, 2009 11:00 am
Who is online

Users browsing this forum: Amazon [Bot] and 76 guests