Where is Customer Avatar in database tables ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am trying to find a table in nopCommerce database where Customer Avatar is stored ?

In the nop_Customer table, there is only Avatar ID, which is a foreign key,, where is the original table where Customer Avatar picture is stored ?
13 years ago
Nop_Picture
13 years ago
nopCommerce team | a.m. wrote:
Nop_Picture


Andrei ,

I am trying to create a gridview in which i want to display username along with the avatar image but i am not getting image:

this is what i have done till now:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                DataKeyNames="CustomerID" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="CustomerID" HeaderText="CustomerID"
                        InsertVisible="False" ReadOnly="True" SortExpression="CustomerID" />
                    <asp:BoundField DataField="Username" HeaderText="Username"
                        SortExpression="Username" />
                    <asp:BoundField DataField="AvatarID" HeaderText="AvatarID"
                        SortExpression="AvatarID" />
                    <asp:TemplateField>
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("PictureBinary") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("PictureBinary") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

            <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                ConnectionString="Data Source=.\SQLEXPRESS;Initial Catalog=mydatabase;Integrated Security=True"
                ProviderName="System.Data.SqlClient"
                SelectCommand="SELECT Nop_Customer.CustomerID, Nop_Customer.Username, Nop_Customer.AvatarID, Nop_Picture.PictureBinary FROM Nop_Customer CROSS JOIN Nop_Picture">
            </asp:SqlDataSource>

-------
and this is the output i am getting:

CustomerID Username AvatarID  
37 [email protected] 6               X
37 [email protected] 6               X
37 [email protected] 6               X
37 [email protected] 6               X
38 [email protected] 5               X
38 [email protected] 5               X
38 [email protected] 5               X
38 [email protected] 5               X

i am getting X sign instead of image, and i have checked in the database that the avatar ID that i am getting is correct. could you please help me with this issue ?
13 years ago
Look how product images are rendered in a grid in the following control \NopCommerceStore\Administration\Modules\ProductPictures.ascx. And render avatar images the same way
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.