Compare commits

...

7 Commits

Author SHA1 Message Date
Michael RICOIS
5f902bd1a5 Options Price 2017-11-28 16:53:20 +01:00
Michael RICOIS
7d07439047 Fix name howknowus 2017-11-14 10:56:01 +01:00
Michael RICOIS
caf254cc00 Merge remote-tracking branch 'origin/livre_dor' 2017-11-14 10:34:52 +01:00
Michael RICOIS
2dcfda48fb Fix date in future 2017-11-14 10:33:45 +01:00
Nolwenn J
058337cb57 log livre d or 2017-11-14 10:24:02 +01:00
Michael RICOIS
9334efa83e Fix base_dir_ssl 2017-11-13 09:55:49 +01:00
Michael RICOIS
a3e9682715 Fix https 2017-11-13 09:51:17 +01:00
9 changed files with 17 additions and 20 deletions

View File

@ -12,7 +12,7 @@ class AdvSiteReviewsDefaultModuleFrontController extends ModuleFrontController
public function __construct()
{
$this->auth = true;
// $this->auth = true;
parent::__construct();
$this->context = Context::getContext();
}
@ -24,7 +24,6 @@ class AdvSiteReviewsDefaultModuleFrontController extends ModuleFrontController
{
parent::initContent();
$reviews = AdvSiteReview::getReviews();
if (!$reviews) {

View File

@ -36,7 +36,7 @@ class AntadisConfiguratorUploadModuleFrontController extends ModuleFrontControll
if(!file_exists($path)) {
mkdir($path, 0755, true);
}
$url = _PS_BASE_URL_.'/upload/simu/'.$id_product.'/'.$reference;
$url = Tools::getShopDomainSsl(true).'/upload/simu/'.$id_product.'/'.$reference;
$options = array(
'upload_dir' => $path.'/',

View File

@ -131,7 +131,7 @@
<div class="custom-file">
<input id="DOUBLECUBEIMAGE" class="configurator-opt-file-cube" name="files" data-field="optgroup-exclusif"
data-url="/configurator/upload/{$id_product}/CUBE"
data-dl="{$base_dir}upload/simu/{$id_product}" type="file">
data-dl="{$base_dir_ssl}upload/simu/{$id_product}" type="file">
<span class="filename">{l s='Aucun fichier' mod='antadissimulator'}</span>
<span class="action">{l s='Choisir un fichier' mod='antadissimulator'}</span></div>
</div>

View File

@ -141,7 +141,7 @@
<div class="custom-file">
<input id="DOUBLECUBEIMAGE" class="configurator-opt-file-pochette" name="files" data-field="optgroup-exclusif"
data-url="/configurator/upload/{$id_product}/POCHETTE"
data-dl="{$base_dir}upload/simu/{$id_product}" type="file">
data-dl="{$base_dir_ssl}upload/simu/{$id_product}" type="file">
<span class="filename">{l s='No file selected' mod='antadissimulator'}</span>
<span class="action">{l s='Choose File' mod='antadissimulator'}</span></div>
</div>

View File

@ -99,7 +99,7 @@
<div class="custom-file">
<input id="DOUBLECUBEIMAGE" class="configurator-opt-file-choco" name="files" data-field="optgroup-exclusif"
data-url="/configurator/upload/{$id_product}"
data-dl="{$base_dir}upload/simu/{$id_product}" type="file">
data-dl="{$base_dir_ssl}upload/simu/{$id_product}" type="file">
<span class="filename">{l s='No file selected' mod='antadissimulator'}</span>
<span class="action">{l s='Choose File' mod='antadissimulator'}</span></div></div>
<span id="response-optgroup-exclusif"></span>

View File

@ -98,7 +98,7 @@
<div class="custom-file">
<input id="DOUBLECUBEIMAGE" class="configurator-opt-file-choco" name="files" data-field="optgroup-exclusif"
data-url="/configurator/upload/{$id_product}"
data-dl="{$base_dir}upload/simu/{$id_product}" type="file">
data-dl="{$base_dir_ssl}upload/simu/{$id_product}" type="file">
<span class="filename">{l s='No file selected' mod='antadissimulator'}</span>
<span class="action">{l s='Choose File' mod='antadissimulator'}</span></div></div>
<span id="response-optgroup-exclusif"></span>

View File

@ -188,7 +188,7 @@ class AdminAntExportOrderController extends ModuleAdminController
$last = Db::getInstance()->getRow('SELECT DATE_FORMAT(`date_start`, "%Y-%m-%d") AS date_start, DATE_FORMAT(`date_end`, "%Y-%m-%d") AS date_end
FROM `'._DB_PREFIX_.$this->table.'` ORDER BY `date_end` DESC');
if ($last == null) {
$dateLast = new DateTime();
$dateLast->sub(new DateInterval('P1D'));
@ -196,10 +196,15 @@ class AdminAntExportOrderController extends ModuleAdminController
$dateLast = new DateTime($last['date_end']);
$dateLast->add(new DateInterval('P1D'));
}
$this->fields_value['date_start'] = $dateLast->format('Y-m-d');
$dateToday = new DateTime();
$dateToday->setTime(0, 0);
if ($dateLast >= $dateToday) {
$this->errors[] = Tools::displayError('You can\'t generate export in the future');
return;
}
$this->fields_value['date_start'] = $dateLast->format('Y-m-d');
$this->fields_value['date_end'] = $dateToday->sub(new DateInterval('P1D'))->format('Y-m-d');
return parent::renderForm();

View File

@ -352,15 +352,8 @@ class Product extends ProductCore
// Prix de l'option
$flatrate = true;
$priceImpact = 0;
if ($id_configurator != null) {
$sql = 'SELECT price FROM `'._DB_PREFIX_.'configurator_storage` WHERE id_configurator = '.(int)$id_configurator.
' AND id_product = '.(int)$id_product;
$priceResult = Db::getInstance()->executeS($sql);
if (count($priceResult) > 0) {
foreach($priceResult as $p) {
$priceImpact += $p['price'];
}
}
if ($id_configurator !== null) {
$priceImpact = self::getConfiguratorSelectedPriceTotal($id_product, $id_configurator);
if ($flatrate === true) {
$priceImpact = $priceImpact / $quantity;
}

View File

@ -103,7 +103,7 @@
<div class="box-content">
<div class="row">
<div class="sm6 form-group">
<input type="text" class="form-control custom-input" value="" required>
<input name="howknowus" type="text" class="form-control custom-input" value="" required>
</div>
</div>
</div>