ichibiri Posted January 21, 2011 Share Posted January 21, 2011 Hi, i'm creating a new field in my products.Theory is simple:1. Create a field 'measure' in ps_product table2. We need to let it now to "product class" classes/product.php 2.1 - Line 150 aprox. /*** @var string Measurement Unit (optional)*/ public $measure; 2.2 - Line 163 aprox. added this to fielsize" , 'measure' => 32 " 2.3 - Line 190 aprox. ", 'measure' => 'IsGenericName' " 2.4 - Line 261 aprox. added to getters "$fields['measure'] = pSQL($this->measure);"3. In admin/tabs/AdminProducts.php around line 1565, I insert just an imput like this: '.$this->l('Selling unit:').' <input type="text" size="33" name="measure" value="'.htmlentities($this->getFieldValue($obj, 'measure'), ENT_COMPAT, 'UTF-8').'" /> * ('.$this->l('Whenever differs, like m2 or whatever').')And all is working (database is getting updated in it´s correct field) except for I get an error message when updating a product wich says: 1 error 1. an error occurred while updating object product (Unknown column 'measure' in 'field list')Sorry??? What am I missing? Where is that error?Thanks in advance. Link to comment Share on other sites More sharing options...
presta-dyr Posted January 22, 2011 Share Posted January 22, 2011 Is it necessary to add a field to the product table? Couldn't you just add it as a feature?/Kjeld Link to comment Share on other sites More sharing options...
svenne duva Posted January 22, 2011 Share Posted January 22, 2011 Prestashop would been far more flexible if you could create field like in feature but in any tab. That would make Prestashop unique and top of the line. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now