Ich habe nun eine eigene Lösung gefunden und stelle sie jetzt hier zur Verfügung.
Meine Veränderung binden einen Timer auf der Produkt-bearbeiten-Seite im Backend ein, der wenn er abläuft, das Produkt automatisch speichert und zurück zur Produkt-verwaltung zw. Produktübersicht geht. Man kann den Timer stoppen, manuell weiterarbeiten und abspeichern. Die Zeit des Timers kann man auch ändern.
Viele Produkte kann man dann damit abspeichern, wenn man sie im Browser in mehreren Tabs öffnet. Dazu benutzt man ein Online-Tool wie z.B.
http://www.urlopener.com und trägt dort die URls der Produkte ein, die man bereits über CSV eingebunden, aber noch nicht gespeichert hat, z.B. /wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=1. DIe letzte Ziffer kann man dann je nach Produkt-ID ändern, die man speichern möchte.
Man muss nur ein wenig Code in eine Datei kopieren. Man muss folgende Datei
wp-content/plugins/wpshopgermany/views/produkt/addedit.phtml
kopieren nach:
wp-content/uploads/wpsg/user_views/produkt/addedit.phtml
Darin fügt man in Zeile 152, nach
Code: Alles auswählen
<div class="wrap columns-2 wpsg_produkt_addedit wpsg_product_view" id="wpsg_product_view">
den unten angefügten Code ein.
Code: Alles auswählen
<p style="#progressBar {
width: 100%;
margin: 0 auto;
height: 5px;
background-color: #6e6e6e;
}
#progressBar div {
height: 100%;
text-align: right;
padding: 0 ;
line-height: 5px; /* same as #progressBar height if we want text middle aligned */
width: 0;
background-color: #ffcf06;
box-sizing: border-box;
}
#time_wrap{margin:20px 0;}"><input type="button" id="stop-btn" value="Stop" /> Dieses Produkt wird innerhalb von 20 Sekunden automatisch gespeichert. Klicke bitte auf den stop-Button, dann du kannst normal weiterarbeiten und manuell abspeichern.
</p>
<div id="progressBar" style="width: 100%;
margin: 0 auto;
height: 5px;
background-color: #6e6e6e">
<div style="height: 100%;
text-align: right;
padding: 0 ;
line-height: 5px; /* same as #progressBar height if we want text middle aligned */
width: 0;
background-color: #ffcf06;
box-sizing: border-box;"></div>
</div>
<div id="time_wrap"></div></p>
<script type="text/javascript">
$j=jQuery.noConflict();
progress(20, 20, $j('#progressBar'));
var timer = null;
function progress(timeleft, timetotal, $jelement) {
var progressBarWidth = timeleft * $jelement.width() / timetotal;
$jelement.find('div').animate({ width: progressBarWidth }, timeleft == timetotal ? 0 : 1000, 'linear').html('');
$j('#time_wrap').html('<span id="timer">'+timeleft+'</span>');
if(timeleft > 0) {
timer = setTimeout(function() {
progress(timeleft - 1, timetotal, $jelement);
}, 1000);
} else{
timer = setTimeout(function() {
$j('#submit_index').click();
}, 1000);
}
//You can use this to bind event only after the timer is set.
$j('#stop-btn').on('click', function() {
clearTimeout(timer);
});
};
function stoptimer() {
clearTimeout(timer);
}
</script>
Viel Freude damit! Ich hoffe, es hilft auch anderen Shop Betreibern.