This discussion is archived
10 Replies Latest reply: Sep 16, 2013 8:23 AM by Rajeev_R RSS

Need help on displaying the popular items.

Jyothi.mj Newbie
Currently Being Moderated

Hi All,

 

I have a requirement to work on display the popular items Could you please help me how to full fill this requirement .

 

Thank you,

 

Regards,

Jyothi

  • 1. Re: Need help on displaying the popular items.
    samdani.gulam Journeyer
    Currently Being Moderated

    Define Popular in your requirement ? recommended items or most purchase items ?

  • 2. Re: Need help on displaying the popular items.
    GopinathRamasamy Journeyer
    Currently Being Moderated

    Hi,

     

    You need to extend product catalog repository for your requirement.

     

    This can be done in multiple ways depending on your requirement.

    A typical requirement will be to display popular items in a category when a user visits the category page. This can be achieved by adding a set property at the category level to store the popular items in that category. Your catalog administrator need to manage this setting.


    Hope this helps.

    If you are looking for something else, please be more specific on your requirements.

    Keep posting the updates / questions.

     

    Thanks,

    Gopinath Ramasamy

  • 3. Re: Need help on displaying the popular items.
    Jyothi.mj Newbie
    Currently Being Moderated

    Hi Gopinath Ramasamy/Samdani,

     

    Thanks for given reply,Here is my requirement to show the "most purchase items" .How to full fill this requirement .

     

    Thank you.

     

    Regards,

    Jyothi

  • 4. Re: Need help on displaying the popular items.
    GopinathRamasamy Journeyer
    Currently Being Moderated

    Here is my requirement to show the "most purchase items" .How to full fill this requirement .

    Hi,

     

    I would do the below high level approach ideally.

     

    1. Add a property to sku item - number of purchases

    2. In the CommitOrderFormHandler, add the qty of each commerce item to the number of purchases property of the corresponding sku

    3. When user visits a category page, query the repository to get the top N number of most purchased items based on this new property (use might need to sort the results using queryoptions, type of caching also need to be discussed here)

     

    Alternatively or more commonly, you can still have a property at sku level to say most purchased items and you can set them using BCC projects based on your sales data or by running offline queries against you DB.

     

    The approach might be much simpler if you create an Endeca cartridge for the same, in case if you have Endeca in your technical stack.

     

    Hope this helps.

    Keep posting your questions / updates.


    Thanks,

    Gopinath Ramasamy

  • 5. Re: Need help on displaying the popular items.
    Jyothi.mj Newbie
    Currently Being Moderated

    Hi ,

     

    Thanks a lot for given approach,

     

    In the 1st approach when there is an update in any SKU Item in versioned DB,I guess the value of newly added property(number of purchase)will be overridden from versioned DB, where the value is not incremented when any order is placed with this SKU. I understand that sku item's property will updated in non versinoed DB only. Please correct me if I'm wrong.

     

    In the 2nd approach, I understand that the newly added property (most purchased items)to the sku need to be setup manually by a person to the sku whether the sku is the  most purchase item or not.

     

    Regards,

    Jyothi

  • 6. Re: Need help on displaying the popular items.
    Rajeev_R Journeyer
    Currently Being Moderated

    You are right, the first approach suggested by Gopinath will not work properly and it is not recommended to update any catalog property during purchase journey. The second approach is driven by the Merchandiser where Merchandiser will be able to decide which are top selling to boost the sale of particular items in a marketing way.

     

    If you need Top Selling items based on real purchase, design a new repository that contains SKU Id and/or productid, orderid and date. You can fill the data to this repository in two ways,

     

    1) Update this table on submit of order i.e after authorizing the payment. The problem with this approach is that in some cases the customer will have a lead time to cancel or amend the order, you may need consider removing item in this case

     

    2) Run a scheduler every day to get the items from the orders purchased on that day and update the repository.

     

    Using this repository you can identify all the top selling items even for a given day and display to the customer.

     

    Cheers

    R

  • 7. Re: Need help on displaying the popular items.
    Jyothi.mj Newbie
    Currently Being Moderated

    Hi Rajveev,

     

    Much thanks for given reply.

     

    I am using the 2nd approach ,and I created the new repository as below.

    <item-descriptor name="popularItem" display-property="popularDate" item-cache-size="1000" query-cache-size="1000" id-space-name="popularItem" cache-mode="disabled" display-name-resource="popularItem">

          

      <table name="popular_item" type="primary" id-column-name="popular_item_id">

            <property name="popularItem" column-name="popular_id" data-type="int" display-name-resource="popularItem" queryable="true" category-resource="popolarItemsInformationCategory">

            <attribute name="propertySortPriority" value="1"/>

            </property>  

            <property name="popularSku" column-name="sku_id" item-type="sku" repository="/atg/commerce/catalog/ProductCatalog" category-resource="popolarItemsInformationCategory"

            display-name-resource="Popular Sku">

             <attribute name="propertySortPriority" value="2" />

              </property>     

      </table>

       

    </item-descriptor>

     

    Correct me if any thing wrong in the above .Could you please give me any information for writing an schedulers in atg.

     

    Regards,

    Jyothi

  • 8. Re: Need help on displaying the popular items.
    Rajeev_R Journeyer
    Currently Being Moderated

    You may need to add additional properties in your repository based on your requirements, considering for a a base solution this should be ok.

     

    For scheduler implementation refer, Oracle ATG Web Commerce - Scheduler Services (Go through this chapter) and post your queries if required.

     

    Cheers

    R

  • 9. Re: Need help on displaying the popular items.
    Jyothi.mj Newbie
    Currently Being Moderated

    Hi Rajeev,

     

    Could you please tell me how to get all the items from the orders(purchased on that day) ,I Guess there is a method in CRS module to get all the orders(doPostCommitOrderProcessing).But in my requirement we are not using the CRS module.


    Could you please tell me how to get the orders.


    Regards,

    Jyothi


     

  • 10. Re: Need help on displaying the popular items.
    Rajeev_R Journeyer
    Currently Being Moderated

    I dont think there is any OOTB method you can directly use. You can define an RQL query like 'select order_id from order where date =?' and write a method in your OrderManager say List[<RepositoryItem>] getOrdersByDate(Date currentDate) and execute the RQL and return the list of orders.

     

    Cheers

    R

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points