add empik module
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<a href="{$url_export_offers}" class="btn btn-primary js-empik-offers-export">
|
||||
<i class="icon-send"></i>
|
||||
{l s='Export offers' mod='empikmarketplace'}
|
||||
</a>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,4 @@
|
||||
<a href="{$url_manage_price}" class="btn btn-primary">
|
||||
<i class="icon-dollar"></i>
|
||||
{l s='Manage dedicated EmpikPlace prices' mod='empikmarketplace'}
|
||||
</a>
|
||||
@@ -0,0 +1,39 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Empik Marketplace carrier' mod='empikmarketplace'}</th>
|
||||
<th>{l s='Shop carrier' mod='empikmarketplace'}</th>
|
||||
<th>{l s='Carrier type' mod='empikmarketplace'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$empik_shipping_types item=empik_shipping_type}
|
||||
<tr>
|
||||
<td><b>{$empik_shipping_type.label}</b> ({$empik_shipping_type.code})</td>
|
||||
<td>
|
||||
<select name="carrier[{$empik_shipping_type.code}][id_carrier]">
|
||||
{foreach from=$shop_carriers item=shop_carrier}
|
||||
<option
|
||||
value="{$shop_carrier.id_carrier}"
|
||||
{if $map[$empik_shipping_type.code].id_carrier|default == $shop_carrier.id_carrier} selected{/if}>
|
||||
{$shop_carrier.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="carrier[{$empik_shipping_type.code}][type]">
|
||||
{foreach from=$empik_carriers item=empik_carrier}
|
||||
<option
|
||||
value="{$empik_carrier.code}"
|
||||
{if $map[$empik_shipping_type.code].type|default == $empik_carrier.code} selected{/if}
|
||||
>
|
||||
{$empik_carrier.label}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,40 @@
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Empik Marketplace carrier' mod='empikmarketplace'}</th>
|
||||
<th>{l s='Shop carrier' mod='empikmarketplace'}</th>
|
||||
<th>{l s='Carrier type' mod='empikmarketplace'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach from=$empik_shipping_types item=empik_shipping_type}
|
||||
<tr>
|
||||
<td><b>{$empik_shipping_type.label}</b> ({$empik_shipping_type.code})</td>
|
||||
<td>
|
||||
<select name="carrier[{$empik_shipping_type.code}][id_carrier]">
|
||||
{foreach from=$shop_carriers item=shop_carrier}
|
||||
<option
|
||||
value="{$shop_carrier.id_carrier}"
|
||||
{if $map[$empik_shipping_type.code].id_carrier|default == $shop_carrier.id_carrier} selected{/if}
|
||||
>
|
||||
{$shop_carrier.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="carrier[{$empik_shipping_type.code}][type]">
|
||||
{foreach from=$empik_carriers item=empik_carrier}
|
||||
<option
|
||||
value="{$empik_carrier.code}"
|
||||
{if $map[$empik_shipping_type.code].type|default == $empik_carrier.code} selected{/if}
|
||||
>
|
||||
{$empik_carrier.label}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,3 @@
|
||||
<button id="configuration_form_submit_btn" type="submit" href="{$url_test_connection}" class="btn btn-primary">
|
||||
{l s='Zapisz' mod='empikmarketplace'}
|
||||
</button>
|
||||
@@ -0,0 +1,3 @@
|
||||
<a href="{$url_test_connection}" class="btn btn-primary pull-right">
|
||||
{l s='Przetestuj połączenie' mod='empikmarketplace'}
|
||||
</a>
|
||||
87
modules/empikmarketplace/views/templates/admin/help.tpl
Normal file
87
modules/empikmarketplace/views/templates/admin/help.tpl
Normal file
@@ -0,0 +1,87 @@
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-question"></i> {l s='Help' mod='empikmarketplace'}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2>{l s='Funkcje:' mod='empikmarketplace'}</h2>
|
||||
<hr>
|
||||
<ul>
|
||||
<li>{l s='Dwustronne połączenie API PrestaShop - EmpikPlace' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Wybór środowiska pracy: produkcyjne/testowe' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Wystawianie produktów' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Wystawianie ofert' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Zarządzanie ofertami' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Synchronizację stanów magazynowych' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Synchronizację cen i cen promocyjnych' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Akceptację i pobieranie zamówień' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Przekazywanie numerów przesyłek' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Mapowanie statusów zamówień' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Mapowanie form dostaw' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Zmianę statusów zamówień' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Oraz wiele innych funkcjonalności' mod='empikmarketplace'}</li>
|
||||
</ul>
|
||||
<h2>{l s='Interwały wymiany informacji:' mod='empikmarketplace'}</h2>
|
||||
<hr>
|
||||
<ul>
|
||||
<li>{l s='Akceptowanie i pobieranie zamówień - zgodnie z ustawieniami CRON' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Synchronizację stanów i cen magazynowych - zgodnie z ustawieniami CRON' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Zmiana statusu zamówienia oraz dodanie listu przewozowego - bezzwłocznie po zmianie statusu w PrestaShop' mod='empikmarketplace'}</li>
|
||||
<li>{l s='Jednorazowe wystawianie produktów / ofert - bezzwłocznie po wykonaniu akcji' mod='empikmarketplace'}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<h2>{l s='Empik Marketplace' mod='empikmarketplace'}</h2>
|
||||
<hr>
|
||||
<p class="text-center">
|
||||
<a href="{$url_docs}" class="btn btn-info">
|
||||
<i class="icon-file-text"></i>
|
||||
{l s='Instrukcja modułu' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_help}" class="btn btn-link">
|
||||
{l s='Kontakt' mod='empikmarketplace'} →
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>{l s='Film instruktażowy:' mod='empikmarketplace'}</h2>
|
||||
<hr>
|
||||
<div>
|
||||
<iframe
|
||||
style="aspect-ratio: 16 / 9; width: 100%; height: auto;"
|
||||
width="853"
|
||||
height="505"
|
||||
src="https://www.youtube.com/embed/PTYK2ur9zL8"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-time"></i> {l s='CRON jobs' mod='empikmarketplace'}
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<h4>{l s='Update offers' mod='empikmarketplace'}</h4>
|
||||
<pre>{$cron_jobs.exportOffers}</pre>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<h4>{l s='Import orders' mod='empikmarketplace'}</h4>
|
||||
<pre>{$cron_jobs.importOrders}</pre>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<h4>{l s='Export products' mod='empikmarketplace'}</h4>
|
||||
<pre>{$cron_jobs.exportProducts}</pre>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="panel card">
|
||||
<div class="panel-heading card-header">
|
||||
{l s='Empik marketplace' mod='empikmarketplace'}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>{l s='Order reference' mod='empikmarketplace'}: <b>{$empik_order.empik_order_reference}</b></p>
|
||||
<p>{l s='Empik payment' mod='empikmarketplace'}: <b>{$empik_order.empik_payment}</b></p>
|
||||
<p>{l s='Empik carrier' mod='empikmarketplace'}: <b>{$empik_order.empik_carrier}</b></p>
|
||||
|
||||
{if $empik_order.empik_pickup_point}
|
||||
<p>{l s='Pickup point' mod='empikmarketplace'}: <b>{$empik_order.empik_pickup_point}</b></p>
|
||||
{/if}
|
||||
{if $empik_order.empik_vat_number}
|
||||
<p>{l s='VAT number' mod='empikmarketplace'}: <b>{$empik_order.empik_vat_number}</b></p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
11
modules/empikmarketplace/views/templates/admin/index.php
Normal file
11
modules/empikmarketplace/views/templates/admin/index.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../');
|
||||
exit;
|
||||
@@ -0,0 +1,6 @@
|
||||
<a class="btn btn-link list-action--download"
|
||||
href="{$href|escape:'html':'UTF-8'}"
|
||||
title="{l s='Download' mod='empikmarketplace'}"
|
||||
>
|
||||
<i class="icon-download"></i>
|
||||
</a>
|
||||
@@ -0,0 +1,27 @@
|
||||
{if !empty($combinations)}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#empik-product-price-modal-{$id_product}">
|
||||
{l s='Attributes' mod='empikmarketplace'}
|
||||
</button>
|
||||
<div class="modal fade" id="empik-product-price-modal-{$id_product}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
{foreach $combinations as $combinationsId => $combination}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="text-left" style="width: 50%">{$combination.attributes_list}</td>
|
||||
<td class="text-left">
|
||||
<input type="text" class="js-empik-price-input" data-product-id="{$id_product}" data-product-attribute-id="{$combinationsId}" data-action="savePrice" value="{$combination.offer_price}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="empik-edit-price-wrapper">
|
||||
<input type="text" class="js-empik-price-input" data-product-id="{$id_product}" data-product-attribute-id="0" data-action="savePrice" value="{$value}">
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,27 @@
|
||||
{if !empty($combinations)}
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#empik-product-price-reduced-modal-{$id_product}">
|
||||
{l s='Attributes' mod='empikmarketplace'}
|
||||
</button>
|
||||
<div class="modal fade" id="empik-product-price-reduced-modal-{$id_product}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
{foreach $combinations as $combinationsId => $combination}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="text-left" style="width: 50%">{$combination.attributes_list}</td>
|
||||
<td class="text-left">
|
||||
<input type="text" class="js-empik-price-input" data-product-id="{$id_product}" data-product-attribute-id="{$combinationsId}" data-action="saveReducedPrice" value="{$combination.offer_price_reduced}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="empik-edit-price-wrapper">
|
||||
<input type="text" class="js-empik-price-input" data-product-id="{$id_product}" data-product-attribute-id="0" data-action="saveReducedPrice" value="{$value}">
|
||||
</div>
|
||||
{/if}
|
||||
@@ -0,0 +1,10 @@
|
||||
<a class="btn btn-{if !$enabled}warning{else}success{/if} list-action--enable"
|
||||
href="{$href|escape:'html':'UTF-8'}"
|
||||
title="{if $enabled}{l s='Enabled' mod='empikmarketplace'}{else}{l s='Disabled' mod='empikmarketplace'}{/if}"
|
||||
>
|
||||
{if $enabled}
|
||||
{l s='Enabled' mod='empikmarketplace'}
|
||||
{else}
|
||||
{l s='Disabled' mod='empikmarketplace'}
|
||||
{/if}
|
||||
</a>
|
||||
@@ -0,0 +1,10 @@
|
||||
<a class="btn btn-{if !$displayOriginal}warning{else}success{/if} list-action--original"
|
||||
href="{$urlChange|escape:'html':'UTF-8'}"
|
||||
title="{if $displayOriginal}{l s='Yes' mod='empikmarketplace'}{else}{l s='No' mod='empikmarketplace'}{/if}"
|
||||
>
|
||||
{if $displayOriginal}
|
||||
{l s='Yes' mod='empikmarketplace'}
|
||||
{else}
|
||||
{l s='No' mod='empikmarketplace'}
|
||||
{/if}
|
||||
</a>
|
||||
@@ -0,0 +1,19 @@
|
||||
{$tree}
|
||||
|
||||
<script>
|
||||
$('input[name="category_filter"]').change(function () {
|
||||
var url = new URL(window.location.href);
|
||||
url.searchParams.set('id_category', $(this).val());
|
||||
url.searchParams.set('submitFilterproduct', '0');
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
$('input[name="category_filter"]').click(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
var url = new URL(window.location.href);
|
||||
url.searchParams.set('id_category', '0');
|
||||
url.searchParams.set('submitFilterproduct', '0');
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
50
modules/empikmarketplace/views/templates/admin/products.tpl
Normal file
50
modules/empikmarketplace/views/templates/admin/products.tpl
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<i class="icon-gear"></i> {l s='Actions' mod='empikmarketplace'}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{if $api_authenticated}
|
||||
<p class="text-center">
|
||||
<a href="{$url_export_products}" class="btn btn-info js-empik-products-export">
|
||||
<i class="icon-send"></i>
|
||||
{l s='Send single import' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_docs}" class="btn btn-link">
|
||||
<i class="icon-info"></i>
|
||||
{l s='See how to select products, wich have to be send to Empik Marketplace' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_docs}" class="btn btn-link">
|
||||
<i class="icon-info"></i>
|
||||
{l s='After product import you must use mapping wizard in EmpikPlace.' mod='empikmarketplace'}
|
||||
<p class="text-center" style="margin-top:-22px;">{l s='You can see how to do in in our instructional video and in module documentation.' mod='empikmarketplace'}</p>
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_products_csv}" {if !$url_products_csv}disabled{/if} class="btn btn-info">
|
||||
<i class="icon-download"></i>
|
||||
{l s='Download last products file' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_include_all}" class="btn btn-info">
|
||||
<i class="icon-plus"></i>
|
||||
{l s='Add all products to Empik Marketplace' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
<p class="text-center">
|
||||
<a href="{$url_exclude_all}" class="btn btn-info">
|
||||
<i class="icon-trash"></i>
|
||||
{l s='Remove all products from Empik Marketplace' mod='empikmarketplace'}
|
||||
</a>
|
||||
</p>
|
||||
{else}
|
||||
<div class="alert alert-warning">{l s='Before perform any action, authenticate to Empik Marketplace API in "Connection" tab.' mod='empikmarketplace'}</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user