Shipping zones views and routes creation

This commit is contained in:
mespeche
2013-09-18 19:20:51 +02:00
parent 8841958646
commit 42ad62d2cd
4 changed files with 295 additions and 1 deletions

View File

@@ -401,7 +401,25 @@
<requirement key="country_id">\d+</requirement>
</route>
<!-- end countries routes management -->
<!-- end countries routes management -->
<!-- Shipping zones routes management -->
<route id="admin.configuration.shipping-zones.default" path="/admin/configuration/shipping-zones">
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::indexAction</default>
</route>
<route id="admin.configuration.shipping-zones.create" path="/admin/configuration/shipping-zones/create">
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::createAction</default>
</route>
<route id="admin.configuration.shipping-zones.update.view" path="/admin/configuration/shipping-zones/update/{shipping_zones_id}" methods="get">
<default key="_controller">Thelia\Controller\Admin\ShippingZoneController::updateAction</default>
<requirement key="country_id">\d+</requirement>
</route>
<!-- end shipping routes management -->
<!-- feature and features value management -->

View File

@@ -0,0 +1,46 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
namespace Thelia\Controller\Admin;
/**
* Class FolderController
* @package Thelia\Controller\Admin
* @author Manuel Raynaud <mraynaud@openstudio.fr>
*/
class ShippingZoneController extends BaseAdminController
{
public function indexAction()
{
if (null !== $response = $this->checkAuth("admin.shipping-zones.view")) return $response;
return $this->render("shipping-zones", array("display_shipping_zone" => 20));
}
public function updateAction($shipping_zones_id)
{
return $this->render("shipping-zones-edit", array(
"shipping_zones_id" => $shipping_zones_id
));
}
}