Delete product but stay on (sub)page


Avatar: boboo

2012-09-14 09:05

If there are more products in system, so the paging in admin panel is active and you want to delete a product from -let's say- third (sub)page, the script goes to the first (sub)page after deleting chosen product. The same situation we have by changing and saving product data from list view.

The solution for "changing and saving":
in /templates/admin/products.tpl in block BEGIN PRODUCTS, in "action" property of the form add: &iPage=$iPage

The solution for "deleting":
in /templates/admin/products.tpl in block START LIST in "href for delete action" add &iPage=$iPage
Then add
before!!! "&iProduct=" in var aDelUrl = Array...

Now in /actions/admin-products.php



header('Location:'.$_SERVER['PHP_SELF'].'?p='.$aActions['f'].'-list&sOption=del&iPage=' .$iPage);

and in /core/products-admin.php in function listProductsAdmin under:




» Quick.Cart v5.x

Back to top
about us | contact