Jump to content

Customization Prestashop 1.7


modo24_wam

Recommended Posts

Hey , I need help with customization functions.

I wanted to convert to a function to retrieve data from me with a different table and generated the final symbol.
I have already created a template to help the .tpl file but unfortunately I can't find the php file. I found only the file in class, but not bad after the midification of this file nothing happens. Are there any other files, or maybe something needs to be cleared for my modifications to work?

Link to comment
Share on other sites

Example :
When I delete this function.She is on and request is added to databases.

    public function setWsCustomizedDataTextFields($values)
    {
        $cart = new Cart($this->id_cart);
        if (!Validate::isLoadedObject($cart)) {
            WebserviceRequest::getInstance()->setError(500, $this->trans('Could not load cart id=%s', array($this->id_cart), 'Admin.Notifications.Error'), 137);

            return false;
        }
        Db::getInstance()->execute('
        DELETE FROM `' . _DB_PREFIX_ . 'customized_data`
        WHERE id_customization = ' . (int) $this->id . '
        AND type = 1');
        foreach ($values as $value) {
            $query = 'INSERT INTO `' . _DB_PREFIX_ . 'customized_data` (`id_customization`, `type`, `index`, `value`)
                VALUES (' . (int) $this->id . ', 1, ' . (int) $value['id_customization_field'] . ', \'' . pSQL($value['value']) . '\')';

            if (!Db::getInstance()->execute($query)) {
                return false;
            }
        }

        return true;
    }

Link to comment
Share on other sites

So yes, I am trying to rewrite the customization.php file in the class folder. For example, I want to add that the INSERT query adds one more value to the column I created, but unfortunately when I make changes or delete all functions it performs as it was originally. This is one of my changes that I want to make.

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...