dynamic delivery modules on delivery front template

This commit is contained in:
Etienne Roudeix
2013-12-20 12:14:20 +01:00
parent b3ac365b45
commit 22efc21bfe
4 changed files with 64 additions and 22 deletions

View File

@@ -41,6 +41,7 @@ use Thelia\Model\Base\OrderQuery;
use Thelia\Model\ConfigQuery;
use Thelia\Model\ModuleQuery;
use Thelia\Model\Order;
use Thelia\TaxEngine\TaxEngine;
use Thelia\Tools\URL;
/**
@@ -260,5 +261,18 @@ class OrderController extends BaseFrontController
return $this->generateOrderPdf($order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'));
}
public function getDeliveryModuleListAjaxAction()
{
$country = $this->getRequest()->get(
'country_id',
TaxEngine::getInstance($this->getRequest()->getSession())->getDeliveryCountry()->getId()
);
$this->checkXmlHttpRequest();
$args = array('country' => $country);
return $this->render('ajax/order-delivery-module-list', $args);
}
}