62 lines
1.3 KiB
PHP
62 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* User: Yohann Genre
|
|
* Date: 24/10/2015
|
|
* Time: 16:38
|
|
*
|
|
*/
|
|
|
|
namespace AdvancePrices\Controller;
|
|
|
|
use AdvancePrices\Model\ProductAdvancePriceQuery;
|
|
use AdvancePrices\Model\ProductAdvancePrice;
|
|
use AdvancePrices\Form\PriceConfig;
|
|
use Thelia\Controller\Admin\BaseAdminController;
|
|
use Thelia\Form\Exception\FormValidationException;
|
|
use Propel\Runtime\Exception\PropelException;
|
|
|
|
|
|
class PriceController extends BaseAdminController
|
|
{
|
|
|
|
public function manageProductConfiguration()
|
|
{
|
|
$productId = $this->getRequest()->get('product_id', null);
|
|
|
|
$productAdvancePrice = new ProductAdvancePriceQuery();
|
|
if(null === $productAdvancePrice->findBy('productId',$productId)){
|
|
return $this->create($productId);
|
|
}else{
|
|
return $this->update($productAdvancePrice);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @param $product_id int
|
|
*
|
|
* @return \Thelia\Core\HttpFoundation\Response
|
|
*/
|
|
public function create($product_id)
|
|
{
|
|
|
|
$priceConfigForm = new PriceConfig($this->getRequest());
|
|
$message = false;
|
|
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
*
|
|
*
|
|
* @param $productAdvancePrice ProductAdvancePriceQuery
|
|
*/
|
|
public function update($productAdvancePrice)
|
|
{
|
|
$priceConfigForm = new PriceConfig($this->getRequest());
|
|
$message = false;
|
|
|
|
return null;
|
|
}
|
|
|
|
|
|
} |