Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by User1J

  1. It didnt all make sense, but I learned a lot, thank you for taking the time to write that up, it's much appreciated. If some one is interested in updating the quantity in ps_product, I found a way that does call the relevant hooks and also logs it in ps_stock_mvt. $product = new Product($idOfProduct); addStockMvt($quantity, $id_reason, $id_product_attribute = NULL, $id_order = NULL, $id_employee = NULL); (will mark this as solved as soon as I figure out how to do that)
  2. Hi and thanks for the reply! Let me see if I can explain this a bit clearer... Lets say I want to send an email to myself every time the quantity of a product changes. That would be: function hookUpdateQuantity(){ //email stuff here } Now, every time I change the quantity of a product from the back office in PS I will get an email. However, if I update the quantity via: $product = new Product($product_id_of_product_you_want_to_change); $product->quantity = $product->quantity + 3; $product->update(); I will get no email, because hookUpdateQuantity will not execute. Also, other modules unknown to me, will not get to do their stuff which relies on hookUpdateQuantity. Hopefully this makes more sense to you. //J.
  3. What paramaters does the hooks take? I´ll give you a simplified problem to illustrate my problem... Lets say every time hookLeftColumn runs, I want to update the quantity in ps_product by 3. So... function hookLeftColumn($params) SQL to update ps_product here. } But now the quantity is updated, but everything relying on hookUpdateQuantity() fails since I "cheated" and did it via SQL right? So I try to do function hookLeftColumn($params) SQL to update ps_product here. Module::hookExec('addProduct', array('product' => $product)); } Which is fine, except I have no clue what to pass into Module::hookExec(name, $var). So what is $var? Obviously and object, obviously containing values gotten from the DB, but what exactly? So to sum up, what EXACTLY is given in $params when a hook is executed, and what should I pass if I want to call a hook? Thanks a lot for reading, I hope I got my message across without to much confusion/rambling.
  4. Hi! My front end (the actual shop) is nothing more then my selected logo and a line under it. My back end seems to be working fine. Is there supposed to be a ready made shop or am I missing a step? I am running the setup localy with WAMP, and followed all the steps to install prestashop. The only concern I have is the file permissions. Im more of a linux user so I struggled here. I gave IUSR rw (read-write) for the entire prestashop folder but to no avail. Any hints to why there is no front end to speak of would be much appreciated. Thanks!
  • Create New...

Important Information

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