You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Divesh Dutta (JIRA)" <ji...@apache.org> on 2015/01/17 15:20:34 UTC

[jira] [Commented] (OFBIZ-3563) Creating a category with an ID (manually or automatically) that matches an existing productID will show the unrelated product when enter into the category on the 'Browse category' of the Ecommerce application.

    [ https://issues.apache.org/jira/browse/OFBIZ-3563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14281359#comment-14281359 ] 

Divesh Dutta commented on OFBIZ-3563:
-------------------------------------

Algorithm snippet of doGet method of CatalogUrlServlet.java where modification is done.

Current algorithm:
    ...
    ...
Check: Is last path element starts with 'p_'
Yes?- 
    set ProductId after removing prepended 'p_'
    So, that it will be directed to Product Detail page.
No?- 
    Check: Do we have any product with productId = pathElement
    yes?- set productId.  So, that it will be redirected to Product detail page.
    ...
    ... 
 
So, if we have a categoryId same as productId then it don't check for category it first sets productId.


Algorithm used to fix the issue:

As per Scott's first solution:

...
...
Check: Is last path element starts with 'p_' ?
Yes?- 
    set ProductId after removing prepended 'p_'
    So, that it will be directed to Product Detail page.
No?- 
    Check: Do we have any category with categoryId = pathElement
    yes?- set categoryId.  So, that it will be redirected to Category detail page. Product List will be shown on Category detail page.


> Creating a category with an ID (manually or automatically) that matches an existing productID will show the unrelated product when enter into the category on the 'Browse category'  of the Ecommerce application.
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3563
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3563
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/ecommerce
>    Affects Versions: Trunk
>         Environment: Ubuntu 8.04
>            Reporter: Jonatan Soto
>              Labels: SEO, categoryid, productid
>         Attachments: OFBIZ-3563.patch
>
>
> Steps to reproduce it:
> - Create a new category and set the ID manually that corresponds with an existing productID.
> - Go to the Ecommerce app and enter in the category has been created.
> - The product with the same ID will be show but it isn't really related to this category.
> As Jacques noted on the ML, it could be related to an URL improvement (SEO)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)