mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
onlineshops added tab artikelliste
This commit is contained in:
parent
e2fc1e15e8
commit
245e2d1545
51
www/pages/content/shopexport_artikellist.tpl
Normal file
51
www/pages/content/shopexport_artikellist.tpl
Normal file
@ -0,0 +1,51 @@
|
||||
<!-- gehort zu tabview -->
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">[TABTEXT]</a></li>
|
||||
</ul>
|
||||
<!-- ende gehort zu tabview -->
|
||||
|
||||
<!-- erstes tab -->
|
||||
<div id="tabs-1">
|
||||
<form action="" method="post">
|
||||
[MESSAGE]
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-10 col-md-height">
|
||||
<div class="inside_white inside-full-height">
|
||||
<fieldset class="white">
|
||||
<legend></legend>
|
||||
[TAB1]
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<table>
|
||||
<legend>Stapelverarbeitung</legend>
|
||||
<tr>
|
||||
<td><input type="checkbox" value="1" id="autoalle" /> alle markieren </td><td><input type="submit" class="btnBlue" name="delcacheselected" value="{|Lagerzahlencache zurücksetzen|}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-2 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Aktionen|}</legend>
|
||||
<input type="submit" class="btnBlueNew" value="{|Lagerzahlencache gesamt zurücksetzen|}" name="delcache"><br
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- tab view schließen -->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$('#autoalle').on('change',function(){
|
||||
var wert = $(this).prop('checked');
|
||||
$('#shopexport_artikellist').find('input[type="checkbox"]').prop('checked',wert);
|
||||
$('#shopexport_artikellist').find('input[type="checkbox"]').first().trigger('change');
|
||||
});
|
||||
|
||||
</script>
|
@ -40,8 +40,8 @@
|
||||
<fieldset>
|
||||
<legend>{|Aktionen|}</legend>
|
||||
|
||||
<input type="submit" class="btnBlueNew" value="{|Lagerzahlcache zurücksetzen|}" name="delcache"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Lagerzahlcache für Shopartikel mit Menge 0 zurücksetzen|}" name="delzerostockcache"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Lagerzahlencache zurücksetzen|}" name="delcache"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Lagerzahlencache für Shopartikel mit Menge 0 zurücksetzen|}" name="delzerostockcache"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Artikelcache zurücksetzen|}" name="delarticlecache"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Alle Artikel laden|}" name="alle" onclick="if(!confirm('{|Wollen Sie wirklich alle Artikel an den Shop übertragen? Eventuell werden hier auch Artikeltexte, Preise, Bilder, Eigenschaften, Kategorien, etc. übertragen und überschrieben. Bitte prüfen Sie das Verhalten vorher an einigen Artikel. Bitte nehmen Sie in jedemfall vorab eine Sicherung im Shop vor.|}')) return false;"><br>
|
||||
<input type="submit" class="btnBlueNew" value="{|Alle geänderten Artikel laden|}" name="allchanged" onclick="if(!confirm('{|Wollen Sie wirklich alle Artikel an den Shop übertragen? Eventuell werden hier auch Artikeltexte, Preise, Bilder, Eigenschaften, Kategorien, etc. übertragen und überschrieben. Bitte prüfen Sie das Verhalten vorher an einigen Artikel. Bitte nehmen Sie in jedemfall vorab eine Sicherung im Shop vor.|}')) return false;"><br>
|
||||
|
@ -147,6 +147,48 @@ class Onlineshops extends GenShopexport {
|
||||
$where = " s.shopid = '$id' AND g.aktiv = 1";
|
||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"#\" onclick=kundengruppenEdit(%value%)>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>" . " " . "<a href=\"#\" onclick=DeleteDialog(\"index.php?module=onlineshops&action=kundengruppendelete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . " </td></tr></table>";
|
||||
break;
|
||||
case 'shopexport_artikellist':
|
||||
|
||||
$id = $app->Secure->GetGET('id');
|
||||
$allowed['onlineshops'] = array('artikellist');
|
||||
$heading = array('', '', 'Artikel-Nr.','Artikel','Aktiv','Lagersync','Einstellungen aus Artikel','Letzte Artikelübertragung','Letzter Lagersync','Lagercache','Menü');
|
||||
$width = array( '1%','1%', '5%', '40%', '1%', '1%', '1%', '7%', '7%', '1%', '1%');
|
||||
$findcols = array('a.id','a.id','a.nummer','a.name_de','aos.aktiv','a.autolagerlampe','aos.ausartikel','last_article_transfer','aos.last_storage_transfer','a.cache_lagerplatzinhaltmenge');
|
||||
$searchsql = array('a.nummer','a.name_de');
|
||||
|
||||
$defaultorder = 1; //Optional wenn andere Reihenfolge gewuenscht
|
||||
$defaultorderdesc = 0;
|
||||
|
||||
$dropnbox = "'<img src=./themes/new/images/details_open.png class=details>' AS `open`, CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`";
|
||||
|
||||
$sql = "
|
||||
SELECT SQL_CALC_FOUND_ROWS
|
||||
a.id,".
|
||||
$dropnbox.",
|
||||
a.nummer,
|
||||
a.name_de,
|
||||
aos.aktiv,
|
||||
a.autolagerlampe,
|
||||
aos.ausartikel,".
|
||||
$app->erp->FormatDateTime('aos.last_article_transfer').",".
|
||||
$app->erp->FormatDateTime('aos.last_storage_transfer').",
|
||||
if(a.cache_lagerplatzinhaltmenge = -999,'',a.cache_lagerplatzinhaltmenge) cache,
|
||||
a.id
|
||||
FROM
|
||||
artikel a
|
||||
INNER JOIN artikel_onlineshops aos ON
|
||||
a.id = aos.artikel
|
||||
INNER JOIN shopexport s ON
|
||||
s.id = aos.shop
|
||||
";
|
||||
$where = " s.id = '$id'";
|
||||
|
||||
$menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"index.php?module=artikel&action=edit&id=%value%#tabs-4\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a></td></tr></table>";
|
||||
// $menu = "<table cellpadding=0 cellspacing=0><tr><td nowrap>" . "<a href=\"#\" onclick=kundengruppenEdit(%value%)>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/edit.svg\" border=\"0\"></a>" . " " . "<a href=\"#\" onclick=DeleteDialog(\"index.php?module=onlineshops&action=kundengruppendelete&id=%value%\");>" . "<img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a>" . " </td></tr></table>";
|
||||
|
||||
$orderby = null;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$erg = [];
|
||||
@ -216,6 +258,8 @@ class Onlineshops extends GenShopexport {
|
||||
$this->app->ActionHandler('itemlink', 'ShopexportItemlink');
|
||||
$this->app->ActionHandler('orderlink', 'ShopexportOrderlink');
|
||||
|
||||
$this->app->ActionHandler('artikellist', 'ShopexportArtikelList');
|
||||
|
||||
$this->app->erp->Headlines('Shopexport');
|
||||
$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
@ -2790,6 +2834,46 @@ class Onlineshops extends GenShopexport {
|
||||
parent::ShopexportList();
|
||||
}
|
||||
|
||||
public function ShopexportArtikelList()
|
||||
{
|
||||
|
||||
// Copied from shopexport (dirty)
|
||||
$id = (int)$this->app->Secure->GetGET('id');
|
||||
$delcache = $this->app->Secure->GetPOST('delcache');
|
||||
$delcacheselected = $this->app->Secure->GetPOST('delcacheselected');
|
||||
|
||||
// Process multi action
|
||||
$where = "1";
|
||||
$auswahl = $this->app->Secure->GetPOST('auswahl');
|
||||
$selectedIds = [];
|
||||
if(!empty($auswahl)) {
|
||||
foreach($auswahl as $selectedId) {
|
||||
$selectedId = (int)$selectedId;
|
||||
if($selectedId > 0) {
|
||||
$selectedIds[] = $selectedId;
|
||||
}
|
||||
}
|
||||
$where = "a.id IN (".implode(",",$selectedIds).")";
|
||||
}
|
||||
|
||||
if(!empty($delcache) || !empty($delcacheselected)) {
|
||||
$anz = 0;
|
||||
if($id > 0) {
|
||||
$this->app->DB->Update("UPDATE artikel a
|
||||
LEFT JOIN (SELECT artikel FROM artikel_onlineshops WHERE shop = '$id' AND aktiv = 1 GROUP BY artikel) oa ON a.id = oa.artikel
|
||||
SET a.cache_lagerplatzinhaltmenge = -999 WHERE (a.shop = '$id' OR a.shop2 = '$id' OR a.shop3 = '$id' OR NOT ISNULL(oa.artikel)) AND a.geloescht = 0 AND ($where)");
|
||||
$anz = $this->app->DB->affected_rows();
|
||||
$this->app->erp->LogFile("Lagerzahlencache zurückgesetzt für $anz Artikel, shopid: $id");
|
||||
$this->app->Tpl->Add('MESSAGE','<div class="info">Lagerzahlencache zurückgesetzt für '.$anz.' Artikel, shopid: '.$id.'</div>');
|
||||
}
|
||||
}
|
||||
|
||||
$this->ShopexportMenu();
|
||||
$this->app->YUI->TableSearch('TAB1','shopexport_artikellist', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "shopexport_artikellist.tpl");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $importerCapabilities
|
||||
* @param array $featureKeys
|
||||
@ -2942,6 +3026,7 @@ class Onlineshops extends GenShopexport {
|
||||
//$this->app->Tpl->Add('KURZUEBERSCHRIFT2',$name);
|
||||
$this->app->erp->MenuEintrag('index.php?module=onlineshops&action=edit&id='.$id,'Details');
|
||||
//$this->app->erp->MenuEintrag("index.php?module=shopexport&action=export&id=$id","Export");
|
||||
$this->app->erp->MenuEintrag('index.php?module=onlineshops&action=artikellist&id='.$id,'Artikelliste');
|
||||
$this->app->erp->MenuEintrag('index.php?module=shopexport&action=artikeluebertragung&id='.$id,'Artikel Übertragung');
|
||||
if($this->app->DB->Select("SELECT modulename FROM shopexport WHERE id = '$id'") === 'shopimporter_shopware'){
|
||||
//Soll nur in Shopware angezeigt werden, da nur in Shopware unterstüzt
|
||||
|
@ -52,6 +52,8 @@ class Shopexport
|
||||
$this->app->ActionHandler("dateien","ShopexportDateien");
|
||||
$this->app->ActionHandler("live","ShopexportLive");
|
||||
|
||||
$this->app->ActionHandler('artikellist', 'ShopexportArtikelList');
|
||||
|
||||
$this->app->DefaultActionHandler("list");
|
||||
$this->app->ActionHandlerListen($app);
|
||||
}
|
||||
@ -260,6 +262,7 @@ class Shopexport
|
||||
|
||||
$this->app->erp->MenuEintrag("index.php?module=onlineshops&action=edit&id=$id",'Details');
|
||||
//$this->app->erp->MenuEintrag("index.php?module=shopexport&action=export&id=$id","Export");
|
||||
$this->app->erp->MenuEintrag('index.php?module=onlineshops&action=artikellist&id='.$id,'Artikelliste');
|
||||
$this->app->erp->MenuEintrag("index.php?module=shopexport&action=artikeluebertragung&id=$id","Artikel Übertragung");
|
||||
if($this->app->DB->Select("SELECT modulename FROM shopexport WHERE id = '$id'") === 'shopimporter_shopware'){
|
||||
//Soll nur in Shopware angezeigt werden, da nur in Shopware unterstüzt
|
||||
@ -927,6 +930,13 @@ class Shopexport
|
||||
$this->app->Tpl->Parse('PAGE','shopexport_artikeluebertragung.tpl');
|
||||
}
|
||||
|
||||
public function ShopexportArtikelList()
|
||||
{
|
||||
$this->ShopexportMenu();
|
||||
$this->app->YUI->TableSearch('TAB1','shopexport_artikellist', "show", "", "", basename(__FILE__), __CLASS__);
|
||||
$this->app->Tpl->Parse('PAGE', "shopexport_artikellist.tpl");
|
||||
}
|
||||
|
||||
public function ShopexportAdressuebertragung()
|
||||
{
|
||||
$id = (int)$this->app->Secure->GetGET('id');
|
||||
|
Loading…
Reference in New Issue
Block a user