woodnook Posted July 23, 2022 Share Posted July 23, 2022 I'm trying to migrate from prestashop 1.6 to 1.7 One of the differences is that the product condition is not displayed on the product page by default to customers. For some reason the tick box on the options tab for the display of the product condition in the back office is not ticked by default. How do I change the default to display the product condition? I know I could make mass changes to products in the database, but that's not a sensible or sustainable approach in the long term. Am I missing something in the configuration of prestashop 1.7? Link to comment Share on other sites More sharing options...
Ali Samie Posted July 23, 2022 Share Posted July 23, 2022 I think you should edit your theme file to show the condition. I could not find any related option in v1.7.7.8 BO Link to comment Share on other sites More sharing options...
woodnook Posted July 23, 2022 Author Share Posted July 23, 2022 (edited) 19 minutes ago, stifler97 said: I think you should edit your theme file to show the condition. I could not find any related option in v1.7.7.8 BO I'm using multi-store with different FO themes for each one. They both display the product condition when the option in enabled in the BO on each product. So I'm not sure that editing the theme is the right approach. Maybe its something I can edit in the BO theme. Edited July 23, 2022 by woodnook (see edit history) Link to comment Share on other sites More sharing options...
Ali Samie Posted July 23, 2022 Share Posted July 23, 2022 (edited) Seems already answered here: Edited July 23, 2022 by stifler97 (see edit history) Link to comment Share on other sites More sharing options...
woodnook Posted July 24, 2022 Author Share Posted July 24, 2022 Thank you for the suggestion but I have already seen that. It seems to refer to the import process to upload products from a CSV file. I am looking to set the default when a product is created directly in Prestashop. There is probably similar code to the example in your suggestion in another part of the system but haven't found it as yet. Just seems strange to change the behaviour of Prestashop from 1.6 to 1.7 without giving you a way of reverting back. Link to comment Share on other sites More sharing options...
Ali Samie Posted July 24, 2022 Share Posted July 24, 2022 I found this in classess/Product.php /** @var bool Will the condition select should be visible for this product ? */ public $show_condition = false; You can simply override this and set it to be true by default. Link to comment Share on other sites More sharing options...
woodnook Posted July 25, 2022 Author Share Posted July 25, 2022 Thank you for this. Works a treat.😀 I've got it to work by creating an override for the core classes/Product.php file in the overrides/classes folder. Link to comment Share on other sites More sharing options...
Ali Samie Posted July 25, 2022 Share Posted July 25, 2022 You have done it in the standard way. Thats right. Enjoy.😉💚 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