Jump to content

Back office order can't add products


Recommended Posts

Hi,

 

in latest version of prestashop 1.6.011 back office order manager is broken. You can't create orders from back office! 

Step to reproduce problem:
1. go to orders

2. create order

3. look for customer

4. search for product

5. add product -> PROBLEM 

 

When you add a product, table below, which should contain added product, isn't refreshed and there fore you can't see products that you add, prices aren't updated etc. 

I also tried on prestashop.com demo page and it is not working. Tested in FF and Chrome, both latest versions. 

 

 

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Nothing Happensa To me, Using Last Version.

....

THe TPL form is in here

/ADMIN_FOLDER/themes/default/template/controllers/orders/form.tpl  Can you left us your FIle ?

 

 

The FIreBUg shows me on DOM

 

b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/user_DB/public_html/controllers/admin/AdminCartsController.php:465) in <b>/home/puntoh5/public_html/classes/controller/AdminController.php</b> on line <b>1585</b><br />

post-419152-0-49998800-1423886551_thumb.jpg

Edited by Xzelot (see edit history)
Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...
  • 2 months later...
  • 4 months later...

Hello,

 

I have same problem. I am using prestashop 1.6.0.14 for 4 shops and all have same issue.

 

The problem is in creating order from backoffice. 

1. go to orders

2. create order

3. look for customer, select customer

4. search for product

5. add product -> Nothing is added
6. Change address -> Nothing happens

 

When I repeat the steps the changes are there, it means it saving changes I made but not displaying.
7. click again orders
8. Create order
9. Select same customer
10. product added to cart will be shown under carts tab. click use to select to proceed with order creation.
11. changed in address are also saved

12. Any new changes made will have to repeat all steps again to see them (orders, create order, select customer,....)

Does anyone know the solution for that?

 

Thank you.

Link to comment
Share on other sites

  • 7 months later...

HI,

 

I am facing a similar issue. Cannot add products to cart in back office manual order.

The stock is proper and earlier didn't face this problem

 

Prestashop 1.6.1.5

 

Image attached shows a strange [ - 0 ] Next to the product in the list.

However, stock count mentioned below shows a proper number.

 

I don't know why add to cart is not working here.

 

post-1102264-0-39303000-1474096866_thumb.jpg

Link to comment
Share on other sites

HI,

 

I am facing a similar issue. Cannot add products to cart in back office manual order.

The stock is proper and earlier didn't face this problem

 

Prestashop 1.6.1.5

 

Image attached shows a strange [ - 0 ] Next to the product in the list.

However, stock count mentioned below shows a proper number.

 

I don't know why add to cart is not working here.

 

attachicon.gifsdfgh.jpg

Do you use Multistore, advanced stock management?

And how are your cache settings?  Have you tried it when you disable all overrides?

Edited by Inform-All (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi, I'm also using 1.6.1.4 and realize suddenly I am not able to add new products. It does nothing after all the entries. Can't even update an existing product after modifying. Tried firefox, edge, chrome. Certainly not a browser issue. Anyone found a solution yet? 

Link to comment
Share on other sites

  • 4 weeks later...

I am suffering very similar issue when updated from 1.5.6 to 1.6.1.0.

The problem was, that in the back office, manual order I was unable to find absolutely any product. But I was able to add a carts from customers.

 

I have tried to find the problem for hours and finally I have found solution.

 

In the controllers/admin/AdminCartsController.php just go to the ajaxProcessSearchProducts function and at the last line change:

$this->content = Tools::jsonEncode($to_return);

to

die($this->content = Tools::jsonEncode($to_return));

Suddenly it is working like a charm. Also adding a products to an existing orders is working as there was the same issue with searching.

I hope that this will save a lot of time you.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I am suffering very similar issue when updated from 1.5.6 to 1.6.1.0.

The problem was, that in the back office, manual order I was unable to find absolutely any product. But I was able to add a carts from customers.

 

I have tried to find the problem for hours and finally I have found solution.

 

In the controllers/admin/AdminCartsController.php just go to the ajaxProcessSearchProducts function and at the last line change:

$this->content = Tools::jsonEncode($to_return);

to

die($this->content = Tools::jsonEncode($to_return));

Suddenly it is working like a charm. Also adding a products to an existing orders is working as there was the same issue with searching.

I hope that this will save a lot of time you.

 

I had same issue in PS 1.6.1.11 - this modification really works like charm and solved the problem! Thank you.

 

However, the file is AdminOrdersController.php, not AdminCartsController.php.

Link to comment
Share on other sites

  • 9 months later...

I am using prestashop 1.6.1.17. In my back office When i am going to add new products to the customer orders (Existing Orders). The product search function is not working. the search is working during creating new order in the backoffice.

 

Please let me know if you have any solutions.

search.png

Link to comment
Share on other sites

  • 2 months later...

This problem happened on our shop when I installed MailChimp's own module, which is full of bugs and fails to sync properly.

Uninstalled and it works again without having to add the cart after a first failed attempt at creating the order.

Although everything works when changing quantities or adding a voucher we do get a PHP warning about not being able to modify header info, which I'm looking into. From what I can tell there's a line of code in AdminCartsController.php that tells the admin area not to use cache but when the quantity changes it hates that line being re-run. I think it's some bad programming in one of the php files. I've seen lots of reports about this but none of the threads seem to conclude with an actual fix.

Link to comment
Share on other sites

  • 5 months later...

Hello People. As the previous people above I too get the same problem with the "add to cart" button in the BO create order page.
After selecting a customer and searching successfully for a product in the search bar the moment I press the "add to cart" button the #customer_cart table that is supposed to fill with the product is not displaying the products details.

What I have found though is something peculiar. If I turn on error reporting on (define('_PS_MODE_DEV_', true); ) the "add to cart" button works fine. It is only broken if dev mode is false.

Does this help anyone at all to solve the problem? I'd rather have error reporting off unless I am debugging.

Link to comment
Share on other sites

  • 4 months later...

Hi,

I had the same problem as pourouz, some debugging showed, that a user session cannot be started during update quantity because of an already sent header.

Normally this error occurs, when there are some blank or other output is generated too early.

 

I solved this very similar to the above posts with changing in the same AdminCartsController.php file the output of ajaxProcessUpdateQty

from 

 

echo json_encode(array_merge($this->ajaxReturnVars(), array('errors' => $errors)));

to

die(json_encode(array_merge($this->ajaxReturnVars(), array('errors' => $errors))));

 

hope this helps somebody...

Link to comment
Share on other sites

  • 2 years later...

Hi,

I had the same problem on prestashop 1.7.6.9.

In the controllers/admin/AdminOrdersController.php just go to the ajaxProcessSearchProducts function and at the last line change:

$this->content = jsonEncode($to_return);

to

die($this->content = jsonEncode($to_return));

hope so to helps somebody :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...