3

I'd like to have the price as configured block visible both on top & on bottom (as it currently is) for the bundle product page:

product-options-bottom

Looking through app/design/frontend/base/default/template/ I can see that this is populated by the following files:

bundle/catalog/product/view/type/bundle.phtml on line 45:

<?php echo $this->getChildHtml('bundle_prices') ?>

And catalog/product/view/options/wrapper/bottom.phtml on line 27:

<div class="product-options-bottom">
    <?php echo $this->getChildHtml('', true, true);?>
</div>

The first one seemingly responsible for the population of the numeric pricing value based on option selection, whereas the second one is responsible for generating the block in it's entirety.

Unfortunately, the call $this->getChildHtml('', true, true); doesn't point me in much direction with regards to what to lookout for in the layout file.

Would really appreciate any pointer as to how I could get that block (& accompanying JS) duplicated on top (prior to the options) instead of just below. This way the customer can see pricing without having to scroll through all the options (if there is a default configuration selected).

Like this:

enter image description here

  • 1
    Have you used template hints or Aoe Advanced template hints to find out which blocks they are? – Sander Mangel Nov 17 '14 at 20:22
  • @SanderMangel thanks, using the advanced template hints, trying to tackle it in the meantime, block in specific is Mage_Catalog_Block_Product_View – Moose Nov 18 '14 at 8:25
  • Hi, how to archive this ..? – VijayS91 Mar 16 '16 at 18:43
1

You can find layout definition of the block in question in app/design/frontend/{package}/{theme}/layout/bundle.xml.

<layout>
    <PRODUCT_TYPE_bundle translate="label" module="bundle">
       ...
       <reference name="product.info">
          ...
          <block type="bundle/catalog_product_price" name="bundle.prices" as="bundle_prices" template="bundle/catalog/product/view/price.phtml">
               <action method="setMAPTemplate"><tmpl>catalog/product/price_msrp_item.phtml</tmpl></action>
          </block>
          ...
       </reference>
    </PRODUCT_TYPE_bundle>
</layout>

So invoking below block

<block type="bundle/catalog_product_price" name="bundle.prices" as="bundle_prices" template="bundle/catalog/product/view/price.phtml">
    <action method="setMAPTemplate"><tmpl>catalog/product/price_msrp_item.phtml</tmpl></action>
</block>

probably with some other name and alias name and call that block in appropriate template will leads to what you are trying to achieve.


[This answer is a part of #mageStackDay5. It is an event conducted by Magento Community members as part of increasing the question-answer ratio. For more information http://www.magestackday.com/]

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.