Jump to content

Alsernet2000

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • First Name
    prog
  • Last Name
    programacion

Alsernet2000's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

2

Reputation

  1. buenos días, me pide un cliente que le pongamos la fecha de disponibilidad, que marca en la ficha del producto->combinaciones, en las líneas que correspondan en la cesta de la compra, y no se de donde sacar ese dato. En la ficha del producto si aparece en el array $combinations, pero estos datos no se pasan a la cesta. Me podría alguien indicar donde puedo buscar ese dato. Gracias
  2. Buenas, necesito mostrar en la home dos bloques con los productos de las dos categorías principales de mi sitio y no se como hacerlo, alguien me dice como lo puedo hacer?
  3. It is missing one thing: You have to pass the $id to the parent construct: <?php class Customer extends CustomerCore { public function __construct($id = null) { CustomerCore::$definition['fields']['lastname']['size'] = 64; parent::__construct($id); } } But thanks for this code, It was really helpful.
  4. Hi to everybody, I'm developing a module to get a list of elements from the data base. The pages are working awesome and also really easy, but the button of "Show All" send me a 404 page (and the url is OK but not friendly). I have this code: in the controller file: ... public function initContent() { parent::initContent(); ... ... $iCount = $oPhotoOrder->countAll($this->context->shop->id); $this->pagination($iCount); ... } ... in the tpl file: ... {include file="$tpl_dir./pagination.tpl"} ... Do you know any clue? Thanks a los!!
  5. Looks easy!! If I have any problem with the functions or JavaScript I will tell you. Cheers
  6. Hi, I wanna to know if it is possible to add several "add to shopping cart", one per Attribute, in the view of the product. Like in this image attached.
  7. You need a Token that is generated by PS My link looks like: ?controller=AdminPhotoOrder&token=ed948e9517be7b47eede109cf9f25698 (only the controler and the token) As far as I know, this things are the only one that you need. Try this code in your testModule: /*** To call when the module is installing * * @return bool The module was installed correctly */ public function install() { // Install Tabs $tab = new Tab(); foreach (Language::getLanguages() as $language) { $tab->name[$language['id_lang']] = 'My Module'; } $tab->class_name = 'testModule'; $tab->module = $this->name; $tab->id_parent = (int)Tab::getIdFromClassName('AdminCustomers'); return true; } Then, you wil have a link in your backoffice, under Customers. Fron there, you can enter. I edit the message, because the editor is a devil...
  8. Good morning guys, I have a problem in my ModuleAdminController: When I do a renderList, the title of the page (and the title of the list) is wrong, even when the filter is empty (also when you enter the first time in the module). The title appear like this: Filter by Date: a:2:{I:0;s:0:"";I:1;s:0:"";} Looks like it is doing a filtering by default. My ModuleAdminController: class AdminPhotoOrderController extends ModuleAdminController { public function __construct() { $this->bootstrap = true; $this->title = $this->l('Photo Order'); $this->table = 'photo_order'; $this->className = 'PhotoOrderData'; $this->identifier = 'id_photo_order'; $this->_defaultOrderBy = 'date_add'; $this->_defaultOrderWay = 'DESC'; $this->fields_list = $this->getFieldList(); $this->lang = false; $this->deleted = true; $this->list_simple_header = false; $this->colorOnBackground = true; $this->actions = array('view', 'edit', 'delete'); $this->bulk_actions = array( 'approve' => array('text' => $this->l('Approve selected'), 'confirm' => $this->l('Approve selected items?')), 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')) ); $this->context = Context::getContext(); $this->multishop_context = Shop::CONTEXT_ALL; parent::__construct(); } /** * Function used to render the list to display for this controller */ public function renderList() { $this->addRowAction('edit'); $this->addRowAction('details'); $this->bulk_actions = array( 'approve' => array('text' => $this->l('Approve selected'), 'confirm' => $this->l('Approve selected items?'), 'icon' => 'icon-check',), 'delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?'), 'icon' => 'icon-trash',) ); return parent::renderList(); } ... } Thanks so much.
  9. I was trying to do a form with the helperForm, but it was imposible. I was following the official documentation, but was imposible for me from the FrontControler. http://doc.prestashop.com/display/PS16/Using+the+HelperForm+class Can i do that?? The error that show to me is: Uncaught --> Smarty: Unable to load template file 'helpers/form/form.tpl' And my class is: public function renderForm() { $fields_form = array( 'form' => array( 'legend' => array( 'title' => $this->module->l('Edit carrier'), 'image' => '../img/admin/icon_to_display.gif' ), 'input' => array( array( 'type' => 'text', 'name' => 'shipping_method', ), ), 'submit' => array( 'title' => $this->module->l('Save'), 'class' => 'btn btn-default pull-right' ) )); $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $this->fields_form = array(); $helper->identifier = $this->identifier; $helper->submit_action = 'submitBlockCart'; return $helper->generateForm(array($fields_form)); } I'm going crazy....
×
×
  • Create New...