first commit
This commit is contained in:
44
plugins/stAccessoriesPlugin/config/config.php
Normal file
44
plugins/stAccessoriesPlugin/config/config.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage configs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: config.php 7772 2010-08-23 14:33:34Z krzysiek $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Konfiguracja modułu stAccessoriesPlugin
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* włączanie modułu
|
||||
*/
|
||||
|
||||
stPluginHelper::addEnableModule('stAccessoriesFrontend', 'frontend');
|
||||
stPluginHelper::addEnableModule('stAccessoriesBackend', 'backend');
|
||||
|
||||
/**
|
||||
* pobiera instancję obiektu sfEventDispatcher
|
||||
*/
|
||||
$dispatcher = stEventDispatcher::getInstance();
|
||||
|
||||
/**
|
||||
* dodaje sluchacza dla zdarzenia generator.generate
|
||||
*/
|
||||
$dispatcher->connect('stAdminGenerator.generateStProduct', array('stAccessoriesPluginListener', 'generate'));
|
||||
$dispatcher->connect('autostProductActions.postExecuteManageAccessoriesList', array('stAccessoriesPluginListener', 'postExecuteManageAccessoriesList'));
|
||||
$dispatcher->connect('autostProductActions.postExecuteProductInAccessoriesList', array('stAccessoriesPluginListener', 'postExecuteProductInAccessoriesList'));
|
||||
$dispatcher->connect('stProductActions.postExecuteShow', array('stAccessoriesPluginListener', 'postExecuteShowAccessoriesList'));
|
||||
$dispatcher->connect('stProductActions.postExecuteDuplicate', array('stAccessoriesPluginListener', 'postExecuteDuplicate'));
|
||||
@@ -0,0 +1,6 @@
|
||||
export:
|
||||
fields:
|
||||
product_accessories: {name: Akcesoria, class: stAccessoriesImportExport}
|
||||
import:
|
||||
fields:
|
||||
product_accessories: {class: stAccessoriesImportExport}
|
||||
349
plugins/stAccessoriesPlugin/config/schema.dbd.xml
Normal file
349
plugins/stAccessoriesPlugin/config/schema.dbd.xml
Normal file
@@ -0,0 +1,349 @@
|
||||
<?xml version="1.0" standalone="yes" ?>
|
||||
<DBMODEL Version="4.0">
|
||||
<SETTINGS>
|
||||
<GLOBALSETTINGS ModelName="propel" IDModel="0" IDVersion="0" VersionStr="1.0.0.0" Comments="" UseVersionHistroy="1" AutoIncVersion="1" DatabaseType="MySQL" ZoomFac="100.00" XPos="0" YPos="0" DefaultDataType="5" DefaultTablePrefix="1" DefSaveDBConn="" DefSyncDBConn="" DefQueryDBConn="" Printer="" HPageCount="4.0" PageAspectRatio="1.440892512336408" PageOrientation="1" PageFormat="A4 (210x297 mm, 8.26x11.7 inches)" SelectedPages="" UsePositionGrid="0" PositionGridX="20" PositionGridY="20" TableNameInRefs="1" DefaultTableType="0" ActivateRefDefForNewRelations="1" FKPrefix="" FKPostfix="" CreateFKRefDefIndex="1" DBQuoteCharacter="`" CreateSQLforLinkedObjects="0" DefModelFont="Tahoma" CanvasWidth="4096" CanvasHeight="2842" />
|
||||
<DATATYPEGROUPS>
|
||||
<DATATYPEGROUP Name="Numeric Types" Icon="1" />
|
||||
<DATATYPEGROUP Name="Date and Time Types" Icon="2" />
|
||||
<DATATYPEGROUP Name="String Types" Icon="3" />
|
||||
<DATATYPEGROUP Name="Blob and Text Types" Icon="4" />
|
||||
<DATATYPEGROUP Name="User defined Types" Icon="5" />
|
||||
<DATATYPEGROUP Name="Geographic Types" Icon="6" />
|
||||
</DATATYPEGROUPS>
|
||||
<DATATYPES>
|
||||
<DATATYPE ID="1" IDGroup="0" TypeName="TINYINT" Description="A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="1" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="2" IDGroup="0" TypeName="SMALLINT" Description="A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="1" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="3" IDGroup="0" TypeName="MEDIUMINT" Description="A medium-size integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="1" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="4" IDGroup="0" TypeName="INT" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="0" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="5" IDGroup="0" TypeName="INTEGER" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="1" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="6" IDGroup="0" TypeName="BIGINT" Description="A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="UNSIGNED" Default="0" />
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="7" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="precision" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="8" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="9" IDGroup="0" TypeName="DOUBLE" Description="A normal-size (double-precision) floating-point number. Cannot be unsigned. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="10" IDGroup="0" TypeName="DOUBLE PRECISION" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="11" IDGroup="0" TypeName="REAL" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="12" IDGroup="0" TypeName="DECIMAL" Description="An unpacked floating-point number. Cannot be unsigned. Behaves like a CHAR column." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="13" IDGroup="0" TypeName="NUMERIC" Description="This is a synonym for DECIMAL." ParamCount="2" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
<PARAM Name="decimals" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="ZEROFILL" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="14" IDGroup="1" TypeName="DATE" Description="A date. The supported range is \a1000-01-01\a to \a9999-12-31\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="15" IDGroup="1" TypeName="DATETIME" Description="A date and time combination. The supported range is \a1000-01-01 00:00:00\a to \a9999-12-31 23:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="16" IDGroup="1" TypeName="TIMESTAMP" Description="A timestamp. The range is \a1970-01-01 00:00:00\a to sometime in the year 2037. The length can be 14 (or missing), 12, 10, 8, 6, 4, or 2 representing YYYYMMDDHHMMSS, ... , YYYYMMDD, ... , YY formats." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="17" IDGroup="1" TypeName="TIME" Description="A time. The range is \a-838:59:59\a to \a838:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="18" IDGroup="1" TypeName="YEAR" Description="A year in 2- or 4-digit format (default is 4-digit)." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="19" IDGroup="2" TypeName="CHAR" Description="A fixed-length string (1 to 255 characters) that is always right-padded with spaces to the specified length when stored. values are sorted and compared in case-insensitive fashion according to the default character set unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="BINARY" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="20" IDGroup="2" TypeName="VARCHAR" Description="A variable-length string (1 to 255 characters). Values are sorted and compared in case-sensitive fashion unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="length" />
|
||||
</PARAMS>
|
||||
<OPTIONS>
|
||||
<OPTION Name="BINARY" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="21" IDGroup="2" TypeName="BIT" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="22" IDGroup="2" TypeName="BOOL" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="23" IDGroup="3" TypeName="TINYBLOB" Description="A column maximum length of 255 (2^8 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="24" IDGroup="3" TypeName="BLOB" Description="A column maximum length of 65535 (2^16 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="25" IDGroup="3" TypeName="MEDIUMBLOB" Description="A column maximum length of 16777215 (2^24 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="26" IDGroup="3" TypeName="LONGBLOB" Description="A column maximum length of 4294967295 (2^32 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="27" IDGroup="3" TypeName="TINYTEXT" Description="A column maximum length of 255 (2^8 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="28" IDGroup="3" TypeName="TEXT" Description="A column maximum length of 65535 (2^16 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="29" IDGroup="3" TypeName="MEDIUMTEXT" Description="A column maximum length of 16777215 (2^24 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="30" IDGroup="3" TypeName="LONGTEXT" Description="A column maximum length of 4294967295 (2^32 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="31" IDGroup="3" TypeName="ENUM" Description="An enumeration. A string object that can have only one value, chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="values" />
|
||||
</PARAMS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="32" IDGroup="3" TypeName="SET" Description="A set. A string object that can have zero or more values, each of which must be chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<PARAMS>
|
||||
<PARAM Name="values" />
|
||||
</PARAMS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="33" IDGroup="4" TypeName="Varchar(20)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<OPTIONS>
|
||||
<OPTION Name="BINARY" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="34" IDGroup="4" TypeName="Varchar(45)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<OPTIONS>
|
||||
<OPTION Name="BINARY" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="35" IDGroup="4" TypeName="Varchar(255)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
<OPTIONS>
|
||||
<OPTION Name="BINARY" Default="0" />
|
||||
</OPTIONS>
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="36" IDGroup="5" TypeName="GEOMETRY" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="38" IDGroup="5" TypeName="LINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="39" IDGroup="5" TypeName="POLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="40" IDGroup="5" TypeName="MULTIPOINT" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="41" IDGroup="5" TypeName="MULTILINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="42" IDGroup="5" TypeName="MULTIPOLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
<DATATYPE ID="43" IDGroup="5" TypeName="GEOMETRYCOLLECTION" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" >
|
||||
</DATATYPE>
|
||||
</DATATYPES>
|
||||
<COMMON_DATATYPES>
|
||||
<COMMON_DATATYPE ID="5" />
|
||||
<COMMON_DATATYPE ID="8" />
|
||||
<COMMON_DATATYPE ID="20" />
|
||||
<COMMON_DATATYPE ID="15" />
|
||||
<COMMON_DATATYPE ID="22" />
|
||||
<COMMON_DATATYPE ID="28" />
|
||||
<COMMON_DATATYPE ID="26" />
|
||||
<COMMON_DATATYPE ID="33" />
|
||||
<COMMON_DATATYPE ID="34" />
|
||||
<COMMON_DATATYPE ID="35" />
|
||||
</COMMON_DATATYPES>
|
||||
<TABLEPREFIXES>
|
||||
<TABLEPREFIX Name="Default (no prefix)" />
|
||||
<TABLEPREFIX Name="st" />
|
||||
</TABLEPREFIXES>
|
||||
<REGIONCOLORS>
|
||||
<REGIONCOLOR Color="Red=#FFEEEC" />
|
||||
<REGIONCOLOR Color="Yellow=#FEFDED" />
|
||||
<REGIONCOLOR Color="Green=#EAFFE5" />
|
||||
<REGIONCOLOR Color="Cyan=#ECFDFF" />
|
||||
<REGIONCOLOR Color="Blue=#F0F1FE" />
|
||||
<REGIONCOLOR Color="Magenta=#FFEBFA" />
|
||||
</REGIONCOLORS>
|
||||
<POSITIONMARKERS>
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" />
|
||||
</POSITIONMARKERS>
|
||||
</SETTINGS>
|
||||
<METADATA>
|
||||
<REGIONS>
|
||||
<REGION ID="11008" RegionName="stAccessoriesPlugin" XPos="161" YPos="96" Width="488" Height="405" RegionColor="0" TablePrefix="0" TableType="0" OverwriteTablePrefix="0" OverwriteTableType="0" Comments="" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="2" />
|
||||
</REGIONS>
|
||||
<TABLES>
|
||||
<TABLE ID="11015" Tablename="product" PrevTableName="Table_02" XPos="361" YPos="416" TableType="0" TablePrefix="1" nmTable="0" Temporary="1" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="4" >
|
||||
<COLUMNS>
|
||||
<COLUMN ID="11017" ColName="id" PrevColName="" Pos="0" idDatatype="5" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="1" IsForeignKey="0" DefaultValue="" Comments="">
|
||||
<OPTIONSELECTED>
|
||||
<OPTIONSELECT Value="1" />
|
||||
<OPTIONSELECT Value="0" />
|
||||
</OPTIONSELECTED>
|
||||
</COLUMN>
|
||||
</COLUMNS>
|
||||
<RELATIONS_START>
|
||||
<RELATION_START ID="11023" />
|
||||
<RELATION_START ID="11063" />
|
||||
</RELATIONS_START>
|
||||
<INDICES>
|
||||
<INDEX ID="11018" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
|
||||
<INDEXCOLUMNS>
|
||||
<INDEXCOLUMN idColumn="11017" LengthParam="0" />
|
||||
</INDEXCOLUMNS>
|
||||
</INDEX>
|
||||
</INDICES>
|
||||
</TABLE>
|
||||
<TABLE ID="11009" Tablename="product_has_accessories" PrevTableName="Table_01" XPos="318" YPos="129" TableType="0" TablePrefix="1" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="3" >
|
||||
<COLUMNS>
|
||||
<COLUMN ID="11011" ColName="id" PrevColName="" Pos="0" idDatatype="5" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="1" IsForeignKey="0" DefaultValue="" Comments="">
|
||||
<OPTIONSELECTED>
|
||||
<OPTIONSELECT Value="1" />
|
||||
<OPTIONSELECT Value="0" />
|
||||
</OPTIONSELECTED>
|
||||
</COLUMN>
|
||||
<COLUMN ID="11066" ColName="accessories_id" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
|
||||
<OPTIONSELECTED>
|
||||
<OPTIONSELECT Value="1" />
|
||||
<OPTIONSELECT Value="0" />
|
||||
</OPTIONSELECTED>
|
||||
</COLUMN>
|
||||
<COLUMN ID="11013" ColName="product_id" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments="">
|
||||
<OPTIONSELECTED>
|
||||
<OPTIONSELECT Value="1" />
|
||||
<OPTIONSELECT Value="0" />
|
||||
</OPTIONSELECTED>
|
||||
</COLUMN>
|
||||
</COLUMNS>
|
||||
<RELATIONS_END>
|
||||
<RELATION_END ID="11023" />
|
||||
<RELATION_END ID="11063" />
|
||||
</RELATIONS_END>
|
||||
<INDICES>
|
||||
<INDEX ID="11012" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1">
|
||||
<INDEXCOLUMNS>
|
||||
<INDEXCOLUMN idColumn="11011" LengthParam="0" />
|
||||
</INDEXCOLUMNS>
|
||||
</INDEX>
|
||||
<INDEX ID="11024" IndexName="product_has_accessories_FKIndex1" IndexKind="1" FKRefDef_Obj_id="11023">
|
||||
<INDEXCOLUMNS>
|
||||
<INDEXCOLUMN idColumn="11013" LengthParam="0" />
|
||||
</INDEXCOLUMNS>
|
||||
</INDEX>
|
||||
<INDEX ID="11064" IndexName="product_has_accessories_FKIndex2" IndexKind="1" FKRefDef_Obj_id="11063">
|
||||
<INDEXCOLUMNS>
|
||||
<INDEXCOLUMN idColumn="11066" LengthParam="0" />
|
||||
</INDEXCOLUMNS>
|
||||
</INDEX>
|
||||
</INDICES>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
<RELATIONS>
|
||||
<RELATION ID="11023" RelationName="product_product_has_accessories" Kind="2" SrcTable="11015" DestTable="11009" FKFields="id=product_id\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-142" CaptionOffsetY="1" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="11024" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="5" />
|
||||
<RELATION ID="11063" RelationName="accessories_product_rel" Kind="2" SrcTable="11015" DestTable="11009" FKFields="id=accessories_id\n" FKFieldsComments="\n" relDirection="1" MidOffset="-5" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="94" CaptionOffsetY="-3" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=1\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="11064" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="6" />
|
||||
</RELATIONS>
|
||||
<NOTES>
|
||||
</NOTES>
|
||||
<IMAGES>
|
||||
</IMAGES>
|
||||
</METADATA>
|
||||
<PLUGINDATA>
|
||||
<PLUGINDATARECORDS>
|
||||
</PLUGINDATARECORDS>
|
||||
</PLUGINDATA>
|
||||
<QUERYDATA>
|
||||
<QUERYRECORDS>
|
||||
</QUERYRECORDS>
|
||||
</QUERYDATA>
|
||||
<LINKEDMODELS>
|
||||
</LINKEDMODELS>
|
||||
</DBMODEL>
|
||||
28
plugins/stAccessoriesPlugin/config/schema.yml
Normal file
28
plugins/stAccessoriesPlugin/config/schema.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
propel:
|
||||
_attributes:
|
||||
defaultIdMethod: native
|
||||
package: plugins.stAccessoriesPlugin.lib.model
|
||||
st_product_has_accessories:
|
||||
_attributes:
|
||||
phpName: ProductHasAccessories
|
||||
created_at:
|
||||
type: timestamp
|
||||
updated_at:
|
||||
type: timestamp
|
||||
id:
|
||||
type: INTEGER
|
||||
primaryKey: true
|
||||
required: true
|
||||
autoIncrement: true
|
||||
accessories_id:
|
||||
type: INTEGER
|
||||
required: true
|
||||
foreignTable: st_product
|
||||
foreignReference: id
|
||||
onDelete: cascade
|
||||
product_id:
|
||||
type: INTEGER
|
||||
foreignTable: st_product
|
||||
foreignReference: id
|
||||
onDelete: cascade
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: ProductHasAccessories.php 306 2009-09-04 14:03:28Z krzysiek $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Subclass for representing a row from the 'st_product_has_accessories' table.
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
*/
|
||||
class ProductHasAccessories extends BaseProductHasAccessories
|
||||
{
|
||||
public function getCode()
|
||||
{
|
||||
if (is_object($this->getProductRelatedByAccessoriesId())) return $this->getProductRelatedByAccessoriesId()->getCode();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: ProductHasAccessoriesPeer.php 305 2009-09-04 12:49:07Z michal $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Subclass for performing query and update operations on the 'st_product_has_accessories' table.
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
*/
|
||||
class ProductHasAccessoriesPeer extends BaseProductHasAccessoriesPeer
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'st_product_has_accessories' table to 'propel' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package plugins.stAccessoriesPlugin.lib.model.map
|
||||
*/
|
||||
class ProductHasAccessoriesMapBuilder {
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'plugins.stAccessoriesPlugin.lib.model.map.ProductHasAccessoriesMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('propel');
|
||||
|
||||
$tMap = $this->dbMap->addTable('st_product_has_accessories');
|
||||
$tMap->setPhpName('ProductHasAccessories');
|
||||
|
||||
$tMap->setUseIdGenerator(true);
|
||||
|
||||
$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('UPDATED_AT', 'UpdatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addForeignKey('ACCESSORIES_ID', 'AccessoriesId', 'int', CreoleTypes::INTEGER, 'st_product', 'ID', true, null);
|
||||
|
||||
$tMap->addForeignKey('PRODUCT_ID', 'ProductId', 'int', CreoleTypes::INTEGER, 'st_product', 'ID', false, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ProductHasAccessoriesMapBuilder
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: stAccessoriesImportExport.class.php 1985 2009-11-04 11:34:58Z krzysiek $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Podpięcie pod generator stProduct modułu ststAccessoriesPlugin
|
||||
*
|
||||
* @author Piotr Hałas <piotr.halas@sote.pl>
|
||||
*
|
||||
* @package stAccessoriesImportExport
|
||||
* @subpackage libs
|
||||
*/
|
||||
class stAccessoriesImportExport {
|
||||
|
||||
public static function getProductAccessories(Product $object) {
|
||||
$accessories = $object->getProductHasAccessoriessRelatedByProductId();
|
||||
if (is_array($accessories)) {
|
||||
$ids = array();
|
||||
foreach($accessories as $item) {
|
||||
if (is_object($item) && !is_null($item->getCode()))
|
||||
$ids[] = $item->getCode();
|
||||
}
|
||||
return implode(',',$ids);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function setProductAccessories(Product $object, $value) {
|
||||
$accessories = $object->getProductHasAccessoriessRelatedByProductId();
|
||||
|
||||
// usuń w przypadku gdy pole puste
|
||||
if (!strlen(trim($value))) {
|
||||
if (is_array($accessories)) {
|
||||
foreach($accessories as $item) {
|
||||
$item->delete();
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
$idsNew = explode(',',$value);
|
||||
foreach ($idsNew as $key=>$itemValue) {
|
||||
if (strlen(trim($itemValue))) {
|
||||
$idsNew[$key] = trim($itemValue);
|
||||
} else {
|
||||
unset($idsNew[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
$ids = array();
|
||||
|
||||
if (is_array($accessories)) {
|
||||
foreach($accessories as $item) {
|
||||
$ids[] = $item->getCode();
|
||||
}
|
||||
}
|
||||
$old = array_diff($ids, $idsNew);
|
||||
$idsNew = array_unique(array_diff($idsNew, $ids));
|
||||
|
||||
foreach($accessories as $item) {
|
||||
if (array_search($item->getCode(),$old)!== false) {
|
||||
$item->delete();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($idsNew as $id) {
|
||||
$c = new Criteria();
|
||||
$c->add(ProductPeer::CODE,$id);
|
||||
$accessory = ProductPeer::doSelectOne($c);
|
||||
|
||||
if (is_object($accessory) && $object->getId()!=$accessory->getId()) {
|
||||
$tmp = new ProductHasAccessories();
|
||||
$tmp->setProductId($object->getId());
|
||||
$tmp->setAccessoriesId($accessory->getId());
|
||||
$tmp->save();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: stAccessoriesPluginListener.class.php 8476 2010-09-28 09:57:05Z krzysiek $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Podpięcie pod generator stProduct modułu ststAccessoriesPlugin
|
||||
*
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @subpackage libs
|
||||
*/
|
||||
class stAccessoriesPluginListener
|
||||
{
|
||||
/**
|
||||
* Podpięcie zdarzenia dla generatora produktu
|
||||
*
|
||||
* @param sfEvent $event
|
||||
*/
|
||||
public static function generate(sfEvent $event)
|
||||
{
|
||||
// możemy wywoływać podaną metodę wielokrotnie co powoduje dołączenie kolejnych plików
|
||||
$event->getSubject()->attachAdminGeneratorFile('stAccessoriesPlugin', 'stProduct.yml');
|
||||
}
|
||||
|
||||
|
||||
public static function postExecuteProductInAccessoriesList(sfEvent $event)
|
||||
{
|
||||
$action = $event->getSubject();
|
||||
|
||||
$c = $action->pager->getCriteria();
|
||||
|
||||
$c->add(ProductHasAccessoriesPeer::PRODUCT_ID, $action->forward_parameters['product_id']);
|
||||
$c->addJoin(ProductHasAccessoriesPeer::ACCESSORIES_ID, ProductPeer:: ID);
|
||||
$c->setDistinct();
|
||||
if (isset($action->filters['product_related_by_accessories_id']) && $action->filters['product_related_by_accessories_id'] !== '')
|
||||
{
|
||||
$c->addJoin(ProductPeer::ID, ProductI18nPeer::ID, Criteria::LEFT_JOIN);
|
||||
|
||||
$c->add(ProductI18nPeer::CULTURE, $action->getUser()->getCulture());
|
||||
}
|
||||
$action->pager->init();
|
||||
}
|
||||
|
||||
public static function postExecuteManageAccessoriesList(sfEvent $event)
|
||||
{
|
||||
|
||||
$action = $event->getSubject();
|
||||
|
||||
$c = new Criteria();
|
||||
$c->add(ProductHasAccessoriesPeer::PRODUCT_ID, $action->forward_parameters['product_id']);
|
||||
$accessories=(ProductHasAccessoriesPeer::doSelect($c));
|
||||
|
||||
$ids = array();
|
||||
$ids[] = $action->forward_parameters['product_id'];
|
||||
foreach ($accessories as $accesory)
|
||||
{
|
||||
$ids[] = $accesory->getAccessoriesId();
|
||||
}
|
||||
|
||||
$action->pager->getCriteria()->add(ProductPeer::ID, $ids, Criteria::NOT_IN);
|
||||
$action->pager->init();
|
||||
}
|
||||
|
||||
|
||||
public static function postExecuteShowAccessoriesList(sfEvent $event)
|
||||
{
|
||||
$action = $event->getSubject();
|
||||
|
||||
if ($action->getController()->getTheme()->getVersion() < 7)
|
||||
{
|
||||
$config = stConfig::getInstance('stProduct');
|
||||
|
||||
if ($config->get('show_accessories'))
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->addJoin(ProductHasAccessoriesPeer::ACCESSORIES_ID, ProductPeer::ID);
|
||||
$c->add(ProductPeer::ACTIVE, true);
|
||||
|
||||
if ($action->product->countProductHasAccessoriessRelatedByProductId($c) > 0)
|
||||
{
|
||||
$action->productDescription->addTab('Akcesoria', 'stAccessoriesFrontend', 'accessoriesList',array('id' => $action->product->getId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Duplikowanie akcesorii produktu
|
||||
*/
|
||||
public static function postExecuteDuplicate(sfEvent $event)
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->add(ProductHasAccessoriesPeer::PRODUCT_ID, $event['id']);
|
||||
$product_has_accessories = ProductHasAccessoriesPeer::doSelect($c);
|
||||
foreach ($product_has_accessories as $product_has_accessory)
|
||||
{
|
||||
$duplicate_product_has_accessory = $product_has_accessory->copy();
|
||||
$duplicate_product_has_accessory->setProductId($event['duplicate_id']);
|
||||
$duplicate_product_has_accessory->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage actions
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: actions.class.php 305 2009-09-04 12:49:07Z michal $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Akcje modułu akcesoria
|
||||
*
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @subpackage actions
|
||||
*/
|
||||
class stAccessoriesBackendActions extends stActions
|
||||
{
|
||||
/**
|
||||
* Dodaje akcesoria do produktu
|
||||
*
|
||||
* @return przekierowuje na strone akcesorii dodanych produktów
|
||||
*/
|
||||
public function executeAddAccessories()
|
||||
{
|
||||
|
||||
$product_id = $this->getRequestParameter('forward_parameters[product_id]');
|
||||
|
||||
$accessories = $this->getRequestParameter('product[selected]', array());
|
||||
|
||||
|
||||
if (empty($accessories))
|
||||
{
|
||||
$this->redirect($this->getRequest()->getReferer());
|
||||
}
|
||||
|
||||
foreach ($accessories as $id)
|
||||
{
|
||||
$product_accessories = new ProductHasAccessories();
|
||||
$product_accessories->setProductId($product_id);
|
||||
$product_accessories->setAccessoriesId($id);
|
||||
$product_accessories->save();
|
||||
}
|
||||
|
||||
return $this->redirect('stProduct/productInAccessoriesList?product_id=' . $product_id);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?php st_include_partial('stProduct/list_image', array('product' => $product_has_accessories->getProductRelatedByAccessoriesId())); ?>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* SOTESHOP/stAccessoriesPlugin
|
||||
*
|
||||
* Ten plik należy do aplikacji stAccessoriesPlugin opartej na licencji (Professional License 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 stAccessoriesPlugin
|
||||
* @subpackage actions
|
||||
* @copyright SOTE (www.sote.pl)
|
||||
* @license http://www.sote.pl/license/sote (Professional License SOTE)
|
||||
* @version $Id: actions.class.php 3369 2010-02-09 08:41:06Z pawel $
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Akcje modułu akcesoria
|
||||
*
|
||||
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
||||
*
|
||||
* @package stAccessoriesPlugin
|
||||
* @subpackage actions
|
||||
*/
|
||||
class stAccessoriesFrontendActions extends stActions
|
||||
{
|
||||
/**
|
||||
* Pokazuje akcesoria dla danego produktu
|
||||
*/
|
||||
public function executeAccessoriesList()
|
||||
{
|
||||
if(!$this->getRequest()->isXmlHttpRequest() && $this->getController()->getRenderMode() != sfView::RENDER_VAR){
|
||||
|
||||
$this->getResponse()->setStatusCode(404);
|
||||
|
||||
$this->getResponse()->setHttpHeader('Status', '404 Not Found');
|
||||
|
||||
return $this->forward('stErrorFrontend', 'error404');
|
||||
}
|
||||
|
||||
$this->smarty = new stSmarty($this->getModuleName());
|
||||
$this->config = stConfig::getInstance(sfContext::getInstance(), 'stProduct');
|
||||
$this->config_points = stConfig::getInstance(sfContext::getInstance(), 'stPointsBackend');
|
||||
$this->config_points->setCulture($this->getRequestParameter('culture', stLanguage::getOptLanguage()));
|
||||
$this->setLayout(false);
|
||||
$product_id = $this->getRequestParameter('id');
|
||||
$c = new Criteria();
|
||||
$c->addJoin(ProductHasAccessoriesPeer::ACCESSORIES_ID, ProductPeer::ID);
|
||||
$c->add(ProductHasAccessoriesPeer::PRODUCT_ID, $product_id);
|
||||
$c->addAscendingOrderByColumn(ProductHasAccessoriesPeer::ID);
|
||||
ProductPeer::addFilterCriteria($this->getContext(), $c, false);
|
||||
$this->products = ProductPeer::doSelectForPager($c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
<?php
|
||||
use_helper('stCurrency', 'stProductImage', 'stText', 'stUrl', 'stAvailability');
|
||||
|
||||
sfLoader::loadHelpers(array('stProduct'), 'stProduct');
|
||||
|
||||
st_theme_use_stylesheet('stProduct.css');
|
||||
|
||||
if ($products)
|
||||
{
|
||||
$smarty->assign("show_name", $config->get('show_name_other'));
|
||||
|
||||
$smarty->assign("show_image", $config->get('show_image_other'));
|
||||
|
||||
$smarty->assign("show_price", $config->get('show_price_other'));
|
||||
|
||||
$smarty->assign("show_description", $config->get('show_description_other'));
|
||||
|
||||
$smarty->assign("show_old_price", $config->get('show_old_price_other'));
|
||||
|
||||
$smarty->assign("show_discount", $config->get('show_discount_other'));
|
||||
|
||||
$smarty->assign("show_basket", $config->get('show_basket_long'));
|
||||
|
||||
$smarty->assign("price_view", $config->get('price_view_other'));
|
||||
|
||||
$smarty->assign('show_stock', $config->get('show_depository_long'));
|
||||
|
||||
$smarty->assign('show_availability', $config->get('show_availability_long'));
|
||||
|
||||
$smarty->assign('button_type', $config->get('button_type_long'));
|
||||
|
||||
$photo_max_height = st_asset_thumbnail_setting('height', 'thumb');
|
||||
|
||||
$cut_name = $config->get('cut_name_other');
|
||||
|
||||
$max_name_length = $config->get('cut_name_num_other');
|
||||
|
||||
$results = array();
|
||||
|
||||
foreach ($products as $index => $product)
|
||||
{
|
||||
$product_url = st_url_for('stProduct/show?url='.$product->getFriendlyUrl());
|
||||
|
||||
$product_name = $product->getName();
|
||||
|
||||
$results[$index]['instance'] = $product ;
|
||||
|
||||
$results[$index]['id'] = $product->getId();
|
||||
|
||||
$results[$index]['photo'] = content_tag('a', st_product_image_tag($product, 'thumb'), array('href' => $product_url));
|
||||
|
||||
$results[$index]['photo_small'] = content_tag('a', st_product_image_tag($product, 'small'), array('href' => $product_url));
|
||||
|
||||
$results[$index]['photo_max_height'] = $photo_max_height;
|
||||
|
||||
if ($cut_name && st_check_strlen($product_name) > $max_name_length)
|
||||
{
|
||||
$results[$index]['name'] = "<span title=\"". $product_name ."\">" . content_tag('a', st_truncate_text($product_name, $max_name_length, '...'), array('href' => $product_url, 'class' => 'product_name')) . "</span>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$results[$index]['name'] = content_tag('a', $product_name, array('href' => $product_url, 'class' => 'product_name'));
|
||||
}
|
||||
|
||||
$results[$index]['points_value'] = $product->getPointsValue();
|
||||
|
||||
$results[$index]['points_earn'] = $product->getPointsEarn();
|
||||
|
||||
$results[$index]['points_only'] = $product->getPointsOnly();
|
||||
|
||||
$results[$index]['uom'] = st_product_uom($product);
|
||||
|
||||
$results[$index]['stock'] = $product->getStock();
|
||||
|
||||
if ($product->isPriceVisible()){
|
||||
|
||||
if ($config->get('show_uom_other') && $product->getUom()){
|
||||
$uom = " / ".$results[$index]['uom'];
|
||||
}else{
|
||||
$uom = "";
|
||||
}
|
||||
|
||||
$results[$index]['price'] = st_currency_format($product->getPriceBrutto(true)).$uom;
|
||||
|
||||
$results[$index]['price_net'] = st_currency_format($product->getPriceNetto(true)).$uom;
|
||||
|
||||
$old_price_brutto = $product->getOldPriceBrutto(true);
|
||||
|
||||
$results[$index]['check_old_price'] = $old_price_brutto != 0;
|
||||
|
||||
$results[$index]['old_price'] = st_currency_format($old_price_brutto);
|
||||
|
||||
$results[$index]['old_price_net'] = st_currency_format($product->getOldPriceNetto(true));
|
||||
|
||||
$results[$index]['discount'] = $product->getDiscountInPercent();
|
||||
|
||||
$results[$index]['check_price'] = false;
|
||||
|
||||
$results[$index]['basket'] = st_get_component('stBasket', 'add', array('product' => $product));
|
||||
|
||||
if ($config->get('show_basic_price_long') && $product->hasBasicPrice() && $product->getBasicPriceBrutto()!=0)
|
||||
{
|
||||
$results[$index]['basic_price'] = array(
|
||||
'netto' => st_currency_format($product->getBasicPriceNetto(true)),
|
||||
'brutto' => st_currency_format($product->getBasicPriceBrutto(true)),
|
||||
'quantity' => st_product_basic_price_quantity($product),
|
||||
'for_quantity' => st_product_basic_price_for_quantity($product),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$results[$index]['check_price'] = true;
|
||||
}
|
||||
|
||||
$results[$index]['description'] = $product->getShortDescription() ? $product->getShortDescription() : st_truncate_text($product->getDescription(), 140, '...');
|
||||
|
||||
$results[$index]['name_without_link'] = $product->getName();
|
||||
|
||||
$results[$index]['is_observe'] = stProductObservePluginListener::isObserveProduct($product->getId());
|
||||
|
||||
$results[$index]['link'] = $product_url;
|
||||
|
||||
$results[$index]['code'] = $product->getCode();
|
||||
|
||||
$results[$index]['availability'] = st_availability_show($product);
|
||||
}
|
||||
|
||||
//points system
|
||||
$smarty->assign('points_system_is_active', stPoints::isPointsSystemActive());
|
||||
$smarty->assign('show_points', $config_points->get('product_group_show_points'));
|
||||
$smarty->assign('display_type', $config_points->get('product_group_display_type'));
|
||||
$smarty->assign('points_shortcut', $config_points->get('points_shortcut', null, true));
|
||||
$smarty->assign('config_points',$config_points);
|
||||
|
||||
$smarty->assign("results", $results);
|
||||
|
||||
$config_observe = stConfig::getInstance(sfContext::getInstance(), 'stProductObserveBackend');
|
||||
|
||||
$smarty->assign('is_observe_enabled', $config_observe->get('enabled'));
|
||||
|
||||
|
||||
$smarty->display('accessories_list.html');
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<section id="product-accessories" class="full-list product-list" >
|
||||
<div class="row" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product col-xs-4 col-sm-4 col-md-3 col-lg-3">
|
||||
<div class="thumbnail clearfix view-img">
|
||||
{if $show_image==1}<div data-equalizer-watch="image"><div class="image">{$product.photo_small}</div></div>{/if}
|
||||
<div class="text-center caption clearfix">
|
||||
<p class="name" data-equalizer-watch="name">{if $show_name==1}{$product.name}{/if}</p>
|
||||
{if $show_availability}
|
||||
<div class="product-availability" data-equalizer-watch="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability" data-equalizer-watch="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
<div data-equalizer-watch="info">
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price text-muted">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price text-muted">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price text-center"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="discount-old_price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1)}
|
||||
{if $product.check_old_price==1}
|
||||
<div class="old_price price nowrap">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories [data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,87 @@
|
||||
{assign var='col_xs' value=$theme_config->getConfigParameter('layout_config.products_in_row_mobile')}
|
||||
{assign var='col_sm' value=$theme_config->getConfigParameter('layout_config.products_in_row_desktop')}
|
||||
|
||||
<section id="product-accessories" class="product-list full-list grid-wrapper grid-xs-{$col_xs} grid-sm-3{if $col_sm == 4} grid-md-4{elseif $col_sm == 5} grid-md-4 grid-lg-5{/if}" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product thumbnail clearfix">
|
||||
|
||||
{if $is_observe_enabled }
|
||||
<div class="product-observe {if $product.is_observe}observe-yes{else}observe-no{/if}" data-product-observe="{$product.id}">
|
||||
<svg width="23" height="21" viewBox="0 0 23 21" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.4592 1C3.44417 1 1 3.81598 1 7.28966C1 7.97227 1.09438 8.62947 1.26893 9.2449C1.71875 10.8309 2.96968 12.0161 4.1733 13.1426L11.5 20L18.8267 13.1426C20.0303 12.0161 21.2813 10.8309 21.7311 9.2449C21.9056 8.62947 22 7.97227 22 7.28966C22 3.81598 19.5558 1 16.5408 1C14.2698 1 12.3227 2.59762 11.5 4.87056C10.6773 2.59762 8.73018 1 6.4592 1Z" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $show_image==1}<div data-equalizer-watch="image"><div class="image{if $theme_config->getConfigParameter('layout_config.product_img_space') == 'space'} space{/if}">{$product.photo_small}</div></div>{/if}
|
||||
<div class="caption clearfix {if $theme_config->getConfigParameter('layout_config.product_info_align_desktop') == 'left'}text-left{else}text-center{/if}">
|
||||
<div data-equalizer-watch="thumb">
|
||||
{if $show_name==1}<p class="name">{$product.name}</p>{/if}
|
||||
{if $show_availability}
|
||||
<div class="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_weight}<div class="weight text-muted">{if $product.weight}{__ text="Waga"}: {$product.weight}{/if}</div>{/if}
|
||||
{if $show_description==1}<div class="description tinymce_html">{$product.description}</div>{/if}
|
||||
<div class="box-price">
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="price old_price">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="product-shopping-cart">
|
||||
{if $button_type == 'basket'}
|
||||
{if $show_price==1 && $show_basket==1}
|
||||
{basket_add_link product=$product.instance namespace="product_accesoriess_card"}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories[data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,76 @@
|
||||
{assign var='col_xs' value=$theme_config->getConfigParameter('layout_config.products_in_row_mobile')}
|
||||
{assign var='col_sm' value=$theme_config->getConfigParameter('layout_config.products_in_row_desktop')}
|
||||
|
||||
<section id="product-accessories" class="product-list full-list grid-wrapper grid-xs-{$col_xs} grid-sm-3{if $col_sm == 4} grid-md-4{elseif $col_sm == 5} grid-md-4 grid-lg-5{/if}" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product thumbnail clearfix">
|
||||
{if $show_image==1}
|
||||
<div class="relative" data-equalizer-watch="image">
|
||||
<div class="image{if $theme_config->getConfigParameter('layout_config.product_img_space') == 'space'} space{/if}">{$product.photo_small}</div>
|
||||
<div class="box-price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="price discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="price old_price nowrap">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price nowrap">{$product.price_net}</div>
|
||||
<div class="price minor_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price nowrap">{$product.price}</div>
|
||||
<div class="price minor_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="price basic_price"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{if $button_type == 'basket'}
|
||||
{if $show_price==1 && $show_basket==1}
|
||||
{basket_add_link product=$product.instance namespace="product_acc"}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="caption clearfix {if $theme_config->getConfigParameter('layout_config.product_info_align_desktop') == 'left'}text-left{else}text-center{/if}">
|
||||
{if $show_name==1}<p class="name" >{$product.name}</p>{/if}
|
||||
{if $show_availability}
|
||||
<div class="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_description==1}<div class="description tinymce_html">{$product.description}</div>{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories[data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,79 @@
|
||||
<section id="product-accessories" class="home-list product-list" >
|
||||
<div class="row" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product col-xs-4 col-sm-4 col-md-3 col-lg-3">
|
||||
<div class="thumbnail clearfix view-img">
|
||||
{if $show_image==1}
|
||||
<div data-equalizer-watch="image" class="relative">
|
||||
<div class="back-side-product text-center">
|
||||
<a href="{$product.link}" data-equalizer-watch="image">
|
||||
<span class="ornament first"></span><span class="ornament second"></span>
|
||||
<span class="btn btn-primary">{__ text="zobacz"}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="image">{$product.photo_small}</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="caption clearfix">
|
||||
<p class="name" data-equalizer-watch="name">{if $show_name==1}{$product.name}{/if}</p>
|
||||
{if $show_availability}
|
||||
<div class="product-availability" data-equalizer-watch="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability" data-equalizer-watch="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_description}<div class="description" data-equalizer-watch="desc">{$product.description}</div>{/if}
|
||||
{if $show_price==1}
|
||||
<div class="main_price" data-equalizer-watch="main_price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount-old_price ">
|
||||
<div class="discount">{__ text="Rabat"}: <span class="nowrap">{$product.discount} %</span></div>
|
||||
</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="discount-old_price ">
|
||||
<div class="price old_price nowrap">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price"><span class="txt">{__ text="netto"}:</span> <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price"><span class="txt">{__ text="Cena"}:</span> <span class="nowrap">{$product.price}</span></div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price"><span class="txt">{__ text="netto"}:</span> <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price"><span class="txt">{__ text="brutto"}:</span> <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories [data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,43 @@
|
||||
<div id="st_component-st_product-list_other">
|
||||
<div id="st_component-st_product-product_list_other_head"></div>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="st_component-st_product-product_list_other">
|
||||
{if ($show_image)==1}<div class="st_product-list_other_image" style="height: {$product.photo_max_height}px">{$product.photo}</div>{/if}
|
||||
{if ($show_name)==1}<div class="st_product-list_other_name">{$product.name}</div>{/if}
|
||||
{if ($show_price)==1}
|
||||
{if ($product.check_price)!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="st_product-list_other_price_double">{$product.price_net} <br /><span>({$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="st_product-list_other_price">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="st_product-list_other_price">{$product.price_net}</div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="st_product-list_other_price_double">{$product.price} <br /><span>({$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div style="min-height: 47px; height: 47px;"></div>
|
||||
{/if}
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="st_product-list_other_discount">{__ text="Rabat"}: <span>{$product.discount} %</span></div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1)}
|
||||
{if $product.check_old_price==1}
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
<div class="st_product-list_other_old_price"><span>{$product.old_price_net}</span></div>
|
||||
{else}
|
||||
<div class="st_product-list_other_old_price"><span>{$product.old_price}</span></div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="st_product-list_other_discount"></div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="st_product-list_other_discount"></div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="st_component-st_product-product_list_other_foot">
|
||||
<br class="st_clear_all" />
|
||||
</div>
|
||||
<br class="st_clear_all" />
|
||||
@@ -0,0 +1,99 @@
|
||||
<div id="product_accessories">
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="item">
|
||||
{if ($show_image)==1}<div class="image roundies">{$product.photo}</div>{/if}
|
||||
{if ($show_name)==1}<div class="name">{$product.name}</div>{/if}
|
||||
{if $show_price==1 && $product.check_price!=1 && $product.points_only!=1 }
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="double_price price">{$product.price_net} <br /><span>({$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price"><span>{$product.price}</span></div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price"><span>{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="double_price price">{$product.price} <br /><span>({$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="price"></div>
|
||||
{/if}
|
||||
<div class="discount-old_price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1 && $product.points_only!=1}
|
||||
<div class="discount"><span>{$product.discount} %</span></div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1)}
|
||||
{if $product.check_old_price==1}
|
||||
<div class="old_price price">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
<span>{$product.old_price_net}</span>
|
||||
{else}
|
||||
<span>{$product.old_price}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="minor_price basic_price">
|
||||
{if $product.basic_price}
|
||||
<i>{$product.basic_price.quantity}<br />({$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity})</i>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if $points_system_is_active==1 && $show_points==1}
|
||||
|
||||
{if $display_type=='earn_value' && $product.points_only!=1}
|
||||
<div class="major_price price">{if $product.points_earn > 0}{__ text="Otrzymasz"}: <span style="color:green;">{$product.points_earn} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="minor_price price">{if $product.points_value > 0}(<span style="color:#ED1B24;">{$product.points_value} {$points_shortcut}</span>){/if}</div>
|
||||
{elseif $display_type=='only_value' || $product.points_only==1}
|
||||
<div class="price">{if $product.points_value > 0}<span style="color:#ED1B24;">{$product.points_value} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="price"></div>
|
||||
{elseif $display_type=='only_earn' && $product.points_only!=1}
|
||||
<div class="price">{if $product.points_earn > 0}{__ text="Otrzymasz"}: <span style="color:green;">{$product.points_earn} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="price"></div>
|
||||
{elseif $display_type=='value_earn' && $product.points_only!=1}
|
||||
<div class="major_price price">{if $product.points_value > 0}<span style="color:#ED1B24;">{$product.points_value} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="minor_price price">{if $product.points_earn > 0}({__ text="Otrzymasz"}: <span style="color:green;">{$product.points_earn} {$points_shortcut}</span>){/if}</div>
|
||||
{elseif $display_type=='value_earn_alternative' && $product.points_only!=1}
|
||||
<div class="major_price price">{if $product.points_value > 0}<span style="color:#ED1B24;">{$product.points_value} {$points_shortcut}</span>{/if}{if $product.points_value > 0 && $product.points_earn > 0} / {/if}{if $product.points_earn > 0}<span style="color:green;">{$product.points_earn} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="price"></div>
|
||||
{elseif $display_type=='earn_value_alternative' && $product.points_only!=1}
|
||||
<div class="major_price price">{if $product.points_earn > 0}<span style="color:green;">{$product.points_earn} {$points_shortcut}</span>{/if}{if $product.points_value > 0 && $product.points_earn > 0} / {/if}{if $product.points_value > 0}<span style="color:#ED1B24;">{$product.points_value} {$points_shortcut}</span>{/if}</div>
|
||||
<div class="price"></div>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
function equalHeight(group)
|
||||
{
|
||||
var tallest = 0;
|
||||
|
||||
group.each(function() {
|
||||
var height = $(this).height();
|
||||
if(height > tallest) {
|
||||
tallest = height;
|
||||
}
|
||||
});
|
||||
|
||||
group.height(tallest);
|
||||
}
|
||||
|
||||
function update() {
|
||||
equalHeight($("#product_accessories .image"));
|
||||
equalHeight($("#product_accessories .name"));
|
||||
equalHeight($("#product_accessories .price"));
|
||||
equalHeight($("#product_accessories .basic_price"));
|
||||
equalHeight($("#product_accessories .discount-old_price"));
|
||||
equalHeight($('#product_accessories .basket'));
|
||||
}
|
||||
|
||||
$(window).load(update);
|
||||
update();
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,129 @@
|
||||
<section id="product-accessories">
|
||||
<div class="full-list product-list row">
|
||||
{assign var='i' value=0}
|
||||
{foreach key=row item=product from=$results}
|
||||
{assign var='i' value=$i+1}
|
||||
<div class="product col-xs-12 col-sm-4 col-md-4 col-lg-4 item nr_{$i}">
|
||||
<div class="thumbnail clearfix view-img">
|
||||
<div class="pg_label">
|
||||
{foreach key=group_id item=group_image from=$product.my_groups}
|
||||
{$group_image}
|
||||
{/foreach}
|
||||
</div>
|
||||
{if $show_image==1}<div class="image">{$product.photo_small}</div>{/if}
|
||||
<div class="caption clearfix">
|
||||
<div class="caption_inner text-center">
|
||||
{if $show_name==1}<p class="text-center name">{$product.name}</p>{/if}
|
||||
{if $show_availability}
|
||||
<div class="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_weight}<div class="weight text-center">{if $product.weight}{__ text="Waga"}: {$product.weight}{/if}</div>{/if}
|
||||
{if $show_price==1}
|
||||
<div class="main_price text-center">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount-old_price">
|
||||
<div class="discount">{__ text="Rabat"}: <span class="nowrap">{$product.discount} %</span></div>
|
||||
</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="discount-old_price">
|
||||
<div class="price old_price nowrap">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_price==1 && $product.check_price!=1 && $product.points_only!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="text-muted basic_price text-center">
|
||||
{if $product.basic_price}
|
||||
<i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i>
|
||||
{/if}
|
||||
</div>
|
||||
<a class="mask-link" href="{$product.link}"></a>
|
||||
{if $button_type == 'basket'}
|
||||
{if $show_price==1 && $show_basket==1 && $product.check_price!=1}
|
||||
<div class="hidden-xs text-center">
|
||||
{basket_add_link product=$product.instance namespace="product_accessories"}
|
||||
</div>
|
||||
{/if}
|
||||
{else}
|
||||
<div class="hidden-xs text-center">
|
||||
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function ($) {
|
||||
|
||||
var productId = '#product-accessories ';
|
||||
|
||||
$(document).ready(function() {
|
||||
var images = $(productId + '.image img');
|
||||
var cnt = images.length;
|
||||
|
||||
function loaded() {
|
||||
cnt--;
|
||||
if (cnt == 0) {
|
||||
$(productId + '.full-list').masonry({
|
||||
itemSelector: '.item'
|
||||
});
|
||||
heightMainProd(productId);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
var image = images[i];
|
||||
|
||||
if (image.complete || image.readyState === 4) {
|
||||
loaded();
|
||||
}
|
||||
else {
|
||||
var $image = $(image);
|
||||
if (!$image.attr('src')) {
|
||||
loaded();
|
||||
} else {
|
||||
$image.one("load", loaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(window).resize(function() {
|
||||
heightMainProd(productId);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,107 @@
|
||||
{assign var='col_xs' value=$theme_config->getConfigParameter('layout_config.products_in_row_mobile')}
|
||||
{assign var='col_sm' value=$theme_config->getConfigParameter('layout_config.products_in_row_desktop')}
|
||||
|
||||
<section id="product-accessories" class="full-list product-list row">
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product{if $col_xs == 2} col-xs-6{else} col-xs-12{/if} col-sm-4{if $col_sm == 4} col-md-3 col-lg-3{elseif $col_sm == 5} col-md-3 col-lg-20p{else} col-default{/if}">
|
||||
<div class="thumbnail clearfix">
|
||||
{if $show_image==1}<div class="image{if $theme_config->getConfigParameter('layout_config.product_img_space') == 'space'} space{/if}">{$product.photo_small}</div>{/if}
|
||||
<div class="caption clearfix {if $theme_config->getConfigParameter('layout_config.product_info_align_desktop') == 'left'}text-left{else}text-center{/if}">
|
||||
{if $show_name==1}<p class="name">{$product.name}</p>{/if}
|
||||
{if $show_availability}
|
||||
<div class="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_weight}<div class="weight text-muted">{if $product.weight}{__ text="Waga"}: {$product.weight}{/if}</div>{/if}
|
||||
{if $show_description==1}<div class="description tinymce_html">{$product.description}</div>{/if}
|
||||
<div class="box-price">
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="price old_price">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="product-shopping-cart">
|
||||
{if $button_type == 'basket'}
|
||||
{if $show_price==1 && $show_basket==1}
|
||||
{basket_add_link product=$product.instance namespace="product_accesoriess_card"}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function ($) {
|
||||
|
||||
var containerList = $('#product-accessories');
|
||||
var containerListImg = $('#product-accessories .image img');
|
||||
|
||||
$(document).ready(function() {
|
||||
var images = containerListImg
|
||||
var cnt = images.length;
|
||||
|
||||
function loaded() {
|
||||
cnt--;
|
||||
if (cnt == 0) {
|
||||
containerList.masonry({
|
||||
itemSelector: '.product'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
var image = images[i];
|
||||
|
||||
if (image.complete || image.readyState === 4) {
|
||||
loaded();
|
||||
}
|
||||
else {
|
||||
var $image = $(image);
|
||||
if (!$image.attr('src')) {
|
||||
loaded();
|
||||
} else {
|
||||
$image.one("load", loaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,65 @@
|
||||
<section id="product-accessories" class="full-list product-list" >
|
||||
<div class="row" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product col-xs-4 col-sm-4 col-md-3 col-lg-3">
|
||||
<div class="thumbnail clearfix view-img">
|
||||
{if $show_image==1}<div data-equalizer-watch="image"><div class="image">{$product.photo_small}</div></div>{/if}
|
||||
<div class="text-center caption clearfix">
|
||||
<p class="name" data-equalizer-watch="name">{if $show_name==1}{$product.name}{/if}</p>
|
||||
<div data-equalizer-watch="info">
|
||||
{if $show_price==1 && $product.check_price!=1 && $product.points_only!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="double_price price">
|
||||
{$product.price_net}
|
||||
<div class="minor_price">({$product.price})</div>
|
||||
</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{$product.price_net}</div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="double_price price">
|
||||
{$product.price}
|
||||
<div class="minor_price">({$product.price_net})</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price text-center"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="discount-old_price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1 && $product.points_only!=1}
|
||||
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1)}
|
||||
{if $product.check_old_price==1}
|
||||
<div class="old_price price">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{basket_add_link product=$product.instance namespace="product_list"}
|
||||
<div class="text-center" data-equalizer-watch="basket">
|
||||
<a class="product-details" href="{$product.link}">{__ text="szczegóły" langCatalogue="stProduct"}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories [data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,93 @@
|
||||
{assign var='col_xs' value=$theme_config->getConfigParameter('layout_config.products_in_row_mobile')}
|
||||
{assign var='col_sm' value=$theme_config->getConfigParameter('layout_config.products_in_row_desktop')}
|
||||
|
||||
<section id="product-accessories" class="product-list full-list grid-wrapper grid-xs-{$col_xs} grid-sm-3{if $col_sm == 4} grid-md-4{elseif $col_sm == 5} grid-md-4 grid-lg-5{/if}" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product thumbnail clearfix">
|
||||
{if $is_observe_enabled }
|
||||
<div class="product-observe observe-no" data-product-observe="{$product.id}">
|
||||
<svg width="23" height="21" viewBox="0 0 23 21" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.4592 1C3.44417 1 1 3.81598 1 7.28966C1 7.97227 1.09438 8.62947 1.26893 9.2449C1.71875 10.8309 2.96968 12.0161 4.1733 13.1426L11.5 20L18.8267 13.1426C20.0303 12.0161 21.2813 10.8309 21.7311 9.2449C21.9056 8.62947 22 7.97227 22 7.28966C22 3.81598 19.5558 1 16.5408 1C14.2698 1 12.3227 2.59762 11.5 4.87056C10.6773 2.59762 8.73018 1 6.4592 1Z" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_image==1}
|
||||
<div data-equalizer-watch="image" class="relative">
|
||||
<div class="image">
|
||||
{$product.photo_small}
|
||||
</div>
|
||||
{if $show_description==1 && $product.description != ''}
|
||||
<div class="description tinymce_html" onclick="window.location.href='{$product.link}'">{$product.description}</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="caption text-left flex" data-equalizer-watch="caption">
|
||||
<div class="caption-left">
|
||||
{if $show_name==1}<p class="name">{$product.name}</p>{/if}
|
||||
{if $show_availability}
|
||||
<div class="product-availability">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_weight}<div class="weight text-muted">{if $product.weight}{__ text="Waga"}: {$product.weight}{/if}</div>{/if}
|
||||
{if $product.colors}<div class="options-color-on-list">{$product.colors}</div>{/if}
|
||||
<div class="product-shopping-cart">
|
||||
{if $button_type == 'basket'}
|
||||
{if $show_price==1 && $show_basket==1}
|
||||
{basket_add_link product=$product.instance namespace="product_acc"}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-shopping-cart" href="{$product.link}">{__ text="Sprawdź"}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="caption-right box-price">
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="price major_price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
<div class="price minor_price">({__ text="brutto"}: <span class="nowrap">{$product.price}</span>)</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price">{__ text="netto"}: <span class="nowrap">{$product.price_net}</span></div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="price major_price">{__ text="brutto"}: <span class="nowrap">{$product.price}</span></div>
|
||||
<div class="price minor_price">({__ text="netto"}: <span class="nowrap">{$product.price_net}</span>)</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount">{__ text="Rabat"}: {$product.discount} %</div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1 && $product.check_old_price==1)}
|
||||
<div class="price old_price">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories[data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
@@ -0,0 +1,79 @@
|
||||
<section id="product-accessories" class="full-list product-list" >
|
||||
<div class="row" data-equalizer>
|
||||
{foreach key=row item=product from=$results}
|
||||
<div class="product col-xs-4 col-sm-4 col-md-3 col-lg-3">
|
||||
<div class="thumbnail clearfix view-img">
|
||||
{if $is_observe_enabled }
|
||||
<div class="product-observe {if $product.is_observe}observe-yes{else}observe-no{/if}" data-product-observe="{$product.id}">
|
||||
<svg width="23" height="21" viewBox="0 0 23 21" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.4592 1C3.44417 1 1 3.81598 1 7.28966C1 7.97227 1.09438 8.62947 1.26893 9.2449C1.71875 10.8309 2.96968 12.0161 4.1733 13.1426L11.5 20L18.8267 13.1426C20.0303 12.0161 21.2813 10.8309 21.7311 9.2449C21.9056 8.62947 22 7.97227 22 7.28966C22 3.81598 19.5558 1 16.5408 1C14.2698 1 12.3227 2.59762 11.5 4.87056C10.6773 2.59762 8.73018 1 6.4592 1Z" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $show_image==1}<div data-equalizer-watch="image"><div class="image">{$product.photo_small}</div></div>{/if}
|
||||
<div class="text-center caption clearfix" data-equalizer-watch="info">
|
||||
<p class="name">{if $show_name==1}{$product.name}{/if}</p>
|
||||
{if $show_availability}
|
||||
<div class="product-availability text-center">
|
||||
{$product.availability}
|
||||
{if $show_stock}
|
||||
({$product.stock} {$product.uom})
|
||||
{/if}
|
||||
</div>
|
||||
{elseif $show_stock}
|
||||
<div class="product-availability text-center">
|
||||
{__ text="Dostępność" langCatalogue="stAvailabilityFrontend"}: {$product.stock} {$product.uom}
|
||||
</div>
|
||||
{/if}
|
||||
{if $show_price==1 && $product.check_price!=1}
|
||||
{if $price_view=='net_gross'}
|
||||
<div class="double_price price">
|
||||
<span class="nowrap">{$product.price_net}</span>
|
||||
<div class="minor_price nowrap">({$product.price})</div>
|
||||
</div>
|
||||
{elseif $price_view=='only_gross'}
|
||||
<div class="price nowrap">{$product.price}</div>
|
||||
{elseif $price_view=='only_net'}
|
||||
<div class="price nowrap">{$product.price_net}</div>
|
||||
{elseif $price_view=='gross_net'}
|
||||
<div class="double_price price">
|
||||
<span class="nowrap">{$product.price}</span>
|
||||
<div class="minor_price nowrap">({$product.price_net})</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $product.basic_price}
|
||||
<div class="text-muted basic_price text-center"><i>{$product.basic_price.quantity} ( {$product.basic_price.brutto} {__ text="za"} {$product.basic_price.for_quantity} )</i></div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="discount-old_price">
|
||||
{if $show_discount==1 && $product.discount!=0 && $product.check_price!=1}
|
||||
<div class="discount">{__ text="Rabat"}: <span class="nowrap">{$product.discount} %</span></div>
|
||||
{elseif ($show_old_price==1 && $product.check_price!=1)}
|
||||
{if $product.check_old_price==1}
|
||||
<div class="old_price price nowrap">
|
||||
{if ($price_view=='net_gross' || $price_view=='only_net')}
|
||||
{$product.old_price_net}
|
||||
{else}
|
||||
{$product.old_price}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($) {
|
||||
$(document).ready(function() {
|
||||
$('#product-accessories [data-equalizer]').equalizer({ use_tallest: true });
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
Reference in New Issue
Block a user