Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.0 Hint''s and Tips
 Change product templates on admin login
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

apswater
VP-CART Super User

444 Posts

Posted - June 07 2017 :  14:24:56  Show Profile  Visit apswater's Homepage  Reply with Quote
I use this one a lot.

When logged in as admin I want the template to show me other info the clients don''t see. In our case we added some fields to the products database and we show cost, inventory, stock levels and location for a product on the shopexd page.

Around line 202 of shopexd.asp find :

else
Template=tmprs("Template")
end if

end sub

change it to :


else
Template=tmprs("Template")
end if

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

end sub

copy your existing tmp_product.htm template to tmp_product_admin.htm and when you modify tmp_product_admin.htm you will have an admin only template.

in that new template we also insert this link after the image to add edit on the fly functionality.

<br />
<a href="/(your admin directory)/shopa_addproduct.asp?page=1&which=[catalogid]&IDField=catalogid&table=products&Database=">Edit</a>

You can put it just about anywhere you want to make it show up where you want it.

Edited by - apswater on June 07 2017 18:04:17

apswater
VP-CART Super User

444 Posts

Posted - June 07 2017 :  18:02:16  Show Profile  Visit apswater's Homepage  Reply with Quote
to do the same thing to the shopdisplayproducts page open shopproductformat_template.asp. Around line 200 find:

else
Template = GetConfig("xproductdisplayTemplate")
end if

change to :

else
Template = GetConfig("xproductdisplayTemplate")

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

Copy your tmp_productformat.htm to tmp_productformat_admin.htm and edit as desired.

I added a product edit on the fly at about 41 of tmp_productformat_admin.htm

Change :

<div class="productdesc">[translate cdescription]</div>

To :

<div class="productdesc">[translate cdescription]
<br /> <a href="/(Your Admin Directory)/shopa_addproduct.asp?page=1&which=[catalogid]&IDField=catalogid&table=products&Database=">Edit</a></div>
Go to Top of Page

danielrichardson
VP-CART Super User

Australia
276 Posts

Posted - July 27 2017 :  07:34:59  Show Profile  Reply with Quote
awesome tutorial, I will try further in my test site. thank you.
Go to Top of Page

sancess
Starting Member

37 Posts

Posted - July 28 2017 :  15:20:59  Show Profile  Reply with Quote
sorry i really bad in translating programming language, can you show me an example? so maybe i can implement in my store
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - July 29 2017 :  12:33:24  Show Profile  Visit apswater's Homepage  Reply with Quote
It just adds other fields from the database and edit buttons when logged in as admin. If you don''t feel you should get someone else to do it for you. I cant show it to you unless you were admin on might site which isnt going to happen hahah.

Go to Top of Page

sancess
Starting Member

37 Posts

Posted - July 31 2017 :  12:56:58  Show Profile  Reply with Quote
i still don''t get it :( sorry

maybe a screenshot of the result would be good


thanks
incess
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - July 31 2017 :  22:33:59  Show Profile  Visit apswater's Homepage  Reply with Quote
Here is an example of our product page with the edit and extra info on the page when logged in as admin

https://www.apswater.com/capture.jpg

and here is what it looks like not logged in as admin

https://www.apswater.com/capture2.jpg

Edited by - apswater on July 31 2017 22:54:59
Go to Top of Page

sancess
Starting Member

37 Posts

Posted - August 01 2017 :  17:01:13  Show Profile  Reply with Quote
ahh.. i got what you mean, so when logged in as admin, the product information will displaying full information. is it possible to edit the price on the fly? so only within the product page then can update the product price? so just like a small pop up to edit only the price?
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - August 01 2017 :  19:31:45  Show Profile  Visit apswater's Homepage  Reply with Quote
It just tales you to the edit page so you don''t have go into admin, then products then find the product. You just hit edit and you are there. It is on the products page, the product list and all the categories are that waw. I also have it on the other pages as well I am sure someone can wrote a popup or anther way, but those was quick and easy for me.
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - August 02 2017 :  14:23:59  Show Profile  Visit serjtankian's Homepage  Reply with Quote
I think for pop up will need additional script added, the customization not easy in my opinion



*peace - serj*
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - August 02 2017 :  19:34:58  Show Profile  Visit apswater's Homepage  Reply with Quote
That''s right serj, You would have to redo a lot of that part of the program. When you use a template you are limited. At least this way it is a fast shortcut. I hope Cam makes edit buttons and other admin feature standard. When doing phone sales, it would be nice to have pricing overrides and all kind of other functions. I have added many things like that to my 4.5 version but not to this one yet. I have a whole custom backend admin system I use.
Go to Top of Page

sancess
Starting Member

37 Posts

Posted - August 07 2017 :  13:04:10  Show Profile  Reply with Quote
if that will need a heavy customization then i prefer to postpone this as this actually not too important, just want to make an easy way for a lazy person like me lol

Incess
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - August 07 2017 :  16:13:16  Show Profile  Visit serjtankian's Homepage  Reply with Quote
yep, that would be wise if you could postpone some unnecessary change or not so important modification if that would cost you much



*peace - serj*
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - August 07 2017 :  16:20:38  Show Profile  Visit apswater's Homepage  Reply with Quote
That''s why I did it this way, it is just a short cut to make it easier without really changing much. The way the templates work you cant throw code in them right on the template. You can do it through the asp program that calls for the template but then that''s gets a lot more involved. I change the temple on admin login because it was the easy way not to show those links to clients but still have them available to us to edit easily when needed.
Go to Top of Page

sancess
Starting Member

37 Posts

Posted - August 08 2017 :  13:53:30  Show Profile  Reply with Quote
i''m agree. and in my opinion, vpasp have a very user friendly backend, so for a non IT minded person like me, then it really easy to use. thanks guys!
Go to Top of Page

serjtankian
VP-CART Super User

Armenia
378 Posts

Posted - August 09 2017 :  16:52:02  Show Profile  Visit serjtankian's Homepage  Reply with Quote
indeed, i have tried many carts, and based on my experience, vpasp have a simple and user-friendly backend. the backend navigation quite easy to find



*peace - serj*
Go to Top of Page
Page: of 2
Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00