first commit

This commit is contained in:
2024-10-28 22:14:22 +01:00
commit b65352c452
40581 changed files with 5712079 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
drwxr-xr-x 2 30094 users 4 Oct 6 10:16 .
drwxr-xr-x 4 30094 users 5 Oct 6 10:16 ..
-rw-r--r-- 1 30094 users 2240 Oct 14 2021 AdminZakekeController.php
-rw-r--r-- 1 30094 users 658 Oct 14 2021 index.php

View File

@@ -0,0 +1,65 @@
<?php
/**
* Copyright (C) 2020 Futurenext srl
*
* This file is part of Zakeke.
*
* Zakeke Interactive Product Designer can not be copied and/or distributed
* without the express permission of Futurenext srl
*
* @author Futurenext srl <help@zakeke.com>
* @copyright 2019 Futurenext srl
* @license https://www.zakeke.com/privacy/#general_conditions
*/
class AdminZakekeController extends ModuleAdminController
{
public function ajaxProcessInfo()
{
$id_zakeke = Tools::getValue('id_zakeke', false);
if ($id_zakeke === false) {
$this->errors[] = $this->module->l('id_zakeke is null or empty');
}
try {
/** @var Zakeke $zakeke */
$zakeke = $this->module;
$zipUrl = '';
try {
$zipUrl = $zakeke->getZakekeApi()->getZakekeOutputZip($id_zakeke);
} catch (Exception $e) {
$this->errors[] = $this->module->l('Zakeke cant get the zip file');
$id_order = Tools::getValue('id_order', false);
if ($id_order) {
$order = new Order($id_order);
if (Validate::isLoadedObject($order)) {
$zakekeOrderService = new ZakekeOrderService($zakeke);
$zakekeOrderService->process($order);
}
}
}
$id_zakeke_item = ZakekeItem::zakekeItemId($id_zakeke);
if ($id_zakeke_item === false) {
$this->errors[] = $this->module->l('Zakeke item not found');
}
$zakeke_item = new ZakekeItem($id_zakeke_item);
} catch (Exception $e) {
PrestaShopLogger::addLog('Zakeke AdminZakekeController::ajaxProcessInfo Call error: ' . $e);
$this->errors[] = $this->module->l('Failed to get the design output');
}
if (!$this->errors) {
die(Tools::jsonEncode(array(
'zipUrl' => $zipUrl,
'preview' => $zakeke_item->preview
)));
} else {
die(Tools::jsonEncode(array(
'hasError' => true,
'errors' => $this->errors
)));
}
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* Copyright (C) 2020 Futurenext srl
*
* This file is part of Zakeke.
*
* Zakeke Interactive Product Designer can not be copied and/or distributed
* without the express permission of Futurenext srl
*
* @author Futurenext srl <help@zakeke.com>
* @copyright 2019 Futurenext srl
* @license https://www.zakeke.com/privacy/#general_conditions
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../');
exit;