Customizing ConLib: controls

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
Will
Captain (CAPT)
Captain (CAPT)
Posts: 263
Joined: Fri Oct 05, 2007 8:02 am

Customizing ConLib: controls

Post by Will » Fri Oct 05, 2007 3:41 pm

We're evaluating whether v7 will work for us. I've got a bunch of questions and am going to try and post them by topic. Here's the first.

I would like to see how difficult it is to...

1. Customize ConLib: controls to make them output the same data, but wrapped in different html. And be able to do this in a text editor (no recompiling)

Example: I created a Merchant Field for a product. On the product page, the value is pulled in by:

[[ConLib:ProductDescription ShowCustomFields="true"]]

Right now the custom Merchant Field data is displayed below the product description. How do I modify the ConLib:ProductDescription to have the Merchant Field displayed above the product description?

2. Customize the data output by a ConLib: control?

Example: In in the Category List scriptlet I want the data from the Merchant Field I created in the example above to also display in:

[[ConLib:CategoryListPage]]

How do I modify [[ConLib:CategoryListPage]] or create a new control to do this? Can I do this with a text editor and FTP without having to compile anything?

Thanks.

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Post by Shopping Cart Admin » Fri Oct 05, 2007 3:48 pm

Hello,

Complexity wise, I'm not versed in Asp.Net enough to tell you how difficult any of the changes themselves might be. However you can edit these files in notepad and on upload via FTP Asp.Net 2.0 will re-compile the project on it's own.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

Will
Captain (CAPT)
Captain (CAPT)
Posts: 263
Joined: Fri Oct 05, 2007 8:02 am

Post by Will » Fri Oct 05, 2007 3:56 pm

I'm mostly concerned with how to find out what data is available on what page.

For instance, when we are on a category list page, can we display any data associated with a product or are we limited to certain properties? If we are limited, are the limitations clearly documented somewhere?

Thanks.

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Customizing ConLib: controls

Post by Logan Rhodehamel » Fri Oct 05, 2007 4:34 pm

Will wrote:1. Customize ConLib: controls to make them output the same data, but wrapped in different html. And be able to do this in a text editor (no recompiling)

Example: I created a Merchant Field for a product. On the product page, the value is pulled in by:

[[ConLib:ProductDescription ShowCustomFields="true"]]

Right now the custom Merchant Field data is displayed below the product description. How do I modify the ConLib:ProductDescription to have the Merchant Field displayed above the product description?
Some of the controls in ConLib have properties that can be set, referring to your example above we can turn on and off custom fields. Right now, this control doesn't have any way to adjust the location of the custom fields. Unfortunately in beta 1, there is no way to know what properties are available for the "ConLib" controls. This is resolved in beta 2, where this documentation is made available.

So specifically to your example, to make this change you would have no choice but to create a custom control in ConLib. It would be a simple as these steps:

1) Copy the ProductDescription.ascx control to the "ConLib/Custom" folder.
2) Edit the ProductDescription.ascx file to move the custom field control above the product description.
3) Change your product page scriptlet to use the new custom control:
[[ConLib:Custom/ProductDescription ShowCustomFields="true"]]

It would take just a few minutes, and no recompile is required.

I think that addresses your second question. The process would be almost identical, except in step 2 you could be customizing to display your new data, and in step 3 you are modifying your category scriptlet.

It is best to place your controls into ConLib/Custom, because we promise never to upgrade any file within the Custom directory. This is explained in the AC7 customization guide.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

Post Reply