User Order step1

This commit is contained in:
Kevin Adametz 2020-08-07 16:02:03 +02:00
parent eb55b01b0d
commit a5db985ae8
90 changed files with 6439 additions and 421 deletions

4
.env
View file

@ -16,8 +16,8 @@ APP_URL_CRM=my.
APP_CHECKOUT_MAIL=kevin.adametz@me.com APP_CHECKOUT_MAIL=kevin.adametz@me.com
APP_INFO_MAIL=info@adametz.media APP_INFO_MAIL=info@adametz.media
APP_DEFAULT_MAIL=info@mivita.care APP_DEFAULT_MAIL=info@mivita.care
APP_CHECKOUT_TEST_MAIL=devtest@mivita.care APP_CHECKOUT_TEST_MAIL=kevin.adametz@me.com
APP_INFO_TEST_MAIL=devtest@mivita.care APP_INFO_TEST_MAIL=kevin.adametz@me.com
LOG_CHANNEL=stack LOG_CHANNEL=stack

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="framework" type="frameworkType"/>
<xs:complexType name="commandType">
<xs:all>
<xs:element type="xs:string" name="name" minOccurs="1" maxOccurs="1"/>
<xs:element type="xs:string" name="params" minOccurs="0" maxOccurs="1"/>
<xs:element type="xs:string" name="help" minOccurs="0" maxOccurs="1"/>
<xs:element type="optionsBeforeType" name="optionsBefore" minOccurs="0" maxOccurs="1"/>
</xs:all>
</xs:complexType>
<xs:complexType name="frameworkType">
<xs:sequence>
<xs:element type="xs:string" name="extraData" minOccurs="0" maxOccurs="1"/>
<xs:element type="commandType" name="command" maxOccurs="unbounded" minOccurs="0"/>
<xs:element type="xs:string" name="help" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="invoke" use="required"/>
<xs:attribute type="xs:string" name="alias" use="required"/>
<xs:attribute type="xs:boolean" name="enabled" use="required"/>
<xs:attribute type="xs:integer" name="version" use="required"/>
<xs:attribute type="xs:string" name="frameworkId" use="optional"/>
</xs:complexType>
<xs:complexType name="optionsBeforeType">
<xs:sequence>
<xs:element type="optionType" name="option" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="optionType">
<xs:sequence>
<xs:element type="xs:string" name="help" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute type="xs:string" name="name" use="required"/>
<xs:attribute type="xs:string" name="shortcut" use="optional"/>
<xs:attribute name="pattern" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="space"/>
<xs:enumeration value="equals"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>

14
.idea/php-test-framework.xml generated Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpTestFrameworkVersionCache">
<tools_cache>
<tool tool_name="PHPUnit">
<cache>
<versions>
<info id="Local" version="9.1.4" />
</versions>
</cache>
</tool>
</tools_cache>
</component>
</project>

196
.idea/workspace.xml generated
View file

@ -2,19 +2,88 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment=""> <list default="true" id="2fbaac5f-25ba-4502-a970-cc14728d7d55" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/commandlinetools/Laravel_30_07_20__14_22.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/commandlinetools/schemas/frameworkDescriptionVersion1.1.4.xsd" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/php-test-framework.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/PaymentMethodController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/User/OrderController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Mail/MailSyS.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Services/SysLog.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/public/js/shopping_card.js" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/customer/_customer_detail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/modal/show_product.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/modal/show_user_customers.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/admin/payment_method/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/emails/sys.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/sys/settings/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/delivery.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/list.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/list_form.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/shipping_me.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/user/order/shipping_ot.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.phpstorm.meta.php" beforeDir="false" afterPath="$PROJECT_DIR$/.phpstorm.meta.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper_models.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper_models.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/AdminUserController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/KasSLLController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/KasSLLController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/PayoneController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/PayoneController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Api/ShoppingUserController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/ShoppingUserController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/CustomerController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/CustomerController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/DataTableController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/ModalController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/ModalController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/ProductController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/ProductController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/ShippingController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/ShippingController.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Http/Controllers/ShippingController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/ShippingController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Sys/AdminToolsController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Sys/AdminToolsController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/User/CustomerController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/User/CustomerController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Web/ContactController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Web/ContactController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Web/RegisterController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Web/RegisterController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Mail/MailContact.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Mail/MailContact.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Mail/MailInfo.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Mail/MailInfo.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Product.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Product.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Shipping.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Shipping.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/Shipping.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Shipping.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ShippingPrice.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShippingPrice.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShippingPrice.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShippingPrice.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/Yard.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Yard.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingOrder.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/cart.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cart.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/Models/ShoppingOrderItem.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingOrderItem.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/ShoppingUser.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/ShoppingUser.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Repositories/ProductRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/ProductRepository.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Repositories/UserRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/UserRepository.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/HTMLHelper.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/HTMLHelper.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/UserService.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/UserService.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/User.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2014_10_12_000000_create_users_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_21_164001_create_products_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_01_06_004849_create_shipping_prices_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_01_06_004849_create_shipping_prices_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/database/migrations/2019_01_06_004849_create_shipping_prices_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_01_06_004849_create_shipping_prices_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_02_23_163724_create_shopping_order_items_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_23_163724_create_shopping_order_items_table.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/database/migrations/2019_02_23_163527_create_shopping_orders_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_23_163527_create_shopping_orders_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2019_02_25_090014_create_payment_transactions_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2019_02_25_090014_create_payment_transactions_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/assets/css/custom-style.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/assets/css/custom-style.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/css/application.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/css/application.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/js/custom.js" beforeDir="false" afterPath="$PROJECT_DIR$/public/js/custom.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/lang/de/email.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de/email.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/lang/de/email.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de/email.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/lang/de/navigation.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de/navigation.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/lang/de/validation.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/lang/de/validation.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/customer/_detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/customer/_detail.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/customer/_edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/customer/_edit.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/lead/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/lead/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/level/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/level/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/product/form.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/product/form.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/product/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/product/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/admin/shipping/edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/shipping/edit.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/shipping/edit.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/shipping/edit.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/checkout.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/checkout.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/admin/user/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/admin/user/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/checkout_status.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/checkout_status.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/templates/card.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/card.blade.php" afterDir="false" /> <change beforePath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/sys/admin/customers.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/sys/admin/customers.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/user/customer/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/user/customer/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/layouts/application.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/layouts/includes/footer.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/layouts/includes/footer.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/templates/kontakt.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/kontakt.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/templates/registrierung.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/templates/registrierung.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/user/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/user/layouts/application.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/web/user/layouts/includes/footer.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/web/user/layouts/includes/footer.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -253,19 +322,19 @@
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/app/Http/Controllers/Api" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views/admin/customer" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" /> <property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="reference.webide.settings.project.settings.php.composer" /> <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS"> <key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/app/Http/Controllers/Api" /> <recent name="$PROJECT_DIR$/resources/views/admin/customer" />
<recent name="$PROJECT_DIR$/app/Http/Middleware" /> <recent name="$PROJECT_DIR$/resources/views/admin/modal" />
<recent name="$PROJECT_DIR$/app" /> <recent name="$PROJECT_DIR$/resources/views/user/order" />
<recent name="$PROJECT_DIR$/app/Import" /> <recent name="$PROJECT_DIR$/app/Http/Controllers/SyS" />
<recent name="$PROJECT_DIR$/resources/views/sys/admin" /> <recent name="$PROJECT_DIR$/resources/views/sys/settings" />
</key> </key>
<key name="MoveFile.RECENT_KEYS"> <key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/user/customer" /> <recent name="$PROJECT_DIR$/resources/views/user/customer" />
@ -275,7 +344,11 @@
<recent name="$PROJECT_DIR$/resources/views/admin/lead" /> <recent name="$PROJECT_DIR$/resources/views/admin/lead" />
</key> </key>
</component> </component>
<component name="RunManager"> <component name="RunManager" selected="Shell Script.composer-post-update.sh">
<configuration name="de" type="PHPUnitRunConfigurationType" factoryName="PHPUnit" temporary="true">
<TestRunner directory="$PROJECT_DIR$/resources/lang/de" />
<method v="2" />
</configuration>
<configuration default="true" type="ShConfigurationType"> <configuration default="true" type="ShConfigurationType">
<option name="INDEPENDENT_SCRIPT_PATH" value="true" /> <option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="$USER_HOME$/Documents/scripts/composer-post-update.sh" /> <option name="SCRIPT_PATH" value="$USER_HOME$/Documents/scripts/composer-post-update.sh" />
@ -298,7 +371,13 @@
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<recent_temporary>
<list>
<item itemvalue="PHPUnit.de" />
</list>
</recent_temporary>
</component> </component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration"> <component name="SvnConfiguration">
<configuration /> <configuration />
</component> </component>
@ -487,7 +566,22 @@
<workItem from="1592831761021" duration="3000" /> <workItem from="1592831761021" duration="3000" />
<workItem from="1592905155133" duration="2081000" /> <workItem from="1592905155133" duration="2081000" />
<workItem from="1593539130650" duration="5379000" /> <workItem from="1593539130650" duration="5379000" />
<workItem from="1593607978036" duration="4312000" /> <workItem from="1593607978036" duration="4673000" />
<workItem from="1594295945600" duration="612000" />
<workItem from="1594721064087" duration="5912000" />
<workItem from="1594733233309" duration="1305000" />
<workItem from="1595674257808" duration="9321000" />
<workItem from="1595923785716" duration="1023000" />
<workItem from="1595948227650" duration="1138000" />
<workItem from="1595949374319" duration="4908000" />
<workItem from="1596107641527" duration="35000" />
<workItem from="1596107688024" duration="1943000" />
<workItem from="1596111667880" duration="6240000" />
<workItem from="1596119318253" duration="10939000" />
<workItem from="1596188575338" duration="7868000" />
<workItem from="1596268902765" duration="165000" />
<workItem from="1596269074069" duration="69000" />
<workItem from="1596802450904" duration="6190000" />
</task> </task>
<servers /> <servers />
</component> </component>
@ -501,7 +595,7 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" /> <option name="version" value="3" />
</component> </component>
<component name="Vcs.Log.Tabs.Properties"> <component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES"> <option name="TAB_STATES">
@ -516,46 +610,82 @@
<option name="oldMeFiltersMigrated" value="true" /> <option name="oldMeFiltersMigrated" value="true" />
</component> </component>
<component name="WindowStateProjectService"> <component name="WindowStateProjectService">
<state x="880" y="397" key="#Deployment" timestamp="1587107443381"> <state x="855" y="380" key="#Plugins" timestamp="1595923800434">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="880" y="397" key="#Deployment/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1587107443381" /> <state x="855" y="380" key="#Plugins/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1595923800434" />
<state x="1219" y="419" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1589898669859"> <state x="688" y="23" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1596113300502">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1219" y="419" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1589898669859" /> <state x="688" y="23" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596113300502" />
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1591964088698"> <state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1596190525352">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591964088698" /> <state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596190525352" />
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/2560.-493.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1585733837456" /> <state width="2421" height="408" key="GridCell.Tab.0.bottom" timestamp="1595683782568">
<state x="1019" y="499" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1587109063136" /> <screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="408" key="GridCell.Tab.0.bottom/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782568" />
<state width="2421" height="408" key="GridCell.Tab.0.center" timestamp="1595683782567">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="408" key="GridCell.Tab.0.center/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782567" />
<state width="2421" height="408" key="GridCell.Tab.0.left" timestamp="1595683782567">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="408" key="GridCell.Tab.0.left/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782567" />
<state width="2421" height="408" key="GridCell.Tab.0.right" timestamp="1595683782568">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="408" key="GridCell.Tab.0.right/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782568" />
<state width="2421" height="501" key="GridCell.Tab.1.bottom" timestamp="1595683782557">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="501" key="GridCell.Tab.1.bottom/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782557" />
<state width="2421" height="501" key="GridCell.Tab.1.center" timestamp="1595683782557">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="501" key="GridCell.Tab.1.center/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782557" />
<state width="2421" height="501" key="GridCell.Tab.1.left" timestamp="1595683782557">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="501" key="GridCell.Tab.1.left/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782557" />
<state width="2421" height="501" key="GridCell.Tab.1.right" timestamp="1595683782557">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="2421" height="501" key="GridCell.Tab.1.right/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595683782557" />
<state x="1002" y="464" key="NewPhpClassDialog" timestamp="1589893405691"> <state x="1002" y="464" key="NewPhpClassDialog" timestamp="1589893405691">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1002" y="464" key="NewPhpClassDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1589893405691" /> <state x="1002" y="464" key="NewPhpClassDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1589893405691" />
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1591963287409"> <state x="758" y="370" key="SettingsEditor" timestamp="1596269067229">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591963287409" /> <state x="758" y="370" key="SettingsEditor/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1596269067229" />
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/2560.-493.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1585748173200" /> <state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1596109164818">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="1064" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596109164818" />
<state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog" timestamp="1591961096724"> <state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog" timestamp="1591961096724">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591961096724" /> <state x="951" y="549" key="com.jetbrains.php.test.PhpNewTestDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1591961096724" />
<state x="805" y="444" width="1115" height="793" key="find.popup" timestamp="1593612216078"> <state x="531" y="536" width="1497" height="794" key="find.popup" timestamp="1596805311824">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="805" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1589024021327" /> <state x="805" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1589024021327" />
<state x="-1755" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1589974580416" /> <state x="-1755" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1589974580416" />
<state x="805" y="444" width="1115" height="793" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1593612216078" /> <state x="531" y="536" width="1497" height="794" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1596805311824" />
<state x="863" y="438" width="1115" height="793" key="find.popup/2560.-493.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1585758694219" /> <state x="863" y="438" width="1115" height="793" key="find.popup/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595682561944" />
<state x="863" y="438" width="1115" height="793" key="find.popup/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1587109016568" /> <state width="600" height="428" key="javadoc.popup" timestamp="1594733832314">
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup" timestamp="1593542096563"> <screen x="0" y="23" width="2560" height="1417" />
</state>
<state width="600" height="428" key="javadoc.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1594733832314" />
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup" timestamp="1595679115918">
<screen x="0" y="23" width="2560" height="1417" /> <screen x="0" y="23" width="2560" height="1417" />
</state> </state>
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1593542096563" /> <state x="945" y="377" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1593542096563" />
<state x="945" y="377" width="670" height="676" key="search.everywhere.popup/2560.-493.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1585408665805" /> <state x="945" y="377" width="670" height="676" key="search.everywhere.popup/2560.-527.1440.2537/-2560.23.2560.1417/0.23.2560.1417@0.23.2560.1417" timestamp="1595679115918" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View file

@ -5,7 +5,7 @@ namespace PHPSTORM_META {
/** /**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm * PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2020-06-12 14:15:43. * Generated on 2020-07-25 15:29:15.
* *
* @author Barry vd. Heuvel <barryvdh@gmail.com> * @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper * @see https://github.com/barryvdh/laravel-ide-helper

1
.phpunit.result.cache Normal file
View file

@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":44:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:0:{}}}

View file

@ -3,7 +3,7 @@
/** /**
* A helper file for Laravel, to provide autocomplete information to your IDE * A helper file for Laravel, to provide autocomplete information to your IDE
* Generated for Laravel 6.18.14 on 2020-06-12 14:15:41. * Generated for Laravel 6.18.14 on 2020-07-25 15:29:12.
* *
* This file should not be included in your code, only analyzed by your IDE! * This file should not be included in your code, only analyzed by your IDE!
* *

View file

@ -113,10 +113,43 @@ namespace App{
* @property-read int|null $clients_count * @property-read int|null $clients_count
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens
* @property-read int|null $tokens_count * @property-read int|null $tokens_count
* @property array|null $payment_methods
* @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePaymentMethods($value)
*/ */
class User extends \Eloquent {} class User extends \Eloquent {}
} }
namespace App\Models{
/**
* Class PaymentMethod
*
* @property int $id
* @property string $name
* @property string $short
* @property int $show_at
* @property int $pos
* @property bool $active
* @property bool $default
* @property Carbon $created_at
* @property Carbon $updated_at
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereDefault($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod wherePos($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShort($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShowAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value)
* @mixin \Eloquent
*/
class PaymentMethod extends \Eloquent {}
}
namespace App\Models{ namespace App\Models{
/** /**
* App\Models\ShippingCountry * App\Models\ShippingCountry
@ -214,10 +247,12 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property float|null $tax_rate
* @property \Illuminate\Support\Carbon|null $deleted_at * @property \Illuminate\Support\Carbon|null $deleted_at
* @property string|null $user_deleted_at * @property string|null $user_deleted_at
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem onlyTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereTaxRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUserDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withoutTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withoutTrashed()
@ -253,7 +288,7 @@ namespace App\Models{
* @property int $id * @property int $id
* @property int $shipping_id * @property int $shipping_id
* @property float|null $price * @property float|null $price
* @property float|null $tax * @property float|null $tax_rate
* @property float|null $factor * @property float|null $factor
* @property float|null $total_from * @property float|null $total_from
* @property float|null $total_to * @property float|null $total_to
@ -277,6 +312,8 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property-write mixed $tax
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTaxRate($value)
*/ */
class ShippingPrice extends \Eloquent {} class ShippingPrice extends \Eloquent {}
} }
@ -524,6 +561,8 @@ namespace App\Models{
* @property-read int|null $country_prices_count * @property-read int|null $country_prices_count
* @property int|null $wp_number * @property int|null $wp_number
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value)
* @property bool|null $shipping_addon
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShippingAddon($value)
*/ */
class Product extends \Eloquent {} class Product extends \Eloquent {}
} }
@ -592,6 +631,8 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingPrice[] $shipping_prices
* @property-read int|null $shipping_prices_count
*/ */
class Shipping extends \Eloquent {} class Shipping extends \Eloquent {}
} }
@ -914,6 +955,74 @@ namespace App\Models{
class Attribute extends \Eloquent {} class Attribute extends \Eloquent {}
} }
namespace App\Models{
/**
* App\Models\ShoppingOrder
*
* @property int $id
* @property int $shopping_user_id
* @property int|null $auth_user_id
* @property int $country_id
* @property int $user_shop_id
* @property float|null $total
* @property float|null $shipping
* @property float|null $subtotal
* @property float|null $tax_rate
* @property float|null $tax
* @property float|null $total_shipping
* @property int|null $weight
* @property int|null $paid
* @property string|null $txaction
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\User|null $auth_user
* @property-read \App\Models\Country $country
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrderItem[] $shopping_order_items
* @property-read int|null $shopping_order_items_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingPayment[] $shopping_payments
* @property-read int|null $shopping_payments_count
* @property-read \App\Models\ShoppingUser $shopping_user
* @property-read \App\Models\UserShop $user_shop
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereAuthUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaid($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShipping($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereShoppingUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereSubtotal($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTax($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTaxRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotal($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTotalShipping($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereTxaction($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserShopId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereWeight($value)
* @mixin \Eloquent
* @property int|null $payment_for
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder wherePaymentFor($value)
* @property int|null $member_id
* @property string|null $mode
* @property-read \App\User|null $member
* @property-read \App\Models\UserHistory|null $user_history
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMemberId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereMode($value)
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property string|null $user_deleted_at
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed()
* @property-read \App\Models\ShippingCountry $shipping_country
*/
class ShoppingOrder extends \Eloquent {}
}
namespace App\Models{ namespace App\Models{
/** /**
* Class CountryPrice * Class CountryPrice

View file

@ -4,8 +4,11 @@ namespace App\Http\Controllers;
use App\Models\PaymentMethod;
use App\Models\UserAccount; use App\Models\UserAccount;
use App\Repositories\UserRepository; use App\Repositories\UserRepository;
use App\Services\HTMLHelper;
use App\Services\SysLog;
use App\User; use App\User;
use Auth; use Auth;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
@ -63,6 +66,11 @@ class AdminUserController extends Controller
if(isset($data['save-admin'])){ if(isset($data['save-admin'])){
$user->admin = $data['admin']; $user->admin = $data['admin'];
SysLog::action('save-admin', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user admin value: '.HTMLHelper::getRoleLabel($user->admin))
->save();
} }
if(isset($data['save-confirmed'])){ if(isset($data['save-confirmed'])){
@ -77,10 +85,14 @@ class AdminUserController extends Controller
}else{ }else{
$user->confirmation_date = null; $user->confirmation_date = null;
} }
SysLog::action('save-confirmed', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user confirmed value: '.$user->confirmed." to date: ".$data['confirmation_date'])
->save();
} }
if(isset($data['save-active'])){ if(isset($data['save-active'])){
$data['active'] = isset($data['active']) ? true : false; $data['active'] = isset($data['active']) ? true : false;
$user->active = $data['active']; $user->active = $data['active'];
if($data['active']){ if($data['active']){
@ -92,28 +104,59 @@ class AdminUserController extends Controller
}else{ }else{
$user->active_date = null; $user->active_date = null;
} }
SysLog::action('save-active', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user active value: '.$user->active." to date: ".$data['active_date'])
->save();
} }
if(isset($data['save-account'])){ if(isset($data['save-account'])){
$old = $user->getPaymentAccountDateFormat(true);
if(!isset($data['payment_account']) || $data['payment_account'] == ""){ if(!isset($data['payment_account']) || $data['payment_account'] == ""){
$user->payment_account = null; $user->payment_account = null;
}else{ }else{
$user->wizard = 100; $user->wizard = 100;
$user->payment_account = \Carbon::parse(str_replace("- ", "", $data['payment_account'])); $user->payment_account = \Carbon::parse(str_replace("- ", "", $data['payment_account']));
} }
SysLog::action('save-account', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user payment_account from date: '.$old." to date: ".$data['payment_account'])
->save();
} }
if(isset($data['save-shop'])){ if(isset($data['save-shop'])){
$old = $user->getPaymentShopDateFormat(true);
if(!isset($data['payment_shop']) || $data['payment_shop'] == ""){ if(!isset($data['payment_shop']) || $data['payment_shop'] == ""){
$user->payment_shop = null; $user->payment_shop = null;
}else{ }else{
$user->wizard = 100; $user->wizard = 100;
$user->payment_shop = \Carbon::parse(str_replace("- ", "", $data['payment_shop'])); $user->payment_shop = \Carbon::parse(str_replace("- ", "", $data['payment_shop']));
} }
SysLog::action('save-shop', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user payment_shop from date: '.$old." to date: ".$data['payment_shop'])
->save();
} }
if(isset($data['save-test_mode'])){ if(isset($data['save-test_mode'])){
$user->test_mode = isset($data['test_mode']) ? true : false;; $user->test_mode = isset($data['test_mode']) ? true : false;
SysLog::action('save-test_mode', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user test_mode value: '.$user->test_mode)
->save();
}
if(isset($data['save-payment_methods'])){
$user->payment_methods = isset($data['payment_methods']) ? array_map('intval', $data['payment_methods']) : null;
SysLog::action('save-payment_methods', 'admin_user', 3)
->setUserId(Auth::user()->id)
->setModel($user->id, User::class)
->setMessage('Set user payment_methods value: '.$user->getPaymentMethodsShort())
->save();
} }
$user->save(); $user->save();

View file

@ -132,36 +132,36 @@ idWkvklsQLI+qGu41SWyxP7x09fn1txDAXYw+zuLXfdKiXyaNb78yvBXAfCNP6CH
MntHWpdLgtJmwsQt6j8k9Kf5qLnjatkYYaA7jBU= MntHWpdLgtJmwsQt6j8k9Kf5qLnjatkYYaA7jBU=
-----END CERTIFICATE----- -----END CERTIFICATE-----
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIFdzCCBF+gAwIBAgIQE+oocFv07O0MNmMJgGFDNjANBgkqhkiG9w0BAQwFADBv MIIFgTCCBGmgAwIBAgIQOXJEOvkit1HX02wQ3TE1lTANBgkqhkiG9w0BAQwFADB7
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk MQswCQYDVQQGEwJHQjEbMBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF VQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEhMB8GA1UE
eHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFow AwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTE5MDMxMjAwMDAwMFoXDTI4
gYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5MRQwEgYDVQQHEwtK MTIzMTIzNTk1OVowgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpOZXcgSmVyc2V5
ZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMS4wLAYD MRQwEgYDVQQHEwtKZXJzZXkgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBO
VQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjAN ZXR3b3JrMS4wLAYDVQQDEyVVU0VSVHJ1c3QgUlNBIENlcnRpZmljYXRpb24gQXV0
BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sIs9CsVw127c0n00yt aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAgBJlFzYOw9sI
UINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnGvDoZtF+mvX2do2NC s9CsVw127c0n00ytUINh4qogTQktZAnczomfzD2p7PbPwdzx07HWezcoEStH2jnG
tnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQIjy8/hPwhxR79uQf vDoZtF+mvX2do2NCtnbyqTsrkfjib9DsFiCQCT7i6HTJGLSR1GJk23+jBvGIGGqQ
jtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfbIWax1Jt4A8BQOujM Ijy8/hPwhxR79uQfjtTkUcYRZ0YIUcuGFFQ/vDP+fmyc/xadGL1RjjWmp2bIcmfb
8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0tyA9yn8iNK5+O2hm IWax1Jt4A8BQOujM8Ny8nkz+rwWWNR9XWrf/zvk9tyy29lTdyOcSOk2uTIq3XJq0
AUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97Exwzf4TKuzJM7UXiV tyA9yn8iNK5+O2hmAUTnAU5GU5szYPeUvlM3kHND8zLDU+/bqv50TmnHa4xgk97E
Z4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNVicQNwZNUMBkTrNN9 xwzf4TKuzJM7UXiVZ4vuPVb+DNBpDxsP8yUmazNt925H+nND5X4OpWaxKXwyhGNV
N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5D9kCnusSTJV882sF icQNwZNUMBkTrNN9N6frXTpsNVzbQdcS2qlJC9/YgIoJk2KOtWbPJYjNhLixP6Q5
qV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJWBp/kjbmUZIO8yZ9 D9kCnusSTJV882sFqV4Wg8y4Z+LoE53MW4LTTLPtW//e5XOsIzstAL81VXQJSdhJ
HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ5lhCLkMaTLTwJUdZ WBp/kjbmUZIO8yZ9HE0XvMnsQybQv0FfQKlERPSZ51eHnlAfV1SoPv10Yy+xUGUJ
+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzGKAgEJTm4Diup8kyX 5lhCLkMaTLTwJUdZ+gQek9QmRkpQgbLevni3/GcV4clXhB4PY9bpYrrWX1Uu6lzG
HAc/DVL17e8vgg8CAwEAAaOB9DCB8TAfBgNVHSMEGDAWgBStvZh6NLQm9/rEJlTv KAgEJTm4Diup8kyXHAc/DVL17e8vgg8CAwEAAaOB8jCB7zAfBgNVHSMEGDAWgBSg
A73gJMtUGjAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/ EQojPpbxB+zirynvgqV/0DCktDAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rID
BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAGBgRVHSAAMEQGA1Ud ZsswDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAG
HwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9BZGRUcnVzdEV4 BgRVHSAAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29t
dGVybmFsQ0FSb290LmNybDA1BggrBgEFBQcBAQQpMCcwJQYIKwYBBQUHMAGGGWh0 L0FBQUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDQGCCsGAQUFBwEBBCgwJjAkBggr
dHA6Ly9vY3NwLnVzZXJ0cnVzdC5jb20wDQYJKoZIhvcNAQEMBQADggEBAJNl9jeD BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMA0GCSqGSIb3DQEBDAUA
lQ9ew4IcH9Z35zyKwKoJ8OkLJvHgwmp1ocd5yblSYMgpEg7wrQPWCcR23+WmgZWn A4IBAQAYh1HcdCE9nIrgJ7cz0C7M7PDmy14R3iJvm3WOnnL+5Nb+qh+cli3vA0p+
RtqCV6mVksW2jwMibDN3wXsyF24HzloUQToFJBv2FAY7qCUkDrvMKnXduXBBP3zQ rvSNb3I8QzvAP+u431yqqcau8vzY7qN7Q/aGNnwU4M309z/+3ri0ivCRlv79Q2R+
YzYhBx9G/2CkkeFnvN4ffhkUyWNnkepnB2u0j4vAbkN9w6GAbLIevFOFfdyQoaS8 /czSAaF9ffgZGclCKxO/WIu6pKJmBHaIkU4MiRTOok3JMrO66BQavHHxW/BBC5gA
Le9Gclc1Bb+7RrtubTeZtv8jkpHGbkD4jylW6l/VXxRTrPBPYer3IsynVgviuDQf CiIDEOUMsfnNkjcZ7Tvx5Dq2+UUTJnWvu6rvP3t3O9LEApE9GQDTF1w52z97GA1F
Jtl7GQVoP7o81DgGotPmjw7jtHFtQELFhLRAlSv0ZaBIefYdgWOWnU914Ph85I6p zZOFli9d31kWTz9RvdVFGD/tSo7oBmF0Ixa1DVBzJ0RHfxBdiSprhTEUxOipakyA
0fKtirOMxyHNwu8= vGp4z7h/jnZymQyd/teRCBaho1+V
-----END CERTIFICATE-----"; -----END CERTIFICATE-----";

View file

@ -86,8 +86,11 @@ class PayoneController extends Controller
die(); die();
} }
$price = intval($data['price']*100); $price = number_format((round($data['price'],2) * 100), 0, '.', '');
if($shopping_payment->amount != $price){ $price_amount = number_format($shopping_payment->amount, 0, '.', '');
if($price_amount != $price){
$data['shopping_payment-amount'] = $price_amount;
$data['price-amount'] = $price;
\Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data)); \Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data));
echo "PaymentStatus: Price error:"; echo "PaymentStatus: Price error:";
var_dump($data); var_dump($data);

View file

@ -229,6 +229,7 @@ class ShoppingUserController extends Controller
'wp_order' => 'required', 'wp_order' => 'required',
]); ]);
$shopping_user = ShoppingUser::where('wp_order_number', '=', $request->wp_order_number)->first(); $shopping_user = ShoppingUser::where('wp_order_number', '=', $request->wp_order_number)->first();
if (!$shopping_user) { if (!$shopping_user) {
return response()->json([ return response()->json([
@ -251,7 +252,10 @@ class ShoppingUserController extends Controller
}else{ }else{
$wp_order = $request->wp_order; $wp_order = $request->wp_order;
} }
$wp_order = $this->prepareOrder($wp_order, $shopping_user);
$wp_invoice_path = isset($request->wp_invoice_path) ? $request->wp_invoice_path : null;
$wp_order = $this->prepareOrder($wp_order, $shopping_user, $wp_invoice_path);
//TODO Status //TODO Status
if ($wp_order){ if ($wp_order){
$user = $this->prepareForShow($shopping_user); $user = $this->prepareForShow($shopping_user);
@ -260,6 +264,7 @@ class ShoppingUserController extends Controller
'success' => true, 'success' => true,
'data' => [ 'data' => [
'wp_order_number' => $shopping_user->wp_order_number, 'wp_order_number' => $shopping_user->wp_order_number,
'wp_invoice_path' => $wp_invoice_path,
'wp_order' => $wp_order, 'wp_order' => $wp_order,
'user' => $user, 'user' => $user,
'order' => $order, 'order' => $order,
@ -351,6 +356,7 @@ class ShoppingUserController extends Controller
} }
$ret = [ $ret = [
'country' => isset($shopping_order->shipping_country->country->code) ? $shopping_order->shipping_country->country->code : '', 'country' => isset($shopping_order->shipping_country->country->code) ? $shopping_order->shipping_country->country->code : '',
'wp_invoice_path' => $shopping_order->wp_invoice_path,
'total' => ($shopping_order->total*100), 'total' => ($shopping_order->total*100),
'shipping' => ($shopping_order->shipping*100), 'shipping' => ($shopping_order->shipping*100),
'total_net' => ($shopping_order->subtotal*100), 'total_net' => ($shopping_order->subtotal*100),
@ -374,18 +380,21 @@ class ShoppingUserController extends Controller
private function prepareForUpdate($data){ private function prepareForUpdate($data){
//$salutation = array(1 => 'mr', 2 => 'ms', 3=>null); //$salutation = array(1 => 'mr', 2 => 'ms', 3=>null);
if(isset($data['billing_salutation'])){
$data['billing_salutation'] = (int) $data['billing_salutation'];
$data['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr';
}
if(isset($data['shipping_salutation'])){
$data['shipping_salutation'] = (int) $data['shipping_salutation'];
$data['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr';
}
$ret = []; $ret = [];
$needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_phone', 'billing_email', 'same_as_billing', $needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_phone', 'billing_email', 'same_as_billing',
'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_phone']; 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_phone'];
foreach ($data as $key=>$value){ foreach ($data as $key=>$value){
if($key === 'billing_salutation') {
$ret['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr';
}
if($key === 'shipping_salutation') {
$ret['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr';
}
if($key === 'billing_country_code' && isset($data['billing_country_code'])) { if($key === 'billing_country_code' && isset($data['billing_country_code'])) {
$ret['billing_country_id'] = Country::getCountryIdByCodeOrOne($data['billing_country_code']); $ret['billing_country_id'] = Country::getCountryIdByCodeOrOne($data['billing_country_code']);
} }
@ -408,6 +417,14 @@ class ShoppingUserController extends Controller
private function prepareForStore($data){ private function prepareForStore($data){
//$salutation = array(1 => 'mr', 2 => 'ms', 3=>null); //$salutation = array(1 => 'mr', 2 => 'ms', 3=>null);
if(isset($data['billing_salutation'])){
$data['billing_salutation'] = (int) $data['billing_salutation'];
$data['billing_salutation'] = $data['billing_salutation'] == 2 ? 'ms' : 'mr';
}
if(isset($data['shipping_salutation'])){
$data['shipping_salutation'] = (int) $data['shipping_salutation'];
$data['shipping_salutation'] = $data['shipping_salutation'] == 2 ? 'ms' : 'mr';
}
$ret = []; $ret = [];
$needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_country_id', 'billing_phone', 'billing_email', $needs = [ 'billing_salutation', 'billing_company', 'billing_firstname', 'billing_lastname', 'billing_address', 'billing_address_2', 'billing_zipcode', 'billing_city', 'billing_country_id', 'billing_phone', 'billing_email',
'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_phone', 'shipping_salutation', 'shipping_company', 'shipping_firstname', 'shipping_lastname', 'shipping_address', 'shipping_address_2', 'shipping_zipcode', 'shipping_city', 'shipping_country_id', 'shipping_phone',
@ -417,13 +434,6 @@ class ShoppingUserController extends Controller
foreach ($needs as $need){ foreach ($needs as $need){
$ret[$need] = isset($data[$need]) ? $data[$need] : null; $ret[$need] = isset($data[$need]) ? $data[$need] : null;
if ($need === 'billing_salutation' && $ret[$need] !== null) {
$ret['billing_salutation'] = $ret['billing_salutation'] == 2 ? 'ms' : 'mr';
}
if ($need === 'shipping_salutation' && $ret[$need] !== null) {
$ret['shipping_salutation'] = $ret['shipping_salutation'] == 2 ? 'ms' : 'mr';
}
if ($need === 'billing_country_id') { if ($need === 'billing_country_id') {
$ret['billing_country_id'] = isset($data['billing_country_code']) ? Country::getCountryIdByCodeOrOne($data['billing_country_code']) : 1; $ret['billing_country_id'] = isset($data['billing_country_code']) ? Country::getCountryIdByCodeOrOne($data['billing_country_code']) : 1;
} }
@ -448,7 +458,7 @@ class ShoppingUserController extends Controller
return $ret; return $ret;
} }
private function prepareOrder($wp_shopping_order, $shopping_user){ private function prepareOrder($wp_shopping_order, $shopping_user, $wp_invoice_path){
Yard::instance('shopping')->destroy(); Yard::instance('shopping')->destroy();
$ret = []; $ret = [];
@ -479,14 +489,14 @@ class ShoppingUserController extends Controller
if($ShippingCountry){ if($ShippingCountry){
Yard::instance('shopping')->setShippingCountryWithPrice($ShippingCountry->id); Yard::instance('shopping')->setShippingCountryWithPrice($ShippingCountry->id);
} }
$shopping_order = $this->makeShoppingOrder($shopping_user); $shopping_order = $this->makeShoppingOrder($shopping_user, $wp_invoice_path);
$shopping_user->shopping_order = $shopping_order; $shopping_user->shopping_order = $shopping_order;
Yard::instance('shopping')->destroy(); Yard::instance('shopping')->destroy();
} }
return $ret; return $ret;
} }
private function makeShoppingOrder($shopping_user){ private function makeShoppingOrder($shopping_user, $wp_invoice_path){
$data = [ $data = [
'shopping_user_id' => $shopping_user->id, 'shopping_user_id' => $shopping_user->id,
@ -503,6 +513,7 @@ class ShoppingUserController extends Controller
'weight' => Yard::instance('shopping')->weight(), 'weight' => Yard::instance('shopping')->weight(),
'paid' => true, 'paid' => true,
'txaction' => 'extern', 'txaction' => 'extern',
'wp_invoice_path' => $wp_invoice_path,
'mode' => $shopping_user->mode, 'mode' => $shopping_user->mode,
]; ];
$shopping_order = $shopping_user->shopping_order; $shopping_order = $shopping_user->shopping_order;

View file

@ -163,9 +163,6 @@ class CustomerController extends Controller
return get_active_badge($ShoppingUser->auth_user_id).($ShoppingUser->mode==='dev' ? ' <span class="badge badge-warning">dev</span>' : ''); return get_active_badge($ShoppingUser->auth_user_id).($ShoppingUser->mode==='dev' ? ' <span class="badge badge-warning">dev</span>' : '');
}) })
->addColumn('member_id', function (ShoppingUser $ShoppingUser) { ->addColumn('member_id', function (ShoppingUser $ShoppingUser) {
if($ShoppingUser->member_id){
return '<a href="'.route('admin_lead_edit', [$ShoppingUser->member_id]).'">'.$ShoppingUser->member->getFullName().'</a>';
}
if($ShoppingUser->is_like){ if($ShoppingUser->is_like){
return '<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content" return '<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content"
data-id="'.$ShoppingUser->id.'" data-id="'.$ShoppingUser->id.'"
@ -174,6 +171,10 @@ class CustomerController extends Controller
data-modal="modal-xl" data-modal="modal-xl"
data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Berater zuordnen</button>'; data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Berater zuordnen</button>';
} }
if($ShoppingUser->member_id){
return '<a href="'.route('admin_lead_edit', [$ShoppingUser->member_id]).'">'.$ShoppingUser->member->getFullName().'</a>';
}
return ''; return '';
}) })
->addColumn('created_at', function (ShoppingUser $ShoppingUser) { ->addColumn('created_at', function (ShoppingUser $ShoppingUser) {

View file

@ -70,10 +70,21 @@ class DataTableController extends Controller
return $user->shop->getActiveDateFormatSmall(); return $user->shop->getActiveDateFormatSmall();
} }
return "-"; return "-";
})
->addColumn('my_payment_methods', function (User $user) {
$payment_methods = json_encode($user->payment_methods);
$link = '<a href="#" data-toggle="modal" data-target="#modals-payment_methods" data-id="'.$user->id.'" data-email="'.$user->email.'" data-payment_methods="'.htmlspecialchars($payment_methods).'">';
if(!$user->payment_methods){
return $link.'<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span></a>';
}
return $link.'<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> '.$user->getPaymentMethodsShort().'</span></a>';
}) })
->addColumn('action_delete', function (User $user) { ->addColumn('action_delete', function (User $user) {
return '<a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a> return '<span class="no-line-break"><a href="' . route('admin_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>
<a href="' . route('admin_user_login_as', [$user->id]) . '" class="btn icon-btn btn-sm btn-warning" onclick="return confirm(\''.__('Login as User?').'\');"><span class="fa fa-sign-in-alt"></span></a>'; <a href="' . route('admin_user_login_as', [$user->id]) . '" class="btn icon-btn btn-sm btn-warning" onclick="return confirm(\''.__('Login as User?').'\');"><span class="fa fa-sign-in-alt"></span></a></span>';
}) })
->addColumn('test_mode', function (User $user) { ->addColumn('test_mode', function (User $user) {
$link = '<a href="#" data-toggle="modal" data-target="#modals-test_mode" data-id="'.$user->id.'" data-email="'.$user->email.'" data-test_mode="'.$user->test_mode.'">'; $link = '<a href="#" data-toggle="modal" data-target="#modals-test_mode" data-id="'.$user->id.'" data-email="'.$user->email.'" data-test_mode="'.$user->test_mode.'">';
@ -85,7 +96,7 @@ class DataTableController extends Controller
->orderColumn('active', 'active $1') ->orderColumn('active', 'active $1')
->orderColumn('shop', 'shop $1') ->orderColumn('shop', 'shop $1')
->orderColumn('admin', 'active $1') ->orderColumn('admin', 'active $1')
->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'test_mode', 'action_delete']) ->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'my_payment_methods', 'test_mode', 'action_delete'])
->make(true); ->make(true);
} }
} }

View file

@ -344,6 +344,9 @@ class LeadController extends Controller
->addColumn('last_name', function (User $user) { ->addColumn('last_name', function (User $user) {
return $user->account ? $user->account->last_name : ''; return $user->account ? $user->account->last_name : '';
}) })
->addColumn('user_level', function (User $user) {
return $user->user_level ? $user->user_level->name : '';
})
->addColumn('id', function (User $user) { ->addColumn('id', function (User $user) {
return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>'; return '<a href="' . route('admin_lead_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
}) })

View file

@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Product;
use App\Models\ShoppingOrder; use App\Models\ShoppingOrder;
use App\Models\ShoppingUser; use App\Models\ShoppingUser;
@ -42,6 +43,25 @@ class ModalController extends Controller
} }
$ret = view("admin.modal.is_like_member", compact('current', 'possibles', 'data'))->render(); $ret = view("admin.modal.is_like_member", compact('current', 'possibles', 'data'))->render();
} }
if($data['action'] === 'user-order-show-product'){
$product = Product::find($data['id']); //current user form order
$ret = view("admin.modal.show_product", compact('product', 'data'))->render();
}
if($data['action'] === 'user-order-my-delivery-show'){
$user = \Auth::user();
$ret = view("admin.modal.show_user_customers", compact('user', 'data'))->render();
}
if($data['action'] === 'user-order-my-delivery-add'){
$user = \Auth::user();
/* $product = Product::find($data['id']); //current user form order
$ret = view("admin.modal.show_product", compact('product', 'data'))->render(); */
}
} }

View file

@ -0,0 +1,87 @@
<?php
namespace App\Http\Controllers;
use App\Models\PaymentMethod;
use App\Models\UserLevel;
use Request;
class PaymentMethodController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}
public function index()
{
$data = [
'values' => PaymentMethod::all(),
'trans' => array_keys(config('localization.supportedLocales')),
];
return view('admin.payment_method.index', $data);
}
public function store()
{
$data = Request::all();
if($data['id'] === "new"){
$model = PaymentMethod::create([
'name' => $data['name'],
'short' => $data['short'],
'pos' => $data['pos'],
'show_at' => $data['show_at'],
'default' => isset($data['default']) ? true : false,
'active' => isset($data['active']) ? true : false,
]);
}else{
$model = PaymentMethod::find($data['id']);
$model->name = $data['name'];
$model->short = $data['short'];
$model->pos = $data['pos'];
$model->show_at = $data['show_at'];
$model->default = isset($data['default']) ? true : false;
$model->active = isset($data['active']) ? true : false;
$model->save();
}
/* if(!empty($data['trans'])){
$trans = [];
foreach ($data['trans'] as $lang => $value){
if($value && $value != null){
$trans[$lang] = $value;
}
}
if(count($trans)){
$model->trans_name = $trans;
$model->save();
}
}*/
\Session()->flash('alert-save', '1');
return redirect(route('admin_payment_methods'));
}
/*public function delete($id){
if(ProductAttribute::where('attribute_id', $id)->count()){
\Session()->flash('alert-error', 'Eintrag wird als Produktattribute verwendet');
return redirect(route('admin_product_attributes'));
}
$model = Attribute::findOrFail($id);
$model->delete();
\Session()->flash('alert-success', 'Eintrag gelöscht');
return redirect(route('admin_product_attributes'));
}
*/
}

View file

@ -41,7 +41,7 @@ class ProductController extends Controller
public function edit($id) public function edit($id)
{ {
if($id == "new"){ if($id === "new"){
$model = new Product(); $model = new Product();
$model->active = true; $model->active = true;
}else{ }else{
@ -66,7 +66,7 @@ class ProductController extends Controller
); );
$validator = Validator::make(Request::all(), $rules); $validator = Validator::make(Request::all(), $rules);
if($data['id'] == "new"){ if($data['id'] === "new"){
$model = new Product(); $model = new Product();
}else{ }else{
$model = Product::findOrFail($data['id']); $model = Product::findOrFail($data['id']);

View file

@ -34,7 +34,7 @@ class ShippingController extends Controller
public function edit($shipping_id) public function edit($shipping_id)
{ {
if($shipping_id == "new"){ if($shipping_id === "new"){
$shipping = new Shipping(); $shipping = new Shipping();
$shipping->active = 1; $shipping->active = 1;

View file

@ -0,0 +1,50 @@
<?php
namespace App\Http\Controllers\SyS;
use App\Http\Controllers\Controller;
use App\Models\SySetting;
use Request;
class SettingController extends Controller
{
protected $userRepo;
public function __construct()
{
$this->middleware('sysadmin');
}
public function index()
{
$data = [
'values' => SySetting::all(),
];
return view('sys.settings.index', $data);
}
public function store()
{
$data = Request::all();
$data['active'] = isset($data['active']) ? true : false;
if($data['id'] === "new"){
$model = SySetting::create($data);
}else{
$model = SySetting::find($data['id']);
$model->fill($data);
$model->save();
}
\Session()->flash('alert-save', '1');
return redirect(route('sysadmin_settings'));
}
}

View file

@ -7,10 +7,12 @@ use App\Http\Controllers\Api\KasController;
use App\Http\Controllers\Api\KasSLLController; use App\Http\Controllers\Api\KasSLLController;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Mail\MailInfo; use App\Mail\MailInfo;
use App\Models\PaymentMethod;
use App\Models\ShoppingUser; use App\Models\ShoppingUser;
use App\Models\UserShop; use App\Models\UserShop;
use App\Services\CustomerPriority; use App\Services\CustomerPriority;
use App\Services\Shop; use App\Services\Shop;
use App\User;
use Auth; use Auth;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use Request; use Request;
@ -50,6 +52,15 @@ class AdminToolsController extends Controller
public function customerStore() public function customerStore()
{ {
$data = Request::all(); $data = Request::all();
$ret = "";
if($data['action'] === 'makePaymentMethodsDefault'){
$users = User::where('payment_methods', '=', NULL)->get();
//$users = User::all();
foreach ($users as $user){
$user->payment_methods = PaymentMethod::getDefaultAsArray();
$user->save();
}
}
if($data['action'] === 'checkForAll'){ if($data['action'] === 'checkForAll'){
$shopping_users = CustomerPriority::checkForAll(); $shopping_users = CustomerPriority::checkForAll();
} }

View file

@ -177,9 +177,9 @@ class CustomerController extends Controller
{ {
$user = User::find(\Auth::user()->id); $user = User::find(\Auth::user()->id);
$query = ShoppingUser::select(['id', 'billing_company', 'billing_salutation', 'billing_firstname', 'billing_lastname', 'billing_email', 'billing_zipcode', 'billing_city', 'billing_country_id', 'orders', 'subscribed', 'created_at', 'number', 'mode', 'wp_order_number']) $query = ShoppingUser::select(['id', 'billing_company', 'billing_salutation', 'billing_firstname', 'billing_lastname', 'billing_email', 'billing_zipcode', 'billing_city', 'billing_country_id', 'orders', 'subscribed', 'created_at', 'number', 'mode', 'is_like', 'wp_order_number'])
->where('shopping_users.member_id', '=', $user->id); ->where('shopping_users.member_id', '=', $user->id);
//->groupBy('shopping_users.number'); //->groupBy('shopping_users.number');
/*set_user_attr('filter_member_id', Request::get('filter_member_id')); /*set_user_attr('filter_member_id', Request::get('filter_member_id'));
if(Request::get('filter_member_id') != ""){ if(Request::get('filter_member_id') != ""){
@ -187,8 +187,11 @@ class CustomerController extends Controller
}*/ }*/
return \DataTables::eloquent($query) return \DataTables::eloquent($query)
->addColumn('send_to', function (ShoppingUser $ShoppingUser) {
return $ShoppingUser->is_like ? '<span class="badge badge-pill badge-warning"><i class="fa fa-clock"></i> in Prüfung</span>' : '<a href="' . route('user_order_my_delivery', ['ot', $ShoppingUser->id]) . '" class="btn btn-sm btn-secondary"><span class="fa fa-shopping-cart"></span> wählen</a>';
})
->addColumn('id', function (ShoppingUser $ShoppingUser) { ->addColumn('id', function (ShoppingUser $ShoppingUser) {
return '<a href="' . route('user_customer_detail', [$ShoppingUser->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>'; return '<a href="' . route('user_customer_detail', [$ShoppingUser->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
}) })
->addColumn('billing_salutation', function (ShoppingUser $ShoppingUser) { ->addColumn('billing_salutation', function (ShoppingUser $ShoppingUser) {
return HTMLHelper::getSalutationLang($ShoppingUser->billing_salutation); return HTMLHelper::getSalutationLang($ShoppingUser->billing_salutation);
@ -205,16 +208,20 @@ class CustomerController extends Controller
->addColumn('subscribed', function (ShoppingUser $ShoppingUser) { ->addColumn('subscribed', function (ShoppingUser $ShoppingUser) {
return get_active_badge($ShoppingUser->subscribed); return get_active_badge($ShoppingUser->subscribed);
}) })
->addColumn('status', function (ShoppingUser $ShoppingUser) {
return $ShoppingUser->is_like ? '<span class="badge badge-pill badge-warning"><i class="fa fa-clock"></i> in Prüfung</span> ' : '<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> aktiv</span>';
})
->addColumn('extras', function (ShoppingUser $ShoppingUser) { ->addColumn('extras', function (ShoppingUser $ShoppingUser) {
return $ShoppingUser->wp_order_number.($ShoppingUser->mode==='dev' ? ' <span class="badge badge-warning">dev</span>' : ''); return $ShoppingUser->wp_order_number.($ShoppingUser->mode==='dev' ? ' <span class="badge badge-warning">dev</span>' : '');
}) })
->orderColumn('send_to', 'id $1')
->orderColumn('id', 'id $1') ->orderColumn('id', 'id $1')
->orderColumn('billing_country_id', 'billing_country_id $1') ->orderColumn('billing_country_id', 'billing_country_id $1')
->orderColumn('billing_salutation', 'billing_salutation $1') ->orderColumn('billing_salutation', 'billing_salutation $1')
->orderColumn('first_created_at', 'created_at $1') ->orderColumn('first_created_at', 'created_at $1')
->orderColumn('orders', 'orders $1') ->orderColumn('orders', 'orders $1')
->orderColumn('subscribed', 'subscribed $1') ->orderColumn('subscribed', 'subscribed $1')
->rawColumns(['id', 'subscribed', 'extras']) ->rawColumns(['send_to', 'id', 'subscribed', 'extras', 'status'])
->make(true); ->make(true);
} }
} }

View file

@ -0,0 +1,187 @@
<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Models\Product;
use App\Models\ShoppingOrder;
use App\Models\ShoppingUser;
use App\Services\HTMLHelper;
use App\Services\Payment;
use App\User;
use Request;
class OrderController extends Controller
{
public function __construct()
{
$this->middleware('active.shop');
}
public function index()
{
$data = [
];
return view('user.order.index', $data);
}
public function detail($id)
{
$user = User::find(\Auth::user()->id);
$shopping_order = ShoppingOrder::findOrFail($id);
if($shopping_order->member_id !== $user->id){
abort(404);
}
$data = [
'shopping_order' => $shopping_order,
'isAdmin' => false,
];
return view('user.shop.sales.order_detail', $data);
}
public function delivery($for, $id=null)
{
$user = User::find(\Auth::user()->id);
/*if (Request::isMethod('post')) {
$data = Request::all();
if($data['switchers-radio-is-for'] === 'is-for-member'){
return redirect(route('user_order_my_list', ['me']));
}
if($data['switchers-radio-is-for'] === 'is-for-customer'){
//check ist customer
return redirect(route('user_order_my_list', ['ot', $id]));
}
}*/
$shopping_user = null;
$delivery_id = null;
if($for === 'ot'){
$shopping_user = $this->checkShoppingUser($id, $user);
$delivery_id = $shopping_user->id;
}
$data = [
'shopping_user' => $shopping_user,
'isAdmin' => false,
'isView' => 'customer',
'for' => $for,
'delivery_id' => $delivery_id,
];
return view('user.order.delivery', $data);
}
public function list($for, $id=null)
{
$user = User::find(\Auth::user()->id);
$shopping_user = null;
$delivery_id = null;
if($for === 'ot'){
$shopping_user = $this->checkShoppingUser($id, $user);
$delivery_id = $shopping_user->id;
}
//$data = Request::all();
//dd(session('switchers-radio-is-for'));
//$shopping_user = new ShoppingUser();
//$shopping_user->id = "new";
//$shopping_user->same_as_billing = true;
$data = [
'shopping_user' => $shopping_user,
'user' => $user,
'isAdmin' => false,
'isView' => 'customer',
'for' => $for,
'delivery_id' => $delivery_id,
];
return view('user.order.list', $data);
}
private function checkShoppingUser($id, $user){
if($id === null){
abort(403, 'Error: Keine User ID');
}
$shopping_user = ShoppingUser::findOrFail($id);
if($shopping_user->member_id !== $user->id){
abort(403, 'Error: Falsche User ID');
}
$shopping_user = ShoppingUser::findOrFail($id);
if($shopping_user->is_like){
abort(403, 'Error: Kunde in Prüfung');
}
return $shopping_user;
}
public function datatable(){
// $user = User::find(\Auth::user()->id);
$query = Product::select('products.*')->where('active', true)
->where('show_at', '=', 1); //Kunden und Berater
//->orWhere('show_at', '=', 2); // Nur Berater
//->orderBy('pos', 'DESC')
//->orderBy('id', 'DESC');
return \DataTables::eloquent($query)
->addColumn('add_card', function (Product $product) {
return '<a href="#" class="btn btn-sm btn-md-extra btn-secondary">
<strong>&euro; '.$product->getFormattedPriceWith().'</strong>&nbsp; +<span class="ion ion-md-cart"></span>
</a>';
/*'<a href="javascript:void(0)" class="btn btn-secondary btn-sm my-1 mx-2">
<i class="ion ion-md-add"></i> <i class="ion ion-md-basket"></i>
</a><br>
<a href="javascript:void(0)" class="btn btn-outline-secondary btn-sm my-1 mx-2">
<i class="ion ion-md-remove"></i> <i class="ion ion-md-basket"></i>
</a>'*/;
})
->addColumn('quantity', function (Product $product) {
//return '<input type="text" class="form-control text-center" value="0" style="width: 4em">';
return '<div class="no-line-break input-group-min-w">
<div class="input-group d-inline-flex w-auto">
<span class="input-group-prepend">
<button class="btn btn-secondary icon-btn md-btn-extra" type="button">-</button>
</span>
<input type="text" class="form-control text-center input-extra" value="0">
<span class="input-group-append">
<button class="btn btn-secondary icon-btn md-btn-extra" type="button">+</button>
</span>
</div>
</div>';
})
->addColumn('picture', function (Product $product) {
if(count($product->images)){
return '<img class="img-fluid img-extra" alt="" src="'.route('product_image', [$product->images->first()->slug]).'">';
}
return "";
})
->addColumn('price', function (Product $product) {
return $product->getFormattedPriceWith();
})
->addColumn('action', function (Product $product) {
return '<button class="btn btn-default btn-sm icon-btn md-btn-flat product-tooltip" title="details" data-modal="modal-lg"
data-toggle="modal" data-target="#modals-load-content" data-id="'.$product->id.'" data-route="'.route('modal_load').'"
data-action="user-order-show-product" data-view="customer"><i class="ion ion-md-eye"></i></button>';
})
->orderColumn('name', 'name $1')
->orderColumn('number', 'number $1')
->orderColumn('points', 'points $1')
->orderColumn('price', 'price $1')
->orderColumn('contents_total', 'contents_total $1')
->orderColumn('weight', 'weight $1')
->rawColumns(['add_card', 'quantity', 'picture', 'action'])
->make(true);
}
}

View file

@ -41,16 +41,25 @@ class ContactController extends Controller
$user_shop = Util::getUserShop(); $user_shop = Util::getUserShop();
$rules = array( $rules = array(
'first_name'=>'required', 'salutation' => 'required',
'last_name'=>'required', 'first_name' => 'required',
'email'=>'required|email', 'last_name' => 'required',
'message'=>'required', 'email' => 'required|email',
'g-recaptcha-response'=>'required|recaptcha', 'message' => 'required',
'g-recaptcha-response' => 'required|recaptcha',
'accepted_data_protection' => 'required', 'accepted_data_protection' => 'required',
); );
if (!$user_shop || $user_shop->id === 22) {
$rules['sales_partnership'] = 'required';
if (Request::get('sales_partnership') === 'JA') {
$rules['sales_partnership_message'] = 'required';
}
}
Validator::extend('recaptcha', function($attribute, $value, $parameters, $validator) {
Validator::extend('recaptcha', function ($attribute, $value, $parameters, $validator) {
return $this->reCaptcha_validate($attribute, $value, $parameters, $validator); return $this->reCaptcha_validate($attribute, $value, $parameters, $validator);
}); });
@ -60,15 +69,20 @@ class ContactController extends Controller
} }
$contact = []; $contact = [];
$contact['first_name'] = Request::get('first_name'); $contact['salutation'] = Request::get('salutation');
$contact['last_name'] = Request::get('last_name'); $contact['first_name'] = Request::get('first_name');
$contact['email'] = Request::get('email'); $contact['last_name'] = Request::get('last_name');
$contact['phone'] = Request::get('phone'); $contact['email'] = Request::get('email');
$contact['subject'] = Request::get('subject'); $contact['phone'] = Request::get('phone');
$contact['message'] = Request::get('message'); $contact['message'] = Request::get('message');
if (!$user_shop){
$contact['sales_partnership'] = Request::get('sales_partnership');
$contact['sales_partnership_message'] = Request::get('sales_partnership_message');
}
$checkout_mail = config('app.checkout_mail');
$checkout_mail = config('app.checkout_mail');
if($user_shop){ if($user_shop){
Mail::to($contact['email'])->bcc([$user_shop->user->email, $checkout_mail])->send(new MailContact($contact)); Mail::to($contact['email'])->bcc([$user_shop->user->email, $checkout_mail])->send(new MailContact($contact));
}else{ }else{

View file

@ -67,9 +67,9 @@ class RegisterController extends Controller
$rules = array( $rules = array(
'salutation' => 'required',
'first_name'=>'required', 'first_name'=>'required',
'last_name'=>'required', 'last_name'=>'required',
'salutation' => 'required',
'email' => 'required|string|email|max:255|unique:users', 'email' => 'required|string|email|max:255|unique:users',
'email-confirm' => 'required|same:email', 'email-confirm' => 'required|same:email',
'password' => 'required|string|min:6|confirmed', 'password' => 'required|string|min:6|confirmed',

View file

@ -21,20 +21,32 @@ class MailContact extends Mailable
{ {
$this->data = $data; $this->data = $data;
$this->user_shop = Util::getUserShop(); $this->user_shop = Util::getUserShop();
$this->subject = __('email.request_from').' mivita.care'; $this->subject = __('email.your_request_from').' mivita.care';
if($this->user_shop){ if($this->user_shop){
$this->subject = __('email.request_from')." ".$this->user_shop->slug.'.mivita.care'; $this->subject = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
} }
} }
public function build() public function build()
{ {
$salutation = __('email.salutation'); $salutation = __('email.hello');
if(isset($this->data['first_name'])){
$salutation .= " ".$this->data['first_name'];
}
if(isset($this->data['salutation'])){
if($this->data['salutation'] === 'mr'){
$this->data['salutation'] = 'Herr';
}
if($this->data['salutation'] === 'ms'){
$this->data['salutation'] = 'Frau';
}
}
$copy1line = __('email.your_request_from')." mivita.care"; $copy1line = __('email.your_request_from')." mivita.care";
if($this->user_shop){ if($this->user_shop){
$copy1line = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care'; $copy1line = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
} }
return $this->view('emails.contact')->with([ return $this->view('emails.contact')->with([
'salutation' => $salutation, 'salutation' => $salutation,
'copy1line' => $copy1line, 'copy1line' => $copy1line,

View file

@ -67,7 +67,7 @@ class MailInfo extends Mailable
if($this->action === "check_is_like_customer") { if($this->action === "check_is_like_customer") {
$copy1line = "Hier geht es zum Kunden:"."\n"; $copy1line = "Hier geht es zum Kunden:"."\n";
$button = "zum Kunden"; $button = "zum Kunden";
$title = "Ein Kunden muss überprüfen werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist."; $title = "Ein Kunden muss überprüft werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist.";
$url = route('admin_customer_detail', $this->user->id); $url = route('admin_customer_detail', $this->user->id);
$content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : ''; $content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : '';
$content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." "; $content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." ";
@ -85,7 +85,7 @@ class MailInfo extends Mailable
if($this->action === "change_is_like_customer"){ if($this->action === "change_is_like_customer"){
$copy1line = "Hier geht es zum Kunden:"."\n"; $copy1line = "Hier geht es zum Kunden:"."\n";
$button = "zum Kunden"; $button = "zum Kunden";
$title = "Ein Kunden muss erneut überprüfen werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde."; $title = "Ein Kunden muss erneut überprüft werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde.";
$url = route('admin_customer_detail', $this->user->id); $url = route('admin_customer_detail', $this->user->id);
$content .= "Folgende Daten für die Kundenhoheit wurden geändert:"."\n"; $content .= "Folgende Daten für die Kundenhoheit wurden geändert:"."\n";
foreach ($this->data as $key=>$value){ foreach ($this->data as $key=>$value){

63
app/Mail/MailSyS.php Normal file
View file

@ -0,0 +1,63 @@
<?php
namespace App\Mail;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class MailSyS extends Mailable
{
use Queueable, SerializesModels;
protected $model;
protected $action;
public $subject;
public function __construct($model, $action)
{
$this->model = $model;
$this->action = $action;
if($this->action === "log"){
$this->subject = 'mivita Logger';
}
}
public function build()
{
$content = "";
if($this->action === "log"){
$title = "New Log";
if($this->model->user_id && $this->model->user){
$content .= "From User: ".$this->model->user->id." | ".$this->model->user->email."\n";
}
if($this->model->model && $this->model->model_id){
$content .= "Apply: ".$this->model->model." | ".$this->model->model_id."\n";
if($this->model->model === 'App\User'){
$apply = User::find($this->model->model_id);
$content .= $this->model->model.": ".$apply->email." | ".$this->model->model_id."\n";
}
}
$content .= "\n";
$content .= "Action: ".$this->model->action."\n";
$content .= "Message: ".$this->model->message."\n";
$content .= "\n";
$content .= "Channel: ".$this->model->channel."\n";
$content .= "Level: ".$this->model->getLevelType()."\n";
$content .= "\n";
$content .= "Time: ".$this->model->created_at->format("d.m.Y H:i");
}
return $this->view('emails.sys')->with([
'title' => $title,
'content' => $content,
]);
}
}

71
app/Models/Logger.php Normal file
View file

@ -0,0 +1,71 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use App\User;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Logger
*
* @property int $id
* @property int $user_id
* @property int $model_id
* @property string $model
* @property string $action
* @property string $channel
* @property string $message
* @property int $level
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property User $user
*
* @package App\Models
*/
class Logger extends Model
{
protected $table = 'loggers';
protected $casts = [
'user_id' => 'int',
'model_id' => 'int',
'level' => 'int'
];
protected $fillable = [
'user_id',
'model_id',
'model',
'action',
'channel',
'message',
'level'
];
public $levelTypes = [
1 => 'debug',
2 => 'info',
3 => 'notice',
4 => 'warning',
5 => 'error',
6 => 'critical',
7 => 'alert',
];
public function user()
{
return $this->belongsTo(User::class);
}
public function getLevelType(){
return isset($this->levelTypes[$this->level]) ? $this->levelTypes[$this->level] : "";
}
}

View file

@ -0,0 +1,77 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class PaymentMethod
*
* @property int $id
* @property string $name
* @property string $short
* @property int $show_at
* @property int $pos
* @property bool $active
* @property bool $default
* @property Carbon $created_at
* @property Carbon $updated_at
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereDefault($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod wherePos($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShort($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShowAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value)
* @mixin \Eloquent
*/
class PaymentMethod extends Model
{
protected $table = 'payment_methods';
protected $casts = [
'show_at' => 'int',
'pos' => 'int',
'active' => 'bool',
'default' => 'bool',
];
protected $fillable = [
'name',
'short',
'show_at',
'pos',
'default',
'active'
];
public static $showATs = [
0 => 'Nur Kunden Shop',
1 => 'Nur Berater Shop',
2 => 'Kunden + Berater Shop',
3 => 'Nur Reg/Mitgliedschaft Berater',
4 => 'Kunden + Berater Shop + Reg/Mitgliedschaft',
5 => 'Berater Shop + Reg/Mitgliedschaft',
9 => 'überall',
];
public function getShowAtType(){
return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-';
}
public static function getDefaultAsArray(){
return PaymentMethod::where('active', true)->where('default', true)->pluck('id');
}
}

View file

@ -103,6 +103,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property-read int|null $country_prices_count * @property-read int|null $country_prices_count
* @property int|null $wp_number * @property int|null $wp_number
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value)
* @property bool|null $shipping_addon
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShippingAddon($value)
*/ */
class Product extends Model class Product extends Model
{ {
@ -124,7 +126,9 @@ class Product extends Model
'trans_usage' => 'array', 'trans_usage' => 'array',
'trans_ingredients' => 'array', 'trans_ingredients' => 'array',
'action' => 'array', 'action' => 'array',
'wp_number' => 'int' 'wp_number' => 'int',
'shipping_addon' => 'bool',
'active' => 'bool'
]; ];
use Sluggable; use Sluggable;
@ -155,6 +159,7 @@ class Product extends Model
'amount', 'amount',
'active', 'active',
'show_at', 'show_at',
'shipping_addon',
'identifier', 'identifier',
'action', 'action',
'upgrade_to_id' 'upgrade_to_id'
@ -235,20 +240,20 @@ class Product extends Model
} }
public function setPriceAttribute( $value ) { public function setPriceAttribute( $value ) {
$value = $this->_format_number($value);
$this->attributes['price'] = floatval(str_replace(',', '.', $value)); $this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
} }
public function setPriceEkAttribute( $value ) { public function setPriceEkAttribute( $value ) {
$value = $this->_format_number($value);
$this->attributes['price_ek'] = floatval(str_replace(',', '.', $value)); $this->attributes['price_ek'] = $value ? Util::reFormatNumber($value) : null;
} }
public function setTaxAttribute( $value ) { public function setTaxAttribute( $value ) {
$value = $this->_format_number($value);
$this->attributes['tax'] = floatval(str_replace(',', '.', $value)); $this->attributes['tax'] = $value ? Util::reFormatNumber($value) : null;
} }
public function setPriceOldAttribute( $value ) { public function setPriceOldAttribute( $value ) {
$value = $this->_format_number($value);
$this->attributes['price_old'] = floatval(str_replace(',', '.', $value)); $this->attributes['price_old'] = $value ? Util::reFormatNumber($value) : null;
} }
public function getFormattedPrice() public function getFormattedPrice()
@ -271,6 +276,34 @@ class Product extends Model
return isset($this->attributes['price_old']) ? Util::formatNumber($this->attributes['price_old']) : ""; return isset($this->attributes['price_old']) ? Util::formatNumber($this->attributes['price_old']) : "";
} }
/*price by user Factor*/
private function calcPriceUserFactor($price){
if(\Auth::user() && \Auth::user()->user_level){
$margin = ((\Auth::user()->user_level->margin -100)*-1) / 100;
$price = $price * $margin;
}
return $price;
}
/*price net*/
private function calcPriceNet($price){
$tax_rate = ($this->attributes['tax'] + 100) / 100;
return $price / $tax_rate;
}
//price calu with
public function getPriceWith(Bool $net = true, Bool $ufactor = true){
$price = $this->attributes['price'];
$price = $net ? $this->calcPriceNet($price) : $price;
$price = $ufactor ? $this->calcPriceUserFactor($price) : $price;
return $price;
}
/*out*/
public function getFormattedPriceWith(Bool $net = true, Bool $ufactor = true)
{
return isset($this->attributes['price']) ? Util::formatNumber($this->getPriceWith($net, $ufactor)) : "";
}
public function getBasePriceFormattedFull(){ public function getBasePriceFormattedFull(){
if($price = $this->getBasePrice()){ if($price = $this->getBasePrice()){
$unit = $this->attributes['unit']; $unit = $this->attributes['unit'];
@ -310,6 +343,10 @@ class Product extends Model
public function getUnitType(){ public function getUnitType(){
return isset($this->unitTypes[$this->unit]) ? $this->unitTypes[$this->unit] : '-'; return isset($this->unitTypes[$this->unit]) ? $this->unitTypes[$this->unit] : '-';
} }
public function getShowAtType(){
return isset($this->showATs[$this->show_at]) ? $this->showATs[$this->show_at] : '-';
}
public function setPosAttribute($value){ public function setPosAttribute($value){
$this->attributes['pos'] = is_numeric($value) ? $value : null; $this->attributes['pos'] = is_numeric($value) ? $value : null;

View file

@ -29,6 +29,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereTransName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Shipping whereUpdatedAt($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShippingPrice[] $shipping_prices
* @property-read int|null $shipping_prices_count
*/ */
class Shipping extends Model class Shipping extends Model
{ {

View file

@ -2,6 +2,7 @@
namespace App\Models; namespace App\Models;
use App\Services\Util;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/** /**
@ -34,13 +35,15 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightFrom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereWeightTo($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property-write mixed $tax
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShippingPrice whereTaxRate($value)
*/ */
class ShippingPrice extends Model class ShippingPrice extends Model
{ {
protected $table = 'shipping_prices'; protected $table = 'shipping_prices';
protected $fillable = [ protected $fillable = [
'shipping_id', 'price', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to', 'shipping_id', 'price', 'price_comp', 'tax_rate', 'factor', 'total_from', 'total_to', 'weight_from', 'weight_to',
]; ];
public function shipping() public function shipping()
@ -49,115 +52,65 @@ class ShippingPrice extends Model
} }
public function _format_number($value)
{
return preg_replace("/[^0-9,]/", "", $value);
}
public function setPriceAttribute($value) public function setPriceAttribute($value)
{ {
$value = $this->_format_number($value); $this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['price'] = floatval(str_replace(',', '.', $value)); }
public function setPriceCompAttribute($value)
{
$this->attributes['price_comp'] = $value ? Util::reFormatNumber($value) : null;
} }
public function setFactorAttribute($value) public function setFactorAttribute($value)
{ {
$value = $this->_format_number($value); $this->attributes['factor'] = $value ? Util::reFormatNumber($value) : null;
if ($value == "") {
$this->attributes['factor'] = null;
} else {
$this->attributes['factor'] = floatval(str_replace(',', '.', $value));
}
} }
public function setTaxAttribute($value) public function setTaxAttribute($value)
{ {
$value = $this->_format_number($value); $this->attributes['tax_rate'] = $value ? Util::reFormatNumber($value) : null;
if ($value == "") {
$this->attributes['tax_rate'] = null;
} else {
$this->attributes['tax_rate'] = floatval(str_replace(',', '.', $value));
}
} }
public function setTotalFromAttribute($value) public function setTotalFromAttribute($value)
{ {
$value = $this->_format_number($value); $this->attributes['total_from'] = $value ? Util::reFormatNumber($value) : null;
if ($value == "") {
$this->attributes['total_from'] = null;
} else {
$this->attributes['total_from'] = floatval(str_replace(',', '.', $value));
}
} }
public function setTotalToAttribute($value) public function setTotalToAttribute($value)
{ {
$value = $this->_format_number($value); $this->attributes['total_to'] = $value ? Util::reFormatNumber($value) : null;
if ($value == "") {
$this->attributes['total_to'] = null;
} else {
$this->attributes['total_to'] = floatval(str_replace(',', '.', $value));
}
} }
public function getFormattedPrice() public function getFormattedPrice()
{ {
if ($this->attributes['price'] === NULL) { return isset($this->attributes['price']) ? Util::formatNumber($this->attributes['price']) : "";
return $this->attributes['price']; }
}
if (\App::getLocale() == "en") { public function getFormattedPriceComp()
return number_format($this->attributes['price'], 2, '.', ','); {
} return isset($this->attributes['price_comp']) ? Util::formatNumber($this->attributes['price_comp']) : "";
return number_format($this->attributes['price'], 2, ',', '.');
} }
public function getFormattedTaxRate() public function getFormattedTaxRate()
{ {
if ($this->attributes['tax_rate'] === NULL) { return isset($this->attributes['tax_rate']) ? Util::formatNumber($this->attributes['tax_rate']) : "";
return $this->attributes['tax_rate'];
}
if (\App::getLocale() == "en") {
return number_format($this->attributes['tax_rate'], 2, '.', ',');
}
return number_format($this->attributes['tax_rate'], 2, ',', '.');
} }
public function getFormattedFactor() public function getFormattedFactor()
{ {
if ($this->attributes['factor'] === NULL) { return isset($this->attributes['factor']) ? Util::formatNumber($this->attributes['factor']) : "";
return $this->attributes['factor'];
}
if (\App::getLocale() == "en") {
return number_format($this->attributes['factor'], 2, '.', ',');
}
return number_format($this->attributes['factor'], 2, ',', '.');
} }
public function getFormatTotalFrom() public function getFormatTotalFrom()
{ {
if ($this->attributes['total_from'] === NULL) { return isset($this->attributes['total_from']) ? Util::formatNumber($this->attributes['total_from']) : "";
return $this->attributes['total_from'];
}
if (\App::getLocale() == "en") {
return number_format($this->attributes['total_from'], 2, '.', ',');
}
return number_format($this->attributes['total_from'], 2, ',', '.');
} }
public function getFormattedTotalTo() public function getFormattedTotalTo()
{ {
if ($this->attributes['total_to'] === NULL) { return isset($this->attributes['total_to']) ? Util::formatNumber($this->attributes['total_to']) : "";
return $this->attributes['total_to'];
}
if (\App::getLocale() == "en") {
return number_format($this->attributes['total_to'], 2, '.', ',');
}
return number_format($this->attributes['total_to'], 2, ',', '.');
} }

View file

@ -67,6 +67,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed()
* @property-read \App\Models\ShippingCountry $shipping_country
*/ */
class ShoppingOrder extends Model class ShoppingOrder extends Model
{ {
@ -90,6 +91,7 @@ class ShoppingOrder extends Model
'weight', 'weight',
'paid', 'paid',
'txaction', 'txaction',
'wp_invoice_path',
'mode', 'mode',
]; ];
@ -101,7 +103,7 @@ class ShoppingOrder extends Model
public function country() public function country()
{ {
return $this->belongsTo('App\Models\Sh','country_id'); return $this->belongsTo('App\Models\ShippingCountry','country_id');
} }
public function shipping_country() public function shipping_country()

View file

@ -32,6 +32,15 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUpdatedAt($value)
* @mixin \Eloquent * @mixin \Eloquent
* @property float|null $tax_rate
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property string|null $user_deleted_at
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereTaxRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrderItem whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrderItem withoutTrashed()
*/ */
class ShoppingOrderItem extends Model class ShoppingOrderItem extends Model
{ {

View file

@ -101,6 +101,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUserDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUserDeletedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withoutTrashed() * @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingUser withoutTrashed()
* @property string|null $mode
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereMode($value)
*/ */
class ShoppingUser extends Model class ShoppingUser extends Model
{ {

64
app/Models/SySetting.php Normal file
View file

@ -0,0 +1,64 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
/**
* Class SySetting
*
* @property int $id
* @property string $name
* @property string $slug
* @property string $message
* @property string $action
* @property int $status
* @property bool $active
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @package App\Models
*/
class SySetting extends Model
{
use Sluggable;
protected $table = 'sy_settings';
protected $casts = [
'status' => 'int',
'active' => 'bool'
];
protected $fillable = [
'name',
'slug',
'message',
'action',
'status',
'active'
];
public static $statusTypes = [
1 => 'default',
];
public function sluggable()
{
return [
'slug' => [
'source' => 'name'
]
];
}
public function getStatusType(){
return isset(self::$statusTypes[$this->status]) ? self::$statusTypes[$this->status] : "";
}
}

View file

@ -26,9 +26,10 @@ class ProductRepository extends BaseRepository {
{ {
$data['active'] = isset($data['active']) ? 1 : 0; $data['active'] = isset($data['active']) ? 1 : 0;
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
if($data['id'] == "new"){ if($data['id'] === "new"){
$this->model = Product::create($data); $this->model = Product::create($data);
} }
else{ else{

View file

@ -2,6 +2,7 @@
namespace App\Repositories; namespace App\Repositories;
use App\Models\PaymentMethod;
use App\Models\UserAccount; use App\Models\UserAccount;
use App\User; use App\User;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
@ -27,6 +28,10 @@ class UserRepository extends BaseRepository {
'email' => $data['email'], 'email' => $data['email'],
'password' => env('APP_KEY'), 'password' => env('APP_KEY'),
]); ]);
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
$this->model->save();
} }
else{ else{
$this->model = $this->getById($data['user_id']); $this->model = $this->getById($data['user_id']);
@ -67,6 +72,7 @@ class UserRepository extends BaseRepository {
]); ]);
$this->model->account_id = $account->id; $this->model->account_id = $account->id;
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
$this->model->save(); $this->model->save();

View file

@ -6,6 +6,7 @@ use App\Models\Category;
use App\Models\Country; use App\Models\Country;
use App\Models\Product; use App\Models\Product;
use App\Models\ShippingCountry; use App\Models\ShippingCountry;
use App\Models\ShoppingUser;
use App\Models\UserLevel; use App\Models\UserLevel;
use App\User; use App\User;
@ -299,4 +300,21 @@ class HTMLHelper
} }
return $ret; return $ret;
} }
public static function getUserCustomerOptions($id, $all=false){
$values = ShoppingUser::select(['id', 'billing_firstname', 'billing_lastname', 'billing_email', 'number'])
->where('shopping_users.member_id', '=', \Auth::user()->id)->get();
$ret = "";
if($all){
$ret .= '<option value="">'.__('please select').'</option>\n';
}
foreach ($values as $value){
dump($value);
$attr = ($value->id == $id) ? 'selected="selected"' : '';
$to = $value->billing_firstname." ".$value->billing_lastname." | ".$value->billing_email;
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$to.' #'.$value->number.'</option>\n';
}
return $ret;
}
} }

78
app/Services/SysLog.php Normal file
View file

@ -0,0 +1,78 @@
<?php
namespace App\Services;
use App\Mail\MailSyS;
use App\Models\Logger;
use Illuminate\Support\Facades\Mail;
class SysLog
{
/* protected $user_id;
protected $model;
protected $model_id;
protected $message;
protected $action;
protected $channel;
protected $level;*/
protected $log;
public $levelTypes = [
1 => 'debug',
2 => 'info',
3 => 'notice',
4 => 'warning',
5 => 'error',
6 => 'critical',
7 => 'alert',
];
function __construct($action = null, $channel = 'default', $level = 1)
{
$this->log = new Logger();
$this->log->action = $action;
$this->log->channel = $channel;
$this->log->level = $level;
}
public static function action($action = null, $channel = 'default', $level = 1)
{
//Return new instance of this model
return new self($action, $channel, $level);
}
public function setModel($id, $model){
$this->log->model_id = $id;
$this->log->model = $model;
return $this;
}
public function setUserId($user_id){
$this->log->user_id = $user_id;
return $this;
}
public function setMessage($message){
$this->log->message = $message;
return $this;
}
public function save(){
$this->log->save();
//send Mail
if($this->log->level >= 3){
$mail = config('app.info_test_mail');
Mail::to($mail)->send(new MailSyS($this->log, 'log'));
}
}
public function getLevelType(){
return $this->levelTypes[$this->log->level];
}
}

View file

@ -17,4 +17,5 @@ class UserService
while(!$unique); while(!$unique);
return $confirmation_code; return $confirmation_code;
} }
} }

View file

@ -2,6 +2,7 @@
namespace App; namespace App;
use App\Models\PaymentMethod;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
@ -112,6 +113,8 @@ use Laravel\Passport\HasApiTokens;
* @property-read int|null $clients_count * @property-read int|null $clients_count
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens * @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens
* @property-read int|null $tokens_count * @property-read int|null $tokens_count
* @property array|null $payment_methods
* @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePaymentMethods($value)
*/ */
class User extends Authenticatable class User extends Authenticatable
{ {
@ -134,6 +137,7 @@ class User extends Authenticatable
protected $casts = [ protected $casts = [
'settings' => 'array', 'settings' => 'array',
'payment_methods' => 'array'
]; ];
/** /**
@ -366,7 +370,6 @@ class User extends Authenticatable
if(!$this->attributes['payment_account']){ return ""; } if(!$this->attributes['payment_account']){ return ""; }
if(!$time){ if(!$time){
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateDB()); return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateDB());
} }
return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB()); return Carbon::parse($this->attributes['payment_account'])->format(\Util::formatDateTimeDB());
} }
@ -403,6 +406,18 @@ class User extends Authenticatable
return isset($this->settings[$key]) ? $this->settings[$key] : $default; return isset($this->settings[$key]) ? $this->settings[$key] : $default;
} }
public function getPaymentMethodsShort(){
$ret = "";
if($this->payment_methods !== null){
foreach ($this->payment_methods as $payment_method){
if($find = PaymentMethod::find($payment_method)){
$ret .= $find->short." | ";
}
}
$ret = rtrim($ret, " | ");
}
return $ret;
}
/** /**
* @return string * @return string
*/ */

View file

@ -48,6 +48,7 @@ class CreateUsersTable extends Migration
$table->timestamp('payment_account')->nullable(); $table->timestamp('payment_account')->nullable();
$table->timestamp('payment_shop')->nullable(); $table->timestamp('payment_shop')->nullable();
$table->boolean('abo_options')->default(false); $table->boolean('abo_options')->default(false);
$table->string('payment_methods')->nullable();
$table->boolean('test_mode')->default(false); $table->boolean('test_mode')->default(false);
$table->text('settings')->nullable(); $table->text('settings')->nullable();

View file

@ -59,6 +59,8 @@ class CreateProductsTable extends Migration
$table->unsignedInteger('amount')->nullable(); //for shop $table->unsignedInteger('amount')->nullable(); //for shop
$table->tinyInteger('show_at')->unsigned()->nullable()->default(0); $table->tinyInteger('show_at')->unsigned()->nullable()->default(0);
$table->boolean('shipping_addon')->default(false);
$table->string('identifier', 20)->nullable(); $table->string('identifier', 20)->nullable();
$table->string('action')->nullable(); $table->string('action')->nullable();

View file

@ -18,6 +18,8 @@ class CreateShippingPricesTable extends Migration
$table->unsignedInteger('shipping_id'); $table->unsignedInteger('shipping_id');
$table->decimal('price', 8, 2)->nullable(); $table->decimal('price', 8, 2)->nullable();
$table->decimal('price_comp', 8, 2)->nullable();
$table->decimal('tax_rate', 5, 2)->nullable(); $table->decimal('tax_rate', 5, 2)->nullable();
$table->decimal('factor', 5, 2)->nullable(); $table->decimal('factor', 5, 2)->nullable();

View file

@ -36,6 +36,7 @@ class CreateShoppingOrdersTable extends Migration
$table->unsignedInteger('weight')->nullable(); $table->unsignedInteger('weight')->nullable();
$table->boolean('paid')->default(false); $table->boolean('paid')->default(false);
$table->string('wp_invoice_path', 255)->nullable();
$table->string('txaction', 20)->nullable()->index(); $table->string('txaction', 20)->nullable()->index();
$table->char('mode', 4)->nullable(); $table->char('mode', 4)->nullable();

View file

@ -24,7 +24,6 @@ class CreatePaymentTransactionsTable extends Migration
$table->string('status',20)->nullable(); $table->string('status',20)->nullable();
$table->string('key',40)->nullable(); $table->string('key',40)->nullable();
$table->string('txaction',20)->nullable(); $table->string('txaction',20)->nullable();

View file

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePaymentMethodsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payment_methods', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->index();
$table->string('short', 10);
$table->unsignedTinyInteger('show_at')->nullable()->default(0);
$table->unsignedTinyInteger('pos')->nullable()->default(0);
$table->boolean('active')->default(false);
$table->boolean('default')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('payment_methods');
}
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLoggersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('loggers', function (Blueprint $table) {
$table->increments('id');
//from user
$table->unsignedInteger('user_id')->nullable();
//to model
$table->unsignedInteger('model_id')->index()->nullable();
$table->string('model')->index()->nullable();
$table->string('action')->index()->nullable();
$table->string('channel')->index()->nullable();
$table->text('message')->nullable();
$table->unsignedTinyInteger('level')->index()->default(0);
$table->timestamps();
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('loggers');
}
}

View file

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSySettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sy_settings', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->text('message')->nullable();
$table->string('action')->index()->nullable();
$table->unsignedTinyInteger('status')->index()->default(0);
$table->boolean('active')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sy_settings');
}
}

View file

@ -163,7 +163,9 @@ border: #b5c49b 1px solid;
.btn-text-500{ .btn-text-500{
font-weight: 600; font-weight: 600;
} }
.btn-text-400{
font-weight: 500;
}
div.shop-item-buttons .btn-xs { div.shop-item-buttons .btn-xs {
font-size: 13px; font-size: 13px;
} }

View file

@ -74,3 +74,7 @@ a[aria-expanded='true'] > .fa-caret-expand:before {
.has-error .help-block{ .has-error .help-block{
color: #a94442; color: #a94442;
} }
.no-line-break {
white-space: nowrap;
}

View file

@ -98,9 +98,12 @@ $(function () {
} }
var data = {}; var data = {};
$.each(button.data(), function(index, value){ $.each(button.data(), function(index, value){
data[index] = value; if(index !== 'bs.tooltip'){
data[index] = value;
}
}); });
//console.log(data); console.log(data);
loadModalInner(this, data); loadModalInner(this, data);
}); });
@ -111,7 +114,9 @@ $(function () {
button = $(this); button = $(this);
var data = {}; var data = {};
$.each(button.data(), function(index, value){ $.each(button.data(), function(index, value){
data[index] = value; if(index !== 'bs.tooltip'){
data[index] = value;
}
}); });
//console.log(data); //console.log(data);
loadModalInner(this, data); loadModalInner(this, data);
@ -133,7 +138,7 @@ $(function () {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}, },
success: function(data) { success: function(data) {
//console.log(data); console.log(data);
if(data.response.modal){ if(data.response.modal){
$(data.response.target).find('.modal-dialog').addClass(data.response.modal); $(data.response.target).find('.modal-dialog').addClass(data.response.modal);
} }

106
public/js/shopping_card.js Normal file
View file

@ -0,0 +1,106 @@
var ShoppingCard = {
image_dialog_images_url: "/iq/content/assets/modal",
image_dialog_title: 'Medien',
image_dialog_close_btn_text: 'schließen',
image_dialog_ok_btn_text: 'Einfügen',
data_id: null,
data_obj: null,
data_set: null,
data_img: null,
data_content: null,
modal: null,
init: function () {
var _self = this;
var $modal = _self.modal = $('#modal_iq_assets').hide();
$modal.find("button#modal_iq_save").click(function(event)
{
var items = LFileManager.getSelectedItems();
$modal.modal('hide');
if(items[0]){
var item = items[0];
if(_self.data_img){
var img = $(_self.data_id).find(_self.data_img);
if(item['thumb_url'] && img){
img.attr('src', item['thumb_url']);
}
}
//console.log(_self.data_content);
//console.log(item['content']);
if(_self.data_content){
var input = $(_self.data_id).find('input[name="'+_self.data_obj+'['+_self.data_content+']"]');
var val = item['content'][_self.data_content];
//console.log(input);
//console.log(val);
if(input){
input.val(val).change();
}
}
_self.data_set.forEach(function (setter, index) {
var input = $(_self.data_id).find('input[name="'+_self.data_obj+'['+setter+']"]');
var val = item[setter]
if(input && val){
input.val(val).change();
}
});
}
/*items.forEach(function (item, index) {
});*/
});
$('.btn-lfm-open-modal').on('click', function () {
_self.data_id = $(this).data('id');
_self.data_obj = $(this).data('obj');
_self.data_set = $(this).data('set');
_self.data_img = $(this).data('img');
_self.data_content = $(this).data('content');
_self.fillModal();
_self.modal.modal();
});
},
fillModal: function () {
var _self = this;
var next = _self.setEvents;
_self.getImagesFromUrl(next);
},
setEvents: function()
{
// images click event to select image
/*self.$modal.find('img').click(function(event)
{
// $(this).toggleClass(self.select_class);
});*/
},
getImagesFromUrl: function(callback)
{
var _self = this;
// get images html from url
$.get(_self.image_dialog_images_url, function(html)
{
_self.setModalHtml(html);
callback();
}).fail(function()
{
console.error("error loading from "+_self.image_dialog_images_url);
})
},
setModalHtml: function(html)
{ // set variabl parts to modal html
var _self = this;
_self.modal.find('.modal-title').html(_self.image_dialog_title);
_self.modal.find('#modal_iq_close').html(_self.image_dialog_close_btn_text);
_self.modal.find('#modal_iq_save').html(_self.image_dialog_ok_btn_tex);
_self.modal.find('.modal-body').html(html);
LFileManager.initFileManager(true);
},
};

View file

@ -6,7 +6,6 @@
'subject_activate' => 'Account aktivieren', 'subject_activate' => 'Account aktivieren',
'account_active' => 'Account freigeschaltet', 'account_active' => 'Account freigeschaltet',
'subject_reset' => 'Passwort zurücksetzen', 'subject_reset' => 'Passwort zurücksetzen',
'salutation' => 'Hallo Kunde',
'dear_mrs' => 'Hallo', 'dear_mrs' => 'Hallo',
'dear_sir' => 'Hallo', 'dear_sir' => 'Hallo',
'hello' => 'Hallo', 'hello' => 'Hallo',
@ -17,12 +16,15 @@
'checkout_subject' => 'Deine Bestellung bei', 'checkout_subject' => 'Deine Bestellung bei',
'checkout_subject_paid' => 'Zahlungsbestätigung - Deine Bestellung bei', 'checkout_subject_paid' => 'Zahlungsbestätigung - Deine Bestellung bei',
'change_e_mail' => 'E-Mail Adresse ändern', 'change_e_mail' => 'E-Mail Adresse ändern',
'salutation' => 'Anrede',
'first_name' => 'Vorname', 'first_name' => 'Vorname',
'last_name' => 'Nachname', 'last_name' => 'Nachname',
'email' => 'E-Mail', 'email' => 'E-Mail',
'phone' => 'Telefon', 'phone' => 'Telefon',
'subject' => 'Betreff', 'subject' => 'Betreff',
'message' => 'Nachricht', 'message' => 'Nachricht',
'sales_partnership' => 'Vertriebspartnerschaft',
'sales_partnership_message' => 'Hinweis',
'button_account' => 'zum Account', 'button_account' => 'zum Account',
'active_copy1line' => 'Du erhältst diese E-Mail, weil wir eine Anfrage zur Änderung Deiner E-Mail-Adresse für Dein Konto erhalten haben.', 'active_copy1line' => 'Du erhältst diese E-Mail, weil wir eine Anfrage zur Änderung Deiner E-Mail-Adresse für Dein Konto erhalten haben.',
'copy2line' => 'Oder kopiere diesen Link in die Adressleiste Deines Browsers.', 'copy2line' => 'Oder kopiere diesen Link in die Adressleiste Deines Browsers.',

View file

@ -9,11 +9,14 @@ return [
'settings' => 'Einstellungen', 'settings' => 'Einstellungen',
'my_team' => 'Mein Team', 'my_team' => 'Mein Team',
'my_clients' => 'Meine Kunden', 'my_clients' => 'Meine Kunden',
'my_orders' => 'Meine Bestellungen',
'member_register' => 'Berater registrieren', 'member_register' => 'Berater registrieren',
'member'=>'Berater', 'member'=>'Berater',
'membership' => 'Mitgliedschaft', 'membership' => 'Mitgliedschaft',
'my_membership' => 'Meine Mitgliedschaft', 'my_membership' => 'Meine Mitgliedschaft',
'orders'=>'Bestellungen', 'orders'=>'Bestellungen',
'trigger'=>'auslösen',
'do_order'=>'bestellen',
'clients'=>'Kunden', 'clients'=>'Kunden',
'products'=>'Produkte', 'products'=>'Produkte',
'overview'=>'Übersicht', 'overview'=>'Übersicht',
@ -27,7 +30,9 @@ return [
'modules'=>'Module', 'modules'=>'Module',
'user_roles'=>'User Rechte', 'user_roles'=>'User Rechte',
'shipping_costs'=>'Versandkosten', 'shipping_costs'=>'Versandkosten',
'payment_methods' => 'Zahlungsarten',
'career_level'=>'Karriere-Level', 'career_level'=>'Karriere-Level',
'countries'=>'Länder', 'countries'=>'Länder',
'logout'=>'Logout', 'logout'=>'Logout',
'system_settings' => 'Systemeinstellungen'
]; ];

View file

@ -204,5 +204,7 @@ return [
'm_account' => 'Account ID', 'm_account' => 'Account ID',
'has_customer_buyed' => 'Die Angabe', 'has_customer_buyed' => 'Die Angabe',
'billing_country_code' => 'Land Code', 'billing_country_code' => 'Land Code',
'sales_partnership' => 'Vertriebspartnerschaft',
'sales_partnership_message' => 'Vertriebspartnerschaft Hinweis'
], ],
]; ];

View file

@ -0,0 +1,110 @@
<div class="card-body">
<h6 class="small font-weight-semibold">
Kunden-, Rechnungsadresse
</h6>
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->billing_country->getLocated() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
</div>
</div>
<hr class="m-0">
<!-- / Billing -->
<!-- Shipping -->
<div class="card-body">
<h6 class="small font-weight-semibold">
Lieferadresse
</h6>
@if($shopping_user->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
<div class="row">
@if($shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->shipping_country->getLocated() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->shipping_phone }}
</div>
</div>
@endif
</div>

View file

@ -107,116 +107,8 @@
@endif @endif
<!-- Billing --> <!-- Billing -->
<div class="card-body"> @include('admin.customer._customer_detail')
<h6 class="small font-weight-semibold">
Rechnungsadresse
</h6>
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->billing_country->getLocated() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
</div>
</div>
<hr class="m-0">
<!-- / Billing -->
<!-- Shipping -->
<div class="card-body">
<h6 class="small font-weight-semibold">
Lieferadresse
</h6>
@if($shopping_user->same_as_billing)
{{__('email.checkout_mail_same_address')}}
@else
<div class="row">
@if($shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
{{ $shopping_user->shipping_country->getLocated() }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->shipping_phone }}
</div>
</div>
@endif
</div>
<hr class="m-0"> <hr class="m-0">
<div class="card-body"> <div class="card-body">
<h6 class="small font-weight-semibold"> <h6 class="small font-weight-semibold">

View file

@ -2,7 +2,7 @@
<h5 class="card-header"> <h5 class="card-header">
<div class="row"> <div class="row">
<div class="col-xs-12 col-sm-6"> <div class="col-xs-12 col-sm-6">
Rechnungsadresse Kunden-, Rechnungsadresse
</div> </div>
<div class="col-xs-12 col-sm-6"> <div class="col-xs-12 col-sm-6">
<span class="text-tiny float-right">* {{trans('register.required_fields')}}</span> <span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
@ -277,8 +277,6 @@
{{ Form::text('billing_email-confirm', $shopping_user->billing_email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'billing_email-confirm')) }} {{ Form::text('billing_email-confirm', $shopping_user->billing_email, array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'billing_email-confirm')) }}
</div> </div>
</div> </div>
@endif @endif
</div> </div>
</div> </div>

View file

@ -20,6 +20,7 @@
<th>{{__('E-Mail')}}</th> <th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th> <th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th> <th>{{__('Nachname')}}</th>
<th>{{__('Level')}}</th>
<th>{{__('Mitglied')}}</th> <th>{{__('Mitglied')}}</th>
<th>{{__('bis')}}</th> <th>{{__('bis')}}</th>
<th>{{__('Onlineshop')}}</th> <th>{{__('Onlineshop')}}</th>
@ -55,6 +56,7 @@
{ data: 'email', name: 'email' }, { data: 'email', name: 'email' },
{ data: 'first_name', name: 'account.first_name' }, { data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' }, { data: 'last_name', name: 'account.last_name' },
{ data: 'user_level', name: 'user_level' },
{ data: 'payment_account', name: 'payment_account' }, { data: 'payment_account', name: 'payment_account' },
{ data: 'payment_account_date', name: 'payment_account_date' }, { data: 'payment_account_date', name: 'payment_account_date' },
{ data: 'payment_shop', name: 'payment_shop' }, { data: 'payment_shop', name: 'payment_shop' },

View file

@ -35,9 +35,7 @@
<td>{{ $value->name }}</td> <td>{{ $value->name }}</td>
<td>{{ $value->getFormattedMargin() }}</td> <td>{{ $value->getFormattedMargin() }}</td>
<td>{{ $value->getTranNames() }}</td> <td>{{ $value->getTranNames() }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td> <td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<!-- <td><a class="text-danger" href="{{ route('admin_product_attribute_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td> -->
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>

View file

@ -0,0 +1,120 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Produktdetails
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card mb-3">
<div class="media flex-wrap flex-md-nowrap">
<div class="d-block col-12 col-md-4 col-lg-4 text-center p-0 m-0">
@if(count($product->images))
<img src="{{route('product_image', [$product->images->first()->slug])}}" alt class="img-fluid" style="max-height: 300px">
@endif
</div>
<div class="media-body p-4 p-md-5">
<h4 class="mb-2">
<a href="#" class="text-body">{{ $product->name }}</a>
</h4>
{!! $product->copy !!}
<table class="table my-4">
<tbody>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Points:</td>
<td class="border-0">{{ $product->points }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Inhalt:</td>
<td class="border-0">{{ $product->contents }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Gewicht:</td>
<td class="border-0">{{ $product->weight }} g</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Art.-Nr.:</td>
<td class="border-0">{{ $product->number }}</td>
</tr>
<tr>
<td class="border-0 text-muted align-middle" style="width: 110px">Netto-Preis:</td>
<td class="border-0">{{ $product->getFormattedPriceWith() }} &euro;</td>
</tr>
</tbody>
</table>
<hr class="mt-0 mb-4">
<div class="input-group d-inline-flex w-auto">
<span class="input-group-prepend">
<button class="btn btn-secondary icon-btn md-btn-flat" type="button">-</button>
</span>
<input type="text" class="form-control text-center" value="1" style="width: 46px;">
<span class="input-group-append">
<button class="btn btn-secondary icon-btn md-btn-flat" type="button">+</button>
</span>
</div>
<button class="btn btn-secondary ml-3 mb-1">
<strong>&euro; {{$product->getFormattedPriceWith()}}</strong>&nbsp; +<span class="ion ion-md-cart"></span>
</button>
</div>
</div>
<div class="">
<ul class="nav nav-tabs tabs-alt justify-content-center border-0 px-4 px-lg-5">
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4 active" data-toggle="tab" href="#shop-product-description">Bechreibung</a>
</li>
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-usage">Anwendung</a>
</li>
<li class="nav-item">
<a class="nav-link small font-weight-normal text-expanded py-4" data-toggle="tab" href="#shop-product-ingredients">Inhaltsstoffe</a>
</li>
</ul>
<hr class="m-0">
<div class="tab-content">
<div class="tab-pane fade show active" id="shop-product-description">
<div class="card borderless">
<div class="card-body">
{!! $product->description !!}
</div>
</div>
</div>
<div class="tab-pane fade" id="shop-product-usage">
<div class="card borderless">
<div class="card-body">
{!! $product->usage !!}
</div>
</div>
</div>
<div class="tab-pane fade" id="shop-product-ingredients">
<div class="card borderless">
<div class="card-body">
{!! $product->ingredients !!}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
});
</script>

View file

@ -0,0 +1,84 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
Meine Kunden / Lieferadressen
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="card mb-3">
<div class="card-datatable table-responsive">
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Anrede')}}</th>
<th>{{__('Firma')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('PLZ')}}</th>
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'send_to', searchable: false},
{ data: 'billing_email', name: 'billing_email' },
{ data: 'billing_salutation', name: 'billing_salutation' },
{ data: 'billing_company', name: 'billing_company' },
{ data: 'billing_firstname', name: 'billing_firstname' },
{ data: 'billing_lastname', name: 'billing_lastname' },
{ data: 'billing_zipcode', name: 'billing_zipcode' },
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>

View file

@ -0,0 +1,148 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Zahlungsarten')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Pos')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('sichtbar') }}</th>
<th>{{__('Standard')}}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-pos="{{ $value->pos }}"
data-name="{{ $value->name }}"
data-short="{{ $value->short }}"
data-show_at="{{ $value->show_at }}"
data-default="{{ $value->default }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->pos }}</td>
<td>{{ $value->name }} ({{ $value->short }})</td>
<td>{{ $value->getShowAtType() }}</td>
<td data-sort="{{ $value->default }}">{!! get_active_badge($value->default) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-pos=""
data-name=""
data-short=""
data-show_at="9"
data-default="1"
data-active="1"
>{{__('Neue Zahlungsart hinzufügen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_payment_method_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Zahlungsart')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Bezeichnung')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="short" class="form-label">{{__('Abkürzung')}}</label>
<input type="text" class="form-control" name="short" placeholder="{{__('Abkürzung')}}">
</div>
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
{{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('active')}}</span>
</label>
</div>
<div class="form-group col-6">
<input type="text" class="form-control" name="pos" placeholder="{{__('Number to move the position if necessary')}}">
</div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="default" checked>
<span class="custom-control-label">{{__('Standard')}}</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='short']").val(button.data('short'));
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
$(this).find(".modal-body select[name='show_at']").val(button.data('show_at'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$(this).find(".modal-body input[name='default']").prop( "checked", button.data('default'));
$('.selectpicker').selectpicker('refresh');
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -45,6 +45,10 @@
<label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label> <label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label>
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }} {{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
</div> </div>
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('shipping_addon', 1, $product->shipping_addon, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">Kompensationprodukt beim Versand für Berater</span>
</label>
</div> </div>
</div> </div>

View file

@ -26,6 +26,8 @@
<th>{{__('Einheit')}}</th> <th>{{__('Einheit')}}</th>
<th>{{__('Grundpreis')}}</th> <th>{{__('Grundpreis')}}</th>
<th>{{__('Gewicht')}}</th> <th>{{__('Gewicht')}}</th>
<th>{{__('sichbar')}}</th>
<th>{{__('KP')}}</th>
<th>{{__('Status')}}</th> <th>{{__('Status')}}</th>
<th></th> <th></th>
</tr> </tr>
@ -51,13 +53,15 @@
<div style="white-space: nowrap">{{ $category->category->name }}</div> <div style="white-space: nowrap">{{ $category->category->name }}</div>
@endforeach @endforeach
</td> </td>
<td>{{ $value->points }}</td>
<td>{{ $value->getFormattedPrice() }}</td> <td>{{ $value->getFormattedPrice() }}</td>
<td>{{ $value->points }}</td>
<td>{{ $value->contents_total }}</td> <td>{{ $value->contents_total }}</td>
<td>{{ $value->getUnitType() }}</td> <td>{{ $value->getUnitType() }}</td>
<td>{{ $value->getBasePriceFormatted() }}</td> <td>{{ $value->getBasePriceFormatted() }}</td>
<td>{{ $value->weight }}</td> <td>{{ $value->weight }}</td>
<td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>@endif</td> <td>{{ $value->getShowAtType() }}</td>
<td data-sort="{{ $value->shipping_addon }}">{!! get_active_badge($value->shipping_addon) !!}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
<td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a> &nbsp; <td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a> &nbsp;
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td> <a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr> </tr>

View file

@ -68,7 +68,8 @@
<thead> <thead>
<tr> <tr>
<th style="max-width: 60px;">&nbsp;</th> <th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Preis')}}</th> <th>{{__('Kunden Preis')}}</th>
<th>{{__('Kompensation Preis')}}</th>
<th>{{__('Tax')}}</th> <th>{{__('Tax')}}</th>
<th>{{__('Preis von - bis')}}</th> <th>{{__('Preis von - bis')}}</th>
<th>{{__('Gewicht von - bis')}}</th> <th>{{__('Gewicht von - bis')}}</th>
@ -83,6 +84,7 @@
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price" <button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
data-id="{{ $price->id }}" data-id="{{ $price->id }}"
data-price="{{ $price->getFormattedPrice() }}" data-price="{{ $price->getFormattedPrice() }}"
data-price_comp="{{ $price->getFormattedPriceComp() }}"
data-tax_rate="{{ $price->getFormattedTaxRate() }}" data-tax_rate="{{ $price->getFormattedTaxRate() }}"
data-factor="{{ $price->getFormattedFactor() }}" data-factor="{{ $price->getFormattedFactor() }}"
data-total_from="{{ $price->getFormatTotalFrom() }}" data-total_from="{{ $price->getFormatTotalFrom() }}"
@ -92,8 +94,9 @@
<span class="far fa-edit"></span> <span class="far fa-edit"></span>
</button> </button>
</td> </td>
<td>{{ $price->getFormattedPrice() }}</td> <td>{{ $price->getFormattedPrice() }}</td>
<td>{{ $price->getFormattedTaxRate() }}</td> <td>{{ $price->getFormattedPriceComp() }}</td>
<td>{{ $price->getFormattedTaxRate() }}</td>
<td>{{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }}</td> <td>{{ $price->getFormatTotalFrom() }} - {{ $price->getFormattedTotalTo() }}</td>
<td>{{ $price->weight_from }} - {{ $price->weight_to }}</td> <td>{{ $price->weight_from }} - {{ $price->weight_to }}</td>
<td><a class="text-danger" href="{{ route('admin_shipping_price_delete', [$price->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td> <td><a class="text-danger" href="{{ route('admin_shipping_price_delete', [$price->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
@ -106,6 +109,7 @@
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price" <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-price"
data-id="new" data-id="new"
data-price="" data-price=""
data-price_comp=""
data-tax_rate="" data-tax_rate=""
data-factor="1" data-factor="1"
data-total_from="" data-total_from=""
@ -135,9 +139,16 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-6"> <div class="form-group col-6">
<label for="price" class="form-label">{{__('Preis (brutto)')}}*</label> <label for="price" class="form-label">{{__('Kunden Preis (brutto)')}}*</label>
<input type="text" class="form-control" name="price" placeholder="{{__('Preis in Euro')}}" required> <input type="text" class="form-control" name="price" placeholder="{{__('Preis in Euro')}}" required>
</div> </div>
</div>
<div class="form-row">
<div class="form-group col-6">
<label for="price_comp" class="form-label">{{__('Kompensation Preis (brutto)')}}*</label>
<input type="text" class="form-control" name="price_comp" placeholder="{{__('Preis in Euro')}}" required>
</div>
<div class="form-group col-6"> <div class="form-group col-6">
<label for="tax_rate" class="form-label">{{__('enthaltene Tax (%)')}}</label> <label for="tax_rate" class="form-label">{{__('enthaltene Tax (%)')}}</label>
<input type="text" class="form-control" name="tax_rate" placeholder="{{__('Tax in %')}}"> <input type="text" class="form-control" name="tax_rate" placeholder="{{__('Tax in %')}}">
@ -250,6 +261,7 @@
var button = $(event.relatedTarget); var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id')); $(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='price']").val(button.data('price')); $(this).find(".modal-body input[name='price']").val(button.data('price'));
$(this).find(".modal-body input[name='price_comp']").val(button.data('price_comp'));
$(this).find(".modal-body input[name='tax_rate']").val(button.data('tax_rate')); $(this).find(".modal-body input[name='tax_rate']").val(button.data('tax_rate'));
$(this).find(".modal-body input[name='factor']").val(button.data('factor')); $(this).find(".modal-body input[name='factor']").val(button.data('factor'));
$(this).find(".modal-body input[name='total_from']").val(button.data('total_from')); $(this).find(".modal-body input[name='total_from']").val(button.data('total_from'));

View file

@ -23,6 +23,7 @@
<th>{{__('Account')}} (bis)</th> <th>{{__('Account')}} (bis)</th>
<th>{{__('Shop')}} (bis)</th> <th>{{__('Shop')}} (bis)</th>
<th>{{__('Shop')}} ab</th> <th>{{__('Shop')}} ab</th>
<th>{{__('Zahlungsarten')}}</th>
<th>{{__('Test Modus')}}</th> <th>{{__('Test Modus')}}</th>
<th>{{__('delete')}}</th> <th>{{__('delete')}}</th>
</tr> </tr>
@ -61,12 +62,11 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0"> </div>
<input type="checkbox" class="custom-control-input" name="confirmed" checked> <div class="modal-footer">
<span class="custom-control-label">{{__('verified')}}</span> <button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
</label> <button type="submit" class="btn btn-primary" name="save-admin" value="save-admin">{{__('save')}}</button>
</div>
</div> </div>
</form> </form>
</div> </div>
@ -257,6 +257,41 @@
</div> </div>
</div> </div>
<!-- Modal test modus -->
<div class="modal fade" id="modals-payment_methods">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="email" class="form-label">{{__('E-Mail')}}</label>
<input type="text" class="form-control" name="email" placeholder="{{__('E-Mail')}}" readonly>
</div>
</div>
@foreach(\App\Models\PaymentMethod::where('active', true)->get() as $payment_method)
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input input-payment-methods" name="payment_methods[]" value="{{$payment_method->id}}" @if($payment_method->default) checked @endif>
<span class="custom-control-label">{{ $payment_method->name }}</span>
</label>
</div>
@endforeach
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary" name="save-payment_methods" value="save-payment_methods">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script> <script>
$( document ).ready(function() { $( document ).ready(function() {
$('#modals-admin').on('show.bs.modal', function (event) { $('#modals-admin').on('show.bs.modal', function (event) {
@ -296,6 +331,22 @@
$(this).find(".modal-body input[name='email']").val(button.data('email')); $(this).find(".modal-body input[name='email']").val(button.data('email'));
$(this).find(".modal-body input[name='payment_shop']").val(button.data('payment_shop')); $(this).find(".modal-body input[name='payment_shop']").val(button.data('payment_shop'));
}); });
$('#modals-payment_methods').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='email']").val(button.data('email'));
var payment_methods = button.data('payment_methods');
if(payment_methods){
$.each($(this).find(".modal-body .input-payment-methods"), function (i, item) {
if($.inArray(parseInt($(item).val()), payment_methods) !== -1){
$(item).prop( "checked", true);
}else{
$(item).prop( "checked", false);
}
});
}
});
$('#modals-test_mode').on('show.bs.modal', function (event) { $('#modals-test_mode').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget); var button = $(event.relatedTarget);
@ -321,6 +372,7 @@
{ data: 'account', name: 'account' }, { data: 'account', name: 'account' },
{ data: 'shop', name: 'shop' }, { data: 'shop', name: 'shop' },
{ data: 'since', name: 'since' }, { data: 'since', name: 'since' },
{ data: 'my_payment_methods', name: 'my_payment_methods' },
{ data: 'test_mode', name: 'test_mode' }, { data: 'test_mode', name: 'test_mode' },
{ data: 'action_delete', orderable: false, searchable: false}, { data: 'action_delete', orderable: false, searchable: false},
], ],

View file

@ -0,0 +1,180 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mivita.care</title>
<style type="text/css">
img {
max-width: 600px;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
}
a {
text-decoration: none;
border: 0;
outline: none;
color: #919f7a;
}
a:hover {
color: #b6b600;
}
a img {
border: none;
}
td, h1, h2, h3 {
font-family: Helvetica, Verdana, Arial, sans-serif;
font-weight: 400;
}
td {
text-align: left;
}
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100%;
height: 100%;
color: #37302d;
background: #ffffff;
font-size: 15px;
line-height: 26px
}
table {
border-collapse: separate !important;
}
.headline {
color: #37302d;
font-size: 18px;
}
.sub_headline {
color: #788662;
font-size: 15px;
}
.force-full-width {
width: 100% !important;
}
hr {
border: none;
border-top: 1px solid #b7c59e;
}
</style>
<style type="text/css" media="screen">
@media screen {
td, h1, h2, h3 {
font-family: Helvetica, Verdana, Arial, sans-serif;
}
}
</style>
<style type="text/css" media="only screen and (max-width: 480px)">
@media only screen and (max-width: 480px) {
table[class="w320"] {
width: 320px !important;
}
}
</style>
</head>
<body class="body" style="padding:0; margin:0; display:block; background:#f8f8f8; -webkit-text-size-adjust:none" bgcolor="#f8f8f8">
<div style="display: none; mso-hide: all; width: 0px; height: 0px; max-width: 0px; max-height: 0px; font-size: 0px; line-height: 0px;">
{{ $content }}
</div>
<table align="left" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td align="left" valign="top" bgcolor="#f8f8f8" width="100%">
<br>
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="700" class="w320">
<tr>
<td align="left" valign="top">
<table style="margin: 0 auto;" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style=" text-align:center;">
<center>
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="">
<tbody class="">
<tr class="">
<td align="center" valign="middle" style="font-size: 0px;" class="">
<center>
<picture style="text-align: center">
<img src="https://my.mivita.care/images/logo_mivita.png" alt="mivita.care" style="border:none" width="230">
</picture>
</center>
</td>
</tr>
<tr>
<td><br></td>
</tr>
</tbody>
</table>
</center>
</td>
</tr>
</table>
<table cellpadding="10" style="padding: 10px;" cellspacing="0" border="0" width="100%" bgcolor="#ffffff">
<tr>
<td class="headline">
<b>{{ $title }} </b>
</td>
</tr>
<tr>
<td>
<table style="padding: 20px; border:1px solid #eee; background-color: #f6fdf5;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td>
{!! nl2br($content) !!}
</td>
</tr>
</table>
</td>
</tr>
</table>
<center>
<table cellpadding="0" cellspacing="0" class="force-full-width"
bgcolor="#f8f8f8" style="margin: 0 auto; text-align: center;line-height:1.6em;">
<tr>
<td style="color:#7B7B7E; font-size:14px; text-align: center;line-height:1.6em;" align="center">
<p>
{{__('email.footer_copy1')}}
</p>
<br>
<a href="https://www.mivita.care" style="color: #7B7B7E; text-decoration: underline;">www.mivita.care</a>
<br>
</td>
</tr>
<tr>
<td style="color:#bbbbbb; font-size:12px; text-align: center;line-height:1.6em;" align="center">
<p>{{__('email.footer_copy2')}}</p>
<a href="https://www.mivita.care/datenschutz">Datenschutzerklärung</a> <br>
<p>{{__('email.footer_copy3')}}</p>
<br>
<br>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View file

@ -136,6 +136,7 @@
<!-- `perfect-scrollbar` library required by SideNav plugin --> <!-- `perfect-scrollbar` library required by SideNav plugin -->
<script src="{{ mix('/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') }}"></script> <script src="{{ mix('/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') }}"></script>
<script src="{{ asset('/js/shopping_card.js') }}?v=1{{ get_file_last_time('/js/shopping_card.js') }}"></script>
<!-- Application javascripts --> <!-- Application javascripts -->
<script src="{{ mix('/js/application.js') }}"></script> <script src="{{ mix('/js/application.js') }}"></script>
@ -196,9 +197,6 @@
}); });
$('.note-status-output').hide(); $('.note-status-output').hide();
}); });
</script> </script>
</body> </body>
</html> </html>

View file

@ -74,6 +74,22 @@
</ul> </ul>
</li> </li>
@endif @endif
@if(Auth::user()->isActiveAccount() && Auth::user()->isSySAdmin())
<li class="sidenav-item @if(Request::is('user/orders', 'user/order/*')) open @endif">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-ios-cart"></i>
<div>{{ __('navigation.my_orders') }}</div>
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('user/orders', 'user/order/detail/*') ? ' active' : '' }}">
<a href="{{ route('user_orders') }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-ios-list"></i><div>{{ __('navigation.overview') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/order/my/*') ? ' active' : '' }}">
<a href="{{ route('user_order_my_delivery', ['me']) }}" class="sidenav-link"><i class="sidenav-icon ion ion ion-md-basket"></i><div>{{ __('navigation.do_order') }}</div></a>
</li>
</ul>
</li>
@endif
@endif @endif
@if(Auth::user()->isAdmin()) @if(Auth::user()->isAdmin())
@ -154,12 +170,15 @@
<li class="sidenav-divider mb-1"></li> <li class="sidenav-divider mb-1"></li>
<li class="sidenav-header small font-weight-semibold">SUPERADMIN</li> <li class="sidenav-header small font-weight-semibold">SUPERADMIN</li>
<li class="sidenav-item{{ Request::is('admin/users') ? ' active' : '' }} {{ Request::is('admin/user/edit/*') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('admin/users', 'admin/user/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('navigation.user_roles') }}</div></a> <a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('navigation.user_roles') }}</div></a>
</li> </li>
<li class="sidenav-item{{ Request::is('admin/shippings') ? ' active' : '' }} {{ Request::is('admin/shipping/edit/*') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('admin/shippings', 'admin/shipping/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_shippings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-gift"></i><div>{{ __('navigation.shipping_costs') }}</div></a> <a href="{{ route('admin_shippings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-gift"></i><div>{{ __('navigation.shipping_costs') }}</div></a>
</li> </li>
<li class="sidenav-item{{ Request::is('admin/payment_methods') ? ' active' : '' }}">
<a href="{{ route('admin_payment_methods') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-cash"></i><div>{{ __('navigation.payment_methods') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/levels') ? ' active' : '' }} {{ Request::is('admin/level/edit/*') ? ' active' : '' }}"> <li class="sidenav-item{{ Request::is('admin/levels') ? ' active' : '' }} {{ Request::is('admin/level/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_levels') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-trending-up"></i><div>{{ __('navigation.career_level') }}</div></a> <a href="{{ route('admin_levels') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-trending-up"></i><div>{{ __('navigation.career_level') }}</div></a>
</li> </li>
@ -195,6 +214,9 @@
</li> </li>
</ul> </ul>
</li> </li>
<li class="sidenav-item{{ Request::is('sysadmin/settings') ? ' active' : '' }}">
<a href="{{ route('sysadmin_settings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-cog"></i><div>{{ __('navigation.system_settings') }}</div></a>
</li>
@endif @endif
<li class="sidenav-divider mb-1"></li> <li class="sidenav-divider mb-1"></li>

View file

@ -33,6 +33,8 @@
</div> </div>
<button type="submit" name="action" value="checkForAll" class="btn btn-primary"><i class="ion"></i> checkForAll</button> <button type="submit" name="action" value="checkForAll" class="btn btn-primary"><i class="ion"></i> checkForAll</button>
<button type="submit" name="action" value="makePaymentMethodsDefault" class="btn btn-primary"><i class="ion"></i> make PaymentMethods Default</button>
</div> </div>

View file

@ -0,0 +1,152 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h6 class="card-header">
{{__('Systemeinstellungen')}}
</h6>
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('slug') }}</th>
<th>{{__('Info') }}</th>
<th>{{__('Action') }}</th>
<th>{{__('Status')}}</th>
<th>{{__('Aktiv')}}</th>
</tr>
</thead>
<tbody>
@foreach($values as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-slug="{{ $value->slug }}"
data-message="{{ $value->message }}"
data-action="{{ $value->action }}"
data-status="{{ $value->status }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->name }}</td>
<td>{{ $value->slug }}</td>
<td>{{ $value->message }}</td>
<td>{{ $value->action }}</td>
<td>{{ $value->status }}</td>
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-name=""
data-slug=""
data-message=""
data-action=""
data-status=""
data-active="1"
>{{__('Neue Einstellung hinzufügen')}}</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('sysadmin_setting_store') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title"> {{__('Systemeinstellung')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{__('Name')}}</label>
<input type="text" class="form-control" name="name">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="slug" class="form-label">{{__('Slug')}}</label>
<input type="text" class="form-control" name="slug">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="message" class="form-label">{{__('Info')}}</label>
<input type="text" class="form-control" name="message">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="action" class="form-label">{{__('Action')}}</label>
<input type="text" class="form-control" name="action">
</div>
</div>
<div class="form-group col-sm-5">
<label class="form-label" for="status">{{ __('Produkt anzeigen') }}</label>
{{ Form::select('status', \App\Models\SySetting::$statusTypes, 1, array('data-live-search'=>'false', 'class'=>'selectpicker') ) }}
</div>
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox m-2">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('Aktiv')}}</span>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='slug']").val(button.data('slug'));
$(this).find(".modal-body input[name='message']").val(button.data('message'));
$(this).find(".modal-body input[name='action']").val(button.data('action'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$(this).find(".modal-body select[name='status']").val(button.data('status'));
$('.selectpicker').selectpicker('refresh');
});
$('.datatables-style').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -25,6 +25,7 @@
<th>{{__('Käufe')}}</th> <th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th> <th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th> <th>{{__('erstellt')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('ID Kunden')}}</th> <th>{{__('ID Kunden')}}</th>
<th>WP</th> <th>WP</th>
@ -66,6 +67,7 @@
{ data: 'orders', name: 'orders' }, { data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' }, { data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' }, { data: 'first_created_at', name: 'first_created_at' },
{data: 'status', name: 'status', searchable: false, orderable: false },
{ data: 'number', name: 'number'}, { data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false}, { data: 'extras', name: 'extras', searchable: false, orderable: false},
], ],

View file

@ -0,0 +1,94 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
</h4>
<div class="card">
<div class="card-body p-2 p-md-4">
{!! Form::open(['url' => route('user_order_my_list', [$for, $delivery_id]), 'class' => 'form-horizontal']) !!}
<h4>Lieferdaten</h4>
<div class="switchers-stacked">
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="is-for-member" @if(!$shopping_user) checked="checked" @endif >
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für mich und wird an meine Adresse versandt</span>
</label>
<label class="switcher switcher-secondary">
<input type="radio" class="switcher-input" name="switchers-radio-is-for" value="is-for-customer" @if($shopping_user) checked="checked" @endif>
<span class="switcher-indicator">
<span class="switcher-yes"></span>
<span class="switcher-no"></span>
</span>
<span class="switcher-label">Ware ist für einen Kunden und wird an den Kunden versandt</span>
</label>
</div>
<hr>
<div id="show-is-for-customer" @if(!$shopping_user) style="display: none" @endif >
<div class="form-row">
<div class="form-group col-sm-6">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="show"
data-action="user-order-my-delivery-show"
data-back="{{route('user_order_my_delivery', [$for])}}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-shopping-cart"></span> An bestehenden Kunden versenden (Kunden auswählen)</button>
</div>
<div class="form-group col-sm-6">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-load-content"
data-id="add"
data-action="user-order-my-delivery-add"
data-back="{{route('user_order_my_delivery', [$for])}}"
data-modal="modal-xl"
data-route="{{route('modal_load')}}"><span class="fa fa-plus-circle"></span> An neuen Kunden versenden (Kunden hinzufügen)</button>
</div>
</div>
<hr>
@if($shopping_user)
<div class="show-is-for-customer">
<h4>An diesen Kunde versenden</h4>
@include('admin.customer._customer_detail')
</div>
@endif
</div>
<div class="float-right">
<button type="submit" class="btn btn-secondary">bestätigen und weiter zur Bestellung</button>
</div>
</div>
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
$('input[name="switchers-radio-is-for"]').on('change', function (){
if($(this).val() === 'is-for-customer'){
$('#show-is-for-customer').show('slow');
}else{
$('#show-is-for-customer').hide('slow');
}
});
/*
* showCreditCardPayment(jQuery('input[name="payment_method"]:checked').val());
jQuery('input[name="payment_method"]').on('change', function () {
showCreditCardPayment($(this).val());
});*/
});
</script>
@endsection

View file

@ -0,0 +1,89 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.overview') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<div class="ml-4">
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Anrede')}}</th>
<th>{{__('Firma')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('PLZ')}}</th>
<th>{{__('Stadt')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Käufe')}}</th>
<th>{{__('Newsletter')}}</th>
<th>{{__('erstellt')}}</th>
<th>{{__('ID Kunden')}}</th>
<th>WP</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="mt-4 ml-4">
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
</div>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-customers').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_customer_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[0, "desc" ]],
"columns": [
{ data: 'id', searchable: false},
{ data: 'billing_email', name: 'billing_email' },
{ data: 'billing_salutation', name: 'billing_salutation' },
{ data: 'billing_company', name: 'billing_company' },
{ data: 'billing_firstname', name: 'billing_firstname' },
{ data: 'billing_lastname', name: 'billing_lastname' },
{ data: 'billing_zipcode', name: 'billing_zipcode' },
{ data: 'billing_city', name: 'billing_city' },
{ data: 'billing_country_id', name: 'billing_country_id' },
{ data: 'orders', name: 'orders' },
{ data: 'subscribed', name: 'subscribed' },
{ data: 'first_created_at', name: 'first_created_at' },
{ data: 'number', name: 'number'},
{ data: 'extras', name: 'extras', searchable: false, orderable: false},
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
/* $('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
*/
});
</script>
@endsection

View file

@ -0,0 +1,131 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('navigation.my_orders') }} / {{ __('navigation.do_order') }}
</h4>
<style>
.btn-md-extra {
padding: 0.3rem 0.6rem;
font-size: 0.8rem;
line-height: 1.5;
border-radius: 0.25rem;
}
.md-btn-extra {
width: calc(1.7rem + 2px) !important;
line-height: 1.5rem;
}
.form-control.input-extra {
padding: 0.28rem 0.6rem;
font-size: 0.8rem;
font-weight: 500;
min-height: calc(1.8rem + 2px);
height: calc(1.8rem + 2px);
width: 44px;
}
.input-group-min-w {
min-width: 102px;
}
.img-extra {
min-width:55px;
max-height: 160px;
}
</style>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-order-list table table-striped table-bordered" id="datatables-order-list">
<thead>
<tr>
<th>{{__('Bild')}}</th>
<th>#</th>
<th>{{__('Anzahl')}}</th>
<th>{{__('Produkt')}}</th>
<th>{{__('Artikelnummer')}}</th>
<th>{{__('Netto-Preis')}}</th>
<th>{{__('Points')}}</th>
<th><span class="no-line-break">{{__('Inhalt (ml)')}}</span></th>
<th><span class="no-line-break">{{__('Gewicht (g)')}}</span></th>
<th>#</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<hr>
{!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!}
<div class="card-body">
@if($for === 'ot')
<h4>Lieferadresse (Kunde)</h4>
@include('user.order.shipping_ot')
@endif
@if($for === 'me')
<h4>Lieferadresse (meine)</h4>
@include('user.order.shipping_me')
@endif
</div>
@include('user.order.list_form')
{!! Form::close() !!}
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatables-order-list').DataTable({
"processing": true,
"serverSide": true,
ajax: {
url: '{!! route( 'user_order_my_datatable') !!}',
data: function(d) {
// d.filter_member_id = $('select[name=filter_member_id]').val();
// d.filter_customer_member = $('select[name=filter_customer_member]').val();
}
},
"order": [[4, "asc" ]],
"columns": [
{ data: 'picture', name: 'picture', searchable: false, orderable: false },
{ data: 'add_card', name: 'add_card', searchable: false, orderable: false},
{ data: 'quantity', name: 'quantity', searchable: false, orderable: false},
{ data: 'name', name: 'name' },
{ data: 'number', name: 'number' },
{ data: 'price', name: 'price', searchable: false },
{ data: 'points', name: 'points', searchable: false },
{ data: 'contents_total', name: 'contents_total', searchable: false },
{ data: 'weight', name: 'weight', searchable: false },
{ data: 'action', name: 'action', searchable: false, orderable: false },
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
/* $('#filter_member_id').on('change', function(){
oTable.draw();
});
$('#filter_customer_member').on('change', function(){
oTable.draw();
});
*/
$('body').tooltip({
selector: '.product-tooltip'
});
});
</script>
@endsection

View file

@ -0,0 +1,104 @@
<div class="card-body p-2 p-md-4">
<h4>Warenkorb</h4>
<!-- Shopping cart table -->
<div class="table-responsive">
<table class="table table-bordered m-0">
<thead>
<tr>
<!-- Set columns width -->
<th class="text-center py-3 px-4" style="min-width: 400px;">Produkt</th>
<th class="text-right py-3 px-4" style="width: 100px;">Preis</th>
<th class="text-center py-3 px-4" style="width: 120px;">Anzahl</th>
<th class="text-right py-3 px-4" style="width: 100px;">Summe</th>
<th class="py-3 px-4" style="width: 40px;"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="p-4">
<div class="media align-items-center">
<img src="/products/appwork/v152/assets_/img/uikit/nike-1.jpg" class="d-block ui-w-40 ui-bordered mr-4" alt>
<div class="media-body">
<a href="#" class="d-block text-body">Nike Men Black Liteforce III Sneakers</a>
<small>
<span class="text-muted">Color:</span>
<span class="ui-product-color ui-product-color-sm align-text-bottom" style="background:#e81e2c;"></span> &nbsp;
<span class="text-muted">Size: </span> EU 37 &nbsp;
<span class="text-muted">Ships from: </span> China
</small>
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$57.55
</td>
<td class="align-middle p-4">
<input type="text" class="form-control text-center" value="2">
</td>
<td class="text-right font-weight-semibold align-middle p-4">
<span class="price">115.1</span> &euro;
</td>
<td class="text-center align-middle px-0">
<a href="#" class="close float-none" data-toggle="tooltip" title data-original-title="Remove">×</a>
</td>
</tr>
<tr>
<td class="p-4">
<div class="media align-items-center">
<img src="/products/appwork/v152/assets_/img/uikit/sunglasses.jpg" class="d-block ui-w-40 ui-bordered mr-4" alt>
<div class="media-body">
<a href="#" class="d-block text-body">WALKING 400 BLUE CAT3</a>
<small>
<span class="text-muted">Ships from: </span> Germany
</small>
</div>
</div>
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$20.55
</td>
<td class="align-middle p-4">
<input type="text" class="form-control text-center" value="1">
</td>
<td class="text-right font-weight-semibold align-middle p-4">
$20.55
</td>
<td class="text-center align-middle px-0">
<a href="#" class="close float-none" data-toggle="tooltip" title data-original-title="Remove">×</a>
</td>
</tr>
</tbody>
</table>
</div>
<!-- / Shopping cart table -->
<div class="d-flex flex-wrap justify-content-between align-items-center pb-4">
<div class="mt-4">
{{-- <label class="text-muted font-weight-normal">Promocode</label>
<input type="text" placeholder="ABC" class="form-control">
--}}
</div>
<div class="d-flex">
<div class="text-right mt-4 mr-5">
<label class="text-muted font-weight-normal m-0">Points</label>
<div class="text-large"><strong>$20</strong></div>
</div>
<div class="text-right mt-4">
<label class="text-muted font-weight-normal m-0">Gesamtsumme</label>
<div class="text-large"><strong>$1164.65</strong></div>
</div>
</div>
</div>
<hr>
<div class="float-right">
<button type="submit" class="btn btn-secondary">bestätigen und weiter zur Kasse</button>
</div>
</div>

View file

@ -0,0 +1,102 @@
@if($user->account)
@if($user->account->same_as_billing)
<!-- Billing -->
<div class="row">
@if($user->account->company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $user->account->company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($user->account->salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $user->account->first_name }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $user->account->last_name }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $user->account->address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $user->account->address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $user->account->zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $user->account->city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($user->account->country){{ $user->account->country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $user->account->phone }}
</div>
</div>
<!-- / Billing -->
@else
<div class="row">
@if($user->account->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $user->account->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($user->account->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $user->account->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $user->account->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $user->account->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $user->account->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $user->account->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $user->account->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($user->account->shipping_country){{ $user->account->shipping_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $user->account->shipping_phone }}
</div>
</div>
@endif
@else
<h4>Fehler: Keine Adressdaten gefunden!</h4>
@endif

View file

@ -0,0 +1,99 @@
@if($shopping_user->same_as_billing)
<!-- Billing -->
<div class="row">
@if($shopping_user->billing_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->billing_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->billing_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->billing_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->billing_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->billing_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->billing_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->billing_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->billing_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($shopping_user->billing_country){{ $shopping_user->billing_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->billing_phone }}
</div>
</div>
<!-- / Billing -->
@else
<div class="row">
@if($shopping_user->shipping_company)
<div class="col-md-12 mb-3">
<div class="text-muted small">Firma</div>
{{ $shopping_user->shipping_company }}
</div>
@endif
<div class="col-md-3 mb-3">
<div class="text-muted small">Anrede</div>
{{ \App\Services\HTMLHelper::getSalutationLang($shopping_user->shipping_salutation) }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Vorname</div>
{{ $shopping_user->shipping_firstname }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Nachname</div>
{{ $shopping_user->shipping_lastname }}
</div>
</div>
<div class="row">
<div class="col-md-3 mb-3">
<div class="text-muted small">Straße</div>
{{ $shopping_user->shipping_address }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Zusatz</div>
{{ $shopping_user->shipping_address_2 }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">PLZ</div>
{{ $shopping_user->shipping_zipcode }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Stadt</div>
{{ $shopping_user->shipping_city }}
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Land</div>
@if($shopping_user->shipping_country){{ $shopping_user->shipping_country->getLocated() }}@endif
</div>
<div class="col-md-3 mb-3">
<div class="text-muted small">Telefon</div>
{{ $shopping_user->shipping_phone }}
</div>
</div>
@endif
</div>

View file

@ -61,7 +61,6 @@
<body class="smoothscroll enable-animation"> <body class="smoothscroll enable-animation">
@yield('layout-content') @yield('layout-content')
<!-- SCROLL TO TOP --> <!-- SCROLL TO TOP -->
<a href="#" id="toTop"></a> <a href="#" id="toTop"></a>
@ -69,12 +68,12 @@
<script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script> <script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script>
<script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/js/scripts.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/js/scripts.js') }}"></script>
<!-- <script type="text/javascript" src="{{ asset('/assets/js/jquery.contact-form.js') }}"></script> --> {{--<script type="text/javascript" src="{{ asset('/assets/js/jquery.contact-form.js') }}"></script> --}}
<!-- REVOLUTION SLIDER --> <!-- REVOLUTION SLIDER -->
<script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.tools.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.tools.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.revolution.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.revolution.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/js/view/demo.revolution_slider.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/js/view/demo.revolution_slider.js') }}"></script>
@yield('scripts')
<script> <script>
/** CHECKOUT /** CHECKOUT
** *********************** **/ ** *********************** **/

View file

@ -15,7 +15,7 @@
<div class="col-md-3 col-sm-12 text-right"><!-- right btn --> <div class="col-md-3 col-sm-12 text-right"><!-- right btn -->
<a href="{{url('/kontakt')}}" rel="nofollow" target="_blank" class="btn btn-primary btn-lg">zum Kontakt</a> <a href="{{url('/kontakt')}}" rel="nofollow" target="_blank" class="btn btn-primary btn-lg btn-text-500">zum Kontakt</a>
</div><!-- /right btn --> </div><!-- /right btn -->
</div> </div>

View file

@ -11,11 +11,6 @@
</div> </div>
</section> </section>
<style>
.checkbox.error{
color:#b92c28 !important;
}
</style>
<style type="text/css"> <style type="text/css">
.tp-caption { .tp-caption {
text-shadow: none; text-shadow: none;
@ -52,13 +47,30 @@
border: 6px solid #bbccab; border: 6px solid #bbccab;
margin-bottom: 10px; margin-bottom: 10px;
} }
.radio, .checkbox { .checkbox {
font-size: 14px; font-size: 14px;
line-height: 1.3em; line-height: 1.3em;
} }
.checkbox i { .checkbox i {
top:1px; top:1px;
} }
.radio {
font-size: 14px;
line-height: 2em;
}
.alert.error {
padding: 8px;
margin-bottom: 4px;
margin-top: 4px;
font-size: 0.9em;
font-weight: bold;
}
select.form-control:not([size]):not([multiple]) {
height: 40px;
}
.checkbox.error, .radio.error{
color:#b92c28 !important;
}
</style> </style>
<!-- /PAGE HEADER --> <!-- /PAGE HEADER -->
@ -67,99 +79,144 @@
<!-- --> <!-- -->
<section> <section>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<!-- FORM --> <!-- FORM -->
<div class="col-md-9 col-sm-8"> <div class="col-md-9 col-sm-8">
<h1>Schreibe uns!</h1> <h1>Schreibe uns!</h1>
<p>Du interessierst Dich für unser Geschäft oder hast Fragen zu den Produkten? Dann freuen wir uns auf eine Nachricht von Dir. Wir werden uns im Anschluss sobald wie möglich bei Dir zurückmelden.</p> <p>Du interessierst Dich für unser Geschäft oder hast Fragen zu den Produkten? Dann freuen wir uns auf eine Nachricht von Dir. Wir werden uns im Anschluss sobald wie möglich bei Dir zurückmelden.</p>
<div class="box-static box-transparent box-bordered padding-20"> <div class="box-static box-transparent box-bordered padding-20">
{!! Form::open(['url' => '/kontakt']) !!} {!! Form::open(['url' => '/kontakt']) !!}
<div class="text-right" style="margin-bottom: 8px; margin-top: -16px;">
<em class="small">* {{trans('register.required_fields')}}</em>
</div>
<div class="row contact-row"> <div class="row contact-row">
<div class="col-md-6"> <div class="form-group col-md-12">
<div class="form-group"> {!! Form::label('first_name', __('Salutation').'*') !!}
{!! Form::label('first_name', __('First name').'*') !!} {!! Form::select('salutation', [''=>'Bitte wählen', 'mr'=>'Herr', 'ms'=>'Frau'], '', ['class' => 'form-control '.($errors->has('salutation') ? 'error is-invalid' : '')]) !!}
{!! Form::text('first_name', null, ['class' => 'form-control '.($errors->has('first_name') ? 'error' : ''), 'placeholder'=>__('First name'), 'required']) !!} @if ($errors->has('salutation'))
</div> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('salutation') }}
</div>
@endif
</div>
<div class="form-group col-md-6">
{!! Form::label('first_name', __('First name').'*') !!}
{!! Form::text('first_name', '', ['class' => 'form-control '.($errors->has('first_name') ? 'error is-invalid' : ''), 'placeholder'=>__('First name'), '']) !!}
@if ($errors->has('first_name')) @if ($errors->has('first_name'))
<label for="first_name" class="error text-danger small" style="display: block;">{{ $errors->first('first_name') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('first_name') }}
</div>
@endif @endif
</div> </div>
<div class="col-md-6"> <div class="form-group col-md-6">
<div class="form-group"> {!! Form::label('last_name', __('Last Name').'*') !!}
{!! Form::label('last_name', __('Last Name').'*') !!} {!! Form::text('last_name', '', ['class' => 'form-control '.($errors->has('last_name') ? 'error is-invalid' : ''), 'placeholder'=>__('Last Name'), '']) !!}
{!! Form::text('last_name', null, ['class' => 'form-control '.($errors->has('last_name') ? 'error' : ''), 'placeholder'=>__('Last Name'), 'required']) !!}
</div>
@if ($errors->has('last_name')) @if ($errors->has('last_name'))
<label for="last_name" class="error text-danger small" style="display: block;">{{ $errors->first('last_name') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('last_name') }}
</div>
@endif @endif
</div> </div>
<div class="col-md-6"> <div class="form-group col-md-12">
<div class="form-group"> {!! Form::label('email', __('E-Mail Address').'*') !!}
{!! Form::label('email', __('E-Mail').'*') !!} {!! Form::email('email', '', ['class' => 'form-control '.($errors->has('email') ? 'error is-invalid' : ''), 'placeholder'=>__('E-Mail Address'), '']) !!}
{!! Form::email('email', null, ['class' => 'form-control '.($errors->has('email') ? 'error' : ''), 'placeholder'=>__('E-Mail'), 'required']) !!}
</div>
@if ($errors->has('email')) @if ($errors->has('email'))
<label for="last_name" class="error text-danger small" style="display: block;">{{ $errors->first('email') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('email') }}
</div>
@endif @endif
</div> </div>
<div class="col-md-6"> <div class="form-group col-md-12">
<div class="form-group">
{!! Form::label('phone', __('Phone')) !!} {!! Form::label('phone', __('Phone')) !!}
{!! Form::text('phone', null, ['class' => 'form-control', 'placeholder'=>__('Phone')]) !!} {!! Form::text('phone', null, ['class' => 'form-control', 'placeholder'=>__('Phone')]) !!}
</div>
</div> </div>
</div> </div>
<div class="row contact-row"> <div class="row contact-row">
<div class="col-md-12">
<div class="form-group">
{!! Form::label('subject', __('Betreff')) !!}
{!! Form::text('subject', null, ['class' => 'form-control', 'placeholder'=>__('Betreff')]) !!}
</div>
</div>
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group"> <div class="form-group">
{!! Form::label('message', __('Nachricht*')) !!} {!! Form::label('message', __('Nachricht*')) !!}
{!! Form::textarea('message', null, ['class' => 'form-control '.($errors->has('message') ? 'error' : ''), 'placeholder'=>__('Deine Nachticht'), 'required']) !!} {!! Form::textarea('message', null, ['class' => 'form-control '.($errors->has('message') ? 'error is-invalid' : ''), 'placeholder'=>__('Deine Nachticht an uns')]) !!}
@if ($errors->has('message')) @if ($errors->has('message'))
<label for="last_name" class="error text-danger small" style="display: block;">{{ $errors->first('message') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('message') }}
</div>
@endif @endif
</div> </div>
</div> </div>
@if(!$user_shop || $user_shop->id === 22)
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 10px;"> <div class="col-md-12">
<em class="small">* Pflichtpfelder</em> <div class="form-group mb-0">
{!! Form::label('sales_partnership', __('Betrifft Ihre Anfrage eine gewünschte Vertriebspartnerschaft?*')) !!}
</div>
</div> </div>
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 8px;"> <div class="col-md-12">
<div class="form-group my-0">
<label class="radio {{ ($errors->has('sales_partnership') ? 'error' : '') }}">
{!! Form::radio('sales_partnership', 'JA', '', ['class'=> 'form-control']) !!}
<i></i> JA
</label>
</div>
</div>
<div class="col-md-12">
<div class="form-group my-0">
<label class="radio {{ ($errors->has('sales_partnership') ? 'error' : '') }}">
{!! Form::radio('sales_partnership', 'NEIN', '', ['class'=> 'form-control']) !!}
<i></i> NEIN
</label>
@if ($errors->has('sales_partnership'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('sales_partnership') }}
</div>
@endif
</div>
</div>
<div class="col-md-12" id="show_sales_partnership_message" @if(old('sales_partnership') !== 'JA') style="display: none;" @endif>
<hr class="my-3">
<p class="mb-3">Wahrscheinlich bist Du durch einen unserer bestehenden Vertriebspartner auf uns aufmerksam geworden. Bitte verrate uns daher, wie Du auf MIVITA gekommen bist. Es genügt ein Name oder ein Hinweis auf einen bestehenden Vertriebspartner (z. B. eine Website, ein Facebook-, Instagram-, Youtubeprofil oder ähnliches):*</p>
<div class="form-group">
{!! Form::textarea('sales_partnership_message', null, ['class' => 'form-control '.($errors->has('sales_partnership_message') ? 'error is-invalid' : ''), 'placeholder'=>__('Wie bist du auf uns aufmerksam geworden?'), 'rows'=>4]) !!}
@if ($errors->has('sales_partnership_message'))
<div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('sales_partnership_message') }}
</div>
@endif
</div>
</div>
@endif
<div class="col-md-12">
<hr>
</div>
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 8px;">
<label class="checkbox {{ ($errors->has('accepted_data_protection') ? 'error' : '') }}" for="accepted_data_protection"> <label class="checkbox {{ ($errors->has('accepted_data_protection') ? 'error' : '') }}" for="accepted_data_protection">
{!! Form::checkbox('accepted_data_protection', 1, false, ['id'=>'accepted_data_protection', 'class' => 'form-control '.($errors->has('accepted_data_protection') ? 'error' : ''), 'required']) !!} {!! Form::checkbox('accepted_data_protection', 1, false, ['id'=>'accepted_data_protection', 'class' => 'form-control '.($errors->has('accepted_data_protection') ? 'error' : ''), '']) !!}
<i></i> <span class="fa fa-angle-double-left text-success fa-lg"></span> Hiermit willige ich in die im Rahmen der <a target="_blank" href="{{ url('datenschutz') }}">Datenschutzerklärung</a> <i></i> <span class="fa fa-angle-double-left text-success fa-lg"></span>
genannte Datenverarbeitung ein. {!! trans('register.reg_checked', ['link' => url('datenschutz')]) !!}
.*
</label> </label>
@if ($errors->has('accepted_data_protection')) @if ($errors->has('accepted_data_protection'))
<label for="accepted_data_protection" class="error text-danger small" style="display: block;">{{ $errors->first('accepted_data_protection') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
{{ $errors->first('accepted_data_protection') }}
</div>
@endif @endif
</div> </div>
</div> </div>
<div class="row contact-row"> <div class="row contact-row">
<div class="col-md-12"> <div class="col-md-12">
<div class="g-recaptcha" data-sitekey="{{$GOOGLE_ReCAPTCHA_KEY}}"></div> <div class="g-recaptcha" data-sitekey="{{$GOOGLE_ReCAPTCHA_KEY}}"></div>
@if ($errors->has('g-recaptcha-response')) @if ($errors->has('g-recaptcha-response'))
<label for="recaptcha" class="error text-danger small" style="display: block;">{{ $errors->first('g-recaptcha-response') }}</label> <div class="alert alert-danger error"><!-- DANGER -->
@endif {{ $errors->first('g-recaptcha-response') }}
</div>
@endif
</div>
</div> </div>
<button type="submit" class="btn btn-primary btn-text-500"><i class="fa fa-check"></i> Nachricht senden </button>
</div>
<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> Nachricht senden
</button>
{!! Form::close() !!} {!! Form::close() !!}
</div> <!-- end col --> </div> <!-- end col -->
<!-- /FORM --> <!-- /FORM -->
@ -168,8 +225,6 @@
<!-- INFO --> <!-- INFO -->
<div class="col-md-3 col-sm-4" style="border-left: 1px solid #ddd;"> <div class="col-md-3 col-sm-4" style="border-left: 1px solid #ddd;">
@if($user_shop) @if($user_shop)
<h2 class="text-center">Kontakt</h2> <h2 class="text-center">Kontakt</h2>
<p class="text-center">Ich freue mich über Deinen Besuch in meinem MIVITA Onlineshop. Ich bin Deine persönliche Beratung rund um die Produkte und ihrer Anwendung.</p> <p class="text-center">Ich freue mich über Deinen Besuch in meinem MIVITA Onlineshop. Ich bin Deine persönliche Beratung rund um die Produkte und ihrer Anwendung.</p>
@ -232,6 +287,21 @@
</section> </section>
<!-- / --> <!-- / -->
@endsection
@section('scripts')
@if(!$user_shop || $user_shop->id === 22)
<script>
$(document).ready(function () {
$('input[type=radio][name=sales_partnership]').change(function() {
if (this.value == 'JA') {
$('#show_sales_partnership_message').show('slow');
}
else if (this.value == 'NEIN') {
$('#show_sales_partnership_message').hide('slow');
}
});
});
</script>
@endif
@endsection @endsection

View file

@ -91,6 +91,9 @@
@if(isset($from_member_id)) @if(isset($from_member_id))
{!! Form::hidden('from_member_id', $from_member_id) !!} {!! Form::hidden('from_member_id', $from_member_id) !!}
@endif @endif
<div class="text-right" style="margin-bottom: 8px; margin-top: -16px;">
<em class="small">* {{trans('register.required_fields')}}</em>
</div>
<div class="row contact-row"> <div class="row contact-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
@ -166,15 +169,12 @@
</div> </div>
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 5px;">
<em class="small">* {{trans('register.required_fields')}}</em>
</div>
<div class="col-md-12" style="margin-bottom: 8px; margin-top: 8px;"> <div class="col-md-12" style="margin-bottom: 8px; margin-top: 8px;">
<label class="checkbox {{ ($errors->has('accepted_data_protection') ? 'error' : '') }}" for="accepted_data_protection"> <label class="checkbox {{ ($errors->has('accepted_data_protection') ? 'error' : '') }}" for="accepted_data_protection">
{!! Form::checkbox('accepted_data_protection', 1, false, ['id'=>'accepted_data_protection', 'class' => 'form-control '.($errors->has('accepted_data_protection') ? 'error' : ''), '']) !!} {!! Form::checkbox('accepted_data_protection', 1, false, ['id'=>'accepted_data_protection', 'class' => 'form-control '.($errors->has('accepted_data_protection') ? 'error' : ''), '']) !!}
<i></i> <span class="fa fa-angle-double-left text-success fa-lg"></span> <i></i> <span class="fa fa-angle-double-left text-success fa-lg"></span>
{!! trans('register.reg_checked', ['link' => url('datenschutz')]) !!} {!! trans('register.reg_checked', ['link' => url('datenschutz')]) !!}
.* .*
</label> </label>
@if ($errors->has('accepted_data_protection')) @if ($errors->has('accepted_data_protection'))
@ -197,7 +197,7 @@
</div> </div>
</div> </div>
--}} --}}
<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> jetzt registrieren</button> <button type="submit" class="btn btn-primary btn-text-500"><i class="fa fa-check"></i> jetzt registrieren</button>
{!! Form::close() !!} {!! Form::close() !!}
</div> <!-- end col --> </div> <!-- end col -->
<!-- /FORM --> <!-- /FORM -->

View file

@ -72,12 +72,12 @@
<script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script> <script type="text/javascript">var plugin_path = "{{ url('/assets/plugins/').'/' }}"</script>
<script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/jquery/jquery-2.2.3.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/js/scripts.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/js/scripts.js') }}"></script>
<!-- <script type="text/javascript" src="{{ asset('/assets/js/jquery.contact-form.js') }}"></script> --> {{-- <script type="text/javascript" src="{{ asset('/assets/js/jquery.contact-form.js') }}"></script> --}}
<!-- REVOLUTION SLIDER --> <!-- REVOLUTION SLIDER -->
<script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.tools.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.tools.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.revolution.min.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/plugins/slider.revolution/js/jquery.themepunch.revolution.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('/assets/js/view/demo.revolution_slider.js') }}"></script> <script type="text/javascript" src="{{ asset('/assets/js/view/demo.revolution_slider.js') }}"></script>
@yield('scripts')
<script> <script>
/** CHECKOUT /** CHECKOUT
** *********************** **/ ** *********************** **/
@ -136,6 +136,7 @@
</script> </script>
{{-- {{--
<script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script> <script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script>
<script> <script>

View file

@ -13,12 +13,12 @@
</h3> </h3>
@else @else
<h3> <h3>
Jetzt Kontakt aufnehmen: <a href="{{ Util::getUserCardBackUrl('/kontakt') }}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a> Jetzt Kontakt aufnehmen: <a href="{{ Util::getUserCardBackUrl('/kontakt') }}" rel="nofollow" class="btn btn-primary btn-lg btn-text-500">zum Kontakt</a>
</h3> </h3>
@endif @endif
@else @else
<h3> <h3>
Jetzt Kontakt aufnehmen: <a href="{{url('/kontakt')}}" rel="nofollow" class="btn btn-primary btn-lg">zum Kontakt</a> Jetzt Kontakt aufnehmen: <a href="{{url('/kontakt')}}" rel="nofollow" class="btn btn-primary btn-lg btn-text-500">zum Kontakt</a>
</h3> </h3>
@endif @endif
</div><!-- /left text --> </div><!-- /left text -->

View file

@ -237,13 +237,24 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
Route::get('/user/team/members', 'User\TeamController@members')->name('user_team_members'); Route::get('/user/team/members', 'User\TeamController@members')->name('user_team_members');
//user customers //user customers
Route::get('/user/customers/', 'User\CustomerController@index')->name('user_customers'); Route::get('/user/customers', 'User\CustomerController@index')->name('user_customers');
Route::get('/user/customer/detail/{id}', 'User\CustomerController@detail')->name('user_customer_detail'); Route::get('/user/customer/detail/{id}', 'User\CustomerController@detail')->name('user_customer_detail');
Route::get('/user/customer/edit/{id}', 'User\CustomerController@edit')->name('user_customer_edit'); Route::get('/user/customer/edit/{id}', 'User\CustomerController@edit')->name('user_customer_edit');
Route::get('/user/customer/add/{id}/{step?}', 'User\CustomerController@add')->name('user_customer_add'); Route::get('/user/customer/add/{id}/{step?}', 'User\CustomerController@add')->name('user_customer_add');
Route::post('/user/customer/edit/{id}', 'User\CustomerController@store')->name('user_customer_edit'); Route::post('/user/customer/edit/{id}', 'User\CustomerController@store')->name('user_customer_edit');
Route::get('/user/customer/datatable', 'User\CustomerController@getCustomers')->name('user_customer_datatable'); Route::get('/user/customer/datatable', 'User\CustomerController@getCustomers')->name('user_customer_datatable');
//user order & do order
Route::get('/user/orders', 'User\OrderController@index')->name('user_orders');
Route::get('/user/order/detail/{id}', 'User\OrderController@detail')->name('user_order_detail');
Route::get('/user/order/my/delivery/{for}/{id?}', 'User\OrderController@delivery')->name('user_order_my_delivery');
Route::post('/user/order/my/delivery/{for}/{id?}', 'User\OrderController@delivery')->name('user_order_my_delivery');
Route::post('/user/order/my/list/{for}/{id?}', 'User\OrderController@list')->name('user_order_my_list');
Route::get('/user/order/my/datatable', 'User\OrderController@datatable')->name('user_order_my_datatable');
//products images //products images
Route::post('/user/shop_on_site/upload/image', 'UserShopController@uploadOnSiteImage')->name('user_shop_on_site_upload_image'); Route::post('/user/shop_on_site/upload/image', 'UserShopController@uploadOnSiteImage')->name('user_shop_on_site_upload_image');
Route::get('/user/shop_on_site/{image_id}/{user_shop_id}', 'UserShopController@deleteOnSiteImage')->name('user_shop_on_site_delete_image'); Route::get('/user/shop_on_site/{image_id}/{user_shop_id}', 'UserShopController@deleteOnSiteImage')->name('user_shop_on_site_delete_image');
@ -360,6 +371,9 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
// Route::get('datatables/leads', 'DataTableController@getLeads')->name('datatables-leads'); // Route::get('datatables/leads', 'DataTableController@getLeads')->name('datatables-leads');
Route::get('data/table/users', 'DataTableController@getUsers')->name('data_table_users'); Route::get('data/table/users', 'DataTableController@getUsers')->name('data_table_users');
Route::get('/admin/payment_methods', 'PaymentMethodController@index')->name('admin_payment_methods');
Route::post('/admin/payment_method/store', 'PaymentMethodController@store')->name('admin_payment_method_store');
Route::get('/admin/countries', 'CountryController@index')->name('admin_countries'); Route::get('/admin/countries', 'CountryController@index')->name('admin_countries');
Route::get('/admin/country/edit/{id}', 'CountryController@edit')->name('admin_country_edit'); Route::get('/admin/country/edit/{id}', 'CountryController@edit')->name('admin_country_edit');
Route::post('/admin/country/store', 'CountryController@store')->name('admin_country_store'); Route::post('/admin/country/store', 'CountryController@store')->name('admin_country_store');
@ -383,12 +397,12 @@ Route::domain(config('app.pre_url_crm').config('app.domain').config('app.tld_car
Route::get('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrders')->name('sysadmin_tools_shopping_orders'); Route::get('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrders')->name('sysadmin_tools_shopping_orders');
Route::post('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrdersStore')->name('sysadmin_tools_shopping_orders'); Route::post('/sysadmin/tools/shopping_orders', 'SyS\AdminToolsController@shoppingOrdersStore')->name('sysadmin_tools_shopping_orders');
Route::get('/sysadmin/import', 'SyS\ImportController@import')->name('sysadmin_import'); Route::get('/sysadmin/import', 'SyS\ImportController@import')->name('sysadmin_import');
Route::post('/sysadmin/import/store', 'SyS\ImportController@importStore')->name('sysadmin_import_store'); Route::post('/sysadmin/import/store', 'SyS\ImportController@importStore')->name('sysadmin_import_store');
Route::get('/sysadmin/import/show/{type}/{filename}/{skip?}/{limit?}', 'SyS\ImportController@importShow')->name('sysadmin_import_show'); Route::get('/sysadmin/import/show/{type}/{filename}/{skip?}/{limit?}', 'SyS\ImportController@importShow')->name('sysadmin_import_show');
Route::get('/sysadmin/settings', 'SyS\SettingController@index')->name('sysadmin_settings');
Route::post('/sysadmin/tools/setting/store', 'SyS\SettingController@store')->name('sysadmin_setting_store');
}); });
}); });