Jump to content

ngomezleal

Members
  • Posts

    15
  • Joined

  • Last visited

Profile Information

  • Activity
    Developer

ngomezleal's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am following the tutorial that comes by default prestashop page to create a module . I made a code to load categories select a control option . ( In fact, until now it does well ) . What I would like someone to show me that when you select an option in the control select option , show me the products page . Note : I created some files with their corresponding logical including .php and .tpl ( here is the select option control that receives an array to be filled out and tour with a foreach through smarty ). Attachment ( attached) my module to please guide me how. I appreciate your ayudaas please. mymodule.zip
  2. Hi I hope you can help me. When department stores are created, where in the php code is the line so that when a purchase is made or decrement decreases the existence of the product?
  3. Muy buenas tardes a todos, espero puedan ayudarme a dar con el punto. Instale prestashop y configure la opción para que sea también multitiendas. A nivel de código PHP, quisiera que alguien me orientara donde esta el código (PHP) donde hace la resta de producto, es decir, donde esta el código que PS utiliza para decrementar la existencia de un producto cuando se realiza una compra?? Espero puedan ayudarme.
  4. Hi Nemo1, You can guide me please, where is php code level to decrease when the product option and stock multistorey used advanced ??? That is, where the product remains when an order is made.
  5. Nemo1, the code written above, does not work when I have the option of department stores. Where is the code to decrease when the product option multistore and advanced stock used ???
  6. Hi Nemo1, thanks so much for your answers. This code works when you have your prestashop site but the option of multi-shop. 1.- *********************************** OrderDetail.php ** Original State if (!StockAvailable::dependsOnStock($product['id_product'])) $update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], -(int)$product['cart_quantity']); ** Changed State. /** * Check the order status * @param array $product * @param int $id_order_state */ protected function checkProductStock($product, $id_order_state) { if ($id_order_state != Configuration::get('PS_OS_CANCELED') && $id_order_state != Configuration::get('PS_OS_ERROR')) { $update_quantity = true; if (!StockAvailable::dependsOnStock($product['id_product'])) $update_quantity = StockAvailable::updateQuantity($product['id_product'], $product['id_product_attribute'], +(int)$product['cart_quantity']); if ($update_quantity) $product['stock_quantity'] -= $product['cart_quantity']; if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT')) $this->outOfStock = true; Product::updateDefaultAttribute($product['id_product']); } } 2.- *********************************** State Error/Canceled. OrderHistory.php ** Original State: StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], (int)$product['product_quantity'], $order->id_shop); ** Changed State. // if waiting for payment => payment error/canceled elseif (!$new_os->logable && !$old_os->logable && in_array($new_os->id, $errorOrCanceledStatuses) && !in_array($old_os->id, $errorOrCanceledStatuses) && !StockAvailable::dependsOnStock($product['id_product'])) StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], -(int)$product['product_quantity'], $order->id_shop); ********************************************************** With this code (adapted to my needs), do the following: 1.-When an order is being performed, rather than decrease existence, increases. 2.-When you want to cancel an order, rather than increasing, decreases.
  7. exactly I mean, when a customer makes a purchase, the administrator has the option of: * cancel * approve * among others ... If for example the customer bought an article available there 20, when it is performed in the 19. When the administrator cancel the purchase, return again to 20. I wonder php code level, where it performs that action, that is, that php file I find that? Muchs thanks for your valuable answer Vekia. They have been of great benefit.
  8. Exactly I mean, when a customer makes a purchase, the administrator has the option of: * cancel * approve * among others ... If for example the customer bought an article available there 20, when it is performed in the 19. When the administrator cancel the purchase, return again to 20. I wonder php code level, where it performs that action, that is, that php file I find that? Muchs thanks for your valuable answers Nemo1. They have been of great benefit.
  9. Hi all, In prestashop there is an option to cancel or accept orders placed by buyers, specifically php to level, where I can find the code where the user (administrator) cancels the purchase they have made? I hope they understand me
  10. Very good Nemo1 thanks for your answer. Nemo1, In prestashop there is an option to cancel or accept orders placed by buyers, specifically php level, where I can find the code where the user (administrator) cancels the purchase they have made? I hope you understand me
  11. Nemo1 Hi thank you very much for your answer. Nemo1, just let me know the resposable of declining product by any method. Nemo1, based on your answer, I found the file in: classes / order / => OrderHistory.php Nemo1 would do the following: Instead of reducing the product, the product increases. The code to which you refer is me: StockAvailable :: updateQuantity ($ product ['product_id'], $ product ['product_attribute_id'], - (int) $ product ['product_quantity'], $ Order-> id_shop); I note that this - (int) $ product ['product_quantity'] Changing it to + (int) $ product ['product_quantity'] It can run?
  12. Hi all, Could you please tell me where this prestashop php in the file, which makes the reduction of a product when a purchase is made using the method of payment by check? waiting for your valuable responses.
  13. Hi all, Could you please tell me where this prestashop php in the file, which makes the reduction of a product when a purchase is made using the method of payment by check? waiting for your valuable responses.
×
×
  • Create New...