first commit

This commit is contained in:
2024-10-25 14:16:28 +02:00
commit 925276dbb2
33795 changed files with 4780077 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
{#**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*#}
<div class="row justify-content-center">
<ul class="pagination mb-0">
{#** {{ renderhook('ManufacturerPagination') }} *#}
{% if renderhook('ManufacturerPagination') != '' %}
{% set producent = '&filter_column_manufacturer='~renderhook('ManufacturerPagination') %}
{% else %}
{% set producent = '' %}
{% endif %}
<li class="page-item {% if first_url %}{% else %}disabled{% endif %}">
<a class="page-link" {% if first_url %}href="{{ first_url }}"{% else %}nohref{% endif %}>1</a>
</li>
<li class="page-item previous {% if previous_url %}{% else %}disabled{% endif %}">
<a class="page-link" aria-label="Previous" {% if previous_url %}href="{{ previous_url }}{{ producent }}"{% else %}nohref{% endif %}><span class="sr-only">Previous</span></a>
</li>
<li class="page-item active">
<input name="paginator_jump_page" class="jump-to-page" type="text" value="{{ current_page }}" psurl="{{ jump_page_url }}{{ producent }}" psmax="{{ page_count }}" pslimit="{{ limit }}" />
</li>
<li class="page-item next {% if next_url is defined and next_url != false %}{% else %}disabled{% endif %}">
<a class="page-link" aria-label="Next" id="pagination_next_url" {% if next_url is defined and next_url != false %}href="{{ next_url }}{{ producent }}"{% else %}nohref{% endif %}><span class="sr-only">Next</span></a>
</li>
<li class="page-item {% if last_url is defined and last_url != false %}{% else %}disabled{% endif %}">
<a class="page-link" {% if last_url is defined and last_url != false %}href="{{ last_url }}{{ producent }}"{% else %}nohref{% endif %}>{{ page_count }}</a>
</li>
</ul>
<div class="mx-3">
<label class="col-form-label">
{{ "Viewing %from%-%to% on %total% (page %current_page% / %page_count%)"|trans({
'%from%': from+1,
'%to%': min(to+1, total),
'%total%': total,
'%current_page%': current_page,
'%page_count%': page_count
}, 'Admin.Catalog.Feature') }}
</label>
</div>
<div class="mx-3">
<div class="form-group row mb-0">
<label for="paginator_select_page_limit" class="col-form-label mr-2">{{ "Items per page:"|trans({}, 'Admin.Catalog.Feature') }}</label>
<div>
<select name="paginator_select_page_limit" id="paginator_select_page_limit" psurl="{{ changeLimitUrl }}{{ producent }}" class="pagination-link custom-select">
{% if limit not in limit_choices %}
<option value="{{ limit }}" selected="selected">{{ limit }}</option>
{% endif %}
{% for limit_choice in limit_choices %}
<option value="{{ limit_choice }}" {% if limit==limit_choice %}selected="selected"{% endif %}>{{ limit_choice }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,151 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
<div id="catalog-actions" class="col order-first">
<div class="row">
<div class="col">
{% block product_catalog_filter_by_categories %}
<div id="product_catalog_category_tree_filter" class="d-inline-block dropdown dropdown-clickable mr-2">
<button
class="btn btn-outline-secondary dropdown-toggle"
type="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
{{ 'Filter by categories'|trans({}, 'Admin.Actions') }}
{% if selected_category is defined and selected_category is not null %}
({{ selected_category.getName() }})
{% endif %}
</button>
<div id="tree-categories" class="dropdown-menu">
<div class="categories-tree-actions">
<a
href="#"
name="product_catalog_category_tree_filter_expand"
onclick="productCategoryFilterExpand($('div#product_catalog_category_tree_filter'), this);"
id="product_catalog_category_tree_filter_expand"
>
<i class="material-icons">expand_more</i>
{{ 'Expand'|trans({}, 'Admin.Actions') }}
</a>
<a
href="#"
name="product_catalog_category_tree_filter_collapse"
onclick="productCategoryFilterCollapse($('div#product_catalog_category_tree_filter'), this);"
id="product_catalog_category_tree_filter_collapse"
>
<i class="material-icons">expand_less</i>
{{ 'Collapse'|trans({}, 'Admin.Actions') }}
</a>
<a
href="#"
name="product_catalog_category_tree_filter_reset"
onclick="productCategoryFilterReset($('div#product_catalog_category_tree_filter'));"
id="product_catalog_category_tree_filter_reset"
>
<i class="material-icons">radio_button_unchecked</i>
{{ 'Unselect'|trans({}, 'Admin.Actions') }}
</a>
</div>
{{ form_widget(categories) }}
</div>
</div>
{% endblock %}
{% block product_catalog_filter_bulk_actions %}
<div
class="d-inline-block"
bulkurl="{{ path('admin_product_bulk_action', {'action': 'activate_all'}) }}"
massediturl="{{ path('admin_product_mass_edit_action', {'action': 'sort'}) }}"
redirecturl="{{ path('admin_product_catalog', {'limit': limit, 'offset': offset, 'sortOrder': sortOrder}) }}"
redirecturlnextpage="{{ path('admin_product_catalog', {'limit': limit, 'offset': offset+limit, 'sortOrder': sortOrder}) }}"
>
{% set buttons_action = [
{
"onclick": "bulkProductAction(this, 'activate_all');",
"icon": "radio_button_checked",
"label": "Activate selection"|trans({}, 'Admin.Actions')
}, {
"onclick": "bulkProductAction(this, 'deactivate_all');",
"icon": "radio_button_unchecked",
"label": "Deactivate selection"|trans({}, 'Admin.Actions')
}
] %}
{% set buttons_action = buttons_action|merge([
{
"divider": true
}, {
"onclick": "bulkProductAction(this, 'duplicate_all');",
"icon": "content_copy",
"label": "Duplicate selection"|trans({}, 'Admin.Actions')
}
]) %}
{% set buttons_action = buttons_action|merge([
{
"divider": true
}, {
"onclick": "bulkProductAction(this, 'delete_all');",
"icon": "delete",
"label": "Delete selection"|trans({}, 'Admin.Actions')
}
]) %}
{% include '@PrestaShop/Admin/Helpers/dropdown_menu.html.twig' with {
'div_style': "btn-group dropdown bulk-catalog",
'button_id': "product_bulk_menu",
'disabled': true,
'menu_label': "Bulk actions"|trans({}, 'Admin.Global'),
'buttonType': "outline-secondary",
'menu_icon': "icon-caret-up",
'items': buttons_action
} %}
</div>
{% endblock %}
</div>
</div>
{% block product_catalog_filter_select_all %}
<div class="row">
<div class="col">
<div class="md-checkbox">
<label>
<input
type="checkbox"
id="bulk_action_select_all"
onclick="$('#product_catalog_list').find('table td.checkbox-column input:checkbox').prop('checked', $(this).prop('checked')); updateBulkMenu();"
value=""
>
<i class="md-checkbox-control"></i>
{{ "Select all"|trans({}, 'Admin.Actions') }}
</label>
</div>
</div>
</div>
{% endblock %}
</div>

View File

@@ -0,0 +1,52 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
<div class="col-2 text-right">
<div class="dropdown">
<button class="btn btn-text dropdown-toggle tool-button"
id="catalog-tools-button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
title="{{ "Settings"|trans({}, 'Admin.Global') }}"
>
<span class="sr-only">{{ "Settings"|trans({}, 'Admin.Global') }}</span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="catalog-tools-button">
{{ renderhook('displayDashboardToolbarIcons', {}) }}
<a id="desc-product-export" class="dropdown-item" href="{{ path('admin_product_export_action') }}">
{{ "Export"|trans({}, 'Admin.Actions') }}
</a>
<a id="desc-product-import" class="dropdown-item" href="{{ import_link }}">
{{ "Import"|trans({}, 'Admin.Actions') }}
</a>
<a id="desc-product-show-sql" class="dropdown-item" href="javascript:void(0);" onclick="showLastSqlQuery();">
{{ "Show SQL query"|trans({}, 'Admin.Actions') }}
</a>
<a id="desc-product-sql-manager" class="dropdown-item" href="javascript:void(0);" onclick="sendLastSqlQuery(createSqlQueryName());">
{{ "Export to SQL Manager"|trans({}, 'Admin.Actions') }}
</a>
</div>
</div>
</div>

View File

@@ -0,0 +1,81 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
<form
name="product_catalog_list"
id="product_catalog_list"
method="post"
action="{{ path('admin_product_catalog', {'limit': limit, 'orderBy': orderBy, 'sortOrder': sortOrder}) }}"
orderingurl="{{ path('admin_product_catalog', {offset: 0, 'limit': 600, 'orderBy': 'position_ordering', 'sortOrder': sortOrder}) }}"
newproducturl="{{ path('admin_product_new') }}"
>
<div class="row">
<div class="col-md-12">
<input type="hidden" name="filter_category" value="{{ filter_category|default('') }}" />
</div>
</div>
<div class="row">
<div class="col-md-12">
{% block product_catalog_form_table %}
{{ include('@Product/CatalogPage/Lists/products_table.html.twig', {
'limit': limit,
'orderBy': orderBy,
'offset': offset,
'sortOrder': sortOrder,
'filter_category': filter_category,
'filter_column_id_product': filter_column_id_product,
'filter_column_name': filter_column_name,
'filter_column_reference': filter_column_reference,
'filter_column_ean13': filter_column_ean13,
'filter_column_trade_margin': filter_column_trade_margin,
'filter_column_name_category': filter_column_name_category,
'filter_column_manufacturer': filter_column_manufacturer,
'filter_column_price': filter_column_price,
'filter_column_sav_quantity': filter_column_sav_quantity,
'has_category_filter': has_category_filter,
'activate_drag_and_drop': activate_drag_and_drop,
'products': products,
'last_sql': last_sql
})
}}
{% endblock %}
</div>
</div>
{% if product_count_filtered > 20 %}
<div class="row">
<div class="col-md-12">
{{ render(controller('PrestaShopBundle:Admin\\Common:pagination', {
'limit': limit,
'offset': offset,
'total': product_count_filtered,
'caller_route': app.request.attributes.get('_route'),
'caller_parameters': pagination_parameters,
'limit_choices': pagination_limit_choices
})) }}
</div>
</div>
{% endif %}
</form>

View File

@@ -0,0 +1,174 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
<tbody
{% if activate_drag_and_drop %}class="sortable"{% endif %}
>
{% for product in products %}
{% block product_catalog_form_table_row %}
<tr data-uniturl="{{ product.unit_action_url|default('#') }}" data-product-id="{{ product.id_product }}">
<td class="checkbox-column form-group">
<div class="md-checkbox md-checkbox-inline">
<label>
<input type="checkbox" id="bulk_action_selected_products-{{ product.id_product }}" name="bulk_action_selected_products[]" value="{{ product.id_product }}">
<i class="md-checkbox-control"></i>
</label>
</div>
</td>
<td name="id-produktu">
<label name="" class="form-check-label" for="bulk_action_selected_products-{{ product.id_product }}">
{{ product.id_product }}
</label>
</td>
<td>
<a href="{{ product.url|default('') }}#tab-step1">{{ product.image|raw }}</a>
</td>
<td>
<a href="{{ product.url|default('') }}#tab-step1">{{ product.name|default('N/A'|trans({}, 'Admin.Global')) }}</a>
</td>
<td>
{{ product.reference|default('') }}
</td>
<td>
{{ product.ean13|default('') }}
</td>
<td>
{{ product.name_category|default('') }}
</td>
<td class="text-center">
{{ product.manufacturer }}
</td>
<td class="text-center">
{{ product.wholesale_price|number_format(2, ',', '.') }}
</td>
<td class="text-center">
<a href="{{ product.url|default('') }}#tab-step2">{{ product.price_final|default('N/A'|trans({}, 'Admin.Global')) }}</a>
</td>
{#<td class="text-center">
{{ product.price_final|number_format(2, ',', '.') - product.wholesale_price|number_format(2, ',', '.') }} zł
</td>
<td class="text-center">
{{ product.price_final|number_format() - product.wholesale_price|number_format() -1 * 100|number_format(2) }} %
</td>
#}
<td class="text-center">
{#% if product.wholesale_price|number_format(2, ',', '.') != '0,00' %}
{% set cenaSP = product.price_final|replace({'\xc2\xa0':'', 'zł': '', ',': '.'}) %}
{% set cenaZA = product.wholesale_price %}
{% set marza = (cenaSP - cenaZA) / cenaZA * 100 %}
{{ marza|round(2) }} %
{% else %}
-
{% endif %#}
{{ product.trade_margin|default }} %
</td>
{% if 'PS_STOCK_MANAGEMENT'|configuration %}
<td class="product-sav-quantity text-center" data-product-quantity-value="{{ product.sav_quantity|default('') }}">
<a href="{{ product.url|default('') }}#tab-step3">
{% if product.sav_quantity is defined and product.sav_quantity > 0 %}
{{ product.sav_quantity }}
{% else %}
{{ product.sav_quantity|default('N/A'|trans({}, 'Admin.Global')) }}
{% endif %}
</a>
</td>
{% else %}
<td></td>
{% endif %}
<td class="text-center">
{% if product.active|default(0) == 0 %}
<a href="#" onclick="unitProductAction(this, 'activate'); return false;">
<i class="material-icons action-disabled">clear</i>
</a>
{% else %}
<a href="#" onclick="unitProductAction(this, 'deactivate'); return false;">
<i class="material-icons action-enabled ">check</i>
</a>
{% endif %}
</td>
<td>
</td>
{% if product.position is defined %}
<td {% if activate_drag_and_drop %}class="placeholder"{% endif %} style="cursor: pointer; cursor: hand;">
{% if activate_drag_and_drop %}
<big><big>⇅</big></big>
{% endif %}
<span class="position">{{ product.position }}</span>
<input type="hidden" name="mass_edit_action_sorted_products[]" value="{{ product.id_product }}" />
<input type="hidden" name="mass_edit_action_sorted_positions[]" value="{{ product.position }}" />
</td>
{% endif %}
<td class="text-right">
<div class="btn-group-action">
{% set buttons_action = [
{
"href": product.preview_url|default('#'),
"target": "_blank",
"icon": "remove_red_eye",
"label": "Preview"|trans({}, 'Admin.Actions')
}
] %}
{% set buttons_action = buttons_action|merge([
{
"onclick": "unitProductAction(this, 'duplicate');",
"icon": "content_copy",
"label": "Duplicate"|trans({}, 'Admin.Actions')
}
]) %}
{% set buttons_action = buttons_action|merge([
{
"onclick": "unitProductAction(this, 'delete');",
"icon": "delete",
"label": "Delete"|trans({}, 'Admin.Actions')
}
]) %}
{% include '@Product/CatalogPage/Forms/form_edit_dropdown.html.twig' with {
'button_id': "product_list_id_" ~ product.id_product ~ "_menu",
'default_item': {
"href": product.url|default('#'),
"icon": "mode_edit"
},
'right': true,
'items': buttons_action
} %}
</div>
</td>
</tr>
{% endblock %}
{% else %}
<tr><td colspan="11">
{{ "There is no result for this search. Update your filters to view other products."|trans({}, 'Admin.Catalog.Notification') }}
</td></tr>
{% endfor %}

View File

@@ -0,0 +1,315 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
<div class="table-responsive">
<table
class="table product mt-3"
redirecturl="{{ path('admin_product_catalog', {
'limit': limit,
'offset': offset
})
}}"
>
<thead class="with-filters">
{% block product_catalog_form_table_header %}
<tr class="column-headers">
<th scope="col" style="width: 2rem"></th>
<th scope="col" style="width: 5rem">
{{ ps.sortable_column_header("ID"|trans({}, 'Admin.Global'), 'id_product', orderBy, sortOrder) }}
</th>
<th scope="col">
{{ "Image"|trans({}, 'Admin.Global') }}
</th>
<th scope="col">
{{ ps.sortable_column_header("Name"|trans({}, 'Admin.Global'), 'name', orderBy, sortOrder) }}
</th>
<th scope="col" style="width: 9%">
{{ ps.sortable_column_header("Reference"|trans({}, 'Admin.Global'), 'reference', orderBy, sortOrder) }}
</th>
<th scope="col" class="text-center" style="width: 9%">
{{ "Kod EAN"|trans({}, 'Admin.Catalog.Feature') }}
</th>
<th scope="col">
{{ ps.sortable_column_header("Category"|trans({}, 'Admin.Catalog.Feature'), 'name_category', orderBy, sortOrder) }}
</th>
<th scope="col" class="text-center" style="width: 9%">
{{ "Producent"|trans({}, 'Admin.Catalog.Feature') }}
</th>
<th scope="col" class="text-center" style="width: 9%">
{#{ "Cena zakupu"|trans({}, 'Admin.Catalog.Feature') }#}
{{ ps.sortable_column_header("Cena zakupu"|trans({}, 'Admin.Global'), 'wholesale_price', orderBy, sortOrder) }}
</th>
<th scope="col" class="text-center" style="width: 9%">
{{ ps.sortable_column_header("Price (tax incl.)"|trans({}, 'Admin.Catalog.Feature'), 'price', orderBy, sortOrder) }}
</th>
<th scope="col" class="text-center" style="width: 9%">
{#{ "Marża"|trans({}, 'Admin.Catalog.Feature') }#}
{{ ps.sortable_column_header("Marża"|trans({}, 'Admin.Catalog.Feature'), 'trade_margin', orderBy, sortOrder) }}
</th>
{% if 'PS_STOCK_MANAGEMENT'|configuration %}
<th scope="col" class="text-center" style="width: 9%">
{{ ps.sortable_column_header("Quantity"|trans({}, 'Admin.Catalog.Feature'), 'sav_quantity', orderBy, sortOrder) }}
</th>
{% else %}
<th></th>
{% endif %}
<th scope="col" class="text-center">
{{ ps.sortable_column_header("Status"|trans({}, 'Admin.Global'), 'active', orderBy, sortOrder) }}
</th>
{% if has_category_filter == true %}
<th scope="col">
{{ ps.sortable_column_header("Position"|trans({}, 'Admin.Global'), 'position', orderBy, sortOrder) }}
</th>
{% endif %}
<th>
</th>
<th scope="col" class="text-right" style="width: 3rem; padding-right: 2rem">
{{ "Actions"|trans({}, 'Admin.Global') }}
</th>
</tr>
{% endblock %}
{% block product_catalog_form_table_filters %}
{% set filters_disabled = activate_drag_and_drop %}
<tr class="column-filters">
<th colspan="2">
{#{% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with {
'input_name': "filter_column_id_product",
'min': '0',
'max': '1000000',
'minLabel': "Min"|trans({}, 'Admin.Global'),
'maxLabel': "Max"|trans({}, 'Admin.Global'),
'value': filter_column_id_product,
'disabled': filters_disabled,
} %}#}
<input
id="filter_column_id_product"
type="hidden"
name="filter_column_id_product"
value=""
/>
<script>
$("#product_catalog_list").submit(function(e){
e.preventDefault();
var IDProduct = $('input[name="id_product"]').val();
$('input[name="filter_column_id_product"]').val("BETWEEN " + IDProduct + " AND " + IDProduct);
});
$( document ).ready(function() {
var IDPr = '{{ filter_column_id_product }}';
if (IDPr != "BETWEEN AND "){
var IDProduktu = IDPr.substr(IDPr.indexOf("AND") + 4).replace('.000000', '')
$('input[name="id_product"]').val(IDProduktu);
}
});
</script>
<input
type="text"
class="form-control"
id="id_product"
placeholder="{{ "ID produktu"|trans({}, 'Admin.Catalog.Help') }}"
name="id_product"
value=""
/>
<div style="display: none;">
<input
type="text"
class="form-control"
id="filter_column_id_product"
placeholder="{{ "Search ID"|trans({}, 'Admin.Catalog.Help') }}"
name="filter_column_id_product"
value="{{ filter_column_id_product }}"
{% if filters_disabled %}disabled{% endif %}
/>
</div>
</th>
<th>&nbsp;</th>
<th>
<input
type="text"
class="form-control"
placeholder="{{ "Search name"|trans({}, 'Admin.Catalog.Help') }}"
name="filter_column_name"
value="{{ filter_column_name }}"
{% if filters_disabled %}disabled{% endif %}
/>
</th>
<th>
<input
type="text"
class="form-control"
placeholder="{{ "Search ref."|trans({}, 'Admin.Catalog.Help') }}"
name="filter_column_reference"
value="{{ filter_column_reference }}"
{% if filters_disabled %}disabled{% endif %}
/>
</th>
<th>
<input
type="text"
class="form-control"
placeholder="{{ "Kod EAN13"|trans({}, 'Admin.Catalog.Help') }}"
name="filter_column_ean13"
value="{{ filter_column_ean13 }}"
{% if filters_disabled %}disabled{% endif %}
/>
</th>
<th>
<input
type="text"
class="form-control"
placeholder="{{ "Kategoria"|trans({}, 'Admin.Catalog.Help') }}"
name="filter_column_name_category"
value="{{ filter_column_name_category }}"
{% if filters_disabled %}disabled{% endif %}
/>
</th>
<th>
{{ renderhook('displayAdminCatalogTwigProductFilter') }}
</th>
<th class="text-center">
{#{% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with {
'input_name': "filter_column_price",
'min': '0',
'max': '1000000',
'minLabel': "Min"|trans({}, 'Admin.Global'),
'maxLabel': "Max"|trans({}, 'Admin.Global'),
'value': filter_column_price,
'disabled': filters_disabled,
} %}#}
</th>
<th class="text-center">
{#{% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with {
'input_name': "filter_column_price",
'min': '0',
'max': '1000000',
'minLabel': "Min"|trans({}, 'Admin.Global'),
'maxLabel': "Max"|trans({}, 'Admin.Global'),
'value': filter_column_price,
'disabled': filters_disabled,
} %}#}
</th>
<th class="text-center">
{#{% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with {
'input_name': "filter_column_price",
'min': '0',
'max': '1000000',
'minLabel': "Min"|trans({}, 'Admin.Global'),
'maxLabel': "Max"|trans({}, 'Admin.Global'),
'value': filter_column_price,
'disabled': filters_disabled,
} %}#}
</th>
{% if 'PS_STOCK_MANAGEMENT'|configuration %}
<th class="text-center">
{% include '@PrestaShop/Admin/Helpers/range_inputs.html.twig' with {
'input_name': "filter_column_sav_quantity",
'min': '-1000000',
'max': '1000000',
'minLabel': "Min"|trans({}, 'Admin.Global'),
'maxLabel': "Max"|trans({}, 'Admin.Global'),
'value': filter_column_sav_quantity,
'disabled': filters_disabled,
} %}
</th>
{% else %}
<th></th>
{% endif %}
<th id="product_filter_column_active" class="text-center">
<div class="form-select">
<select class="custom-select" name="filter_column_active" {% if filters_disabled %}disabled{% endif %}>
<option value=""></option>
<option value="1" {% if (filter_column_active is defined) and filter_column_active == '1' %}selected="selected"{% endif %}>Active</option>
<option value="0" {% if (filter_column_active is defined) and filter_column_active == '0' %}selected="selected"{% endif %}>Inactive</option>
</select>
</div>
</th>
{% if has_category_filter == true %}
{<th>
{% if not(activate_drag_and_drop) %}
<input type="button" class="btn btn-outline-secondary" name="products_filter_position_asc" value="{{ "Reorder"|trans({}, 'Admin.Actions') }}" onclick="productOrderPrioritiesTable();" />
{% else %}
<input type="button" id="bulk_edition_save_keep" class="btn" onclick="bulkProductAction(this, 'edition');" value="{{ "Save & refresh"|trans({}, 'Admin.Actions')|raw }}" />
{% endif %}
</th>}
<th></th>
{% endif %}
<th class="text-right" style="width: 5rem">
<button
type="submit"
class="btn btn-primary"
name="products_filter_submit"
title="{{ "Search"|trans({}, 'Admin.Actions') }}"
>
<i class="material-icons">search</i>
{{ "Search"|trans({}, 'Admin.Actions') }}
</button>
<button
type="reset"
class="btn btn-link"
name="products_filter_reset"
onclick="productColumnFilterReset($(this).closest('tr.column-filters'))"
title="{{ "Reset"|trans({}, 'Admin.Actions') }}"
>
<i class="material-icons">clear</i>
{{ "Reset"|trans({}, 'Admin.Actions') }}
</button>
</th>
</tr>
{% endblock %}
</thead>
{% block product_catalog_form_table_items %}
{{ render(controller('PrestaShopBundle\\Controller\\Admin\\ProductController::listAction', {
'limit': limit,
'offset': offset,
'orderBy': orderBy,
'sortOrder': sortOrder,
'products': products,
'zzzzzzzz': '123'
})) }}
{% endblock %}
</table>
</div>

View File

@@ -0,0 +1,231 @@
{#**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*#}
{% extends '@PrestaShop/Admin/layout.html.twig' %}
{% form_theme categories '@PrestaShop/Admin/Product/Themes/categories_theme.html.twig' %}
{% block javascripts %}
{{ parent() }}
<script src="{{ asset('themes/default/js/bundle/product/catalog.js') }}"></script>
<script src="{{ asset('../../../modules/addcolumninlist/views/js/pagination.js') }}"></script>
<script src="{{ asset('themes/default/js/bundle/category-tree.js') }}"></script>
<script src="{{ asset('js/jquery/ui/jquery.ui.sortable.min.js') }}"></script>
<script src="{{ asset('themes/new-theme/public/catalog.bundle.js') }}"></script>
{% endblock %}
{% block content %}
<div class="products-catalog">
{{ renderhook('legacy_block_kpi', {'kpi_controller': 'AdminProductsController'}) }}
<div class="content container-fluid">
{% if permission_error|length %}
<div class="row">
<div class="col-md-12">
<div class="alert alert-danger" role="alert">
<button type="button" class="close" data-dismiss="alert">
<span aria-hidden="true"><i class="material-icons">close</i></span>
</button>
<p class="alert-text">
{{ permission_error }}
</p>
</div>
</div>
</div>
{% endif %}
<div class="row align-items-start">
{% block product_catalog_tools %}
{{ include('@Product/CatalogPage/Blocks/tools.html.twig', {'import_link': import_link }) }}
{% endblock %}
{% block product_catalog_filters %}
{{ include('@Product/CatalogPage/Blocks/filters.html.twig', {
'limit': limit,
'offset': offset,
'orderBy': orderBy,
'sortOrder': sortOrder
})
}}
{% endblock %}
</div>
{% block product_catalog_form %}
{{ include('@Product/CatalogPage/Forms/form_products.html.twig', {
'limit': limit,
'orderBy': orderBy,
'offset': offset,
'sortOrder': sortOrder,
'filter_category': filter_category,
'filter_column_id_product': filter_column_id_product,
'filter_column_name': filter_column_name,
'filter_column_reference': filter_column_reference,
'filter_column_ean13': filter_column_ean13,
'filter_column_trade_margin': filter_column_trade_margin,
'filter_column_name_category': filter_column_name_category,
'filter_column_manufacturer': filter_column_manufacturer,
'filter_column_price': filter_column_price,
'filter_column_sav_quantity': filter_column_sav_quantity,
'filter_column_active':filter_column_active,
'has_category_filter': has_category_filter,
'activate_drag_and_drop': activate_drag_and_drop,
'products': products,
'last_sql': last_sql
})
}}
{% endblock %}
</div>
</div>
{# Duplication product modal #}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_duplicate_all_modal",
'title': "Duplicating products"|trans({}, 'Admin.Catalog.Notification'),
'closable': true,
'progressbar': {
'id': "catalog_duplicate_all_progression",
'label': "Duplicating..."|trans({}, 'Admin.Catalog.Notification')
},
'actions': [],
}%}
{% block content %}
<div class="modal-body">
{{ 'Duplication in progress...'|trans({}, 'Admin.Catalog.Notification') }}
<span id="catalog_duplicate_all_failure" style="display: none;color: darkred;">
{{ 'Duplication failed.'|trans({}, 'Admin.Catalog.Notification') }}
</span>
</div>
{% endblock %}
{% endembed %}
{# Activation product modal #}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_activate_all_modal",
'title': "Activating products"|trans({}, 'Admin.Catalog.Notification'),
'closable': true,
'progressbar': {
'id': "catalog_activate_all_progression",
'label': "Activating..."|trans({}, 'Admin.Catalog.Notification')
},
'actions': [],
}%}
{% block content %}
<div class="modal-body">
{{ 'Activation in progress...'|trans({}, 'Admin.Catalog.Notification') }}
<span id="catalog_activate_all_failure" style="display: none;color: darkred;">
{{ 'Activation failed.'|trans({}, 'Admin.Catalog.Notification') }}
</span>
</div>
{% endblock %}
{% endembed %}
{# Desactivation product modal #}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_deactivate_all_modal",
'title': "Deactivating products"|trans({}, 'Admin.Catalog.Notification'),
'closable': true,
'progressbar': {
'id': "catalog_deactivate_all_progression",
'label': "Deactivating..."|trans({}, 'Admin.Catalog.Notification')
},
'actions': [],
}%}
{% block content %}
<div class="modal-body">
{{ 'Deactivation in progress...'|trans({}, 'Admin.Catalog.Notification') }}
<span id="catalog_deactivate_all_failure" style="display: none;color: darkred;">
{{ 'Deactivation failed.'|trans({}, 'Admin.Catalog.Notification') }}
</span>
</div>
{% endblock %}
{% endembed %}
{# Deletion product modal #}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_delete_all_modal",
'title': "Deleting products"|trans({}, 'Admin.Catalog.Notification'),
'closable': true,
'progressbar': {
'id': "catalog_delete_all_progression",
'label': "Deleting..."|trans({}, 'Admin.Catalog.Notification')
},
'actions': [],
}%}
{% block content %}
<div class="modal-body">
{{ 'Deletion in progress...'|trans({}, 'Admin.Catalog.Notification') }}
<span id="catalog_delete_all_failure" style="display: none;color: darkred;">
{{ 'Deletion failed.'|trans({}, 'Admin.Catalog.Notification') }}
</span>
</div>
{% endblock %}
{% endembed %}
{# Confirmation deletion product modal #}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_deletion_modal",
'title': "Delete products?"|trans({}, 'Admin.Catalog.Feature'),
'closable': true,
'actions': [{
'type': 'button',
'label': "Delete now"|trans({}, 'Admin.Actions'),
'value': 'confirm',
'class': 'btn btn-primary btn-lg',
}],
}%}
{% block content %}
<div class="modal-body">
{{ 'These products will be deleted for good. Please confirm.'|trans({}, 'Admin.Catalog.Feature') }}
</div>
{% endblock %}
{% endembed %}
{% embed '@PrestaShop/Admin/Helpers/bootstrap_popup.html.twig' with {
'id': "catalog_sql_query_modal",
'title': "SQL query"|trans({}, 'Admin.Global'),
'closable': true,
'actions': [{
'type': 'button',
'label': "Export to SQL Manager"|trans({}, 'Admin.Actions'),
'value': 'sql_manager',
'class': 'btn btn-primary btn-lg',
}],
} %}
{% block content %}
<form method="post" action="{{ sql_manager_add_link }}" id="catalog_sql_query_modal_content">
<div class="modal-body">
<textarea name="sql" rows="20" cols="65"></textarea>
<input type="hidden" name="name" value="" />
</div>
</form>
{% endblock %}
{% endembed %}
{% endblock %}