Developer forum
E-mail notifications
Deep links to groups and products in ecom
We would like to link directly to a specific group or product in DW backend.
F.eks we want the user to be able to click on a groupid in their ERP system and go directly to the group definition page in DW backend.
How can we obtain these URL's ?
/Lars
Replies
Hi Lars,
To obtain a link to one specific product or group, you'd simply add its ID to the URL, ie http://ecommerce.dynamicweb.dk/Default.aspx?ID=48&ProductID=PROD133.
If it is because you want produce this automatically for all products and/or groups, you will to do your own custom functionality for this.
I'm I understanding you correctly?
Regards
Morten Snedker
Ups - overlooked the "backend" part. :-)
I am afraid this is not possible - linking directly to the backend.
Regards
Morten Snedker
This link will send you directly to the provided group, however, the top and bottom frames will not be present:
http://myshop.dk/Admin/Module/eCom_Catalog/dw7/ProductList.aspx?GroupID=GROUP965
If you've asked DW to remember your login credentials, I assume you'll see this screen instantly. If not, you can create a custom page that performs the login procedure (see this article for details and don't forget the Autologin property: http://engage.dynamicweb-cms.com/default.aspx?id=361&articleid=157) and then redirects to the ProductList.aspx page.
BR.
Lars
Hope you weren't looking for a pretty solution;)
Thanx :o)
Hi there,
Excuse me for re-vitalizing this thread, but it just so happened that I needed this functionality myself. I knew that when I first responded to Lars' post, but now I had to actually implement it myself, and I ran into a small problem.
The product editing screen accepts a backurl parameter in the query string, so when you press "Save and Close" or "Close", you will be redirected to the specified URL. This works fine, however, the product editing form requires the user to actually press a product group node in the ecom tree, otherwise you'll receive the following exception:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
Dynamicweb.Ecom7.Common.Functions.GetGroupsBreadcrumb(String shopFilter, String[] items) +436
Dynamicweb.Ecom7.Common.Functions.GetBreadcrumb(String shopFilter, String treeOpenTo, Action`1 prosessBeforeRender) +186
Dynamicweb.Admin.eComBackend.ProductEdit.Tree_Ready(Object sender, EventArgs e) +136
Dynamicweb.Admin.eComBackend.MainMaster.OnTreeReady(EventArgs e) +53
Dynamicweb.Admin.eComBackend.MainMaster.PopulateTree() +1316
Dynamicweb.Admin.eComBackend.MainMaster.Page_Load(Object sender, EventArgs e) +36
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Funny thing is that it doesn't matter which node representing a product group in the tree, you just have to press a node. Although, pressing the node where the product is, displays the correct bread crumb path, whereas pressing a random group node just displays the product name in the bread crumb.
In order to work around this problem I had to do some nasty Javascript stunts to automatically click my way through the tree before opening the product editing screen. Not that it was difficult to acheive, it just isn't very pretty and it's extremely vulnerable to changes later on, should you choose to do some changes to the tree.
One other thing. This seems to be session based, so when you click a group node once during a session, you don't need go though the group tree again.
But in short terms, could you do some modification so the long trip though the tree the first time is no longer necessary? I wouldn't consider this an error, but it would indeed make ecom more accessible from other locations including custom modules.
BTW, Lars, let me know if you need a code example.
BR.
Lars
You must be logged in to post in the forum