Jump to content

moduleprogrammer

New Members
  • Posts

    2
  • Joined

  • Last visited

moduleprogrammer's Achievements

Newbie

Newbie (1/14)

  • Conversation Starter Rare
  • One Year In Rare
  • Week One Done Rare
  • One Month Later Rare

Recent Badges

0

Reputation

  1. 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.
  2. Hello! I've a problem, I've to get the discount percentage applied to the line of each order placed. Through query it is not viable, since the coupons are saved at the order level, not the applied line. So, I had thought about capturing the moment when PS does it, while the order is being placed, and saving it in a custom table: ID | order_id | percent_applied But I am not sure exactly where it performs that calculation, I have checked the core, I have seen several sites where it takes discounts into account but it calls hooks and classes and I lose track of it. Could someone give me a hint where I can intercept this information, so that I can save it? Thanks in advance, greetings.
×
×
  • Create New...