Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

macjo's Achievements

  1. Ok, that's not good news. But ok. Let's try something else. can you take a look at your server log and check the last lignes. There most be something there that will help you solve the problem. Look for a ligne with the terms "PHP Fatal error" or something around those lignes. Another question, can you access the admin part of your shop?
  2. Hey, You request seems to be very tricky in terms of user rights. But it can be accomplished by using the webservice.
  3. Hey everyone, Here is my problem. I doing some queries to the database but I keep getting stuck on certain queries. For example: $query = new DbQuery(); $query->select('id_product') ->from('product_attribute') ->where('id_product_attribute ='.$id); return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); This will return me the correct id_product. but if I modify it to search by reference. For example $query = new DbQuery(); $query->select('id_product') ->from('product_attribute') ->where('reference ='.$reference); return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query); This query keeps returning FALSE. I can't seem to understand why. I've used executeS and getRow. Both would fit my queries since there would only be one correct row being returned (all my references are unique) but it doesn't seem to be the case. Every query that uses another field then the id seems to always return false. I've tried it with different tables. I know that there's something wrong with my code but I can't seem to find the problem. Happy to hear from anyone with an idea Cheers
  4. I see that you are still having problems with the website. What Hosting provider are you using? Maybe you can change on their backups and ask to do a rollback to the last day that it was working correctly.
  5. Here is the solution to my own question. Feel free to write me if you have any questions public function modifyItemInOrder($order_id, $order_param) { if ($order_id) { $order_detail = new OrderDetail($order_id); $order_detail->total_price_tax_incl = $order_param->total_price_tax_incl; $order_detail->total_price_tax_excl = $order_param->total_price_tax_excl; $order_detail->total_shipping_price_tax_incl = $order_param->total_shipping_price_tax_incl; $order_detail->total_shipping_price_tax_excl = $order_param->total_shipping_price_tax_incl; $order_detail->product_quantity = $order_param->product_quantity; $order_detail->update(); } } Cheers
  6. Here is my solution to my own question. I'm not going to write the all code here since I did an override of the class and only modified a small bit. Feel free to write me if you want the full answer. Solution: Override Class SpecificPriceCore (Classes/SpecificPrice.php), override function getSpecificPrice() Modify the query to accept multiple group IDs Create a function that requests all the Group IDs from the client Call the function that you just created in getSpecificPrice() Add the IDs in the query Cheers
  7. You might find what you are looking for in "Catalog"->"Discounts". There you will be able to configure your discounts as you just explained. Cheers
  8. I will try to explain you my problem with an example. I have 2 clients (Client A, B), 2 groups (Group 1, 2) and 1 product in my shop. The product has 2 specific prices: Price of 1Euro for "group1" Price of 2Euros for "group2" Client A belongs to group2 and Client B belongs to group1 and group2. They both have "default group" "group2", which means that when both clients check the product they both will have a price of 2Euros. Now what I'm trying to do is for every client to get the cheapest price of all the groups that they belong to. Any ideas where to start with this problem? I could change PrestaShop's code to do this but that it's not the point. I want to do that threw a module. Does anyone have an idea of what classes need to be overwritten or if a hook is available for this purpose? If someone could send me in the right direction it would be awesome. Thank you in advance
  9. Hey, So here is my question. I'm currently connecting our ERP system to PrestaShop threw modules. I was able to transfert our products, customers and I'm able to change the order id state. Now I'm having a bit of struggle with the Customer groups(create and update) and modifying the quantities of an order(the reason for this is some of our clients sell products that are weight variable so if the client asks for 1kg but we can only sell that item with 900g then we need to change it in the order). As anyone ever done this or can link me to a topic that talks about this? Thank you in advance.
  10. Hey everyone, Here is the problem that I'm facing. I want to modify the ordering process to so that I can integrate my own order validation (while keeping the Prestashop validation). In the lack of a pen and paper here I'll try to explain it the best I can. While prestashop confirms the order I want to add an "extra step" where I contact my ERP server and ask him to validate me the products. This would be when "proceed to checkout" is "clicked". This process is made possible by a simple http post to my server where in confirms me that everything ok (ex: all the items are in stock) or not ok and I get an http get in return with code 202 ,500 or 504... If everything is ok I get to the payment method. If error occurs I should use prestashop error handling and go back to the cart and display an error message. I'm having a hard time figuring out which file/class I should override or modify. Any tips are helpful. Thank you
  11. Hey everyone, I'll to start by saying that I'm new to Prestashop development. Just downloaded the dev branch So here is my problem. I'm currently working on a project that will allow me to replace the products being displayed in the shop (that are being fetched from Prestashop database) and get the products from my ERP API. Same thing goes for the menus. I know that some of you might be thinking; "Well why won't you just create a connector and update the Prestashop db with your own ERP data? Well that's not really an option. The articles, prices and menus depend on the client. Different permissions allow you to have a different prices. Example: "Client A" buys "item1" for 1 euro "Client B" buys "item1" for 0.8 euro. I've read the "override module" pages and I have an idea on how to attack this problem. Here are the pages from where I got my information: Overriding default behaviors How To Override Modules In PrestaShop My question is, have any of you ever built something alike in prestashop and can give me some pointers? Do you have any good sources of information on this subject? Documentation? Is it possible with the 1.7 version (since the introduction of symfony)? Thank you in advance
  • Create New...