Hello there
I am in the process of rewriting some code for a customer. They want to have some extra functionality added to a cutsom search engine that another team member has written.
To make long story short, is there any built-in functionality in DW, that takes fx the group id, and product id and the builds a link to that product?
I am not the strongest eCom'er. I hope to be one day, but I still have a long way.
Developer forum
E-mail notifications
Generating eCom links from product information
Martin Slot
Posted on 22/08/2011 16:15:23
Replies
Nicolai Høeg Pedersen
Posted on 23/08/2011 11:38:53
Build a link how - as in search friendly, or the link to the product?
In the products loop in the grouplist, you have template tags containing the detail link:
ie:
http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Product-Catalog/Product-list/Loops/Products.aspx
If you are talking about SEO urls, see management center, Web and HTTP, searchfriendly URLs. See attached dump.
In the products loop in the grouplist, you have template tags containing the detail link:
ie:
or
- the latter containing the product ID and Group IDhttp://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Product-Catalog/Product-list/Loops/Products.aspx
If you are talking about SEO urls, see management center, Web and HTTP, searchfriendly URLs. See attached dump.
Martin Slot
Posted on 23/08/2011 11:47:24
I want to build a link to a certain product. Not in the form: http://www.producent.de/Default.aspx?id=15904&productID=PROD2007, but more like http://www.producent.de/Power_-_Control_Technology/Diesel_Control_Technology/Products/Plant_management.aspx?ProductID=PROD2007. Fx The product with the ID, PROD2007 is represented in 4 groups, that have different URLs. Is it possible for me to generate the pretty url from the groupID and productID, in some way?
Nicolai Høeg Pedersen
Posted on 23/08/2011 12:01:00
In the product list use the tag @Ecom:Product.LinkGroup.Clean and enable the search friendly url as mentioned in my previous post.
Then you get URLs like /Products/GroupName.aspx, /Products/GroupName/ProductName.aspx and /Products/GroupName/ProductName/VariantName.aspx
If the product is located in several groups, it has several URLs - a problem, I know. A feature is coming up to fix that.
Then you get URLs like /Products/GroupName.aspx, /Products/GroupName/ProductName.aspx and /Products/GroupName/ProductName/VariantName.aspx
If the product is located in several groups, it has several URLs - a problem, I know. A feature is coming up to fix that.
Martin Slot
Posted on 23/08/2011 12:43:39
Okay. So there is not a standard way of doing this. Anyway. I am doing all this programmatically, so I can not even use the @Ecom tags. Is there a way for me to construct them by myself?
Nicolai Høeg Pedersen
Posted on 23/08/2011 12:46:20
It is a standard way...
If you generate a link like Default.aspx?ID=123&GroupID=GROUP1&ProductID=PROD123 and output that to the system, Dynamicweb will automatically change that url to the search friendly version before delivering the HTML to the browser - if it is enabled of course.
If you generate a link like Default.aspx?ID=123&GroupID=GROUP1&ProductID=PROD123 and output that to the system, Dynamicweb will automatically change that url to the search friendly version before delivering the HTML to the browser - if it is enabled of course.
Martin Slot
Posted on 23/08/2011 13:29:42
Strange. I have enabled that, and it still does not work :( But you mentioned that it would not work if the product was in 2 or more groups. Maybe that is why.
Nicolai Høeg Pedersen
Posted on 23/08/2011 14:42:30
A product can be in 2 groups - giving it 2 urls. It works, but there is the possible Duplicate Content issue...
If it does not work, something else is wrong.
Can you post a URL?
If it does not work, something else is wrong.
Can you post a URL?
Martin Slot
Posted on 24/08/2011 08:44:13
Hello
Here is the URL: http://www.deif.com/Default.aspx?id=15904&productID=PROD2070&groupID=GROUP883 but what they really want is this: http://www.deif.com/Power_-_Control_Technology/Diesel_Control_Technology/Products/AMF.aspx?ProductID=PROD2070. This URL clearly shows the structure of the eCom.
Here is the URL: http://www.deif.com/Default.aspx?id=15904&productID=PROD2070&groupID=GROUP883 but what they really want is this: http://www.deif.com/Power_-_Control_Technology/Diesel_Control_Technology/Products/AMF.aspx?ProductID=PROD2070. This URL clearly shows the structure of the eCom.
Nicolai Høeg Pedersen
Posted on 24/08/2011 09:12:10
Hi Martin...
Yes - then enable it in management center. Attached a screendump of the settings on deif.com - simply set the 2 checkboxes as statet above in the other screendump.
Yes - then enable it in management center. Attached a screendump of the settings on deif.com - simply set the 2 checkboxes as statet above in the other screendump.
Martin Slot
Nicolai Høeg Pedersen
Posted on 25/08/2011 08:45:51
You have NOT set the settings. Please read the text in the screendumps.
See my new attachments. Now with the settings highlighted that should be set, which they are not.
See my new attachments. Now with the settings highlighted that should be set, which they are not.
Martin Slot
Posted on 25/08/2011 08:57:50
Oooh. Sorry. I looked at the wrong screenshot: http://developer.dynamicweb-cms.com/Files/Filer/Forum/Upload/Thread27094/Message27115/Capture.JPG and not http://developer.dynamicweb-cms.com/Files/Filer/Forum/Upload/Thread27094/Message27096/Capture.JPG. I will try to turn them on.
Martin Slot
Posted on 25/08/2011 15:23:08
I know that you are a Dynamicweb guru. I am not. I can not get hold of our Dynamicweb guy at the company, but I am eager to test this. Do you know if this breaks anything eg. is the this change invertible?
Nicolai Høeg Pedersen
Posted on 25/08/2011 16:40:29
It is not invertible - and it will not break things. Just turn it on and test.
Nicolai Høeg Pedersen
Posted on 25/08/2011 16:40:48
If it does not work as you want, just turn it off again...
Martin Slot
Posted on 26/08/2011 12:34:29
I have updated the settings, but when I try to visit this link, it does not show the pretty url: http://www.deif.com/Default.aspx?id=15904&ProductID=PROD1400&GroupID=GROUP907. Could it be that deif.com has a complicated setup (I am a backender at my firm so I do not know what setup our frontenders have picked), but could a certain setup smash this?
Martin Slot
Posted on 26/08/2011 12:50:02
See attached. Could it maybe be because of my url type settings?
Nicolai Høeg Pedersen
Posted on 26/08/2011 13:57:17
Call service desk and have them help you...
You must be logged in to post in the forum