Post by dashik » Mon Nov 16, 2009 2:27 am

I don't need the weight field as it is for this particular site and I would like to use this field for something else.

I have already gone into the database and changed the row type from decimal to varchar but opencart still won't update this field correctly.

If I try submitting the field comes back with just "0". But I can manually update the database with no problems so it has to be something somewhere in the OC structure that is not allowing non-numerical characters into the database query.

Anyone know where? Many thanks :)

New member

Posts

Joined
Fri Jul 31, 2009 8:10 pm

Post by moggiex » Mon Nov 16, 2009 3:48 am

dashik wrote:I don't need the weight field as it is for this particular site and I would like to use this field for something else.

I have already gone into the database and changed the row type from decimal to varchar but opencart still won't update this field correctly.

If I try submitting the field comes back with just "0". But I can manually update the database with no problems so it has to be something somewhere in the OC structure that is not allowing non-numerical characters into the database query.

Anyone know where? Many thanks :)
Yea, I saw a weight checking class some where, pretty sure it was in the product.php model. I was after a similar spare field, but opted for the SKU and MODEL instead of weight

Matt

Code: Select all

It was like that when I found it, honest!


User avatar
Active Member

Posts

Joined
Mon Nov 09, 2009 9:55 pm

Post by dashik » Mon Nov 16, 2009 4:53 am

I've already used the model field but I don't have a "SKU" field in the data tab of my product form.

I'm running 1.3.0 -- was that added afterwards?

New member

Posts

Joined
Fri Jul 31, 2009 8:10 pm

Post by dashik » Mon Nov 16, 2009 5:13 am

Nevermind -- figured it out ;D

Just had to change a few things in admin/model/catalog/product.php

FROM:

Code: Select all

(float)@$data['weight']
TO:

Code: Select all

$this->db->escape(@$data['weight'])
In both the addproduct and editproduct functions.

New member

Posts

Joined
Fri Jul 31, 2009 8:10 pm
Who is online

Users browsing this forum: No registered users and 54 guests