Jump to content

Can´t add products in Admin New Order - PS 1.7.8.5


jvicente1971

Recommended Posts

Hello

I've upgraded to ps1.7.8.5 and now in admin order I can't add products to cart.

I've tryed debug mode and got this info:

 

INFO12:54:32requestMatched route 

"admin_carts_info"

.

Show context

CRITICAL12:54:32phpType error: Argument 5 passed to PrestaShop\PrestaShop\Core\Domain\Cart\QueryResult\CartForOrderCreation\CartProduct::__construct() must be of the type string, null given, called in /var/www/vhosts/mydomain/mydomain/src/Adapter/Cart/QueryHandler/GetCartForOrderCreationHandler.php on line 558

Show context    Show trace

CRITICAL12:54:32requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Type error: Argument 5 passed to PrestaShop\PrestaShop\Core\Domain\Cart\QueryResult\CartForOrderCreation\CartProduct::__construct() must be of the type string, null given, called in /var/www/vhosts/mydomaint/mydomain/src/Adapter/Cart/QueryHandler/GetCartForOrderCreationHandler.php on line 558" at /var/www/vhosts/mydomain/mydomain/src/Core/Domain/Cart/QueryResult/CartForOrderCreation/CartProduct.php line 116

Show context    Show trace

 

Any one can help?

 

screenshoteasy (17).png

Link to comment
Share on other sites

Hello, 


1) src/Adapter/Cart/QueryHandler/GetCartForOrderCreationHandler.php
2) src/Core/Domain/Cart/QueryResult/CartForOrderCreation/CartProduct.php

open these 2 php file in editor

1st file line 588, take a screenshot and share here.

2nd file line 116 take a screenshot and share here
 

if complicated then PM us access and we will check it out for you 

Link to comment
Share on other sites

in case someone else happens...

There are two possible solutions and it usually occurs at two specific points.

First point: when you open a paid order to add some other product because the customer has requested it... If you try to search for the product, no results appear (the internal search does not work) --> then it must go to your database in the ps_products_attribute table, edit the "REFERENCE" section of one of the products and then edit the line inline so that it reads this command: UPDATE `ps_product_attribute` SET `reference` = ''" all references must be empty or full, not you can mark NULL.

The second point where it happens is when you try to create an order from a customer abandoned order, you try to "USE" the abandoned order to load the product(s)... but it doesn't work... it also doesn't let you add it manually... at this point you go to the product and modify one letter of the name by adding a space to fix it and it will work again.

Captura de pantalla 2022-06-16 a las 4.38.44.png

Link to comment
Share on other sites

  • 2 months later...
1 hour ago, manudeoli said:

Hello, I have the same problem, after a migration to p1.7.8 from p1.6.

I've update the product_attribute with non null. But it's still not working.

Did one find the solution?

Hello

Somehow I could add products doing the following.

1st - copy exact name of product and past in the search

2nd - Add stock to the product you want to add. Deppending on your "advance stock management" setup it will matter in search...

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...