magentofacebook-likebox

Magento block template has different positions in the right sidebar depending on the page


My goal is to place Facebook like box above "Recently Viewed Product" section in the right sidebar. To accomplish this I put the following lines into local․xml․

<default>
    <reference name="right">
        <block type="core/template" name="socialsharing"
          template="social/facebooklikebox.phtml"
          before="right.reports.product.viewed" />
    </reference>
</default>

But accidentally I found that in some pages Facebook like box is placed below "Recently Viewed Product". I can't find out the reason of this behaviour.

UPDATE:

When I removed "right.reports.product.viewed" block I realized that in some pages "Recently Viewed Product" is still existed. So I understood that some pages are displayed with "Recently Viewed Product" using "right.reports.product.viewed" and some using "left.reports.product.viewed".

Any help or suggestions would be greatly appreciated.

Thanks


Solution

  • Finally I have got the answer how to put "Facebook Like Box" above "Recently Viewed Product" in all pages:

    <default>
        <reference name="right">
            <block type="core/template" name="socialsharing"
              template="social/facebooklikebox.phtml"
              before="left.reports.product.viewed" />
        </reference>
    </default>
    

    In my case it was necessary to use 'before="left.reports.product.viewed"' instead of 'before="right.reports.product.viewed"'.

    Unfortunately, I still don't know the reason of behavior mentioned in the "UPDATE" section of the question.