Jump to content

How to Add: Product Conditions in prestashop 1.7


Nico G.
 Share

Recommended Posts

Hello,

 

 

i décide to update my Prestashop 1.6 to 1.7 and i need to add Product Conditions in prestashop

 

I work with MarketPlaces WebServices/FTPExchange and i need more than: New, Used, & Refurbished.

 

 

 

 

 

 

I have already modified MySQL Database productshop/product

 

i have already modified Product.php

 

But in V1.7.x.x :        i'm unable to find information.tpl   !!!

 

Please, anyone can 'help me' to find how to add new Conditions with backoffice compatibility ?

 

 

 

 

 

 

i try to search inside files all therms $Condition or Refurbished

But, when i change anything in a /SRC (directory files) i creat a http 500 error when i going in one product

 

No others files was finded.

 

 

 

where can i find the equivalence of file:     information.tpl      please ? 

 

they are no: admin/themes/default/template/controllers /products

 

 

Very big thks :)

 

 

 

Share this post


Link to post
Share on other sites

 

they are no: admin/themes/default/template/controllers /products

Hello. Prestashop 1.7 is partially using twig template instead of smarty for admin.

What you're looking for is

prestashop_files/src/PrestaShopBundle/Resources/views/Admin/Product/catalog.html.twig

See other .twig files in the folder

Share this post


Link to post
Share on other sites

Maybe... yes, but what information did you think was the right one ?

 

I have not your knowledge to know what i need to find in this file.

 

 

because in the       \src\PrestaShopBundle\Form\Admin\Product\ProductOptions.php

 

(that create a 500 http error if i modify anything) but, i can clearly read:

        ->add('condition', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array(
            'choices'  => array(
                 $this->translator->trans('New', [], 'Shop.Theme.Catalog') => 'new',
                 $this->translator->trans('Used', [], 'Shop.Theme.Catalog') => 'used',
                 $this->translator->trans('Refurbished', [], 'Shop.Theme.Catalog') => 'refurbished'

is a translation file and in top we can watch:

use PrestaShopBundle\Form\Admin\Type\CommonAbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Form\Extension\Core\Type as FormType;

 

Resources/views/Admin/Product/catalog.html.twig

See other .twig files in the folder

 

please, don't tell me it's just the name of the directory that made you "give me that answer" !?
 

Edited by Nico G. (see edit history)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More