Jump to content

mckaygerhard

Members
  • Posts

    24
  • Joined

  • Last visited

  • Days Won

    1

mckaygerhard last won the day on October 23 2020

mckaygerhard had the most liked content!

Profile Information

  • First Name
    PICCORO
  • Last Name
    Lenz McKAY

Recent Profile Visitors

560 profile views

mckaygerhard's Achievements

Newbie

Newbie (1/14)

4

Reputation

2

Community Answers

  1. si se contestara como codificar o generar un pdf serviria la respuesta, pero ahora veo porque magento es mejor que prestashop, esto es una miercole, los foros en vez de ayudarse entre los nuevosy los que saben, es otra tienda mas.. aun nadie sabe como modificar o hacer un facturero especifico para un modulo o modificar la factura?
  2. eso es interesante, yo quiero simpelnten imprimir lo que esta en pantalla, como hago eso? o sino como genero un pdf, como impelento una impresion pdf?
  3. hi, i have a job, a job that not paid enough, live in Venezuelan, hard to live, food its hard to found.. but none of these are excuses! ok, take atention!
  4. i found the solution, due in this "forum comunity" there's no "comunity" only "forum sales" THE COMPLETE CODE AND ALL THE STEPS ARE AT: https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/z8vfPsvFFjk here i put only the most important parts.. as mentioned int he previous link, added a new fiel in the model definition, class and the table sql this method permits to stored in the db as "1,2,3" so you can use only a single field to relation that multiple selected values, a better could be using groupbox but its quite difficult, take a look to the AdminCustomers controller class in the controllers directory of the prestachop, this has a multiselect group that used a realtional table event stored in single field then in the helper form list array of inputs define a select as: array( 'type' => 'select', 'label' => $this->l('Select and employee'), 'name' => 'id_employee_tech', 'required' => false, 'col' => '6', 'default_value' => (int)Tools::getValue('id_employee_tech'), 'options' => array( 'query' => Employee::getEmployees(true), // el true es que solo los que estan activos 'id' => 'id_employee', 'name' => 'firstname', 'default' => array( 'value' => '', 'label' => $this->l('ninguno') ) ) ), an then override the post process too public function postProcess() { if (Tools::isSubmit('submitTallerOrden')) { $_POST['id_employee'] = implode(',', Tools::getValue('id_employee')); } parent::postProcess(); } this make stored in the db as "1,2,3"
  5. i found the solution, due in this "forum comunity" there's no "comunity" only "forum sales" THE COMPLETE CODE AND ALL THE STEPS ARE AT: https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/z8vfPsvFFjk here i put only the most important parts.. as mentioned int he previous link, added a new fiel in the model definition, class and the table sql this method permits to stored in the db as "1,2,3" so you can use only a single field to relation that multiple selected values, a better could be using groupbox but its quite difficult, take a look to the AdminCustomers controller class in the controllers directory of the prestachop, this has a multiselect group that used a realtional table event stored in single field then in the helper form list array of inputs define a select as: array( 'type' => 'select', 'label' => $this->l('Select and employee'), 'name' => 'id_employee_tech', 'required' => false, 'col' => '6', 'default_value' => (int)Tools::getValue('id_employee_tech'), 'options' => array( 'query' => Employee::getEmployees(true), // el true es que solo los que estan activos 'id' => 'id_employee', 'name' => 'firstname', 'default' => array( 'value' => '', 'label' => $this->l('ninguno') ) ) ), an then override the post process too public function postProcess() { if (Tools::isSubmit('submitTallerOrden')) { $_POST['id_employee'] = implode(',', Tools::getValue('id_employee')); } parent::postProcess(); } this make stored in the db as "1,2,3"
  6. i found the solution, due in this "forum comunity" there's no "comunity" only "forum sales" THE COMPLETE CODE AND ALL THE STEPS ARE AT: https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/z8vfPsvFFjk here i put only the most important parts.. as mentioned int he previous link, added a new fiel in the model definition, class and the table sql this method permits to stored in the db as "1,2,3" so you can use only a single field to relation that multiple selected values, a better could be using groupbox but its quite difficult, take a look to the AdminCustomers controller class in the controllers directory of the prestachop, this has a multiselect group that used a realtional table event stored in single field then in the helper form list array of inputs define a select as: array( 'type' => 'select', 'label' => $this->l('Select and employee'), 'name' => 'id_employee_tech', 'required' => false, 'col' => '6', 'default_value' => (int)Tools::getValue('id_employee_tech'), 'options' => array( 'query' => Employee::getEmployees(true), // el true es que solo los que estan activos 'id' => 'id_employee', 'name' => 'firstname', 'default' => array( 'value' => '', 'label' => $this->l('ninguno') ) ) ), an then override the post process too public function postProcess() { if (Tools::isSubmit('submitTallerOrden')) { $_POST['id_employee'] = implode(',', Tools::getValue('id_employee')); } parent::postProcess(); } this make stored in the db as "1,2,3"
  7. i dont know if this help but i finally found how to do cleared with example code.. https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/ak0OuTuS9kU later i property set the relation between my module , my controller and my model: https://www.prestashop.com/forums/topic/623024-how-to-store-db-using-model-ad-canvas-example/?p=2614053
  8. i solve it using https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/rWlD-5PrpJg so the model must have all the fields to stored already defined in the form helper list.. the model of the camvas exampel are incomplete ... that's why the confusion... 1) define the model fiels must be with a public variable, a entry in the array definition and a entri in the sql table definition, lest see: class Examplecup extends ObjectModel { public $id_cup; // id pk key of the table public $name_of_this_cup; public $date_creacion; // cuando ingresa o se crea la orden de taller public $date_modifica; // cuando se altero este registro por ultima vez public $id_employee; // ultimo empleado que modifica la orden public static $definition = array( 'table' => 'mycups', 'primary' => 'id_cup', 'fields' => array( 'name_of_this_cup' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true,'size' => 255), 'date_creacion' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), // cuando ingresa o se crea 'date_modifica' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), // cuando se altera 'id_employee' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true,'size' => 255), ), ); } The sql table definition must have the entries as declared in the model CREATE TABLE `'._DB_PREFIX_.'mycups`( `id_cup` int(10) unsigned NOT NULL auto_increment , `name_of_this_cup` text, `date_creacion` text NULL , `date_modifica` text NULL , `id_employee` int(10) unsigned NULL , PRIMARY KEY (`id_tallermarca`) ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8; now the list of the fields in the form helper must be public function renderForm() { $this->fields_form = array( 'legend' => array( 'title' => $this->l('My stored names of cups), 'icon' => 'icon-envelope-alt' ), 'input' => array( array('type' => 'text','label' => $this->l('name of the cup'),'name' => 'name_of_this_cup'), array('type' => 'hidden','name' => 'date_modifica'), array('type' => 'hidden','name' => 'date_creacion'), array('type' => 'hidden','name' => 'id_employee'), ), 'submit' => array('title' => $this->l('Save'),'name' => 'submit'.$this->className) ); $this->fields_value['date_modifica'] = date("Y-m-d"); $this->fields_value['id_employee'] = (int)Tools::getValue('id_employee', $this->id_employee); return parent::renderForm(); }
  9. fnally i got how.. 6 months, bad! was easy, the problem here its the prestashop complex and stupid framework.. too complicated.. that i want was a menu entry in the backend, as "Stats", "preferences" or "localization" menu entries... the code are easyle: in the following link https://groups.google.com/forum/m/?hl=es#!topic/venenuxsarisari/ak0OuTuS9kU are clarelly explained just added same code to install and to uninstall methods and that's all the result are as this image:
  10. hi! i have the same problem i want to store the input multiselect field as "1,2,3" in the table.. i noted that i must implote that values after the postprocess, but read here that i must extend the "add" how i do that? @gabdara
  11. ho do you get 10,20,30 into the table field?
  12. in all the cases of select question this stupid answerd are posted.. please a example! where we cacht the serialized send! this answerd only provided the unserialized receive, but where to send serialized?
  13. de prestasho lo que siempre obtendras es respuestas incomlpletas por la complejidad de el codigo, o sino propaganda para que pagues... yo necesito imprimir un modulo que simplemente muetras campos.. pero no se como implementa dicha impresion.. tal vez una mano lava la otra y asi de da un ejemplo de como deberian ser las cosas por aqui..
×
×
  • Create New...