Sourcecode to modify Kit formating?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Sourcecode to modify Kit formating?

Post by Odettes » Wed Nov 04, 2015 3:27 am

Hello!

I need to change the output of different Kit-components, for example i need to add some css classes.
Can I do that without source-code? I can change the container around the Kit but not the item separately.
I can use jquery to modify it after page load but I want to avoid that if possible..
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Sourcecode to modify Kit formating?

Post by mazhar » Wed Nov 04, 2015 4:14 am

In Website/ConLib/BuyProductDialog.ascx.cs file locate the KitsList_ItemDataBound method which adds kit controls to UI. You should be able to wrap these control into custom wrappers or set classes in this method without needing back end code.

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Sourcecode to modify Kit formating?

Post by Odettes » Wed Nov 04, 2015 4:20 am

Great, thanks!
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Sourcecode to modify Kit formating?

Post by Odettes » Wed Nov 04, 2015 4:45 am

It works fine to set custom CssClass for Kit component that use dropdown (which render clean without any table).
But for Radio and Checkbox components I just manage to set the CssClass for the surrounding Table, not the item itself.

If I want to remove the table structure on Radio and Checkbox and replace it with custom DIV tags instead do I need source for that or can that be done within the KitsList ItemDataBound?

Some example code would be appreciated or the source-part where the rendering takes place, thanks!
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Sourcecode to modify Kit formating?

Post by mazhar » Thu Nov 05, 2015 4:49 am

Radio and Checkbox lists are standard .NET controls. They already support RepeatLayout property. Just change the layout to lists etc and it won't emit table.

Code: Select all

((CheckBoxList)o).RepeatLayout = RepeatLayout.UnorderedList;
((CheckBoxList)o).RepeatDirection = RepeatDirection.Horizontal;

Odettes
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 102
Joined: Wed Apr 02, 2008 11:00 am
Location: Stockholm, Sweden
Contact:

Re: Sourcecode to modify Kit formating?

Post by Odettes » Thu Nov 05, 2015 7:25 am

mazhar wrote:Radio and Checkbox lists are standard .NET controls. They already support RepeatLayout property. Just change the layout to lists etc and it won't emit table.

Code: Select all

((CheckBoxList)o).RepeatLayout = RepeatLayout.UnorderedList;
((CheckBoxList)o).RepeatDirection = RepeatDirection.Horizontal;
Thanks!
Sincerely,
Thomas Berglund

https://traileronline.se
AbleCommerce Gold R11 Custom

Post Reply