New product - Nowy produkt

boboo

Avatar: boboo

2011-03-17 23:01

Are you angry about clicking everytime "new product" in menu, when after saving a product you want add a new one?
(by "assembly belt like" input work)

Wkurza cię ciągłe klikanie na "nowy produkt" w menu, gdy po zapisaniu jednego produktu chcesz dodać nowy?
(przy "taśmowym dodawaniu produktów")

So first find in /templates/admin/products.tpl the block: BEGIN FORM_MAIN
then find in it the lines (there are two such lines sets):
<input type="submit" value="$lang['save_list'] &raquo;" name="sOptionList"/>
<input type="submit" value="$lang['save'] &raquo;" name="sOption"/>
and put over these lines (or under or between) this line:
<input type="submit" value="save and new" name="sOptionNew"/>
("save and new" is the text you'll see on the button. If you have time, do it using /lang/xx.php)

Najpierw znajdź w /templates/admin/products.tpl blok: BEGIN_FORM_MAIN
potem znajdź w nim linijki (są dwa takie zestawy linijek):
<input type="submit" value="$lang['save_list'] &raquo;" name="sOptionList"/>
<input type="submit" value="$lang['save'] &raquo;" name="sOption"/>
i wstaw nad nie (może być pod lub między) taką linijkę:
<input type="submit" value="zapisz i nowy" name="sOptionNew"/>
("zapisz i nowy" to tekst, który będzie widoczny na guziku. Jeśli masz czas, zrób to używając /lang/xx.php)

Then open the /actions_admin/products.php and find:
if(isset($_POST['sOptionList']))
header('Location:'.$_SERVER['PHP_SELF'].'?p='.$aActions['f'].'-list&sOption=save');

and under this line but BEFORE "else" put:
elseif(isset($_POST['sOptionNew']))
header('Location:'.$_SERVER['PHP_SELF'].'?p='.$p);

And now, after clicking "save and new" the product will be saved and an empty, ready for new product, form will be displayed.

Następnie otwórz /actions_admin/products.php i znajdź:
if(isset($_POST['sOptionList']))
header('Location:'.$_SERVER['PHP_SELF'].'?p='.$aActions['f'].'-list&sOption=save');
i pod nią, ale NAD "else" wstaw:
elseif(isset($_POST['sOptionNew']))
header('Location:'.$_SERVER['PHP_SELF'].'?p='.$p);

Od teraz klikając na "zapisz i nowy", aktualny produkt zostanie zapisany i pojawi się pusty, gotowy na przyjęcie nowego produktu, formularz.

» Quick.Cart v3.x

http://it-service.kimla.de QC- & QCMS-plugins

cachousam

Avatar: cachousam

2011-03-28 13:43

Very nice idea
but for me it does not work entirely.
In fact, when I click save, a new page arrives well but creates products previously not recorded in the database

cachousam

Avatar: cachousam

2011-03-28 13:46

Very nice idea
but for me it does not work entirely.
In fact, when I click save, a new page arrives well but creates products previously not recorded in the database

Back to top
about us | contact