Developer forum

Forum » Ecommerce - Standard features » Search Box not on product detail page

Search Box not on product detail page

Michael Nielsen
Reply
I'm having problems getting the searchbox to render on the product detail page

On the productlist the Ecom.Search.SearchBox tag is present in the xml data, but it isn't on the product detail page even though the tag is listed on DW's template tag reference page
http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Product-Catalog/Product-detail.aspx

Can anyone help?


Replies

 
Merethe Nielsen
Reply
This post has been marked as an answer

Did you enable the search function/template in the Product catalog in paragraph settings?
When the checkbox is marked, then it renders the Ecom:Search.SearchBox in both the product list template and the product template (remember to insert the Ecom:Search.SearchBox tag into the templates).
Prodcatalogsearch.png
Votes for this answer: 1
 
Michael Nielsen
Reply
Hi Merethe

The checkbox is marked and Ecom:Search.SearchBox is present in both templates.

But you gave me an idea, I unmarked the checkbox and moved the searchform into the productlist and producttemplate. Then the searchform became visible, but instant search only still works on all other pages than the product page. On the product page it just says "No results"

 
Merethe Nielsen
Reply

Can you provide an URL to a page where it doesn't work and one where it works?

 
Michael Nielsen
Reply
Sure...

On all pages, like these it works

http://smykkerogure.net.dynamicweb-cms.com
http://smykkerogure.net.dynamicweb-cms.com/da-DK/handelsbetingelser.aspx
http://smykkerogure.net.dynamicweb-cms.com/da-DK/produkter/Shop-efter-mAerke/Pandora/Charms.aspx

But not here
http://smykkerogure.net.dynamicweb-cms.com/da-DK/produkter/Shop-efter-mAerke/Pandora/Charms/Testprodukt-1.aspx

 
Merethe Nielsen
Reply
This post has been marked as an answer

Phew, it took me some time to investigate this :)

The problem is that the ecom searchbox (Ecom:Search.SearchBox tag) is not rendered in the product template unless the AssociatedGroups loop is present in the template (or DwTemplateTags is enabled).

I have bugged this as bug 7345.

Workaround is to have the AssociatedGroups loop in the product template. You don't need to have any tags inside the loop. Just use it like this:

<!--@LoopStart(AssociatedGroups)--><!--@LoopEnd(AssociatedGroups)-->


Example test page on your site:
http://smykkerogure.net.dynamicweb-cms.com/da-DK/produkter/Testprodukt-1.aspx

Kind regards,

Merethe

Votes for this answer: 0
 
Michael Nielsen
Reply
Awesome... And the Instant Search works too...

Just a quick last question, how do I revert the URL to my productpage back to "produkter.aspx" right now it is produkter-1.aspx?


 
Merethe Nielsen
Reply
You can enable "Include language layer" or use "Ensure unique paths" in the URL section in Customized URLs.
From the manual:
Using the Ensure unique paths for each area function allows you as an administrator to configure Dynamicweb to create unique URLs for each language area instead of the entire site. Though this will only work if at least one domain is added per language layer (you do not have to use primary domain).

We have registered a bug (6499) about the issue that the system adds a number to the existing page, if it gets copied, but it's a high-risk fix and maybe it'll be fixed in 8.0/8.1.
 
Michael Nielsen
Reply
Thanks...

 

You must be logged in to post in the forum