Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreHow to get the catalogue menu or gategory list?How to get the catalogue menu or gategory list?
Previous
 
Next
New Post
11/26/2010 11:23 AM
 
Hi there, I am trying to write a bit of code to grab the top level store categories so that I can use it in my own custom menu system, and I have tried messing around with the objects:
  DotNetNuke.Modules.Store.Admin.StoreController
  DotNetNuke.Modules.Store.Admin.StoreInfo
  DotNetNuke.Modules.Store.WebControls.CategoryMenu
and a few others and I cannot seem to find this list of store categories. Or where I can set the Default Category in code on a Page_Load() for that matter.

Can anybody please give me a hint as to where I can get hold of this list in my c# code?

Thanks,

Lindsay.
 
New Post
11/26/2010 12:02 PM
 
Actually, I've just found it.

For future in case anyone else searches on this then its in here:

DotNetNuke.Modules.Store.
Catalog.CategoryController cls10 = new DotNetNuke.Modules.Store.Catalog.CategoryController();
                System.Collections.ArrayList arrCategories = cls10.GetCategories(DotNetNuke.Entities.Portals.PortalSettings.Current.PortalId, false, -1);


Cheers,

L
 
New Post
11/26/2010 12:29 PM
 
Hi Lindsay,

Could you specify which Store version you use?

Gilles

We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
11/26/2010 1:45 PM
 
Hi there,

I use store version 05.05.01 (22)

I have a custom control where I am getting to certain pages with a catalog control on it and want to set the default category by adding on my own variable in the URL so the URL is
  /dotnetnuke/MyStorePage?SubCategoryID=3
(I have my reasons)

But I cant see where to set this DefaultCAtegoryID setting.
I have found the variable in here:
  DotNetNuke.Modules.Store.Catalog.GeneralSettings(ModuleId, CurrentTabID)
but I dont know how to get the current ModuleID of the "catalog" module on the ascx control load event.
I am thinking I have to now get all controls on the page and loop until I find the "Catalog" and then I can get its ModuleID but this seems a little overkill.
Am I doing this right to set the category to list products by at runtime?

Cheers,

Lins.

 
New Post
11/26/2010 5:07 PM
 
Hi Lyndsay,

05.05.01 is the version number of your DNN instance not the one of the Store module. Please go to Host > Modules Definitions, you should found the Store version number used in the module list.

The default category setting is not designed to be used by the Store Menu module but by the Store Catalog module. When the Store Catalog module (Catalog.ascx) is placed on a page, in the OnInit event the query string is read. If the CategoryID param is defined, products from the corresponding category are loaded then displayed. If the CategoryID param IS NOT defined, the default CategoryID is read from the Store Catalog module settings, then a redirect is done with the CatagoryID param in the query string.

The Store Menu module is able to higlight the selected category or the default category simply because the CssClass is changed if the CategoryID is equal to the CategoryID param from the query string.

Gilles

We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsStoreStoreHow to get the catalogue menu or gategory list?How to get the catalogue menu or gategory list?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out