Jump to content

Martin Bargl

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Martin Bargl

  1. Hello everyone, I have a question, about right solution. I need to show manufacturer image on product list, but there's only manufacturer ID. Normally, I would override CategoryController.php and extended it by: $manufacturers = Manufacturer::getManufacturers(true, $this->context->language->id, true, $this->p, $this->n, false); $manufacturers_for_display = array(); foreach ($manufacturers as $manufacturer) { $manufacturers_for_display[$manufacturer['id_manufacturer']] = $manufacturer; $manufacturers_for_display[$manufacturer['id_manufacturer']]['text'] = $manufacturer['short_description']; $manufacturers_for_display[$manufacturer['id_manufacturer']]['image'] = $this->context->link->getManufacturerImageLink($manufacturer['id_manufacturer'], 'medium_default'); } $this->context->smarty->assign(array( 'manufacturer' => $manufacturers_for_display, ... But override for CategoryPresenter.php is not working anymore in PS 1.7. Any ideas? Thanks a lot, Martin
  2. Hello, several clients asked me for a "special" function, they need to be able to set Enabled/Disabled based on product combination, not only product itself. I have found out a way to do it, but it takes a lot of overridden code directly in core files which is not very correct. Is there a plan of features on Prestashop or some "feature request"? I believe this could be a basic feature, since it is useful. For example you have t-shirt with 3 combination, but you know the red combination will be out of stock for next 6 months, so you would like to hide it (not delete it) or maybe set do not allow this combination when out of stock. Right now this could be also done only based on the product setting. Thanks for some your ideas, help,... reactions, maybe there's a easy way, some smart module, Martin
  3. Hi, I hope I am on the right forum, since this is a core feature. I am developing a module to send data to logistic center. All works well, except when I try to hook deleteProductAttribute and I am not sure this is the right hook and there's not documentation for this. So what I need: I need to know information when I delete a product combination same as it works with hookDeleteProduct. In hook's table I found deleteProductAttribute, I am able to register it to positions, but when I delete combination, nothing happens. Another hook doing same for the main product works (hookDeleteProduct) Prestashop version: 1.6.0.9 public function install() { if (!parent::install() || !$this->registerHook('deleteProductAttribute')) { return false; } return true; } public function hookDeleteProductAttribute($data) { var_dump($data);die; } I know this thing is done by AJAX, but the console response is OK. So is there something wrong? Thanks, Martin
  4. Hi everyone, I have a bug I am not yet able to solve. I have Prestashop 1.6.1.0 (not online yet) and when I create order and generate invoice (set correct state), it works for first few invoices and than the data are corrupted. What I mean: When I create order, new row is created in ps_order_invoice with number 0, this should be fine. But randomly, when I create another order, it rewrites first order's number column and thus whole invoice process is corrupted. It happens randomly, but always starts with 2 or later invoice. The result is there are product, but inovice number is always 0 and taxes + totals are zero. I have reuploaded all classes, controllers, disabled overrides, non-original prestashop module. But without any change. I have deleted all orders in database in tables: ps_orders ps_order_detail ps_order_detail_tax ps_order_history ps_order_invoice ps_order_invoice_payment ps_order_invoice_tax ps_order_payment Also I set auto_increment to 1. Maybe I forgot some table? It happens again, again, again,... I am trying to solve it since there's a lot of data already inserted and I do not want to merge those to new Prestashop copy. Anyone knows how and in which file is the invoice is created once you select the right order status? I have found method setInvoice in Order class, but when I comment whole code, it still works.
  5. Hi, I am getting same error after update from 1.5 to 1.6.1, products are in stock, available,... but still getting this message. Does anyone know the solution?
  6. Hello, I have ecommerce store with about 9000 products and there are 1800 products in one category. I need to change product position, but the question is how to do it. I know how to activate the change position mode (Filter by category -> position). But when I want product on position 500 to move to position 1500 it is impossible to drag it that far, because it is on another page. Also when you need to sort in category with lots of products, it is hell. Is there any way to use those position numbers? So you could insert a new position by number?
  7. Hello Vekia, I have found the problem,... all header hooks were not applied since in ps_hook_alias table, there was alias for displayHeader s "Header". This did not worked, but once I have changed it to "header" (lower camel case), everything works. This strange thing is that it worked before and there was no update on my server (even not on local machine). Thank you for your help, Martin
  8. Hi it happened to me right now and even revision from SVN does not work. Actually the problem is that the module css files are not loaded. Did you managed to find out why it happened?
  9. Hi everyone, I need to allow my translator to work on products. But I am looking for a way to rescrict access to only modify description and short description, can you help? Any idea?
  10. Hi community, I am currently struggling with the problem of accessories. We have an eshop which sells phones and it has a lot of accessories for each phone. It would be great if I could sort accessories directly on the product edit page in backoffice (for that one product). I know accessories is composed from a table which creates a pair id of product to id of product (which is accessory). I know it means to change the getAccessories method, add a column "position" to table and change the controller. So here is my question: how to do this the right way, to not to damage Prestashop core files? Create a module? How can a module affect product tab? Maybe there's a solution I do not see know, I would appreciate advice. Thanks, Martin
  11. Hi, I am a bit new to Prestashop and I was looking around the forum for answer, but not found the right one. I aim to add a custom footer links, it should be 3 blocks of about 4 links each. In CMS pages I have created the structure: - customer -- how to sign in -- how to... - payments -- how to.. -- ... And so on. Is there any way how to render those data to footer like parent page is start of a column, links will be list. Or do it whole as an list with parent items and childs? <ul> Parent page (category page) <li>Child page... I am looking for a dynamic solution, not permanent link module, thanks. Martin
  12. Hi, I have a problem. I am new in prestashop and I have a following problem: "I need to have 2 user groups, default and private. Privita group allows only logged users to get into one category. Since there is only one default group during a registration, I can only manually edit every user and assign him to that second group. I need this to be autimatic during a registration". Where should I look to modify it? Thxs, Martin
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More