Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.0 Hint''s and Tips
 add on the fly edit for categories on admin login
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

apswater
VP-CART Super User

444 Posts

Posted - June 08 2017 :  11:50:14  Show Profile  Visit apswater's Homepage  Reply with Quote
In keeping with the other template mods, adding an edit button on categories for on the fly editing is very handy for me.

open shopdisplaycategories.asp

at about line 138 find :

if Template = "" or isnull(template) then
Template = GetConfig("xcategorydisplayTemplate")
if Template = "" then
SError = GetLang("LangExdNoTemplate")
ShopError SError
end if

Change it to :

if Template = "" or isnull(template) then
Template = GetConfig("xcategorydisplayTemplate")

if session("shopadmin")<>"" then template="tmp_categorytemplate_admin.htm"

if Template = "" then
SError = GetLang("LangExdNoTemplate")
ShopError SError
end if

Then copy tmp_categorytemplate.htm to tmp_categorytemplate_admin.htm

Edit the new admin template

Find

[formatimage sub]

change it to :

[formatimage sub]
<br /><a href="/(your admin directory)/shopa_addcategory.asp?page=1&which=[categoryid]&IDField=categoryid&table=categories&Database=">Edit</a>

Now you can have instant edits for your categories in the category pages.


Edited by - apswater on June 08 2017 11:51:05

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - June 09 2017 :  13:14:24  Show Profile  Visit serjtankian's Homepage  Reply with Quote
awesome! tested with my local installation and it works like a charm, see below:

http://prntscr.com/fhwaf2

really useful customization bro!



*peace - serj*
Go to Top of Page

danielrichardson
VP-CART Super User

Australia
276 Posts

Posted - June 22 2017 :  04:40:51  Show Profile  Reply with Quote
It works, but we need to login as admin first. if not, "Unauthorized administrator" will appear.

Thanks apswater!
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - June 25 2017 :  09:36:37  Show Profile  Visit apswater's Homepage  Reply with Quote
It shouldn''t show the edit link if you are not logged in because it only appears on the admin template and that only shows when you are logged in as admin.

Edited by - apswater on June 25 2017 19:41:09
Go to Top of Page

sancess
Starting Member

37 Posts

Posted - July 06 2017 :  15:45:50  Show Profile  Reply with Quote
thanks for the tips!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00