My client wants a full list of all products by a few select Manufacturers
listed in alphabetical order, . . like shown in the attached graphic.
Using AC7, how do I do this? thanks
How change I make this list of products?
Re: How change I make this list of products?
You need to write a custom control for this.
Re: How change I make this list of products?
How do I get access to the product "Name" field, where it
equals a specific Manufacturer?
I don't know how to access the data layer in AC7.
Do I need to create my own connection and sql query or can
I access this field some other way?
equals a specific Manufacturer?
I don't know how to access the data layer in AC7.
Do I need to create my own connection and sql query or can
I access this field some other way?
Re: How change I make this list of products?
Not sure if this will help at all, but, I renamed my webpage.aspx, took out all the existing code, and basically started with an empty project that includes the store header. That way, you have access to the Able Commerce data structures. Check it out. Just to show you how easy the data structures are to work with, I've included an example that loops through all the manufacturers, and prints out the products that are associated with them. I have the output going directly to screen... this is by no means a usable solution, but hopefully it will steer you in the right direction.
Let me know if you need any further help in understanding what is going on here.
Scott
Code: Select all
<%@ Page Language="C#" MasterPageFile="~/Layouts/Scriptlet.master" Inherits="CommerceBuilder.Web.UI.AbleCommercePage" Title="View Webpage" %>
<%@ Register Assembly="CommerceBuilder.Web" Namespace="CommerceBuilder.Web.UI.WebControls.WebParts" TagPrefix="cb" %>
<%--
<DisplayPage>
<Name>Basic Webpage</Name>
<NodeType>Webpage</NodeType>
<Description>A basic display handler for webpages. It shows the webpage content with standard headers and footers.</Description>
</DisplayPage>
--%>
<script runat="server">
Webpage _Webpage = null;
protected void Page_Load(object sender, EventArgs e)
{
ManufacturerCollection allMans = ManufacturerDataSource.LoadForStore();
foreach (Manufacturer thisMan in allMans)
{
Response.Write("<h1>"+thisMan.Name+"</h1><br>");
ProductCollection productByManList = ProductDataSource.LoadForCriteria("ManufacturerId = "+ thisMan.ManufacturerId);
foreach (Product p in productByManList)
{
Response.Write(p.Name+"<br>");
}
}
}
</script>
<asp:Content ID="MainContent" ContentPlaceHolderID="PageContent" Runat="Server">
<cb:ScriptletPart ID="WebpagePage" runat="server" Layout="Left Sidebar" Header="Standard Header" Content="Webpage Page" Sidebar="Standard Sidebar 1" Footer="Standard Footer" Title="View Webpage" AllowClose="False" AllowMinimize="false" />
</asp:Content>
Scott
Re: How change I make this list of products?
thanks Scott, that's definately is a big help.
I would need to modify this so it just displays one Manufacturer, and
I would like to add a link to the product name.
How can learn to use the Able Commerce data structures?
Are they easy to use?
Thanks
Mike
I would need to modify this so it just displays one Manufacturer, and
I would like to add a link to the product name.
How can learn to use the Able Commerce data structures?
Are they easy to use?
Thanks
Mike
Re: How change I make this list of products?
They are very easy to learn! The best way to learn, I've found, is to look through the code of some of the other pages. The ones that have code included on the page itself may be the easiest to understand. Try something in the Admin/Reports directory, maybe. Also, you should go to http://wiki.ablecommerce.com/index.php/ ... uilder_API , and click on the "Compiled Help File" link. This is a file that gives detailed information on all classes and methods available.
Also, continue to use the forums. There is a wealth of information available here, and many extremely helpful people.
Good luck with everything.
Scott
Also, continue to use the forums. There is a wealth of information available here, and many extremely helpful people.
Good luck with everything.
Scott