Author |
Topic |
|
apswater
VP-CART Super User
444 Posts |
Posted - June 07 2017 : 14:24:56
|
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
|
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> |
|
|
danielrichardson
VP-CART Super User
Australia
276 Posts |
Posted - July 27 2017 : 07:34:59
|
awesome tutorial, I will try further in my test site. thank you. |
|
|
sancess
Starting Member
37 Posts |
Posted - July 28 2017 : 15:20:59
|
sorry i really bad in translating programming language, can you show me an example? so maybe i can implement in my store |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - July 29 2017 : 12:33:24
|
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.
|
|
|
sancess
Starting Member
37 Posts |
Posted - July 31 2017 : 12:56:58
|
i still don''t get it :( sorry
maybe a screenshot of the result would be good
thanks incess |
|
|
apswater
VP-CART Super User
444 Posts |
|
sancess
Starting Member
37 Posts |
Posted - August 01 2017 : 17:01:13
|
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? |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - August 01 2017 : 19:31:45
|
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.
|
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - August 02 2017 : 14:23:59
|
I think for pop up will need additional script added, the customization not easy in my opinion
*peace - serj* |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - August 02 2017 : 19:34:58
|
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. |
|
|
sancess
Starting Member
37 Posts |
Posted - August 07 2017 : 13:04:10
|
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 |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - August 07 2017 : 16:13:16
|
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* |
|
|
apswater
VP-CART Super User
444 Posts |
Posted - August 07 2017 : 16:20:38
|
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. |
|
|
sancess
Starting Member
37 Posts |
Posted - August 08 2017 : 13:53:30
|
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! |
|
|
serjtankian
VP-CART Super User
Armenia
378 Posts |
Posted - August 09 2017 : 16:52:02
|
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* |
|
|
|
Topic |
|