How to use product details page conlib on category page?

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
Raheel
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 24
Joined: Tue May 03, 2011 8:53 am

How to use product details page conlib on category page?

Post by Raheel » Tue Jun 14, 2011 5:00 am

Hello,

I want to use a conlib on category page, this conlib is used on product details page, can anyone tell me how to do that?

Thanks.

User avatar
clevername
Lieutenant (LT)
Lieutenant (LT)
Posts: 54
Joined: Tue Jan 11, 2011 8:54 am

Re: How to use product details page conlib on category page?

Post by clevername » Tue Jun 14, 2011 8:06 am

Well depending on the Conlib it might not work with category pages just like come category conlibs can't work on some product pages.
However, if you want to throw it on there, you just need to place the conlib code, i.e. [[ConLib:ProductDiscountsDialog]], in the scriplet section you desire. Such as the Content Scriplet or the Left Sidebar Scriplet. You do this by editing the page at the bottom while you are logged in.

But like I said most product page scriplets do not work on pages that do not have the ProductId in the URL so on a category page, this might not work.
Also I would suggest not throwing it into your header or footer. This is because you can't run two of the same ConLib on the same page and if the header or footer on your category page is the same as your product page, it will bomb. But if you want to throw it in your footer or header, I would rename it and put it in the /custom folder.

All of this is pretty generic information without knowing what ConLib it is of course. But if you want to get a custom control built, I would look at AbleMods, Plugables, or Web2Market.

If you need me to go into more detail just let me know.

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: How to use product details page conlib on category page?

Post by plugables » Thu Jul 28, 2011 12:08 pm

The product details conlib looks for a product id in context. When you are on a category page, there is no product id available in the context so the control wont work. You can modify the control to accept product id as parameter. Then on the category page bind the product id for each product to this control dynamically.

Post Reply