Files
domokits/local/modules/DigressivePrice/Controller/DigressivePriceFrontController.php
2019-11-21 12:25:31 +01:00

35 lines
881 B
PHP

<?php
namespace DigressivePrice\Controller;
use Symfony\Component\HttpFoundation\Response;
use Thelia\Controller\Front\BaseFrontController;
use Thelia\Model\ProductSaleElementsQuery;
/**
* Class DigressivePriceFrontController
* @package DigressivePrice\Controller
*/
class DigressivePriceFrontController extends BaseFrontController
{
/**
* @return mixed|\Symfony\Component\HttpFoundation\Response
* @throws \Exception
*/
public function updateTableAction($pseId)
{
if (null !== $pse = ProductSaleElementsQuery::create()->findPk($pseId)) {
return $this->render(
'digressive-price/product-details-bottom',
[
'pse_id' => $pse->getId(),
'product_id' => $pse->getProductId()
]
);
}
return new Response('');
}
}