cancel
Showing results for 
Search instead for 
Did you mean: 

If Description is empty copy from short description

If Description is empty copy from short description

I have many products that have no description but all have short descriptions How can I copy from short description if description is empty?

Magento 1.9.2

1 REPLY 1

Re: If Description is empty copy from short description

If you want to display short_description if description is null then use following code

 

 <?php if (!$_product->getDescription()):?>
                    <p><?php echo  $_product->getShortDescription() ?></p>
               
  <?php endif;?>
Find helpful ? Consider Giving Kudos to this post.
Problem solved? Click Accept as Solution!"
Qaisar Satti