first commit

This commit is contained in:
2025-03-12 17:06:23 +01:00
commit 2241f7131f
13185 changed files with 1692479 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* SOTESHOP/stTrustPlugin
*
*
* @package stTrustPlugin
* @author Bartosz Alejski <bartosz.alejski@sote.pl>
*/
/**
* Enabling frontend and backend modules
*/
stPluginHelper::addEnableModule('stTrustBackend', 'backend');
stPluginHelper::addEnableModule('stTrustFrontend', 'frontend');
/**
* Dodanie do panelu sklepu
*/
/**
* Adding nessesary Routing
*/
stPluginHelper::addRouting('stTrustPlugin', '/trust/:action/*', 'stTrustBackend', 'config', 'backend');
//stPluginHelper::addRouting('stTrustPlugin', '/trust/*', 'stTrustBackend', 'config', 'backend');
//stPluginHelper::addRouting('stTrustPluginDefault', '/trust', 'stTrustBackend', 'config', 'backend');
stPluginHelper::addRouting('stTrustPlugin', '/trust/*', 'stTrustFrontend', 'show', 'frontend');
/**
* Dodanie do konfiguracji
*/
stConfiguration::addModule('stTrustPlugin', 'group_2');
/**
* Pobiera instancję obiektu sfEventDispatcher
*/
$dispatcher = stEventDispatcher::getInstance();
/**
* Dodaje sluchacza dla zdarzenia generator.generate
*/
$dispatcher->connect('stAdminGenerator.generateStProduct', array('stTrustListener', 'generate'));
$dispatcher->connect('autoStProductActions.preSaveTrust', array('stTrustListener', 'preSaveProduct'));
$dispatcher->connect('autoStProductActions.preGetTrustOrCreate', array('stTrustListener', 'preGetOrCreateProduct'));

View File

@@ -0,0 +1,47 @@
trust_model_class: Trust
custom_actions:
edit: [trust]
edit:
menu:
display: [trust]
fields:
trust: {name: Gwarancja, action: stProduct/trustEdit?product_id=%%id%%}
trust_edit:
forward_parameters: [product_id]
build_options:
related_id: forward_parameters.product_id
menu: {use: edit.menu}
description: Zarządzanie produktami w sklepie.
title: Dodaj opisy dla produktu
display:
"Tekst pod przyciskiem koszyka": [ field_on, field_description ]
"Etykieta dostawy": [ field_f_on, field_label_f, field_sub_label_f, _icon_f, field_description_f ]
"Etykieta gwarancji": [ field_s_on, field_label_s, field_sub_label_s, _icon_s, field_description_s ]
"Etykieta zwrotu": [ field_t_on, field_label_t, field_sub_label_t, _icon_t, field_description_t ]
fields:
field_on: {name: Włącz}
field_description: {name: Opis, type: textarea_tag, params: size=75x10 rich=true tinymce_options='height:300,width:400,theme:'simple''}
field_f_on: {name: Włącz }
field_label_f: {name: Tytuł, type: input_tag, params: size=12 maxlength=10, help: "max 10 znaków"}
field_sub_label_f: {name: Podtytuł, type: input_tag, params: size=12 maxlength=12, help: "max 12 znaków"}
field_description_f: {name: Opis, type: textarea_tag, params: size=75x10 rich=true tinymce_options='height:300,width:400,theme:'simple''}
icon_f: {name: Ikona, type: input_tag, params: size=20, help: "Rozmiar ikonki 30x30px"}
field_s_on: {name: Włącz}
field_label_s: {name: Tytuł, type: input_tag, params: size=12 maxlength=10, help: "max 10 znaków"}
field_sub_label_s: {name: Podtytuł, type: input_tag, params: size=12 maxlength=12, help: "max 12 znaków"}
field_description_s: {name: Opis, type: textarea_tag, params: size=75x10 rich=true tinymce_options='height:300,width:400,theme:'simple''}
icon_s: {name: Ikona, type: input_tag, params: size=20, help: "Rozmiar ikonki 30x30px"}
field_t_on: {name: Włącz}
field_label_t: {name: Tytuł, type: input_tag, params: size=12 maxlength=10, help: "max 10 znaków"}
field_sub_label_t: {name: Podtytuł, type: input_tag, params: size=12 maxlength=12, help: "max 12 znaków"}
field_description_t: {name: Opis, type: textarea_tag, params: size=75x10 rich=true tinymce_options='height:300,width:400,theme:'simple''}
icon_t: {name: Ikona, type: input_tag, params: size=20, help: "Rozmiar ikonki 30x30px"}
actions:
_save: {name: Zapisz}

View File

@@ -0,0 +1,35 @@
---
propel:
_attributes:
defaultIdMethod: native
package: plugins.stTrustPlugin.lib.model
st_trust:
_attributes:
phpName: Trust
created_at:
type: timestamp
updated_at:
type: timestamp
id:
type: INTEGER
primaryKey: true
required: true
autoIncrement: true
product_id:
type: INTEGER
required: true
foreignTable: st_product
foreignReference: id
onDelete: cascade
field_on:
type: BOOLEAN
default: 0
field_f_on:
type: BOOLEAN
default: 0
field_s_on:
type: BOOLEAN
default: 0
field_t_on:
type: BOOLEAN
default: 0

View File

@@ -0,0 +1,57 @@
propel:
st_trust:
_attributes:
phpName: Trust
isI18n: true
i18nTable: st_trust_i18n
st_trust_i18n:
_attributes:
phpName: TrustI18n
id:
type: integer
required: true
primaryKey: true
foreignTable: st_trust
foreignReference: id
onDelete: cascade
culture:
isCulture: true
primaryKey: true
type: VARCHAR
size: 7
field_description:
type: LONGVARCHAR
field_label_f:
type: VARCHAR
size: 255
field_sub_label_f:
type: VARCHAR
size: 255
field_description_f:
type: LONGVARCHAR
icon_f:
type: VARCHAR
size: 255
field_label_s:
type: VARCHAR
size: 255
field_sub_label_s:
type: VARCHAR
size: 255
field_description_s:
type: LONGVARCHAR
icon_s:
type: VARCHAR
size: 255
field_label_t:
type: VARCHAR
size: 255
field_sub_label_t:
type: VARCHAR
size: 255
field_description_t:
type: LONGVARCHAR
icon_t:
type: VARCHAR
size: 255