diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/de.json b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/de.json
index e440133d7..a735c0ff8 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/de.json
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/de.json
@@ -50,5 +50,15 @@
"sync": "Synchronisieren",
"cms_elements": "CMS-Elemente",
"form_elements": "Formular-Elemente",
- "structure_elements": "Struktur-Elemente"
+ "structure_elements": "Struktur-Elemente",
+ "save_layout": "Layout speichern",
+ "load_layout": "Vorlage laden",
+ "save_layout_title": "Layout speichern",
+ "save_layout_description": "Gib einen Namen für deine neue Layout-Vorlage ein.",
+ "load_layout_title": "Vorlage laden",
+ "load_layout_description": "Wähle eine Layout-Vorlage aus, um sie in den Designer zu laden.",
+ "load": "Laden",
+ "enter_layout_name_alert": "Bitte gib einen Namen für das Layout ein.",
+ "save_layout_failed_alert": "Layout konnte nicht gespeichert werden.",
+ "load_layout_confirm": "Möchtest du dieses Layout wirklich laden? Dein aktuelles Design wird überschrieben."
}
\ No newline at end of file
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/en.json b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/en.json
index 51eb548a6..dde43c014 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/en.json
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/i18n/en.json
@@ -50,5 +50,15 @@
"sync": "Sync",
"cms_elements": "CMS Elements",
"form_elements": "Form Elements",
- "structure_elements": "Structure Elements"
+ "structure_elements": "Structure Elements",
+ "save_layout": "Save Layout",
+ "load_layout": "Load Layout",
+ "save_layout_title": "Save Layout",
+ "save_layout_description": "Enter a name for your new layout template.",
+ "load_layout_title": "Load Layout",
+ "load_layout_description": "Select a layout template to load it into the designer.",
+ "load": "Load",
+ "enter_layout_name_alert": "Please enter a name for the layout.",
+ "save_layout_failed_alert": "Failed to save layout.",
+ "load_layout_confirm": "Are you sure you want to load this layout? This will overwrite your current design."
}
\ No newline at end of file
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts
index 1f30567cc..c750e359f 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/lib/api.ts
@@ -48,9 +48,9 @@ export const loadPriceFromApi = async (uuid: string) => {
}
};
-export const saveDesignToApi = async (uuid: string, json: object[]) => {
+export const saveDesignToApi = async (uuid: string, shopUuid: string, json: object[]) => {
try {
- const response = await api.post('api/plugin/system/psc/xmlcalc/product/design', { json: { product: uuid, jsonProduct: json } });
+ const response = await api.post('api/plugin/system/psc/xmlcalc/product/design', { json: { product: uuid, shop: shopUuid, jsonProduct: json } });
return await response.json();
} catch (error) {
console.error('Error saving design to API:', error);
@@ -144,4 +144,34 @@ export const fetchMediaByFolder = async (folderId: string, page: number = 1) =>
}
};
+export const saveLayout = async (name: string, shop: string, data: object[]) => {
+ try {
+ const response = await api.post('api/plugin/custom/psc/formbuilder/layouts/add', { json: { title: name, data: data, shop: shop } });
+ return await response.json();
+ } catch (error) {
+ console.error('Error saving layout:', error);
+ throw error;
+ }
+};
+
+export const fetchLayouts = async (shop: string) => {
+ try {
+ const response = await api.get('api/plugin/custom/psc/formbuilder/layouts/all/' + shop);
+ return await response.json();
+ } catch (error) {
+ console.error('Error fetching layouts:', error);
+ throw error;
+ }
+};
+
+export const fetchPreview = async (shopUuid: string, json: object[]) => {
+ try {
+ const response = await api.post('api/plugin/system/psc/xmlcalc/product/pd', { json: { shop: shopUuid, json: json } });
+ return await response.json();
+ } catch (error) {
+ console.error('Error fetching preview:', error);
+ throw error;
+ }
+};
+
export default api;
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts
index 0adaa28f9..615e5721e 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/stores/Global.ts
@@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import BaseElement from '../model/BaseElement'
import Mode from '../model/Mode'
-import { saveProductToApi, saveFomulasAndParameterToApi, loadJsonFromApi, loadPriceFromApi, savePaperContainerToApi, saveDesignToApi, saveXmlToApi } from '../lib/api'
+import { saveProductToApi, saveFomulasAndParameterToApi, loadJsonFromApi, loadPriceFromApi, savePaperContainerToApi, saveDesignToApi, saveXmlToApi, fetchPreview } from '../lib/api'
import { useItemStore } from './Items'
export const useGlobalStore = defineStore('global', {
@@ -15,6 +15,8 @@ export const useGlobalStore = defineStore('global', {
showDependency: false,
showOptions: false,
showPreview: false,
+ showSaveLayoutDialog: false,
+ showLoadLayoutDialog: false,
sourceDragUuid: "",
dragMode: "",
json: "",
@@ -27,6 +29,9 @@ export const useGlobalStore = defineStore('global', {
saving: false,
syncing: false,
currentTab: 'designer' as string | number,
+ previewData: {} as object,
+ isPreviewLoading: false,
+ previewError: '',
}),
getters: {
getActiveItem: (state) => state.activeItem as BaseElement,
@@ -35,9 +40,11 @@ export const useGlobalStore = defineStore('global', {
isShowOptions: (state) => state.showOptions,
isShowPreview: (state) => state.showPreview,
getSourceDragUuid: (state) => state.sourceDragUuid,
+ getShopUuid: (state) => state.shopUuid,
getDragMode: (state) => state.dragMode,
getFormulaData: (state) => state.formulaData,
getFormulaError: (state) => state.formulaError,
+ getPreviewData: (state) => state.previewData,
},
actions: {
setXml(value: string) {
@@ -82,6 +89,12 @@ export const useGlobalStore = defineStore('global', {
setDragMode(mode: string) {
this.dragMode = mode
},
+ setShowSaveLayoutDialog(value: boolean) {
+ this.showSaveLayoutDialog = value
+ },
+ setShowLoadLayoutDialog(value: boolean) {
+ this.showLoadLayoutDialog = value
+ },
setShopUuid(value: string) {
this.shopUuid = value
},
@@ -122,7 +135,7 @@ export const useGlobalStore = defineStore('global', {
this.json = json
},
saveDesign(json: object[]) {
- saveDesignToApi(this.productUuid, json).then((result: any) => {
+ saveDesignToApi(this.productUuid, this.shopUuid, json).then((result: any) => {
this.setXML(result.xml)
this.setJSON(result.json)
this.formulaData = JSON.parse(result.jsonGraph);
@@ -162,6 +175,19 @@ export const useGlobalStore = defineStore('global', {
},
setCurrentTab(tab: string | number) {
this.currentTab = tab
+ },
+ async loadPreview(json: object[]) {
+ this.isPreviewLoading = true;
+ this.previewError = '';
+ try {
+ const response: any = await fetchPreview(this.shopUuid, json);
+ this.previewData = response;
+ } catch (e: any) {
+ this.previewError = `Failed to load preview data: ${e.message}`;
+ console.error(e);
+ } finally {
+ this.isPreviewLoading = false;
+ }
}
}
})
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts
index d7705b471..403276c50 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/vite.config.ts
@@ -33,7 +33,7 @@ export default defineConfig({
changeOrigin: true,
configure: (proxy) => {
proxy.on('proxyReq', (proxyReq) => {
- proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTQzMjQwMzAsImV4cCI6MTc1NDMyNzYzMCwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.JQV0pGK1C_9sL4-0zLlXBzwMV8tUwCLis9KDUC_5DVOZf8Ujb0Yqgmie9B9DISAGvjtWUSvuUzcbcsV4m2gkNN-6dar-Y6XCC54KbkVCAOhssMp3KsZ1pbCiZ_VdUt78WbAFMkvhToHjjdpD4KqhetQjqFlGF1jYXfJmFzRDHh0YnUfYZDsqgun423JeUXbRYB0sJ3FLQzCuyUDWFvdsQVwCGsgs0ffkro42qMbLXZtdRPaAPZTlEYbE5H-wck1iKvAeEgNuqGJEnk-oEy6UQ1mGUHz7NT5N7NmXhkca2byInCMXhDPn2tmQvte5AKUAte0GELt3FjF5rhk1Iu2rZw');
+ proxyReq.setHeader('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE3NTQ1OTUxMjUsImV4cCI6MTc1NDU5ODcyNSwicm9sZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfU0hPUF9PUEVSQVRPUiIsIlJPTEVfVVNFUiIsIlJPTEVfVVNFUiIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9FZGl0IiwiUk9MRV9QU0NfQ29sbGVjdF9Db250YWN0X0FkZCIsIlJPTEVfUFNDX0NvbGxlY3RfQ29udGFjdF9EZWxldGUiLCJST0xFX1BTQ19Db2xsZWN0X0NvbnRhY3RfTG9jayIsIlJPTEVfUFNDX1IyX1NlbmRjbG91ZF9TaG93Il0sInVpZCI6MX0.C-_PO6C-uFj_6zOtJymfYRsMi0tn-Aq_-HAjpYIqh4rAvY5fTnf54kli1F1bqYogRTqWiTgzPh3EYkPuU7dC8UlCN1eMwXzLFzqtlI7IPPh2UhUvFv6EGix5XTWHnfO-I53vYhrd1qO5Kp--nqFyCCMSaXsRd9daJ7fkbPfGXrwIXPxUeFhhcbMYP4SsUHgS3ZGInM1J_txO62LJHBc91pAtzSliVpUhwJzHjHuiTeC8WTUhdRgVaQo2echLWPfPrMlWolh3cN6wk41wCNivpTIQ4h-a3WVEHvlRz61W9jehzWMiMoTZglmatn8cPsiFFb_nmUacYP5avazXAdpgjA');
});
},
},
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Model/Layout.php b/src/new/var/plugins/Custom/PSC/FormBuilder/Model/Layout.php
new file mode 100644
index 000000000..8705e78cb
--- /dev/null
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Model/Layout.php
@@ -0,0 +1,76 @@
+title;
+ }
+
+ public function setTitle(string $title): void
+ {
+ $this->title = $title;
+ }
+
+ public function getUuid(): string
+ {
+ return $this->uuid;
+ }
+
+ public function setUuid(string $uuid): void
+ {
+ $this->uuid = $uuid;
+ }
+
+ public function getData(): array
+ {
+ return $this->data;
+ }
+
+ public function setData(array $data): void
+ {
+ $this->data = $data;
+ }
+
+ public function getJson(): string
+ {
+ return $this->json;
+ }
+
+ public function setJson(string $json): void
+ {
+ $this->json = $json;
+ }
+
+ public function getShop(): string
+ {
+ return $this->shop;
+ }
+
+ public function setShop(string $shop): void
+ {
+ $this->shop = $shop;
+ }
+}
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/api.yml b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/api.yml
new file mode 100644
index 000000000..d4722774b
--- /dev/null
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/api.yml
@@ -0,0 +1,4 @@
+api_platform:
+ mapping:
+ paths:
+ - './../../Model'
diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/routing.yml b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/routing.yml
index 19bbce0f5..bc17d6d7a 100644
--- a/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/routing.yml
+++ b/src/new/var/plugins/Custom/PSC/FormBuilder/Resources/config/routing.yml
@@ -1,6 +1,9 @@
-psc_backend_component_formbuilder:
+plugin_custom_psc_formbuilder:
resource: "@PluginCustomPSCFormBuilder/Controller/Backend"
type: annotation
prefix: /backend/component/formbuilder
-
+plugin_system_psc_formbuilder_api:
+ resource: "@PluginCustomPSCFormBuilder/Api"
+ type: annotation
+ prefix: /api/plugin/custom/psc/formbuilder
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/Design.php b/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/Design.php
index 212f80e8b..f4a329c18 100644
--- a/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/Design.php
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/Design.php
@@ -57,27 +57,28 @@ class Design extends AbstractController
->getRepository('PSC\Shop\EntityBundle\Entity\Product')
->findOneBy(['uuid' => $data->product]);
+ $selectedShop = $this->shopService->getShopByUid($data->shop);
+
$paperContainer = new PaperContainer();
- $paperContainer->parse(simplexml_load_string($product->getShop()->getInstall()->getPaperContainer()));
+ $paperContainer->parse(simplexml_load_string($selectedShop->getInstall()->getPaperContainer()));
$engine = new Engine();
$engine->setPaperRepository($this->paperDB);
$engine->setPaperContainer($paperContainer);
- if ($product->getShop()->getInstall()->getCalcTemplates() && !$data->test) {
- $engine->setTemplates('
' . $product->getShop()->getInstall()->getCalcTemplates() . '');
+ if ($selectedShop->getInstall()->getCalcTemplates() && !$data->test) {
+ $engine->setTemplates('
' . $selectedShop->getInstall()->getCalcTemplates() . '');
}
- if ($product->getShop()->getInstall()->getCalcTemplatesTest() && $data->test) {
- $engine->setTemplates('
' . $product->getShop()->getInstall()->getCalcTemplatesTest() . '');
+ if ($selectedShop->getInstall()->getCalcTemplatesTest() && $data->test) {
+ $engine->setTemplates('
' . $selectedShop->getInstall()->getCalcTemplatesTest() . '');
}
$engine->loadJson(json_encode($data->jsonProduct));
if (!$data->test) {
- $engine->setFormulas($product->getShop()->getFormel());
- $engine->setParameters($product->getShop()->getParameter());
+ $engine->setFormulas($selectedShop->getFormel());
+ $engine->setParameters($selectedShop->getParameter());
}
if ($data->test) {
- $engine->setFormulas($product->getShop()->getTestFormel());
- $engine->setParameters($product->getShop()->getTestParameter());
+ $engine->setFormulas($selectedShop->getTestFormel());
+ $engine->setParameters($selectedShop->getTestParameter());
}
- // $engine->setVariables($data->values);
$engine->setTax($product->getMwert());
if ($this->tokenStorage->getToken()) {
$contact = new Contact();
@@ -90,12 +91,12 @@ class Design extends AbstractController
return $this->json([
'json' => $engine->generateJson(),
'parameter' => $engine->getParameters(),
- 'paperContainer' => $product->getShop()->getInstall()->getPaperContainer(),
+ 'paperContainer' => $selectedShop->getInstall()->getPaperContainer(),
'formulas' => $engine->getFormulas(),
'xml' => $engine->generateXML(true),
'jsonGraph' => $engine->getCalcGraph()->generateJsonGraph(),
'price' => $engine->getPrice() * 100,
- 'shopUuid' => $product->getShop()->getUid(),
+ 'shopUuid' => $selectedShop->getUid(),
]);
}
}
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/PreviewDesigner.php b/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/PreviewDesigner.php
new file mode 100644
index 000000000..efad47c7f
--- /dev/null
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Api/Product/PreviewDesigner.php
@@ -0,0 +1,206 @@
+shopService = $shopService;
+ $this->documentManager = $documentManager;
+ $this->entityManager = $entityManager;
+ $this->tokenStorage = $tokenStorage;
+ $this->paperDB = $paperDB;
+ $this->contactTransformer = $contactTransformer;
+ $this->helpService = $helpService;
+ }
+
+ #[Route(path: '/product/pd', methods: ['POST'])]
+ #[OpenApiResponse(
+ response: 200,
+ description: 'generate preview for new designer',
+ content: new JsonContent(ref: new Model(type: PDOutput::class)),
+ )]
+ #[Tag(name: 'Plugin/System/psc/Xmlcalc/Price')]
+ #[RequestBody(ref: new Model(type: PDInput::class))]
+ #[ParamConverter('data', class: '\Plugin\System\PSC\XmlCalc\Dto\Input\PDInput', converter: 'psc_rest.request_body')]
+ public function preview(PDInput $data)
+ {
+ $output = new \Plugin\System\PSC\XmlCalc\Dto\Output\Product\PDOutput();
+
+ $shop = $this->shopService->getShopByUid($data->shop);
+
+ $paperContainer = new PaperContainer();
+ $paperContainer->parse(simplexml_load_string($shop->getInstall()->getPaperContainer()));
+ $engine = new Engine();
+ $engine->setPaperRepository($this->paperDB);
+ $engine->setPaperContainer($paperContainer);
+ $engine->setTemplates('
' . $shop->getInstall()->getCalcTemplates() . '');
+ $engine->loadJson(json_encode($data->json));
+ $engine->setFormulas($shop->getFormel());
+ $engine->setParameters($shop->getParameter());
+ $engine->setVariables($data->values);
+ if ($this->tokenStorage->getToken()) {
+ $contact = new Contact();
+ $this->contactTransformer->fromDb($contact, $this->tokenStorage->getToken()->getUser());
+ $engine->setVariable('contact.accountType', $contact->getAccountType()->value);
+ $engine->setVariable('contact.account', $contact->getAccount()->getUid());
+ }
+
+ $engine->setTax(19);
+ $output->netto = $engine->getPrice() * 100;
+ $output->tax = $engine->getTaxPrice() * 100;
+ $output->brutto = $engine->getCompletePrice() * 100;
+
+ /**
+ * @var Base $option
+ */
+ foreach ($engine->getArticle()->getOptions() as $option) {
+ $tmp = new Element();
+ $tmp->name = $option->getName();
+ $tmp->required = $option->isRequire();
+ if (is_array($option->getRawValue())) {
+ $tmp->rawValues = $option->getRawValue();
+ } else {
+ $tmp->rawValue = $option->getRawValue();
+ }
+ if ($option->getDefault()) {
+ $tmp->defaultValue = $option->getDefault();
+ }
+ $tmp->value = $option->getValue();
+
+ if ($help = $this->helpService->getHelp(null, $option->getId())) {
+ $tmp->help = $help->helpText;
+ $tmp->helpTitle = $help->helpTitle;
+ } else {
+ $tmp->help = $option->getHelp();
+ $tmp->helpLink = $option->getHelpLink();
+ }
+ $tmp->id = $option->getId();
+ $tmp->valid = $option->isValid();
+ $tmp->htmlType = $option->type;
+ $tmp->displayGroup = $option->getDisplayGroup();
+
+ if ($option->type == 'select' || $option->type == 'checkbox' || $option->type == 'radio') {
+ /**
+ * @var Opt $option
+ */
+ if ($option instanceof ColorDBSelect) {
+ $tmp->colorSystem = $option->getColorSystem();
+ if (!isset($output->colorDb[$option->getColorSystem()])) {
+ $output->colorDb[$option->getColorSystem()] = [];
+ foreach ($option->getOptions() as $opt) {
+ $element = array_find((array) $option->getSelectedOptions(), function (Opt $o1) use ($opt) {
+ return $o1->getId() === $opt->getId();
+ });
+ $tmpOpt = new Option();
+ $tmpOpt->id = $opt->getId();
+ $tmpOpt->name = $opt->getLabel();
+ $tmpOpt->prefix = $opt->getPrefix();
+ $tmpOpt->suffix = $opt->getSuffix();
+ $tmpOpt->valid = $opt->isValid();
+ $tmpOpt->selected = $element ? true : false;
+ $output->colorDb[$option->getColorSystem()][] = $tmpOpt;
+ }
+ }
+ } else {
+ foreach ($option->getOptions() as $opt) {
+ $element = array_find((array) $option->getSelectedOptions(), function (Opt $o1) use ($opt) {
+ return $o1->getId() === $opt->getId();
+ });
+
+ if ($option instanceof DeliverySelect) {
+ $tmpOpt = new Option();
+ $tmpOpt->id = $opt->getId();
+ $tmpOpt->name = $opt->getLabel();
+ $tmpOpt->valid = $opt->isValid();
+ $tmpOpt->selected = $element ? true : false;
+ $tmpOpt->info = $opt->getInfo();
+ $tmpOpt->deliveryDate = $opt->getDeliveryDateAsString();
+ } else {
+ $tmpOpt = new Option();
+ $tmpOpt->id = $opt->getId();
+ $tmpOpt->name = $opt->getLabel();
+ $tmpOpt->valid = $opt->isValid();
+ $tmpOpt->selected = $element ? true : false;
+ }
+ $tmp->options[] = $tmpOpt;
+ }
+ }
+ }
+ if ($option->type == 'input') {
+ $tmp->minValue = $option->getMinValue();
+ $tmp->maxValue = $option->getMaxValue();
+ $tmp->placeHolder = $option->getPlaceHolder();
+ $tmp->pattern = $option->getPattern();
+ foreach ($option->getValidationErrors() as $error) {
+ if ($error instanceof PSCMin) {
+ $tmp->validationErrors[] = new Min($tmp->value, $option->getMinValue());
+ }
+ if ($error instanceof Max) {
+ $tmp->validationErrors[] = new PluginMax($tmp->value, $option->getMaxValue());
+ }
+ }
+ }
+
+ $output->elements[] = $tmp;
+ }
+ return $this->json($output);
+ }
+}
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/DesignInput.php b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/DesignInput.php
index 3a1f04658..736b62065 100644
--- a/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/DesignInput.php
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/DesignInput.php
@@ -2,36 +2,27 @@
namespace Plugin\System\PSC\XmlCalc\Dto\Input;
-use Nelmio\ApiDocBundle\Annotation\Model;
-use OpenApi\Annotations as OA;
+use OpenApi\Attributes as OA;
+use OpenApi\Attributes\Items;
+use OpenApi\Attributes\Property;
final class DesignInput
{
- /**
- * @var string
- *
- * @OA\Property(type="string")
- */
+ #[Property(type: 'string')]
public string $product;
- /**
- * @var array
- *
- * @OA\Property(type="array", @OA\Items(type="array", @OA\Items()))
- */
+ #[Property(type: 'string')]
+ public string $shop;
+
+ #[Property(type: 'array', items: new Items(
+ type: 'array',
+ items: new Items(),
+ ))]
public array $jsonProduct = [];
- /**
- * @var bool
- *
- * @OA\Property(type="boolean")
- */
+ #[Property(type: 'boolean')]
public bool $test = false;
- /**
- * @var array
- *
- * @OA\Property(type="array", @OA\Items(type="string"))
- */
+ #[Property(type: 'array', items: new Items(type: 'string'))]
public array $values = ['auflage' => 100];
}
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/PDInput.php b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/PDInput.php
new file mode 100644
index 000000000..21d859f3b
--- /dev/null
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Input/PDInput.php
@@ -0,0 +1,21 @@
+ 100];
+}
diff --git a/src/new/var/plugins/System/PSC/XmlCalc/Dto/Output/Product/PDOutput.php b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Output/Product/PDOutput.php
new file mode 100644
index 000000000..c590fdc5e
--- /dev/null
+++ b/src/new/var/plugins/System/PSC/XmlCalc/Dto/Output/Product/PDOutput.php
@@ -0,0 +1,32 @@
+Route->findOne(array('shop_id' => (string)$this->shop->id, 'url' => '/'.$controller.'/'.$action));
+ $route = $dbMongo->Route->findOne([
+ 'shop_id' => (string) $this->shop->id,
+ 'url' => '/' . $controller . '/' . $action,
+ ]);
if ($route) {
$str = '';
if ($params) {
@@ -28,7 +31,7 @@ class TP_Controller_Action extends Zend_Controller_Action
$str .= $key . '=' . $value . '&';
}
}
- $this->redirect($route->parameter->getArrayCopy()['target'] .'?'.$str);
+ $this->redirect($route->parameter->getArrayCopy()['target'] . '?' . $str);
}
$this->forward($action, $controller, $module, $params);
}
@@ -37,7 +40,7 @@ class TP_Controller_Action extends Zend_Controller_Action
{
$dbMongo = TP_Mongo::getInstance();
- $route = $dbMongo->Route->findOne(array('shop_id' => (string)$this->shop->id, 'url' => $url));
+ $route = $dbMongo->Route->findOne(['shop_id' => (string) $this->shop->id, 'url' => $url]);
if ($route) {
$this->redirect($route->parameter->getArrayCopy()['target']);
@@ -47,7 +50,6 @@ class TP_Controller_Action extends Zend_Controller_Action
public function init()
{
-
parent::init();
$this->view->articlegroupss = [];
@@ -64,7 +66,10 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($conf['id'] == $confinstall['defaultmarket']) {
$this->view->subshop = false;
} else {
- $shopMarket = Doctrine_Query::create()->from('Shop c')->where('c.id = ?', array($confinstall['defaultmarket']))->fetchOne();
+ $shopMarket = Doctrine_Query::create()
+ ->from('Shop c')
+ ->where('c.id = ?', [$confinstall['defaultmarket']])
+ ->fetchOne();
$this->view->marktplatzurl = $shopMarket->Domain[0]->name;
$this->view->marktplatzname = $shopMarket->name;
@@ -72,10 +77,15 @@ class TP_Controller_Action extends Zend_Controller_Action
}
$backurl = new Zend_Session_Namespace('backbutton');
if (!isset($backurl->urls) || $backurl->urls == null) {
- $backurl->urls = array();
+ $backurl->urls = [];
}
- if (isset($_SERVER['HTTP_REFERER']) && !strpos($_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']) && !strpos($_SERVER['REQUEST_URI'], 'styles') && !strpos($_SERVER['REQUEST_URI'], 'upload') && (!isset($backurl->urls[0]) || $_SERVER['HTTP_REFERER'] != $backurl->urls[0])) {
-
+ if (
+ isset($_SERVER['HTTP_REFERER']) &&
+ !strpos($_SERVER['HTTP_REFERER'], $_SERVER['REQUEST_URI']) &&
+ !strpos($_SERVER['REQUEST_URI'], 'styles') &&
+ !strpos($_SERVER['REQUEST_URI'], 'upload') &&
+ (!isset($backurl->urls[0]) || $_SERVER['HTTP_REFERER'] != $backurl->urls[0])
+ ) {
array_unshift($backurl->urls, $_SERVER['HTTP_REFERER']);
$backurl->urls = array_slice($backurl->urls, 0, 10);
@@ -86,18 +96,25 @@ class TP_Controller_Action extends Zend_Controller_Action
if (isset($backurl->urls[1])) {
$this->view->backurl1 = $backurl->urls[1];
}
- $this->view->shop = Doctrine_Query::create()->from('Shop s')->where('s.id = ?')->fetchOne(array(
- $conf['id']));
+ $this->view->shop = Doctrine_Query::create()
+ ->from('Shop s')
+ ->where('s.id = ?')
+ ->fetchOne([
+ $conf['id'],
+ ]);
if (Zend_Auth::getInstance()->hasIdentity()) {
$user = Zend_Auth::getInstance()->getIdentity();
$accountPath = $this->getAccountTemplatePath($user['account_id']);
- if ($accountPath != "") {
+ if ($accountPath != '') {
$conf['layout'] = $accountPath;
- if(file_exists(APPLICATION_PATH . '/design/clients/' . $this->view->shop->uid . '/' . $accountPath)) {
- Zend_Registry::set('layout_path', APPLICATION_PATH . '/design/clients/' . $this->view->shop->uid . '/' . $accountPath . '');
- }else{
- Zend_Registry::set('layout_path', APPLICATION_PATH . '/design/vorlagen/' . $accountPath . '');
+ if (file_exists(APPLICATION_PATH . '/design/clients/' . $this->view->shop->uid . '/' . $accountPath)) {
+ Zend_Registry::set(
+ 'layout_path',
+ APPLICATION_PATH . '/design/clients/' . $this->view->shop->uid . '/' . $accountPath . '',
+ );
+ } else {
+ Zend_Registry::set('layout_path', APPLICATION_PATH . '/design/vorlagen/' . $accountPath . '');
}
}
}
@@ -112,14 +129,14 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->_configPath = APPLICATION_PATH . '/design/vorlagen/' . $conf['layout'] . '/config';
}
-
-
$this->view->addHelperPath(APPLICATION_PATH . '/helpers', 'TP_View_Helper');
if ($conf['customtemplates'] == 1 && !isset($_REQUEST['testMode'])) {
$this->view->designPath = 'styles/vorlagen/' . $conf['layout'] . '/';
+ Zend_Layout::getMvcInstance()->setLayoutPath(Zend_Registry::get('layout_path') . '/layout/');
$this->view->setScriptPath(Zend_Registry::get('layout_path') . '/templates');
+ $this->view->addScriptPath(Zend_Registry::get('layout_path') . '/layout/');
$this->view->addBasePath($this->_mailPath);
$this->view->addBasePath($this->_articletemplatePath);
} else {
@@ -129,7 +146,12 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->view->designPath = 'styles/vorlagen/' . $_REQUEST['testLayout'] . '/';
}
} elseif (strpos('/' . $conf['layout'], '..')) {
- $this->view->designPath = str_replace("subshopdesigns", "design/subshopdesigns", str_replace("..", "styles", $conf['layout'])) . '/';
+ $this->view->designPath =
+ str_replace(
+ 'subshopdesigns',
+ 'design/subshopdesigns',
+ str_replace('..', 'styles', $conf['layout']),
+ ) . '/';
} elseif (file_exists('styles/' . $conf['uid'] . '/design/' . $conf['layout'])) {
$this->view->designPath = 'styles/' . $conf['uid'] . '/design/' . $conf['layout'] . '/';
} else {
@@ -144,49 +166,88 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($this->view->shop->market) {
$install = Zend_Registry::get('install');
- $market = Doctrine_Query::create()->from('Shop s')->where('s.id = ?')->fetchOne(array(
- $confinstall['defaultmarket']));
- if (file_exists(APPLICATION_PATH . '/design/clients/' . $market->uid . '/subshopdesigns/public/' . $this->view->shop->layout . '/templates/index/ms.phtml')) {
- $this->view->addBasePath(APPLICATION_PATH . '/design/clients/' . $market->uid . '/subshopdesigns/public/' . $this->view->shop->layout . '/articletemplates');
- $this->view->addScriptPath(APPLICATION_PATH . '/design/clients/' . $market->uid . '/subshopdesigns/public/' . $this->view->shop->layout . '/templates');
+ $market = Doctrine_Query::create()
+ ->from('Shop s')
+ ->where('s.id = ?')
+ ->fetchOne([
+ $confinstall['defaultmarket'],
+ ]);
+ if (
+ file_exists(
+ APPLICATION_PATH .
+ '/design/clients/' .
+ $market->uid .
+ '/subshopdesigns/public/' .
+ $this->view->shop->layout .
+ '/templates/index/ms.phtml',
+ )
+ ) {
+ $this->view->addBasePath(
+ APPLICATION_PATH .
+ '/design/clients/' .
+ $market->uid .
+ '/subshopdesigns/public/' .
+ $this->view->shop->layout .
+ '/articletemplates',
+ );
+ $this->view->addScriptPath(
+ APPLICATION_PATH .
+ '/design/clients/' .
+ $market->uid .
+ '/subshopdesigns/public/' .
+ $this->view->shop->layout .
+ '/templates',
+ );
}
}
$this->view->addBasePath($this->_mailPath);
$this->view->addBasePath($this->_articletemplatePath);
}
- $this->view->term = "Suchbegriff eingeben";
+ $this->view->term = 'Suchbegriff eingeben';
$this->shop = $this->view->shop;
- $artCount = Doctrine_Query::create()->from('Article a')
- ->where('a.shop_id = ? AND a.private = 0 AND a.enable = 1', array($this->shop->id))->execute()->count();
+ $artCount = Doctrine_Query::create()
+ ->from('Article a')
+ ->where('a.shop_id = ? AND a.private = 0 AND a.enable = 1', [$this->shop->id])
+ ->execute()
+ ->count();
$this->view->finisharticles = $artCount;
$filter = new TP_Themesfilter();
$this->view->filter = $filter;
- $this->view->messages = array();
+ $this->view->messages = [];
$this->view->title = $this->view->shop->title;
$this->view->subtitle = $this->view->shop->subtitle;
$this->view->logo1 = $this->view->shop->logo1;
$this->view->logo2 = $this->view->shop->logo2;
- $this->view->actmenu = array();
+ $this->view->actmenu = [];
$this->view->actmenu[] = $this->getRequest()->getActionName();
$this->install = $this->view->shop->Install;
- if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) {
- $this->view->basepath = 'https://' . $_SERVER["SERVER_NAME"];
+ if (
+ isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ||
+ isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'
+ ) {
+ $this->view->basepath = 'https://' . $_SERVER['SERVER_NAME'];
} else {
- $this->view->basepath = 'http://' . $_SERVER["SERVER_NAME"];
+ $this->view->basepath = 'http://' . $_SERVER['SERVER_NAME'];
if ($this->shop->isRedirectToSSL() && strpos($_SERVER['REQUEST_URI'], 'service/template') === false) {
- header('Location: '. 'https://' . $_SERVER["SERVER_NAME"].$_SERVER['REQUEST_URI']);
+ header('Location: https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
die();
}
}
$this->view->redirect_ssl_path = $this->view->basepath;
- if ($this->install->redirect_ssl && ($this->getRequest()->getControllerName() == 'basket' || $this->getRequest()->getControllerName() == 'user')) {
- $this->view->redirect_ssl_path = 'https://' . $_SERVER["SERVER_NAME"];
+ if (
+ $this->install->redirect_ssl &&
+ (
+ $this->getRequest()->getControllerName() == 'basket' ||
+ $this->getRequest()->getControllerName() == 'user'
+ )
+ ) {
+ $this->view->redirect_ssl_path = 'https://' . $_SERVER['SERVER_NAME'];
}
$translate = Zend_Registry::get('Zend_Translate');
@@ -215,12 +276,13 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($conf['customtemplates'] == 1) {
$translate->addTranslation($translation, Zend_Registry::get('locale'));
} else {
-
if (file_exists($translation)) {
$translate->addTranslation($translation, Zend_Registry::get('locale'));
} else {
-
- $translate->addTranslation(APPLICATION_PATH . '/design/vorlagen/' . $conf['layout'] . '/locale', Zend_Registry::get('locale'));
+ $translate->addTranslation(
+ APPLICATION_PATH . '/design/vorlagen/' . $conf['layout'] . '/locale',
+ Zend_Registry::get('locale'),
+ );
}
}
$translate->setLocale(Zend_Registry::get('locale'));
@@ -245,29 +307,35 @@ class TP_Controller_Action extends Zend_Controller_Action
$dbMongo = TP_Mongo::getInstance();
foreach ($container->getPages() as $page) {
- $route = $dbMongo->Route->findOne(array('url' => $page->getHref()));
+ $route = $dbMongo->Route->findOne(['url' => $page->getHref()]);
if ($route) {
$page->setUri($route->parameter->getArrayCopy()['target']);
-
}
foreach ($page->getPages() as $subPage) {
- $route = $dbMongo->Route->findOne(array('url' => $subPage->getHref()));
+ $route = $dbMongo->Route->findOne(['url' => $subPage->getHref()]);
if ($route) {
$subPage->setUri($route->parameter->getArrayCopy()['target']);
}
foreach ($subPage->getPages() as $subSubPage) {
- $route = $dbMongo->Route->findOne(array('url' => $subSubPage->getHref()));
+ $route = $dbMongo->Route->findOne(['url' => $subSubPage->getHref()]);
if ($route) {
$subSubPage->setUri($route->parameter->getArrayCopy()['target']);
}
-
}
}
}
- $rows = Doctrine_Query::create()->from('Cms m')->where('private = 0 AND enable = 1 AND notinmenu != 1 AND shop_id = ? AND (language = ? OR language = \'all\') AND parent = 0', array(
+ $rows = Doctrine_Query::create()
+ ->from('Cms m')
+ ->where(
+ 'private = 0 AND enable = 1 AND notinmenu != 1 AND shop_id = ? AND (language = ? OR language = \'all\') AND parent = 0',
+ [
intval($conf['id']),
- Zend_Registry::get('locale')))->orderBy('sor ASC')->execute();
+ Zend_Registry::get('locale'),
+ ],
+ )
+ ->orderBy('sor ASC')
+ ->execute();
$page = $container->findOneBy('label', 'Home');
foreach ($rows as $row) {
@@ -275,42 +343,61 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->getCms($page, $pagepos, $row, $container);
}
- $articlegroupsd = Doctrine_Query::create()->from('ArticleGroup c')->where('c.shop_id = ? AND c.notinmenu = 0 AND c.enable = 1 AND (c.parent=0 OR c.parent is null) AND (language = ? OR language = \'all\')', array(
+ $articlegroupsd = Doctrine_Query::create()
+ ->from('ArticleGroup c')
+ ->where(
+ 'c.shop_id = ? AND c.notinmenu = 0 AND c.enable = 1 AND (c.parent=0 OR c.parent is null) AND (language = ? OR language = \'all\')',
+ [
$this->shop->id,
- Zend_Registry::get('locale')))->orderBy('c.pos ASC')->execute();
+ Zend_Registry::get('locale'),
+ ],
+ )
+ ->orderBy('c.pos ASC')
+ ->execute();
+ $container
+ ->findOneBy('id', 'Home')
+ ->addPage([
+ 'label' => 'Articlegroups',
+ 'id' => 'Articlegroups',
+ 'uri' => '/overview',
+ ]);
- $container->findOneBy('id', 'Home')->addPage(array(
- 'label' => 'Articlegroups',
- 'id' => 'Articlegroups',
- 'uri' => '/overview'));
-
- $container->findOneBy('id', 'Home')->addPage(array(
- 'label' => 'ArticlegroupsArticle',
- 'id' => 'ArticlegroupsArticle',
- 'uri' => '/overview/'));
+ $container
+ ->findOneBy('id', 'Home')
+ ->addPage([
+ 'label' => 'ArticlegroupsArticle',
+ 'id' => 'ArticlegroupsArticle',
+ 'uri' => '/overview/',
+ ]);
$page = $container->findOneBy('id', 'Articlegroups');
$pageart = $container->findOneBy('id', 'ArticlegroupsArticle');
if ($this->shop->template_navi_display_all) {
- $page->addPage(array(
+ $page->addPage([
'label' => 'All',
'id' => 'All',
- 'uri' => '/overview'));
+ 'uri' => '/overview',
+ ]);
}
foreach ($articlegroupsd as $articlegroup) {
$this->getArticleGroups($page, $pageart, $articlegroup, $container);
}
- $container->findOneBy('id', 'Article')->setOptions(array('uri' => $this->view->backurl));
+ $container->findOneBy('id', 'Article')->setOptions(['uri' => $this->view->backurl]);
- $temp = array();
+ $temp = [];
if ($this->install->id != 7) {
- $articles = Doctrine_Query::create()->from('ArticleGroupArticle c')->leftJoin('c.Article a')->where('a.shop_id = ? AND a.private = 0 AND c.articlegroup_id = ? AND a.enable = 1', array(
- $this->shop->id,
- $group))->execute();
+ $articles = Doctrine_Query::create()
+ ->from('ArticleGroupArticle c')
+ ->leftJoin('c.Article a')
+ ->where('a.shop_id = ? AND a.private = 0 AND c.articlegroup_id = ? AND a.enable = 1', [
+ $this->shop->id,
+ $group,
+ ])
+ ->execute();
foreach ($articles as $art) {
array_push($temp, $art->Article);
@@ -322,8 +409,12 @@ class TP_Controller_Action extends Zend_Controller_Action
Zend_Registry::set('params', $this->getRequest()->getParams());
if (Zend_Auth::getInstance()->hasIdentity()) {
$user = Zend_Auth::getInstance()->getIdentity();
- $user = Doctrine_Query::create()->from('Contact m')->where('id = ?')->fetchOne(array(
- $user['id']));
+ $user = Doctrine_Query::create()
+ ->from('Contact m')
+ ->where('id = ?')
+ ->fetchOne([
+ $user['id'],
+ ]);
$this->user = $user;
$this->view->user = $user;
if ($user != false) {
@@ -341,14 +432,17 @@ class TP_Controller_Action extends Zend_Controller_Action
}
if ($this->shop->uid == '0001-557e6b9d-531afcb3-9700-4e8b7d8a') {
-
$budget = json_decode($user->self_information, true);
$this->view->budget = $budget;
}
$this->view->my_articles = 0;
if ($this->install->id != 7) {
- $this->view->my_articles = Doctrine_Query::create()->from('ContactArticle c')->where('c.contact_id = ?', array($user['id']))->execute()->count();
+ $this->view->my_articles = Doctrine_Query::create()
+ ->from('ContactArticle c')
+ ->where('c.contact_id = ?', [$user['id']])
+ ->execute()
+ ->count();
}
}
@@ -357,23 +451,36 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($this->getRequest()->getParam('sek_admin') == 'new' && $this->view->admin == true) {
$mode->over_ride_contact = 'new';
- $mode->over_ride_contact_id = "";
+ $mode->over_ride_contact_id = '';
} elseif ($this->getRequest()->getParam('sek_admin') == 'no') {
$mode->over_ride_contact = false;
- $mode->over_ride_contact_id = "";
+ $mode->over_ride_contact_id = '';
} elseif ($this->view->admin && $this->getRequest()->getParam('sek_admin') == 'user') {
-
- $row = Doctrine_Query::create()->select()->from('Contact c')->leftJoin('c.Shops s')
- ->where('s.id = ? AND c.id = ?', array($this->shop->id, $this->getRequest()->getParam('sek_admin_user')))->execute()->count();
+ $row = Doctrine_Query::create()
+ ->select()
+ ->from('Contact c')
+ ->leftJoin('c.Shops s')
+ ->where('s.id = ? AND c.id = ?', [
+ $this->shop->id,
+ $this->getRequest()->getParam('sek_admin_user'),
+ ])
+ ->execute()
+ ->count();
if ($row > 0) {
$mode->over_ride_contact = $this->getRequest()->getParam('sek_admin_user');
$mode->over_ride_contact_id = $this->getRequest()->getParam('sek_admin_user_id');
}
} elseif ($this->user->is_sek && $this->getRequest()->getParam('sek_admin') == 'user') {
-
- $row = Doctrine_Query::create()->select()->from('Contact c')
- ->where('c.id = ? AND c.account_id = ?', array($this->getRequest()->getParam('sek_admin_user'), $this->user->account_id))->execute()->count();
+ $row = Doctrine_Query::create()
+ ->select()
+ ->from('Contact c')
+ ->where('c.id = ? AND c.account_id = ?', [
+ $this->getRequest()->getParam('sek_admin_user'),
+ $this->user->account_id,
+ ])
+ ->execute()
+ ->count();
if ($row > 0) {
$mode->over_ride_contact = $this->getRequest()->getParam('sek_admin_user');
@@ -382,38 +489,42 @@ class TP_Controller_Action extends Zend_Controller_Action
}
}
-
-
$uri = $this->_request->getPathInfo();
- if (strpos($uri, "/mode")) {
- $activeNav = $container->findAllBy('uri', substr($uri, 0, strpos($uri, "/mode")));
+ if (strpos($uri, '/mode')) {
+ $activeNav = $container->findAllBy('uri', substr($uri, 0, strpos($uri, '/mode')));
} else {
$activeNav = $container->findAllBy('uri', $uri);
}
foreach ($activeNav as $an) {
$an->active = true;
- $an->setClass("active");
+ $an->setClass('active');
}
$this->view->activeNav = $uri;
$this->view->navigation($container);
- if ($conf['keywords'] != "") {
+ if ($conf['keywords'] != '') {
$this->view->headMeta()->setName('keywords', $conf['keywords']);
}
- if ($conf['author'] != "") {
+ if ($conf['author'] != '') {
$this->view->headMeta()->setName('author', $conf['author']);
}
- if ($conf['description'] != "") {
+ if ($conf['description'] != '') {
$this->view->headMeta()->setName('description', $conf['description']);
}
- if ($conf['copyright'] != "") {
+ if ($conf['copyright'] != '') {
$this->view->headMeta()->setName('copyright', $conf['copyright']);
}
- if ($this->shop->private && !Zend_Auth::getInstance()->hasIdentity() && $this->getRequest()->getParam('controller') != 'user' && $this->getRequest()->getParam('controller') != 'cms' && $this->getRequest()->getParam('action') != 'login') {
+ if (
+ $this->shop->private &&
+ !Zend_Auth::getInstance()->hasIdentity() &&
+ $this->getRequest()->getParam('controller') != 'user' &&
+ $this->getRequest()->getParam('controller') != 'cms' &&
+ $this->getRequest()->getParam('action') != 'login'
+ ) {
$this->_redirect('/user/login');
}
@@ -436,7 +547,8 @@ class TP_Controller_Action extends Zend_Controller_Action
$motive = Doctrine_Query::create()
->from('ContactMotiv c')
->leftJoin('c.Motiv as d')
- ->where('d.shop_id = ? AND c.contact_id = ?', array($this->shop->id, $this->user->id))->count();
+ ->where('d.shop_id = ? AND c.contact_id = ?', [$this->shop->id, $this->user->id])
+ ->count();
$this->view->myfavcount = $motive;
} else {
@@ -453,13 +565,12 @@ class TP_Controller_Action extends Zend_Controller_Action
}
$this->view->display_top_modul = $this->shop->display_top_modul;
- if ($this->shop->display_top_modul && $this->shop->top_modul_settings != "") {
-
+ if ($this->shop->display_top_modul && $this->shop->top_modul_settings != '') {
$xml = simplexml_load_string($this->shop->top_modul_settings);
- $modul = array();
+ $modul = [];
foreach ($xml as $item) {
- $temp = array();
+ $temp = [];
$limit = 10;
$sort = 'DESC';
@@ -470,32 +581,38 @@ class TP_Controller_Action extends Zend_Controller_Action
$sort = 'ASC';
}
- if (isset($item['query']) && (strpos('t' . strtolower($item['query']), 'update') || strpos('t' . strtolower($item['query']), 'delete') || strpos('t' . strtolower($item['query']), 'replace'))) {
+ if (
+ isset($item['query']) &&
+ (
+ strpos('t' . strtolower($item['query']), 'update') ||
+ strpos('t' . strtolower($item['query']), 'delete') ||
+ strpos('t' . strtolower($item['query']), 'replace')
+ )
+ ) {
continue;
}
$temp['title'] = (string) $item;
if ($item['modul'] == 'product' && isset($item['mode'])) {
-
switch ($item['mode']) {
- case "rate":
+ case 'rate':
$order = 'ratesum ' . $sort;
$temp['link'] = '/overview/all/mode//page/1/sort/rate/' . $sort;
break;
- case "visits":
+ case 'visits':
$order = 'c.visits ' . $sort;
$temp['link'] = '/overview/all/mode//page/1/sort/visits/' . $sort;
break;
- case "price":
+ case 'price':
$order = 'c.a4_abpreis ' . $sort;
$temp['link'] = '/overview/all/mode//page/1/sort/price/' . $sort;
break;
- case "date":
+ case 'date':
$order = 'c.created ' . $sort;
$temp['link'] = '/overview/all/mode//page/1/sort/date/' . $sort;
break;
- case "top":
+ case 'top':
default:
$order = 'c.used ' . $sort;
$temp['link'] = '/overview/all/mode//page/1/sort/buy/' . $sort;
@@ -504,35 +621,62 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($item['mode'] == 'sql') {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->query(str_replace('WHERE', 'WHERE a.install_id = ' . $this->shop->install_id . ' AND a.enable = 1 AND a.private = 0 AND', $item['query']));
+ $articles = Doctrine_Query::create()->query(str_replace(
+ 'WHERE',
+ 'WHERE a.install_id = ' .
+ $this->shop->install_id .
+ ' AND a.enable = 1 AND a.private = 0 AND',
+ $item['query'],
+ ));
} else {
- $articles = Doctrine_Query::create()->query(str_replace('WHERE', 'WHERE a.shop_id = ' . $this->shop->id . ' AND a.enable = 1 AND a.private = 0 AND', $item['query']));
+ $articles = Doctrine_Query::create()->query(str_replace(
+ 'WHERE',
+ 'WHERE a.shop_id = ' . $this->shop->id . ' AND a.enable = 1 AND a.private = 0 AND',
+ $item['query'],
+ ));
}
} else {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->select('*, (c.rate/c.rate_count) as ratesum')->from('Article c')->where('c.install_id = ? AND c.enable = 1 AND c.private = 0 AND c.enable = 1 AND c.display_market = 1', array($this->shop->install_id))->orderBy($order)->limit($limit)->execute();
+ $articles = Doctrine_Query::create()
+ ->select('*, (c.rate/c.rate_count) as ratesum')
+ ->from('Article c')
+ ->where(
+ 'c.install_id = ? AND c.enable = 1 AND c.private = 0 AND c.enable = 1 AND c.display_market = 1',
+ [$this->shop->install_id],
+ )
+ ->orderBy($order)
+ ->limit($limit)
+ ->execute();
} else {
- $articles = Doctrine_Query::create()->select('*, (c.rate/c.rate_count) as ratesum')->from('Article c')->where('c.shop_id = ? AND c.enable = 1 AND c.private = 0 AND c.enable = 1', array($this->shop->id))->orderBy($order)->limit($limit)->execute();
+ $articles = Doctrine_Query::create()
+ ->select('*, (c.rate/c.rate_count) as ratesum')
+ ->from('Article c')
+ ->where(
+ 'c.shop_id = ? AND c.enable = 1 AND c.private = 0 AND c.enable = 1',
+ [$this->shop->id],
+ )
+ ->orderBy($order)
+ ->limit($limit)
+ ->execute();
}
}
$temp['type'] = 'product';
} elseif ($item['modul'] == 'motiv' && isset($item['mode'])) {
-
switch ($item['mode']) {
- case "rate":
+ case 'rate':
$order = 'ratesum ' . $sort;
$temp['link'] = '/motiv/page/1/sort/rate/' . $sort;
break;
- case "price":
+ case 'price':
$order = 'c.price1 ' . $sort;
$temp['link'] = '/motiv/page/1/sort/price/' . $sort;
break;
- case "date":
+ case 'date':
$order = 'c.created ' . $sort;
$temp['link'] = '/motiv/page/1/sort/date/' . $sort;
break;
- case "top":
+ case 'top':
default:
$order = 'c.used ' . $sort;
$temp['link'] = '/motiv/page/1/sort/buy/' . $sort;
@@ -541,31 +685,50 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($item['mode'] == 'sql') {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->query(str_replace('WHERE', 'WHERE m.install_id = ' . $this->shop->install_id . ' AND', $item['query']));
+ $articles = Doctrine_Query::create()->query(str_replace(
+ 'WHERE',
+ 'WHERE m.install_id = ' . $this->shop->install_id . ' AND',
+ $item['query'],
+ ));
} else {
- $articles = Doctrine_Query::create()->query(str_replace('WHERE', 'WHERE m.shop_id = ' . $this->shop->id . ' AND', $item['query']));
+ $articles = Doctrine_Query::create()->query(str_replace(
+ 'WHERE',
+ 'WHERE m.shop_id = ' . $this->shop->id . ' AND',
+ $item['query'],
+ ));
}
} else {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->select('*, (c.rate/c.rate_count) as ratesum')->from('Motiv c')->where('c.install_id = ? AND c.resale_market = 1', array($this->shop->install_id))->orderBy($order)->limit($limit)->execute();
+ $articles = Doctrine_Query::create()
+ ->select('*, (c.rate/c.rate_count) as ratesum')
+ ->from('Motiv c')
+ ->where('c.install_id = ? AND c.resale_market = 1', [$this->shop->install_id])
+ ->orderBy($order)
+ ->limit($limit)
+ ->execute();
} else {
- $articles = Doctrine_Query::create()->select('*, (c.rate/c.rate_count) as ratesum')->from('Motiv c')->where('c.shop_id = ? AND c.resale_shop = 1', array($this->shop->id))->orderBy($order)->limit($limit)->execute();
+ $articles = Doctrine_Query::create()
+ ->select('*, (c.rate/c.rate_count) as ratesum')
+ ->from('Motiv c')
+ ->where('c.shop_id = ? AND c.resale_shop = 1', [$this->shop->id])
+ ->orderBy($order)
+ ->limit($limit)
+ ->execute();
}
}
$temp['type'] = 'motiv';
} elseif ($item['modul'] == 'shop' && isset($item['mode'])) {
-
switch ($item['mode']) {
- case "rate":
+ case 'rate':
$order = 'ratesum ' . $sort;
$temp['link'] = '/market/page/1/sort/rate/' . $sort;
break;
- case "date":
+ case 'date':
$order = 'c.created ' . $sort;
$temp['link'] = '/market/page/1/sort/date/' . $sort;
break;
- case "top":
+ case 'top':
default:
$order = 'c.views ' . $sort;
$temp['link'] = '/market/page/1/sort/visits/' . $sort;
@@ -574,13 +737,28 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($item['mode'] == 'sql') {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->query(str_replace('WHERE', 'WHERE s.private = 0 AND s.display_market = 1 AND s.install_id = ' . $this->shop->install_id . ' AND', $item['query']));
+ $articles = Doctrine_Query::create()->query(str_replace(
+ 'WHERE',
+ 'WHERE s.private = 0 AND s.display_market = 1 AND s.install_id = ' .
+ $this->shop->install_id .
+ ' AND',
+ $item['query'],
+ ));
} else {
continue;
}
} else {
if ($this->shop->pmb) {
- $articles = Doctrine_Query::create()->select('*, (c.rate/c.rate_count) as ratesum')->from('Shop c')->where('c.install_id = ? AND c.display_market = 1 AND c.private = 0 AND c.market = 1 AND c.pmb != 1', array($this->shop->install_id))->orderBy($order)->limit($limit)->execute();
+ $articles = Doctrine_Query::create()
+ ->select('*, (c.rate/c.rate_count) as ratesum')
+ ->from('Shop c')
+ ->where(
+ 'c.install_id = ? AND c.display_market = 1 AND c.private = 0 AND c.market = 1 AND c.pmb != 1',
+ [$this->shop->install_id],
+ )
+ ->orderBy($order)
+ ->limit($limit)
+ ->execute();
} else {
continue;
}
@@ -591,7 +769,7 @@ class TP_Controller_Action extends Zend_Controller_Action
continue;
}
- if (isset($item['custom_link']) && $item['custom_link'] != "") {
+ if (isset($item['custom_link']) && $item['custom_link'] != '') {
$temp['link'] = $item['custom_link'];
}
@@ -602,23 +780,31 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->view->top_modul = $modul;
}
-
if ($this->_getParam('contact_newsletter')) {
-
$filter = new Zend_Validate_EmailAddress();
if ($filter->isValid($this->_getParam('contact_newsletter'))) {
-
if ($this->_getParam('contact_newsletter_delete')) {
-
- $entry = Doctrine_Query::create()->select()->from('Contactnewsletter c')->where('c.email = ? AND c.shop_id = ?', array($this->_getParam('contact_newsletter'), $this->shop->id))->fetchOne();
+ $entry = Doctrine_Query::create()
+ ->select()
+ ->from('Contactnewsletter c')
+ ->where('c.email = ? AND c.shop_id = ?', [
+ $this->_getParam('contact_newsletter'),
+ $this->shop->id,
+ ])
+ ->fetchOne();
if ($entry) {
$entry->delete();
}
- $contacts = Doctrine_Query::create()->from('Contact m')->where('m.self_email = ? AND m.install_id = ?', array(
- $this->_getParam('contact_newsletter'), $this->shop->install_id))->execute();
+ $contacts = Doctrine_Query::create()
+ ->from('Contact m')
+ ->where('m.self_email = ? AND m.install_id = ?', [
+ $this->_getParam('contact_newsletter'),
+ $this->shop->install_id,
+ ])
+ ->execute();
foreach ($contacts as $contact) {
$contact->newsletter = false;
@@ -630,10 +816,13 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->view->priorityMessenger('Für den Newsletter ausgetragen', 'info');
} else {
-
- $contacts = Doctrine_Query::create()->from('Contact m')->where('m.self_email = ? AND m.install_id = ?', array(
- $this->_getParam('contact_newsletter'), $this->shop->install_id))->execute();
-
+ $contacts = Doctrine_Query::create()
+ ->from('Contact m')
+ ->where('m.self_email = ? AND m.install_id = ?', [
+ $this->_getParam('contact_newsletter'),
+ $this->shop->install_id,
+ ])
+ ->execute();
foreach ($contacts as $contact) {
$contact->newsletter = true;
@@ -646,12 +835,18 @@ class TP_Controller_Action extends Zend_Controller_Action
}
if (count($contacts) == 0) {
- $entry = Doctrine_Query::create()->select()->from('Contactnewsletter c')->where('c.email = ? AND c.shop_id = ?', array($this->_getParam('contact_newsletter'), $this->shop->id))->fetchOne();
+ $entry = Doctrine_Query::create()
+ ->select()
+ ->from('Contactnewsletter c')
+ ->where('c.email = ? AND c.shop_id = ?', [
+ $this->_getParam('contact_newsletter'),
+ $this->shop->id,
+ ])
+ ->fetchOne();
if ($entry) {
$this->view->priorityMessenger('Sie sind schon für den Newsletter eingetragen', 'error');
} else {
-
$entry = new Contactnewsletter();
$entry->shop_id = $this->shop->id;
$entry->install_id = $this->install->id;
@@ -665,7 +860,6 @@ class TP_Controller_Action extends Zend_Controller_Action
$this->view->priorityMessenger('Bitte gültige Adresse eingeben', 'error');
}
}
-
}
protected function getArticleGroups($page, $pageart, $articlegroup, $container)
@@ -673,31 +867,49 @@ class TP_Controller_Action extends Zend_Controller_Action
if ($page === null) {
return;
}
- $page->addPage(array(
+ $page->addPage([
'label' => $articlegroup->getTitle(),
'id' => $articlegroup->id,
- 'uri' => '/overview/' . $articlegroup->url));
- $pageart->addPage(array(
+ 'uri' => '/overview/' . $articlegroup->url,
+ ]);
+ $pageart->addPage([
'label' => $articlegroup->getTitle(),
'id' => 'A' . $articlegroup->id,
- 'uri' => '/overview/' . $articlegroup->url));
- $articlegroupsd = Doctrine_Query::create()->from('ArticleGroup c')->where('c.shop_id = ? AND c.enable = 1 AND c.parent=?', array(
- $this->shop->id,
- $articlegroup->id))->orderBy('c.pos ASC')->execute();
+ 'uri' => '/overview/' . $articlegroup->url,
+ ]);
+ $articlegroupsd = Doctrine_Query::create()
+ ->from('ArticleGroup c')
+ ->where('c.shop_id = ? AND c.enable = 1 AND c.parent=?', [
+ $this->shop->id,
+ $articlegroup->id,
+ ])
+ ->orderBy('c.pos ASC')
+ ->execute();
foreach ($articlegroupsd as $articlegroups) {
- $this->getArticleGroups($container->findOneBy('id', $articlegroup->id), $container->findOneBy('id', 'A' . $articlegroup->id), $articlegroups, $container);
+ $this->getArticleGroups(
+ $container->findOneBy('id', $articlegroup->id),
+ $container->findOneBy('id', 'A' . $articlegroup->id),
+ $articlegroups,
+ $container,
+ );
}
}
protected function getArticleThemes($tp, $articletheme, $container)
{
- $tp->addPage(array(
+ $tp->addPage([
'label' => $articletheme->title,
'id' => 'AT' . $articletheme->id,
- 'uri' => '/themes/product/filter/add/' . $articletheme->url));
- $articlethemesd = Doctrine_Query::create()->from('ArticleTheme c')->where('c.shop_id = ? AND c.parent_id=?', array(
- $this->shop->id,
- $articletheme->id))->orderBy('c.title ASC')->execute();
+ 'uri' => '/themes/product/filter/add/' . $articletheme->url,
+ ]);
+ $articlethemesd = Doctrine_Query::create()
+ ->from('ArticleTheme c')
+ ->where('c.shop_id = ? AND c.parent_id=?', [
+ $this->shop->id,
+ $articletheme->id,
+ ])
+ ->orderBy('c.title ASC')
+ ->execute();
foreach ($articlethemesd as $articlethemes) {
$this->getArticleThemes($container->findOneBy('id', 'AT' . $articletheme->id), $articlethemes, $container);
}
@@ -705,13 +917,19 @@ class TP_Controller_Action extends Zend_Controller_Action
protected function getMotivThemesAction($tm, $motivetheme, $container)
{
- $tm->addPage(array(
+ $tm->addPage([
'label' => $motivetheme->title,
'id' => 'MT' . $motivetheme->id,
- 'uri' => '/themes/motiv/filter/add/' . $motivetheme->url));
- $motivthemesd = Doctrine_Query::create()->from('MotivTheme c')->where('c.shop_id = ? AND c.parent_id=?', array(
- $this->shop->id,
- $motivetheme->id))->orderBy('c.title ASC')->execute();
+ 'uri' => '/themes/motiv/filter/add/' . $motivetheme->url,
+ ]);
+ $motivthemesd = Doctrine_Query::create()
+ ->from('MotivTheme c')
+ ->where('c.shop_id = ? AND c.parent_id=?', [
+ $this->shop->id,
+ $motivetheme->id,
+ ])
+ ->orderBy('c.title ASC')
+ ->execute();
foreach ($motivthemesd as $motivthemes) {
$this->getMotivThemesAction($container->findOneBy('id', 'MT' . $motivetheme->id), $motivthemes, $container);
}
@@ -719,13 +937,19 @@ class TP_Controller_Action extends Zend_Controller_Action
protected function getShopThemes($tm, $shoptheme, $container)
{
- $tm->addPage(array(
+ $tm->addPage([
'label' => $shoptheme->title,
'id' => 'ST' . $shoptheme->id,
- 'uri' => '/themes/shop/filter/add/' . $shoptheme->url));
- $shopthemesd = Doctrine_Query::create()->from('ShopTheme c')->where('c.shop_id = ? AND c.parent_id=?', array(
- $this->shop->id,
- $shoptheme->id))->orderBy('c.title ASC')->execute();
+ 'uri' => '/themes/shop/filter/add/' . $shoptheme->url,
+ ]);
+ $shopthemesd = Doctrine_Query::create()
+ ->from('ShopTheme c')
+ ->where('c.shop_id = ? AND c.parent_id=?', [
+ $this->shop->id,
+ $shoptheme->id,
+ ])
+ ->orderBy('c.title ASC')
+ ->execute();
foreach ($shopthemesd as $shopthemes) {
$this->getShopThemes($container->findOneBy('id', 'ST' . $shoptheme->id), $shopthemes, $container);
}
@@ -733,103 +957,125 @@ class TP_Controller_Action extends Zend_Controller_Action
protected function getCms($page, $pagepos, $cms, $container)
{
-
if (strpos('t' . $cms->parameter, 'target') > 0) {
- $page->addPage(array(
+ $page->addPage([
'label' => $cms->menu,
'target' => '_blank',
'id' => $cms->pos . '_' . $cms->url,
- 'uri' => substr(strrchr($cms->parameter, "="), 1)));
+ 'uri' => substr(strrchr($cms->parameter, '='), 1),
+ ]);
if ($pagepos != null) {
- $pagepos->addPage(array(
+ $pagepos->addPage([
'label' => $cms->menu,
'id' => $cms->pos . '_' . $cms->url,
'target' => '_blank',
- 'uri' => substr(strrchr($cms->parameter, "="), 1)));
+ 'uri' => substr(strrchr($cms->parameter, '='), 1),
+ ]);
}
} else {
- $page->addPage(array(
+ $page->addPage([
'label' => $cms->menu,
'id' => $cms->pos . '_' . $cms->url,
- 'uri' => '/cms/' . $cms->url));
+ 'uri' => '/cms/' . $cms->url,
+ ]);
if ($pagepos != null) {
- $pagepos->addPage(array(
+ $pagepos->addPage([
'label' => $cms->menu,
'id' => $cms->pos . '_' . $cms->url,
- 'uri' => '/cms/' . $cms->url));
+ 'uri' => '/cms/' . $cms->url,
+ ]);
}
}
- $rows = Doctrine_Query::create()->from('Cms m')->where('private = 0 AND enable = 1 AND notinmenu != 1 AND shop_id = ? AND (language = ? OR language = \'all\') AND parent = ?', array(
+ $rows = Doctrine_Query::create()
+ ->from('Cms m')
+ ->where(
+ 'private = 0 AND enable = 1 AND notinmenu != 1 AND shop_id = ? AND (language = ? OR language = \'all\') AND parent = ?',
+ [
intval($this->shop->id),
Zend_Registry::get('locale'),
- $cms->id))->orderBy('sor ASC')->execute();
+ $cms->id,
+ ],
+ )
+ ->orderBy('sor ASC')
+ ->execute();
foreach ($rows as $row) {
- $this->getCms($container->findOneBy('label', $cms->menu), $container->findOneBy('id', $cms->pos . '_' . $cms->url), $row, $container);
+ $this->getCms(
+ $container->findOneBy('label', $cms->menu),
+ $container->findOneBy('id', $cms->pos . '_' . $cms->url),
+ $row,
+ $container,
+ );
}
}
protected function setHeadData(Doctrine_Record $row)
{
- if ($row->meta_keywords != "") {
+ if ($row->meta_keywords != '') {
$this->view->headMeta()->setName('keywords', $row->meta_keywords);
}
- if ($row->meta_author != "") {
+ if ($row->meta_author != '') {
$this->view->headMeta()->setName('author', $row->meta_author);
}
- if ($row->meta_description != "") {
+ if ($row->meta_description != '') {
$this->view->headMeta()->setName('description', $row->meta_description);
}
- if ($row->meta_custom_title != "") {
+ if ($row->meta_custom_title != '') {
$this->view->page_title = $row->meta_custom_title;
} else {
$this->view->page_title = $row->title;
}
$this->view->doctype()->setDoctype(Zend_View_Helper_Doctype::XHTML1_RDFA);
- if ($row->meta_og_title != "") {
+ if ($row->meta_og_title != '') {
$this->view->headMeta()->setProperty('og:title', $row->meta_og_title);
} else {
$this->view->headMeta()->setProperty('og:title', $this->view->page_title);
}
- if ($row->meta_og_type != "") {
+ if ($row->meta_og_type != '') {
$this->view->headMeta()->setProperty('og:type', $row->meta_og_type);
}
- if ($row->meta_og_url != "") {
+ if ($row->meta_og_url != '') {
$this->view->headMeta()->setProperty('og:url', $row->meta_og_url);
}
- if ($row->meta_og_image != "") {
+ if ($row->meta_og_image != '') {
$this->view->headMeta()->setProperty('og:image', $row->meta_og_image);
- } elseif ($this->shop->logo1 != "") {
- $this->view->headMeta()->setProperty('og:image', $this->view->basepath . '/' . $this->view->image()->thumbnailImage('logo', 'logo1', $this->shop->logo1, true, true));
+ } elseif ($this->shop->logo1 != '') {
+ $this->view->headMeta()->setProperty(
+ 'og:image',
+ $this->view->basepath .
+ '/' .
+ $this->view->image()->thumbnailImage('logo', 'logo1', $this->shop->logo1, true, true),
+ );
}
- if ($row->meta_og_description != "") {
+ if ($row->meta_og_description != '') {
$this->view->headMeta()->setProperty('og:description', $row->meta_og_description);
- } elseif ($row->meta_description != "") {
+ } elseif ($row->meta_description != '') {
$this->view->headMeta()->setProperty('og:description', $row->meta_description);
}
if ($row->isNoIndex()) {
- $this->view->headMeta()->setProperty('robots', "noindex");
+ $this->view->headMeta()->setProperty('robots', 'noindex');
}
-
}
protected function getAccountTemplatePath($account_id)
{
- $account = Doctrine_Query::create()->from('Account c')->where('c.id = ?', array($account_id))->fetchOne();
- if ($account['template_switch'] != "") {
+ $account = Doctrine_Query::create()
+ ->from('Account c')
+ ->where('c.id = ?', [$account_id])
+ ->fetchOne();
+ if ($account['template_switch'] != '') {
return $account['template_switch'];
}
- if ($account['filiale_id'] != "" && $account['filiale_id'] != 0) {
+ if ($account['filiale_id'] != '' && $account['filiale_id'] != 0) {
return $this->getAccountTemplatePath($account['filiale_id']);
}
- return "";
+ return '';
}
public function getUser()
{
return $this->user;
}
-
}