cancel
Showing results for 
Search instead for 
Did you mean: 

"Add to Cart" is not working and not showing up?

Former Member
0 Kudos

In "PartsListBlock.ascx" I have got a row:


<asp:TemplateColumn HeaderText="www" Visible="True">
                        <ItemStyle HorizontalAlign="center"></ItemStyle>
                        <ItemTemplate >
                         <asp:HyperLink id="lnkAddToCart" runat="server" ImageUrl="~/assets/common/themes/balticpolo/addtocart.gif"
                                NavigateUrl="../../commerce/cart.aspx?AddPartNo=" visible="True">In den Einkaufskorb.</asp:HyperLink> 
                        </ItemTemplate>
                    </asp:TemplateColumn>

But this row is not visible.

I need to provide the opportunity to add an item right from PartList Block to the shopping cart..

Any idea ?

[Edit you can see the shop here: <a href="http://195.226.73.238/catalog/partlist.aspx?CategoryID=9&serverid=balticpolo">clicky</a>

Message was edited by:

Bjoern Kaiser

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Is you Catalog "View Only"? If you go to the Catalogs Browser and right click the catalog to view your Catalog Detail there is a checkbox for "View Only". Make sure this one isn't checked.

Steve

Former Member
0 Kudos

Thanks Stephen,

I got one step further 😃

Now there is at least an output from the codeblock.

But:

<asp:HyperLink id="lnkAddToCart" runat="server" ImageUrl="../../assets/common/icons/addtocart.gif"
                                NavigateUrl="../../commerce/cart.aspx?AddPartNo=">Add To Cart.</asp:HyperLink>

shows the "Search" Button, which leads to the detail site.

But I didnt declared it nor wanted it to pop up there (http://195.226.73.238/catalog/partlist.aspx?CategoryID=9&serverid=balticpolo)

I use the original partlistblock, only with changes in style and order.

Is the order important ?!

I tried to make the code readable:


<asp:TemplateColumn>
                        <ItemStyle VerticalAlign="top" CssClass="catDetail" ></ItemStyle>
                        <ItemTemplate >
                             <h2 class="catDetailPartName">
                                <asp:Literal id=ltlPartName runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.PartName") %>'>
                                </asp:Literal>
                            </h2>
                             <p >
                                <asp:Literal id=ltlPartDescription runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Description") %>'>
                                </asp:Literal><br /><br />
                                Preis: <asp:Literal id="ltlPartPrice" runat="server" Text="N/A"></asp:Literal>
                            </p>
                            <asp:HyperLink  id="lnkImage" runat="server" NavigateUrl="../partdetail.aspx?partno=" Text='<%# DataBinder.Eval(Container, "DataItem.PartName") %>'>
                                
                            </asp:HyperLink>
                            <br clear="all" />                            
                             <asp:HyperLink id="lnkAddToCart" runat="server" ImageUrl="../../assets/common/icons/addtocart.gif"
                                NavigateUrl="../../commerce/cart.aspx?AddPartNo=">Add To Cart.</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateColumn>

is this totally wrong ?

Former Member
0 Kudos

If you see the Search button then the part is probably defined as a Product Line Master which sends you to the part detail page where you should see the attribute dropdowns to find the part or the list of children parts depending on how you configured the PLM.

I didn't see either in your page so my first guess is there are no children parts assigned to this PLM. You assign children under the Types section (where you initially assigned the PLM type) and enter the PLM part number in the Child Of field. Also, the reset button you see if part of the attribute picker. Make sure you have the checkboxes for Attribute Picker and List both checked on the PLM details.

Steve

Answers (1)

Answers (1)

Former Member
0 Kudos

What version of netpoint are you running? My partlistblock already has this section of code:

<asp:TemplateColumn>
		<ItemStyle HorizontalAlign="Center"></ItemStyle>
		<ItemTemplate>
		<asp:HyperLink id="lnkAddToCart" runat="server" ImageUrl="../../assets/common/icons/addtocart.gif"
							NavigateUrl="../../commerce/cart.aspx?AddPartNo=">Add To Cart.</asp:HyperLink>
						</ItemTemplate>
					</asp:TemplateColumn>

Former Member
0 Kudos

Yeah mine has the same code block, with a few minor changes (Aligns and so on)...

The Netpoint Installer says: 3.96

Do I have to set any variables in the files header ? Like


<np:machinesblock .... ShowAddToCart.... 

?

Please excuse my clumsy question, but our customer is really the only company in whole Germany using netpoint..so I am quite feeling like beta-tester/noob.

Greetings

Bjoern

Former Member
0 Kudos

no worries at all that is what this forum is for. I think the problem is netpoint code is turning off the visbility of lnkAddToCart during the page processing. Can you try adding some text or something as well as lnkAddToCart to see if the text shows up?

You might have to do what you are trying with a customized .net control.

Former Member
0 Kudos

> You might have to do what you are trying with a

> customized .net control.

I am just editing the .ascx files with my fav html editor.

the whole template column is empty. the result is just an empty <td>

I think you are right, the netpoint code doesnt set visible to "yes please"..

But why ? I didnt make any changes. Do I need that special codeblock like in partlist.aspx, where booleans are set true ?

Former Member
0 Kudos

yeah I am not sure about those booleans. You might have to play around with those settings. I usually write custom controls to do this kind of stuff.