solopedro Posted July 6, 2021 Share Posted July 6, 2021 Hi I get this error qhen I try to aplly any discount to an order in the admin No route found for "GET /sell/orders/27121/cart-rules": Method Not Allowed (Allow: POST) Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /sell/orders/27121/cart-rules": Method Not Allowed (Allow: POST) at vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:141 at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:115) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:214) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:143) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:127) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, false) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200) at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, false) (badmin/index.php:82) Any Idea? Link to comment Share on other sites More sharing options...
solopedro Posted July 27, 2021 Author Share Posted July 27, 2021 any help on this? Link to comment Share on other sites More sharing options...
solopedro Posted July 27, 2021 Author Share Posted July 27, 2021 solved Link to comment Share on other sites More sharing options...
musicmaster Posted July 28, 2021 Share Posted July 28, 2021 19 hours ago, solopedro said: solved I am glad you solved it. It might help others when you give some indication how you solved this problem. Link to comment Share on other sites More sharing options...
solopedro Posted July 28, 2021 Author Share Posted July 28, 2021 In src/adapter/product/PriceCalculator.php I had this missing (I just had to add it) ); } /** * @param int $orderId Order id * @param int $productId Product id * @param int $combinationId Combination (Product attribute) id * @param bool $withTaxes With or without taxes * @param bool $useReduction With or without reduction * @param bool $withEcoTax With or without ecto tax * * @return float|null * * @throws \PrestaShopDatabaseException */ public function getOrderPrice( int $orderId, int $productId, int $combinationId, bool $withTaxes, bool $useReduction, bool $withEcoTax 😞 ?float { return Product::getPriceFromOrder( $orderId, $productId, $combinationId, $withTaxes, $useReduction, $withEcoTax ); } } 1 Link to comment Share on other sites More sharing options...
wiros Posted March 24, 2022 Share Posted March 24, 2022 Great you found this solution, Where exactly do you add this part? Link to comment Share on other sites More sharing options...
solopedro Posted March 25, 2022 Author Share Posted March 25, 2022 14 hours ago, wiros said: Great you found this solution, Where exactly do you add this part? Hi I did that in src/adapter/product/PriceCalculator.php Link to comment Share on other sites More sharing options...
wiros Posted April 3, 2022 Share Posted April 3, 2022 I mean, which line should I add this block? Link to comment Share on other sites More sharing options...
solopedro Posted April 4, 2022 Author Share Posted April 4, 2022 AS i cannot attach the file I send you a screen capture and is at the end of existing file PriceCalculator.php Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now