Magento News
Custom footer text for each page/product
by Mark (Posted Wed, 12 May 2010 15:24:05 GMT)
Just tried to have a go at it again but to no avail.
What I have done, using your first method:
1 – Added a textarea attribute to products called “footer_text”.
2 – In layout/catalog.xml, added the footer reference to catalog_product_view section, like so:
- Code:
<!--
Product view
-->
    <catalog_product_view>
        <!-- Mage_Catalog -->
        <reference name="root">
        </reference>
        <reference name="head">
            <action method="addJs"><script>varien/product.js            js_csscalendar/calendar-win2k-1.css<!--can_load_calendar_js-->
            jscalendar/calendar.js<!--can_load_calendar_js-->
            jscalendar/calendar-setup.js<!--can_load_calendar_js-->
       Â
       Â
           Â
               Â
               Â
               Â               Â
                    descriptioncatalog/product_view_descriptioncatalog/product/view/description.phtml
                    additionalcatalog/product_view_attributescatalog/product/view/attributes.phtml
                    upsell_productscatalog/product_list_upsellcatalog/product/list/upsell.phtml
               Â
                  Â
               Â
               Â
               Â
               Â               Â
                   Â
                   Â
                        textcatalog/product_view_options_type_textcatalog/product/view/options/type/text.phtml
                        filecatalog/product_view_options_type_filecatalog/product/view/options/type/file.phtml
                        selectcatalog/product_view_options_type_selectcatalog/product/view/options/type/select.phtml
                        datecatalog/product_view_options_type_datecatalog/product/view/options/type/date.phtml
                   Â
                   Â
               Â
               Â
                    product.tierprices
                   Â
                    product.info.addtocart
               Â               Â
                    alias_in_layoutcontainer1
                    options_containerproduct
                    product.info.options.wrapper
                    product.info.options.wrapper.bottom
               Â
               Â
                    alias_in_layoutcontainer2
                    options_containerproduct
                    product.info.options.wrapper
                    product.info.options.wrapper.bottom
               Â
                container1ifEquals0alias_in_layoutoptions_container
                container2ifEquals0alias_in_layoutoptions_container
           Â
       Â
       Â
            5
            upsell5
       Â
       Â
           Â
       Â
       Â
     Â
       Â
   Â
<!--
Additional block dependant on product type
-->
3 – Then in template/page/html/footer.phtml, added
- Code:
<?php echo $this->getChildHtml('product.custom.footer.text'); ?>
like so:
- Code:
    <?php echo $this->getChildHtml('store_switcher') ?>
    <?php echo $this->getChildHtml('cms_footer_links') ?>
    <?php echo $this->getChildHtml('footer_links') ?>
    <?php echo $this->getChildHtml('newsletter') ?>
<?php echo $this->getCopyright() ?>
<?php echo $this->getChildHtml('footer_text', false) ?>
<?php echo $this->getChildHtml('product.custom.footer.text'); ?>
4 – Then created a file called footer-text.phtml inside templates/catalog/product/view with the following code:
- Code:
<?php $_product = Mage::registry('product') ?>
<?php if ($_product): ?>
    <?php $allowedHtmlValues = '
Have I done anything wrong with the above as I still cannot seem to get it to work?
http://magento-forum.co.uk/viewtopic.php?f=5&t=127#p891
Possibly Related Posts:
- Magento USPS Shipping Method, add option / force Insurance by pmuskoff http://t.co/JMbzme8o
- #freelance jobs: Magento USPS Shipping Method, add option / force Insurance by pmuskoff: We run a Mage… http://t.co/X5syN4Xc #projects
- Magento USPS Shipping Method, add option / force Insurance by pmuskoff: We run a Magento store … http://t.co/cjTFzhit #freelance #work
- Magento USPS Shipping Method, add option / force Insurance by pmuskoff: We run a Magento store in… http://t.co/K4NdKyWs #magento #jobs
- We run a Magento store in which everything is shipped via USPS. We ship valuable products which need to be insu… http://t.co/JmW0PeR0
RSS Feed