Jump to content

Error al insertar stock masivamente: Uncaught PrestaShopBundle\Exception\NotImplementedException: Shop context types other than "single shop" are not supported in


Recommended Posts

Buenas,

Estoy desarrollando un módulo que inserta de forma masiva el stock en los artículos y combinaciones así:

StockAvailable::setQuantity($id_product, $attr_id,  $quantity);

 

El caso es que si debería de actualizar el stock de 5 combinaciones, cada vez que lo lanzo va actualizando el stock de una, por ejemplo, primero combinación 1, la segunda vez que lo lanzo combinación y combinación 2, etc, y me devuelve el siguiente error:

<b>Fatal error</b>: Uncaught PrestaShopBundle\Exception\NotImplementedException: Shop context types other than &quot;single shop&quot; are not supported in /var/www/vhosts/midominio.com/httpdocs/src/PrestaShopBundle/Entity/Repository/StockManagementRepository.php:142 Stack trace: #0 /var/www/vhosts/midominio.com/httpdocs/src/PrestaShopBundle/Entity/Repository/StockMovementRepository.php(58): PrestaShopBundle\Entity\Repository\StockManagementRepository-&gt;__construct() #1 /var/www/vhosts/midominio.com/httpdocs/var/cache/dev/ContainerYdfx4xi/getPrestashop_Core_Api_StockMovement_RepositoryService.php(8): PrestaShopBundle\Entity\Repository\StockMovementRepository-&gt;__construct() #2 /var/www/vhosts/midominio.com/httpdocs/var/cache/dev/ContainerYdfx4xi/appProdProjectContainer.php(3152): require('/var/www/vhosts...') #3 /var/www/vhosts/midominio.com/httpdocs/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(304): ContainerYdfx4xi\appProdProjectContainer-&gt;load() #4 /var/www/vhosts/midominio.com/httpdocs/src/Core/Stock/StockMan in <b>/var/www/vhosts/midominio.com/httpdocs/src/PrestaShopBundle/Entity/Repository/StockManagementRepository.php</b> on line <b>142</b><br />

 

 

A ver si alguien puede echarme una mano, gracias, un saludo.

Link to comment
Share on other sites

  • 1 month later...

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