Jump to content

powerwave

Members
  • Posts

    4
  • Joined

  • Last visited

About powerwave

  • Birthday 11/13/1987

Profile Information

  • Activity
    Freelancer

powerwave's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, i need some help please about adding a field in customers BO table. the field or the column must be named "points" and his value is the number of points that the customer got in module loyalty. what i did: in the class customer.php i added a field named points and a function: public $points; public function pointOfCustumer($id_customer){ return Customer::getPoint($id_customer); } public static function getPoint($id_customer) { $sql='SELECT SUM(points) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_customer`='.$id_customer.' AND `id_loyalty_state`=2'; return (int)Db::getInstance()->getValue($sql); } if the file AdminCustomersController.php on the constructor, i added 'points' => array( 'title' => $this->l('Points'), 'width' => 'auto' ), i have to use somewhere maybe something like: 'totalPoints' => $this->context->customer->pointOfCustumer($this->context->customer->id), and give the value to 'Points' in the constructor yes, i'm a beginner and sorry for my bad english :s thank's for reading this, and if you have any idea, SOS
  2. Bonjour, Je rencontre un petit soucis, et je sollicite votre aide SVP. je voudrai ajouter une colonne au niveau tableau des clients en backoffice, comportant le resultat de la requête suivante: SELECT SUM(points) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_customer`='.$id_customer.' AND `id_loyalty_state`=2 en gros, sa me ramène le nombre de points de fidélité du client. je sais bien qu'il faut apporter la modification au niveau du fichier AdminCustomersController.php mais j'y arrive pas. j'ajoute le code suivant dans le constructeur: 'points' => array( 'title' => $this->l(Points'), 'width' => 'auto' ainsi qu'un champs points au niveau de la classe customers.php, mais comment lui affecté le résultat de la requête en haut? merci d'avance pour votre aide
  3. Bonjour la communauté, je suis un nouveau utilisateur de prestashop, et je rencontre un petit probléme, j'ai ajouté des fichiers pdf de description aux produits de la boutique, sa marche sans soucis, par contre je souhaite qu'ils soient téléchargable que par les gens authentifiés. Je n'ai rien trouvé dans les options et je sais absolument pas sur quel fichier intervenir, votre aide sera la bienvenue. Bien cordialement, Powerwave
×
×
  • Create New...