Jump to content

[Bo] - Product Condition (Add/delete/rename) Prestashop 1.5+


pixel88

Recommended Posts

In the Prestashop v 1.5+ (I'm on 1.5.3.1) BO, when we insert a new product, there is the possibility to set the product condition. There are 3 condition: new, used, refurbished.

 

Can we add, delete or rename the conditions?

 

I found something about the ENUM value in the "ps_product" database table and in some file of the admin controllers and in product classes, but what is the right way?

Link to comment
Share on other sites

  • 1 month later...

I'm having the same problem: I'm trying to add a value to the product condition. I can use the 3 native values but I specifically need 4 (or more)

 

I out put the condition value on the product-listing.tpl (which works well with native conditions)

 

Added the new condition enum to the ps_product.conditions table

 'new, 'used', 'refurbished', 'upcycled

 

Added the new field value to the drop down options in:

information.tpl (adminfolder/themes/themename/template/controllers/products/information.tpl)<br />


<option value="upcycled" {if $product->condition == 'upcycled'}selected="selected"{/if} >{l

s='upcycled'}</option>

 

 

Added the new values to the array settings in:

line 285 classes/product.php

 

'condition' => array('type' => self::TYPE_STRING, 'shop' => true,

'validate' => 'isGenericName', 'values' => array('new, 'used', 'refurbished', 'upcycled'),

'default' => 'new'),

 

 

All works fine with no errors to speak of, shows correct in database, lets you select the option in BO, but with this new condition in place, it displays wrong in the front office. Always showing the condition as *new* (which is the default)

 

 

I must be missing another step somewhere, is there another file which uses this information?

I'm so close to solving this, Please help if you can. Just to point me to the mystery file

Thank you in advance

Edited by atwitz3nd (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...
  • 2 weeks later...
  • 1 year later...

Hi all, solution in PS 1.6.1.4

 

1. edit in db enum - table ps_product_shop & ps_product row condition

2. in ~/admin/themes/default/temlapte/controller/products/informations.tpl

3. in ~/themes/you_theme_name/product.tpl

4. in ~/classes/Product.php

5. in ~/modules/blocklayered/blocklayered.php

 

Done :)

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...

Hello to all...

If I want 3 Product Status Including: 'new, 'used', 'refurbished' , At home Page, On the products show ,What should I do?

For example, the Products that Condition they are "used", in home page The Condition of "used" have,What should I do?

Generally, In accordance Photo , for the Conformity Condition products With The situation shown in the product image , in home page What should I do?

please guide me.

Thanks.

 

17cp_dddd.jpg

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...