0

I customize the tabs on product detail page. I created an attribute on the admin code it like this

<div class="product-collateral toggle-content tabs">

<dl class="collateral-tabs" id="collateral-tabs">

<!--  First tab  **********************    -->

    <dt class="tab"><span>Description</span></dt>
    <dd class="tab-container">
        <div class="tab-content">    
            <h2>Details</h2>
            <div class="std">
                <?php echo $_product->getDescription() ?>  
            </div>
        </div>
    </dd>

    <!--  Second tab  **********************    -->
    <dt class="tab"><span>Specification</span></dt>
    <dd class="tab-container">
        <div class="tab-content">
            <div id="specification" class="std">
                <?php echo $_product->getSpecification() ?>
            </div>
        </div>
    </dd>

    <!--  Third tab  **********************    -->
    <dt class="tab"><span>Delivery</span></dt>
    <dd class="tab-container">
        <div class="tab-content">
            <div id="delivery" class="std">
                <?php echo $_product->getDelivery() ?>
            </div>
        </div>
    </dd>

    <!--  Fourth tab  **********************    -->
    <dt class="tab"><span>Reviews</span></dt>
    <dd class="tab-container">
        <div class="tab-content">
            <div id="customer-reviews" class="std">
                <p class="no-rating"> <?php echo $this->getReviewsSummaryHtml($_product, false, true)?></p>
            </div>
        </div>
    </dd>


</dl>

But what happen is, the images is not loading. I used WYSIWYG editor for description, specification and delivery tab.

I think I'm missing something? I'm using RWD theme on Magento Enterprise edition version 1.9

Please help.

Hope and appreciate your answers

1 Answer 1

1

INstead of echo $_product->getDescription() try this:

echo $this->helper('catalog/output')->productAttribute($_product, $_product->getDescription, 'description');

If it works do the same for delivery and specifications.

4
  • Hi Marius, Thanks for your reply. I tried your code but its not working. Any other way? Aug 20, 2014 at 1:01
  • Define "not working". You also have to allow media directives in product attributes. For that go to System->Configuration->Catalog->Frontend and set the flag Allow Dynamic Media URLs in Products and Categories to Yes.
    – Marius
    Aug 20, 2014 at 6:04
  • Hi. I already did it. I found out the template calling is not all in the theme directory hence it is on the other theme for example on the base theme. I just copy it and rename it to my desire tab.Thanks for the help though :) Aug 20, 2014 at 6:26
  • @AlyssaReyes. In this case please add what you found as an answer and mark it as accepted.
    – Marius
    Aug 20, 2014 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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