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,55 @@
<?php
/**
* SOTESHOP/stWholesalePlugin
*
* Ten plik należy do aplikacji stPositioningPlugin opartej na licencji (Open License SOTE) Otwarta Licencja SOTE.
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
*
* @package stWholesalePlugin
* @subpackage configs
* @copyright SOTE (www.sote.pl)
* @license http://www.sote.pl/license/open (Open License SOTE) Otwarta Licencja SOTE
* @version $Id: config.php 1100 2009-05-11 11:42:40Z krzysiek $
*/
/**
* Konfiguracja modułu stWholesalePlugin
*
* @package stWholesalePlugin
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
*/
stPluginHelper::addEnableModule('stWholesaleBackend', 'backend');
/**
* pobiera instancję obiektu sfEventDispatcher
*/
$dispatcher = stEventDispatcher::getInstance();
/**
* dodaje sluchacza dla zdarzenia generator.generate
*/
$dispatcher->connect('stAdminGenerator.generateStProduct', array('stWholesalePluginListener', 'generateStProduct'));
if (SF_APP == 'frontend')
{
$dispatcher->connect('Product.postHydrate', array('stWholesalePluginListener', 'productPostHydrate'));
$dispatcher->connect('Product.getWholesaleByType', array('stWholesalePluginListener', 'getWholesaleByType'));
}
elseif (SF_APP == 'backend')
{
$dispatcher->connect('autoStProductActions.postUpdateFromRequest', array('stWholesalePluginListener', 'postUpdateFromRequestProduct'));
}
$dispatcher->connect('Product.preSave', array('stWholesalePluginListener', 'preSaveProduct'));
$dispatcher->connect('AddPrice.preSave', array('stWholesalePluginListener', 'preSaveAddPrice'));
$dispatcher->connect('Currency.preSave', array('stWholesalePluginListener', 'preSaveCurrency'));
?>

View File

@@ -0,0 +1,47 @@
---
propel:
_attributes:
defaultIdMethod: native
package: plugins.stWholesalePlugin.lib.model
st_product_has_wholesale:
_attributes:
phpName: ProductHasWholesale
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: restrict
price_a:
type: DECIMAL
size: 10
scale: 2
price_b:
type: DECIMAL
size: 10
scale: 2
price_c:
type: DECIMAL
size: 10
scale: 2
opt_price_brutto_a:
type: DECIMAL
size: 10
scale: 2
opt_price_brutto_b:
type: DECIMAL
size: 10
scale: 2
opt_price_brutto_c:
type: DECIMAL
size: 10
scale: 2

View File

@@ -0,0 +1,8 @@
propel:
sf_guard_user:
_attributes: {phpName: sfGuardUser}
wholesale:
type: CHAR
size: 1
default: '0'
required: true

View File

@@ -0,0 +1,57 @@
propel:
st_product:
_attributes:
phpName: Product
isI18N: true
i18nTable: st_product_i18n
wholesale_a_netto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
wholesale_b_netto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
wholesale_c_netto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
wholesale_a_brutto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
wholesale_b_brutto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
wholesale_c_brutto:
type: DECIMAL
size: 10
scale: 2
required: true
default: 0
currency_wholesale_a:
type: DECIMAL
size: 10
scale: 2
required: false
currency_wholesale_b:
type: DECIMAL
size: 10
scale: 2
required: false
currency_wholesale_c:
type: DECIMAL
size: 10
scale: 2
required: false