dynamic delivery modules on delivery front template
This commit is contained in:
@@ -131,6 +131,10 @@
|
||||
<default key="_view">order-delivery</default>
|
||||
</route>
|
||||
|
||||
<route id="admin.delivery.ajax-module-list" path="/order/deliveryModuleList">
|
||||
<default key="_controller">Front\Controller\OrderController::getDeliveryModuleListAjaxAction</default>
|
||||
</route>
|
||||
|
||||
<route id="order.invoice.process" path="/order/invoice" methods="post">
|
||||
<default key="_controller">Front\Controller\OrderController::invoice</default>
|
||||
<default key="_view">order-invoice</default>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user