Ayyoub EL MERZOUGUI
Ayyoub EL MERZOUGUI

Reputation: 63

Override prestashop admin TPL

i'am trying to override Cart Rule by adding a new field (number of codes). I created a new class CartRule in /override/classes and I have added this line to definition array

'nb_codes' =>    array('type' => self::TYPE_INT, 'validate' => 'isInt'),

and that work fine. I have one issue that i cannot visualize this field in the informations.tpl even if i override this view in /override/controllers/admin/templates/cart_rules

Upvotes: 1

Views: 397

Answers (1)

PrestaAlba
PrestaAlba

Reputation: 689

You need to set nb_codes as class var:

public $nb_codes;

Good luck

Upvotes: 1

Related Questions