Bypass product details page

May 15, 2009 at 12:52 PM

Can i bypass the product details page and just add items from my product list template to the cart? It seems i can do this normally until i start selling products with numerous models, then it automatically defaults to the detail page which i do not want?


any help much appreciated.





May 15, 2009 at 1:05 PM


The problem is that if a product has models until a model is selected NB_Store can't put into the cart. 

Therefore if a product has one model you can put it directly into the cart, if it has more than one model you must select the model before, hence you're redirected to the product detail page in order to select the model.

If you want the product to always go directly into the cart then your going to have to create 1 product for each model.



May 15, 2009 at 1:10 PM

but what if i have integrated the [TAG:MODELS] option into my product list template? Surely there is no need to go to the details page?

May 15, 2009 at 1:13 PM

Good point!!

I'll have a look how easy this is to implement.  If it's easy I'll put it into the next release.

May 15, 2009 at 1:16 PM

Is there any setting i can alter in the source files to disable the details page altogether? I need a quick fix as i want to launch a site next week!!!

May 15, 2009 at 1:32 PM

The only thing I can think that would work correctly is to change the code.  I've had a quick look and if you change the sub "dlProductList_ItemCommand" from


                Case "AddToBasket"
                    Dim item As DataListItem = e.Item
                    Dim ProductId As Integer = Int32.Parse(e.CommandArgument.ToString)
                    Dim objCtrl As New ProductController
                    Dim arylist As ArrayList

                    lblMsg.Text = ""

                    arylist = objCtrl.GetModelList(PortalId, ProductId, GetCurrentCulture)

                    If arylist.Count <> 1 Then
                        Response.Redirect(NavigateURL(TabId, "", "ProdId=" & ProductId.ToString, "PageIndex=" & _CurrentPage.ToString, "CatID=" & CatID.ToString))
                        CurrentCart.AddItemToCart(PortalId, item, CType(Settings("chkIncrementCart"), Boolean), Request)
                    End If

to just

                Case "AddToBasket"
                    Dim item As DataListItem = e.Item
                    CurrentCart.AddItemToCart(PortalId, item, CType(Settings("chkIncrementCart"), Boolean), Request)

in ProductList.ascx


I think it might work OK, Obviously I've not checked thsi yet.




May 15, 2009 at 1:46 PM

where exactly in the solution will i find dlProductList_ItemCommand? Is that a file or function within a file?





May 15, 2009 at 1:53 PM


        Private Sub dlProductList_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles dlProductList.ItemCommand

in ProductList.ascx.vb file.


I've just made the changes and tested and it seems to work correctly, I'll sqeeze this fix into v1.1.6



May 15, 2009 at 2:03 PM



I have just sent you an email, any chance you can send me the compiled update of the file as I haven't got the source code installed on my system.





May 15, 2009 at 2:14 PM

Just replied to your email,

Sorry I've only got v1.1.6 source on my dev machines, you'll have to do it yourself.

May 15, 2009 at 2:35 PM

Can't get it to work ;o(

May 15, 2009 at 3:03 PM

Does it compile OK?

May 16, 2009 at 1:00 AM

Dave this may sound like a stupid question and i feel like a bit of an idiot in asking as i'm quite proficient with VS and C#.

I have loaded the source into VS, made the changes and built the solution with no problem, however I only see the source vb files and not the finished ascx files in the source project. In my DNN installation I have the ascx files and not the ascx.vb files??

I'm getting really confused?


What's the best way to do the build and deploy the updated solution?




May 16, 2009 at 6:31 AM

Hi Dave,

Usually  (And I must say I've only done it once!):

1. Install the source packagezip onto DNN as a normal module.

2. In the source package there is also a, Extract this.

3. Extract all files in the source zip onto the "/desktopmodules/nb_Store" directory.

You should now have a directory with all the source and ascx files.  You may have troble conpiling the SIP provider, because you won't have all the refs on your machine.  But you don't need it so just remove it from the sloution.

Also you'll notice from the sln file, that I use the loclhost as a ref point so my dll's go into the correct bin folder, you may need/want to change this around to make sure it points to your localhost area.  Or alternativly simply remove it and do a copy of the dll's after compilation.

Hope this helps,


May 16, 2009 at 10:55 AM
Edited May 16, 2009 at 10:59 AM

I've tried it and have got compilation errors coming out of my ears? any chance of beta testing your latest build with this fix in place? i'm slowly losing the will to live but do not want to try another cart system as I am really getting the hang of this one ;o(




May 16, 2009 at 11:03 AM
Edited May 16, 2009 at 11:08 AM

Hi Dave,

Don't Panic!!

I release the beta v1.1.6 onto codeplex last night, I'm currently using it on a site I'm building and it seems to be working fine in that test situation.

If you can't get it working OK let me know and we'll work out a solution.



(P.S.  I think your problems come from the way I setup my .sln file, it's usually a references issue.  You could try going through the references and set them directly to the DotNetNuke.dll, etc..  and remove the projects from the solution in VS.   I do keep meaning to put together a source version that's compiles without having to change anything on your own machine, but just haven't found the time.)

May 16, 2009 at 11:05 AM

you the man ;o)

May 16, 2009 at 12:47 PM


I have downloaded and installed the beta and all appears to be working as expected. I will update you should i come across anything that needs mentioning.

Thanks for your support and help and keep up the good work, maybe one day you can make some money for all your hard work ;o)


Best wishes,