Jump to content

Can't add a new product in PrestaShop™ 1.5.3.1


Recommended Posts

I just got startet on PS. I can't add products as a blank page shows up when I click add new.

 

Here is the screen shot:

 

https://www.dropbox.com/s/1ofoeqrtyi5dyb5/Prestashop%20New%20Product%20Error.JPG

 

Other users have the same problem with me:

 

http://www.prestashop.com/forums/topic/193820-i-cant-add-new-product/

 

http://forge.prestashop.com/browse/PSCFV-5687?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel#issue-tabs

 

http://forge.prestashop.com/browse/PSCFV-6010

 

http://forge.prestashop.com/browse/PSCFV-6612

 

Where can I find the solution?

 

Best Regards

Nay Thiha

Link to comment
Share on other sites

whenever you get a blank page, then there was an error.

 

to discover the true error you need to turn on error reporting or look at your webhosting error log

 

you can turn on prestashop error so that you can see them on the screen

 

config/defines.inc.php

find

define('_PS_MODE_DEV_', false);

change to:

define('_PS_MODE_DEV_', true);

 

reproduce the problem, then you should see the error message

Link to comment
Share on other sites

[PrestaShopDatabaseException]

 

Unknown column 'redirect_type' in 'field list'INSERT INTO `ps_product` (`id_shop_default`, `id_manufacturer`, `id_supplier`, `reference`, `supplier_reference`, `location`, `width`, `height`, `depth`, `weight`, `quantity_discount`, `ean13`, `upc`, `cache_is_pack`, `cache_has_attachments`, `is_virtual`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `customizable`, `text_fields`, `uploadable_files`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_default_attribute`, `advanced_stock_management`, `date_add`, `date_upd`) VALUES ('1', '0', '0', '', '', '', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '2', '0', '0', '0', '0', '1', '0', '0', '', '0', '0', '0', '0', '0', '1', '404', '0', '1', '0000-00-00', 'new', '1', '0', 'both', '0', '0', '2013-01-22 16:48:18', '2013-01-22 16:48:18')

at line 605 in file classes/db/Db.php

 

599. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

600. }

601. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

602. {

603. if ($sql)

604. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

605. throw new PrestaShopDatabaseException($this->getMsgError());

606. }

607. }

608.

609. /**

 

Is the problem wen i try to add a product....

Link to comment
Share on other sites

I'm okay with my problem cz I've just uninstall and reinstall the prestashop 1.5. I'm lucky that I'm just on trial for my new online store. But I'm thinking to use Volusion cz it has 24/7 support. If I've added many products a lot and if the problem reoccur I will be dead. I'm not a technician. So I don't know about the terms of web developing.

Link to comment
Share on other sites

  • 2 months later...

Hi Elpatron,

 

Actually i am having the same problem like same 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.

Please help me

Thanks Inadvance..

Edited by kiran4prestashop (see edit history)
Link to comment
Share on other sites

Hi Elpatron,

 

Actually i am having the same problem like same 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.

Please help me

Thanks Inadvance..

 

what version of ps?

Link to comment
Share on other sites

I have added one field at admin products adding 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

 

Don't know but i found this version in prestashop official site only.

 

http://www.prestashop.com/

Link to comment
Share on other sites

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 fiel, i think there is no relation between versions. And the version which i am using is downloaded from the prestashop official portal only and it is using by many people.

 

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.

Link to comment
Share on other sites

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 fiel, i think there is no relation between versions. And the version which i am using is downloaded from the prestashop official portal only and it is using by many people.

 

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.

 

it's pretty simple

 

back office-->catalog-->products

 

edit a product

 

click customization

 

here you can add a text field, required/not-required

 

play with that and see if it meets your requirements...

 

do not modify the ps unless you have no other choice, otherwise you will have problems later upgrading to get new ps features

Link to comment
Share on other sites

×
×
  • Create New...