Search the Community
Showing results for tags 'Unknown column countries'.
-
Actually my requirement is to add one countries dropdown field for each product Is there anybody know how to code for adding one extra field in product adding/editing page and adding that field content to database when product is submitted. I have tried myself but i am getting the below error. [PrestaShopDatabaseException] Unknown column 'countries' in 'field list'INSERT INTO `ps_product_lang` (`id_product`, `meta_description`, `meta_keywords`, `meta_title`, `countries`, `link_rewrite`, `name`, `description`, `description_short`, `available_now`, `available_later`, `id_lang`, `id_shop`) VALUES ('10', '', '', '', 'In', 'ipod-nano123', 'iPod Nano123', 'dadadasda', 'asdasda', '', '', '1', '1') at line 605 in file classes/db/Db.php I have the "countries" field in ps_product_lang but still it is saying that unknown column. I have added one extra field at admin products adding/editing page and i am trying to update that in Product.php in classes. /** @var enum Product countries */ public $countries; 'countries' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), Here countries is a dropdown selections for selecting list of countries.. <table> <td class="col-left"><label>Countries</label></td> <td> <select name="countries" id="countries" size="2" multiple="multiple"> <option value="All">All</option> <option value="In">India</option> <option value="US">United States</option> <option value="UK">United Kingdom</option> </select> </td> </table> In seo.tpl page. Is the way i am coded correct please let me know Please see the below link. http://www.prestasho...%E2%84%A2-1531/ Please help me. Thanks Inadvance..
-
Actually my requirement is to add one countries field for each product and i have sent you the code for which i have used for extra field, I am using Prestashop 1.5.3.1 version. Do you know how to code for adding one extra field in product adding/editing page and adding that field content to database when product is submitted. I have tried myself but i am getting the below error. [PrestaShopDatabaseException] Unknown column 'countries' in 'field list'INSERT INTO `ps_product_lang` (`id_product`, `meta_description`, `meta_keywords`, `meta_title`, `countries`, `link_rewrite`, `name`, `description`, `description_short`, `available_now`, `available_later`, `id_lang`, `id_shop`) VALUES ('10', '', '', '', 'In', 'ipod-nano123', 'iPod Nano123', 'dadadasda', 'asdasda', '', '', '1', '1') at line 605 in file classes/db/Db.php I have the "countries" field in ps_product_lang but still it is saying that unknown column. I have added one extra field at admin products adding/editing page and i am trying to update that in Product.php in classes. /** @var enum Product countries */ public $countries; 'countries' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isString'), Here countries is a dropdown selections for selecting list of countries.. <table> <td class="col-left"><label>Countries</label></td> <td> <select name="countries" id="countries" size="2" multiple="multiple"> <option value="All">All</option> <option value="In">India</option> <option value="US">United States</option> <option value="UK">United Kingdom</option> </select> </td> </table> In seo.tpl page. Is the way i am coded correct please let me know Please see the below link. http://www.prestashop.com/forums/topic/218266-cant-add-a-new-product-in-prestashop%E2%84%A2-1531/ Please help me. Thanks Inadvance..