1 2 Previous Next 18 Replies Latest reply: Dec 11, 2012 4:51 AM by Kumaresh Babu RSS

    Multiple Catalogs

    Kumaresh Babu
      Hi All,

      Can anyone tell me how to derive store based catalog. If the user changes the store the catalog have to change for the site..
        • 1. Re: Multiple Catalogs
          Gurvinder
          There is a servlet that takes care of assigning the catalogs.
          /atg/dynamo/servlet/dafpipeline/ProfilePropertyServlet

          its property profilePropertySetters sets catalog and price list to profile.

          profilePropertySetters+=/atg/userprofiling/CatalogProfilePropertySetter,\
          /atg/userprofiling/PriceListProfilePropertySetter

          You might want to override CatalogProfilePropertySetter as per your requirements.

          Also you can go through the following link to get more understanding about this topic.
          http://docs.oracle.com/cd/E24152_01/Platform.10-1/ATGCommProgGuide/html/s0312assigningacatalogtoauser01.html

          ~Gurvinder
          • 2. Re: Multiple Catalogs
            Gopinath Ramasamy
            Hi,

            Please check whether the below approach is helpful to you.

            Create a jsp page in which you present option to switch the store. Create a SwitchStoreFormHandler to process this form.

            In this, in the postSwitchStore (which is called at the end of handleSwitchStore method),

            i) get the new store's catalog
            ii) set the catalog property of user repository item to this new catalog.
            (For details on assigning a catalog to an user, refer http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGCommProgGuide/html/s0312assigningacatalogtoauser01.html).

            Hope this helps.

            Keep posting your updates / questions.

            Thanks,
            Gopinath Ramasamy
            • 3. Re: Multiple Catalogs
              Kumaresh Babu
              Hi Gurvinder,

              Thanks for your suggestion.. I am suppose to do store based catalog not in profile based.

              AKB
              • 4. Re: Multiple Catalogs
                Kumaresh Babu
                need to proceed
                • 5. Re: Multiple Catalogs
                  Kumaresh Babu
                  Hi Gopinath Ramasamy,

                  Now i got the clear cut idea how to proceed with this. But i have some queries, what should i write in handleSwitchStore and also get the new store's catalog whether i want to map catalog for a store in BCC or How to assign a catalog for a store.

                  AKB
                  • 6. Re: Multiple Catalogs
                    Kumaresh Babu
                    Need Help ASAP..
                    • 7. Re: Multiple Catalogs
                      Gopinath Ramasamy
                      Hi,

                      Inside the handleSwithStore,

                      1. Do any validations of the form input that is given by the user while choosing to switch stores.
                      2. If you have are storing the store property as part of userprofile, update it with the new store info.
                      3. You can either assign a catalog to a store or a set of stores to a catalog depending on your requirement.
                      i)Assigning a catalog to a store:
                      Create a property in the store item-descriptor to store the catalog that is valid in this store. set the item-type as "catalog".
                      Thro Bcc, while creating a store, you can assign a catalog to it.
                      ii) Assigning a list of stores to a catalog:
                      Create a property in the catalog item descriptor to store a list of stores in which the catalog is applicable. set the data-type="list" and component-item-type="store".
                      Thro BCC, while creating a catalog, you can assign to a list of stores.
                      4. In the postSwitchStore method, set the user's catalog to that of the new store that the user has selected.


                      Note: You may have the store item and catalog item in different repositories (say userprofile.xml and productcatalog.xml). To handle this, add the attribute repository="/atg/userprofiling/ProfileAdapterRepository" as and when necessary. Please refer to this link for linking between repositories - http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGRepositoryGuide/html/s0713linkingbetweenrepositories01.html.

                      Hope this helps.

                      Keep posting your updates / questions.

                      Thanks,
                      Gopinath Ramasamy
                      • 8. Re: Multiple Catalogs
                        Kumaresh Babu
                        Hi Gopinath Ramasamy,

                        Create a property in the store item-descriptor to store the catalog that is valid in this store. set the item-type as "catalog".

                        -it means i need to create a new item descriptor called store in the ProductCatalog or need to Update in StoreRepository.

                        AKB

                        Edited by: Kumaresh Babu on Dec 7, 2012 4:27 AM
                        • 9. Re: Multiple Catalogs
                          RMishra
                          No, above means you have to create a property like "MyCatalog" in "store" item-descriptor.
                          <item-descriptor name="store".............>
                          <property name="MyCatalog" item-type="catalog" repository="/atg/commerce/catalog/ProductCatalog".............../>
                          </item-descrptor>

                          -RMishra

                          Edited by: RMishra on Dec 10, 2012 10:36 AM
                          • 10. Re: Multiple Catalogs
                            Kumaresh Babu
                            Hi RMishra,

                            Thanks for ur idea..

                            AKB
                            • 11. Re: Multiple Catalogs
                              Kumaresh Babu
                              Hi Gopinath,

                              As you suggested i did it.. i can update the catalog property of the user. But it not reflecting in the site. Could u briefly tell me how to use CatalogProfilePropertySetter what i have to make changes in this.

                              AKB
                              • 12. Re: Multiple Catalogs
                                Gopinath Ramasamy
                                Hi,

                                Are you using any caching for the catalog property of the user. If so, you end up in getting the old catalog for the user from the cache. Remove any caching and try again.

                                Keep posting the issues / questions.

                                Thanks,
                                Gopinath Ramasamy
                                • 13. Re: Multiple Catalogs
                                  Kumaresh Babu
                                  HI Gopi,

                                  No i havent used any cache. One more thing i didnt make use of CatalogProfilePropertySetter, i didnt customize this because i dono which method i need to over ride.

                                  Steps I did
                                  1)Mapping of store --->Catalog, customized in store item descriptor.
                                  2)Once i get the store detail of the user i updated catalog propeerty of the user..Thats it done.. Please Guide me how to use CatalogProfilePropertySetter.

                                  AKB

                                  Edited by: Kumaresh Babu on Dec 10, 2012 2:44 AM
                                  • 14. Re: Multiple Catalogs
                                    Gopinath Ramasamy
                                    Hi Kumaresh,

                                    After you set the new catalog in the user profile, has it got updated in the DB?
                                    1 2 Previous Next